avoid adding heroic op spell effects (usually have no icon set) with no duration to the spell effects (ends up adding them to the db unnecessarily)

This commit is contained in:
Emagi 2025-06-19 18:53:48 -04:00
parent 62d44c5e0a
commit 108af53730

View File

@ -1114,6 +1114,9 @@ void Entity::AddSpellEffect(LuaSpell* luaspell, int32 override_expire_time){
return;
Spell* spell = luaspell->spell;
if(spell->GetSpellData() && spell->GetSpellData()->icon == 0 && spell->GetSpellData()->duration1 == 0 && spell->GetSpellData()->duration2 == 0)
return;
SpellEffects* old_effect = GetSpellEffect(spell->GetSpellID(), luaspell->caster);
SpellEffects* effect = 0;
if (old_effect){