[Bug Fix] Limit Player Taunt Distance (#4019)

* [Bug Fix] Player Taunt Distance

Previously this was not regulated on the server side and allowed players to exploit situations where the client did not enforce Z distance checks.

Rule Name: MaximumTauntDistance
Rule Default: 150

Calculation is Rule Squared

* remove `this`
This commit is contained in:
Fryguy
2024-01-26 15:44:05 -05:00
committed by GitHub
parent 8a87e00b66
commit 4c769c46b3
3 changed files with 8 additions and 1 deletions
+5
View File
@@ -14905,6 +14905,11 @@ void Client::Handle_OP_Taunt(const EQApplicationPacket *app)
return;
}
if (DistanceSquared(GetPosition(), GetTarget()->GetPosition()) > (RuleI(Skills, MaximumTauntDistance) * (RuleI(Skills, MaximumTauntDistance)))) {
MessageString(Chat::TooFarAway, TAUNT_TOO_FAR);
return;
}
Taunt(GetTarget()->CastToNPC(), false);
return;
}