removed usage of mob distnoroot and used ComparativeDistance instead

This commit is contained in:
Arthur Ice 2015-01-17 15:32:04 -08:00
parent 9f8dad894c
commit e653a3943a

View File

@ -26,6 +26,7 @@
#include "string_ids.h" #include "string_ids.h"
#include "worldserver.h" #include "worldserver.h"
#include "zonedb.h" #include "zonedb.h"
#include "position.h"
float Mob::GetActSpellRange(uint16 spell_id, float range, bool IsBard) float Mob::GetActSpellRange(uint16 spell_id, float range, bool IsBard)
{ {
@ -720,7 +721,7 @@ void EntityList::AESpell(Mob *caster, Mob *center, uint16 spell_id, bool affect_
continue; continue;
if (spells[spell_id].targettype == ST_Ring) { if (spells[spell_id].targettype == ST_Ring) {
dist_targ = curmob->DistNoRoot(caster->GetTargetRingX(), caster->GetTargetRingY(), caster->GetTargetRingZ()); dist_targ = ComparativeDistance(curmob->GetPosition(), caster->GetTargetRingLocation());
} }
else if (center) { else if (center) {
dist_targ = center->DistNoRoot(*curmob); dist_targ = center->DistNoRoot(*curmob);