mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
[Feature] Add adjustability for AERampage Range. (#3548)
* [Feature] Add adjustability for AERampage Range. This functionality is needed for fights like Ture to be accurate, where their ramp range was 101% of their melee safe range. Example in lua of utilizing this scripting ``` e.self:SetSpecialAbilityParam(SpecialAbility.area_rampage,8,101; ``` * Updates to address comments
This commit is contained in:
+19
-10
@@ -975,8 +975,7 @@ bool Mob::IsBeneficialAllowed(Mob *target)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Mob::CombatRange(Mob* other, float fixed_size_mod, bool aeRampage)
|
||||
{
|
||||
bool Mob::CombatRange(Mob* other, float fixed_size_mod, bool aeRampage, ExtraAttackOptions *opts) {
|
||||
if (!other) {
|
||||
return(false);
|
||||
}
|
||||
@@ -1071,18 +1070,28 @@ bool Mob::CombatRange(Mob* other, float fixed_size_mod, bool aeRampage)
|
||||
SetPseudoRoot(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (aeRampage) {
|
||||
float multiplyer = GetSize() * RuleR(Combat, AERampageSafeZone);
|
||||
float ramp_range = (size_mod * multiplyer);
|
||||
if (_DistNoRoot <= ramp_range) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
float aeramp_size = RuleR(Combat, AERampageMaxDistance);
|
||||
|
||||
if (opts) {
|
||||
if (opts->range_percent > 0) {
|
||||
aeramp_size = opts->range_percent;
|
||||
}
|
||||
}
|
||||
|
||||
if (aeramp_size <= 0) {
|
||||
aeramp_size = 0.90;
|
||||
} else {
|
||||
aeramp_size /= 100;
|
||||
}
|
||||
|
||||
float ramp_range = size_mod * aeramp_size;
|
||||
|
||||
return _DistNoRoot <= ramp_range;
|
||||
}
|
||||
|
||||
if (_DistNoRoot <= size_mod)
|
||||
{
|
||||
if (_DistNoRoot <= size_mod) {
|
||||
//A hack to kill an exploit till we get something better.
|
||||
if (flymode != GravityBehavior::Flying && _zDist > 500 && !CheckLastLosState()) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user