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:
Giacomo Pozzoni
2021-06-25 20:44:28 +02:00
committed by Shauren
parent ee1b2ec99e
commit a85e77b47a
3 changed files with 208 additions and 78 deletions
@@ -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;
}