mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-16 21:20:01 -04:00
Core/Gameobjects: Fix an exploit where it was possible to use gameobjects from any distance. Fixes for example picking up the WSG flag from any distance using hacking tools.
This commit is contained in:
@@ -2209,3 +2209,19 @@ void GameObject::GetRespawnPosition(float &x, float &y, float &z, float* ori /*
|
||||
if (ori)
|
||||
*ori = GetOrientation();
|
||||
}
|
||||
|
||||
float GameObject::GetInteractionDistance()
|
||||
{
|
||||
switch (GetGoType())
|
||||
{
|
||||
/// @todo find out how the client calculates the maximal usage distance to spellless working
|
||||
// gameobjects like guildbanks and mailboxes - 10.0 is a just an abitrary choosen number
|
||||
case GAMEOBJECT_TYPE_GUILD_BANK:
|
||||
case GAMEOBJECT_TYPE_MAILBOX:
|
||||
return 10.0f;
|
||||
case GAMEOBJECT_TYPE_FISHINGHOLE:
|
||||
return 20.0f + CONTACT_DISTANCE; // max spell range
|
||||
default:
|
||||
return INTERACTION_DISTANCE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user