feat: Fixes beneficial notoriety checks and adds better young restrictions/messaging (#2000)

This commit is contained in:
Kamron Batman 2025-01-20 11:27:19 -08:00 • committed by GitHub
parent 64e32a817d
commit 84d9383294
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 78 additions and 96 deletions

View file

@ -831,6 +831,12 @@ namespace Server.Spells
return false;
}
if ((Caster as PlayerMobile)?.Young == true && (target as PlayerMobile)?.Young == false)
{
Caster.SendLocalizedMessage(500278); // As a young player, you may not cast beneficial spells onto older players.
return false;
}
if (Caster.CanBeBeneficial(target, true, allowDead) && CheckSequence())
{
Caster.DoBeneficial(target);