diff --git a/src/game/Bag.cpp b/src/game/Bag.cpp index e0df5ea6de0..e77530f96f2 100644 --- a/src/game/Bag.cpp +++ b/src/game/Bag.cpp @@ -25,7 +25,7 @@ Bag::Bag( ): Item() { - m_objectType |= TYPEMASK_CONTAINER; + m_objectType |= (TYPEMASK_ITEM | TYPEMASK_CONTAINER); m_objectTypeId = TYPEID_CONTAINER; m_valuesCount = CONTAINER_END; diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index 4b18e5659d3..009081ea659 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -32,7 +32,7 @@ #include "BattleGroundDS.h" #include "BattleGroundRV.h" #include "BattleGroundIC.h" -#include "BattleGroundABG.h" +#include "BattleGroundRB.h" #include "MapManager.h" #include "Map.h" #include "MapInstanced.h" @@ -1528,7 +1528,7 @@ BattleGround * BattleGroundMgr::CreateNewBattleGround(BattleGroundTypeId bgTypeI bg = new BattleGroundIC(*(BattleGroundIC*)bg_template); break; case BATTLEGROUND_RB: - bg = new BattleGroundABG(*(BattleGroundABG*)bg_template); + bg = new BattleGroundRB(*(BattleGroundRB*)bg_template); break; default: //error, but it is handled few lines above @@ -1571,7 +1571,7 @@ uint32 BattleGroundMgr::CreateBattleGround(BattleGroundTypeId bgTypeId, bool IsA case BATTLEGROUND_DS: bg = new BattleGroundDS; break; case BATTLEGROUND_RV: bg = new BattleGroundRV; break; case BATTLEGROUND_IC: bg = new BattleGroundIC; break; - case BATTLEGROUND_RB: bg = new BattleGroundABG; break; + case BATTLEGROUND_RB: bg = new BattleGroundRB; break; default:bg = new BattleGround; break; // placeholder for non implemented BG } @@ -1643,19 +1643,26 @@ void BattleGroundMgr::CreateInitialBattleGrounds() MaxPlayersPerTeam = fields[2].GetUInt32(); MinLvl = fields[3].GetUInt32(); MaxLvl = fields[4].GetUInt32(); + //check values from DB - if (MaxPlayersPerTeam == 0 || MinPlayersPerTeam == 0 || MinPlayersPerTeam > MaxPlayersPerTeam) + if (MaxPlayersPerTeam == 0 || MinPlayersPerTeam == 0) { - MinPlayersPerTeam = 0; // by default now expected strong full bg requirement - MaxPlayersPerTeam = 40; + sLog.outErrorDb("Table `battleground_template` for id %u have wrong min/max players per team settings. BG not created.", bgTypeID); + continue; } - if (MinLvl == 0 || MaxLvl == 0 || MinLvl > MaxLvl) + + if (MinPlayersPerTeam > MaxPlayersPerTeam) + MinPlayersPerTeam = MaxPlayersPerTeam; + + if (MinLvl == 0 || MaxLvl == 0) { - // TODO: fix me - MinLvl = 0;//bl->minlvl; - MaxLvl = 80;//bl->maxlvl; + sLog.outErrorDb("Table `battleground_template` for id %u have wrong min/max level settings. BG not created.", bgTypeID); + continue; } + if (MinLvl > MaxLvl) + MinLvl = MaxLvl; + start1 = fields[5].GetUInt32(); start = sWorldSafeLocsStore.LookupEntry(start1); diff --git a/src/game/BattleGroundABG.cpp b/src/game/BattleGroundRB.cpp similarity index 78% rename from src/game/BattleGroundABG.cpp rename to src/game/BattleGroundRB.cpp index 4cb80edc81f..a596631fe58 100644 --- a/src/game/BattleGroundABG.cpp +++ b/src/game/BattleGroundRB.cpp @@ -18,10 +18,10 @@ #include "Player.h" #include "BattleGround.h" -#include "BattleGroundABG.h" +#include "BattleGroundRB.h" #include "Language.h" -BattleGroundABG::BattleGroundABG() +BattleGroundRB::BattleGroundRB() { //TODO FIX ME! m_StartMessageIds[BG_STARTING_EVENT_FIRST] = 0; @@ -30,25 +30,25 @@ BattleGroundABG::BattleGroundABG() m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_WS_HAS_BEGUN; } -BattleGroundABG::~BattleGroundABG() +BattleGroundRB::~BattleGroundRB() { } -void BattleGroundABG::Update(uint32 diff) +void BattleGroundRB::Update(uint32 diff) { BattleGround::Update(diff); } -void BattleGroundABG::StartingEventCloseDoors() +void BattleGroundRB::StartingEventCloseDoors() { } -void BattleGroundABG::StartingEventOpenDoors() +void BattleGroundRB::StartingEventOpenDoors() { } -void BattleGroundABG::AddPlayer(Player *plr) +void BattleGroundRB::AddPlayer(Player *plr) { BattleGround::AddPlayer(plr); //create score and add it to map, default values are set in constructor @@ -57,19 +57,19 @@ void BattleGroundABG::AddPlayer(Player *plr) m_PlayerScores[plr->GetGUID()] = sc; } -void BattleGroundABG::RemovePlayer(Player* /*plr*/,uint64 /*guid*/) +void BattleGroundRB::RemovePlayer(Player* /*plr*/,uint64 /*guid*/) { } -void BattleGroundABG::HandleAreaTrigger(Player * /*Source*/, uint32 /*Trigger*/) +void BattleGroundRB::HandleAreaTrigger(Player * /*Source*/, uint32 /*Trigger*/) { // this is wrong way to implement these things. On official it done by gameobject spell cast. if (GetStatus() != STATUS_IN_PROGRESS) return; } -void BattleGroundABG::UpdatePlayerScore(Player* Source, uint32 type, uint32 value) +void BattleGroundRB::UpdatePlayerScore(Player* Source, uint32 type, uint32 value) { std::map::iterator itr = m_PlayerScores.find(Source->GetGUID()); diff --git a/src/game/BattleGroundABG.h b/src/game/BattleGroundRB.h similarity index 94% rename from src/game/BattleGroundABG.h rename to src/game/BattleGroundRB.h index c8321dfe88f..b99ff9c8ec3 100644 --- a/src/game/BattleGroundABG.h +++ b/src/game/BattleGroundRB.h @@ -28,13 +28,13 @@ class BattleGroundABGScore : public BattleGroundScore virtual ~BattleGroundABGScore() {}; }; -class BattleGroundABG : public BattleGround +class BattleGroundRB : public BattleGround { friend class BattleGroundMgr; public: - BattleGroundABG(); - ~BattleGroundABG(); + BattleGroundRB(); + ~BattleGroundRB(); void Update(uint32 diff); /* inherited from BattlegroundClass */ diff --git a/src/game/ItemPrototype.h b/src/game/ItemPrototype.h index 380c0f25fbc..97300d91494 100644 --- a/src/game/ItemPrototype.h +++ b/src/game/ItemPrototype.h @@ -107,19 +107,20 @@ enum ITEM_FLAGS ITEM_FLAGS_BINDED = 0x00000001, // set in game at binding, not set in template ITEM_FLAGS_CONJURED = 0x00000002, ITEM_FLAGS_OPENABLE = 0x00000004, - ITEM_FLAGS_WRAPPED = 0x00000008, + ITEM_FLAGS_WRAPPED = 0x00000008, // conflicts with heroic flag ITEM_FLAGS_HEROIC = 0x00000008, // weird... ITEM_FLAGS_BROKEN = 0x00000010, // appears red icon (like when item durability==0) - ITEM_FLAGS_TOTEM = 0x00000020, // ? + ITEM_FLAGS_UNK2 = 0x00000020, // saw this on item 43012, 43013, 46377, 52021... ITEM_FLAGS_USABLE = 0x00000040, // ? ITEM_FLAGS_NO_EQUIP_COOLDOWN = 0x00000080, // ? + ITEM_FLAGS_UNK3 = 0x00000100, // saw this on item 47115, 49295... ITEM_FLAGS_WRAPPER = 0x00000200, // used or not used wrapper ITEM_FLAGS_IGNORE_BAG_SPACE = 0x00000400, // ignore bag space at new item creation? ITEM_FLAGS_PARTY_LOOT = 0x00000800, // determines if item is party loot or not ITEM_FLAGS_REFUNDABLE = 0x00001000, // item cost can be refunded within 2 hours after purchase ITEM_FLAGS_CHARTER = 0x00002000, // arena/guild charter - ITEM_FLAGS_REFUNDABLE_2 = 0x00008000, // ? - ITEM_FLAGS_UNK1 = 0x00010000, + ITEM_FLAGS_UNK4 = 0x00008000, // a lot of items have this + ITEM_FLAGS_UNK1 = 0x00010000, // a lot of items have this ITEM_FLAGS_PROSPECTABLE = 0x00040000, ITEM_FLAGS_UNIQUE_EQUIPPED = 0x00080000, ITEM_FLAGS_USEABLE_IN_ARENA = 0x00200000, diff --git a/src/game/Mail.cpp b/src/game/Mail.cpp index 24f554010d5..66dc5fa3180 100644 --- a/src/game/Mail.cpp +++ b/src/game/Mail.cpp @@ -716,7 +716,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data ) bodyItem->SetText(m->body); bodyItem->SetUInt32Value(ITEM_FIELD_CREATOR, m->sender); - bodyItem->SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPER | ITEM_FLAGS_REFUNDABLE_2 | ITEM_FLAGS_UNK1); + bodyItem->SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPER | ITEM_FLAGS_UNK4 | ITEM_FLAGS_UNK1); sLog.outDetail("HandleMailCreateTextItem mailid=%u", mailId); diff --git a/src/game/Makefile.am b/src/game/Makefile.am index abce5db3ba0..e1a85d939ba 100644 --- a/src/game/Makefile.am +++ b/src/game/Makefile.am @@ -45,7 +45,7 @@ libmangosgame_a_SOURCES = \ BattleGround.cpp \ BattleGroundAA.cpp \ BattleGroundAB.cpp \ - BattleGroundABG.cpp \ + BattleGroundRB.cpp \ BattleGroundAV.cpp \ BattleGroundBE.cpp \ BattleGroundDS.cpp \ @@ -59,7 +59,7 @@ libmangosgame_a_SOURCES = \ BattleGround.h \ BattleGroundAA.h \ BattleGroundAB.h \ - BattleGroundABG.h \ + BattleGroundRB.h \ BattleGroundAV.h \ BattleGroundBE.h \ BattleGroundDS.h \ diff --git a/src/game/ObjectGuid.h b/src/game/ObjectGuid.h index a3bbc130dc3..b9838b4ddaf 100644 --- a/src/game/ObjectGuid.h +++ b/src/game/ObjectGuid.h @@ -40,7 +40,7 @@ enum TypeMask { TYPEMASK_OBJECT = 0x0001, TYPEMASK_ITEM = 0x0002, - TYPEMASK_CONTAINER = 0x0006, // TYPEMASK_ITEM | 0x0004 + TYPEMASK_CONTAINER = 0x0004, TYPEMASK_UNIT = 0x0008, // players also have it TYPEMASK_PLAYER = 0x0010, TYPEMASK_GAMEOBJECT = 0x0020, @@ -55,16 +55,16 @@ enum TypeMask enum HighGuid { - HIGHGUID_ITEM = 0x4000, // blizz 4000 - HIGHGUID_CONTAINER = 0x4000, // blizz 4000 - HIGHGUID_PLAYER = 0x0000, // blizz 0000 - HIGHGUID_GAMEOBJECT = 0xF110, // blizz F110 - HIGHGUID_TRANSPORT = 0xF120, // blizz F120 (for GAMEOBJECT_TYPE_TRANSPORT) - HIGHGUID_UNIT = 0xF130, // blizz F130 - HIGHGUID_PET = 0xF140, // blizz F140 - HIGHGUID_VEHICLE = 0xF150, // blizz F550 - HIGHGUID_DYNAMICOBJECT = 0xF100, // blizz F100 - HIGHGUID_CORPSE = 0xF101, // blizz F100 + HIGHGUID_ITEM = 0x4700, // blizz 4700 + HIGHGUID_CONTAINER = 0x4700, // blizz 4700 + HIGHGUID_PLAYER = 0x0700, // blizz 0700 + HIGHGUID_GAMEOBJECT = 0xF110, // blizz F110/F510 + HIGHGUID_TRANSPORT = 0xF120, // blizz F120/F520 (for GAMEOBJECT_TYPE_TRANSPORT) + HIGHGUID_UNIT = 0xF130, // blizz F130/F530 + HIGHGUID_PET = 0xF140, // blizz F140/F540 + HIGHGUID_VEHICLE = 0xF150, // blizz F150/F550 + HIGHGUID_DYNAMICOBJECT = 0xF100, // blizz F100/F500 + HIGHGUID_CORPSE = 0xF500, // blizz F100/F500 used second variant to resolve conflict with HIGHGUID_DYNAMICOBJECT HIGHGUID_MO_TRANSPORT = 0x1FC0, // blizz 1FC0 (for GAMEOBJECT_TYPE_MO_TRANSPORT) }; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 79004806a27..e154c5ce006 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9720" + #define REVISION_NR "9721" #endif // __REVISION_NR_H__ diff --git a/win/VC100/game.vcxproj b/win/VC100/game.vcxproj index 437b97b8cc3..1b4bbe14820 100644 --- a/win/VC100/game.vcxproj +++ b/win/VC100/game.vcxproj @@ -355,7 +355,7 @@ - + @@ -502,7 +502,7 @@ - + diff --git a/win/VC80/game.vcproj b/win/VC80/game.vcproj index e7f36ea12e0..0493d90dd7c 100644 --- a/win/VC80/game.vcproj +++ b/win/VC80/game.vcproj @@ -566,11 +566,11 @@ > - - - - @@ -634,6 +626,14 @@ RelativePath="..\..\src\game\BattleGroundNA.h" > + + + +