Core/SmartAI: Allow SMART_ACTION_FOLLOW to take 0 values for dist and angle - will set them to their "default" following values.
This commit is contained in:
@@ -796,8 +796,8 @@ void SmartAI::SetFollow(Unit* target, float dist, float angle, uint32 credit, ui
|
|||||||
return;
|
return;
|
||||||
SetRun(mRun);
|
SetRun(mRun);
|
||||||
mFollowGuid = target->GetGUID();
|
mFollowGuid = target->GetGUID();
|
||||||
mFollowDist = dist;
|
mFollowDist = dist ? dist : PET_FOLLOW_DIST;
|
||||||
mFollowAngle = angle;
|
mFollowAngle = angle ? angle : me->GetFollowAngle();
|
||||||
mFollowArrivedTimer = 1000;
|
mFollowArrivedTimer = 1000;
|
||||||
mFollowCredit = credit;
|
mFollowCredit = credit;
|
||||||
mFollowArrivedEntry = end;
|
mFollowArrivedEntry = end;
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ enum SMART_ACTION
|
|||||||
SMART_ACTION_CALL_GROUPEVENTHAPPENS = 26, // QuestID
|
SMART_ACTION_CALL_GROUPEVENTHAPPENS = 26, // QuestID
|
||||||
SMART_ACTION_CALL_CASTEDCREATUREORGO = 27, // CreatureId, SpellId
|
SMART_ACTION_CALL_CASTEDCREATUREORGO = 27, // CreatureId, SpellId
|
||||||
SMART_ACTION_REMOVEAURASFROMSPELL = 28, // Spellid
|
SMART_ACTION_REMOVEAURASFROMSPELL = 28, // Spellid
|
||||||
SMART_ACTION_FOLLOW = 29, // Distance, Angle, EndCreatureEntry, credit, creditType (0monsterkill, 1event)
|
SMART_ACTION_FOLLOW = 29, // Distance (0 = default), Angle (0 = default), EndCreatureEntry, credit, creditType (0monsterkill, 1event)
|
||||||
SMART_ACTION_RANDOM_PHASE = 30, // PhaseId1, PhaseId2, PhaseId3...
|
SMART_ACTION_RANDOM_PHASE = 30, // PhaseId1, PhaseId2, PhaseId3...
|
||||||
SMART_ACTION_RANDOM_PHASE_RANGE = 31, // PhaseMin, PhaseMax
|
SMART_ACTION_RANDOM_PHASE_RANGE = 31, // PhaseMin, PhaseMax
|
||||||
SMART_ACTION_RESET_GOBJECT = 32, //
|
SMART_ACTION_RESET_GOBJECT = 32, //
|
||||||
|
|||||||
Reference in New Issue
Block a user