[Quest API] Add EVENT_CHARM_START and EVENT_CHARM_END (#5013)

This commit is contained in:
Alex King
2025-09-15 09:14:46 -04:00
committed by GitHub
parent dcaa0ecdaa
commit 6506ad5b51
7 changed files with 56 additions and 55 deletions
+6 -8
View File
@@ -835,12 +835,11 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
SendAppearancePacket(AppearanceType::Pet, caster->GetID(), true, true);
}
if (IsClient())
{
if (IsClient()) {
CastToClient()->AI_Start();
} else if(IsNPC()) {
CastToNPC()->SetPetSpellID(0); //not a pet spell.
CastToNPC()->ModifyStatsOnCharm(false);
} else if (IsNPC()) {
CastToNPC()->SetPetSpellID(0); //not a pet spell.
CastToNPC()->ModifyStatsOnCharm(false, caster);
}
bool bBreak = false;
@@ -4418,10 +4417,9 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
case SpellEffect::Charm:
{
if(IsNPC())
{
if (IsNPC()) {
CastToNPC()->RestoreGuardSpotCharm();
CastToNPC()->ModifyStatsOnCharm(true);
CastToNPC()->ModifyStatsOnCharm(true, GetOwner());
}
SendAppearancePacket(AppearanceType::Pet, 0, true, true);