mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-12 15:30:44 -05:00
Fixed cultist circle returning direct weapon/armor rewards without mods
This commit is contained in:
parent
d2b7baa8b6
commit
83a3fb16fe
@ -437,11 +437,34 @@ export class CircleOfCultistService {
|
||||
}
|
||||
|
||||
// Loop because these can include multiple rewards
|
||||
for (const reward of directReward.reward) {
|
||||
const stackSize = this.getDirectRewardBaseTypeStackSize(reward);
|
||||
for (const rewardTpl of directReward.reward) {
|
||||
// Is weapon/armor, handle differently
|
||||
if (
|
||||
this.itemHelper.armorItemHasRemovableOrSoftInsertSlots(rewardTpl) ||
|
||||
this.itemHelper.isOfBaseclass(rewardTpl, BaseClasses.WEAPON)
|
||||
) {
|
||||
const defaultPreset = this.presetHelper.getDefaultPreset(rewardTpl);
|
||||
if (!defaultPreset) {
|
||||
this.logger.warning(`Reward tpl: ${rewardTpl} lacks a default preset, skipping reward`);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Ensure preset has unique ids and is cloned so we don't alter the preset data stored in memory
|
||||
const presetAndMods: IItem[] = this.itemHelper.replaceIDs(defaultPreset._items);
|
||||
|
||||
this.itemHelper.remapRootItemId(presetAndMods);
|
||||
|
||||
rewards.push(presetAndMods);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// 'Normal' item, non-preset
|
||||
const stackSize = this.getDirectRewardBaseTypeStackSize(rewardTpl);
|
||||
const rewardItem: IItem = {
|
||||
_id: this.hashUtil.generate(),
|
||||
_tpl: reward,
|
||||
_tpl: rewardTpl,
|
||||
parentId: cultistCircleStashId,
|
||||
slotId: CircleOfCultistService.circleOfCultistSlotId,
|
||||
upd: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user