-ZoneToBind struct

-Added opcode for ZoneToBind
-Added opcode for RespawnWnd (it looks like this is the same as rof2 so no struct work right now unless it doesn't end up working)
This commit is contained in:
KimLS 2024-12-18 22:16:09 -08:00
parent 852667016d
commit f040bbdb03
4 changed files with 39 additions and 2 deletions

View File

@ -3207,6 +3207,27 @@ namespace Laurion
ENCODE(OP_RemoveBlockedBuffs) { ENCODE_FORWARD(OP_BlockedBuffs); }
ENCODE(OP_ZonePlayerToBind)
{
SETUP_VAR_ENCODE(ZonePlayerToBind_Struct);
ALLOC_LEN_ENCODE(sizeof(structs::ZonePlayerToBind_Struct) + strlen(emu->zone_name));
__packet->SetWritePosition(0);
__packet->WriteUInt16(emu->bind_zone_id);
__packet->WriteUInt16(emu->bind_instance_id);
__packet->WriteFloat(emu->x);
__packet->WriteFloat(emu->y);
__packet->WriteFloat(emu->z);
__packet->WriteFloat(emu->heading);
__packet->WriteString(emu->zone_name);
__packet->WriteUInt32(60);
__packet->WriteUInt32(0);
__packet->WriteUInt32(51);
__packet->WriteUInt32(41);
FINISH_ENCODE();
}
// DECODE methods
DECODE(OP_EnterWorld)

View File

@ -46,6 +46,7 @@ E(OP_SkillUpdate)
E(OP_RespondAA)
E(OP_BlockedBuffs)
E(OP_RemoveBlockedBuffs)
E(OP_ZonePlayerToBind)
//list of packets we need to decode on the way in:
D(OP_EnterWorld)

View File

@ -795,6 +795,21 @@ namespace Laurion {
/*125*/ uint8 Initialise;
/*126*/ uint16 Flags;
};
struct ZonePlayerToBind_Struct {
//Same structure as the binds in PlayerProfile_Struct
//Assembly calls the same function
/*000*/ uint16 bind_zone_id;
/*002*/ uint16 bind_instance_id;
/*004*/ float x;
/*008*/ float y;
/*012*/ float z;
/*016*/ float heading;
/*020*/ char zone_name[1]; // Or "Bind Location"
/*021*/ uint32 unknown1;
/*025*/ uint32 unknown2;
/*029*/ uint32 unknown3;
};
#pragma pack()
}; //end namespace structs

View File

@ -222,7 +222,7 @@ OP_ChannelMessage=0x6adc
OP_Assist=0x51f1
OP_AssistGroup=0x3f23
OP_MoveCoin=0x0000
OP_ZonePlayerToBind=0x0000
OP_ZonePlayerToBind=0x5643
OP_KeyRing=0x0000
OP_WhoAllRequest=0x0000
OP_WhoAllResponse=0x0000
@ -330,7 +330,7 @@ OP_PVPLeaderBoardReply=0x0000
OP_PVPLeaderBoardDetailsRequest=0x0000
OP_PVPLeaderBoardDetailsReply=0x0000
OP_RestState=0x0000
OP_RespawnWindow=0x0000
OP_RespawnWindow=0x55ed
OP_LDoNButton=0x0000
OP_SetStartCity=0x0000
OP_VoiceMacroIn=0x0000