[DiscordArchive] how can I find the melee range in yards for a creature vs player, id 24999 for example. In the core
[DiscordArchive] how can I find the melee range in yards for a creature vs player, id 24999 for example. In the core
Archived author: Sogla • Posted: 2024-11-15T08:46:06.990000+00:00
Original source
how can I find the melee range in yards for a creature vs player, id 24999 for example. In the core it's calculated with 'combat reach'. ```float Unit::GetMeleeRange(Unit const* target) const
{
float range = GetCombatReach() + target->GetCombatReach() + 4.0f / 3.0f;
return std::max(range, NOMINAL_MELEE_RANGE);
}``` Is there some common value I should know like 7.0f is often melee range?
Archived author: Nyeriah • Posted: 2024-11-15T08:54:01.275000+00:00
Original source
<@809238294595502111> there is IsWithinMeleeRange
Archived author: Marotheit • Posted: 2024-11-15T08:55:04.739000+00:00
Original source
That's absolutely the issue, and explains why some creatures will return to their original position while others will chase you indefinitely. In particular, boars and murlocs seem to have the issue as stated by the last comment on that issue
![[Image: image.png?ex=690c6269&is=690b10e9&hm=e7e...da59e6569&]](https://cdn.discordapp.com/attachments/1255602330431127753/1306905302477832292/image.png?ex=690c6269&is=690b10e9&hm=e7e18167537f51847eefca5e3691bdc81a4c8d3654ec8d3c11bc0adda59e6569&)
Archived author: Sogla • Posted: 2024-11-15T08:55:05.264000+00:00
Original source
Ah, I mean without cpp. So I can pu tin this box
![[Image: image.png?ex=690c6269&is=690b10e9&hm=e7e...da59e6569&]](https://cdn.discordapp.com/attachments/1255602330431127753/1306905302477832292/image.png?ex=690c6269&is=690b10e9&hm=e7e18167537f51847eefca5e3691bdc81a4c8d3654ec8d3c11bc0adda59e6569&)
Archived author: Nyeriah • Posted: 2024-11-15T08:55:42.415000+00:00
Original source
cant know because it depends on both models
Archived author: Nyeriah • Posted: 2024-11-15T08:55:54.756000+00:00
Original source
creature and player
Archived author: Sogla • Posted: 2024-11-15T08:57:26.513000+00:00
Original source
yes, but an estimate can be good enough? Can just run it in debug mode to print a value vs players but wondering if it can be calculated by hand from db values
Archived author: Tereneckla • Posted: 2024-11-15T09:02:32.195000+00:00
Original source
and different races have different reaches
Archived author: Nyeriah • Posted: 2024-11-15T09:05:58.943000+00:00
Original source
if you want a rough estimate id say 7-9yd
Archived author: Nyeriah • Posted: 2024-11-15T09:06:17.674000+00:00
Original source
shoot min range is 8yd