[Bug Fix] Restore missing messages for lifetap and dmg spells. (#2057)

* [Bug Fix] Restore missing messages for lifetap and dmg spells.

* Fix unintended duplicate message for DD on clients.

* Improve performance and accuracy of IsDamageSpell()
This commit is contained in:
Paul Coene
2022-04-13 23:11:26 -04:00
committed by GitHub
parent a6814d46de
commit ee54a7eb5f
2 changed files with 21 additions and 13 deletions
+5 -3
View File
@@ -139,11 +139,13 @@ bool IsEvacSpell(uint16 spellid)
bool IsDamageSpell(uint16 spellid)
{
if (spells[spellid].target_type == ST_Tap)
return false;
for (int o = 0; o < EFFECT_COUNT; o++) {
uint32 tid = spells[spellid].effect_id[o];
if ((tid == SE_CurrentHPOnce || tid == SE_CurrentHP) &&
spells[spellid].target_type != ST_Tap && spells[spellid].buff_duration < 1 &&
spells[spellid].base_value[o] < 0)
if (spells[spellid].base_value[o] < 0 &&
((tid == SE_CurrentHPOnce) || (tid == SE_CurrentHP && spells[spellid].buff_duration < 1)))
return true;
}