Core/Battlegrounds: BG instances are not saved to the database and thus need no deletion.

This commit is contained in:
leak
2011-03-10 14:14:12 +01:00
parent 4569e4852a
commit 5b481d36bf

View File

@@ -214,16 +214,6 @@ Battleground::~Battleground()
for (int i = 0; i < size; ++i)
DelObject(i);
if (GetInstanceID()) // not spam by useless queries in case BG templates
{
// delete creature and go respawn times
CharacterDatabase.PExecute("DELETE FROM creature_respawn WHERE instance = '%u'",GetInstanceID());
CharacterDatabase.PExecute("DELETE FROM gameobject_respawn WHERE instance = '%u'",GetInstanceID());
// delete instance from db
CharacterDatabase.PExecute("DELETE FROM instance WHERE id = '%u'",GetInstanceID());
// remove from battlegrounds
}
sBattlegroundMgr->RemoveBattleground(GetInstanceID(), GetTypeID());
// unload map
if (m_Map)