Fixed issue with items being purged for all bots after a single bot had reached an item limit
(cherry picked from commit f834d14928f5ad3a7d22e6f3d4251d731d203857)
This commit is contained in:
parent
134696c7b3
commit
d1e857a408
@ -59,28 +59,39 @@ export class BotLootCacheService
|
|||||||
this.addLootToCache(botRole, isPmc, botJsonTemplate);
|
this.addLootToCache(botRole, isPmc, botJsonTemplate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let result = undefined;
|
||||||
switch (lootType)
|
switch (lootType)
|
||||||
{
|
{
|
||||||
case LootCacheType.SPECIAL:
|
case LootCacheType.SPECIAL:
|
||||||
return this.lootCache[botRole].specialItems;
|
result = this.lootCache[botRole].specialItems;
|
||||||
|
break;
|
||||||
case LootCacheType.BACKPACK:
|
case LootCacheType.BACKPACK:
|
||||||
return this.lootCache[botRole].backpackLoot;
|
result = this.lootCache[botRole].backpackLoot;
|
||||||
|
break;
|
||||||
case LootCacheType.POCKET:
|
case LootCacheType.POCKET:
|
||||||
return this.lootCache[botRole].pocketLoot;
|
result = this.lootCache[botRole].pocketLoot;
|
||||||
|
break;
|
||||||
case LootCacheType.VEST:
|
case LootCacheType.VEST:
|
||||||
return this.lootCache[botRole].vestLoot;
|
result = this.lootCache[botRole].vestLoot;
|
||||||
|
break;
|
||||||
case LootCacheType.SECURE:
|
case LootCacheType.SECURE:
|
||||||
return this.lootCache[botRole].secureLoot;
|
result = this.lootCache[botRole].secureLoot;
|
||||||
|
break;
|
||||||
case LootCacheType.COMBINED:
|
case LootCacheType.COMBINED:
|
||||||
return this.lootCache[botRole].combinedPoolLoot;
|
result = this.lootCache[botRole].combinedPoolLoot;
|
||||||
|
break;
|
||||||
case LootCacheType.HEALING_ITEMS:
|
case LootCacheType.HEALING_ITEMS:
|
||||||
return this.lootCache[botRole].healingItems;
|
result = this.lootCache[botRole].healingItems;
|
||||||
|
break;
|
||||||
case LootCacheType.GRENADE_ITEMS:
|
case LootCacheType.GRENADE_ITEMS:
|
||||||
return this.lootCache[botRole].grenadeItems;
|
result = this.lootCache[botRole].grenadeItems;
|
||||||
|
break;
|
||||||
case LootCacheType.DRUG_ITEMS:
|
case LootCacheType.DRUG_ITEMS:
|
||||||
return this.lootCache[botRole].drugItems;
|
result = this.lootCache[botRole].drugItems;
|
||||||
|
break;
|
||||||
case LootCacheType.STIM_ITEMS:
|
case LootCacheType.STIM_ITEMS:
|
||||||
return this.lootCache[botRole].stimItems;
|
result = this.lootCache[botRole].stimItems;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
this.logger.error(
|
this.logger.error(
|
||||||
this.localisationService.getText("bot-loot_type_not_found", {
|
this.localisationService.getText("bot-loot_type_not_found", {
|
||||||
@ -91,6 +102,8 @@ export class BotLootCacheService
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return this.jsonUtil.clone(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user