mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-21 11:24:40 +01:00
Equipment and main quest bug fixes
This commit is contained in:
@@ -13,14 +13,27 @@ namespace nksrv.LobbyServer.Msgs.Inventory
|
||||
|
||||
var response = new ResWearEquipmentList();
|
||||
|
||||
// TODO optimize
|
||||
foreach (var item2 in req.IsnList)
|
||||
{
|
||||
var pos = NetUtils.GetItemPos(user, item2);
|
||||
|
||||
// unequip previous items
|
||||
foreach (var item in user.Items.ToArray())
|
||||
{
|
||||
if (item.Position == pos && item.Csn == req.Csn)
|
||||
{
|
||||
item.Csn = 0;
|
||||
item.Position = 0;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in user.Items.ToArray())
|
||||
{
|
||||
if (item2 == item.Isn)
|
||||
{
|
||||
item.Csn = req.Csn;
|
||||
item.Position = NetUtils.GetItemPos(user, item.Isn);
|
||||
item.Position = pos;
|
||||
response.Items.Add(NetUtils.ToNet(item));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user