mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
feat(Core/Modules): add separated lib for modules (#9281)
This commit is contained in:
@@ -70,11 +70,6 @@
|
||||
#include "WorldSession.h"
|
||||
#include <math.h>
|
||||
|
||||
#ifdef ELUNA
|
||||
#include "ElunaEventMgr.h"
|
||||
#include "LuaEngine.h"
|
||||
#endif
|
||||
|
||||
float baseMoveSpeed[MAX_MOVE_TYPE] =
|
||||
{
|
||||
2.5f, // MOVE_WALK
|
||||
@@ -387,9 +382,8 @@ Unit::~Unit()
|
||||
|
||||
void Unit::Update(uint32 p_time)
|
||||
{
|
||||
#ifdef ELUNA
|
||||
elunaEvents->Update(p_time);
|
||||
#endif
|
||||
sScriptMgr->OnUnitUpdate(this, p_time);
|
||||
|
||||
// WARNING! Order of execution here is important, do not change.
|
||||
// Spells must be processed with event system BEFORE they go to _UpdateSpells.
|
||||
// Or else we may have some SPELL_STATE_FINISHED spells stalled in pointers, that is bad.
|
||||
@@ -12991,10 +12985,11 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy, uint32 duration)
|
||||
|
||||
controlled->SetInCombatState(PvP, enemy, duration);
|
||||
}
|
||||
#ifdef ELUNA
|
||||
|
||||
if (Player* player = this->ToPlayer())
|
||||
sEluna->OnPlayerEnterCombat(player, enemy);
|
||||
#endif
|
||||
{
|
||||
sScriptMgr->OnPlayerEnterCombat(player, enemy);
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::ClearInCombat()
|
||||
@@ -13025,10 +13020,11 @@ void Unit::ClearInCombat()
|
||||
for (uint8 i = 0; i < MAX_RUNES; ++i)
|
||||
player->SetGracePeriod(i, 0);
|
||||
}
|
||||
#ifdef ELUNA
|
||||
|
||||
if (Player* player = this->ToPlayer())
|
||||
sEluna->OnPlayerLeaveCombat(player);
|
||||
#endif
|
||||
{
|
||||
sScriptMgr->OnPlayerLeaveCombat(player);
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::ClearInPetCombat()
|
||||
|
||||
Reference in New Issue
Block a user