Ok, I found THE bug and I fixed it!!! Finaly, after a month of useless attempts for fixing this I did it. Well, there realy was a bug. For everybody that downloaded Verrigan's modified MSE with BinPackets, the bug is that when you send the same data to a lot of diferent persons, like SendDataToAll, the Buffer get's messy the first time you send this data. Why? Simple! It was being used as ByRef and that way when, inside SendDataToNew, this code executes:
Code:
Data = PrefixBuffer(Data, VarPtr(CByte(pType)), 1)
Data = PrefixBuffer(Data, VarPtr(aLen(Data)), 2)
it will replace the old data with this one already modified... So you need to do this once or don't edit. My fix will only don't change the Data() variable. It will copy the data inside Data() variable to an other variable, DataB.
To fix, inside SendDataToNew, replace:
Code:
Data = PrefixBuffer(Data, VarPtr(CByte(pType)), 1)
Data = PrefixBuffer(Data, VarPtr(aLen(Data)), 2)
GameServer.Sockets(Index).WriteBytes Data
With:
Code:
Dim DataB() As Byte
DataB = Data
DataB = PrefixBuffer(DataB, VarPtr(CByte(pType)), 1)
DataB = PrefixBuffer(DataB, VarPtr(aLen(DataB)), 2)
GameServer.Sockets(Index).WriteBytes Data
That shall fix it!
Alright this confused the Hell out of me..
SendDataToNew doesnt exist, and the only thing similar to it that I could find was SendDataNew on the client, which doesn't use GameServer O.O. Soooo.. wth.
Also, does anyone have more bug fixes for mse-verrigan? I'm unfamiliar with binary packets, and looking around I haven't found anything that goes more indepth about the subject.
Holy pain in the ass. I didn't realize the editors hardly work. The HandleSave____'s are bugged :[ And the SendEditNpcs crashes the client (occurs in the prefix buffer). Looking at it I'm not sure what went wrong, any help?