diff options
| author | megamage <none@none> | 2009-02-17 17:40:38 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-02-17 17:40:38 -0600 |
| commit | 484c1298e231aa95c03dfe26ba9be53b2b2ad7f3 (patch) | |
| tree | 0258606344fc2fa474b254d15bc593082fe94af3 /src | |
| parent | a24928be67da1cffd433c6bd40564ebfd55b1d9d (diff) | |
[7293] Not attempt respawn/instance tables for battleground/arena templates (instance id == 0) Author: VladimirMangos
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/BattleGround.cpp | 16 | ||||
| -rw-r--r-- | src/shared/revision_nr.h | 2 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index 3aa4aa27f04..bdb78552102 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -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())) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 3eb4d8c1f70..f918ca2e368 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7292" + #define REVISION_NR "7293" #endif // __REVISION_NR_H__ |
