Browse Source

Consumable items are item_power_grant for their lookup

combat-2
MagicBot 8 months ago
parent
commit
8414b0f4cf
  1. 4
      src/engine/net/client/handlers/ObjectActionMsgHandler.java

4
src/engine/net/client/handlers/ObjectActionMsgHandler.java

@ -275,9 +275,9 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler { @@ -275,9 +275,9 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
}
if (waterbucketBypass == false) {
String powerString = item.template.item_power_action.keySet().iterator().next();
String powerString = item.template.item_power_grant.keySet().iterator().next();
PowersBase powerAction = PowersManager.powersBaseByIDString.get(powerString);
int powerValue = item.template.item_power_action.get(powerString)[0];
int powerValue = item.template.item_power_grant.get(powerString);
PowersManager.applyPower(player, target, Vector3fImmutable.ZERO, powerAction.getToken(), powerValue, true);
}
itemMan.consume(item);

Loading…
Cancel
Save