mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-07 00:38:46 +00:00
Stop EquipEventHandler breaking the chain when equipping was successful.
This commit is contained in:
@@ -32,6 +32,7 @@ public final class EquipEventHandler extends EventHandler<ItemOptionEvent> {
|
|||||||
EquipmentDefinition definition = EquipmentDefinition.lookup(equippingId);
|
EquipmentDefinition definition = EquipmentDefinition.lookup(equippingId);
|
||||||
|
|
||||||
if (definition == null) {
|
if (definition == null) {
|
||||||
|
// We don't break the chain here or any item option events won't work!
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +60,6 @@ public final class EquipEventHandler extends EventHandler<ItemOptionEvent> {
|
|||||||
&& (currentlyEquipped == null || currentlyEquipped.getId() == equippingId)) {
|
&& (currentlyEquipped == null || currentlyEquipped.getId() == equippingId)) {
|
||||||
equipment.set(definition.getSlot(), equipping);
|
equipment.set(definition.getSlot(), equipping);
|
||||||
inventory.reset(inventorySlot);
|
inventory.reset(inventorySlot);
|
||||||
ctx.breakHandlerChain();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,7 +94,6 @@ public final class EquipEventHandler extends EventHandler<ItemOptionEvent> {
|
|||||||
if (previous != null) {
|
if (previous != null) {
|
||||||
inventory.add(previous);
|
inventory.add(previous);
|
||||||
}
|
}
|
||||||
ctx.breakHandlerChain();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user