[7932] Store in DB only spell part of pet action bar, set other to default state (reaction saved). Author: VladimirMangos

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-06-01 21:49:42 -05:00
1 parent 2c350bcb80
commit 4e31ec051d
5 files changed
+44 -25

No files matched your search

+4 -7
View File
@@ -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) << " ";