Fixed unintialized Creature::m_isVehicle

This commit is contained in:
arrai 2008-11-22 18:13:14 +01:00
parent f0fbe80837
commit 688693029e
6 changed files with 5 additions and 7 deletions

View file

@ -96,11 +96,12 @@ Unit(), i_AI(NULL),
lootForPickPocketed(false), lootForBody(false), m_groupLootTimer(0), lootingGroupLeaderGUID(0), lootForPickPocketed(false), lootForBody(false), m_groupLootTimer(0), lootingGroupLeaderGUID(0),
m_lootMoney(0), m_lootRecipient(0), m_lootMoney(0), m_lootRecipient(0),
m_deathTimer(0), m_respawnTime(0), m_respawnDelay(25), m_corpseDelay(60), m_respawnradius(0.0f), m_deathTimer(0), m_respawnTime(0), m_respawnDelay(25), m_corpseDelay(60), m_respawnradius(0.0f),
m_gossipOptionLoaded(false), m_emoteState(0), m_isPet(false), m_isTotem(false), m_gossipOptionLoaded(false), m_emoteState(0), m_isPet(false), m_isTotem(false), m_isVehicle(false),
m_regenTimer(2000), m_defaultMovementType(IDLE_MOTION_TYPE), m_equipmentId(0), m_defaultMovementType(IDLE_MOTION_TYPE), m_equipmentId(0),
m_AlreadyCallAssistence(false), m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false), m_AlreadyCallAssistence(false), m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false),
m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),m_creatureInfo(NULL), m_DBTableGuid(0) m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),m_creatureInfo(NULL), m_DBTableGuid(0)
{ {
m_regenTimer = 200;
m_valuesCount = UNIT_END; m_valuesCount = UNIT_END;
for(int i =0; i<4; ++i) for(int i =0; i<4; ++i)

View file

@ -625,7 +625,6 @@ class MANGOS_DLL_SPEC Creature : public Unit
bool m_isTotem; // set only in Totem::Totem bool m_isTotem; // set only in Totem::Totem
void RegenerateMana(); void RegenerateMana();
void RegenerateHealth(); void RegenerateHealth();
uint32 m_regenTimer;
MovementGeneratorType m_defaultMovementType; MovementGeneratorType m_defaultMovementType;
Cell m_currentCell; // store current cell where creature listed Cell m_currentCell; // store current cell where creature listed
uint32 m_DBTableGuid; ///< For new or temporary creatures is 0 for saved it is lowguid uint32 m_DBTableGuid; ///< For new or temporary creatures is 0 for saved it is lowguid

View file

@ -221,7 +221,6 @@ class Pet : public Creature
bool m_removed; // prevent overwrite pet state in DB at next Pet::Update if pet already removed(saved) bool m_removed; // prevent overwrite pet state in DB at next Pet::Update if pet already removed(saved)
protected: protected:
uint32 m_regenTimer;
uint32 m_happinessTimer; uint32 m_happinessTimer;
PetType m_petType; PetType m_petType;
int32 m_duration; // time until unsummon (used mostly for summoned guardians and not used for controlled pets) int32 m_duration; // time until unsummon (used mostly for summoned guardians and not used for controlled pets)

View file

@ -2236,7 +2236,6 @@ class MANGOS_DLL_SPEC Player : public Unit
bool m_DailyQuestChanged; bool m_DailyQuestChanged;
time_t m_lastDailyQuestTime; time_t m_lastDailyQuestTime;
uint32 m_regenTimer;
uint32 m_breathTimer; uint32 m_breathTimer;
uint32 m_drunkTimer; uint32 m_drunkTimer;
uint16 m_drunk; uint16 m_drunk;

View file

@ -493,7 +493,7 @@ enum UnitFlags2
UNIT_FLAG2_FEIGN_DEATH = 0x00000001, UNIT_FLAG2_FEIGN_DEATH = 0x00000001,
UNIT_FLAG2_COMPREHEND_LANG = 0x00000008, UNIT_FLAG2_COMPREHEND_LANG = 0x00000008,
UNIT_FLAG2_FORCE_MOVE = 0x00000040, UNIT_FLAG2_FORCE_MOVE = 0x00000040,
UNIT_FLAG2_UNKNOWN1 = 0x00000800 UNIT_FLAG2_REGENERATE_POWER = 0x00000800
}; };
/// Non Player Character flags /// Non Player Character flags
@ -1370,6 +1370,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
uint32 m_unit_movement_flags; uint32 m_unit_movement_flags;
uint32 m_reactiveTimer[MAX_REACTIVE]; uint32 m_reactiveTimer[MAX_REACTIVE];
uint32 m_regenTimer;
private: private:
void SendAttackStop(Unit* victim); // only from AttackStop(Unit*) void SendAttackStop(Unit* victim); // only from AttackStop(Unit*)

View file

@ -82,7 +82,6 @@ bool Vehicle::Create(uint32 guidlow, Map *map, uint32 Entry, uint32 vehicleId, u
SetVehicleId(vehicleId); SetVehicleId(vehicleId);
SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
SetUInt32Value(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_UNKNOWN1);
//SetUInt32Value(UNIT_FIELD_BYTES_1, 0x02000001); //SetUInt32Value(UNIT_FIELD_BYTES_1, 0x02000001);
//SetUInt32Value(UNIT_FIELD_BYTES_2, 0x00000001); //SetUInt32Value(UNIT_FIELD_BYTES_2, 0x00000001);
SetFloatValue(UNIT_FIELD_HOVERHEIGHT, 1.0f); SetFloatValue(UNIT_FIELD_HOVERHEIGHT, 1.0f);