1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-25 05:57:45 +00:00

More CI fixes

This commit is contained in:
mordred 2018-10-26 14:11:02 +02:00
parent b293ff9642
commit cabb9b27f8
7 changed files with 15 additions and 7 deletions

View file

@ -30,6 +30,7 @@
#include <atomic>
#include <mutex>
#include <functional>
#include <experimental/filesystem>
namespace ci { namespace fs = std::experimental::filesystem; }
@ -319,4 +320,4 @@ protected:
std::atomic<bool> mWatching;
std::unique_ptr<std::thread> mThread;
std::map<std::string,Watcher> mFileWatchers;
};
};

View file

@ -9,6 +9,7 @@
#include "Actor/Player.h"
#include <cmath>
#include <cassert>
using namespace Core::Entity;
using namespace Core::Common;

View file

@ -1,5 +1,6 @@
#include "BNpcTemplate.h"
#include <string>
#include <cstring>
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 ) );
}

View file

@ -6,6 +6,7 @@
#include <Network/PacketContainer.h>
#include <Network/CommonActorControl.h>
#include <Network/PacketWrappers/EffectPacket.h>
#include <cmath>
#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;

View file

@ -9,6 +9,7 @@
#include <Logging/Logger.h>
#include <Exd/ExdDataGenerated.h>
#include <Database/DatabaseDef.h>
#include <cmath>
#include "DebugCommand.h"
#include "DebugCommandHandler.h"

View file

@ -4,6 +4,9 @@
#include <Network/GamePacketNew.h>
#include <Network/PacketDef/Zone/ServerZoneDef.h>
#include "Forwards.h"
#include <string>
#include <cstring>
#include <cassert>
namespace Core {
namespace Network {

View file

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