mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Core/SmartAI: removed depricated WP_LOAD, small fix to run-walk states when escorting, fix for escort invoker range check if no targets set
--HG-- branch : trunk
This commit is contained in:
@@ -90,7 +90,8 @@ void SmartAI::UpdateDespawn(const uint32 diff)
|
||||
|
||||
void SmartAI::Reset()
|
||||
{
|
||||
SetRun(true);
|
||||
if (!HasEscortState(SMART_ESCORT_ESCORTING))//dont mess up escort movement after combat
|
||||
SetRun(true);
|
||||
GetScript()->OnReset();
|
||||
}
|
||||
|
||||
@@ -413,7 +414,7 @@ bool SmartAI::IsEscortInvokerInRange()
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return true;//escort targets were not set, ignore range check
|
||||
}
|
||||
|
||||
void SmartAI::MovepointReached(uint32 id)
|
||||
|
||||
@@ -835,12 +835,6 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
|
||||
CAST_AI(SmartAI, me->AI())->SetSwimm(e.action.setSwimm.swimm ? true : false);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_WP_LOAD:
|
||||
{
|
||||
if (!me) return;
|
||||
uint32 entry = e.action.wpLoad.id;
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_WP_START:
|
||||
{
|
||||
if (!IsSmart()) return;
|
||||
|
||||
@@ -657,13 +657,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
|
||||
case SMART_ACTION_SUMMON_GO:
|
||||
if (!IsGameObjectValid(e, e.action.summonGO.entry)) return false;
|
||||
break;
|
||||
case SMART_ACTION_WP_LOAD:
|
||||
if (!sSmartWaypointMgr.GetPath(e.action.wpLoad.id))
|
||||
{
|
||||
sLog.outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses non-existent WaypointPath id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpLoad.id);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case SMART_ACTION_ADD_ITEM:
|
||||
case SMART_ACTION_REMOVE_ITEM:
|
||||
if (!IsItemValid(e, e.action.item.entry)) return false;
|
||||
@@ -688,6 +681,11 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
|
||||
break;
|
||||
case SMART_ACTION_WP_START:
|
||||
{
|
||||
if (!sSmartWaypointMgr.GetPath(e.action.wpStart.pathID))
|
||||
{
|
||||
sLog.outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses non-existent WaypointPath id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.pathID);
|
||||
return false;
|
||||
}
|
||||
if (e.action.wpStart.quest && !IsQuestValid(e, e.action.wpStart.quest)) return false;
|
||||
if (e.action.wpStart.reactState > REACT_AGGRESSIVE)
|
||||
{
|
||||
|
||||
@@ -397,7 +397,7 @@ enum SMART_ACTION
|
||||
SMART_ACTION_ATTACK_START = 49, //
|
||||
SMART_ACTION_SUMMON_GO = 50, // GameObjectID, DespawnTime in ms,
|
||||
SMART_ACTION_KILL_UNIT = 51, //
|
||||
SMART_ACTION_WP_LOAD = 52, // pathID
|
||||
//SMART_ACTION_WP_LOAD = 52, // pathID
|
||||
SMART_ACTION_WP_START = 53, // run/walk, pathID, canRepeat, quest, despawntime, reactState
|
||||
SMART_ACTION_WP_PAUSE = 54, // time
|
||||
SMART_ACTION_WP_STOP = 55, // despawnTime, quest, fail?
|
||||
|
||||
Reference in New Issue
Block a user