Fix for numhits counter not working where buffslot was 0 in some situations.

This commit is contained in:
KayenEQ 2014-11-23 22:06:15 -05:00
parent 5c0fbac7b0
commit 3ca282abfa
3 changed files with 5 additions and 5 deletions

View File

@ -3059,7 +3059,7 @@ void Mob::TriggerOnCast(uint32 focus_spell, uint32 spell_id, bool aa_trigger)
if(IsValidSpell(trigger_spell_id) && GetTarget()){
SpellFinished(trigger_spell_id, GetTarget(),10, 0, -1, spells[trigger_spell_id].ResistDiff);
CheckNumHitsRemaining(NUMHIT_MatchingSpells,0, focus_spell);
CheckNumHitsRemaining(NUMHIT_MatchingSpells,-1, focus_spell);
}
}
}
@ -3396,7 +3396,7 @@ void Mob::TrySympatheticProc(Mob *target, uint32 spell_id)
SpellFinished(focus_trigger, target, 10, 0, -1, spells[focus_trigger].ResistDiff);
}
CheckNumHitsRemaining(NUMHIT_MatchingSpells, 0, focus_spell);
CheckNumHitsRemaining(NUMHIT_MatchingSpells, -1, focus_spell);
}
}

View File

@ -275,7 +275,7 @@ public:
int16 GetBuffSlotFromType(uint16 type);
uint16 GetSpellIDFromSlot(uint8 slot);
int CountDispellableBuffs();
void CheckNumHitsRemaining(uint8 type, uint32 buff_slot=0, uint16 spell_id=SPELL_UNKNOWN);
void CheckNumHitsRemaining(uint8 type, uint32 buff_slot=-1, uint16 spell_id=SPELL_UNKNOWN);
bool HasNumhits() const { return has_numhits; }
inline void Numhits(bool val) { has_numhits = val; }
bool HasMGB() const { return has_MGB; }

View File

@ -5586,8 +5586,8 @@ void Mob::CheckNumHitsRemaining(uint8 type, uint32 buff_slot, uint16 spell_id)
}
}
}
} else if (type == 7) {
if (buff_slot > 0) {
} else if (type == NUMHIT_MatchingSpells) {
if (buff_slot >= 0) {
if (--buffs[buff_slot].numhits == 0) {
CastOnNumHitFade(buffs[buff_slot].spellid);
if (!TryFadeEffect(buff_slot))