Eluna fix opcode definitions

This commit is contained in:
Rochet2
2014-06-02 15:49:42 +03:00
committed by Foereaper
parent 9a1f8c7884
commit 40774d0c5c
4 changed files with 7 additions and 8 deletions

View File

@@ -831,7 +831,7 @@ namespace LuaGlobalFunctions
if (opcode >= NUM_MSG_TYPES)
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;
}

View File

@@ -173,7 +173,7 @@ void Eluna::OnPacketSendAny(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, player);
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)
{
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, player);
ENTRY_EXECUTE(2);

View File

@@ -121,10 +121,6 @@ enum SelectAggroTarget
#ifdef TBC
#define SPELL_AURA_MOD_KILL_XP_PCT SPELL_AURA_MOD_XP_PCT
#endif
#ifdef CLASSIC
#undef Opcodes
#define Opcodes OpcodesList
#endif
#else
#define eWorld (sWorld)
#define eMapMgr (sMapMgr)
@@ -148,6 +144,9 @@ typedef ThreatContainer::StorageType ThreatList;
#define NUM_MSG_TYPES NUM_OPCODE_HANDLERS
#endif
#endif
#ifndef CLASSIC
typedef OpcodesList Opcodes
#endif
class Eluna;

View File

@@ -29,7 +29,7 @@ namespace LuaPacket
uint32 opcode = Eluna::CHECKVAL<uint32>(L, 2);
if (opcode >= NUM_MSG_TYPES)
return luaL_argerror(L, 2, "valid opcode expected");
packet->SetOpcode((Opcodes)opcode);
packet->SetOpcode((OpcodesList)opcode);
return 0;
}