aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-02 19:09:52 -0600
committermegamage <none@none>2009-04-02 19:09:52 -0600
commitfbf36c9afe40a17e5084bf56337029b579c6702e (patch)
tree30bcd80733da83964043dc69355ac10ca47c8c00
parent8e0a0877e17af1d62953d418eea0a3b6e1ac672a (diff)
*Fix build. Sorry.
--HG-- branch : trunk
-rw-r--r--src/game/Pet.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index af20e1c579c..0aed9e62244 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -215,9 +215,6 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
SetReactState( ReactStates( fields[6].GetUInt8() ));
- uint32 savedhealth = fields[11].GetUInt32();
- uint32 savedmana = fields[12].GetUInt32();
-
map->Add((Creature*)this);
owner->SetGuardian(this, true);
@@ -281,9 +278,6 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
}
}
- // since last save (in seconds)
- //uint32 timediff = (time(NULL) - fields[16].GetUInt32());
-
m_resetTalentsCost = fields[17].GetUInt32();
m_resetTalentsTime = fields[18].GetUInt64();
@@ -292,6 +286,8 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
//load spells/cooldowns/auras
SetCanModifyStats(true);
+ uint32 savedhealth = fields[11].GetUInt32();
+ uint32 savedmana = fields[12].GetUInt32();
if(getPetType() == SUMMON_PET && !current) //all (?) summon pets come with full health when called, but not when they are current
{
SetHealth(GetMaxHealth());
@@ -304,6 +300,8 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
}
// Spells should be loaded after pet is added to map, because in CheckCast is check on it
+ // since last save (in seconds)
+ uint32 timediff = (time(NULL) - fields[16].GetUInt32());
_LoadAuras(timediff);
LearnPetPassives();
CastPetAuras(current);