mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 16:41:29 +00:00
Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead
This commit is contained in:
parent
6f209fd8b9
commit
bcc4c1e4b6
@ -9828,7 +9828,7 @@ void Client::Handle_OP_OpenTributeMaster(const EQApplicationPacket *app)
|
|||||||
StartTribute_Struct* st = (StartTribute_Struct*)app->pBuffer;
|
StartTribute_Struct* st = (StartTribute_Struct*)app->pBuffer;
|
||||||
Mob* tribmast = entity_list.GetMob(st->tribute_master_id);
|
Mob* tribmast = entity_list.GetMob(st->tribute_master_id);
|
||||||
if (tribmast && tribmast->IsNPC() && tribmast->GetClass() == TRIBUTE_MASTER
|
if (tribmast && tribmast->IsNPC() && tribmast->GetClass() == TRIBUTE_MASTER
|
||||||
&& DistNoRoot(*tribmast) <= USE_NPC_RANGE2) {
|
&& ComparativeDistance(m_Position, tribmast->GetPosition()) <= USE_NPC_RANGE2) {
|
||||||
st->response = 1;
|
st->response = 1;
|
||||||
QueuePacket(app);
|
QueuePacket(app);
|
||||||
tribute_master_id = st->tribute_master_id;
|
tribute_master_id = st->tribute_master_id;
|
||||||
@ -12102,7 +12102,7 @@ void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app)
|
|||||||
if (mp->quantity < 1) return;
|
if (mp->quantity < 1) return;
|
||||||
|
|
||||||
//you have to be somewhat close to them to be properly using them
|
//you have to be somewhat close to them to be properly using them
|
||||||
if (DistNoRoot(*tmp) > USE_NPC_RANGE2)
|
if (ComparativeDistance(m_Position, tmp->GetPosition()) > USE_NPC_RANGE2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
merchantid = tmp->CastToNPC()->MerchantType;
|
merchantid = tmp->CastToNPC()->MerchantType;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user