mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +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())
|
if (!obj || obj->GetGoType() != GAMEOBJECT_TYPE_TRAP || !obj->isSpawned())
|
||||||
return;
|
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;
|
int32 index = m_BgObjects.size() - 1;
|
||||||
while (index >= 0 && m_BgObjects[index] != go_guid)
|
while (index >= 0 && m_BgObjects[index] != go_guid)
|
||||||
index--;
|
index--;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8562"
|
#define REVISION_NR "8563"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue