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
@@ -18,6 +18,7 @@
|
||||
#include "ChatLink.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
// Supported shift-links (client generated and server side)
|
||||
// |color|Hachievement:achievement_id:player_guid:0:0:0:0:0:0:0:0|h[name]|h|r
|
||||
@@ -268,7 +269,7 @@ bool SpellChatLink::Initialize(std::istringstream& iss)
|
||||
return false;
|
||||
}
|
||||
// Validate spell
|
||||
_spell = sSpellStore.LookupEntry(spellId);
|
||||
_spell = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (!_spell)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |spell command", iss.str().c_str(), spellId);
|
||||
@@ -405,7 +406,7 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
|
||||
return false;
|
||||
}
|
||||
// Validate spell
|
||||
_spell = sSpellStore.LookupEntry(spellId);
|
||||
_spell = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (!_spell)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |trade command", iss.str().c_str(), spellId);
|
||||
@@ -463,7 +464,7 @@ bool TalentChatLink::Initialize(std::istringstream& iss)
|
||||
return false;
|
||||
}
|
||||
// Validate talent's spell
|
||||
_spell = sSpellStore.LookupEntry(talentInfo->RankID[0]);
|
||||
_spell = sSpellMgr->GetSpellInfo(talentInfo->RankID[0]);
|
||||
if (!_spell)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |trade command", iss.str().c_str(), talentInfo->RankID[0]);
|
||||
@@ -495,7 +496,7 @@ bool EnchantmentChatLink::Initialize(std::istringstream& iss)
|
||||
return false;
|
||||
}
|
||||
// Validate spell
|
||||
_spell = sSpellStore.LookupEntry(spellId);
|
||||
_spell = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (!_spell)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |enchant command", iss.str().c_str(), spellId);
|
||||
@@ -534,7 +535,7 @@ bool GlyphChatLink::Initialize(std::istringstream& iss)
|
||||
return false;
|
||||
}
|
||||
// Validate glyph's spell
|
||||
_spell = sSpellStore.LookupEntry(_glyph->SpellId);
|
||||
_spell = sSpellMgr->GetSpellInfo(_glyph->SpellId);
|
||||
if (!_spell)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |glyph command", iss.str().c_str(), _glyph->SpellId);
|
||||
|
||||
Reference in new issue
Block a user