[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.
This commit is contained in:
VladimirMangos 2009-02-08 09:28:41 +03:00
parent e355084376
commit 5a4358dda9
29 changed files with 319 additions and 262 deletions

View file

@ -1286,7 +1286,7 @@ void World::SetInitialWorldSettings()
objmgr.LoadGameObjectForQuests();
sLog.outString( "Loading BattleMasters..." );
objmgr.LoadBattleMastersEntry();
sBattleGroundMgr.LoadBattleMastersEntry();
sLog.outString( "Loading GameTeleports..." );
objmgr.LoadGameTele();
@ -1477,13 +1477,13 @@ void World::Update(uint32 diff)
switch (i)
{
case 0:
AuctionMap = objmgr.GetAuctionsMap( 6 );//horde
AuctionMap = objmgr.GetAuctionsMap(AUCTION_HORDE);
break;
case 1:
AuctionMap = objmgr.GetAuctionsMap( 2 );//alliance
AuctionMap = objmgr.GetAuctionsMap(AUCTION_ALLIANCE);
break;
case 2:
AuctionMap = objmgr.GetAuctionsMap( 7 );//neutral
AuctionMap = objmgr.GetAuctionsMap(AUCTION_NEUTRAL);
break;
}