fix(Script/Command): Build (#6159)

* fix(Script/Command): Build

* codestyle ci is weird

* Update MovementHandler.cpp

* Update cs_server.cpp

* Update cs_server.cpp
This commit is contained in:
Kitzunu
2021-05-31 16:51:34 +02:00
committed by GitHub
parent 897a02bb75
commit ca27ce5e37
2 changed files with 13 additions and 16 deletions

View File

@@ -200,7 +200,6 @@ void WorldSession::HandleMoveWorldportAck()
}
}
bool allowMount = !mEntry->IsDungeon() || mEntry->IsBattlegroundOrArena();
if (mInstance)
{
@@ -605,7 +604,6 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket& recvData)
}
// continue parse packet
recvData >> unk1; // counter or moveEvent
MovementInfo movementInfo;
@@ -613,7 +611,6 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket& recvData)
ReadMovementInfo(recvData, &movementInfo);
recvData >> newspeed;
/*----------------*/
// client ACK send one packet for mounted/run case and need skip all except last from its
// in other cases anti-cheat check can be fail in false case
@@ -894,16 +891,15 @@ void WorldSession::HandleTimeSyncResp(WorldPacket& recvData)
uint32 roundTripDuration = getMSTimeDiff(serverTimeAtSent, recvData.GetReceivedTime());
uint32 lagDelay = roundTripDuration / 2;
/*
clockDelta = serverTime - clientTime
where
serverTime: time that was displayed on the clock of the SERVER at the moment when the client processed the SMSG_TIME_SYNC_REQUEST packet.
clientTime: time that was displayed on the clock of the CLIENT at the moment when the client processed the SMSG_TIME_SYNC_REQUEST packet.
// clockDelta = serverTime - clientTime
// where
// serverTime: time that was displayed on the clock of the SERVER at the moment when the client processed the SMSG_TIME_SYNC_REQUEST packet.
// clientTime: time that was displayed on the clock of the CLIENT at the moment when the client processed the SMSG_TIME_SYNC_REQUEST packet.
// Once clockDelta has been computed, we can compute the time of an event on server clock when we know the time of that same event on the client clock,
// using the following relation:
// serverTime = clockDelta + clientTime
Once clockDelta has been computed, we can compute the time of an event on server clock when we know the time of that same event on the client clock,
using the following relation:
serverTime = clockDelta + clientTime
*/
int64 clockDelta = (int64)serverTimeAtSent + (int64)lagDelay - (int64)clientTimestamp;
_timeSyncClockDeltaQueue.put(std::pair<int64, uint32>(clockDelta, roundTripDuration));
ComputeNewClockDelta();

View File

@@ -15,15 +15,16 @@ EndScriptData */
#include "Chat.h"
#include "Config.h"
#include "GitRevision.h"
#include "VMapManager2.h"
#include "VMapFactory.h"
#include "Language.h"
#include "MySQLThreading.h"
#include "ObjectAccessor.h"
#include "Player.h"
#include "Realm.h"
#include "ScriptMgr.h"
#include "ServerMotd.h"
#include "StringConvert.h"
#include "VMapFactory.h"
#include "VMapManager2.h"
#include <boost/filesystem/operations.hpp>
#include <boost/version.hpp>
#include <openssl/crypto.h>
@@ -109,9 +110,9 @@ public:
dbPort = (*res)[0].GetUInt16();
if (dbPort)
dbPortOutput = acore::StringFormat("Realmlist (Realm Id: %u) configured in port %" PRIu16, realm.Id.Realm, dbPort);
dbPortOutput = Acore::StringFormat("Realmlist (Realm Id: %u) configured in port %" PRIu16, realm.Id.Realm, dbPort);
else
dbPortOutput = acore::StringFormat("Realm Id: %u not found in `realmlist` table. Please check your setup", realm.Id.Realm);
dbPortOutput = Acore::StringFormat("Realm Id: %u not found in `realmlist` table. Please check your setup", realm.Id.Realm);
}
handler->PSendSysMessage("%s", GitRevision::GetFullVersion());