mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-19 04:01:29 +00:00
Merge pull request #229 from KayenEQ/Development
Added new param to special attack NPC_NO_CHASE
This commit is contained in:
commit
53c7b789f2
@ -877,9 +877,13 @@ bool Mob::CombatRange(Mob* other)
|
|||||||
|
|
||||||
if (GetSpecialAbility(NPC_CHASE_DISTANCE)){
|
if (GetSpecialAbility(NPC_CHASE_DISTANCE)){
|
||||||
|
|
||||||
|
bool DoLoSCheck = true;
|
||||||
float max_dist = static_cast<float>(GetSpecialAbilityParam(NPC_CHASE_DISTANCE, 0));
|
float max_dist = static_cast<float>(GetSpecialAbilityParam(NPC_CHASE_DISTANCE, 0));
|
||||||
float min_dist = static_cast<float>(GetSpecialAbilityParam(NPC_CHASE_DISTANCE, 1));
|
float min_dist = static_cast<float>(GetSpecialAbilityParam(NPC_CHASE_DISTANCE, 1));
|
||||||
|
|
||||||
|
if (GetSpecialAbilityParam(NPC_CHASE_DISTANCE, 2));
|
||||||
|
DoLoSCheck = false; //Ignore line of sight check
|
||||||
|
|
||||||
if (max_dist == 1)
|
if (max_dist == 1)
|
||||||
max_dist = 250.0f; //Default it to 250 if you forget to put a value
|
max_dist = 250.0f; //Default it to 250 if you forget to put a value
|
||||||
|
|
||||||
@ -890,7 +894,7 @@ bool Mob::CombatRange(Mob* other)
|
|||||||
else
|
else
|
||||||
min_dist = min_dist * min_dist;
|
min_dist = min_dist * min_dist;
|
||||||
|
|
||||||
if (CheckLastLosState() && (_DistNoRoot >= min_dist && _DistNoRoot <= max_dist))
|
if ((DoLoSCheck && CheckLastLosState()) && (_DistNoRoot >= min_dist && _DistNoRoot <= max_dist))
|
||||||
SetPseudoRoot(true);
|
SetPseudoRoot(true);
|
||||||
else
|
else
|
||||||
SetPseudoRoot(false);
|
SetPseudoRoot(false);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user