mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-21 15:17:10 -04:00
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:
@@ -65,7 +65,7 @@ public:
|
||||
{
|
||||
if (me->GetEntry() == NPC_CENARION_HOLD_INFANTRY)
|
||||
DoScriptText(RAND(SAY_GUARD_SIL_AGGRO1, SAY_GUARD_SIL_AGGRO2, SAY_GUARD_SIL_AGGRO3), me, who);
|
||||
if (SpellEntry const* spell = me->reachWithSpellAttack(who))
|
||||
if (SpellInfo const* spell = me->reachWithSpellAttack(who))
|
||||
DoCast(who, spell->Id);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
if (buffTimer <= diff)
|
||||
{
|
||||
//Find a spell that targets friendly and applies an aura (these are generally buffs)
|
||||
SpellEntry const *info = SelectSpell(me, 0, 0, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA);
|
||||
SpellInfo const *info = SelectSpell(me, 0, 0, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA);
|
||||
|
||||
if (info && !globalCooldown)
|
||||
{
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
if (me->IsWithinMeleeRange(me->getVictim()))
|
||||
{
|
||||
bool healing = false;
|
||||
SpellEntry const *info = NULL;
|
||||
SpellInfo const *info = NULL;
|
||||
|
||||
//Select a healing spell if less than 30% hp
|
||||
if (me->HealthBelowPct(30))
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
if (!me->IsNonMeleeSpellCasted(false))
|
||||
{
|
||||
bool healing = false;
|
||||
SpellEntry const *info = NULL;
|
||||
SpellInfo const *info = NULL;
|
||||
|
||||
//Select a healing spell if less than 30% hp ONLY 33% of the time
|
||||
if (me->HealthBelowPct(30) && 33 > urand(0, 99))
|
||||
|
||||
Reference in New Issue
Block a user