mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 05:36:23 +00:00
fix(Core/DB/SAI): [Quest] - Weapons of Spirit / Allows Value 3 for react SAI WP Start Consolidated PR (#8926)
This commit is contained in:
@@ -1745,8 +1745,10 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (!stored)
|
||||
delete targets;
|
||||
}
|
||||
|
||||
me->SetReactState((ReactStates)e.action.wpStart.reactState);
|
||||
if (e.action.wpStart.reactState <= REACT_AGGRESSIVE)
|
||||
{
|
||||
me->SetReactState((ReactStates) e.action.wpStart.reactState);
|
||||
}
|
||||
CAST_AI(SmartAI, me->AI())->StartPath(run, entry, repeat, unit);
|
||||
|
||||
uint32 quest = e.action.wpStart.quest;
|
||||
|
||||
@@ -1044,7 +1044,12 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
}
|
||||
if (e.action.wpStart.quest && !IsQuestValid(e, e.action.wpStart.quest))
|
||||
return false;
|
||||
if (e.action.wpStart.reactState > REACT_AGGRESSIVE)
|
||||
|
||||
// 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))
|
||||
{
|
||||
LOG_ERROR("sql.sql", "SmartAIMgr: Creature %d Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.reactState);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user