diff options
author | QAston <qaston@gmail.com> | 2011-07-26 23:09:28 +0200 |
---|---|---|
committer | QAston <qaston@gmail.com> | 2011-07-26 23:09:28 +0200 |
commit | b0fe236265465a0f39aa98a8cee2916d1ccfaa02 (patch) | |
tree | 77ed4bde46de983c280a542d657a30b24865638c /src/server/game/Chat/ChatLink.cpp | |
parent | 29c228a80170e4264129d4e3bed4d2fc41aca5a7 (diff) |
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
Diffstat (limited to 'src/server/game/Chat/ChatLink.cpp')
-rw-r--r-- | src/server/game/Chat/ChatLink.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp index 218c4574639..30f8a4374f7 100644 --- a/src/server/game/Chat/ChatLink.cpp +++ b/src/server/game/Chat/ChatLink.cpp @@ -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); |