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();
|
final PlayerInstance player = client.getActiveChar();
|
||||||
|
|
||||||
// Prevent buying items far from merchant.
|
// Prevent buying items far from merchant.
|
||||||
if (!(player.getTarget() instanceof MerchantInstance))
|
if (!player.isGM())
|
||||||
{
|
{
|
||||||
return;
|
if (!(player.getTarget() instanceof MerchantInstance))
|
||||||
}
|
|
||||||
boolean found = false;
|
|
||||||
for (WorldObject object : player.getKnownObjects())
|
|
||||||
{
|
|
||||||
if ((object instanceof MerchantInstance) && (player.calculateDistance2D(object) < 250))
|
|
||||||
{
|
{
|
||||||
found = true;
|
return;
|
||||||
break;
|
}
|
||||||
|
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;
|
double neededMoney = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user