Merge branch 'master' of https://gitnext.lewd.wtf/PGR/ascnet
This commit is contained in:
commit
7458f40e4c
|
@ -85,8 +85,8 @@ namespace AscNet.GameServer.Handlers
|
|||
public class EquipLevelUpRequest
|
||||
{
|
||||
public int EquipId;
|
||||
public Dictionary<int, int> UseItems;
|
||||
public List<int> UseEquipIdList;
|
||||
public Dictionary<int, int>? UseItems;
|
||||
public List<int>? UseEquipIdList;
|
||||
}
|
||||
|
||||
[MessagePackObject(true)]
|
||||
|
@ -109,7 +109,7 @@ namespace AscNet.GameServer.Handlers
|
|||
NotifyItemDataList notifyItemData = new();
|
||||
int totalExp = 0;
|
||||
int totalCost = 0;
|
||||
foreach (var item in request.UseItems)
|
||||
foreach (var item in request.UseItems ?? [])
|
||||
{
|
||||
ItemTable? itemTable = TableReaderV2.Parse<ItemTable>().FirstOrDefault(x => x.Id == item.Key);
|
||||
if (itemTable is not null)
|
||||
|
@ -121,6 +121,12 @@ namespace AscNet.GameServer.Handlers
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Handle equip enchantment with equip cost
|
||||
/*foreach (var costEquipId in request.UseEquipIdList ?? [])
|
||||
{
|
||||
|
||||
}*/
|
||||
|
||||
notifyItemData.ItemDataList.Add(session.inventory.Do(Inventory.Coin, totalCost * -1));
|
||||
session.SendPush(notifyItemData);
|
||||
|
||||
|
|
Loading…
Reference in New Issue