aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGround.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-27 18:36:10 -0500
committermegamage <none@none>2009-04-27 18:36:10 -0500
commit5ac67c27f71a7b53fbce92ffdab3adb62b6baf0c (patch)
tree3ca1dc67f90b8522f64b894c5000ac8facc3cf9c /src/game/BattleGround.cpp
parentf9c40474410c5d54e408f5074b2dee1ff329c0d5 (diff)
[7715] Provided way for scripts set alternative gameobject state for client show. Author: VladimirMangos
Also use enum for gsmeobject states. --HG-- branch : trunk
Diffstat (limited to 'src/game/BattleGround.cpp')
-rw-r--r--src/game/BattleGround.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index 51d03d0304f..620e5383ba5 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -1331,7 +1331,7 @@ bool BattleGround::AddObject(uint32 type, uint32 entry, float x, float y, float
// so we must create it specific for this instance
GameObject * go = new GameObject;
if(!go->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT),entry, map,
- PHASEMASK_NORMAL, x,y,z,o,rotation0,rotation1,rotation2,rotation3,100,1))
+ PHASEMASK_NORMAL, x,y,z,o,rotation0,rotation1,rotation2,rotation3,100,GO_STATE_READY))
{
sLog.outErrorDb("Gameobject template %u not found in database! BattleGround not created!", entry);
sLog.outError("Cannot create gameobject template %u! BattleGround not created!", entry);
@@ -1374,7 +1374,7 @@ void BattleGround::DoorClose(uint32 type)
if (obj)
{
//if doors are open, close it
- if (obj->getLootState() == GO_ACTIVATED && !obj->GetGoState())
+ if (obj->getLootState() == GO_ACTIVATED && obj->GetGoState() != GO_STATE_READY)
{
//change state to allow door to be closed
obj->SetLootState(GO_READY);