From bf8e801ab05525838b13cedeceb6cb874b42395c Mon Sep 17 00:00:00 2001 From: balrok Date: Tue, 29 Sep 2009 16:38:05 +0200 Subject: [PATCH] [8563] fixed buffobject despawning in wsg cause those objects are spawned through db old buff-handling code only threw errors --- src/game/BattleGround.cpp | 11 ++++++++++- src/shared/revision_nr.h | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index 0667c5cea..f993c3b88 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -1564,7 +1564,16 @@ void BattleGround::HandleTriggerBuff(uint64 const& go_guid) if (!obj || obj->GetGoType() != GAMEOBJECT_TYPE_TRAP || !obj->isSpawned()) return; - //change buff type, when buff is used: + // static buffs are already handled just by database and don't need + // battleground code + if (!m_BuffChange) + { + obj->SetLootState(GO_JUST_DEACTIVATED); // can be despawned or destroyed + return; + } + + // change buff type, when buff is used: + // TODO this can be done when poolsystem works for instances int32 index = m_BgObjects.size() - 1; while (index >= 0 && m_BgObjects[index] != go_guid) index--; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 37feffd55..2300a49dd 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 "8562" + #define REVISION_NR "8563" #endif // __REVISION_NR_H__