Skip to content

Commit 3ef3e7b

Browse files
committed
Fix OnEffectLaunch not using preventDefault variable.
Remove eluna info key destruction from ElunaInfo::~ElunaInfo()
1 parent cb5b239 commit 3ef3e7b

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

ElunaMgr.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ void ElunaMgr::Destroy(ElunaInfo const& info)
5757

5858
ElunaInfo::~ElunaInfo()
5959
{
60-
if (IsValid() && sElunaMgr)
61-
sElunaMgr->Destroy(key);
6260
}
6361

6462
bool ElunaInfo::IsValid() const

hooks/SpellHooks.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,11 @@ void Eluna::OnDestinationTargetSelect(Spell* pSpell, uint8 effIndex, SpellDestin
211211

212212
bool Eluna::OnEffectLaunch(Spell* pSpell, uint8 effIndex, uint8 mode, bool preventDefault)
213213
{
214-
START_HOOK_WITH_RETVAL(SPELL_EVENT_ON_EFFECT_LAUNCH, pSpell, false);
214+
START_HOOK_WITH_RETVAL(SPELL_EVENT_ON_EFFECT_LAUNCH, pSpell, preventDefault);
215215
HookPush(pSpell);
216216
HookPush(effIndex);
217217
HookPush(mode);
218-
return CallAllFunctionsBool(binding, key, false);
218+
return CallAllFunctionsBool(binding, key, preventDefault);
219219
}
220220

221221
bool Eluna::OnEffectLaunchTarget(Spell* pSpell, uint8 effIndex, uint8 mode, bool preventDefault)

0 commit comments

Comments
 (0)