Core/Phases: some commenting, more cleanup and compile fix

(cherry picked from commit 8b536fdf9d38a3e0c94dc9c1184ea8582495064f)
This commit is contained in:
Rat authored and DDuarte committed 2014-10-27 23:08:02 +00:00
1 parent 07a515f960
commit 8b1e546ce9
5 files changed
+12 -11

No files matched your search

+5 -2
View File
@@ -2738,8 +2738,11 @@ void WorldObject::SetInPhase(uint32 id, bool update, bool apply)
_phases.erase(id);
// Remove the terrain swaps that were applied by this phase
// Iterator pointing to the start of the sequence of elements that we're going to delete
std::set<uint32>::iterator endRange = std::set_difference(_terrainSwaps.begin(), _terrainSwaps.end(), terrainSwaps.begin(), terrainSwaps.end(), _terrainSwaps.begin());
terrainSwaps.erase(endRange, _terrainSwaps.end());
// other phases could use the same terrain swaps too, check for them before remove!!!
//std::set<uint32>::iterator endRange = std::set_difference(_terrainSwaps.begin(), _terrainSwaps.end(), terrainSwaps.begin(), terrainSwaps.end(), _terrainSwaps.begin());
//terrainSwaps.erase(endRange, _terrainSwaps.end());
}
if (update && IsInWorld())
+1
View File
@@ -599,6 +599,7 @@ class WorldObject : public Object, public WorldLocation
bool IsInPhase(uint32 phase) const { return _phases.find(phase) != _phases.end(); }
bool IsInPhase(WorldObject const* obj) const;
std::set<uint32> const& GetPhases() const { return _phases; }
std::set<uint32> const& GetTerrainSwaps() const { return _terrainSwaps; }
uint32 GetZoneId() const;
uint32 GetAreaId() const;
+1 -1
View File
@@ -27990,7 +27990,7 @@ void Player::SendUpdatePhasing()
return;
std::set<uint32> worldAreaSwaps; // @ToDo
GetSession()->SendSetPhaseShift(GetPhases(), _terrainSwaps, worldAreaSwaps);
GetSession()->SendSetPhaseShift(GetPhases(), GetTerrainSwaps(), worldAreaSwaps);
}
void Player::SendSupercededSpell(uint32 oldSpell, uint32 newSpell)
+2 -5
View File
@@ -1474,9 +1474,6 @@ void World::SetInitialWorldSettings()
TC_LOG_INFO("server.loading", "Loading Spell Group Stack Rules...");
sSpellMgr->LoadSpellGroupStackRules();
TC_LOG_INFO("server.loading", "Loading Spell Phase Dbc Info...");
sObjectMgr->LoadPhaseInfo();
TC_LOG_INFO("server.loading", "Loading NPC Texts...");
sObjectMgr->LoadGossipText();
@@ -1729,8 +1726,8 @@ void World::SetInitialWorldSettings()
TC_LOG_INFO("server.loading", "Loading World States..."); // must be loaded before battleground, outdoor PvP and conditions
LoadWorldStates();
TC_LOG_INFO("server.loading", "Loading Phase definitions...");
sObjectMgr->LoadPhaseDefinitions();
TC_LOG_INFO("server.loading", "Loading Terrain Phase definitions...");
sObjectMgr->LoadTerrainPhaseInfo();
TC_LOG_INFO("server.loading", "Loading Conditions...");
sConditionMgr->LoadConditions();
+3 -3
View File
@@ -1129,10 +1129,10 @@ public:
static bool HandleReloadPhaseDefinitionsCommand(ChatHandler* handler, const char* /*args*/)
{
TC_LOG_INFO("misc", "Reloading phase_definitions table...");
sObjectMgr->LoadPhaseDefinitions();
TC_LOG_INFO("misc", "Reloading terrain_phase_info table...");
sObjectMgr->LoadTerrainPhaseInfo();
sWorld->UpdatePhaseDefinitions();
handler->SendGlobalGMSysMessage("Phase Definitions reloaded.");
handler->SendGlobalGMSysMessage("Terrain phase infos reloaded.");
return true;
}