diff options
author | megamage <none@none> | 2009-01-14 00:35:13 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-01-14 00:35:13 -0600 |
commit | 83e7f653fe6a1aad6121fa7606da620d14938e0c (patch) | |
tree | 3c470663f44d1b7949ead9091a615a81f8d14128 /src/game/ObjectMgr.cpp | |
parent | 78e92e9023eff0bffb1bdb1a4f110ba9fcb3c5a8 (diff) |
*Update to Mangos 7083.
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r-- | src/game/ObjectMgr.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 9206fe0acd3..61f1203f58a 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -1693,6 +1693,24 @@ void ObjectMgr::LoadItemPrototypes() if(dbcitem) { + if(proto->Class != dbcitem->Class || proto->SubClass != dbcitem->SubClass) + { + sLog.outErrorDb("Item (Entry: %u) not correct (Class: %u, Sub: %u) pair, must be (Class: %u, Sub: %u) (still using DB value).",i,proto->Class,proto->SubClass,dbcitem->Class,dbcitem->SubClass); + // It safe let use Class/Subclass from DB + } + + if(proto->Unk0 != dbcitem->Unk0) + { + sLog.outErrorDb("Item (Entry: %u) not correct %u Unk0, must be %u (still using DB value).",i,proto->Unk0,dbcitem->Unk0); + // It safe let use Unk0 from DB + } + + if(proto->Material != dbcitem->Material) + { + sLog.outErrorDb("Item (Entry: %u) not correct %u material, must be %u (still using DB value).",i,proto->Material,dbcitem->Material); + // It safe let use Material from DB + } + if(proto->InventoryType != dbcitem->InventoryType) { sLog.outErrorDb("Item (Entry: %u) not correct %u inventory type, must be %u (still using DB value).",i,proto->InventoryType,dbcitem->InventoryType); @@ -7267,6 +7285,19 @@ void ObjectMgr::LoadTrainerSpell() if(!pTrainerSpell->reqlevel) pTrainerSpell->reqlevel = spellinfo->spellLevel; + // calculate learned spell for profession case when stored cast-spell + pTrainerSpell->learned_spell = spell; + for(int i = 0; i <3; ++i) + { + if(spellinfo->Effect[i]!=SPELL_EFFECT_LEARN_SPELL) + continue; + + if(SpellMgr::IsProfessionOrRidingSpell(spellinfo->EffectTriggerSpell[i])) + { + pTrainerSpell->learned_spell = spellinfo->EffectTriggerSpell[i]; + break; + } + } TrainerSpellData& data = m_mCacheTrainerSpellMap[entry]; |