[Bug Fix] Numhits now display instantly on cast. (#1826)

This commit is contained in:
KayenEQ 2021-11-25 08:33:39 -05:00 committed by GitHub
parent 9d59b3def4
commit ba427c64ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1458,6 +1458,16 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
if(DeleteChargeFromSlot >= 0)
CastToClient()->DeleteItemInInventory(DeleteChargeFromSlot, 1, true);
//Check if buffs has numhits, then resend packet so it displays the hit count.
if (IsClient() && (spells[spell_id].buff_duration > 0 || spells[spell_id].short_buff_box)) {
for (int i = 0; i < GetMaxTotalSlots(); i++) {
if (buffs[i].spellid == spell_id && buffs[i].hit_number > 0) {
CastToClient()->SendBuffNumHitPacket(buffs[i], i);
break;
}
}
}
//
// at this point the spell has successfully been cast
//