aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/SmartScripts
diff options
context:
space:
mode:
authorjoschiwald <joschiwald@online.de>2013-12-10 18:46:11 +0100
committerjoschiwald <joschiwald@online.de>2013-12-10 18:46:11 +0100
commiteddf1b5a6407de5a40e04916dd41427d7dc0dc3d (patch)
treede7c90c9fdc83d2c1bd0e1fee32dac5a7e97dcd0 /src/server/game/AI/SmartScripts
parentbb45db65a0a5c72a527b42cf6bea5215e9b710eb (diff)
Scripts: replace some SetOrientation() calls with spline packets and some random changes
Diffstat (limited to 'src/server/game/AI/SmartScripts')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 7555471e091..ecfe35345f2 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -525,9 +525,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(e.action.cast.spell);
int32 mana = me->GetPower(POWER_MANA);
- if (me->GetDistance((*itr)->ToUnit()) > spellInfo->GetMaxRange(true) ||
- me->GetDistance((*itr)->ToUnit()) < spellInfo->GetMinRange(true) ||
- !me->ToUnit()->IsWithinLOSInMap((*itr)->ToUnit()) ||
+ if (me->GetDistance(*itr) > spellInfo->GetMaxRange(true) ||
+ me->GetDistance(*itr) < spellInfo->GetMinRange(true) ||
+ !me->IsWithinLOSInMap(*itr) ||
mana < spellInfo->CalcPowerCost(me, spellInfo->GetSchoolMask()))
_allowMove = true;