warvulture
This commit is contained in:
parent
70bb263609
commit
4559e0b9e1
14 changed files with 455 additions and 48 deletions
|
|
@ -167,11 +167,24 @@ namespace RacesOfValheim
|
|||
// Update the stats SE
|
||||
if (skadiCurseSE != null)
|
||||
{
|
||||
int auraHash = skadiCurseSE.name.GetStableHashCode();
|
||||
SEMan seman = Player.m_localPlayer.GetSEMan();
|
||||
|
||||
skadiCurseSE.UpdateStats(rules);
|
||||
if (!Player.m_localPlayer.GetSEMan().HaveStatusEffect(skadiCurseSE.name.GetStableHashCode()))
|
||||
if (!seman.HaveStatusEffect(auraHash))
|
||||
{
|
||||
Player.m_localPlayer.GetSEMan().AddStatusEffect(skadiCurseSE.name.GetStableHashCode(), true);
|
||||
seman.AddStatusEffect(auraHash, true);
|
||||
}
|
||||
|
||||
// SEMan.AddStatusEffect stores a Clone() of the prototype, so updating
|
||||
// skadiCurseSE alone only changed the copy that gets stamped out at the next add:
|
||||
// the aura already running on the player kept whatever tier it was born with.
|
||||
// Beating a boss mid-session left the old frost modifier and eitr regen in place
|
||||
// until the effect was re-added (race reselection or a relog) - most visibly at
|
||||
// the Queen, where Immune never replaced Resistant. Refresh the live one as well;
|
||||
// UpdateStats is a no-op unless the tier actually moved a value.
|
||||
SE_SkadiStats liveAura = seman.GetStatusEffect(auraHash) as SE_SkadiStats;
|
||||
if (liveAura != null) liveAura.UpdateStats(rules);
|
||||
}
|
||||
|
||||
if (rules.FrostAura)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue