mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-16 02:10:28 +00:00
[Fix] teleport to invalid map or invalid coordinates (x , y , z 200000, o ) given when teleporting player (g UI d full type player low , name , map , x , y , z , o ) (#1538)
* MoveSplineInitArgs::Validate: expression 'velocity > 0.01f' failed for GUID Full * Update BotMovementUtils.h * Playerbots: guard against invalid-Z teleports
This commit is contained in:
@@ -957,7 +957,8 @@ bool IccGunshipTeleportHordeAction::Execute(Event event)
|
||||
|
||||
bool IccGunshipTeleportHordeAction::TeleportTo(const Position& position)
|
||||
{
|
||||
return bot->TeleportTo(bot->GetMapId(), position.GetPositionX(), position.GetPositionY(), position.GetPositionZ(),
|
||||
// return bot->TeleportTo(bot->GetMapId(), position.GetPositionX(), position.GetPositionY(), position.GetPositionZ(),
|
||||
return TeleportToSafe(bot, bot->GetMapId(), position.GetPositionX(), position.GetPositionY(), position.GetPositionZ(),// [Fix]Avoid silly teleport
|
||||
bot->GetOrientation());
|
||||
}
|
||||
|
||||
|
||||
@@ -1357,10 +1357,14 @@ bool KologarnMarkDpsTargetAction::Execute(Event event)
|
||||
|
||||
bool KologarnFallFromFloorAction::Execute(Event event)
|
||||
{
|
||||
return bot->TeleportTo(bot->GetMapId(), ULDUAR_KOLOGARN_RESTORE_POSITION.GetPositionX(),
|
||||
/*return bot->TeleportTo(bot->GetMapId(), ULDUAR_KOLOGARN_RESTORE_POSITION.GetPositionX(),
|
||||
ULDUAR_KOLOGARN_RESTORE_POSITION.GetPositionY(),
|
||||
ULDUAR_KOLOGARN_RESTORE_POSITION.GetPositionZ(),
|
||||
ULDUAR_KOLOGARN_RESTORE_POSITION.GetOrientation());
|
||||
ULDUAR_KOLOGARN_RESTORE_POSITION.GetOrientation());*/
|
||||
return TeleportToSafe(bot, bot->GetMapId(), ULDUAR_KOLOGARN_RESTORE_POSITION.GetPositionX(), // [Fix] Avoid silly teleport
|
||||
ULDUAR_KOLOGARN_RESTORE_POSITION.GetPositionY(),
|
||||
ULDUAR_KOLOGARN_RESTORE_POSITION.GetPositionZ(),
|
||||
ULDUAR_KOLOGARN_RESTORE_POSITION.GetOrientation());
|
||||
}
|
||||
|
||||
bool KologarnFallFromFloorAction::isUseful()
|
||||
@@ -1407,14 +1411,18 @@ bool KologarnEyebeamAction::Execute(Event event)
|
||||
KologarnEyebeamTrigger kologarnEyebeamTrigger(botAI);
|
||||
if (runToLeftSide)
|
||||
{
|
||||
teleportedToPoint = bot->TeleportTo(bot->GetMapId(), ULDUAR_KOLOGARN_EYEBEAM_LEFT_POSITION.GetPositionX(),
|
||||
// teleportedToPoint = bot->TeleportTo(bot->GetMapId(), ULDUAR_KOLOGARN_EYEBEAM_LEFT_POSITION.GetPositionX(),
|
||||
teleportedToPoint = TeleportToSafe(bot, bot->GetMapId(),
|
||||
ULDUAR_KOLOGARN_EYEBEAM_LEFT_POSITION.GetPositionX(),
|
||||
ULDUAR_KOLOGARN_EYEBEAM_LEFT_POSITION.GetPositionY(),
|
||||
ULDUAR_KOLOGARN_EYEBEAM_LEFT_POSITION.GetPositionZ(),
|
||||
ULDUAR_KOLOGARN_EYEBEAM_LEFT_POSITION.GetOrientation());
|
||||
}
|
||||
else
|
||||
{
|
||||
teleportedToPoint = bot->TeleportTo(bot->GetMapId(), ULDUAR_KOLOGARN_EYEBEAM_RIGHT_POSITION.GetPositionX(),
|
||||
// teleportedToPoint = bot->TeleportTo(bot->GetMapId(), ULDUAR_KOLOGARN_EYEBEAM_RIGHT_POSITION.GetPositionX(),
|
||||
teleportedToPoint = TeleportToSafe(bot, bot->GetMapId(),
|
||||
ULDUAR_KOLOGARN_EYEBEAM_RIGHT_POSITION.GetPositionX(),
|
||||
ULDUAR_KOLOGARN_EYEBEAM_RIGHT_POSITION.GetPositionY(),
|
||||
ULDUAR_KOLOGARN_EYEBEAM_RIGHT_POSITION.GetPositionZ(),
|
||||
ULDUAR_KOLOGARN_EYEBEAM_RIGHT_POSITION.GetOrientation());
|
||||
|
||||
@@ -175,9 +175,13 @@ bool EmalonOverchargeAction::isUseful()
|
||||
|
||||
bool EmalonFallFromFloorAction::Execute(Event event)
|
||||
{
|
||||
return bot->TeleportTo(bot->GetMapId(), VOA_EMALON_RESTORE_POSITION.GetPositionX(),
|
||||
/*return bot->TeleportTo(bot->GetMapId(), VOA_EMALON_RESTORE_POSITION.GetPositionX(),
|
||||
VOA_EMALON_RESTORE_POSITION.GetPositionY(), VOA_EMALON_RESTORE_POSITION.GetPositionZ(),
|
||||
VOA_EMALON_RESTORE_POSITION.GetOrientation());
|
||||
VOA_EMALON_RESTORE_POSITION.GetOrientation());*/
|
||||
return TeleportToSafe(bot, bot->GetMapId(), VOA_EMALON_RESTORE_POSITION.GetPositionX(), //[Fix] Avoid Silly Teleport
|
||||
VOA_EMALON_RESTORE_POSITION.GetPositionY(),
|
||||
VOA_EMALON_RESTORE_POSITION.GetPositionZ(),
|
||||
VOA_EMALON_RESTORE_POSITION.GetOrientation());
|
||||
}
|
||||
|
||||
bool EmalonFallFromFloorAction::isUseful()
|
||||
|
||||
Reference in New Issue
Block a user