diff options
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 92 | ||||
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 79 | ||||
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.h | 39 |
3 files changed, 23 insertions, 187 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index c642701c1ae..7eae8e1d039 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -739,32 +739,6 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u } break; } - case SMART_ACTION_SET_UNIT_FLAG: - { - for (WorldObject* target : targets) - { - if (IsUnit(target)) - { - target->ToUnit()->SetFlag(UNIT_FIELD_FLAGS, e.action.unitFlag.flag); - TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_SET_UNIT_FLAG. Unit %s added flag %u to UNIT_FIELD_FLAGS", - target->GetGUID().ToString().c_str(), e.action.unitFlag.flag); - } - } - break; - } - case SMART_ACTION_REMOVE_UNIT_FLAG: - { - for (WorldObject* target : targets) - { - if (IsUnit(target)) - { - target->ToUnit()->RemoveFlag(UNIT_FIELD_FLAGS, e.action.unitFlag.flag); - TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_REMOVE_UNIT_FLAG. Unit %s removed flag %u to UNIT_FIELD_FLAGS", - target->GetGUID().ToString().c_str(), e.action.unitFlag.flag); - } - } - break; - } case SMART_ACTION_AUTO_ATTACK: { if (!IsSmart()) @@ -1875,20 +1849,6 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u target->ToGameObject()->SendCustomAnim(e.action.sendGoCustomAnim.anim); break; } - case SMART_ACTION_ADD_DYNAMIC_FLAG: - { - for (WorldObject* target : targets) - if (IsUnit(target)) - target->ToUnit()->SetFlag(UNIT_DYNAMIC_FLAGS, e.action.flag.flag); - break; - } - case SMART_ACTION_REMOVE_DYNAMIC_FLAG: - { - for (WorldObject* target : targets) - if (IsUnit(target)) - target->ToUnit()->RemoveFlag(UNIT_DYNAMIC_FLAGS, e.action.flag.flag); - break; - } case SMART_ACTION_JUMP_TO_POS: { for (WorldObject* target : targets) @@ -2892,16 +2852,6 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax); break; } - case SMART_EVENT_TARGET_HEALTH_PCT: - { - if (!me || !me->IsEngaged() || !me->GetVictim() || !me->EnsureVictim()->GetMaxHealth()) - return; - uint32 perc = (uint32)me->EnsureVictim()->GetHealthPct(); - if (perc > e.event.minMaxRepeat.max || perc < e.event.minMaxRepeat.min) - return; - ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax, me->GetVictim()); - break; - } case SMART_EVENT_MANA_PCT: { if (!me || !me->IsEngaged() || !me->GetMaxPower(POWER_MANA)) @@ -2912,16 +2862,6 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax); break; } - case SMART_EVENT_TARGET_MANA_PCT: - { - if (!me || !me->IsEngaged() || !me->GetVictim() || !me->EnsureVictim()->GetMaxPower(POWER_MANA)) - return; - uint32 perc = uint32(100.0f * me->EnsureVictim()->GetPower(POWER_MANA) / me->EnsureVictim()->GetMaxPower(POWER_MANA)); - if (perc > e.event.minMaxRepeat.max || perc < e.event.minMaxRepeat.min) - return; - ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax, me->GetVictim()); - break; - } case SMART_EVENT_RANGE: { if (!me || !me->IsEngaged() || !me->GetVictim()) @@ -2951,22 +2891,6 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui ProcessTimedAction(e, e.event.targetCasting.repeatMin, e.event.targetCasting.repeatMax, me->GetVictim()); break; } - case SMART_EVENT_FRIENDLY_HEALTH: - { - if (!me || !me->IsEngaged()) - return; - - Unit* target = DoSelectLowestHpFriendly((float)e.event.friendlyHealth.radius, e.event.friendlyHealth.hpDeficit); - if (!target || !target->IsInCombat()) - { - // if there are at least two same npcs, they will perform the same action immediately even if this is useless... - RecalcTimer(e, 1000, 3000); - return; - } - - ProcessTimedAction(e, e.event.friendlyHealth.repeatMin, e.event.friendlyHealth.repeatMax, target); - break; - } case SMART_EVENT_FRIENDLY_IS_CC: { if (!me || !me->IsEngaged()) @@ -3064,18 +2988,6 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui ProcessAction(e, unit, var0, var1, bvar, spell, gob); break; - case SMART_EVENT_IS_BEHIND_TARGET: - { - if (!me) - return; - - if (Unit* victim = me->GetVictim()) - { - if (!victim->HasInArc(static_cast<float>(M_PI), me)) - ProcessTimedAction(e, e.event.behindTarget.cooldownMin, e.event.behindTarget.cooldownMax, victim); - } - break; - } case SMART_EVENT_RECEIVE_EMOTE: if (e.event.emote.emote == var0) { @@ -3519,17 +3431,13 @@ void SmartScript::UpdateTimer(SmartScriptHolder& e, uint32 const diff) case SMART_EVENT_UPDATE_OOC: case SMART_EVENT_UPDATE_IC: case SMART_EVENT_HEALTH_PCT: - case SMART_EVENT_TARGET_HEALTH_PCT: case SMART_EVENT_MANA_PCT: - case SMART_EVENT_TARGET_MANA_PCT: case SMART_EVENT_RANGE: case SMART_EVENT_VICTIM_CASTING: - case SMART_EVENT_FRIENDLY_HEALTH: case SMART_EVENT_FRIENDLY_IS_CC: case SMART_EVENT_FRIENDLY_MISSING_BUFF: case SMART_EVENT_HAS_AURA: case SMART_EVENT_TARGET_BUFFED: - case SMART_EVENT_IS_BEHIND_TARGET: case SMART_EVENT_FRIENDLY_HEALTH_PCT: case SMART_EVENT_DISTANCE_CREATURE: case SMART_EVENT_DISTANCE_GAMEOBJECT: diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index b57f2867569..aaccebbdf21 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -311,11 +311,8 @@ void SmartAIMgr::LoadSmartAIFromDB() case SMART_EVENT_UPDATE_OOC: case SMART_EVENT_UPDATE_IC: case SMART_EVENT_HEALTH_PCT: - case SMART_EVENT_TARGET_HEALTH_PCT: case SMART_EVENT_MANA_PCT: - case SMART_EVENT_TARGET_MANA_PCT: case SMART_EVENT_RANGE: - case SMART_EVENT_FRIENDLY_HEALTH: case SMART_EVENT_FRIENDLY_HEALTH_PCT: case SMART_EVENT_FRIENDLY_MISSING_BUFF: case SMART_EVENT_HAS_AURA: @@ -328,7 +325,6 @@ void SmartAIMgr::LoadSmartAIFromDB() } break; case SMART_EVENT_VICTIM_CASTING: - case SMART_EVENT_IS_BEHIND_TARGET: if (temp.event.minMaxRepeat.min == 0 && temp.event.minMaxRepeat.max == 0 && !(temp.event.event_flags & SMART_EVENT_FLAG_NOT_REPEATABLE) && temp.source_type != SMART_SCRIPT_TYPE_TIMED_ACTIONLIST) { temp.event.event_flags |= SMART_EVENT_FLAG_NOT_REPEATABLE; @@ -460,17 +456,13 @@ SmartScriptHolder& SmartAIMgr::FindLinkedEvent(SmartAIEventList& list, uint32 li case SMART_EVENT_IC_LOS: case SMART_EVENT_OOC_LOS: case SMART_EVENT_DISTANCE_CREATURE: - case SMART_EVENT_FRIENDLY_HEALTH: case SMART_EVENT_FRIENDLY_HEALTH_PCT: case SMART_EVENT_FRIENDLY_IS_CC: case SMART_EVENT_FRIENDLY_MISSING_BUFF: case SMART_EVENT_ACTION_DONE: - case SMART_EVENT_TARGET_HEALTH_PCT: - case SMART_EVENT_TARGET_MANA_PCT: case SMART_EVENT_RANGE: case SMART_EVENT_VICTIM_CASTING: case SMART_EVENT_TARGET_BUFFED: - case SMART_EVENT_IS_BEHIND_TARGET: case SMART_EVENT_INSTANCE_PLAYER_ENTER: case SMART_EVENT_TRANSPORT_ADDCREATURE: case SMART_EVENT_DATA_SET: @@ -713,13 +705,10 @@ bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e) case SMART_EVENT_RANGE: return sizeof(SmartEvent::minMaxRepeat); case SMART_EVENT_OOC_LOS: return sizeof(SmartEvent::los); case SMART_EVENT_RESPAWN: return sizeof(SmartEvent::respawn); - case SMART_EVENT_TARGET_HEALTH_PCT: return sizeof(SmartEvent::minMaxRepeat); case SMART_EVENT_VICTIM_CASTING: return sizeof(SmartEvent::targetCasting); - case SMART_EVENT_FRIENDLY_HEALTH: return sizeof(SmartEvent::friendlyHealth); case SMART_EVENT_FRIENDLY_IS_CC: return sizeof(SmartEvent::friendlyCC); case SMART_EVENT_FRIENDLY_MISSING_BUFF: return sizeof(SmartEvent::missingBuff); case SMART_EVENT_SUMMONED_UNIT: return sizeof(SmartEvent::summoned); - case SMART_EVENT_TARGET_MANA_PCT: return sizeof(SmartEvent::minMaxRepeat); case SMART_EVENT_ACCEPTED_QUEST: return sizeof(SmartEvent::quest); case SMART_EVENT_REWARD_QUEST: return sizeof(SmartEvent::quest); case SMART_EVENT_REACHED_HOME: return NO_PARAMS; @@ -768,7 +757,6 @@ bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e) case SMART_EVENT_GOSSIP_HELLO: return sizeof(SmartEvent::gossipHello); case SMART_EVENT_FOLLOW_COMPLETED: return NO_PARAMS; case SMART_EVENT_EVENT_PHASE_CHANGE: return sizeof(SmartEvent::eventPhaseChange); - case SMART_EVENT_IS_BEHIND_TARGET: return sizeof(SmartEvent::behindTarget); case SMART_EVENT_GAME_EVENT_START: return sizeof(SmartEvent::gameEvent); case SMART_EVENT_GAME_EVENT_END: return sizeof(SmartEvent::gameEvent); case SMART_EVENT_GO_LOOT_STATE_CHANGED: return sizeof(SmartEvent::goLootStateChanged); @@ -832,8 +820,6 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e) case SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS: return sizeof(SmartAction::quest); //case SMART_ACTION_RESERVED_16: return sizeof(SmartAction::raw); case SMART_ACTION_SET_EMOTE_STATE: return sizeof(SmartAction::emote); - case SMART_ACTION_SET_UNIT_FLAG: return sizeof(SmartAction::unitFlag); - case SMART_ACTION_REMOVE_UNIT_FLAG: return sizeof(SmartAction::unitFlag); case SMART_ACTION_AUTO_ATTACK: return sizeof(SmartAction::autoAttack); case SMART_ACTION_ALLOW_COMBAT_MOVEMENT: return sizeof(SmartAction::combatMove); case SMART_ACTION_SET_EVENT_PHASE: return sizeof(SmartAction::setEventPhase); @@ -907,8 +893,6 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e) case SMART_ACTION_REMOVE_UNIT_FIELD_BYTES_1: return sizeof(SmartAction::delunitByte); case SMART_ACTION_INTERRUPT_SPELL: return sizeof(SmartAction::interruptSpellCasting); case SMART_ACTION_SEND_GO_CUSTOM_ANIM: return sizeof(SmartAction::sendGoCustomAnim); - case SMART_ACTION_ADD_DYNAMIC_FLAG: return sizeof(SmartAction::flag); - case SMART_ACTION_REMOVE_DYNAMIC_FLAG: return sizeof(SmartAction::flag); case SMART_ACTION_JUMP_TO_POS: return sizeof(SmartAction::jump); case SMART_ACTION_SEND_GOSSIP_MENU: return sizeof(SmartAction::sendGossipMenu); case SMART_ACTION_GO_SET_LOOT_STATE: return sizeof(SmartAction::setGoLootState); @@ -1100,8 +1084,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_EVENT_UPDATE_OOC: case SMART_EVENT_HEALTH_PCT: case SMART_EVENT_MANA_PCT: - case SMART_EVENT_TARGET_HEALTH_PCT: - case SMART_EVENT_TARGET_MANA_PCT: case SMART_EVENT_RANGE: case SMART_EVENT_DAMAGED: case SMART_EVENT_DAMAGED_TARGET: @@ -1156,13 +1138,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) return false; } break; - case SMART_EVENT_FRIENDLY_HEALTH: - if (!NotNULL(e, e.event.friendlyHealth.radius)) - return false; - - if (!IsMinMaxValid(e, e.event.friendlyHealth.repeatMin, e.event.friendlyHealth.repeatMax)) - return false; - break; case SMART_EVENT_FRIENDLY_IS_CC: if (!IsMinMaxValid(e, e.event.friendlyCC.repeatMin, e.event.friendlyCC.repeatMax)) return false; @@ -1291,12 +1266,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) } break; } - case SMART_EVENT_IS_BEHIND_TARGET: - { - if (!IsMinMaxValid(e, e.event.behindTarget.cooldownMin, e.event.behindTarget.cooldownMax)) - return false; - break; - } case SMART_EVENT_GAME_EVENT_START: case SMART_EVENT_GAME_EVENT_END: { @@ -1453,23 +1422,16 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_EVENT_FOLLOW_COMPLETED: case SMART_EVENT_ON_SPELLCLICK: break; - default: - TC_LOG_ERROR("sql.sql", "SmartAIMgr: Not handled event_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); - return false; - } - - // Additional check for deprecated - switch (e.GetEventType()) - { - // Deprecated - case SMART_EVENT_FRIENDLY_HEALTH: + // Unused case SMART_EVENT_TARGET_HEALTH_PCT: - case SMART_EVENT_IS_BEHIND_TARGET: + case SMART_EVENT_FRIENDLY_HEALTH: case SMART_EVENT_TARGET_MANA_PCT: - TC_LOG_WARN("sql.sql.deprecation", "SmartAIMgr: Deprecated event_type(%u), Entry %d SourceType %u Event %u Action %u, it might be removed in the future, loaded for now.", e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); - break; + case SMART_EVENT_IS_BEHIND_TARGET: + TC_LOG_ERROR("sql.sql", "SmartAIMgr: Unused event_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id); + return false; default: - break; + TC_LOG_ERROR("sql.sql", "SmartAIMgr: Not handled event_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); + return false; } } @@ -2167,8 +2129,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_ACTION_WP_PAUSE: case SMART_ACTION_FORCE_DESPAWN: case SMART_ACTION_SET_INGAME_PHASE_MASK: - case SMART_ACTION_SET_UNIT_FLAG: - case SMART_ACTION_REMOVE_UNIT_FLAG: case SMART_ACTION_PLAYMOVIE: case SMART_ACTION_CLOSE_GOSSIP: case SMART_ACTION_TRIGGER_TIMED_EVENT: @@ -2185,8 +2145,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_ACTION_SET_UNIT_FIELD_BYTES_1: case SMART_ACTION_REMOVE_UNIT_FIELD_BYTES_1: case SMART_ACTION_SEND_GO_CUSTOM_ANIM: - case SMART_ACTION_ADD_DYNAMIC_FLAG: - case SMART_ACTION_REMOVE_DYNAMIC_FLAG: case SMART_ACTION_JUMP_TO_POS: case SMART_ACTION_SEND_GOSSIP_MENU: case SMART_ACTION_GO_SET_LOOT_STATE: @@ -2208,31 +2166,20 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_ACTION_DESPAWN_SPAWNGROUP: case SMART_ACTION_PLAY_CINEMATIC: break; - // No longer supported + // Unused + case SMART_ACTION_SET_UNIT_FLAG: + case SMART_ACTION_REMOVE_UNIT_FLAG: case SMART_ACTION_INSTALL_AI_TEMPLATE: case SMART_ACTION_SET_DYNAMIC_FLAG: - TC_LOG_ERROR("sql.sql.nolongersupported", "SmartAIMgr: No longer supported action_type(%u), event_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id); + case SMART_ACTION_ADD_DYNAMIC_FLAG: + case SMART_ACTION_REMOVE_DYNAMIC_FLAG: + TC_LOG_ERROR("sql.sql", "SmartAIMgr: Unused action_type(%u), event_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id); return false; default: TC_LOG_ERROR("sql.sql", "SmartAIMgr: Not handled action_type(%u), event_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id); return false; } - // Additional check for deprecated - switch (e.GetActionType()) - { - // Deprecated - case SMART_ACTION_SET_UNIT_FLAG: - case SMART_ACTION_REMOVE_UNIT_FLAG: - case SMART_ACTION_ADD_ITEM: - case SMART_ACTION_ADD_DYNAMIC_FLAG: - case SMART_ACTION_REMOVE_DYNAMIC_FLAG: - TC_LOG_WARN("sql.sql.deprecation", "SmartAIMgr: Deprecated action_type(%u), Entry %d SourceType %u Event %u, it might be removed in the future, loaded for now.", e.GetActionType(), e.entryOrGuid, e.GetScriptType(), e.event_id); - break; - default: - break; - } - if (!CheckUnusedActionParams(e)) return false; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 8e2ecf9be5e..9b6e8a22d12 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -110,13 +110,13 @@ enum SMART_EVENT SMART_EVENT_RANGE = 9, // MinDist, MaxDist, RepeatMin, RepeatMax SMART_EVENT_OOC_LOS = 10, // HostilityMode, MaxRnage, CooldownMin, CooldownMax SMART_EVENT_RESPAWN = 11, // type, MapId, ZoneId - SMART_EVENT_TARGET_HEALTH_PCT = 12, // HPMin%, HPMax%, RepeatMin, RepeatMax + SMART_EVENT_TARGET_HEALTH_PCT = 12, // UNUSED, do not reuse SMART_EVENT_VICTIM_CASTING = 13, // RepeatMin, RepeatMax, spellid - SMART_EVENT_FRIENDLY_HEALTH = 14, // HPDeficit, Radius, RepeatMin, RepeatMax + SMART_EVENT_FRIENDLY_HEALTH = 14, // UNUSED, do not reuse SMART_EVENT_FRIENDLY_IS_CC = 15, // Radius, RepeatMin, RepeatMax SMART_EVENT_FRIENDLY_MISSING_BUFF = 16, // SpellId, Radius, RepeatMin, RepeatMax SMART_EVENT_SUMMONED_UNIT = 17, // CreatureId(0 all), CooldownMin, CooldownMax - SMART_EVENT_TARGET_MANA_PCT = 18, // ManaMin%, ManaMax%, RepeatMin, RepeatMax + SMART_EVENT_TARGET_MANA_PCT = 18, // UNUSED, do not reuse SMART_EVENT_ACCEPTED_QUEST = 19, // QuestID (0 = any), CooldownMin, CooldownMax SMART_EVENT_REWARD_QUEST = 20, // QuestID (0 = any), CooldownMin, CooldownMax SMART_EVENT_REACHED_HOME = 21, // NONE @@ -165,7 +165,7 @@ enum SMART_EVENT SMART_EVENT_GOSSIP_HELLO = 64, // noReportUse (for GOs) SMART_EVENT_FOLLOW_COMPLETED = 65, // none SMART_EVENT_EVENT_PHASE_CHANGE = 66, // event phase mask (<= SMART_EVENT_PHASE_ALL) - SMART_EVENT_IS_BEHIND_TARGET = 67, // cooldownMin, CooldownMax + SMART_EVENT_IS_BEHIND_TARGET = 67, // UNUSED, do not reuse SMART_EVENT_GAME_EVENT_START = 68, // game_event.Entry SMART_EVENT_GAME_EVENT_END = 69, // game_event.Entry SMART_EVENT_GO_LOOT_STATE_CHANGED = 70, // go LootState @@ -251,14 +251,6 @@ struct SmartEvent struct { - uint32 hpDeficit; - uint32 radius; - uint32 repeatMin; - uint32 repeatMax; - } friendlyHealth; - - struct - { uint32 radius; uint32 repeatMin; uint32 repeatMax; @@ -377,12 +369,6 @@ struct SmartEvent struct { - uint32 cooldownMin; - uint32 cooldownMax; - } behindTarget; - - struct - { uint32 gameEventId; } gameEvent; @@ -473,8 +459,8 @@ enum SMART_ACTION SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS = 15, // QuestID SMART_ACTION_RESERVED_16 = 16, // used on 4.3.4 and higher scripts SMART_ACTION_SET_EMOTE_STATE = 17, // emoteID - SMART_ACTION_SET_UNIT_FLAG = 18, // Flags - SMART_ACTION_REMOVE_UNIT_FLAG = 19, // Flags + SMART_ACTION_SET_UNIT_FLAG = 18, // UNUSED, do not reuse + SMART_ACTION_REMOVE_UNIT_FLAG = 19, // UNUSED, do not reuse SMART_ACTION_AUTO_ATTACK = 20, // AllowAttackState (0 = stop attack, anything else means continue attacking) SMART_ACTION_ALLOW_COMBAT_MOVEMENT = 21, // AllowCombatMovement (0 = stop combat based movement, anything else continue attacking) SMART_ACTION_SET_EVENT_PHASE = 22, // Phase @@ -513,7 +499,7 @@ enum SMART_ACTION SMART_ACTION_WP_STOP = 55, // despawnTime, quest, fail? SMART_ACTION_ADD_ITEM = 56, // itemID, count SMART_ACTION_REMOVE_ITEM = 57, // itemID, count - SMART_ACTION_INSTALL_AI_TEMPLATE = 58, // do not use + SMART_ACTION_INSTALL_AI_TEMPLATE = 58, // UNUSED, do not reuse SMART_ACTION_SET_RUN = 59, // 0/1 SMART_ACTION_SET_DISABLE_GRAVITY = 60, // 0/1 SMART_ACTION_SET_SWIM = 61, // 0/1 @@ -549,9 +535,9 @@ enum SMART_ACTION SMART_ACTION_REMOVE_UNIT_FIELD_BYTES_1 = 91, // bytes, target SMART_ACTION_INTERRUPT_SPELL = 92, SMART_ACTION_SEND_GO_CUSTOM_ANIM = 93, // anim id - SMART_ACTION_SET_DYNAMIC_FLAG = 94, // do not use - SMART_ACTION_ADD_DYNAMIC_FLAG = 95, // Flags - SMART_ACTION_REMOVE_DYNAMIC_FLAG = 96, // Flags + SMART_ACTION_SET_DYNAMIC_FLAG = 94, // UNUSED, do not reuse + SMART_ACTION_ADD_DYNAMIC_FLAG = 95, // UNUSED, do not reuse + SMART_ACTION_REMOVE_DYNAMIC_FLAG = 96, // UNUSED, do not reuse SMART_ACTION_JUMP_TO_POS = 97, // speedXY, speedZ, targetX, targetY, targetZ SMART_ACTION_SEND_GOSSIP_MENU = 98, // menuId, optionId SMART_ACTION_GO_SET_LOOT_STATE = 99, // state @@ -950,11 +936,6 @@ struct SmartAction struct { uint32 flag; - } unitFlag; - - struct - { - uint32 flag; } flag; struct |