diff --git a/src/game/Object/CreatureEventAI.cpp b/src/game/Object/CreatureEventAI.cpp index f52171f92..83c36a7af 100644 --- a/src/game/Object/CreatureEventAI.cpp +++ b/src/game/Object/CreatureEventAI.cpp @@ -161,7 +161,7 @@ CreatureEventAI::CreatureEventAI(Creature* c) : CreatureAI(c), DEBUG_FILTER_LOG(LOG_FILTER_EVENT_AI_DEV, "CreatureEventAI: Event type %u (script %u) triggered for %s (invoked by %s)", \ pHolder.Event.event_type, pHolder.Event.event_id, m_creature->GetGuidStr().c_str(), pActionInvoker ? pActionInvoker->GetGuidStr().c_str() : "") -inline bool IsTimerBasedEvent(EventAI_Type type) +inline static bool IsTimerBasedEvent(EventAI_Type type) { switch (type) { @@ -1207,7 +1207,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 } case ACTION_T_SUMMON_UNIQUE: //49 { - Creature* pCreature; + Creature* pCreature = nullptr; MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*m_creature, action.summon_unique.creatureId, true, false, 100, true); MaNGOS::CreatureLastSearcher searcher(pCreature, u_check); @@ -1808,7 +1808,7 @@ void CreatureEventAI::ReceiveEmote(Player* pPlayer, uint32 text_emote) } } -#define HEALTH_STEPS 3 +constexpr auto HEALTH_STEPS = 3; void CreatureEventAI::DamageTaken(Unit* dealer, uint32& damage) {