private void RemoveItem() { Byte itemId = (Byte)_v.Command.HitRate; if (ff9item.FF9Item_GetCount(itemId) == 0) { UiState.SetBattleFollowFormatMessage(BattleMesages.CouldNotStealAnything); } else { BattleItem.RemoveFromInventory(itemId); UiState.SetBattleFollowFormatMessage(BattleMesages.WasStolen, FF9TextTool.ItemName(itemId)); } }
public void Perform() { if (!_v.CheckHasCommandItem()) { return; } Byte itemId = _v.Command.Power; BattleItem item = BattleItem.Find(itemId); Byte itemScript = item.ScriptId; MutableBattleCommand itemCommand = new MutableBattleCommand(); itemCommand.Id = BattleCommandId.Item; itemCommand.AbilityId = BattleAbilityId.Void; itemCommand.LoadAbility(); itemCommand.AbilityId = (BattleAbilityId)itemId; SBattleCalculator.Calc(_v.Caster, _v.Target, itemCommand, itemScript); BattleItem.RemoveFromInventory(itemId); }