mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
[7293] Not attempt respawn/instance tables for battleground/arena templates (instance id == 0) Author: VladimirMangos
--HG-- branch : trunk
This commit is contained in:
@@ -109,12 +109,16 @@ BattleGround::~BattleGround()
|
||||
DelObject(i);
|
||||
}
|
||||
|
||||
// delete creature and go respawn times
|
||||
WorldDatabase.PExecute("DELETE FROM creature_respawn WHERE instance = '%u'",GetInstanceID());
|
||||
WorldDatabase.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
|
||||
if(GetInstanceID()) // not spam by useless queries in case BG templates
|
||||
{
|
||||
// delete creature and go respawn times
|
||||
WorldDatabase.PExecute("DELETE FROM creature_respawn WHERE instance = '%u'",GetInstanceID());
|
||||
WorldDatabase.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());
|
||||
// unload map
|
||||
if(Map * map = MapManager::Instance().FindMap(GetMapId(), GetInstanceID()))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7292"
|
||||
#define REVISION_NR "7293"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
||||
Reference in New Issue
Block a user