mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-18 14:10:18 -04:00
Core/SAI: Add a warning when a boolean value is outside of [0,1] range (#26608)
* Core/SAI: Add a warning when a boolean value is outside of [0,1] range
* Replace boolean fields in SAI with SAIBool (from uint32)
(cherry picked from commit 84c8d21ad3)
This commit is contained in:
@@ -1555,19 +1555,19 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (!target)
|
||||
{
|
||||
Position dest(e.target.x, e.target.y, e.target.z);
|
||||
if (e.action.MoveToPos.transport)
|
||||
if (e.action.moveToPos.transport)
|
||||
if (TransportBase* trans = me->GetDirectTransport())
|
||||
trans->CalculatePassengerPosition(dest.m_positionX, dest.m_positionY, dest.m_positionZ);
|
||||
|
||||
me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, dest, e.action.MoveToPos.disablePathfinding == 0);
|
||||
me->GetMotionMaster()->MovePoint(e.action.moveToPos.pointId, dest, e.action.moveToPos.disablePathfinding == 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
float x, y, z;
|
||||
target->GetPosition(x, y, z);
|
||||
if (e.action.MoveToPos.ContactDistance > 0)
|
||||
target->GetContactPoint(me, x, y, z, e.action.MoveToPos.ContactDistance);
|
||||
me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, x + e.target.x, y + e.target.y, z + e.target.z, e.action.MoveToPos.disablePathfinding == 0);
|
||||
if (e.action.moveToPos.ContactDistance > 0)
|
||||
target->GetContactPoint(me, x, y, z, e.action.moveToPos.ContactDistance);
|
||||
me->GetMotionMaster()->MovePoint(e.action.moveToPos.pointId, x + e.target.x, y + e.target.y, z + e.target.z, e.action.moveToPos.disablePathfinding == 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user