mirror of
https://github.com/MikuLeaks/MikuSB.git
synced 2026-06-04 13:23:58 +00:00
logistic index
This commit is contained in:
@@ -25,7 +25,8 @@ public class SupporterCard_Equip : ICallGSHandler
|
||||
return;
|
||||
}
|
||||
|
||||
var slot = (uint)req.EqSlot;
|
||||
var teamIndex = card.SupportTeamIndex;
|
||||
var slot = GetTeamIndex((uint)req.EqSlot, teamIndex);
|
||||
|
||||
// If an existing card is equipped in this slot and bForce is false, ask for confirmation
|
||||
if (!req.Force && req.CurrentEquippedUid != 0 && card.SupportSlots.TryGetValue(slot, out var existing) && existing != 0)
|
||||
@@ -46,6 +47,14 @@ public class SupporterCard_Equip : ICallGSHandler
|
||||
var responseApi = string.IsNullOrEmpty(req.Model) ? "Logistics_Change" : "Logistics_Equip";
|
||||
await CallGSRouter.SendScript(connection, responseApi, "{}", sync);
|
||||
}
|
||||
|
||||
private uint GetTeamIndex(uint slot, uint teamIndex)
|
||||
{
|
||||
if (teamIndex == 1) return slot;
|
||||
if (teamIndex == 2) return slot + 7;
|
||||
if (teamIndex == 3) return slot + 10;
|
||||
return slot;
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class SupporterCardEquipParam
|
||||
|
||||
Reference in New Issue
Block a user