mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-03 02:53:48 +00:00
Eluna implementation (#847)
* azerothcore + eluna done. * Remove the Eluna single thread limit. * Read Eluna Settings file. * submodule change. * fix(test) Ubuntu - Cant Link Library after Compile * The ELUNA is disabled by default. * remove submodule luaEngine. * some change * fix a error * change cmake * fix: some onplayerchat does not have hooks. * Eluna: Add BG event Hooks. * fix:cmake hook AFTER_LOAD_CONF not work. * Remove the eluna switch. * Remove some define in the core. * fix conf file not read in the linux. * eluna : change bg hook parameter type * Remove TC log function call * change bg hook OnBGEnd parameter type. Note: to enable Eluna, the module is required
This commit is contained in:
@@ -28,6 +28,9 @@
|
||||
#include "Pet.h"
|
||||
#include "ReputationMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#ifdef ELUNA
|
||||
#include "LuaEngine.h"
|
||||
#endif
|
||||
|
||||
class Aura;
|
||||
//
|
||||
@@ -6023,6 +6026,11 @@ void AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick(Unit* target, Unit*
|
||||
}
|
||||
}
|
||||
else {
|
||||
#ifdef ELUNA
|
||||
Creature* c = target->ToCreature();
|
||||
if (c && caster && !sEluna->OnDummyEffect(caster, GetId(), SpellEffIndex(GetEffIndex()), target->ToCreature()))
|
||||
return;
|
||||
#endif
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell %u has non-existent spell %u in EffectTriggered[%d] and is therefor not triggered.", GetId(), triggerSpellId, GetEffIndex());
|
||||
#endif
|
||||
|
||||
@@ -57,6 +57,9 @@
|
||||
#include "InstanceScript.h"
|
||||
#include "ReputationMgr.h"
|
||||
#include "Transport.h"
|
||||
#ifdef ELUNA
|
||||
#include "LuaEngine.h"
|
||||
#endif
|
||||
|
||||
pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
|
||||
{
|
||||
@@ -773,6 +776,14 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell ScriptStart spellid %u in EffectDummy(%u)", m_spellInfo->Id, effIndex);
|
||||
#endif
|
||||
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);
|
||||
else if (unitTarget && unitTarget->GetTypeId() == TYPEID_UNIT)
|
||||
sEluna->OnDummyEffect(m_caster, m_spellInfo->Id, effIndex, unitTarget->ToCreature());
|
||||
else if (itemTarget)
|
||||
sEluna->OnDummyEffect(m_caster, m_spellInfo->Id, effIndex, itemTarget);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
|
||||
|
||||
Reference in New Issue
Block a user