Push discpline messages under melee->disciplines (#3987)

* Push discpline messages under melee->disciplines

* Added safe_delete()

* Remove fryguy's new message code and fix existing instead
This commit is contained in:
Paul Coene 2024-01-19 08:55:26 -05:00 committed by GitHub
parent 748e37dbdf
commit 86705000b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 7 deletions

View File

@ -4435,9 +4435,12 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
// If an "innate" spell, change to spell type to
// produce a spell message. Send to everyone.
// This fixes issues with npc-procs like 1002 and 918 which
// need to spit out extra spell color.
if (IsValidSpell(spell_id) && skill_used == EQ::skills::SkillTigerClaw) {
// This fixes issues with npc-procs like 1002 and 918 and
// damage based disciplines which need to spit out extra spell color.
if (IsValidSpell(spell_id) &&
(skill_used == EQ::skills::SkillTigerClaw ||
(IsDamageSpell(spell_id) && IsDiscipline(spell_id)))
) {
a->type = DamageTypeSpell;
entity_list.QueueCloseClients(
this, /* Sender */

View File

@ -3805,10 +3805,6 @@ bool Mob::SpellOnTarget(
LogSpells("Casting spell [{}] on [{}] with effective caster level [{}]", spell_id, spelltar->GetName(), caster_level);
if (IsOfClientBotMerc() && (IsDiscipline(spell_id) || spells[spell_id].is_discipline)) {
entity_list.MessageClose(this, false, 200, 0, fmt::format("{}{}", spelltar->GetCleanName(), spells[spell_id].cast_on_other).c_str());
}
// Actual cast action - this causes the caster animation and the particles
// around the target
// we do this first, that way we get the particles even if the spell