-Exp update almost works, but inital at zonein is broken

-MoveItem has opcode now but is not translating correctly.
This commit is contained in:
KimLS 2024-12-02 23:36:13 -08:00
parent af8f85cfd9
commit 32a1d7c43e
4 changed files with 14 additions and 10 deletions

View File

@ -2671,6 +2671,17 @@ namespace Laurion
FINISH_ENCODE();
}
ENCODE(OP_ExpUpdate)
{
SETUP_DIRECT_ENCODE(ExpUpdate_Struct, structs::ExpUpdate_Struct);
//later we should change the underlying server to use this more accurate value
//and encode the 330 in the other patches
eq->exp = emu->exp * 100000 / 330;
FINISH_ENCODE();
}
// DECODE methods
DECODE(OP_EnterWorld)

View File

@ -31,6 +31,7 @@ E(OP_Damage)
E(OP_Animation)
E(OP_Death)
E(OP_MoveItem)
E(OP_ExpUpdate)
//list of packets we need to decode on the way in:
D(OP_EnterWorld)
D(OP_ZoneEntry)

View File

@ -253,7 +253,7 @@ OP_DeleteSpawn=0x7712
OP_AutoAttack=0x3f03
OP_AutoAttack2=0x1c31
OP_Consume=0x0000
OP_MoveItem=0x0000
OP_MoveItem=0x11e3
OP_MoveMultipleItems=0x0000
OP_DeleteItem=0x0000
OP_DeleteCharge=0x0000

View File

@ -542,15 +542,7 @@ void Client::SendZoneInPackets()
if (tmpxp1 != tmpxp2 && tmpxp1 != 0xFFFFFFFF && tmpxp2 != 0xFFFFFFFF) {
float tmpxp = (float)((float)m_pp.exp - tmpxp2) / ((float)tmpxp1 - tmpxp2);
//Laurion uses a more granular exp bar than other clients
if (m_ClientVersion >= EQ::versions::ClientVersion::Laurion) {
eu->exp = (uint32)(100000.0f * tmpxp);
}
else {
eu->exp = (uint32)(330.0f * tmpxp);
}
eu->exp = (uint32)(330.0f * tmpxp);
FastQueuePacket(&outapp);
}
else {