Work in progress on some packets; consider and HP update look right but I'm still testing.

This commit is contained in:
KimLS 2024-11-26 22:52:45 -08:00
parent e74d4b6e67
commit f9918d47d7
4 changed files with 81 additions and 2 deletions

View File

@ -2572,6 +2572,30 @@ namespace Laurion
delete in;
}
ENCODE(OP_Consider)
{
ENCODE_LENGTH_EXACT(Consider_Struct);
SETUP_DIRECT_ENCODE(Consider_Struct, structs::Consider_Struct);
OUT(playerid);
OUT(targetid);
OUT(faction);
OUT(level);
FINISH_ENCODE();
}
ENCODE(OP_HPUpdate)
{
SETUP_DIRECT_ENCODE(SpawnHPUpdate_Struct, structs::SpawnHPUpdate_Struct);
OUT(spawn_id);
OUT(cur_hp);
OUT(max_hp);
FINISH_ENCODE();
}
// DECODE methods
DECODE(OP_EnterWorld)
@ -2706,6 +2730,24 @@ namespace Laurion
FINISH_DIRECT_DECODE();
}
DECODE(OP_Consider)
{
DECODE_LENGTH_EXACT(structs::Consider_Struct);
SETUP_DIRECT_DECODE(Consider_Struct, structs::Consider_Struct);
IN(playerid);
IN(targetid);
IN(faction);
IN(level);
//emu->cur_hp = 1;
//emu->max_hp = 2;
//emu->pvpcon = 0;
FINISH_DIRECT_DECODE();
}
DECODE(OP_ConsiderCorpse) { DECODE_FORWARD(OP_Consider); }
//Naive version but should work well enough for now
int ExtractIDFile(const std::string& input) {
std::string number;

View File

@ -25,6 +25,8 @@ E(OP_ChannelMessage)
E(OP_SpecialMesg)
E(OP_DeleteSpawn)
E(OP_FormattedMessage)
E(OP_Consider)
E(OP_HPUpdate)
//list of packets we need to decode on the way in:
D(OP_EnterWorld)
D(OP_ZoneEntry)
@ -33,6 +35,8 @@ D(OP_ClientUpdate)
D(OP_WearChange)
D(OP_ChannelMessage)
D(OP_SetServerFilter)
D(OP_Consider)
D(OP_ConsiderCorpse)
#undef E
#undef D

View File

@ -438,6 +438,36 @@ namespace Laurion {
/*008*/
};
struct Consider_Struct {
/*000*/ uint32 playerid; // PlayerID
/*004*/ uint32 targetid; // TargetID
/*008*/ uint32 faction; // Faction
/*012*/ uint32 level; // Level
/*016*/ uint32 report_mode; // 0 normally, 4 will do a more detailed report that only works if you have GM flag set
/*020*/ uint8 rare_creature; // Will do the rare creature string
/*021*/ uint8 loot_locked; // Will list the target as (loot locked)
/*022*/ uint8 unknown022; // Padding probably
/*023*/ uint8 unknown023; // Padding probably
/*024*/
};
struct ChangeSize_Struct
{
/*00*/ uint32 EntityID;
/*04*/ float Size;
/*08*/ uint32 Unknown08; // Observed 0
/*12*/ float Unknown12; // Observed 1.0f
/*16*/
};
struct SpawnHPUpdate_Struct
{
/*00*/ int16 spawn_id;
/*02*/ int64 cur_hp;
/*10*/ int64 max_hp;
/*18*/
};
#pragma pack()
}; //end namespace structs

View File

@ -1209,8 +1209,11 @@ bool Client::Process() {
}
if(connect.Check()){
if (!(m_ClientVersionBit & EQ::versions::maskLaurionAndLater)) {
SendGuildList();// Send OPCode: OP_GuildsList
SendApproveWorld();
}
connect.Disable();
}