From cabb9b27f817d97a926dd3f96adc9a8fc2535a9f Mon Sep 17 00:00:00 2001 From: mordred Date: Fri, 26 Oct 2018 14:11:02 +0200 Subject: [PATCH] More CI fixes --- deps/watchdog/Watchdog.h | 3 ++- src/servers/sapphire_zone/Action/ActionCollision.cpp | 1 + src/servers/sapphire_zone/Actor/BNpcTemplate.cpp | 5 +++-- src/servers/sapphire_zone/Actor/Player.cpp | 7 ++++--- .../sapphire_zone/DebugCommand/DebugCommandHandler.cpp | 1 + .../sapphire_zone/Network/PacketWrappers/EffectPacket.h | 3 +++ src/servers/sapphire_zone/Script/ScriptMgr.cpp | 2 +- 7 files changed, 15 insertions(+), 7 deletions(-) diff --git a/deps/watchdog/Watchdog.h b/deps/watchdog/Watchdog.h index 20f90f10..735c0c6e 100644 --- a/deps/watchdog/Watchdog.h +++ b/deps/watchdog/Watchdog.h @@ -30,6 +30,7 @@ #include #include +#include #include namespace ci { namespace fs = std::experimental::filesystem; } @@ -319,4 +320,4 @@ protected: std::atomic mWatching; std::unique_ptr mThread; std::map mFileWatchers; -}; \ No newline at end of file +}; diff --git a/src/servers/sapphire_zone/Action/ActionCollision.cpp b/src/servers/sapphire_zone/Action/ActionCollision.cpp index 34d342d0..b3169afb 100644 --- a/src/servers/sapphire_zone/Action/ActionCollision.cpp +++ b/src/servers/sapphire_zone/Action/ActionCollision.cpp @@ -9,6 +9,7 @@ #include "Actor/Player.h" #include +#include using namespace Core::Entity; using namespace Core::Common; diff --git a/src/servers/sapphire_zone/Actor/BNpcTemplate.cpp b/src/servers/sapphire_zone/Actor/BNpcTemplate.cpp index 2d36dfe6..c313ac13 100644 --- a/src/servers/sapphire_zone/Actor/BNpcTemplate.cpp +++ b/src/servers/sapphire_zone/Actor/BNpcTemplate.cpp @@ -1,5 +1,6 @@ #include "BNpcTemplate.h" #include +#include Core::Entity::BNpcTemplate::BNpcTemplate( uint32_t id, uint32_t baseId, uint32_t nameId, uint64_t weaponMain, uint64_t weaponSub, uint8_t aggressionMode, uint8_t enemyType, uint8_t onlineStatus, uint8_t pose, @@ -19,10 +20,10 @@ Core::Entity::BNpcTemplate::BNpcTemplate( uint32_t id, uint32_t baseId, uint32_t { if( modelEquip ) - memcpy( m_modelEquip, modelEquip, sizeof( m_modelEquip ) ); + std::memcpy( m_modelEquip, modelEquip, sizeof( m_modelEquip ) ); if( customize ) - memcpy( m_customize, customize, sizeof( m_customize ) ); + std::memcpy( m_customize, customize, sizeof( m_customize ) ); } diff --git a/src/servers/sapphire_zone/Actor/Player.cpp b/src/servers/sapphire_zone/Actor/Player.cpp index 3c0f6bef..fbc8b794 100644 --- a/src/servers/sapphire_zone/Actor/Player.cpp +++ b/src/servers/sapphire_zone/Actor/Player.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include "Session.h" #include "Player.h" @@ -1466,7 +1467,7 @@ uint32_t Core::Entity::Player::getCFPenaltyMinutes() const return 0; auto deltaTime = endTimestamp - currentTimestamp; - return static_cast< uint32_t > ( ceil( static_cast< float > (deltaTime) / 60 ) ); + return static_cast< uint32_t > ( std::ceil( static_cast< float > (deltaTime) / 60 ) ); } void Core::Entity::Player::setCFPenaltyMinutes( uint32_t minutes ) @@ -1680,8 +1681,8 @@ void Core::Entity::Player::teleportQuery( uint16_t aetheryteId ) // calculate cost - does not apply for favorite points or homepoints neither checks for aether tickets auto cost = static_cast< uint16_t > ( - ( sqrt( pow( fromAetheryte->aetherstreamX - targetAetheryte->aetherstreamX, 2 ) + - pow( fromAetheryte->aetherstreamY - targetAetheryte->aetherstreamY, 2 ) ) / 2 ) + 100 ); + ( std::sqrt( std::pow( fromAetheryte->aetherstreamX - targetAetheryte->aetherstreamX, 2 ) + + std::pow( fromAetheryte->aetherstreamY - targetAetheryte->aetherstreamY, 2 ) ) / 2 ) + 100 ); // cap at 999 gil cost = cost > uint16_t{ 999 } ? uint16_t{ 999 } : cost; diff --git a/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp b/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp index 5d87b0d3..784ed338 100644 --- a/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp +++ b/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include "DebugCommand.h" #include "DebugCommandHandler.h" diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/EffectPacket.h b/src/servers/sapphire_zone/Network/PacketWrappers/EffectPacket.h index d3110332..245f8792 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/EffectPacket.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/EffectPacket.h @@ -4,6 +4,9 @@ #include #include #include "Forwards.h" +#include +#include +#include namespace Core { namespace Network { diff --git a/src/servers/sapphire_zone/Script/ScriptMgr.cpp b/src/servers/sapphire_zone/Script/ScriptMgr.cpp index 1f4417c4..1c163ead 100644 --- a/src/servers/sapphire_zone/Script/ScriptMgr.cpp +++ b/src/servers/sapphire_zone/Script/ScriptMgr.cpp @@ -140,7 +140,7 @@ bool Core::Scripting::ScriptMgr::loadDir( const std::string& dirname, std::set< { if( fs::is_regular_file( i ) && fs::path( i ).extension() == ext ) { - files.insert( fs::path( i ) ); + files.insert( fs::path( i ).string() ); } }