1.0 compatibility

This commit is contained in:
Ferdinando 2026-09-10 18:05:24 +02:00
commit 6193b3ee2d
33 changed files with 712 additions and 49 deletions

View file

@ -431,6 +431,9 @@ namespace RacesOfValheim
HitData hitData = new HitData();
hitData.m_damage.m_frost = shardDamage;
hitData.SetAttacker(Player.m_localPlayer);
// Before Setup, which is what copies the skill and its amount onto the
// projectile. Same split as the damage budget above, and for the same reason.
SkadiMagicSkill.TagCast(hitData, count);
proj.Setup(Player.m_localPlayer, lookDir * staffDrop.m_itemData.m_shared.m_attack.m_projectileVel, -1f, hitData, staffDrop.m_itemData, null);
}
@ -509,11 +512,15 @@ namespace RacesOfValheim
{
if (Player.m_localPlayer == null) return;
Vector3 center = Player.m_localPlayer.transform.position;
// Once per tick, not once per enemy - see SkadiMagicSkill.RaiseForAuraTick.
bool burnedSomething = false;
foreach (Character c in Character.GetAllCharacters())
{
if (c == Player.m_localPlayer) continue;
if (c.IsTamed() || c.IsPlayer()) continue;
if (Vector3.Distance(center, c.transform.position) <= SkadiConfig.AuraRadius.Value)
{
HitData hit = new HitData();
@ -522,8 +529,11 @@ namespace RacesOfValheim
hit.m_dir = (c.transform.position - center).normalized;
hit.SetAttacker(Player.m_localPlayer);
c.ApplyDamage(hit, true, false);
burnedSomething = true;
}
}
if (burnedSomething) SkadiMagicSkill.RaiseForAuraTick();
}
private void TryTransformWithRules(SkadiProgression.FormRules rules)