mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
feat(Core/SmartScripts): ACTION_GO_SET_GO_STATE
This commit is contained in:
committed by
GitHub
parent
9faec8ef1b
commit
8fd757a152
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1232,6 +1232,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_ACTION_JUMP_TO_POS:
|
||||
case SMART_ACTION_SEND_GOSSIP_MENU:
|
||||
case SMART_ACTION_GO_SET_LOOT_STATE:
|
||||
case SMART_ACTION_GO_SET_GO_STATE:
|
||||
case SMART_ACTION_SEND_TARGET_TO_TARGET:
|
||||
case SMART_ACTION_SET_HOME_POS:
|
||||
case SMART_ACTION_SET_HEALTH_REGEN:
|
||||
|
||||
@@ -588,7 +588,7 @@ enum SMART_ACTION
|
||||
SMART_ACTION_RANDOM_SOUND = 115, // SoundId1, SoundId2, SoundId3, SoundId4, onlySelf
|
||||
SMART_ACTION_SET_CORPSE_DELAY = 116, // timer
|
||||
SMART_ACTION_DISABLE_EVADE = 117, // 0/1 (1 = disabled, 0 = enabled)
|
||||
SMART_ACTION_GO_SET_GO_STATE = 118, // TODO: NOT SUPPORTED YET
|
||||
SMART_ACTION_GO_SET_GO_STATE = 118, // state
|
||||
SMART_ACTION_SET_CAN_FLY = 119, // TODO: NOT SUPPORTED YET
|
||||
SMART_ACTION_REMOVE_AURAS_BY_TYPE = 120, // TODO: NOT SUPPORTED YET
|
||||
SMART_ACTION_SET_SIGHT_DIST = 121, // sightDistance
|
||||
|
||||
Reference in New Issue
Block a user