Skip to content

Commit 741b37e

Browse files
committed
Fix Eluna swallowing checkcast and cancast script results.
1 parent db8f48d commit 741b37e

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/server/game/Spells/Auras/SpellAuras.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2511,8 +2511,14 @@ bool Aura::CallScriptCheckProcHandlers(AuraApplication const* aurApp, ProcEventI
25112511
}
25122512
#ifdef ELUNA
25132513
if (GetCaster())
2514+
{
2515+
bool elunaResult = true;
25142516
if (Eluna* e = GetCaster()->GetEluna())
2515-
result = e->OnAuraCanProc(aurApp->GetBase(), eventInfo);
2517+
elunaResult = e->OnAuraCanProc(aurApp->GetBase(), eventInfo);
2518+
2519+
if (!elunaResult)
2520+
result = false;
2521+
}
25162522
#endif
25172523
return result;
25182524
}

src/server/game/Spells/Spell.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8034,8 +8034,11 @@ SpellCastResult Spell::CallScriptCheckCastHandlers()
80348034
(*scritr)->_FinishScriptCall();
80358035
}
80368036
#ifdef ELUNA
8037+
SpellCastResult elunaResult = SPELL_CAST_OK;
80378038
if (Eluna* e = GetCaster()->GetEluna())
8038-
retVal = SpellCastResult(e->OnCheckCast(this));
8039+
elunaResult = SpellCastResult(e->OnCheckCast(this));
8040+
if (elunaResult != SPELL_CAST_OK)
8041+
retVal = elunaResult;
80398042
#endif
80408043
return retVal;
80418044
}

0 commit comments

Comments
 (0)