mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[8563] fixed buffobject despawning in wsg
cause those objects are spawned through db old buff-handling code only threw errors
This commit is contained in:
parent
5ddd66712f
commit
bf8e801ab0
2 changed files with 11 additions and 2 deletions
|
|
@ -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--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue