*Update to Mangos 7083.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-01-14 00:35:13 -06:00
parent 78e92e9023
commit 83e7f653fe
16 changed files with 698 additions and 147 deletions

View File

@@ -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];