Fix Skadi resetrace, cold spell VFX, and Freezing-to-Cold conversion

- resetrace never cleaned up SE_SkadiStats/SE_SkadiCooldown, so
  Skadi's Aura and its frost buffs stuck around after switching race.
- Cold Spell projectile spawned near the feet (0.4m) and used the
  unarmed kick animation; now spawns at chest height and uses the
  galdr_cast (raised-arms) trigger instead.
- Freezing-to-Cold silently did nothing from tier 1 onward: Skadi's
  passive Frost damage resistance made Valheim's own environmental
  check skip Cold/Freezing entirely before our conversion patch ever
  ran. Added a scoped patch that neutralizes just that environmental
  check for the local Skadi player, plus a guard against Valheim's
  own Cold-removal call flickering the converted status off every
  other frame, plus an explicit cleanup of any real Freezing left
  over from before the conversion kicked in.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
kanym 2026-07-31 13:04:30 +02:00
commit 00b1b4e9ed
3 changed files with 82 additions and 8 deletions

View file

@ -600,6 +600,8 @@ namespace RacesOfValheim
Player.m_localPlayer.GetSEMan().RemoveStatusEffect("SE_FenrirCurse".GetStableHashCode());
Player.m_localPlayer.GetSEMan().RemoveStatusEffect("SE_AswidStats".GetStableHashCode());
Player.m_localPlayer.GetSEMan().RemoveStatusEffect("SE_SkeletonStats".GetStableHashCode());
Player.m_localPlayer.GetSEMan().RemoveStatusEffect("SE_SkadiStats".GetStableHashCode());
Player.m_localPlayer.GetSEMan().RemoveStatusEffect("SE_SkadiCooldown".GetStableHashCode());
ZNetView nview = Player.m_localPlayer.GetComponent<ZNetView>();
if (nview != null && nview.IsValid()) nview.GetZDO().Set("RacesOfValheim_Race", "Human");