Fix for door clicking, add a few more opcodes.

This commit is contained in:
KimLS 2024-11-30 15:17:46 -08:00
parent b95cd989c4
commit 2d8b777120
8 changed files with 34 additions and 33 deletions

View File

@ -1,8 +1,6 @@
// system use
N(OP_ExploreUnknown),
// start (please add new opcodes in descending order and re-order any name changes where applicable)
N(OP_0x0193),
N(OP_0x0347),
N(OP_AAAction),
N(OP_AAExpUpdate),
N(OP_AcceptNewTask),

View File

@ -2748,6 +2748,17 @@ namespace Laurion
DECODE(OP_ConsiderCorpse) { DECODE_FORWARD(OP_Consider); }
DECODE(OP_ClickDoor)
{
DECODE_LENGTH_EXACT(structs::ClickDoor_Struct);
SETUP_DIRECT_DECODE(ClickDoor_Struct, structs::ClickDoor_Struct);
IN(doorid);
IN(player_id);
FINISH_DIRECT_DECODE();
}
//Naive version but should work well enough for now
int ExtractIDFile(const std::string& input) {
std::string number;

View File

@ -37,6 +37,7 @@ D(OP_ChannelMessage)
D(OP_SetServerFilter)
D(OP_Consider)
D(OP_ConsiderCorpse)
D(OP_ClickDoor)
#undef E
#undef D

View File

@ -468,6 +468,16 @@ namespace Laurion {
/*18*/
};
struct ClickDoor_Struct {
/*00*/ uint16 player_id;
/*02*/ uint8 padding1[2];
/*04*/ int32 unknown1;
/*08*/ int32 unknown2;
/*12*/ uint8 doorid;
/*13*/ uint8 padding2[3];
};
#pragma pack()
}; //end namespace structs

View File

@ -38,8 +38,8 @@ OP_DeleteCharacter=x67d7
OP_RandomNameGenerator=0x49d9
OP_ApproveName=0x11e5
OP_MOTD=0x0000
OP_SetChatServer=0x2726
OP_SetChatServer2=0x0000
OP_SetChatServer=0x0000
OP_SetChatServer2=0x2726
OP_ZoneServerInfo=0x2273
OP_WorldComplete=0x195c
OP_WorldUnknown001=0x2049
@ -78,7 +78,7 @@ OP_PreLogoutReply=0x0000
# Required to fully log in
OP_SpawnAppearance=0x4eb0
OP_ChangeSize=0x0000 #0x2fdc
OP_ChangeSize=0x2fdc
OP_TributeUpdate=0x0000
OP_TributeTimer=0x0000
OP_SendTributes=0x0000
@ -95,16 +95,16 @@ OP_ClearBlockedBuffs=0x0000
OP_WorldObjectsSent=0x2879
OP_SendExpZonein=0x02b4
OP_SendAATable=0x0000
OP_ClearAA=0x0000
OP_ClearLeadershipAbilities=0x0000
OP_ClearAA=0x3498
OP_ClearLeadershipAbilities=0x0000 #removed; leadership abilities are baked in and always on
OP_RespondAA=0x0000
OP_UpdateAA=0x0000
OP_SendAAStats=0x0000
OP_AAExpUpdate=0x0000 #0x642f
OP_ExpUpdate=0x611d
OP_HPUpdate=0x0000 #0x775c
OP_ManaChange=0x0000 #0x0606
OP_TGB=0x0000
OP_HPUpdate=0x775c
OP_ManaChange=0x0606
OP_TGB=0x0000 #removed; tgb is baked in and always on
OP_SpecialMesg=0x7d93
OP_GuildMemberList=0x0000
OP_GuildMOTD=0x0000
@ -180,10 +180,10 @@ OP_MemorizeSpell=0x0000
OP_LinkedReuse=0x0000
OP_SwapSpell=0x0000
OP_CastSpell=0x0000
OP_Consider=0x0000
OP_Consider=0x53e3
OP_FormattedMessage=0x7f7f
OP_SimpleMessage=0x1943
OP_Buff=0x0000
OP_Buff=0x0000 #0x6ce5
OP_Illusion=0x0000
OP_MoneyOnCorpse=0x0000
OP_RandomReply=0x0000
@ -210,7 +210,7 @@ OP_FaceChange=0x0000
OP_SetFace=0x0000
OP_SenseHeading=0x0000
OP_Action=0x0000
OP_ConsiderCorpse=0x0000
OP_ConsiderCorpse=0x6092
OP_HideCorpse=0x0000
OP_CorpseDrag=0x0000
OP_CorpseDrop=0x0000
@ -247,7 +247,7 @@ OP_XTargetRequest=0x0000
OP_XTargetAutoAddHaters=0x0000
OP_XTargetOpen=0x0000
OP_XTargetOpenResponse=0x0000
OP_BuffCreate=0x0000
OP_BuffCreate=0x0000 #0x27a1
OP_BuffRemoveRequest=0x0000
OP_DeleteSpawn=0x7712
OP_AutoAttack=0x0000

View File

@ -118,7 +118,6 @@ void MapOpcodes()
ConnectingOpcodes[OP_ZoneEntry] = &Client::Handle_Connect_OP_ZoneEntry;
// connected opcode handler assignments:
ConnectedOpcodes[OP_0x0193] = &Client::Handle_0x0193;
ConnectedOpcodes[OP_AAAction] = &Client::Handle_OP_AAAction;
ConnectedOpcodes[OP_AcceptNewTask] = &Client::Handle_OP_AcceptNewTask;
ConnectedOpcodes[OP_AdventureInfoRequest] = &Client::Handle_OP_AdventureInfoRequest;
@ -1203,10 +1202,6 @@ void Client::Handle_Connect_OP_WorldObjectsSent(const EQApplicationPacket *app)
void Client::Handle_Connect_OP_ZoneComplete(const EQApplicationPacket *app)
{
auto outapp = new EQApplicationPacket(OP_0x0347, 0);
QueuePacket(outapp);
safe_delete(outapp);
return;
}
void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
@ -1834,16 +1829,6 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
return;
}
// connected opcode handlers
void Client::Handle_0x0193(const EQApplicationPacket *app)
{
// Not sure what this opcode does. It started being sent when OP_ClientUpdate was
// changed to pump OP_ClientUpdate back out instead of OP_MobUpdate
// 2 bytes: 00 00
return;
}
void Client::Handle_OP_AAAction(const EQApplicationPacket *app)
{
LogAA("Received OP_AAAction");

View File

@ -21,8 +21,6 @@
void Handle_Connect_OP_ZoneComplete(const EQApplicationPacket *app);
void Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app);
/* Connected opcode handlers*/
void Handle_0x0193(const EQApplicationPacket *app);
void Handle_0x01e7(const EQApplicationPacket *app);
void Handle_OP_AAAction(const EQApplicationPacket *app);
void Handle_OP_AcceptNewTask(const EQApplicationPacket *app);
void Handle_OP_AdventureInfoRequest(const EQApplicationPacket *app);

View File

@ -674,8 +674,6 @@ luabind::scope lua_register_packet_opcodes() {
luabind::value("ShopEndConfirm", static_cast<int>(OP_ShopEndConfirm)),
luabind::value("AdventureMerchantRequest", static_cast<int>(OP_AdventureMerchantRequest)),
luabind::value("Sound", static_cast<int>(OP_Sound)),
luabind::value("0x0193", static_cast<int>(OP_0x0193)),
luabind::value("0x0347", static_cast<int>(OP_0x0347)),
luabind::value("WorldComplete", static_cast<int>(OP_WorldComplete)),
luabind::value("MobRename", static_cast<int>(OP_MobRename)),
luabind::value("TaskDescription", static_cast<int>(OP_TaskDescription)),