diff options
Diffstat (limited to 'src/game/Pet.cpp')
| -rw-r--r-- | src/game/Pet.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index d2bef6ddba7..c204717668f 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -268,14 +268,10 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool } else { - // Load action bar data + // load action bar, if data broken will fill later by default spells. if (!is_temporary_summoned) { - if(!m_charmInfo->LoadActionBar(fields[13].GetCppString())) - { - delete result; - return false; - } + m_charmInfo->LoadPetActionBar(fields[13].GetCppString()); _LoadSpells(); _LoadSpellCooldowns(); @@ -398,7 +394,8 @@ void Pet::SavePetToDB(PetSaveMode mode) << curmana << ", " << GetPower(POWER_HAPPINESS) << ", '"; - for(uint32 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i) + // save only spell slots from action bar + for(uint32 i = ACTION_BAR_INDEX_PET_SPELL_START; i < ACTION_BAR_INDEX_PET_SPELL_END; ++i) { ss << uint32(m_charmInfo->GetActionBarEntry(i)->Type) << " " << uint32(m_charmInfo->GetActionBarEntry(i)->SpellOrAction) << " "; |
