mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 01:23:47 +00:00
feat(Core/Modules): add separated lib for modules (#9281)
This commit is contained in:
@@ -40,10 +40,6 @@
|
||||
#include "Vehicle.h"
|
||||
#include "WorldPacket.h"
|
||||
|
||||
#ifdef ELUNA
|
||||
#include "LuaEngine.h"
|
||||
#endif
|
||||
|
||||
class Aura;
|
||||
//
|
||||
// EFFECT HANDLER NOTES
|
||||
@@ -6231,11 +6227,12 @@ void AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick(Unit* target, Unit*
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef ELUNA
|
||||
Creature* c = target->ToCreature();
|
||||
if (c && caster)
|
||||
sEluna->OnDummyEffect(caster, GetId(), SpellEffIndex(GetEffIndex()), target->ToCreature());
|
||||
#endif
|
||||
{
|
||||
sScriptMgr->OnDummyEffect(caster, GetId(), SpellEffIndex(GetEffIndex()), target->ToCreature());
|
||||
}
|
||||
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell %u has non-existent spell %u in EffectTriggered[%d] and is therefor not triggered.", GetId(), triggerSpellId, GetEffIndex());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,11 +15,6 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef ELUNA
|
||||
#include "ElunaUtility.h"
|
||||
#include "LuaEngine.h"
|
||||
#endif
|
||||
|
||||
#include "Spell.h"
|
||||
#include "ArenaSpectator.h"
|
||||
#include "BattlefieldMgr.h"
|
||||
@@ -3586,9 +3581,7 @@ void Spell::_cast(bool skipCheck)
|
||||
{
|
||||
// now that we've done the basic check, now run the scripts
|
||||
// should be done before the spell is actually executed
|
||||
#ifdef ELUNA
|
||||
sEluna->OnSpellCast(playerCaster, this, skipCheck);
|
||||
#endif
|
||||
sScriptMgr->OnPlayerSpellCast(playerCaster, this, skipCheck);
|
||||
|
||||
// As of 3.0.2 pets begin attacking their owner's target immediately
|
||||
// Let any pets know we've attacked something. Check DmgClass for harmful spells only
|
||||
|
||||
@@ -62,10 +62,6 @@
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
#ifdef ELUNA
|
||||
#include "LuaEngine.h"
|
||||
#endif
|
||||
|
||||
pEffect SpellEffects[TOTAL_SPELL_EFFECTS] =
|
||||
{
|
||||
&Spell::EffectNULL, // 0
|
||||
@@ -788,14 +784,19 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
// normal DB scripted effect
|
||||
LOG_DEBUG("spells.aura", "Spell ScriptStart spellid %u in EffectDummy(%u)", m_spellInfo->Id, effIndex);
|
||||
m_caster->GetMap()->ScriptsStart(sSpellScripts, uint32(m_spellInfo->Id | (effIndex << 24)), m_caster, unitTarget);
|
||||
#ifdef ELUNA
|
||||
|
||||
if (gameObjTarget)
|
||||
sEluna->OnDummyEffect(m_caster, m_spellInfo->Id, effIndex, gameObjTarget);
|
||||
{
|
||||
sScriptMgr->OnDummyEffect(m_caster, m_spellInfo->Id, effIndex, gameObjTarget);
|
||||
}
|
||||
else if (unitTarget && unitTarget->GetTypeId() == TYPEID_UNIT)
|
||||
sEluna->OnDummyEffect(m_caster, m_spellInfo->Id, effIndex, unitTarget->ToCreature());
|
||||
{
|
||||
sScriptMgr->OnDummyEffect(m_caster, m_spellInfo->Id, effIndex, unitTarget->ToCreature());
|
||||
}
|
||||
else if (itemTarget)
|
||||
sEluna->OnDummyEffect(m_caster, m_spellInfo->Id, effIndex, itemTarget);
|
||||
#endif
|
||||
{
|
||||
sScriptMgr->OnDummyEffect(m_caster, m_spellInfo->Id, effIndex, itemTarget);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
|
||||
|
||||
Reference in New Issue
Block a user