Core/Maps: Moved corpse management to map level

This commit is contained in:
Shauren
2015-09-28 17:20:27 +02:00
parent 3bc3b67a8f
commit cd27fd38b9
35 changed files with 338 additions and 438 deletions

View File

@@ -217,7 +217,7 @@ public:
{
playerName = param3;
if (normalizePlayerName(playerName))
player = sObjectAccessor->FindPlayerByName(playerName);
player = ObjectAccessor::FindPlayerByName(playerName);
}
if (!player)
@@ -283,7 +283,7 @@ public:
{
playerName = param2;
if (normalizePlayerName(playerName))
player = sObjectAccessor->FindPlayerByName(playerName);
player = ObjectAccessor::FindPlayerByName(playerName);
}
if (!player)

View File

@@ -620,8 +620,10 @@ public:
target->SaveToDB();
}
else
// will resurrected at login without corpse
sObjectAccessor->ConvertCorpseForPlayer(targetGuid);
{
SQLTransaction trans(nullptr);
Player::OfflineResurrect(targetGuid, trans);
}
return true;
}
@@ -842,7 +844,7 @@ public:
// Save all players in the world
static bool HandleSaveAllCommand(ChatHandler* handler, char const* /*args*/)
{
sObjectAccessor->SaveAllPlayers();
ObjectAccessor::SaveAllPlayers();
handler->SendSysMessage(LANG_PLAYERS_SAVED);
return true;
}

View File

@@ -1117,7 +1117,6 @@ public:
{
TC_LOG_INFO("misc", "Reloading terrain_phase_info table...");
sObjectMgr->LoadTerrainPhaseInfo();
sWorld->UpdatePhaseDefinitions();
handler->SendGlobalGMSysMessage("Terrain phase infos reloaded.");
return true;
}

View File

@@ -100,7 +100,7 @@ public:
// Triggering corpses expire check in world
static bool HandleServerCorpsesCommand(ChatHandler* /*handler*/, char const* /*args*/)
{
sObjectAccessor->RemoveOldCorpses();
sWorld->RemoveOldCorpses();
return true;
}

View File

@@ -527,7 +527,7 @@ public:
case PHASE_PLANT_FIRST_DETONATE: // first explosives detonate finish
for (GuidList::iterator itr = _explosivesGuids.begin(); itr != _explosivesGuids.end(); ++itr)
{
if (GameObject* explosive = sObjectAccessor->GetGameObject(*me, *itr))
if (GameObject* explosive = ObjectAccessor::GetGameObject(*me, *itr))
me->RemoveGameObject(explosive, true);
}
_explosivesGuids.clear();
@@ -624,7 +624,7 @@ public:
case PHASE_PLANT_SECOND_DETONATE: // second explosives detonate finish
for (GuidList::iterator itr = _explosivesGuids.begin(); itr != _explosivesGuids.end(); ++itr)
{
if (GameObject* explosive = sObjectAccessor->GetGameObject(*me, *itr))
if (GameObject* explosive = ObjectAccessor::GetGameObject(*me, *itr))
me->RemoveGameObject(explosive, true);
}
_explosivesGuids.clear();