feat(CI/Codestyle): add check core logs (#6012)

This commit is contained in:
Kargatum
2021-05-31 16:03:00 +07:00
committed by GitHub
parent 9b6c3c7d2c
commit e3c1e739c6
8 changed files with 36 additions and 21 deletions

View File

@@ -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);