Some build errors fixed

72 errors and 7 warnings remaining at this point
This commit is contained in:
Charles A Edwards 2016-01-30 11:56:38 +00:00 committed by Antz
parent 923d3f5788
commit 85cd456287
4 changed files with 17 additions and 4 deletions

View file

@ -1933,6 +1933,7 @@ class Player : public Unit
static Team TeamForRace(uint8 race);
Team GetTeam() const { return m_team; }
PvpTeamIndex GetTeamId() const { return m_team == ALLIANCE ? TEAM_INDEX_ALLIANCE : TEAM_INDEX_HORDE; }
static uint32 getFactionForRace(uint8 race);
void setFactionForRace(uint8 race);

View file

@ -40,11 +40,11 @@ static void DefineOpcode(uint16 opcode, const char* name, SessionStatus status,
#define OPCODE( name, status, packetProcessing, handler ) DefineOpcode( name, #name, status, packetProcessing, handler )
/// Correspondence between opcodes and their names
OpcodeHandler opcodeTable[MAX_OPCODE_TABLE_SIZE];
OpcodeHandler opcodeTable[NUM_MSG_TYPES];
void InitializeOpcodes()
{
for(uint16 i = 0; i < MAX_OPCODE_TABLE_SIZE; ++i)
for (uint16 i = 0; i < NUM_MSG_TYPES; ++i)
DefineOpcode(i, "UNKNOWN", STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL);
OPCODE(MSG_WOW_CONNECTION, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_EarlyProccess );

View file

@ -1441,7 +1441,10 @@ enum Opcodes
SMSG_START_TIMER = 0x59A5, // 4.3.4 15595
};
#define MAX_OPCODE_TABLE_SIZE 0xFFFF
// Don't forget to change this value and add opcode name to Opcodes.cpp when you add new opcode!
#define NUM_MSG_TYPES 0xFFFF
#define NUM_MSG_TYPES 0xFFFF
extern void InitializeOpcodes();
@ -1473,7 +1476,7 @@ struct OpcodeHandler
void (WorldSession::*handler)(WorldPacket& recvPacket);
};
extern OpcodeHandler opcodeTable[MAX_OPCODE_TABLE_SIZE];
extern OpcodeHandler opcodeTable[NUM_MSG_TYPES];
/// Lookup opcode name for human understandable logging
inline const char* LookupOpcodeName(uint16 id)

View file

@ -740,6 +740,15 @@ enum Team
ALLIANCE = 469,
};
enum PvpTeamIndex
{
TEAM_INDEX_ALLIANCE = 0,
TEAM_INDEX_HORDE = 1,
TEAM_INDEX_NEUTRAL = 2,
};
#define PVP_TEAM_COUNT 2
enum SpellEffects
{
SPELL_EFFECT_NONE = 0,