feat(Core/SmartScripts): ACTION_GO_SET_GO_STATE
This commit is contained in:
parent
9faec8ef1b
commit
8fd757a152
3 changed files with 22 additions and 1 deletions
|
|
@ -2485,6 +2485,26 @@ 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 (auto const& target : *targets)
|
||||
{
|
||||
if (IsGameObject(target))
|
||||
{
|
||||
target->ToGameObject()->SetGoState((GOState)e.action.goState.state);
|
||||
}
|
||||
}
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue