fixed leash and tether to correctly used specified range.

This commit is contained in:
Sorvani 2013-11-17 20:55:44 -06:00
parent 09dd3c1b37
commit 65e36e02fb
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 11/17/2013 ==
Sorvani: fixed leash and tether special abilities to use the specified range correctly.
demonstar55: Rewrote the Mob::_GetMovementSpeed fix an issue that arose from the change on 11/11
- Added the rule Character:BaseRunSpeedCap (default 158) so people can customize what their runspeed cap is. Hardcapped to 225 so stuff doesn't get too crazy.

View File

@ -1090,14 +1090,14 @@ void Mob::AI_Process() {
if(GetSpecialAbility(TETHER)) {
float aggro_range = static_cast<float>(GetSpecialAbilityParam(TETHER, 0));
aggro_range = aggro_range > 0.0f ? aggro_range : pAggroRange * pAggroRange;
aggro_range = aggro_range > 0.0f ? aggro_range * aggro_range : pAggroRange * pAggroRange;
if(DistNoRootNoZ(CastToNPC()->GetSpawnPointX(), CastToNPC()->GetSpawnPointY()) > aggro_range) {
GMMove(CastToNPC()->GetSpawnPointX(), CastToNPC()->GetSpawnPointY(), CastToNPC()->GetSpawnPointZ(), CastToNPC()->GetSpawnPointH());
}
} else if(GetSpecialAbility(LEASH)) {
float aggro_range = static_cast<float>(GetSpecialAbilityParam(LEASH, 0));
aggro_range = aggro_range > 0.0f ? aggro_range : pAggroRange * pAggroRange;
aggro_range = aggro_range > 0.0f ? aggro_range * aggro_range : pAggroRange * pAggroRange;
if(DistNoRootNoZ(CastToNPC()->GetSpawnPointX(), CastToNPC()->GetSpawnPointY()) > aggro_range) {
GMMove(CastToNPC()->GetSpawnPointX(), CastToNPC()->GetSpawnPointY(), CastToNPC()->GetSpawnPointZ(), CastToNPC()->GetSpawnPointH());