mirror of
https://bitbucket.org/seefoe/src.git
synced 2026-07-30 00:15:46 -04:00
stdc++6 build fixes
This commit is contained in:
@@ -33,9 +33,10 @@
|
||||
#include "serverNetworkMessages/UploadCharacterMessage.h"
|
||||
#include "sharedLog/Log.h"
|
||||
#include "sharedNetworkMessages/ConsoleChannelMessages.h"
|
||||
#include "sharedNetworkMessages/GenericValueTypeMessage.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
#include "sharedNetworkMessages/GenericValueTypeMessage.h"
|
||||
|
||||
#include "sharedFoundation/CrcConstexpr.hpp"
|
||||
|
||||
// ======================================================================
|
||||
@@ -126,11 +127,16 @@ void GameServerConnection::onReceive(Archive::ByteStream const &message)
|
||||
}
|
||||
case constcrc("TransferReplyNameValidation") :
|
||||
{
|
||||
GenericValueTypeMessage<std::pair<std::string, TransferCharacterData> > const replyNameValidation(ri);
|
||||
GenericValueTypeMessage<std::map<std::string, TransferCharacterData> > const replyNameValidation(ri);
|
||||
auto i = replyNameValidation.getValue().begin();
|
||||
|
||||
if (replyNameValidation.getValue().second.getTransferRequestSource() == TransferRequestMoveValidation::TRS_transfer_server)
|
||||
if (i == replyNameValidation.getValue().end()) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (i->second.getTransferRequestSource() == TransferRequestMoveValidation::TRS_transfer_server)
|
||||
{
|
||||
LOG("CustomerService", ("CharacterTransfer: Received TransferReplyNameValidation from GameServer, forwarding to TransferServer : %s", replyNameValidation.getValue().second.toString().c_str()));
|
||||
LOG("CustomerService", ("CharacterTransfer: Received TransferReplyNameValidation from GameServer, forwarding to TransferServer : %s", i->second.toString().c_str()));
|
||||
CentralServer::getInstance().sendToTransferServer(replyNameValidation);
|
||||
}
|
||||
else
|
||||
@@ -138,14 +144,14 @@ void GameServerConnection::onReceive(Archive::ByteStream const &message)
|
||||
// pass reply back to the source galaxy for handling, which is to
|
||||
// either display an error message to the user if the request failed,
|
||||
// or to start the transfer process if the request succeeds
|
||||
LOG("CustomerService", ("CharacterTransfer: Received TransferReplyNameValidation from GameServer, forwarding to source galaxy CentralServer : %s", replyNameValidation.getValue().second.toString().c_str()));
|
||||
LOG("CustomerService", ("CharacterTransfer: Received TransferReplyNameValidation from GameServer, forwarding to source galaxy CentralServer : %s", i->second.toString().c_str()));
|
||||
CentralServer::getInstance().sendToArbitraryLoginServer(replyNameValidation);
|
||||
|
||||
// if the request succeeded, also disconnect any clients with a connection to SWG services on this (the target) galaxy
|
||||
if (replyNameValidation.getValue().second.getIsValidName() && (replyNameValidation.getValue().second.getTransferRequestSource() != TransferRequestMoveValidation::TRS_ingame_freects_command_validate) && (replyNameValidation.getValue().second.getTransferRequestSource() != TransferRequestMoveValidation::TRS_ingame_cts_command_validate))
|
||||
if (i->second.getIsValidName() && (i->second.getTransferRequestSource() != TransferRequestMoveValidation::TRS_ingame_freects_command_validate) && (i->second.getTransferRequestSource() != TransferRequestMoveValidation::TRS_ingame_cts_command_validate))
|
||||
{
|
||||
GenericValueTypeMessage<unsigned int> kickSource("TransferKickConnectedClients", replyNameValidation.getValue().second.getSourceStationId());
|
||||
GenericValueTypeMessage<unsigned int> kickDestination("TransferKickConnectedClients", replyNameValidation.getValue().second.getDestinationStationId());
|
||||
GenericValueTypeMessage<unsigned int> kickSource("TransferKickConnectedClients", i->second.getSourceStationId());
|
||||
GenericValueTypeMessage<unsigned int> kickDestination("TransferKickConnectedClients", i->second.getDestinationStationId());
|
||||
CentralServer::getInstance().sendToAllLoginServers(kickSource);
|
||||
CentralServer::getInstance().sendToAllLoginServers(kickDestination);
|
||||
CentralServer::getInstance().sendToAllConnectionServers(kickSource, true);
|
||||
|
||||
@@ -228,27 +228,32 @@ void CentralServerConnection::onReceive(const Archive::ByteStream & message)
|
||||
}
|
||||
case constcrc("TransferReplyNameValidation") :
|
||||
{
|
||||
const GenericValueTypeMessage<std::pair<std::string, TransferCharacterData> > replyNameValidation(ri);
|
||||
if(!replyNameValidation.getValue().second.getIsMoveRequest())
|
||||
const GenericValueTypeMessage<std::map<std::string, TransferCharacterData> > replyNameValidation(ri);
|
||||
auto i = replyNameValidation.getValue().begin();
|
||||
|
||||
if (i == replyNameValidation.getValue().end()) {
|
||||
break;
|
||||
}
|
||||
|
||||
if(!i->second.getIsMoveRequest())
|
||||
{
|
||||
LOG("CustomerService", ("CharacterTransfer: Received replyNameValidation for move validation request. (%s) %s", replyNameValidation.getValue().first.c_str(), replyNameValidation.getValue().second.toString().c_str()));
|
||||
TransferServer::replyValidateMove(replyNameValidation.getValue().second);
|
||||
LOG("CustomerService", ("CharacterTransfer: Received replyNameValidation for move validation request. (%s) %s", i->first.c_str(), i->second.toString().c_str()));
|
||||
TransferServer::replyValidateMove(i->second);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(TransferServer::isRename(replyNameValidation.getValue().second))
|
||||
if(TransferServer::isRename(i->second))
|
||||
{
|
||||
LOG("CustomerService", ("CharacterTransfer: Received replyNameValidation for rename request, starting character rename protocol. (%s) %s", replyNameValidation.getValue().first.c_str(), replyNameValidation.getValue().second.toString().c_str()));
|
||||
const GenericValueTypeMessage<TransferCharacterData> renameCharacter("TransferRenameCharacter", replyNameValidation.getValue().second);
|
||||
CentralServerConnection * centralServerConnection = CentralServerConnection::getCentralServerConnectionForGalaxy(replyNameValidation.getValue().second.getSourceGalaxy());
|
||||
LOG("CustomerService", ("CharacterTransfer: Received replyNameValidation for rename request, starting character rename protocol. (%s) %s", i->first.c_str(), i->second.toString().c_str()));
|
||||
const GenericValueTypeMessage<TransferCharacterData> renameCharacter("TransferRenameCharacter", i->second);
|
||||
CentralServerConnection * centralServerConnection = CentralServerConnection::getCentralServerConnectionForGalaxy(i->second.getSourceGalaxy());
|
||||
if(centralServerConnection)
|
||||
{
|
||||
centralServerConnection->send(renameCharacter, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
TransferServer::transferCreateCharacterFailed(replyNameValidation.getValue().second);
|
||||
}
|
||||
TransferServer::transferCreateCharacterFailed(i->second); }
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user