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

This commit is contained in:
Arthur Ice 2015-01-18 03:52:17 -08:00
parent 97d7d69623
commit 2ccac25004

View File

@ -5963,7 +5963,7 @@ XS(XS_Client_SilentMessage)
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
if(THIS->GetTarget() != NULL){
if(THIS->GetTarget()->IsNPC()){
if (THIS->DistNoRootNoZ(*THIS->GetTarget()) <= 200) {
if (ComparativeDistanceNoZ(THIS->GetPosition(), THIS->GetTarget()->GetPosition()) <= 200) {
if(THIS->GetTarget()->CastToNPC()->IsMoving() && !THIS->GetTarget()->CastToNPC()->IsOnHatelist(THIS->GetTarget()))
THIS->GetTarget()->CastToNPC()->PauseWandering(RuleI(NPC, SayPauseTimeInSec));
THIS->ChannelMessageReceived(8, 0, 100, SvPV_nolen(ST(1)));