*Fix the db error when saving pet auras.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-02 21:49:21 -05:00
parent eeeae2e349
commit 272697ede1
+5 -5
View File
@@ -1181,13 +1181,13 @@ void Pet::_SaveAuras()
|| itr->second->IsAreaAura()) || itr->second->IsAreaAura())
continue; continue;
uint32 amounts[MAX_SPELL_EFFECTS]; int32 amounts[MAX_SPELL_EFFECTS];
for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i) for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{ {
if (AuraEffect * partAura = itr->second->GetPartAura(i)) if (AuraEffect *partAura = itr->second->GetPartAura(i))
amounts[i]=partAura->GetAmount(); amounts[i] = partAura->GetAmount();
else else
amounts[i]=0; amounts[i] = 0;
} }
CharacterDatabase.PExecute("INSERT INTO pet_aura (guid,caster_guid,spell,effect_mask,stackcount,amount0, amount1, amount2,maxduration,remaintime,remaincharges) " CharacterDatabase.PExecute("INSERT INTO pet_aura (guid,caster_guid,spell,effect_mask,stackcount,amount0, amount1, amount2,maxduration,remaintime,remaincharges) "