aboutsummaryrefslogtreecommitdiff
path: root/src/game/Creature.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-31 21:04:04 -0500
committermegamage <none@none>2009-05-31 21:04:04 -0500
commit76e4dfe8dda50e61dd2ca5a9a241f14d8823cfeb (patch)
treec0975adb9df19c04f2cd26baa17ba1cff3760139 /src/game/Creature.cpp
parent5034078d49f9a29d9a7e7d891b12d1706ddab44a (diff)
*Store creatureData and goData for creatures and gos.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Creature.cpp')
-rw-r--r--src/game/Creature.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index 72d7f0212d5..76bc87cf470 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -140,6 +140,7 @@ m_defaultMovementType(IDLE_MOTION_TYPE), m_DBTableGuid(0), m_equipmentId(0), m_A
m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),
m_creatureInfo(NULL), m_reactState(REACT_AGGRESSIVE), m_formation(NULL), m_summonMask(SUMMON_MASK_NONE)
, m_AlreadySearchedAssistance(false)
+, m_creatureData(NULL)
{
m_regenTimer = 200;
m_valuesCount = UNIT_END;
@@ -1532,8 +1533,7 @@ bool Creature::LoadFromDB(uint32 guid, Map *map)
// checked at creature_template loading
m_defaultMovementType = MovementGeneratorType(data->movementType);
- if(!data->dbData)
- SetInternallyAdded();
+ m_creatureData = data;
return true;
}
@@ -2082,7 +2082,7 @@ bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /
void Creature::SaveRespawnTime()
{
- if(isSummon() || !m_DBTableGuid || m_isInternallyAdded)
+ if(isSummon() || !m_DBTableGuid || m_creatureData && !m_creatureData->dbData)
return;
if(m_respawnTime > time(NULL)) // dead (no corpse)