[7901] Refactoting pet action bar related code. Fixed some related bugs. Author: VladimirMangos

* Correctly update action bar at loading and other cases when listed unlearned/not existed spells
    * Avoid send data by PetSpellInitialize() many times while pet loading

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-27 17:02:39 -05:00
parent 7ccd99ecab
commit 514fc49c3c
6 changed files with 170 additions and 130 deletions
+4 -3
View File
@@ -199,8 +199,9 @@ class Pet : public Guardian
bool learnSpell(uint32 spell_id);
void learnSpellHighRank(uint32 spellid);
void InitLevelupSpellsForLevel();
bool unlearnSpell(uint32 spell_id, bool learn_prev);
bool removeSpell(uint32 spell_id, bool learn_prev);
bool unlearnSpell(uint32 spell_id, bool learn_prev, bool clear_ab = true);
bool removeSpell(uint32 spell_id, bool learn_prev, bool clear_ab = true);
void CleanupActionBar();
PetSpellMap m_spells;
AutoSpellList m_autospells;
@@ -249,4 +250,4 @@ class Pet : public Guardian
assert(false);
}
};
#endif
#endif