Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Items
#1
Noticed something strange now. A unedited MSE1 (Client Side):
Code:
' ::::::::::::::::::::::::
    ' :: Update item packet ::
    ' ::::::::::::::::::::::::
    If (LCase(Parse(0)) = "updateitem") Then
        n = Val(Parse(1))
        
        ' Update the item
        Item(n).Name = Parse(2)
        Item(n).Pic = Val(Parse(3))
        Item(n).Type = Val(Parse(4))
        Item(n).Data1 = 0
        Item(n).Data2 = 0
        Item(n).Data3 = 0
        Exit Sub
    End If
It should be:
Code:
' ::::::::::::::::::::::::
    ' :: Update item packet ::
    ' ::::::::::::::::::::::::
    If (LCase(Parse(0)) = "updateitem") Then
        n = Val(Parse(1))
        
        ' Update the item
        Item(n).Name = Parse(2)
        Item(n).Pic = Val(Parse(3))
        Item(n).Type = Val(Parse(4))
        Item(n).Data1 = Val(Parse(5))
        Item(n).Data2 = Val(Parse(6))
        Item(n).Data3 = Val(Parse(7))
        Exit Sub
    End If
Why update a new edited item with 0?

Server Side
Replace the packet part in: SendUpdateItemTo
with the packet part from: SendUpdateItemToAll

Unedited looks like this:
Code:
Packet = "UPDATEITEM" & SEP_CHAR & ItemNum & SEP_CHAR & Trim(Item(ItemNum).Name) & SEP_CHAR & Item(ItemNum).Pic & SEP_CHAR & Item(ItemNum).Type & SEP_CHAR & Item(ItemNum).Data1 & SEP_CHAR & Item(ItemNum).Data2 & SEP_CHAR & Item(ItemNum).Data3 & SEP_CHAR & END_CHAR
Reply
#2
The only reason I can think of, is that, when mirage was originally programmed bandwidth was at a premium. The client only uses the data parts of an item when it's being edited, otherwise they're just used for map items and the server does all the work on the items stats.
It is certainly worthwhile mentioning it though, I had to add this fix when I made an inventory item rollover despcription. Well spotted Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)