Implemented NPC special ability 40 'NPC_CHASE_DISTANCE'

Param 0: Sets max distance you need to be away from an npc for it to chase you.
Param 1: Sets min distance you need to be from npc for it to chase you.
Usage: Ideally used with ranged attack npcs / casters who you DO NOT WANT
to chase you unless you get too close or too far or out of sight.
This commit is contained in:
KayenEQ
2014-08-23 03:21:36 -04:00
parent 16d47a2c47
commit 85df09b3f2
5 changed files with 42 additions and 3 deletions
+6 -1
View File
@@ -464,6 +464,8 @@ public:
bool CheckLosFN(float posX, float posY, float posZ, float mobSize);
inline void SetChanged() { pLastChange = Timer::GetCurrentTime(); }
inline const uint32 LastChange() const { return pLastChange; }
inline void SetLastLosState(bool value) { last_los_check = value; }
inline bool CheckLastLosState() const { return last_los_check; }
//Quest
void QuestReward(Client *c = nullptr, uint32 silver = 0, uint32 gold = 0, uint32 platinum = 0);
@@ -752,7 +754,8 @@ public:
inline const bool IsRooted() const { return rooted || permarooted; }
inline const bool HasVirus() const { return has_virus; }
int GetSnaredAmount();
inline const bool IsPseudoRooted() const { return pseudo_rooted; }
inline void SetPseudoRoot(bool prState) { pseudo_rooted = prState; }
int GetCurWp() { return cur_wp; }
@@ -1119,6 +1122,8 @@ protected:
bool has_MGB;
bool has_ProjectIllusion;
int16 SpellPowerDistanceMod;
bool last_los_check;
bool pseudo_rooted;
// Bind wound
Timer bindwound_timer;