mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 14:07:46 +00:00
More CI fixes
This commit is contained in:
parent
b293ff9642
commit
cabb9b27f8
7 changed files with 15 additions and 7 deletions
1
deps/watchdog/Watchdog.h
vendored
1
deps/watchdog/Watchdog.h
vendored
|
@ -30,6 +30,7 @@
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
#include <experimental/filesystem>
|
#include <experimental/filesystem>
|
||||||
namespace ci { namespace fs = std::experimental::filesystem; }
|
namespace ci { namespace fs = std::experimental::filesystem; }
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "Actor/Player.h"
|
#include "Actor/Player.h"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
using namespace Core::Entity;
|
using namespace Core::Entity;
|
||||||
using namespace Core::Common;
|
using namespace Core::Common;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "BNpcTemplate.h"
|
#include "BNpcTemplate.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
Core::Entity::BNpcTemplate::BNpcTemplate( uint32_t id, uint32_t baseId, uint32_t nameId, uint64_t weaponMain, uint64_t weaponSub,
|
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,
|
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 )
|
if( modelEquip )
|
||||||
memcpy( m_modelEquip, modelEquip, sizeof( m_modelEquip ) );
|
std::memcpy( m_modelEquip, modelEquip, sizeof( m_modelEquip ) );
|
||||||
|
|
||||||
if( customize )
|
if( customize )
|
||||||
memcpy( m_customize, customize, sizeof( m_customize ) );
|
std::memcpy( m_customize, customize, sizeof( m_customize ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include <Network/PacketContainer.h>
|
#include <Network/PacketContainer.h>
|
||||||
#include <Network/CommonActorControl.h>
|
#include <Network/CommonActorControl.h>
|
||||||
#include <Network/PacketWrappers/EffectPacket.h>
|
#include <Network/PacketWrappers/EffectPacket.h>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
#include "Session.h"
|
#include "Session.h"
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
|
@ -1466,7 +1467,7 @@ uint32_t Core::Entity::Player::getCFPenaltyMinutes() const
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
auto deltaTime = endTimestamp - currentTimestamp;
|
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 )
|
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
|
// calculate cost - does not apply for favorite points or homepoints neither checks for aether tickets
|
||||||
auto cost = static_cast< uint16_t > (
|
auto cost = static_cast< uint16_t > (
|
||||||
( sqrt( pow( fromAetheryte->aetherstreamX - targetAetheryte->aetherstreamX, 2 ) +
|
( std::sqrt( std::pow( fromAetheryte->aetherstreamX - targetAetheryte->aetherstreamX, 2 ) +
|
||||||
pow( fromAetheryte->aetherstreamY - targetAetheryte->aetherstreamY, 2 ) ) / 2 ) + 100 );
|
std::pow( fromAetheryte->aetherstreamY - targetAetheryte->aetherstreamY, 2 ) ) / 2 ) + 100 );
|
||||||
|
|
||||||
// cap at 999 gil
|
// cap at 999 gil
|
||||||
cost = cost > uint16_t{ 999 } ? uint16_t{ 999 } : cost;
|
cost = cost > uint16_t{ 999 } ? uint16_t{ 999 } : cost;
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <Logging/Logger.h>
|
#include <Logging/Logger.h>
|
||||||
#include <Exd/ExdDataGenerated.h>
|
#include <Exd/ExdDataGenerated.h>
|
||||||
#include <Database/DatabaseDef.h>
|
#include <Database/DatabaseDef.h>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
#include "DebugCommand.h"
|
#include "DebugCommand.h"
|
||||||
#include "DebugCommandHandler.h"
|
#include "DebugCommandHandler.h"
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
#include <Network/GamePacketNew.h>
|
#include <Network/GamePacketNew.h>
|
||||||
#include <Network/PacketDef/Zone/ServerZoneDef.h>
|
#include <Network/PacketDef/Zone/ServerZoneDef.h>
|
||||||
#include "Forwards.h"
|
#include "Forwards.h"
|
||||||
|
#include <string>
|
||||||
|
#include <cstring>
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
namespace Network {
|
namespace Network {
|
||||||
|
|
|
@ -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 )
|
if( fs::is_regular_file( i ) && fs::path( i ).extension() == ext )
|
||||||
{
|
{
|
||||||
files.insert( fs::path( i ) );
|
files.insert( fs::path( i ).string() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue