Decrement cultist amulet uses after each raid by one

This commit is contained in:
Dev 2024-02-12 15:08:08 +00:00
parent e9af6e3868
commit 77baeeee42

View File

@ -193,6 +193,22 @@ export class InraidController
serverPmcProfile = this.performPostRaidActionsWhenDead(postRaidRequest, serverPmcProfile, sessionID); serverPmcProfile = this.performPostRaidActionsWhenDead(postRaidRequest, serverPmcProfile, sessionID);
} }
else
{
// Not dead
// Check for cultist amulet
const amuletOnPlayer = serverPmcProfile.Inventory.items.filter((item) =>
item.slotId.startsWith("SpecialSlot")
).find((item) => item._tpl === "64d0b40fbe2eed70e254e2d4");
if (amuletOnPlayer)
{
// Decrement usages remaing
if (amuletOnPlayer.upd.CultistAmulet.NumberOfUsages > 0)
{
amuletOnPlayer.upd.CultistAmulet.NumberOfUsages--;
}
}
}
const victims = postRaidRequest.profile.Stats.Eft.Victims.filter((x) => const victims = postRaidRequest.profile.Stats.Eft.Victims.filter((x) =>
["sptbear", "sptusec"].includes(x.Role.toLowerCase()) ["sptbear", "sptusec"].includes(x.Role.toLowerCase())