Fixed setting a private store when config is set to 0.
Contributed by Sahar.
This commit is contained in:
parent
0def6e1c03
commit
970be046f6
@ -4568,7 +4568,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjectsInRange(this, Creature.class, 1000))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4574,7 +4574,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjectsInRange(this, Creature.class, 1000))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4576,7 +4576,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjectsInRange(this, Creature.class, 1000))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4572,7 +4572,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjectsInRange(this, Creature.class, 1000))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4551,7 +4551,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjectsInRange(this, Creature.class, 1000))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4551,7 +4551,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjectsInRange(this, Creature.class, 1000))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4552,7 +4552,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjectsInRange(this, Creature.class, 1000))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4482,7 +4482,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjectsInRange(this, Creature.class, 1000))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4486,7 +4486,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjectsInRange(this, Creature.class, 1000))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4629,7 +4629,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjects(this, Creature.class))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4519,7 +4519,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjects(this, Creature.class))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4526,7 +4526,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjectsInRange(this, Creature.class, 1000))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4526,7 +4526,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjectsInRange(this, Creature.class, 1000))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4510,7 +4510,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjectsInRange(this, Creature.class, 1000))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4521,7 +4521,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjectsInRange(this, Creature.class, 1000))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4521,7 +4521,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjectsInRange(this, Creature.class, 1000))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4440,7 +4440,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjectsInRange(this, Creature.class, 1000))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4528,7 +4528,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjectsInRange(this, Creature.class, 1000))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
@ -4508,7 +4508,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
for (Creature creature : World.getInstance().getVisibleObjectsInRange(this, Creature.class, 1000))
|
||||
{
|
||||
if (Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
if ((creature.getMinShopDistance() > 0) && Util.checkIfInRange(creature.getMinShopDistance(), this, creature, true))
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE));
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user