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:
kaelima
2011-10-25 19:08:21 +01:00
parent f2000f3fb5
commit 199bcf1a88
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -796,8 +796,8 @@ void SmartAI::SetFollow(Unit* target, float dist, float angle, uint32 credit, ui
return;
SetRun(mRun);
mFollowGuid = target->GetGUID();
mFollowDist = dist;
mFollowAngle = angle;
mFollowDist = dist ? dist : PET_FOLLOW_DIST;
mFollowAngle = angle ? angle : me->GetFollowAngle();
mFollowArrivedTimer = 1000;
mFollowCredit = credit;
mFollowArrivedEntry = end;
@@ -387,7 +387,7 @@ enum SMART_ACTION
SMART_ACTION_CALL_GROUPEVENTHAPPENS = 26, // QuestID
SMART_ACTION_CALL_CASTEDCREATUREORGO = 27, // CreatureId, 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_RANGE = 31, // PhaseMin, PhaseMax
SMART_ACTION_RESET_GOBJECT = 32, //