Core: Use new SpellInfo class in core. Sadly, this commit is not compatibile with some of the custom code. To make your code work again you may need to change:
*SpellEntry is now SpellInfo *GetSpellProto is now GetSpellInfo *SpellEntry::Effect*[effIndex] is now avalible under SpellInfo.Effects[effIndex].* *sSpellStore.LookupEntry is no longer valid, use sSpellMgr->GetSpellInfo() *SpellFunctions from SpellMgr.h like DoSpellStuff(spellId) are now: spellInfo->DoStuff() *SpellMgr::CalculateEffectValue and similar functions are now avalible in SpellEffectInfo class. *GET_SPELL macro is removed, code which used it is moved to SpellMgr::LoadDbcDataCorrections *code which affected dbc data in SpellMgr::LoadSpellCustomAttr is now moved to LoadDbcDataCorrections
This commit is contained in:
1 parent
29c228a801
commit
b0fe236265
195 files changed
+4630
-6929
No files matched your search
@@ -21,6 +21,7 @@
|
||||
#include "Unit.h"
|
||||
#include "DBCStructure.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
HostileRefManager::~HostileRefManager()
|
||||
{
|
||||
@@ -32,7 +33,7 @@ HostileRefManager::~HostileRefManager()
|
||||
// The pVictim is hated than by them as well
|
||||
// use for buffs and healing threat functionality
|
||||
|
||||
void HostileRefManager::threatAssist(Unit *pVictim, float fThreat, SpellEntry const *pThreatSpell, bool pSingleTarget)
|
||||
void HostileRefManager::threatAssist(Unit *pVictim, float fThreat, SpellInfo const *pThreatSpell, bool pSingleTarget)
|
||||
{
|
||||
HostileReference* ref;
|
||||
|
||||
@@ -40,7 +41,7 @@ void HostileRefManager::threatAssist(Unit *pVictim, float fThreat, SpellEntry co
|
||||
ref = getFirst();
|
||||
while (ref != NULL)
|
||||
{
|
||||
float threat = ThreatCalcHelper::calcThreat(pVictim, iOwner, fThreat, (pThreatSpell ? GetSpellSchoolMask(pThreatSpell) : SPELL_SCHOOL_MASK_NORMAL), pThreatSpell);
|
||||
float threat = ThreatCalcHelper::calcThreat(pVictim, iOwner, fThreat, (pThreatSpell ? pThreatSpell->GetSchoolMask() : SPELL_SCHOOL_MASK_NORMAL), pThreatSpell);
|
||||
if (pVictim == getOwner())
|
||||
ref->addThreat(threat / size); // It is faster to modify the threat durectly if possible
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user