GM characters should buy from anywhere.
This commit is contained in:
parent
1e37904aae
commit
41876df8c3
@ -53,22 +53,25 @@ public class RequestBuyItem extends ClientBasePacket
|
||||
final PlayerInstance player = client.getActiveChar();
|
||||
|
||||
// Prevent buying items far from merchant.
|
||||
if (!(player.getTarget() instanceof MerchantInstance))
|
||||
if (!player.isGM())
|
||||
{
|
||||
return;
|
||||
}
|
||||
boolean found = false;
|
||||
for (WorldObject object : player.getKnownObjects())
|
||||
{
|
||||
if ((object instanceof MerchantInstance) && (player.calculateDistance2D(object) < 250))
|
||||
if (!(player.getTarget() instanceof MerchantInstance))
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
return;
|
||||
}
|
||||
boolean found = false;
|
||||
for (WorldObject object : player.getKnownObjects())
|
||||
{
|
||||
if ((object instanceof MerchantInstance) && (player.calculateDistance2D(object) < 250))
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
double neededMoney = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user