*Fix bug that pets learn talents instantly - clear your pet_spell table to have changes applied.
--HG-- branch : trunk
This commit is contained in:
@@ -2627,7 +2627,6 @@ void Spell::update(uint32 difftime)
|
|||||||
// check if there are alive targets left
|
// check if there are alive targets left
|
||||||
if (!UpdateChanneledTargetList())
|
if (!UpdateChanneledTargetList())
|
||||||
{
|
{
|
||||||
sLog.outError("Spell cancel");
|
|
||||||
SendChannelUpdate(0);
|
SendChannelUpdate(0);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
@@ -2698,7 +2697,6 @@ void Spell::finish(bool ok)
|
|||||||
|
|
||||||
// Unsummon summon as possessed creatures on spell cancel
|
// Unsummon summon as possessed creatures on spell cancel
|
||||||
if(IsChanneledSpell(m_spellInfo)
|
if(IsChanneledSpell(m_spellInfo)
|
||||||
&& m_caster->m_currentSpells[CURRENT_CHANNELED_SPELL] == this
|
|
||||||
&& m_caster->GetTypeId() == TYPEID_PLAYER)
|
&& m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
if (Unit * charm = m_caster->GetCharm())
|
if (Unit * charm = m_caster->GetCharm())
|
||||||
|
|||||||
@@ -2536,7 +2536,8 @@ void SpellMgr::LoadPetLevelupSpellMap()
|
|||||||
// not exist or triggered or talent
|
// not exist or triggered or talent
|
||||||
if(!spell || !spell->spellLevel || GetTalentSpellPos(spell->Id))
|
if(!spell || !spell->spellLevel || GetTalentSpellPos(spell->Id))
|
||||||
continue;
|
continue;
|
||||||
if (!spell->SpellFamilyFlags && spell->SpellIconID!=2310 && (!spell->RecoveryTime || !spell->StartRecoveryCategory))
|
// TODO: some spells have no spellfamilyflag but should be learned
|
||||||
|
if (!spell->SpellFamilyFlags)
|
||||||
continue;
|
continue;
|
||||||
mPetLevelupSpellMap.insert(PetLevelupSpellMap::value_type(creatureFamily->ID, std::make_pair(spell->spellLevel , spell->Id )));
|
mPetLevelupSpellMap.insert(PetLevelupSpellMap::value_type(creatureFamily->ID, std::make_pair(spell->spellLevel , spell->Id )));
|
||||||
count++;
|
count++;
|
||||||
|
|||||||
Reference in New Issue
Block a user