[Feature] Allow NPCs to cast Sacrifice (#4470)

* [Feature] Teach npcs how to cast sacrifice

* [Feature] Teach npcs how to cast sacrifice

- Remove the hardcoded limit preventing npcs from casting sacrifice. The
  npc will receive as loot an emerald essence as expected.

* Update client.cpp
* Update client_packet.cpp
* Update spell_effects.cpp

* rename Client::SacrificeCaster to Client::sacrifice_caster_id
This commit is contained in:
fuzzlecutter
2024-09-12 14:42:44 -05:00
committed by GitHub
parent 913c5da70f
commit cc0171dfe1
4 changed files with 17 additions and 13 deletions
+2 -2
View File
@@ -2202,10 +2202,10 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
#ifdef SPELL_EFFECT_SPAM
snprintf(effect_desc, _EDLEN, "Sacrifice");
#endif
if(!caster || !IsClient() || !caster->IsClient()){
if(!caster || !IsClient() ){
break;
}
CastToClient()->SacrificeConfirm(caster->CastToClient());
CastToClient()->SacrificeConfirm(caster);
break;
}