mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-15 09:50:27 +00:00
[Crash fix] Target IsInWorld check
This commit is contained in:
@@ -29,7 +29,10 @@ uint8 AoeHealValue::Calculate()
|
||||
Player* player = ObjectAccessor::FindPlayer(itr->guid);
|
||||
if (!player || !player->IsAlive())
|
||||
continue;
|
||||
|
||||
|
||||
if (player->GetDistance(bot) >= sPlayerbotAIConfig->sightDistance)
|
||||
continue;
|
||||
|
||||
float percent = (static_cast<float> (player->GetHealth()) / player->GetMaxHealth()) * 100;
|
||||
if (percent <= range)
|
||||
++count;
|
||||
|
||||
Reference in New Issue
Block a user