Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead

This commit is contained in:
Arthur Ice 2015-01-18 02:03:44 -08:00
parent c6b3060687
commit 4abe2fc6ff

View File

@ -1755,7 +1755,7 @@ Mob* Bot::GetFirstIncomingMobToMez(Bot* botCaster, BotSpell botSpell) {
for(std::list<NPC*>::iterator itr = npc_list.begin(); itr != npc_list.end(); ++itr) { for(std::list<NPC*>::iterator itr = npc_list.begin(); itr != npc_list.end(); ++itr) {
NPC* npc = *itr; NPC* npc = *itr;
if(npc->DistNoRootNoZ(*botCaster) <= botCaster->GetActSpellRange(botSpell.SpellId, spells[botSpell.SpellId].range)) { if(ComparativeDistanceNoZ(npc->GetPosition(), botCaster->GetPosition()) <= botCaster->GetActSpellRange(botSpell.SpellId, spells[botSpell.SpellId].range)) {
if(!npc->IsMezzed()) { if(!npc->IsMezzed()) {
if(botCaster->HasGroup()) { if(botCaster->HasGroup()) {
Group* g = botCaster->GetGroup(); Group* g = botCaster->GetGroup();