mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-13 19:53:02 -04:00
Core/SmartScript: update ACTION_GO_SET_GO_STATE
GO_STATE_ACTIVE = 0, // show in world as used and not reset (closed door open) GO_STATE_READY = 1, // show in world as ready (closed door close) GO_STATE_ACTIVE_ALTERNATIVE = 2 // show in world as used in alt way and not reset (closed door open by cannon fire) Credits to Sunwell
This commit is contained in:
@@ -2054,6 +2054,20 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (IsGameObject(*itr))
|
||||
(*itr)->ToGameObject()->SetLootState((LootState)e.action.setGoLootState.state);
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_GO_SET_GO_STATE:
|
||||
{
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
|
||||
if (!targets)
|
||||
break;
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
if (IsGameObject(*itr))
|
||||
(*itr)->ToGameObject()->SetGoState((GOState)e.action.goState.state);
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user