*Movement Generators standardization.

- bool GetDestination(&x,&y,&z) added to all movement generators.(it is used by update of players view distance)
- Fixed when creature entering in combat not count this as StoppedByPlayer.
- Random Movement Generator - added support for creating custom spawndist during the game.
- Random Movement Generator - Db spawndist is checked only at initialize(NOT in each sellect of random location).
- Added Random Movement to motion master - it can be called now by MoveRandom(spawndist) e.g. for use in SD2.
- Home and Random movements no more using RespawnCoords(Home Position has implemented)
- Fixed bug when creature is moving on path and enter combat, after that returns to spawn position.
-Typo fix in Confused Movement Generator

--HG--
branch : trunk
This commit is contained in:
2008-12-19 00:37:40 +02:00
parent 058db69e07
commit 51f0c70b7e
15 changed files with 85 additions and 36 deletions
+6 -5
View File
@@ -615,8 +615,8 @@ class TRINITY_DLL_SPEC Creature : public Unit
return m_charmInfo->GetCharmSpell(pos)->spellId;
}
void SetCombatStartPosition(float x, float y, float z) { CombatStartX = x; CombatStartY = y; CombatStartZ = z; }
void GetCombatStartPosition(float &x, float &y, float &z) { x = CombatStartX; y = CombatStartY; z = CombatStartZ; }
void SetHomePosition(float x, float y, float z, float ori) { mHome_X = x; mHome_Y = y; mHome_Z = z; mHome_O = ori;}
void GetHomePosition(float &x, float &y, float &z, float &ori) { x = mHome_X; y = mHome_Y; z = mHome_Z; ori = mHome_O; }
uint32 GetGlobalCooldown() const { return m_GlobalCooldown; }
@@ -675,9 +675,10 @@ class TRINITY_DLL_SPEC Creature : public Unit
SpellSchoolMask m_meleeDamageSchoolMask;
uint32 m_originalEntry;
float CombatStartX;
float CombatStartY;
float CombatStartZ;
float mHome_X;
float mHome_Y;
float mHome_Z;
float mHome_O;
private:
//WaypointMovementGenerator vars