Fixed shortcut deletion removing active shortcuts from settings.
This commit is contained in:
parent
2c31230f18
commit
501da02bad
@ -55,10 +55,11 @@ public class RequestShortCutDel implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete the shortcut.
|
// Delete the shortcut.
|
||||||
|
final Shortcut oldShortcut = player.getShortCut(_slot, _page);
|
||||||
player.deleteShortCut(_slot, _page);
|
player.deleteShortCut(_slot, _page);
|
||||||
|
boolean removed = true;
|
||||||
|
|
||||||
// Keep other similar shortcuts activated.
|
// Keep other similar shortcuts activated.
|
||||||
final Shortcut oldShortcut = player.getShortCut(_slot, _page);
|
|
||||||
if ((oldShortcut != null) && oldShortcut.isAutoUse())
|
if ((oldShortcut != null) && oldShortcut.isAutoUse())
|
||||||
{
|
{
|
||||||
player.removeAutoShortcut(_slot, _page);
|
player.removeAutoShortcut(_slot, _page);
|
||||||
@ -67,21 +68,26 @@ public class RequestShortCutDel implements IClientIncomingPacket
|
|||||||
if (oldShortcut.getId() == shortcut.getId())
|
if (oldShortcut.getId() == shortcut.getId())
|
||||||
{
|
{
|
||||||
player.addAutoShortcut(shortcut.getSlot(), shortcut.getPage());
|
player.addAutoShortcut(shortcut.getSlot(), shortcut.getPage());
|
||||||
|
removed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove auto used ids.
|
// Remove auto used ids.
|
||||||
final int id = oldShortcut == null ? -1 : oldShortcut.getId();
|
if (removed)
|
||||||
if (_slot > 263)
|
|
||||||
{
|
{
|
||||||
AutoUseTaskManager.getInstance().removeAutoSupplyItem(player, id);
|
final int id = oldShortcut == null ? -1 : oldShortcut.getId();
|
||||||
}
|
if (_slot > 263)
|
||||||
else
|
{
|
||||||
{
|
AutoUseTaskManager.getInstance().removeAutoSupplyItem(player, id);
|
||||||
AutoUseTaskManager.getInstance().removeAutoBuff(player, id);
|
}
|
||||||
AutoUseTaskManager.getInstance().removeAutoSkill(player, id);
|
else
|
||||||
|
{
|
||||||
|
AutoUseTaskManager.getInstance().removeAutoBuff(player, id);
|
||||||
|
AutoUseTaskManager.getInstance().removeAutoSkill(player, id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
player.restoreAutoShortcutVisual();
|
player.restoreAutoShortcutVisual();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,10 +55,11 @@ public class RequestShortCutDel implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete the shortcut.
|
// Delete the shortcut.
|
||||||
|
final Shortcut oldShortcut = player.getShortCut(_slot, _page);
|
||||||
player.deleteShortCut(_slot, _page);
|
player.deleteShortCut(_slot, _page);
|
||||||
|
boolean removed = true;
|
||||||
|
|
||||||
// Keep other similar shortcuts activated.
|
// Keep other similar shortcuts activated.
|
||||||
final Shortcut oldShortcut = player.getShortCut(_slot, _page);
|
|
||||||
if ((oldShortcut != null) && oldShortcut.isAutoUse())
|
if ((oldShortcut != null) && oldShortcut.isAutoUse())
|
||||||
{
|
{
|
||||||
player.removeAutoShortcut(_slot, _page);
|
player.removeAutoShortcut(_slot, _page);
|
||||||
@ -67,21 +68,26 @@ public class RequestShortCutDel implements IClientIncomingPacket
|
|||||||
if (oldShortcut.getId() == shortcut.getId())
|
if (oldShortcut.getId() == shortcut.getId())
|
||||||
{
|
{
|
||||||
player.addAutoShortcut(shortcut.getSlot(), shortcut.getPage());
|
player.addAutoShortcut(shortcut.getSlot(), shortcut.getPage());
|
||||||
|
removed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove auto used ids.
|
// Remove auto used ids.
|
||||||
final int id = oldShortcut == null ? -1 : oldShortcut.getId();
|
if (removed)
|
||||||
if (_slot > 263)
|
|
||||||
{
|
{
|
||||||
AutoUseTaskManager.getInstance().removeAutoSupplyItem(player, id);
|
final int id = oldShortcut == null ? -1 : oldShortcut.getId();
|
||||||
}
|
if (_slot > 263)
|
||||||
else
|
{
|
||||||
{
|
AutoUseTaskManager.getInstance().removeAutoSupplyItem(player, id);
|
||||||
AutoUseTaskManager.getInstance().removeAutoBuff(player, id);
|
}
|
||||||
AutoUseTaskManager.getInstance().removeAutoSkill(player, id);
|
else
|
||||||
|
{
|
||||||
|
AutoUseTaskManager.getInstance().removeAutoBuff(player, id);
|
||||||
|
AutoUseTaskManager.getInstance().removeAutoSkill(player, id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
player.restoreAutoShortcutVisual();
|
player.restoreAutoShortcutVisual();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,10 +55,11 @@ public class RequestShortCutDel implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete the shortcut.
|
// Delete the shortcut.
|
||||||
|
final Shortcut oldShortcut = player.getShortCut(_slot, _page);
|
||||||
player.deleteShortCut(_slot, _page);
|
player.deleteShortCut(_slot, _page);
|
||||||
|
boolean removed = true;
|
||||||
|
|
||||||
// Keep other similar shortcuts activated.
|
// Keep other similar shortcuts activated.
|
||||||
final Shortcut oldShortcut = player.getShortCut(_slot, _page);
|
|
||||||
if ((oldShortcut != null) && oldShortcut.isAutoUse())
|
if ((oldShortcut != null) && oldShortcut.isAutoUse())
|
||||||
{
|
{
|
||||||
player.removeAutoShortcut(_slot, _page);
|
player.removeAutoShortcut(_slot, _page);
|
||||||
@ -67,21 +68,26 @@ public class RequestShortCutDel implements IClientIncomingPacket
|
|||||||
if (oldShortcut.getId() == shortcut.getId())
|
if (oldShortcut.getId() == shortcut.getId())
|
||||||
{
|
{
|
||||||
player.addAutoShortcut(shortcut.getSlot(), shortcut.getPage());
|
player.addAutoShortcut(shortcut.getSlot(), shortcut.getPage());
|
||||||
|
removed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove auto used ids.
|
// Remove auto used ids.
|
||||||
final int id = oldShortcut == null ? -1 : oldShortcut.getId();
|
if (removed)
|
||||||
if (_slot > 263)
|
|
||||||
{
|
{
|
||||||
AutoUseTaskManager.getInstance().removeAutoSupplyItem(player, id);
|
final int id = oldShortcut == null ? -1 : oldShortcut.getId();
|
||||||
}
|
if (_slot > 263)
|
||||||
else
|
{
|
||||||
{
|
AutoUseTaskManager.getInstance().removeAutoSupplyItem(player, id);
|
||||||
AutoUseTaskManager.getInstance().removeAutoBuff(player, id);
|
}
|
||||||
AutoUseTaskManager.getInstance().removeAutoSkill(player, id);
|
else
|
||||||
|
{
|
||||||
|
AutoUseTaskManager.getInstance().removeAutoBuff(player, id);
|
||||||
|
AutoUseTaskManager.getInstance().removeAutoSkill(player, id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
player.restoreAutoShortcutVisual();
|
player.restoreAutoShortcutVisual();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,10 +55,11 @@ public class RequestShortCutDel implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete the shortcut.
|
// Delete the shortcut.
|
||||||
|
final Shortcut oldShortcut = player.getShortCut(_slot, _page);
|
||||||
player.deleteShortCut(_slot, _page);
|
player.deleteShortCut(_slot, _page);
|
||||||
|
boolean removed = true;
|
||||||
|
|
||||||
// Keep other similar shortcuts activated.
|
// Keep other similar shortcuts activated.
|
||||||
final Shortcut oldShortcut = player.getShortCut(_slot, _page);
|
|
||||||
if ((oldShortcut != null) && oldShortcut.isAutoUse())
|
if ((oldShortcut != null) && oldShortcut.isAutoUse())
|
||||||
{
|
{
|
||||||
player.removeAutoShortcut(_slot, _page);
|
player.removeAutoShortcut(_slot, _page);
|
||||||
@ -67,21 +68,26 @@ public class RequestShortCutDel implements IClientIncomingPacket
|
|||||||
if (oldShortcut.getId() == shortcut.getId())
|
if (oldShortcut.getId() == shortcut.getId())
|
||||||
{
|
{
|
||||||
player.addAutoShortcut(shortcut.getSlot(), shortcut.getPage());
|
player.addAutoShortcut(shortcut.getSlot(), shortcut.getPage());
|
||||||
|
removed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove auto used ids.
|
// Remove auto used ids.
|
||||||
final int id = oldShortcut == null ? -1 : oldShortcut.getId();
|
if (removed)
|
||||||
if (_slot > 263)
|
|
||||||
{
|
{
|
||||||
AutoUseTaskManager.getInstance().removeAutoSupplyItem(player, id);
|
final int id = oldShortcut == null ? -1 : oldShortcut.getId();
|
||||||
}
|
if (_slot > 263)
|
||||||
else
|
{
|
||||||
{
|
AutoUseTaskManager.getInstance().removeAutoSupplyItem(player, id);
|
||||||
AutoUseTaskManager.getInstance().removeAutoBuff(player, id);
|
}
|
||||||
AutoUseTaskManager.getInstance().removeAutoSkill(player, id);
|
else
|
||||||
|
{
|
||||||
|
AutoUseTaskManager.getInstance().removeAutoBuff(player, id);
|
||||||
|
AutoUseTaskManager.getInstance().removeAutoSkill(player, id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
player.restoreAutoShortcutVisual();
|
player.restoreAutoShortcutVisual();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,10 +55,11 @@ public class RequestShortCutDel implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete the shortcut.
|
// Delete the shortcut.
|
||||||
|
final Shortcut oldShortcut = player.getShortCut(_slot, _page);
|
||||||
player.deleteShortCut(_slot, _page);
|
player.deleteShortCut(_slot, _page);
|
||||||
|
boolean removed = true;
|
||||||
|
|
||||||
// Keep other similar shortcuts activated.
|
// Keep other similar shortcuts activated.
|
||||||
final Shortcut oldShortcut = player.getShortCut(_slot, _page);
|
|
||||||
if ((oldShortcut != null) && oldShortcut.isAutoUse())
|
if ((oldShortcut != null) && oldShortcut.isAutoUse())
|
||||||
{
|
{
|
||||||
player.removeAutoShortcut(_slot, _page);
|
player.removeAutoShortcut(_slot, _page);
|
||||||
@ -67,21 +68,26 @@ public class RequestShortCutDel implements IClientIncomingPacket
|
|||||||
if (oldShortcut.getId() == shortcut.getId())
|
if (oldShortcut.getId() == shortcut.getId())
|
||||||
{
|
{
|
||||||
player.addAutoShortcut(shortcut.getSlot(), shortcut.getPage());
|
player.addAutoShortcut(shortcut.getSlot(), shortcut.getPage());
|
||||||
|
removed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove auto used ids.
|
// Remove auto used ids.
|
||||||
final int id = oldShortcut == null ? -1 : oldShortcut.getId();
|
if (removed)
|
||||||
if (_slot > 263)
|
|
||||||
{
|
{
|
||||||
AutoUseTaskManager.getInstance().removeAutoSupplyItem(player, id);
|
final int id = oldShortcut == null ? -1 : oldShortcut.getId();
|
||||||
}
|
if (_slot > 263)
|
||||||
else
|
{
|
||||||
{
|
AutoUseTaskManager.getInstance().removeAutoSupplyItem(player, id);
|
||||||
AutoUseTaskManager.getInstance().removeAutoBuff(player, id);
|
}
|
||||||
AutoUseTaskManager.getInstance().removeAutoSkill(player, id);
|
else
|
||||||
|
{
|
||||||
|
AutoUseTaskManager.getInstance().removeAutoBuff(player, id);
|
||||||
|
AutoUseTaskManager.getInstance().removeAutoSkill(player, id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
player.restoreAutoShortcutVisual();
|
player.restoreAutoShortcutVisual();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,10 +55,11 @@ public class RequestShortCutDel implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete the shortcut.
|
// Delete the shortcut.
|
||||||
|
final Shortcut oldShortcut = player.getShortCut(_slot, _page);
|
||||||
player.deleteShortCut(_slot, _page);
|
player.deleteShortCut(_slot, _page);
|
||||||
|
boolean removed = true;
|
||||||
|
|
||||||
// Keep other similar shortcuts activated.
|
// Keep other similar shortcuts activated.
|
||||||
final Shortcut oldShortcut = player.getShortCut(_slot, _page);
|
|
||||||
if ((oldShortcut != null) && oldShortcut.isAutoUse())
|
if ((oldShortcut != null) && oldShortcut.isAutoUse())
|
||||||
{
|
{
|
||||||
player.removeAutoShortcut(_slot, _page);
|
player.removeAutoShortcut(_slot, _page);
|
||||||
@ -67,21 +68,26 @@ public class RequestShortCutDel implements IClientIncomingPacket
|
|||||||
if (oldShortcut.getId() == shortcut.getId())
|
if (oldShortcut.getId() == shortcut.getId())
|
||||||
{
|
{
|
||||||
player.addAutoShortcut(shortcut.getSlot(), shortcut.getPage());
|
player.addAutoShortcut(shortcut.getSlot(), shortcut.getPage());
|
||||||
|
removed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove auto used ids.
|
// Remove auto used ids.
|
||||||
final int id = oldShortcut == null ? -1 : oldShortcut.getId();
|
if (removed)
|
||||||
if (_slot > 263)
|
|
||||||
{
|
{
|
||||||
AutoUseTaskManager.getInstance().removeAutoSupplyItem(player, id);
|
final int id = oldShortcut == null ? -1 : oldShortcut.getId();
|
||||||
}
|
if (_slot > 263)
|
||||||
else
|
{
|
||||||
{
|
AutoUseTaskManager.getInstance().removeAutoSupplyItem(player, id);
|
||||||
AutoUseTaskManager.getInstance().removeAutoBuff(player, id);
|
}
|
||||||
AutoUseTaskManager.getInstance().removeAutoSkill(player, id);
|
else
|
||||||
|
{
|
||||||
|
AutoUseTaskManager.getInstance().removeAutoBuff(player, id);
|
||||||
|
AutoUseTaskManager.getInstance().removeAutoSkill(player, id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
player.restoreAutoShortcutVisual();
|
player.restoreAutoShortcutVisual();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user