Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
ThreatCalcHelper.h
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#ifndef SF_THREATCALCHELPER
7#define SF_THREATCALCHELPER
8
9#include "Define.h"
10
11class Unit;
12class SpellInfo;
13
15{
16 static uint32 const NormalSchoolMask = 1;
17
23
24 static SpellThreatCalculation ApplySpellThreatModifiers(float threat, float pctMod, bool hasEnergizeEffect)
25 {
26 if (pctMod != 1.0f)
27 threat *= pctMod;
28
29 SpellThreatCalculation result = { threat, hasEnergizeEffect };
30 return result;
31 }
32
33 static float calcThreat(Unit* hatedUnit, Unit* hatingUnit, float threat, uint32 schoolMask = NormalSchoolMask, SpellInfo const* threatSpell = NULL);
34 static bool isValidProcess(Unit* hatedUnit, Unit* hatingUnit, SpellInfo const* threatSpell = NULL);
35};
36
37#endif
std::uint32_t uint32
Definition Define.h:77
Definition Unit.h:1367
static float calcThreat(Unit *hatedUnit, Unit *hatingUnit, float threat, uint32 schoolMask=NormalSchoolMask, SpellInfo const *threatSpell=NULL)
static bool isValidProcess(Unit *hatedUnit, Unit *hatingUnit, SpellInfo const *threatSpell=NULL)
static SpellThreatCalculation ApplySpellThreatModifiers(float threat, float pctMod, bool hasEnergizeEffect)
static uint32 const NormalSchoolMask