feat(LuaEngine/Packet): Add support ReadPackedGUID (#271)

This commit is contained in:
mostlynick3
2025-08-19 15:47:24 +02:00
committed by GitHub
parent bcfe631307
commit 15558954a3
2 changed files with 14 additions and 0 deletions

View File

@@ -1191,6 +1191,7 @@ ElunaRegister<WorldPacket> PacketMethods[] =
{ "ReadLong", &LuaPacket::ReadLong },
{ "ReadULong", &LuaPacket::ReadULong },
{ "ReadGUID", &LuaPacket::ReadGUID },
{ "ReadPackedGUID", &LuaPacket::ReadPackedGUID },
{ "ReadString", &LuaPacket::ReadString },
{ "ReadFloat", &LuaPacket::ReadFloat },
{ "ReadDouble", &LuaPacket::ReadDouble },

View File

@@ -173,6 +173,19 @@ namespace LuaPacket
return 1;
}
/**
* Reads and returns an unsigned 64-bit integer value from the [WorldPacket].
*
* @return uint64 value : value returned as string
*/
int ReadPackedGUID(lua_State* L, WorldPacket* packet)
{
uint64 guid;
packet->readPackGUID(guid);
Eluna::Push(L, guid);
return 1;
}
/**
* Reads and returns a string value from the [WorldPacket].
*