chore: handle zealoid prelate stripped rewards (#1515)

Reviewed-on: OpenWF/SpaceNinjaServer#1515
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
Sainan 2025-04-08 03:06:47 -07:00 committed by Sainan
parent 39be095818
commit 327b834b07
2 changed files with 20 additions and 5 deletions

View File

@ -602,10 +602,24 @@ export const addMissionRewards = async (
if (!droptable) {
logger.error(`unknown droptable ${si.DropTable}`);
} else {
for (let i = 0; i != si.DROP_MOD.length; ++i) {
for (const pool of droptable) {
const reward = getRandomReward(pool.items)!;
logger.debug(`stripped droptable rolled`, reward);
const modsPool = droptable[0].items;
const blueprintsPool = (droptable.length > 1 ? droptable[1] : droptable[0]).items;
if (si.DROP_MOD) {
for (let i = 0; i != si.DROP_MOD.length; ++i) {
const reward = getRandomReward(modsPool)!;
logger.debug(`stripped droptable (mods pool) rolled`, reward);
await addItem(inventory, reward.type);
MissionRewards.push({
StoreItem: toStoreItem(reward.type),
ItemCount: 1,
FromEnemyCache: true // to show "identified"
});
}
}
if (si.DROP_BLUEPRINT) {
for (let i = 0; i != si.DROP_BLUEPRINT.length; ++i) {
const reward = getRandomReward(blueprintsPool)!;
logger.debug(`stripped droptable (blueprints pool) rolled`, reward);
await addItem(inventory, reward.type);
MissionRewards.push({
StoreItem: toStoreItem(reward.type),

View File

@ -101,7 +101,8 @@ export type IMissionInventoryUpdateRequest = {
Upgrades?: IUpgradeClient[]; // riven challenge progress
StrippedItems?: {
DropTable: string;
DROP_MOD: number[];
DROP_MOD?: number[];
DROP_BLUEPRINT?: number[];
}[];
DeathMarks?: string[];
Nemesis?: number;