Quote:
Originally Posted by Synsia
SendFunc: 0x6dfee2
I have no idea why he's using edx, but it's not needed to call the function.
|
The SendPacketAddress works fine for me and I can map the packet based on my old proxy packet structure. But the receivepacket seems wont work on the entity other than my character. It won't logs the activity caused by other entity like action, character spawn and etc.
This part is working fine :
Code:
Private Sub HandleSentPacket(ByRef ctx As CONTEXT)
If NetworkClass = 0 Then NetworkClass = ctx.Esi
Dim lpPacket As Integer = Me._dbg.ReadInt32(ctx.Esp + 4)
Dim Size As Integer = Me._dbg.ReadInt32(ctx.Esp + 8)
Dim data() As Byte = Me._dbg.ReadByteArray(lpPacket, Size)
Dim mPacket As packet.myPacket
mPacket = New packet.myPacket(Data)
If Packet.Chat.IsThisType(mPacket) Then
Dim mchat As packet.Chat = New packet.Chat(mPacket)
' mchat.Message = "123"
End If
If packet.Action.IsThisType(mPacket) Then
Dim maction As packet.Action = New packet.Action(mPacket)
' Blah blah
' Blah blah
End If
End If
Me._dbg.WriteByteArray(data, lpPacket)
End Sub
This part will not update on any activities cause by other entity:
Code:
Private Sub HandleRecvPacket(ByRef ctx As CONTEXT)
Dim lpPacket As Integer = Me._dbg.ReadInt32(ctx.Esp + 4)
Dim Size As Integer = Me._dbg.ReadInt32(ctx.Esp + 8)
Dim data() As Byte = Me._dbg.ReadByteArray(lpPacket, Size)
Dim mPacket As packet.myPacket
mPacket = New packet.myPacket(data)
If packet.CharacterInformation.IsThisType(mPacket) Then
Dim CharInfo As packet.CharacterInformation = New packet.CharacterInformation(mPacket)
mychar = New character(CharInfo)
charInfoIsLoadedFlg = True
AddUpdateNearbyEntities(CharInfo.FirstName, CharInfo.AcountID, 0, 0)
End If
If packet.CharacterSpawning.IsThisType(mPacket) Then
'Dim charspawn As packet.CharacterSpawning = New packet.CharacterSpawning(mPacket)
'AddUpdateNearbyEntities(charspawn.CharacterName, charspawn.CharacterID, charspawn.CharacterCoordX, charspawn.CharacterCoordY)
'If charspawn.CharacterStatus = &H4200000000000C8 Then
' UpdateDeathAliveChar(charspawn.CharacterID, 0)
'Else
'UpdateDeathAliveChar(charspawn.CharacterID, 1)
'End If
End If
If packet.GeneralData.IsThisType(mPacket) Then
Dim gendata As packet.GeneralData = New packet.GeneralData(mPacket)
If gendata.DataType = 137 Then
Me.OnCharMovement = True
AddUpdateNearbyEntities(getName(gendata.EntityID), gendata.EntityID, gendata.CoordX, gendata.CoordY)
End If
End If
If packet.Walk.IsThisType(mPacket) Then
Dim mwalk As packet.Walk = New packet.Walk(mPacket)
UpdateNearbyEntitiesWalking(mwalk)
End If
If packet.EntityStatus.IsThisType(mPacket) Then
Dim estat As packet.EntityStatus = New packet.EntityStatus(mPacket)
If estat.StatusType = 25 Then
If estat.StatusValue = 32 Then
UpdateDeathAliveChar(estat.CharacterID, 0)
ElseIf estat.StatusValue = 0 Then
UpdateDeathAliveChar(estat.CharacterID, 1)
End If
End If
End If
End Sub
I am using these addresses(I am clueless also on how did you guys get that values):
SendPacketAddress= &H6DFEE2
RecvPacketAddress= &H6E2809
Hope someone will enlighten me. Thanks.