Browse Source

Poweraction refactor work

feature-config-usage
MagicBot 2 months ago
parent
commit
1e09930bdb
  1. 10
      src/engine/powers/poweractions/SetItemFlagPowerAction.java

10
src/engine/powers/poweractions/SetItemFlagPowerAction.java

@ -18,15 +18,15 @@ import engine.objects.CharacterItemManager;
import engine.objects.Item; import engine.objects.Item;
import engine.powers.ActionsBase; import engine.powers.ActionsBase;
import engine.powers.PowersBase; import engine.powers.PowersBase;
import engine.wpak.data.PowerAction;
import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
public class SetItemFlagPowerAction extends AbstractPowerAction { public class SetItemFlagPowerAction extends AbstractPowerAction {
public SetItemFlagPowerAction(ResultSet rs) throws SQLException { public SetItemFlagPowerAction(PowerAction powerAction) throws SQLException {
super(rs); super(powerAction);
} }
@Override @Override
@ -43,11 +43,11 @@ public class SetItemFlagPowerAction extends AbstractPowerAction {
//until this is shown to do something else, just use it as item identify spell. //until this is shown to do something else, just use it as item identify spell.
item.flags.add(mbEnums.ItemFlags.Identified); item.flags.add(mbEnums.ItemFlags.Identified);
;
//update failed, reset
if (!DbManager.ItemQueries.UPDATE_FLAGS(item)) if (!DbManager.ItemQueries.UPDATE_FLAGS(item))
item.flags.remove(mbEnums.ItemFlags.Identified); item.flags.remove(mbEnums.ItemFlags.Identified);
; //update failed, reset
//update inventory //update inventory
CharacterItemManager cim = source.charItemManager; CharacterItemManager cim = source.charItemManager;

Loading…
Cancel
Save