diff options
Diffstat (limited to 'src/server/game/AI')
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 30 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.h | 5 | 
2 files changed, 8 insertions, 27 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 0c0bfd218b2..a5a647aabd3 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -757,18 +757,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u              {                  if (IsUnit(target))                  { -                    if (!e.action.unitFlag.type) -                    { -                        target->ToUnit()->AddUnitFlag(UnitFlags(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); -                    } -                    else -                    { -                        target->ToUnit()->AddUnitFlag2(UnitFlags2(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_2", -                            target->GetGUID().ToString().c_str(), e.action.unitFlag.flag); -                    } +                    target->ToUnit()->AddUnitFlag(UnitFlags(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; @@ -779,18 +770,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u              {                  if (IsUnit(target))                  { -                    if (!e.action.unitFlag.type) -                    { -                        target->ToUnit()->RemoveUnitFlag(UnitFlags(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); -                    } -                    else -                    { -                        target->ToUnit()->RemoveUnitFlag2(UnitFlags2(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_2", -                            target->GetGUID().ToString().c_str(), e.action.unitFlag.flag); -                    } +                    target->ToUnit()->RemoveUnitFlag(UnitFlags(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; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 0875b988921..f8e4a29635b 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -480,8 +480,8 @@ enum SMART_ACTION      SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS    = 15,     // QuestID      SMART_ACTION_SET_INGAME_PHASE_GROUP             = 16,     // phaseGroupId, apply      SMART_ACTION_SET_EMOTE_STATE                    = 17,     // emoteID -    SMART_ACTION_SET_UNIT_FLAG                      = 18,     // Flags (may be more than one field OR'd together), Target -    SMART_ACTION_REMOVE_UNIT_FLAG                   = 19,     // Flags (may be more than one field OR'd together), Target +    SMART_ACTION_SET_UNIT_FLAG                      = 18,     // Flags +    SMART_ACTION_REMOVE_UNIT_FLAG                   = 19,     // Flags      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 @@ -966,7 +966,6 @@ struct SmartAction          struct          {              uint32 flag; -            uint32 type;          } unitFlag;          struct  | 
