mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Eluna fix opcode definitions
This commit is contained in:
@@ -831,7 +831,7 @@ namespace LuaGlobalFunctions
|
|||||||
if (opcode >= NUM_MSG_TYPES)
|
if (opcode >= NUM_MSG_TYPES)
|
||||||
return luaL_argerror(L, 1, "valid opcode expected");
|
return luaL_argerror(L, 1, "valid opcode expected");
|
||||||
|
|
||||||
Eluna::Push(L, new WorldPacket((Opcodes)opcode, size));
|
Eluna::Push(L, new WorldPacket((OpcodesList)opcode, size));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ void Eluna::OnPacketSendAny(Player* player, WorldPacket& packet, bool& result)
|
|||||||
}
|
}
|
||||||
void Eluna::OnPacketSendOne(Player* player, WorldPacket& packet, bool& result)
|
void Eluna::OnPacketSendOne(Player* player, WorldPacket& packet, bool& result)
|
||||||
{
|
{
|
||||||
ENTRY_BEGIN(PacketEventBindings, Opcodes(packet.GetOpcode()), SERVER_EVENT_ON_PACKET_SEND, return);
|
ENTRY_BEGIN(PacketEventBindings, OpcodesList(packet.GetOpcode()), SERVER_EVENT_ON_PACKET_SEND, return);
|
||||||
Push(L, new WorldPacket(packet));
|
Push(L, new WorldPacket(packet));
|
||||||
Push(L, player);
|
Push(L, player);
|
||||||
ENTRY_EXECUTE(2);
|
ENTRY_EXECUTE(2);
|
||||||
@@ -224,7 +224,7 @@ void Eluna::OnPacketReceiveAny(Player* player, WorldPacket& packet, bool& result
|
|||||||
}
|
}
|
||||||
void Eluna::OnPacketReceiveOne(Player* player, WorldPacket& packet, bool& result)
|
void Eluna::OnPacketReceiveOne(Player* player, WorldPacket& packet, bool& result)
|
||||||
{
|
{
|
||||||
ENTRY_BEGIN(PacketEventBindings, Opcodes(packet.GetOpcode()), SERVER_EVENT_ON_PACKET_RECEIVE, return);
|
ENTRY_BEGIN(PacketEventBindings, OpcodesList(packet.GetOpcode()), SERVER_EVENT_ON_PACKET_RECEIVE, return);
|
||||||
Push(L, new WorldPacket(packet));
|
Push(L, new WorldPacket(packet));
|
||||||
Push(L, player);
|
Push(L, player);
|
||||||
ENTRY_EXECUTE(2);
|
ENTRY_EXECUTE(2);
|
||||||
|
|||||||
@@ -121,10 +121,6 @@ enum SelectAggroTarget
|
|||||||
#ifdef TBC
|
#ifdef TBC
|
||||||
#define SPELL_AURA_MOD_KILL_XP_PCT SPELL_AURA_MOD_XP_PCT
|
#define SPELL_AURA_MOD_KILL_XP_PCT SPELL_AURA_MOD_XP_PCT
|
||||||
#endif
|
#endif
|
||||||
#ifdef CLASSIC
|
|
||||||
#undef Opcodes
|
|
||||||
#define Opcodes OpcodesList
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
#define eWorld (sWorld)
|
#define eWorld (sWorld)
|
||||||
#define eMapMgr (sMapMgr)
|
#define eMapMgr (sMapMgr)
|
||||||
@@ -148,6 +144,9 @@ typedef ThreatContainer::StorageType ThreatList;
|
|||||||
#define NUM_MSG_TYPES NUM_OPCODE_HANDLERS
|
#define NUM_MSG_TYPES NUM_OPCODE_HANDLERS
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef CLASSIC
|
||||||
|
typedef OpcodesList Opcodes
|
||||||
|
#endif
|
||||||
|
|
||||||
class Eluna;
|
class Eluna;
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace LuaPacket
|
|||||||
uint32 opcode = Eluna::CHECKVAL<uint32>(L, 2);
|
uint32 opcode = Eluna::CHECKVAL<uint32>(L, 2);
|
||||||
if (opcode >= NUM_MSG_TYPES)
|
if (opcode >= NUM_MSG_TYPES)
|
||||||
return luaL_argerror(L, 2, "valid opcode expected");
|
return luaL_argerror(L, 2, "valid opcode expected");
|
||||||
packet->SetOpcode((Opcodes)opcode);
|
packet->SetOpcode((OpcodesList)opcode);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user