Added a check to stop Bard song for Mezz/Stun (#1319)

* Added a check to stop Bard song for Mezz/Stun

* Cleaned Song stun / mezz stop

* Update client_process.cpp

* removed bard check & added else where

* code clean up

Co-authored-by: ProducerZekServer <go@away.com>
This commit is contained in:
RoTPvP 2021-04-02 20:44:59 -07:00 committed by GitHub
parent 084b253ff7
commit 050e78b1b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4924,11 +4924,13 @@ void Mob::Stun(int duration)
if(stunned && stunned_timer.GetRemainingTime() > uint32(duration))
return;
if(IsValidSpell(casting_spell_id) && !spells[casting_spell_id].uninterruptable) {
auto spell_id = bardsong ? bardsong : casting_spell_id;
if(IsValidSpell(spell_id) && !spells[spell_id].uninterruptable) {
int persistent_casting = spellbonuses.PersistantCasting + itembonuses.PersistantCasting + aabonuses.PersistantCasting;
if(zone->random.Int(0,99) > persistent_casting)
InterruptSpell();
InterruptSpell(spell_id);
}
if(duration > 0)
@ -4984,9 +4986,11 @@ void Mob::Mesmerize()
{
mezzed = true;
if (casting_spell_id)
InterruptSpell();
auto spell_id = bardsong ? bardsong : casting_spell_id;
if (spell_id)
InterruptSpell(spell_id);
StopNavigation();
}