Core/GameObject: Store unit in GameObject::SetLootState - required for trap activation.
This commit is contained in:
@@ -2015,6 +2015,7 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player*
|
||||
void GameObject::SetLootState(LootState state, Unit* unit)
|
||||
{
|
||||
m_lootState = state;
|
||||
m_lootStateUnit = unit;
|
||||
AI()->OnStateChanged(state, unit);
|
||||
sScriptMgr->OnGameObjectLootStateChanged(this, state, unit);
|
||||
if (m_model)
|
||||
|
||||
@@ -841,6 +841,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
|
||||
time_t m_respawnTime; // (secs) time of next respawn (or despawn if GO have owner()),
|
||||
uint32 m_respawnDelayTime; // (secs) if 0 then current GO state no dependent from timer
|
||||
LootState m_lootState;
|
||||
Unit* m_lootStateUnit;
|
||||
bool m_spawnedByDefault;
|
||||
time_t m_cooldownTime; // used as internal reaction delay time store (not state change reaction).
|
||||
// For traps this: spell casting cooldown, for doors/buttons: reset time.
|
||||
|
||||
Reference in New Issue
Block a user