Nopch fix

This commit is contained in:
Shauren
2019-11-01 14:54:34 +01:00
parent eda48550f2
commit 0065671316
3 changed files with 8 additions and 6 deletions

View File

@@ -4485,3 +4485,9 @@ Unit* SmartScript::GetLastInvoker(Unit* invoker)
return nullptr;
}
void SmartScript::IncPhase(uint32 p)
{
// protect phase from overflowing
mEventPhase = std::min<uint32>(SMART_EVENT_PHASE_12, mEventPhase + p);
}

View File

@@ -97,12 +97,7 @@ class TC_GAME_API SmartScript
CounterMap mCounterList;
private:
void IncPhase(uint32 p)
{
// protect phase from overflowing
mEventPhase = std::min<uint32>(SMART_EVENT_PHASE_12, mEventPhase + p);
}
void IncPhase(uint32 p);
void DecPhase(uint32 p)
{
if (p >= mEventPhase)

View File

@@ -24,6 +24,7 @@
#include "Optional.h"
#include "PacketUtilities.h"
#include "Position.h"
#include <array>
namespace WorldPackets
{