[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
+5 -4
View File
@@ -3,6 +3,7 @@
#include "Common.h"
#include "Log.h"
#include "Config/ConfigEnv.h"
#include "AuctionHouseObject.h"
#define AHB_GREY 0
#define AHB_WHITE 1
#define AHB_GREEN 2
@@ -27,7 +28,7 @@
class AHBConfig
{
private:
uint32 AHID;
AuctionLocation AHID;
uint32 minItems;
uint32 maxItems;
uint32 minTime;
@@ -78,14 +79,14 @@ class AHBConfig
uint32 bip;
uint32 pip;
public:
AHBConfig(uint32 ahid)
AHBConfig(AuctionLocation ahid)
{
AHID = ahid;
}
AHBConfig()
{
}
uint32 GetAHID()
AuctionLocation GetAHID()
{
return AHID;
}
@@ -683,5 +684,5 @@ class AHBConfig
void AuctionHouseBot();
void AuctionHouseBotInit();
void AuctionHouseBotLoadValues(AHBConfig*);
void AuctionHouseBotCommands(uint32, uint32, uint32, char*);
void AuctionHouseBotCommands(uint32, AuctionLocation, uint32, char*);
#endif