Added Dehydration
to list of effects we ignore inside transferPostRaidLimbEffectsToProfile()
This commit is contained in:
parent
f9ca76be79
commit
ebe9c0daac
@ -134,6 +134,7 @@ export class HealthHelper {
|
|||||||
*/
|
*/
|
||||||
protected transferPostRaidLimbEffectsToProfile(postRaidBodyParts: BodyPartsHealth, profileData: IPmcData): void {
|
protected transferPostRaidLimbEffectsToProfile(postRaidBodyParts: BodyPartsHealth, profileData: IPmcData): void {
|
||||||
// Iterate over each body part
|
// Iterate over each body part
|
||||||
|
const effectsToIgnore = ["Dehydration", "Exhaustion"];
|
||||||
for (const bodyPartId in postRaidBodyParts) {
|
for (const bodyPartId in postRaidBodyParts) {
|
||||||
// Get effects on body part from profile
|
// Get effects on body part from profile
|
||||||
const bodyPartEffects = postRaidBodyParts[bodyPartId].Effects;
|
const bodyPartEffects = postRaidBodyParts[bodyPartId].Effects;
|
||||||
@ -146,16 +147,16 @@ export class HealthHelper {
|
|||||||
// Effect already exists on limb in server profile, skip
|
// Effect already exists on limb in server profile, skip
|
||||||
const profileBodyPartEffects = profileData.Health.BodyParts[bodyPartId].Effects;
|
const profileBodyPartEffects = profileData.Health.BodyParts[bodyPartId].Effects;
|
||||||
if (profileBodyPartEffects[effect]) {
|
if (profileBodyPartEffects[effect]) {
|
||||||
if (effect === "Exhaustion") {
|
if (effectsToIgnore.includes(effect)) {
|
||||||
// Get rid of existing Exhaustion effect
|
// Get rid of certain effects we dont want to persist out of raid
|
||||||
profileBodyPartEffects[effect] = undefined;
|
profileBodyPartEffects[effect] = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (effect === "Exhaustion") {
|
if (effectsToIgnore.includes(effect)) {
|
||||||
// Do not pass exhaustion to out of raid profile
|
// Do not pass some effects to out of raid profile
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user