Re-enable spellbar and reset Discipline timer when stopping casts in EVENT_CAST_BEGIN (#1891)

This commit is contained in:
Natedog2012
2021-12-19 15:17:04 -06:00
committed by GitHub
parent 898b1ea4d1
commit 85971590c8
+6 -1
View File
@@ -307,7 +307,12 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
std::string export_string = fmt::format("{}", spell_id);
if(IsClient()) {
if (parse->EventPlayer(EVENT_CAST_BEGIN, CastToClient(), export_string, 0) != 0) {
return false;
if (IsDiscipline(spell_id)) {
CastToClient()->SendDisciplineTimer(spells[spell_id].timer_id, 0);
} else {
CastToClient()->SendSpellBarEnable(spell_id);
}
return(false);
}
} else if(IsNPC()) {
parse->EventNPC(EVENT_CAST_BEGIN, CastToNPC(), nullptr, export_string, 0);