diff options
author | offl <11556157+offl@users.noreply.github.com> | 2021-11-07 22:51:25 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-03-21 23:02:31 +0100 |
commit | ebcd45b7e1eaa07386a3927d73575339535ec557 (patch) | |
tree | f29833e2c3e510ec7af951d4ced07a56409e63ce /src | |
parent | 791b759332b784211031571d3ca68cf0080897cb (diff) |
Core/SAI: Remove reactState param from SMART_ACTION_WP_START (#27255)
Ref #26728
(cherry picked from commit 04909bada85d4770a58a5b2b6f2180f5aacb1b81)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 3 | ||||
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 10 | ||||
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.h | 4 |
3 files changed, 2 insertions, 15 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 6475dd55081..084c6d846c1 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1420,9 +1420,6 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u } } - // Extra validation to ignore invalid values stored in the db, see comment at TEMPORARY_EXTRA_VALUE_FOR_DB_CLEANUP definition - if (e.action.wpStart.reactState <= REACT_AGGRESSIVE) - me->SetReactState((ReactStates)e.action.wpStart.reactState); ENSURE_AI(SmartAI, me->AI())->StartPath(run, entry, repeat, unit); uint32 quest = e.action.wpStart.quest; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 2e0173f5389..16e9e533781 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -1898,16 +1898,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) if (e.action.wpStart.quest && !IsQuestValid(e, e.action.wpStart.quest)) return false; - // Allow "invalid" value 3 for a while to allow cleanup the values stored in the db for SMART_ACTION_WP_START. - // Remember to remove this once the clean is complete. - constexpr uint32 TEMPORARY_EXTRA_VALUE_FOR_DB_CLEANUP = 1; - - if (e.action.wpStart.reactState > (REACT_AGGRESSIVE + TEMPORARY_EXTRA_VALUE_FOR_DB_CLEANUP)) - { - TC_LOG_ERROR("sql.sql", "SmartAIMgr: Creature " SI64FMTD " Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.reactState); - return false; - } - TC_SAI_IS_BOOLEAN_VALID(e, e.action.wpStart.run); TC_SAI_IS_BOOLEAN_VALID(e, e.action.wpStart.repeat); break; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 769d306ca2c..100695c4111 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -501,7 +501,7 @@ enum SMART_ACTION SMART_ACTION_SUMMON_GO = 50, // GameObjectID, DespawnTime in s SMART_ACTION_KILL_UNIT = 51, // SMART_ACTION_ACTIVATE_TAXI = 52, // TaxiID - SMART_ACTION_WP_START = 53, // run/walk, pathID, canRepeat, quest, despawntime, reactState + SMART_ACTION_WP_START = 53, // run/walk, pathID, canRepeat, quest, despawntime SMART_ACTION_WP_PAUSE = 54, // time SMART_ACTION_WP_STOP = 55, // despawnTime, quest, fail? SMART_ACTION_ADD_ITEM = 56, // itemID, count @@ -867,7 +867,7 @@ struct SmartAction SAIBool repeat; uint32 quest; uint32 despawnTime; - uint32 reactState; + // uint32 reactState; DO NOT REUSE } wpStart; struct |