mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[7293] Not attempt respawn/instance tables for battleground/arena templates (instance id == 0)
This commit is contained in:
parent
9b2a772413
commit
41f85080dd
2 changed files with 11 additions and 7 deletions
|
|
@ -105,12 +105,16 @@ BattleGround::~BattleGround()
|
||||||
DelObject(i);
|
DelObject(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete creature and go respawn times
|
if(GetInstanceID()) // not spam by useless queries in case BG templates
|
||||||
WorldDatabase.PExecute("DELETE FROM creature_respawn WHERE instance = '%u'",GetInstanceID());
|
{
|
||||||
WorldDatabase.PExecute("DELETE FROM gameobject_respawn WHERE instance = '%u'",GetInstanceID());
|
// delete creature and go respawn times
|
||||||
// delete instance from db
|
WorldDatabase.PExecute("DELETE FROM creature_respawn WHERE instance = '%u'",GetInstanceID());
|
||||||
CharacterDatabase.PExecute("DELETE FROM instance WHERE id = '%u'",GetInstanceID());
|
WorldDatabase.PExecute("DELETE FROM gameobject_respawn WHERE instance = '%u'",GetInstanceID());
|
||||||
// remove from battlegrounds
|
// delete instance from db
|
||||||
|
CharacterDatabase.PExecute("DELETE FROM instance WHERE id = '%u'",GetInstanceID());
|
||||||
|
// remove from battlegrounds
|
||||||
|
}
|
||||||
|
|
||||||
sBattleGroundMgr.RemoveBattleGround(GetInstanceID());
|
sBattleGroundMgr.RemoveBattleGround(GetInstanceID());
|
||||||
// unload map
|
// unload map
|
||||||
if(Map * map = MapManager::Instance().FindMap(GetMapId(), GetInstanceID()))
|
if(Map * map = MapManager::Instance().FindMap(GetMapId(), GetInstanceID()))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7292"
|
#define REVISION_NR "7293"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue