mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 04:11:30 +00:00
Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead
This commit is contained in:
parent
a9c5f80968
commit
dc2534e38c
@ -1253,7 +1253,7 @@ void Group::BalanceHP(int32 penalty, float range, Mob* caster, int32 limit)
|
|||||||
for(gi = 0; gi < MAX_GROUP_MEMBERS; gi++)
|
for(gi = 0; gi < MAX_GROUP_MEMBERS; gi++)
|
||||||
{
|
{
|
||||||
if(members[gi]){
|
if(members[gi]){
|
||||||
distance = caster->DistNoRoot(*members[gi]);
|
distance = ComparativeDistance(caster->GetPosition(), members[gi]->GetPosition());
|
||||||
if(distance <= range2){
|
if(distance <= range2){
|
||||||
if((members[gi]->GetMaxHP() - dmgtaken) < 1){ //this way the ability will never kill someone
|
if((members[gi]->GetMaxHP() - dmgtaken) < 1){ //this way the ability will never kill someone
|
||||||
members[gi]->SetHP(1); //but it will come darn close
|
members[gi]->SetHP(1); //but it will come darn close
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user