aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Loot
diff options
context:
space:
mode:
authorQAston <qaston@gmail.com>2011-07-26 23:09:28 +0200
committerQAston <qaston@gmail.com>2011-07-26 23:09:28 +0200
commitb0fe236265465a0f39aa98a8cee2916d1ccfaa02 (patch)
tree77ed4bde46de983c280a542d657a30b24865638c /src/server/game/Loot
parent29c228a80170e4264129d4e3bed4d2fc41aca5a7 (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/Loot')
-rwxr-xr-xsrc/server/game/Loot/LootMgr.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index a5c41b3049d..b613f794388 100755
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -23,6 +23,7 @@
#include "Util.h"
#include "SharedDefines.h"
#include "SpellMgr.h"
+#include "SpellInfo.h"
#include "Group.h"
static Rates const qualityToRate[MAX_ITEM_QUALITY] = {
@@ -1743,14 +1744,14 @@ void LoadLootTemplates_Spell()
uint32 count = LootTemplates_Spell.LoadAndCollectLootIds(ids_set);
// remove real entries and check existence loot
- for (uint32 spell_id = 1; spell_id < sSpellStore.GetNumRows(); ++spell_id)
+ for (uint32 spell_id = 1; spell_id < sSpellMgr->GetSpellInfoStoreSize(); ++spell_id)
{
- SpellEntry const* spellInfo = sSpellStore.LookupEntry (spell_id);
+ SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id);
if (!spellInfo)
continue;
// possible cases
- if (!IsLootCraftingSpell(spellInfo))
+ if (!spellInfo->IsLootCrafting())
continue;
if (ids_set.find(spell_id) == ids_set.end())