Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: src/arcemu-world/BattlegroundHandler.cpp
- ===================================================================
- --- src/arcemu-world/BattlegroundHandler.cpp (revision 3371)
- +++ src/arcemu-world/BattlegroundHandler.cpp (working copy)
- @@ -82,25 +82,15 @@
- * uint32 t = BattleGroundType
- **********************************************************************************/
- uint32 t = BATTLEGROUND_WARSONG_GULCH;
- - if (mapid == 0)
- - {
- - if(pCreature->GetCreatureInfo())
- - {
- - if(strstr(pCreature->GetCreatureInfo()->SubName, "Arena") != NULL)
- + if(mapid == 0){
- + if( strstr(pCreature->GetCreatureInfo()->SubName, "Arena") != NULL){
- t = BATTLEGROUND_ARENA_2V2;
- - else if(strstr(pCreature->GetCreatureInfo()->SubName, "Arathi") != NULL)
- - t = BATTLEGROUND_ARATHI_BASIN;
- - else if(strstr(pCreature->GetCreatureInfo()->SubName, "Eye of the Storm") != NULL)
- - t = BATTLEGROUND_EYE_OF_THE_STORM;
- - else if(strstr(pCreature->GetCreatureInfo()->SubName, "Warsong") != NULL)
- - t = BATTLEGROUND_WARSONG_GULCH;
- - else if(strstr(pCreature->GetCreatureInfo()->SubName, "Alterac") != NULL)
- - t = BATTLEGROUND_ALTERAC_VALLEY;
- - else if(strstr(pCreature->GetCreatureInfo()->SubName, "Strand") != NULL)
- - t = BATTLEGROUND_STRAND_OF_THE_ANCIENT;
- + }else{
- + BGMaster *battlemaster = BGMasterStorage.LookupEntry( pCreature->GetProto()->Id );
- + if( battlemaster != NULL )
- + t = battlemaster->bg;
- }
- - }
- - else
- + }else
- t = mapid;
- BattlegroundManager.HandleBattlegroundListPacket(this, t);
- Index: src/arcemu-world/BattlegroundMgr.h
- ===================================================================
- --- src/arcemu-world/BattlegroundMgr.h (revision 3371)
- +++ src/arcemu-world/BattlegroundMgr.h (working copy)
- @@ -78,6 +78,21 @@
- BGSTATUS_TIME = 3, // Ex. Wintergrasp time remaining
- };
- +
- +//////////////////////////////////////////////////////////////////////////////
- +//struct BGMaster;
- +// Contains creature -> battleground id association pairs
- +//
- +//fields:
- +// uint32 entry - creature entry of the battlemaster
- +// uint32 bg - ID of the battleground the creature is a battlemaster of
- +//
- +//////////////////////////////////////////////////////////////////////////////
- +struct BGMaster{
- + uint32 entry;
- + uint32 bg;
- +};
- +
- struct BGScore
- {
- uint32 KillingBlows;
- Index: src/arcemu-world/ObjectStorage.cpp
- ===================================================================
- --- src/arcemu-world/ObjectStorage.cpp (revision 3371)
- +++ src/arcemu-world/ObjectStorage.cpp (working copy)
- @@ -42,6 +42,7 @@
- const char * gUnitModelSizeFormat = "ufu";
- const char * gWorldStringTableFormat = "us"; // p2wow added [for worldserver common message storage]
- const char * gWorldBroadCastFormat = "usu";// announce message
- +const char * gBattleMasterFormat = "uu";
- /** SQLStorage symbols
- */
- @@ -63,7 +64,9 @@
- SERVER_DECL SQLStorage<UnitModelSizeEntry, HashMapStorageContainer<UnitModelSizeEntry> > UnitModelSizeStorage;
- SERVER_DECL SQLStorage<WorldStringTable, HashMapStorageContainer<WorldStringTable> > WorldStringTableStorage;
- SERVER_DECL SQLStorage<WorldBroadCast, HashMapStorageContainer<WorldBroadCast> > WorldBroadCastStorage;
- +SERVER_DECL SQLStorage<BGMaster, HashMapStorageContainer<BGMaster> > BGMasterStorage;
- +
- SERVER_DECL set<string> ExtraMapCreatureTables;
- SERVER_DECL set<string> ExtraMapGameObjectTables;
- @@ -511,6 +514,7 @@
- make_task(UnitModelSizeStorage, UnitModelSizeEntry, HashMapStorageContainer, "unit_display_sizes", gUnitModelSizeFormat);
- make_task(WorldStringTableStorage, WorldStringTable, HashMapStorageContainer, "worldstring_tables", gWorldStringTableFormat);
- make_task(WorldBroadCastStorage, WorldBroadCast, HashMapStorageContainer, "worldbroadcast", gWorldBroadCastFormat);
- + make_task(BGMasterStorage, BGMaster, HashMapStorageContainer, "battlemasters", gBattleMasterFormat);
- }
- @@ -554,6 +558,7 @@
- UnitModelSizeStorage.Cleanup();
- WorldStringTableStorage.Cleanup();
- WorldBroadCastStorage.Cleanup();
- + BGMasterStorage.Cleanup();
- }
- vector<pair<string,string> > additionalTables;
- Index: src/arcemu-world/ObjectStorage.h
- ===================================================================
- --- src/arcemu-world/ObjectStorage.h (revision 3371)
- +++ src/arcemu-world/ObjectStorage.h (working copy)
- @@ -39,6 +39,7 @@
- extern SERVER_DECL SQLStorage<UnitModelSizeEntry, HashMapStorageContainer<UnitModelSizeEntry> > UnitModelSizeStorage;
- extern SERVER_DECL SQLStorage<WorldStringTable, HashMapStorageContainer<WorldStringTable> > WorldStringTableStorage;
- extern SERVER_DECL SQLStorage<WorldBroadCast, HashMapStorageContainer<WorldBroadCast> > WorldBroadCastStorage;
- +extern SERVER_DECL SQLStorage<BGMaster, HashMapStorageContainer<BGMaster> > BGMasterStorage;
- void Storage_FillTaskList(TaskList & tl);
- void Storage_Cleanup();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement