mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01: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:
@@ -48,10 +48,10 @@ class spell_ex_5581 : public SpellScriptLoader
|
||||
|
||||
// function called on server startup
|
||||
// checks if script has data required for it to work
|
||||
bool Validate(SpellEntry const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
// check if spellid 70522 exists in dbc, we will trigger it later
|
||||
if (!sSpellStore.LookupEntry(SPELL_TRIGGERED))
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_TRIGGERED))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -147,10 +147,10 @@ class spell_ex_66244 : public SpellScriptLoader
|
||||
PrepareAuraScript(spell_ex_66244AuraScript);
|
||||
// function called on server startup
|
||||
// checks if script has data required for it to work
|
||||
bool Validate(SpellEntry const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
// check if spellid exists in dbc, we will trigger it later
|
||||
if (!sSpellStore.LookupEntry(SPELL_TRIGGERED))
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_TRIGGERED))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -379,7 +379,7 @@ class spell_ex : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_ex_SpellScript);
|
||||
|
||||
//bool Validate(SpellEntry const* spellEntry){return true;}
|
||||
//bool Validate(SpellInfo const* spellEntry){return true;}
|
||||
//bool Load(){return true;}
|
||||
//void Unload(){}
|
||||
|
||||
@@ -406,7 +406,7 @@ class spell_ex : public SpellScriptLoader
|
||||
class spell_ex_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_ex)
|
||||
//bool Validate(SpellEntry const* spellEntry){return true;}
|
||||
//bool Validate(SpellInfo const* spellEntry){return true;}
|
||||
//bool Load(){return true;}
|
||||
//void Unload(){}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user