mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-23 03:51:30 +00:00
Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead
This commit is contained in:
parent
65bd2cf8ac
commit
8efb9e75f8
@ -2554,7 +2554,7 @@ void Client::Handle_OP_AltCurrencyMerchantRequest(const EQApplicationPacket *app
|
|||||||
|
|
||||||
NPC* tar = entity_list.GetNPCByID(*((uint32*)app->pBuffer));
|
NPC* tar = entity_list.GetNPCByID(*((uint32*)app->pBuffer));
|
||||||
if (tar) {
|
if (tar) {
|
||||||
if (DistNoRoot(*tar) > USE_NPC_RANGE2)
|
if (ComparativeDistance(m_Position, tar->GetPosition()) > USE_NPC_RANGE2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (tar->GetClass() != ALT_CURRENCY_MERCHANT) {
|
if (tar->GetClass() != ALT_CURRENCY_MERCHANT) {
|
||||||
@ -2633,7 +2633,7 @@ void Client::Handle_OP_AltCurrencyPurchase(const EQApplicationPacket *app)
|
|||||||
AltCurrencyPurchaseItem_Struct *purchase = (AltCurrencyPurchaseItem_Struct*)app->pBuffer;
|
AltCurrencyPurchaseItem_Struct *purchase = (AltCurrencyPurchaseItem_Struct*)app->pBuffer;
|
||||||
NPC* tar = entity_list.GetNPCByID(purchase->merchant_entity_id);
|
NPC* tar = entity_list.GetNPCByID(purchase->merchant_entity_id);
|
||||||
if (tar) {
|
if (tar) {
|
||||||
if (DistNoRoot(*tar) > USE_NPC_RANGE2)
|
if (ComparativeDistance(m_Position, tar->GetPosition())> USE_NPC_RANGE2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (tar->GetClass() != ALT_CURRENCY_MERCHANT) {
|
if (tar->GetClass() != ALT_CURRENCY_MERCHANT) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user