aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2011-06-15 17:32:31 +0200
committerShauren <shauren.trinity@gmail.com>2011-06-15 17:32:31 +0200
commit1df876c3ec00ca3a8e9571ea7276a48219c208c6 (patch)
treef9d558fe4b27e9319cc037787a16ccd0ff677a64 /src
parentd8aac735a70059106964c64e6420d3382a01fb8b (diff)
Core/SAI: Fixed crashes in AttackStart related to movement
Closes #1670
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp6
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 5897a4f1476..8719862a236 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -586,9 +586,9 @@ void SmartAI::KilledUnit(Unit* victim)
GetScript()->ProcessEventsFor(SMART_EVENT_KILL, victim);
}
-void SmartAI::JustSummoned(Creature* pUnit)
+void SmartAI::JustSummoned(Creature* creature)
{
- GetScript()->ProcessEventsFor(SMART_EVENT_SUMMONED_UNIT, pUnit);
+ GetScript()->ProcessEventsFor(SMART_EVENT_SUMMONED_UNIT, creature);
}
void SmartAI::AttackStart(Unit* who)
@@ -596,7 +596,7 @@ void SmartAI::AttackStart(Unit* who)
if (who && me->Attack(who, true))
{
SetRun(mRun);
- if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE)
+ if (me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_ACTIVE) == POINT_MOTION_TYPE)
me->GetMotionMaster()->MovementExpired();
if (mCanCombatMove)
diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h
index 32562e26869..ff700ffa8e6 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.h
+++ b/src/server/game/AI/SmartScripts/SmartAI.h
@@ -91,10 +91,10 @@ class SmartAI : public CreatureAI
void KilledUnit(Unit* victim);
// Called when the creature summon successfully other creature
- void JustSummoned(Creature* pUnit);
+ void JustSummoned(Creature* creature);
// Tell creature to attack and follow the victim
- void AttackStart(Unit *who);
+ void AttackStart(Unit* who);
// Called if IsVisible(Unit *who) is true at each *who move, reaction at visibility zone enter
void MoveInLineOfSight(Unit *who);