mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 06:36:24 +00:00
feat(CI/Codestyle): add check core logs (#6012)
This commit is contained in:
@@ -189,11 +189,14 @@ namespace Movement
|
||||
bool MoveSplineInitArgs::Validate(Unit* unit) const
|
||||
{
|
||||
#define CHECK(exp) \
|
||||
if (!(exp))\
|
||||
{\
|
||||
LOG_ERROR("server", "MoveSplineInitArgs::Validate: expression '%s' failed for GUID: %u Entry: %u", #exp, unit->GetTypeId() == TYPEID_PLAYER ? unit->GetGUID().GetCounter() : unit->ToCreature()->GetSpawnId(), unit->GetEntry());\
|
||||
return false;\
|
||||
}
|
||||
if (!(exp)) \
|
||||
{ \
|
||||
if (unit) \
|
||||
LOG_ERROR("misc.movesplineinitargs", "MoveSplineInitArgs::Validate: expression '%s' failed for %s", #exp, unit->GetGUID().ToString().c_str()); \
|
||||
else \
|
||||
LOG_ERROR("misc.movesplineinitargs", "MoveSplineInitArgs::Validate: expression '%s' failed for cyclic spline continuation", #exp); \
|
||||
return false;\
|
||||
}
|
||||
CHECK(path.size() > 1);
|
||||
CHECK(velocity > 0.01f);
|
||||
CHECK(time_perc >= 0.f && time_perc <= 1.f);
|
||||
|
||||
Reference in New Issue
Block a user