mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[9556] Allow summoned creatures use MovementType == RANDOM_MOTION_TYPE
Using creature_template.MovementType as default. For normal spawned creatures, data from creature table will still apply and override _template. Radius is 5.0 as default, but may be changed in real-time from ai scripts using function. Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
583e37e5c9
commit
3d3348e485
2 changed files with 3 additions and 5 deletions
|
|
@ -115,7 +115,7 @@ Creature::Creature(CreatureSubtype subtype) :
|
|||
Unit(), i_AI(NULL),
|
||||
lootForPickPocketed(false), lootForBody(false), m_groupLootTimer(0), m_groupLootId(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(5.0f),
|
||||
m_subtype(subtype), m_defaultMovementType(IDLE_MOTION_TYPE), m_DBTableGuid(0), m_equipmentId(0),
|
||||
m_AlreadyCallAssistance(false), m_AlreadySearchedAssistance(false),
|
||||
m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false), m_needNotify(false),
|
||||
|
|
@ -271,8 +271,6 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data )
|
|||
|
||||
// checked at loading
|
||||
m_defaultMovementType = MovementGeneratorType(cinfo->MovementType);
|
||||
if(!m_respawnradius && m_defaultMovementType == RANDOM_MOTION_TYPE)
|
||||
m_defaultMovementType = IDLE_MOTION_TYPE;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1889,7 +1887,7 @@ void Creature::GetRespawnCoord( float &x, float &y, float &z, float* ori, float*
|
|||
if (ori)
|
||||
*ori = data->orientation;
|
||||
if (dist)
|
||||
*dist = data->spawndist;
|
||||
*dist = GetRespawnRadius();
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9555"
|
||||
#define REVISION_NR "9556"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue