forked from PGR/ascnet
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 class EquipLevelUpRequest
|
||||||
{
|
{
|
||||||
public int EquipId;
|
public int EquipId;
|
||||||
public Dictionary<int, int> UseItems;
|
public Dictionary<int, int>? UseItems;
|
||||||
public List<int> UseEquipIdList;
|
public List<int>? UseEquipIdList;
|
||||||
}
|
}
|
||||||
|
|
||||||
[MessagePackObject(true)]
|
[MessagePackObject(true)]
|
||||||
|
@ -109,7 +109,7 @@ namespace AscNet.GameServer.Handlers
|
||||||
NotifyItemDataList notifyItemData = new();
|
NotifyItemDataList notifyItemData = new();
|
||||||
int totalExp = 0;
|
int totalExp = 0;
|
||||||
int totalCost = 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);
|
ItemTable? itemTable = TableReaderV2.Parse<ItemTable>().FirstOrDefault(x => x.Id == item.Key);
|
||||||
if (itemTable is not null)
|
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));
|
notifyItemData.ItemDataList.Add(session.inventory.Do(Inventory.Coin, totalCost * -1));
|
||||||
session.SendPush(notifyItemData);
|
session.SendPush(notifyItemData);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue