ExAutoPlaySettingSend proper long range value.
This commit is contained in:
@@ -44,7 +44,7 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
|||||||
_active = packet.readC() == 1;
|
_active = packet.readC() == 1;
|
||||||
_pickUp = packet.readC() == 1;
|
_pickUp = packet.readC() == 1;
|
||||||
_nextTargetMode = packet.readH();
|
_nextTargetMode = packet.readH();
|
||||||
_longRange = packet.readC() == 0;
|
_longRange = packet.readC() != 0;
|
||||||
_potionPercent = packet.readD();
|
_potionPercent = packet.readD();
|
||||||
_respectfulHunting = packet.readC() == 1;
|
_respectfulHunting = packet.readC() == 1;
|
||||||
return true;
|
return true;
|
||||||
@@ -67,9 +67,13 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
player.getAutoPlaySettings().setPickup(_pickUp);
|
||||||
|
player.getAutoPlaySettings().setLongRange(_longRange);
|
||||||
|
player.getAutoPlaySettings().setRespectfulHunting(_respectfulHunting);
|
||||||
|
|
||||||
if (_active)
|
if (_active)
|
||||||
{
|
{
|
||||||
AutoPlayTaskManager.getInstance().doAutoPlay(player, _pickUp, _longRange, _respectfulHunting);
|
AutoPlayTaskManager.getInstance().doAutoPlay(player);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -130,7 +130,7 @@ public class AutoPlayTaskManager
|
|||||||
continue TARGET;
|
continue TARGET;
|
||||||
}
|
}
|
||||||
// Check monster target.
|
// Check monster target.
|
||||||
if (player.getAutoPlaySettings().isRespectfulHunting() && (nearby.getTarget() != null) && (nearby.getTarget() != player && !player.getServitors().containsKey(nearby.getTarget().getObjectId())))
|
if (player.getAutoPlaySettings().isRespectfulHunting() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
|
||||||
{
|
{
|
||||||
continue TARGET;
|
continue TARGET;
|
||||||
}
|
}
|
||||||
@@ -167,12 +167,8 @@ public class AutoPlayTaskManager
|
|||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void doAutoPlay(PlayerInstance player, boolean pickup, boolean longRange, boolean respectfulHunting)
|
public void doAutoPlay(PlayerInstance player)
|
||||||
{
|
{
|
||||||
player.getAutoPlaySettings().setPickup(pickup);
|
|
||||||
player.getAutoPlaySettings().setLongRange(longRange);
|
|
||||||
player.getAutoPlaySettings().setRespectfulHunting(respectfulHunting);
|
|
||||||
|
|
||||||
if (!PLAYERS.contains(player))
|
if (!PLAYERS.contains(player))
|
||||||
{
|
{
|
||||||
player.onActionRequest();
|
player.onActionRequest();
|
||||||
|
@@ -44,7 +44,7 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
|||||||
_active = packet.readC() == 1;
|
_active = packet.readC() == 1;
|
||||||
_pickUp = packet.readC() == 1;
|
_pickUp = packet.readC() == 1;
|
||||||
_nextTargetMode = packet.readH();
|
_nextTargetMode = packet.readH();
|
||||||
_longRange = packet.readC() == 0;
|
_longRange = packet.readC() != 0;
|
||||||
_potionPercent = packet.readD();
|
_potionPercent = packet.readD();
|
||||||
packet.readD(); // 272
|
packet.readD(); // 272
|
||||||
_respectfulHunting = packet.readC() == 1;
|
_respectfulHunting = packet.readC() == 1;
|
||||||
@@ -68,9 +68,13 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
player.getAutoPlaySettings().setPickup(_pickUp);
|
||||||
|
player.getAutoPlaySettings().setLongRange(_longRange);
|
||||||
|
player.getAutoPlaySettings().setRespectfulHunting(_respectfulHunting);
|
||||||
|
|
||||||
if (_active)
|
if (_active)
|
||||||
{
|
{
|
||||||
AutoPlayTaskManager.getInstance().doAutoPlay(player, _pickUp, _longRange, _respectfulHunting);
|
AutoPlayTaskManager.getInstance().doAutoPlay(player);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -130,7 +130,7 @@ public class AutoPlayTaskManager
|
|||||||
continue TARGET;
|
continue TARGET;
|
||||||
}
|
}
|
||||||
// Check monster target.
|
// Check monster target.
|
||||||
if (player.getAutoPlaySettings().isRespectfulHunting() && (nearby.getTarget() != null) && (nearby.getTarget() != player && !player.getServitors().containsKey(nearby.getTarget().getObjectId())))
|
if (player.getAutoPlaySettings().isRespectfulHunting() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
|
||||||
{
|
{
|
||||||
continue TARGET;
|
continue TARGET;
|
||||||
}
|
}
|
||||||
@@ -167,12 +167,8 @@ public class AutoPlayTaskManager
|
|||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void doAutoPlay(PlayerInstance player, boolean pickup, boolean longRange, boolean respectfulHunting)
|
public void doAutoPlay(PlayerInstance player)
|
||||||
{
|
{
|
||||||
player.getAutoPlaySettings().setPickup(pickup);
|
|
||||||
player.getAutoPlaySettings().setLongRange(longRange);
|
|
||||||
player.getAutoPlaySettings().setRespectfulHunting(respectfulHunting);
|
|
||||||
|
|
||||||
if (!PLAYERS.contains(player))
|
if (!PLAYERS.contains(player))
|
||||||
{
|
{
|
||||||
player.onActionRequest();
|
player.onActionRequest();
|
||||||
|
@@ -44,7 +44,7 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
|||||||
_active = packet.readC() == 1;
|
_active = packet.readC() == 1;
|
||||||
_pickUp = packet.readC() == 1;
|
_pickUp = packet.readC() == 1;
|
||||||
_nextTargetMode = packet.readH();
|
_nextTargetMode = packet.readH();
|
||||||
_longRange = packet.readC() == 0;
|
_longRange = packet.readC() != 0;
|
||||||
_potionPercent = packet.readD();
|
_potionPercent = packet.readD();
|
||||||
packet.readD(); // 272
|
packet.readD(); // 272
|
||||||
_respectfulHunting = packet.readC() == 1;
|
_respectfulHunting = packet.readC() == 1;
|
||||||
@@ -68,9 +68,13 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
player.getAutoPlaySettings().setPickup(_pickUp);
|
||||||
|
player.getAutoPlaySettings().setLongRange(_longRange);
|
||||||
|
player.getAutoPlaySettings().setRespectfulHunting(_respectfulHunting);
|
||||||
|
|
||||||
if (_active)
|
if (_active)
|
||||||
{
|
{
|
||||||
AutoPlayTaskManager.getInstance().doAutoPlay(player, _pickUp, _longRange, _respectfulHunting);
|
AutoPlayTaskManager.getInstance().doAutoPlay(player);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -130,7 +130,7 @@ public class AutoPlayTaskManager
|
|||||||
continue TARGET;
|
continue TARGET;
|
||||||
}
|
}
|
||||||
// Check monster target.
|
// Check monster target.
|
||||||
if (player.getAutoPlaySettings().isRespectfulHunting() && (nearby.getTarget() != null) && (nearby.getTarget() != player && !player.getServitors().containsKey(nearby.getTarget().getObjectId())))
|
if (player.getAutoPlaySettings().isRespectfulHunting() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
|
||||||
{
|
{
|
||||||
continue TARGET;
|
continue TARGET;
|
||||||
}
|
}
|
||||||
@@ -167,12 +167,8 @@ public class AutoPlayTaskManager
|
|||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void doAutoPlay(PlayerInstance player, boolean pickup, boolean longRange, boolean respectfulHunting)
|
public void doAutoPlay(PlayerInstance player)
|
||||||
{
|
{
|
||||||
player.getAutoPlaySettings().setPickup(pickup);
|
|
||||||
player.getAutoPlaySettings().setLongRange(longRange);
|
|
||||||
player.getAutoPlaySettings().setRespectfulHunting(respectfulHunting);
|
|
||||||
|
|
||||||
if (!PLAYERS.contains(player))
|
if (!PLAYERS.contains(player))
|
||||||
{
|
{
|
||||||
player.onActionRequest();
|
player.onActionRequest();
|
||||||
|
@@ -44,7 +44,7 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
|||||||
_active = packet.readC() == 1;
|
_active = packet.readC() == 1;
|
||||||
_pickUp = packet.readC() == 1;
|
_pickUp = packet.readC() == 1;
|
||||||
_nextTargetMode = packet.readH();
|
_nextTargetMode = packet.readH();
|
||||||
_longRange = packet.readC() == 0;
|
_longRange = packet.readC() != 0;
|
||||||
_potionPercent = packet.readD();
|
_potionPercent = packet.readD();
|
||||||
_respectfulHunting = packet.readC() == 1;
|
_respectfulHunting = packet.readC() == 1;
|
||||||
return true;
|
return true;
|
||||||
@@ -67,9 +67,13 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
player.getAutoPlaySettings().setPickup(_pickUp);
|
||||||
|
player.getAutoPlaySettings().setLongRange(_longRange);
|
||||||
|
player.getAutoPlaySettings().setRespectfulHunting(_respectfulHunting);
|
||||||
|
|
||||||
if (_active)
|
if (_active)
|
||||||
{
|
{
|
||||||
AutoPlayTaskManager.getInstance().doAutoPlay(player, _pickUp, _longRange, _respectfulHunting);
|
AutoPlayTaskManager.getInstance().doAutoPlay(player);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -130,7 +130,7 @@ public class AutoPlayTaskManager
|
|||||||
continue TARGET;
|
continue TARGET;
|
||||||
}
|
}
|
||||||
// Check monster target.
|
// Check monster target.
|
||||||
if (player.getAutoPlaySettings().isRespectfulHunting() && (nearby.getTarget() != null) && (nearby.getTarget() != player && !player.getServitors().containsKey(nearby.getTarget().getObjectId())))
|
if (player.getAutoPlaySettings().isRespectfulHunting() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
|
||||||
{
|
{
|
||||||
continue TARGET;
|
continue TARGET;
|
||||||
}
|
}
|
||||||
@@ -167,12 +167,8 @@ public class AutoPlayTaskManager
|
|||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void doAutoPlay(PlayerInstance player, boolean pickup, boolean longRange, boolean respectfulHunting)
|
public void doAutoPlay(PlayerInstance player)
|
||||||
{
|
{
|
||||||
player.getAutoPlaySettings().setPickup(pickup);
|
|
||||||
player.getAutoPlaySettings().setLongRange(longRange);
|
|
||||||
player.getAutoPlaySettings().setRespectfulHunting(respectfulHunting);
|
|
||||||
|
|
||||||
if (!PLAYERS.contains(player))
|
if (!PLAYERS.contains(player))
|
||||||
{
|
{
|
||||||
player.onActionRequest();
|
player.onActionRequest();
|
||||||
|
@@ -44,7 +44,7 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
|||||||
_active = packet.readC() == 1;
|
_active = packet.readC() == 1;
|
||||||
_pickUp = packet.readC() == 1;
|
_pickUp = packet.readC() == 1;
|
||||||
_nextTargetMode = packet.readH();
|
_nextTargetMode = packet.readH();
|
||||||
_longRange = packet.readC() == 0;
|
_longRange = packet.readC() != 0;
|
||||||
_potionPercent = packet.readD();
|
_potionPercent = packet.readD();
|
||||||
packet.readD(); // 272
|
packet.readD(); // 272
|
||||||
_respectfulHunting = packet.readC() == 1;
|
_respectfulHunting = packet.readC() == 1;
|
||||||
@@ -68,9 +68,13 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
player.getAutoPlaySettings().setPickup(_pickUp);
|
||||||
|
player.getAutoPlaySettings().setLongRange(_longRange);
|
||||||
|
player.getAutoPlaySettings().setRespectfulHunting(_respectfulHunting);
|
||||||
|
|
||||||
if (_active)
|
if (_active)
|
||||||
{
|
{
|
||||||
AutoPlayTaskManager.getInstance().doAutoPlay(player, _pickUp, _longRange, _respectfulHunting);
|
AutoPlayTaskManager.getInstance().doAutoPlay(player);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -130,7 +130,7 @@ public class AutoPlayTaskManager
|
|||||||
continue TARGET;
|
continue TARGET;
|
||||||
}
|
}
|
||||||
// Check monster target.
|
// Check monster target.
|
||||||
if (player.getAutoPlaySettings().isRespectfulHunting() && (nearby.getTarget() != null) && (nearby.getTarget() != player && !player.getServitors().containsKey(nearby.getTarget().getObjectId())))
|
if (player.getAutoPlaySettings().isRespectfulHunting() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
|
||||||
{
|
{
|
||||||
continue TARGET;
|
continue TARGET;
|
||||||
}
|
}
|
||||||
@@ -167,12 +167,8 @@ public class AutoPlayTaskManager
|
|||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void doAutoPlay(PlayerInstance player, boolean pickup, boolean longRange, boolean respectfulHunting)
|
public void doAutoPlay(PlayerInstance player)
|
||||||
{
|
{
|
||||||
player.getAutoPlaySettings().setPickup(pickup);
|
|
||||||
player.getAutoPlaySettings().setLongRange(longRange);
|
|
||||||
player.getAutoPlaySettings().setRespectfulHunting(respectfulHunting);
|
|
||||||
|
|
||||||
if (!PLAYERS.contains(player))
|
if (!PLAYERS.contains(player))
|
||||||
{
|
{
|
||||||
player.onActionRequest();
|
player.onActionRequest();
|
||||||
|
@@ -44,7 +44,7 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
|||||||
_active = packet.readC() == 1;
|
_active = packet.readC() == 1;
|
||||||
_pickUp = packet.readC() == 1;
|
_pickUp = packet.readC() == 1;
|
||||||
_nextTargetMode = packet.readH();
|
_nextTargetMode = packet.readH();
|
||||||
_longRange = packet.readC() == 0;
|
_longRange = packet.readC() != 0;
|
||||||
_potionPercent = packet.readD();
|
_potionPercent = packet.readD();
|
||||||
packet.readD(); // 272
|
packet.readD(); // 272
|
||||||
_respectfulHunting = packet.readC() == 1;
|
_respectfulHunting = packet.readC() == 1;
|
||||||
@@ -68,9 +68,13 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
player.getAutoPlaySettings().setPickup(_pickUp);
|
||||||
|
player.getAutoPlaySettings().setLongRange(_longRange);
|
||||||
|
player.getAutoPlaySettings().setRespectfulHunting(_respectfulHunting);
|
||||||
|
|
||||||
if (_active)
|
if (_active)
|
||||||
{
|
{
|
||||||
AutoPlayTaskManager.getInstance().doAutoPlay(player, _pickUp, _longRange, _respectfulHunting);
|
AutoPlayTaskManager.getInstance().doAutoPlay(player);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -130,7 +130,7 @@ public class AutoPlayTaskManager
|
|||||||
continue TARGET;
|
continue TARGET;
|
||||||
}
|
}
|
||||||
// Check monster target.
|
// Check monster target.
|
||||||
if (player.getAutoPlaySettings().isRespectfulHunting() && (nearby.getTarget() != null) && (nearby.getTarget() != player && !player.getServitors().containsKey(nearby.getTarget().getObjectId())))
|
if (player.getAutoPlaySettings().isRespectfulHunting() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
|
||||||
{
|
{
|
||||||
continue TARGET;
|
continue TARGET;
|
||||||
}
|
}
|
||||||
@@ -167,12 +167,8 @@ public class AutoPlayTaskManager
|
|||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void doAutoPlay(PlayerInstance player, boolean pickup, boolean longRange, boolean respectfulHunting)
|
public void doAutoPlay(PlayerInstance player)
|
||||||
{
|
{
|
||||||
player.getAutoPlaySettings().setPickup(pickup);
|
|
||||||
player.getAutoPlaySettings().setLongRange(longRange);
|
|
||||||
player.getAutoPlaySettings().setRespectfulHunting(respectfulHunting);
|
|
||||||
|
|
||||||
if (!PLAYERS.contains(player))
|
if (!PLAYERS.contains(player))
|
||||||
{
|
{
|
||||||
player.onActionRequest();
|
player.onActionRequest();
|
||||||
|
Reference in New Issue
Block a user