Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Could this be causing a paperdoll problem?


balliztik1
 Share

Recommended Posts

Once again, I stumble across something that I wasn't looking for.

Here's the sub in question.
```
Sub SendIndexWornEquipmentFromMap(ByVal index As Long)
Dim packet As String
Dim I As Long
Dim Armor As Long
Dim Helmet As Long
Dim Shield As Long
Dim Weapon As Long
Dim Legs As Long
Dim Ring As Long
Dim Necklace As Long

    For I = 1 To MAX_PLAYERS
        If IsPlaying(I) = True Then
            If GetPlayerMap(index) = GetPlayerMap(I) Then
                Armor = 0
                Helmet = 0
                Shield = 0
                Weapon = 0
                Legs = 0
                Ring = 0
                Necklace = 0

                If GetPlayerArmorSlot(I) > 0 Then Armor = GetPlayerInvItemNum(I, GetPlayerArmorSlot(I))
                If GetPlayerHelmetSlot(I) > 0 Then Helmet = GetPlayerInvItemNum(I, GetPlayerHelmetSlot(I))
                If GetPlayerShieldSlot(I) > 0 Then Shield = GetPlayerInvItemNum(I, GetPlayerShieldSlot(I))
                If GetPlayerWeaponSlot(I) > 0 Then Weapon = GetPlayerInvItemNum(I, GetPlayerWeaponSlot(I))
                If GetPlayerLegsSlot(I) > 0 Then Legs = GetPlayerInvItemNum(I, GetPlayerLegsSlot(I))
                If GetPlayerRingSlot(I) > 0 Then Ring = GetPlayerInvItemNum(I, GetPlayerRingSlot(I))
                If GetPlayerNecklaceSlot(I) > 0 Then Necklace = GetPlayerInvItemNum(I, GetPlayerNecklaceSlot(I))

                packet = "itemworn" & SEP_CHAR & index & SEP_CHAR & Armor & SEP_CHAR & Weapon & SEP_CHAR & Helmet & SEP_CHAR & Shield & SEP_CHAR & Legs & SEP_CHAR & Ring & SEP_CHAR & Necklace & SEP_CHAR & END_CHAR
                Call SendDataTo(index, packet)
            End If
        End If
    Next I
End Sub
```
It's sending a packet to player _index_ with player _I_'s paperdoll.

This:

> packet = "itemworn" & SEP_CHAR & **index** & SEP_CHAR & Armor & SEP_CHAR & Weapon & SEP_CHAR & Helmet & SEP_CHAR & Shield & SEP_CHAR & Legs & SEP_CHAR & Ring & SEP_CHAR & Necklace & SEP_CHAR & END_CHAR

Should be:

> packet = "itemworn" & SEP_CHAR & **I** & SEP_CHAR & Armor & SEP_CHAR & Weapon & SEP_CHAR & Helmet & SEP_CHAR & Shield & SEP_CHAR & Legs & SEP_CHAR & Ring & SEP_CHAR & Necklace & SEP_CHAR & END_CHAR

Right?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...