miscs: CMSG received correctly (quest, loot etc.)

This commit is contained in:
Yunfan Li
2023-07-26 13:17:48 +08:00
parent 38f385dae8
commit a2045d6d76
5 changed files with 9 additions and 6 deletions

View File

@@ -1226,6 +1226,9 @@ void MovementAction::ClearIdleState()
bool MovementAction::MoveAway(Unit* target)
{
if (!target) {
return false;
}
float angle = target->GetAngle(bot);
float dx = bot->GetPositionX() + cos(angle) * sPlayerbotAIConfig->fleeDistance;
float dy = bot->GetPositionY() + sin(angle) * sPlayerbotAIConfig->fleeDistance;