Skip to content

Commit

Permalink
Merge pull request #522 from RyanYappert/fix/job-item-consumption
Browse files Browse the repository at this point in the history
Fix: Job item consumption
  • Loading branch information
RyanYappert authored Sep 2, 2024
2 parents e2cbd2a + 5eba9e4 commit bb69387
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Arrowgene.Ddon.GameServer/Handler/ItemUseJobItemsHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ public override void Handle(GameClient client, StructurePacket<C2SItemUseJobItem

foreach (CDataItemUIdList itemUIdListElement in packet.Structure.ItemUIdList)
{
_itemManager.ConsumeItemByUId(Server, client.Character, StorageType.ItemBagJob, itemUIdListElement.UId, itemUIdListElement.Num);
var update = _itemManager.ConsumeItemByUId(Server, client.Character, StorageType.ItemBagJob, itemUIdListElement.UId, itemUIdListElement.Num);
if (update != null)
{
ntc.UpdateItemList.Add(update);
}
else
{
throw new ResponseErrorException(ErrorCode.ERROR_CODE_ITEM_NUM_SHORT);
}
}

client.Send(ntc);
Expand Down

0 comments on commit bb69387

Please sign in to comment.