Fixed auto icons disabled when learning skills.

This commit is contained in:
MobiusDevelopment
2021-10-14 21:51:00 +00:00
parent cdbc38c32b
commit 388e9fc7a1
6 changed files with 18 additions and 12 deletions
@@ -14378,9 +14378,10 @@ public class PlayerInstance extends Playable
sendPacket(new ExActivateAutoShortcut(shortcut, true)); sendPacket(new ExActivateAutoShortcut(shortcut, true));
} }
} }
else if (_autoUseSettings.getAutoSupplyItems().contains(shortcut.getId())) else
{ {
if (getInventory().getItemByObjectId(shortcut.getId()) != null) final ItemInstance item = getInventory().getItemByObjectId(shortcut.getId());
if ((item != null) && _autoUseSettings.getAutoSupplyItems().contains(item.getId()))
{ {
sendPacket(new ExActivateAutoShortcut(shortcut, true)); sendPacket(new ExActivateAutoShortcut(shortcut, true));
} }
@@ -14448,9 +14448,10 @@ public class PlayerInstance extends Playable
sendPacket(new ExActivateAutoShortcut(shortcut, true)); sendPacket(new ExActivateAutoShortcut(shortcut, true));
} }
} }
else if (_autoUseSettings.getAutoSupplyItems().contains(shortcut.getId())) else
{ {
if (getInventory().getItemByObjectId(shortcut.getId()) != null) final ItemInstance item = getInventory().getItemByObjectId(shortcut.getId());
if ((item != null) && _autoUseSettings.getAutoSupplyItems().contains(item.getId()))
{ {
sendPacket(new ExActivateAutoShortcut(shortcut, true)); sendPacket(new ExActivateAutoShortcut(shortcut, true));
} }
@@ -14485,9 +14485,10 @@ public class PlayerInstance extends Playable
sendPacket(new ExActivateAutoShortcut(shortcut, true)); sendPacket(new ExActivateAutoShortcut(shortcut, true));
} }
} }
else if (_autoUseSettings.getAutoSupplyItems().contains(shortcut.getId())) else
{ {
if (getInventory().getItemByObjectId(shortcut.getId()) != null) final ItemInstance item = getInventory().getItemByObjectId(shortcut.getId());
if ((item != null) && _autoUseSettings.getAutoSupplyItems().contains(item.getId()))
{ {
sendPacket(new ExActivateAutoShortcut(shortcut, true)); sendPacket(new ExActivateAutoShortcut(shortcut, true));
} }
@@ -14375,9 +14375,10 @@ public class PlayerInstance extends Playable
sendPacket(new ExActivateAutoShortcut(shortcut, true)); sendPacket(new ExActivateAutoShortcut(shortcut, true));
} }
} }
else if (_autoUseSettings.getAutoSupplyItems().contains(shortcut.getId())) else
{ {
if (getInventory().getItemByObjectId(shortcut.getId()) != null) final ItemInstance item = getInventory().getItemByObjectId(shortcut.getId());
if ((item != null) && _autoUseSettings.getAutoSupplyItems().contains(item.getId()))
{ {
sendPacket(new ExActivateAutoShortcut(shortcut, true)); sendPacket(new ExActivateAutoShortcut(shortcut, true));
} }
@@ -14635,9 +14635,10 @@ public class PlayerInstance extends Playable
sendPacket(new ExActivateAutoShortcut(shortcut, true)); sendPacket(new ExActivateAutoShortcut(shortcut, true));
} }
} }
else if (_autoUseSettings.getAutoSupplyItems().contains(shortcut.getId())) else
{ {
if (getInventory().getItemByObjectId(shortcut.getId()) != null) final ItemInstance item = getInventory().getItemByObjectId(shortcut.getId());
if ((item != null) && _autoUseSettings.getAutoSupplyItems().contains(item.getId()))
{ {
sendPacket(new ExActivateAutoShortcut(shortcut, true)); sendPacket(new ExActivateAutoShortcut(shortcut, true));
} }
@@ -14712,9 +14712,10 @@ public class PlayerInstance extends Playable
sendPacket(new ExActivateAutoShortcut(shortcut, true)); sendPacket(new ExActivateAutoShortcut(shortcut, true));
} }
} }
else if (_autoUseSettings.getAutoSupplyItems().contains(shortcut.getId())) else
{ {
if (getInventory().getItemByObjectId(shortcut.getId()) != null) final ItemInstance item = getInventory().getItemByObjectId(shortcut.getId());
if ((item != null) && _autoUseSettings.getAutoSupplyItems().contains(item.getId()))
{ {
sendPacket(new ExActivateAutoShortcut(shortcut, true)); sendPacket(new ExActivateAutoShortcut(shortcut, true));
} }