[7250] Use bg type ids enum insted raw values and catch some bugs in result for fixing.

* Replace max bg type checks by DBC valid index check
    * Use in functions and fields BattlegroundTypeId type instead uint32
    * Fixed wrong use bg queue ids instead bg type ids in queue update/remove function calls.
      Many bg have same raw values for type id and queue id but some can be affected by this bug:
      BATTLEGROUND_EY, BATTLEGROUND_SA, and all areans (with small arena/team size exceptions)
    * Move Battlemaster to bg type ids map fron ObjectMgr to BatteleGroundMgr.
    * Remobe redundent for header itself includes for BG headers.
    * Use Auction location enum instead raw valus.
Author: VladimirMangos

--HG--
branch : trunk
This commit is contained in:
megamage
2009-02-09 22:08:06 -06:00
parent 99c8226216
commit d696381f32
33 changed files with 337 additions and 279 deletions
+1 -12
View File
@@ -179,18 +179,7 @@ class ArenaTeam
return NULL;
}
bool IsFighting() const
{
for (MemberList::const_iterator itr = members.begin(); itr != members.end(); ++itr)
{
if (Player *p = objmgr.GetPlayer(itr->guid))
{
if (p->GetMap()->IsBattleArena())
return true;
}
}
return false;
}
bool IsFighting() const;
bool LoadArenaTeamFromDB(uint32 ArenaTeamId);
void LoadMembersFromDB(uint32 ArenaTeamId);