mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 10:56:38 +01:00
Core/Creature: apply feedback from TC pull request
This commit is contained in:
@@ -182,7 +182,7 @@ bool ForcedDespawnDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
|
||||
Creature::Creature(bool isWorldObject): Unit(isWorldObject), MapObject(),
|
||||
m_groupLootTimer(0), lootingGroupLowGUID(0), m_PlayerDamageReq(0),
|
||||
m_lootRecipient(), m_lootRecipientGroup(0), _skinner(), _pickpocketLootRestore(0), m_corpseRemoveTime(0), m_respawnTime(0),
|
||||
m_respawnDelay(300), m_corpseDelay(60), m_respawnradius(0.0f), m_boundaryCheckTime(2500), m_combatPulseTime(0), m_combatPulseDelay(0), m_andvanceMovementTime(3000), m_reactState(REACT_AGGRESSIVE),
|
||||
m_respawnDelay(300), m_corpseDelay(60), m_respawnradius(0.0f), m_boundaryCheckTime(2500), m_combatPulseTime(0), m_combatPulseDelay(0), m_advanceMovementTime(3000), m_reactState(REACT_AGGRESSIVE),
|
||||
m_defaultMovementType(IDLE_MOTION_TYPE), m_spawnId(0), m_equipmentId(0), m_originalEquipmentId(0), m_AlreadyCallAssistance(false),
|
||||
m_AlreadySearchedAssistance(false), m_regenHealth(true), m_cannotReachTarget(false), m_cannotReachTimer(0), m_AI_locked(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),
|
||||
m_originalEntry(0), m_homePosition(), m_transportHomePosition(), m_creatureInfo(nullptr), m_creatureData(nullptr), m_waypointID(0), m_path_id(0), m_formation(nullptr), m_focusSpell(nullptr), m_focusDelay(0), m_shouldReacquireTarget(false), m_suppressedOrientation(0.0f)
|
||||
@@ -630,13 +630,13 @@ void Creature::Update(uint32 diff)
|
||||
} else
|
||||
m_boundaryCheckTime -= diff;
|
||||
|
||||
if (diff >= m_andvanceMovementTime)
|
||||
if (diff >= m_advanceMovementTime)
|
||||
{
|
||||
AI()->CheckRepositionRequirements();
|
||||
m_andvanceMovementTime = 3000;
|
||||
m_advanceMovementTime = 3000;
|
||||
}
|
||||
else
|
||||
m_andvanceMovementTime -= diff;
|
||||
m_advanceMovementTime -= diff;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -757,7 +757,7 @@ class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public Ma
|
||||
uint32 m_boundaryCheckTime; // (msecs) remaining time for next evade boundary check
|
||||
uint32 m_combatPulseTime; // (msecs) remaining time for next zone-in-combat pulse
|
||||
uint32 m_combatPulseDelay; // (secs) how often the creature puts the entire zone in combat (only works in dungeons)
|
||||
uint32 m_andvanceMovementTime; // (msecs) remaining time for next reposition update to avoid creatures standing inside each other
|
||||
uint32 m_advanceMovementTime; // (msecs) remaining time for next reposition update to avoid creatures standing inside each other
|
||||
|
||||
ReactStates m_reactState; // for AI, not charmInfo
|
||||
void RegenerateMana();
|
||||
|
||||
@@ -491,7 +491,8 @@ void Unit::MoveAdvanceTo(Unit* target)
|
||||
return;
|
||||
|
||||
// Do not reposition ourself when we are not allowed to move
|
||||
if (IsMovementPreventedByCasting() || isMoving() || !CanFreeMove())
|
||||
if ((IsMovementPreventedByCasting() || isMoving() || !CanFreeMove()) &&
|
||||
GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
float x, y, z;
|
||||
|
||||
Reference in New Issue
Block a user