ExAutoPlaySettingSend proper long range value.
This commit is contained in:
parent
6145503dd6
commit
80f054614c
@ -44,7 +44,7 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
||||
_active = packet.readC() == 1;
|
||||
_pickUp = packet.readC() == 1;
|
||||
_nextTargetMode = packet.readH();
|
||||
_longRange = packet.readC() == 0;
|
||||
_longRange = packet.readC() != 0;
|
||||
_potionPercent = packet.readD();
|
||||
_respectfulHunting = packet.readC() == 1;
|
||||
return true;
|
||||
@ -67,9 +67,13 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
player.getAutoPlaySettings().setPickup(_pickUp);
|
||||
player.getAutoPlaySettings().setLongRange(_longRange);
|
||||
player.getAutoPlaySettings().setRespectfulHunting(_respectfulHunting);
|
||||
|
||||
if (_active)
|
||||
{
|
||||
AutoPlayTaskManager.getInstance().doAutoPlay(player, _pickUp, _longRange, _respectfulHunting);
|
||||
AutoPlayTaskManager.getInstance().doAutoPlay(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -130,7 +130,7 @@ public class AutoPlayTaskManager
|
||||
continue 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;
|
||||
}
|
||||
@ -167,12 +167,8 @@ public class AutoPlayTaskManager
|
||||
}, 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))
|
||||
{
|
||||
player.onActionRequest();
|
||||
|
@ -44,7 +44,7 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
||||
_active = packet.readC() == 1;
|
||||
_pickUp = packet.readC() == 1;
|
||||
_nextTargetMode = packet.readH();
|
||||
_longRange = packet.readC() == 0;
|
||||
_longRange = packet.readC() != 0;
|
||||
_potionPercent = packet.readD();
|
||||
packet.readD(); // 272
|
||||
_respectfulHunting = packet.readC() == 1;
|
||||
@ -68,9 +68,13 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
player.getAutoPlaySettings().setPickup(_pickUp);
|
||||
player.getAutoPlaySettings().setLongRange(_longRange);
|
||||
player.getAutoPlaySettings().setRespectfulHunting(_respectfulHunting);
|
||||
|
||||
if (_active)
|
||||
{
|
||||
AutoPlayTaskManager.getInstance().doAutoPlay(player, _pickUp, _longRange, _respectfulHunting);
|
||||
AutoPlayTaskManager.getInstance().doAutoPlay(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -130,7 +130,7 @@ public class AutoPlayTaskManager
|
||||
continue 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;
|
||||
}
|
||||
@ -167,12 +167,8 @@ public class AutoPlayTaskManager
|
||||
}, 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))
|
||||
{
|
||||
player.onActionRequest();
|
||||
|
@ -44,7 +44,7 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
||||
_active = packet.readC() == 1;
|
||||
_pickUp = packet.readC() == 1;
|
||||
_nextTargetMode = packet.readH();
|
||||
_longRange = packet.readC() == 0;
|
||||
_longRange = packet.readC() != 0;
|
||||
_potionPercent = packet.readD();
|
||||
packet.readD(); // 272
|
||||
_respectfulHunting = packet.readC() == 1;
|
||||
@ -68,9 +68,13 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
player.getAutoPlaySettings().setPickup(_pickUp);
|
||||
player.getAutoPlaySettings().setLongRange(_longRange);
|
||||
player.getAutoPlaySettings().setRespectfulHunting(_respectfulHunting);
|
||||
|
||||
if (_active)
|
||||
{
|
||||
AutoPlayTaskManager.getInstance().doAutoPlay(player, _pickUp, _longRange, _respectfulHunting);
|
||||
AutoPlayTaskManager.getInstance().doAutoPlay(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -130,7 +130,7 @@ public class AutoPlayTaskManager
|
||||
continue 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;
|
||||
}
|
||||
@ -167,12 +167,8 @@ public class AutoPlayTaskManager
|
||||
}, 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))
|
||||
{
|
||||
player.onActionRequest();
|
||||
|
@ -44,7 +44,7 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
||||
_active = packet.readC() == 1;
|
||||
_pickUp = packet.readC() == 1;
|
||||
_nextTargetMode = packet.readH();
|
||||
_longRange = packet.readC() == 0;
|
||||
_longRange = packet.readC() != 0;
|
||||
_potionPercent = packet.readD();
|
||||
_respectfulHunting = packet.readC() == 1;
|
||||
return true;
|
||||
@ -67,9 +67,13 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
player.getAutoPlaySettings().setPickup(_pickUp);
|
||||
player.getAutoPlaySettings().setLongRange(_longRange);
|
||||
player.getAutoPlaySettings().setRespectfulHunting(_respectfulHunting);
|
||||
|
||||
if (_active)
|
||||
{
|
||||
AutoPlayTaskManager.getInstance().doAutoPlay(player, _pickUp, _longRange, _respectfulHunting);
|
||||
AutoPlayTaskManager.getInstance().doAutoPlay(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -130,7 +130,7 @@ public class AutoPlayTaskManager
|
||||
continue 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;
|
||||
}
|
||||
@ -167,12 +167,8 @@ public class AutoPlayTaskManager
|
||||
}, 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))
|
||||
{
|
||||
player.onActionRequest();
|
||||
|
@ -44,7 +44,7 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
||||
_active = packet.readC() == 1;
|
||||
_pickUp = packet.readC() == 1;
|
||||
_nextTargetMode = packet.readH();
|
||||
_longRange = packet.readC() == 0;
|
||||
_longRange = packet.readC() != 0;
|
||||
_potionPercent = packet.readD();
|
||||
packet.readD(); // 272
|
||||
_respectfulHunting = packet.readC() == 1;
|
||||
@ -68,9 +68,13 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
player.getAutoPlaySettings().setPickup(_pickUp);
|
||||
player.getAutoPlaySettings().setLongRange(_longRange);
|
||||
player.getAutoPlaySettings().setRespectfulHunting(_respectfulHunting);
|
||||
|
||||
if (_active)
|
||||
{
|
||||
AutoPlayTaskManager.getInstance().doAutoPlay(player, _pickUp, _longRange, _respectfulHunting);
|
||||
AutoPlayTaskManager.getInstance().doAutoPlay(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -130,7 +130,7 @@ public class AutoPlayTaskManager
|
||||
continue 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;
|
||||
}
|
||||
@ -167,12 +167,8 @@ public class AutoPlayTaskManager
|
||||
}, 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))
|
||||
{
|
||||
player.onActionRequest();
|
||||
|
@ -44,7 +44,7 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
||||
_active = packet.readC() == 1;
|
||||
_pickUp = packet.readC() == 1;
|
||||
_nextTargetMode = packet.readH();
|
||||
_longRange = packet.readC() == 0;
|
||||
_longRange = packet.readC() != 0;
|
||||
_potionPercent = packet.readD();
|
||||
packet.readD(); // 272
|
||||
_respectfulHunting = packet.readC() == 1;
|
||||
@ -68,9 +68,13 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
player.getAutoPlaySettings().setPickup(_pickUp);
|
||||
player.getAutoPlaySettings().setLongRange(_longRange);
|
||||
player.getAutoPlaySettings().setRespectfulHunting(_respectfulHunting);
|
||||
|
||||
if (_active)
|
||||
{
|
||||
AutoPlayTaskManager.getInstance().doAutoPlay(player, _pickUp, _longRange, _respectfulHunting);
|
||||
AutoPlayTaskManager.getInstance().doAutoPlay(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -130,7 +130,7 @@ public class AutoPlayTaskManager
|
||||
continue 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;
|
||||
}
|
||||
@ -167,12 +167,8 @@ public class AutoPlayTaskManager
|
||||
}, 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))
|
||||
{
|
||||
player.onActionRequest();
|
||||
|
Loading…
Reference in New Issue
Block a user