mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-09-29 14:12:54 -04:00
Added serverNetworkMessages library
This commit is contained in:
+57
@@ -0,0 +1,57 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// AccountFeatureIdRequest.cpp
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/AccountFeatureIdRequest.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
AccountFeatureIdRequest::AccountFeatureIdRequest(NetworkId const & requester, uint32 gameServer, NetworkId const & target, StationId targetStationId, uint32 gameCode, RequestReason requestReason) :
|
||||
GameNetworkMessage("AccountFeatureIdRequest"),
|
||||
m_requester(requester),
|
||||
m_gameServer(gameServer),
|
||||
m_target(target),
|
||||
m_targetStationId(targetStationId),
|
||||
m_gameCode(gameCode),
|
||||
m_requestReason(static_cast<int8>(requestReason))
|
||||
{
|
||||
addVariable(m_requester);
|
||||
addVariable(m_gameServer);
|
||||
addVariable(m_target);
|
||||
addVariable(m_targetStationId);
|
||||
addVariable(m_gameCode);
|
||||
addVariable(m_requestReason);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
AccountFeatureIdRequest::AccountFeatureIdRequest(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("AccountFeatureIdRequest"),
|
||||
m_requester(),
|
||||
m_gameServer(),
|
||||
m_target(),
|
||||
m_targetStationId(),
|
||||
m_gameCode(),
|
||||
m_requestReason()
|
||||
{
|
||||
addVariable(m_requester);
|
||||
addVariable(m_gameServer);
|
||||
addVariable(m_target);
|
||||
addVariable(m_targetStationId);
|
||||
addVariable(m_gameCode);
|
||||
addVariable(m_requestReason);
|
||||
|
||||
unpack(source); //lint !e1506 Call to virtual from constructor
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
AccountFeatureIdRequest::~AccountFeatureIdRequest()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// AccountFeatureIdRequest.h
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_AccountFeatureIdRequest_H
|
||||
#define INCLUDED_AccountFeatureIdRequest_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedFoundation/StationId.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class AccountFeatureIdRequest : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
enum RequestReason {RR_Reload, RR_ConsoleCommandReloadRequest, RR_ReloadRewardCheck};
|
||||
|
||||
AccountFeatureIdRequest (NetworkId const & requester, uint32 gameServer, NetworkId const & target, StationId targetStationId, uint32 gameCode, RequestReason requestReason);
|
||||
AccountFeatureIdRequest (Archive::ReadIterator & source);
|
||||
virtual ~AccountFeatureIdRequest ();
|
||||
|
||||
NetworkId const & getRequester() const;
|
||||
uint32 getGameServer() const;
|
||||
NetworkId const & getTarget() const;
|
||||
StationId getTargetStationId() const;
|
||||
uint32 getGameCode() const;
|
||||
RequestReason getRequestReason() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<NetworkId> m_requester;
|
||||
Archive::AutoVariable<uint32> m_gameServer;
|
||||
Archive::AutoVariable<NetworkId> m_target;
|
||||
Archive::AutoVariable<StationId> m_targetStationId;
|
||||
Archive::AutoVariable<uint32> m_gameCode;
|
||||
Archive::AutoVariable<int8> m_requestReason;
|
||||
|
||||
private:
|
||||
AccountFeatureIdRequest();
|
||||
AccountFeatureIdRequest(const AccountFeatureIdRequest&);
|
||||
AccountFeatureIdRequest& operator= (const AccountFeatureIdRequest&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId const & AccountFeatureIdRequest::getRequester() const
|
||||
{
|
||||
return m_requester.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 AccountFeatureIdRequest::getGameServer() const
|
||||
{
|
||||
return m_gameServer.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId const & AccountFeatureIdRequest::getTarget() const
|
||||
{
|
||||
return m_target.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline StationId AccountFeatureIdRequest::getTargetStationId() const
|
||||
{
|
||||
return m_targetStationId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 AccountFeatureIdRequest::getGameCode() const
|
||||
{
|
||||
return m_gameCode.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline AccountFeatureIdRequest::RequestReason AccountFeatureIdRequest::getRequestReason() const
|
||||
{
|
||||
return static_cast<RequestReason>(m_requestReason.get());
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// AccountFeatureIdResponse.cpp
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/AccountFeatureIdResponse.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
AccountFeatureIdResponse::AccountFeatureIdResponse(NetworkId const & requester, uint32 gameServer, NetworkId const & target, StationId targetStationId, uint32 gameCode, AccountFeatureIdRequest::RequestReason requestReason, unsigned int resultCode, bool resultCameFromSession, std::map<uint32, int> const & featureIds, std::map<uint32, std::string> const & sessionFeatureIdsData, const char * sessionResultString /*= NULL*/, const char * sessionResultText /*= NULL*/) :
|
||||
GameNetworkMessage("AccountFeatureIdResponse"),
|
||||
m_requester(requester),
|
||||
m_gameServer(gameServer),
|
||||
m_target(target),
|
||||
m_targetStationId(targetStationId),
|
||||
m_gameCode(gameCode),
|
||||
m_requestReason(static_cast<int8>(requestReason)),
|
||||
m_resultCode(resultCode),
|
||||
m_resultCameFromSession(resultCameFromSession),
|
||||
m_featureIds(featureIds),
|
||||
m_sessionFeatureIdsData(sessionFeatureIdsData),
|
||||
m_sessionResultString(),
|
||||
m_sessionResultText()
|
||||
{
|
||||
if (sessionResultString)
|
||||
m_sessionResultString.set(std::string(sessionResultString));
|
||||
|
||||
if (sessionResultText)
|
||||
m_sessionResultText.set(std::string(sessionResultText));
|
||||
|
||||
addVariable(m_requester);
|
||||
addVariable(m_gameServer);
|
||||
addVariable(m_target);
|
||||
addVariable(m_targetStationId);
|
||||
addVariable(m_gameCode);
|
||||
addVariable(m_requestReason);
|
||||
addVariable(m_resultCode);
|
||||
addVariable(m_resultCameFromSession);
|
||||
addVariable(m_featureIds);
|
||||
addVariable(m_sessionFeatureIdsData);
|
||||
addVariable(m_sessionResultString);
|
||||
addVariable(m_sessionResultText);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
AccountFeatureIdResponse::AccountFeatureIdResponse(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("AccountFeatureIdResponse"),
|
||||
m_requester(),
|
||||
m_gameServer(),
|
||||
m_target(),
|
||||
m_targetStationId(),
|
||||
m_gameCode(),
|
||||
m_requestReason(),
|
||||
m_resultCode(),
|
||||
m_resultCameFromSession(),
|
||||
m_featureIds(),
|
||||
m_sessionFeatureIdsData(),
|
||||
m_sessionResultString(),
|
||||
m_sessionResultText()
|
||||
{
|
||||
addVariable(m_requester);
|
||||
addVariable(m_gameServer);
|
||||
addVariable(m_target);
|
||||
addVariable(m_targetStationId);
|
||||
addVariable(m_gameCode);
|
||||
addVariable(m_requestReason);
|
||||
addVariable(m_resultCode);
|
||||
addVariable(m_resultCameFromSession);
|
||||
addVariable(m_featureIds);
|
||||
addVariable(m_sessionFeatureIdsData);
|
||||
addVariable(m_sessionResultString);
|
||||
addVariable(m_sessionResultText);
|
||||
|
||||
unpack(source); //lint !e1506 Call to virtual from constructor
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
AccountFeatureIdResponse::~AccountFeatureIdResponse()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// AccountFeatureIdResponse.h
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_AccountFeatureIdResponse_H
|
||||
#define INCLUDED_AccountFeatureIdResponse_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/AccountFeatureIdRequest.h"
|
||||
#include "sharedFoundation/StationId.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class AccountFeatureIdResponse : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
AccountFeatureIdResponse (NetworkId const & requester, uint32 gameServer, NetworkId const & target, StationId targetStationId, uint32 gameCode, AccountFeatureIdRequest::RequestReason requestReason, unsigned int resultCode, bool resultCameFromSession, std::map<uint32, int> const & featureIds, std::map<uint32, std::string> const & sessionFeatureIdsData, const char * sessionResultString = NULL, const char * sessionResultText = NULL);
|
||||
AccountFeatureIdResponse (Archive::ReadIterator & source);
|
||||
virtual ~AccountFeatureIdResponse ();
|
||||
|
||||
NetworkId const & getRequester() const;
|
||||
uint32 getGameServer() const;
|
||||
NetworkId const & getTarget() const;
|
||||
StationId getTargetStationId() const;
|
||||
uint32 getGameCode() const;
|
||||
AccountFeatureIdRequest::RequestReason getRequestReason() const;
|
||||
unsigned int getResultCode() const; // 0 = SUCCESS
|
||||
bool getResultCameFromSession() const;
|
||||
std::map<uint32, int> const & getFeatureIds() const;
|
||||
std::map<uint32, std::string> const & getSessionFeatureIdsData() const;
|
||||
std::string const & getSessionResultString() const;
|
||||
std::string const & getSessionResultText() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<NetworkId> m_requester;
|
||||
Archive::AutoVariable<uint32> m_gameServer;
|
||||
Archive::AutoVariable<NetworkId> m_target;
|
||||
Archive::AutoVariable<StationId> m_targetStationId;
|
||||
Archive::AutoVariable<uint32> m_gameCode;
|
||||
Archive::AutoVariable<int8> m_requestReason;
|
||||
Archive::AutoVariable<unsigned int> m_resultCode; // 0 = SUCCESS
|
||||
Archive::AutoVariable<bool> m_resultCameFromSession;
|
||||
Archive::AutoVariable<std::map<uint32, int> > m_featureIds;
|
||||
Archive::AutoVariable<std::map<uint32, std::string> > m_sessionFeatureIdsData;
|
||||
Archive::AutoVariable<std::string> m_sessionResultString;
|
||||
Archive::AutoVariable<std::string> m_sessionResultText;
|
||||
|
||||
private:
|
||||
AccountFeatureIdResponse();
|
||||
AccountFeatureIdResponse(const AccountFeatureIdResponse&);
|
||||
AccountFeatureIdResponse& operator= (const AccountFeatureIdResponse&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId const & AccountFeatureIdResponse::getRequester() const
|
||||
{
|
||||
return m_requester.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 AccountFeatureIdResponse::getGameServer() const
|
||||
{
|
||||
return m_gameServer.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId const & AccountFeatureIdResponse::getTarget() const
|
||||
{
|
||||
return m_target.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline StationId AccountFeatureIdResponse::getTargetStationId() const
|
||||
{
|
||||
return m_targetStationId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 AccountFeatureIdResponse::getGameCode() const
|
||||
{
|
||||
return m_gameCode.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline AccountFeatureIdRequest::RequestReason AccountFeatureIdResponse::getRequestReason() const
|
||||
{
|
||||
return static_cast<AccountFeatureIdRequest::RequestReason>(m_requestReason.get());
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline unsigned int AccountFeatureIdResponse::getResultCode() const
|
||||
{
|
||||
return m_resultCode.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline bool AccountFeatureIdResponse::getResultCameFromSession() const
|
||||
{
|
||||
return m_resultCameFromSession.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline std::map<uint32, int> const & AccountFeatureIdResponse::getFeatureIds() const
|
||||
{
|
||||
return m_featureIds.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline std::map<uint32, std::string> const & AccountFeatureIdResponse::getSessionFeatureIdsData() const
|
||||
{
|
||||
return m_sessionFeatureIdsData.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline std::string const & AccountFeatureIdResponse::getSessionResultString() const
|
||||
{
|
||||
return m_sessionResultString.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline std::string const & AccountFeatureIdResponse::getSessionResultText() const
|
||||
{
|
||||
return m_sessionResultText.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
//========================================================================
|
||||
//
|
||||
// AddCharacterMessage.cpp - tells Centralserver we want all the objects in a chunk.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/AddCharacterMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
AddCharacterMessage::AddCharacterMessage (uint32 accountNumber, NetworkId objectId, uint32 process, const Unicode::String &name, bool special) :
|
||||
GameNetworkMessage("AddCharacterMessage"),
|
||||
m_accountNumber(accountNumber),
|
||||
m_objectId(objectId),
|
||||
m_process(process),
|
||||
m_name(name),
|
||||
m_special(special)
|
||||
{
|
||||
addVariable(m_accountNumber);
|
||||
addVariable(m_objectId);
|
||||
addVariable(m_process);
|
||||
addVariable(m_name);
|
||||
addVariable(m_special);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
AddCharacterMessage::AddCharacterMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("AddCharacterMessage"),
|
||||
m_accountNumber(),
|
||||
m_objectId(),
|
||||
m_process(),
|
||||
m_name(),
|
||||
m_special()
|
||||
{
|
||||
addVariable(m_accountNumber);
|
||||
addVariable(m_objectId);
|
||||
addVariable(m_process);
|
||||
addVariable(m_name);
|
||||
addVariable(m_special);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
AddCharacterMessage::~AddCharacterMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// AddCharacterMessage.h
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_AddCharacterMessage_H
|
||||
#define INCLUDED_AddCharacterMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Add a character to an account.
|
||||
* Sent from: Game Server
|
||||
* Sent to: Database Server
|
||||
* Action: Update the database to reflect that the specified character
|
||||
* belongs to the specified account. After it is persisted, tell Central
|
||||
* that the character is ready.
|
||||
*/
|
||||
class AddCharacterMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
AddCharacterMessage (uint32 accountNumber, NetworkId objectId, uint32 process, const Unicode::String &name, bool special);
|
||||
AddCharacterMessage (Archive::ReadIterator & source);
|
||||
~AddCharacterMessage ();
|
||||
|
||||
uint32 getAccountNumber() const;
|
||||
NetworkId getObjectId() const;
|
||||
uint32 getProcess() const;
|
||||
const Unicode::String &getName() const;
|
||||
bool getSpecial() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_accountNumber;
|
||||
Archive::AutoVariable<NetworkId> m_objectId;
|
||||
Archive::AutoVariable<uint32> m_process;
|
||||
Archive::AutoVariable<Unicode::String> m_name;
|
||||
Archive::AutoVariable<bool> m_special;
|
||||
|
||||
AddCharacterMessage();
|
||||
AddCharacterMessage(const AddCharacterMessage&);
|
||||
AddCharacterMessage& operator= (const AddCharacterMessage&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 AddCharacterMessage::getAccountNumber() const
|
||||
{
|
||||
return m_accountNumber.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId AddCharacterMessage::getObjectId() const
|
||||
{
|
||||
return m_objectId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 AddCharacterMessage::getProcess() const
|
||||
{
|
||||
return m_process.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const Unicode::String &AddCharacterMessage::getName() const
|
||||
{
|
||||
return m_name.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline bool AddCharacterMessage::getSpecial() const
|
||||
{
|
||||
return m_special.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
//========================================================================
|
||||
//
|
||||
// AddOIDBlockMessage.cpp
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/AddObjectIdBlockMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
AddOIDBlockMessage::AddOIDBlockMessage(uint32 serverId, const NetworkId &start, const NetworkId &end, bool logRequest) :
|
||||
GameNetworkMessage("AddOIDBlockMessage"),
|
||||
m_serverId(serverId),
|
||||
m_start(start),
|
||||
m_end(end),
|
||||
m_logRequest(logRequest)
|
||||
{
|
||||
addVariable(m_serverId);
|
||||
addVariable(m_start);
|
||||
addVariable(m_end);
|
||||
addVariable(m_logRequest);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
AddOIDBlockMessage::AddOIDBlockMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("AddOIDBlockMessage")
|
||||
{
|
||||
addVariable(m_serverId);
|
||||
addVariable(m_start);
|
||||
addVariable(m_end);
|
||||
addVariable(m_logRequest);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
AddOIDBlockMessage::~AddOIDBlockMessage()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
//========================================================================
|
||||
//
|
||||
// AddOIDBlockMessage.h
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_AddOIDBlockMessage_H
|
||||
#define _INCLUDED_AddOIDBlockMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class AddOIDBlockMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
AddOIDBlockMessage (uint32 serverId, const NetworkId &start, const NetworkId &end, bool logRequest);
|
||||
AddOIDBlockMessage (Archive::ReadIterator & source);
|
||||
~AddOIDBlockMessage ();
|
||||
|
||||
uint32 getServerId(void) const;
|
||||
const NetworkId &getStart(void) const;
|
||||
const NetworkId &getEnd(void) const;
|
||||
bool getLogRequest(void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_serverId;
|
||||
Archive::AutoVariable<NetworkId> m_start;
|
||||
Archive::AutoVariable<NetworkId> m_end;
|
||||
Archive::AutoVariable<bool> m_logRequest;
|
||||
|
||||
AddOIDBlockMessage();
|
||||
AddOIDBlockMessage(const AddOIDBlockMessage&);
|
||||
AddOIDBlockMessage& operator= (const AddOIDBlockMessage&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline uint32 AddOIDBlockMessage::getServerId(void) const
|
||||
{
|
||||
return m_serverId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId &AddOIDBlockMessage::getStart(void) const
|
||||
{
|
||||
return m_start.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId &AddOIDBlockMessage::getEnd(void) const
|
||||
{
|
||||
return m_end.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline bool AddOIDBlockMessage::getLogRequest(void) const
|
||||
{
|
||||
return m_logRequest.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif // _INCLUDED_AddOIDBlockMessage_H
|
||||
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// AdjustAccountFeatureIdRequest.cpp
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/AdjustAccountFeatureIdRequest.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
AdjustAccountFeatureIdRequest::AdjustAccountFeatureIdRequest(NetworkId const & requestingPlayer, uint32 gameServer, NetworkId const & targetPlayer, std::string const & targetPlayerDescription, StationId targetStationId, NetworkId const & targetItem, std::string const & targetItemDescription, uint32 gameCode, uint32 featureId, int adjustment) :
|
||||
GameNetworkMessage("AdjustAccountFeatureIdRequest"),
|
||||
m_requestingPlayer(requestingPlayer),
|
||||
m_gameServer(gameServer),
|
||||
m_targetPlayer(targetPlayer),
|
||||
m_targetPlayerDescription(targetPlayerDescription),
|
||||
m_targetStationId(targetStationId),
|
||||
m_targetItem(targetItem),
|
||||
m_targetItemDescription(targetItemDescription),
|
||||
m_gameCode(gameCode),
|
||||
m_featureId(featureId),
|
||||
m_adjustment(adjustment)
|
||||
{
|
||||
addVariable(m_requestingPlayer);
|
||||
addVariable(m_gameServer);
|
||||
addVariable(m_targetPlayer);
|
||||
addVariable(m_targetPlayerDescription);
|
||||
addVariable(m_targetStationId);
|
||||
addVariable(m_targetItem);
|
||||
addVariable(m_targetItemDescription);
|
||||
addVariable(m_gameCode);
|
||||
addVariable(m_featureId);
|
||||
addVariable(m_adjustment);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
AdjustAccountFeatureIdRequest::AdjustAccountFeatureIdRequest(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("AdjustAccountFeatureIdRequest"),
|
||||
m_requestingPlayer(),
|
||||
m_gameServer(),
|
||||
m_targetPlayer(),
|
||||
m_targetPlayerDescription(),
|
||||
m_targetStationId(),
|
||||
m_targetItem(),
|
||||
m_targetItemDescription(),
|
||||
m_gameCode(),
|
||||
m_featureId(),
|
||||
m_adjustment()
|
||||
{
|
||||
addVariable(m_requestingPlayer);
|
||||
addVariable(m_gameServer);
|
||||
addVariable(m_targetPlayer);
|
||||
addVariable(m_targetPlayerDescription);
|
||||
addVariable(m_targetStationId);
|
||||
addVariable(m_targetItem);
|
||||
addVariable(m_targetItemDescription);
|
||||
addVariable(m_gameCode);
|
||||
addVariable(m_featureId);
|
||||
addVariable(m_adjustment);
|
||||
|
||||
unpack(source); //lint !e1506 Call to virtual from constructor
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
AdjustAccountFeatureIdRequest::~AdjustAccountFeatureIdRequest()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// AdjustAccountFeatureIdRequest.h
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_AdjustAccountFeatureIdRequest_H
|
||||
#define INCLUDED_AdjustAccountFeatureIdRequest_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedFoundation/StationId.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class AdjustAccountFeatureIdRequest : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
AdjustAccountFeatureIdRequest (NetworkId const & requestingPlayer, uint32 gameServer, NetworkId const & targetPlayer, std::string const & targetPlayerDescription, StationId targetStationId, NetworkId const & targetItem, std::string const & targetItemDescription, uint32 gameCode, uint32 featureId, int adjustment);
|
||||
AdjustAccountFeatureIdRequest (Archive::ReadIterator & source);
|
||||
virtual ~AdjustAccountFeatureIdRequest ();
|
||||
|
||||
NetworkId const & getRequestingPlayer() const;
|
||||
uint32 getGameServer() const;
|
||||
NetworkId const & getTargetPlayer() const;
|
||||
std::string const & getTargetPlayerDescription() const;
|
||||
StationId getTargetStationId() const;
|
||||
NetworkId const & getTargetItem() const;
|
||||
std::string const & getTargetItemDescription() const;
|
||||
uint32 getGameCode() const;
|
||||
uint32 getFeatureId() const;
|
||||
int getAdjustment() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<NetworkId> m_requestingPlayer;
|
||||
Archive::AutoVariable<uint32> m_gameServer;
|
||||
Archive::AutoVariable<NetworkId> m_targetPlayer;
|
||||
Archive::AutoVariable<std::string> m_targetPlayerDescription;
|
||||
Archive::AutoVariable<StationId> m_targetStationId;
|
||||
Archive::AutoVariable<NetworkId> m_targetItem;
|
||||
Archive::AutoVariable<std::string> m_targetItemDescription;
|
||||
Archive::AutoVariable<uint32> m_gameCode;
|
||||
Archive::AutoVariable<uint32> m_featureId;
|
||||
Archive::AutoVariable<int> m_adjustment;
|
||||
|
||||
private:
|
||||
AdjustAccountFeatureIdRequest();
|
||||
AdjustAccountFeatureIdRequest(const AdjustAccountFeatureIdRequest&);
|
||||
AdjustAccountFeatureIdRequest& operator= (const AdjustAccountFeatureIdRequest&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId const & AdjustAccountFeatureIdRequest::getRequestingPlayer() const
|
||||
{
|
||||
return m_requestingPlayer.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 AdjustAccountFeatureIdRequest::getGameServer() const
|
||||
{
|
||||
return m_gameServer.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId const & AdjustAccountFeatureIdRequest::getTargetPlayer() const
|
||||
{
|
||||
return m_targetPlayer.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline std::string const & AdjustAccountFeatureIdRequest::getTargetPlayerDescription() const
|
||||
{
|
||||
return m_targetPlayerDescription.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline StationId AdjustAccountFeatureIdRequest::getTargetStationId() const
|
||||
{
|
||||
return m_targetStationId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId const & AdjustAccountFeatureIdRequest::getTargetItem() const
|
||||
{
|
||||
return m_targetItem.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline std::string const & AdjustAccountFeatureIdRequest::getTargetItemDescription() const
|
||||
{
|
||||
return m_targetItemDescription.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 AdjustAccountFeatureIdRequest::getGameCode() const
|
||||
{
|
||||
return m_gameCode.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 AdjustAccountFeatureIdRequest::getFeatureId() const
|
||||
{
|
||||
return m_featureId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline int AdjustAccountFeatureIdRequest::getAdjustment() const
|
||||
{
|
||||
return m_adjustment.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// AdjustAccountFeatureIdResponse.cpp
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/AdjustAccountFeatureIdResponse.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
AdjustAccountFeatureIdResponse::AdjustAccountFeatureIdResponse(NetworkId const & requestingPlayer, uint32 gameServer, NetworkId const & targetPlayer, std::string const & targetPlayerDescription, StationId targetStationId, NetworkId const & targetItem, std::string const & targetItemDescription, uint32 gameCode, uint32 featureId, int oldValue, int newValue, unsigned int resultCode, bool resultCameFromSession, const char * sessionResultString /*= NULL*/, const char * sessionResultText /*= NULL*/) :
|
||||
GameNetworkMessage("AdjustAccountFeatureIdResponse"),
|
||||
m_requestingPlayer(requestingPlayer),
|
||||
m_gameServer(gameServer),
|
||||
m_targetPlayer(targetPlayer),
|
||||
m_targetPlayerDescription(targetPlayerDescription),
|
||||
m_targetStationId(targetStationId),
|
||||
m_targetItem(targetItem),
|
||||
m_targetItemDescription(targetItemDescription),
|
||||
m_gameCode(gameCode),
|
||||
m_featureId(featureId),
|
||||
m_oldValue(oldValue),
|
||||
m_newValue(newValue),
|
||||
m_resultCode(resultCode),
|
||||
m_resultCameFromSession(resultCameFromSession),
|
||||
m_sessionResultString(),
|
||||
m_sessionResultText()
|
||||
{
|
||||
if (sessionResultString)
|
||||
m_sessionResultString.set(std::string(sessionResultString));
|
||||
|
||||
if (sessionResultText)
|
||||
m_sessionResultText.set(std::string(sessionResultText));
|
||||
|
||||
addVariable(m_requestingPlayer);
|
||||
addVariable(m_gameServer);
|
||||
addVariable(m_targetPlayer);
|
||||
addVariable(m_targetPlayerDescription);
|
||||
addVariable(m_targetStationId);
|
||||
addVariable(m_targetItem);
|
||||
addVariable(m_targetItemDescription);
|
||||
addVariable(m_gameCode);
|
||||
addVariable(m_featureId);
|
||||
addVariable(m_oldValue);
|
||||
addVariable(m_newValue);
|
||||
addVariable(m_resultCode);
|
||||
addVariable(m_resultCameFromSession);
|
||||
addVariable(m_sessionResultString);
|
||||
addVariable(m_sessionResultText);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
AdjustAccountFeatureIdResponse::AdjustAccountFeatureIdResponse(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("AdjustAccountFeatureIdResponse"),
|
||||
m_requestingPlayer(),
|
||||
m_gameServer(),
|
||||
m_targetPlayer(),
|
||||
m_targetPlayerDescription(),
|
||||
m_targetStationId(),
|
||||
m_targetItem(),
|
||||
m_targetItemDescription(),
|
||||
m_gameCode(),
|
||||
m_featureId(),
|
||||
m_oldValue(),
|
||||
m_newValue(),
|
||||
m_resultCode(),
|
||||
m_resultCameFromSession(),
|
||||
m_sessionResultString(),
|
||||
m_sessionResultText()
|
||||
{
|
||||
addVariable(m_requestingPlayer);
|
||||
addVariable(m_gameServer);
|
||||
addVariable(m_targetPlayer);
|
||||
addVariable(m_targetPlayerDescription);
|
||||
addVariable(m_targetStationId);
|
||||
addVariable(m_targetItem);
|
||||
addVariable(m_targetItemDescription);
|
||||
addVariable(m_gameCode);
|
||||
addVariable(m_featureId);
|
||||
addVariable(m_oldValue);
|
||||
addVariable(m_newValue);
|
||||
addVariable(m_resultCode);
|
||||
addVariable(m_resultCameFromSession);
|
||||
addVariable(m_sessionResultString);
|
||||
addVariable(m_sessionResultText);
|
||||
|
||||
unpack(source); //lint !e1506 Call to virtual from constructor
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
AdjustAccountFeatureIdResponse::~AdjustAccountFeatureIdResponse()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+189
@@ -0,0 +1,189 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// AdjustAccountFeatureIdResponse.h
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_AdjustAccountFeatureIdResponse_H
|
||||
#define INCLUDED_AdjustAccountFeatureIdResponse_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedFoundation/StationId.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class AdjustAccountFeatureIdResponse : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
AdjustAccountFeatureIdResponse (NetworkId const & requestingPlayer, uint32 gameServer, NetworkId const & targetPlayer, std::string const & targetPlayerDescription, StationId targetStationId, NetworkId const & targetItem, std::string const & targetItemDescription, uint32 gameCode, uint32 featureId, int oldValue, int newValue, unsigned int resultCode, bool resultCameFromSession, const char * sessionResultString = NULL, const char * sessionResultText = NULL);
|
||||
AdjustAccountFeatureIdResponse (Archive::ReadIterator & source);
|
||||
virtual ~AdjustAccountFeatureIdResponse ();
|
||||
|
||||
NetworkId const & getRequestingPlayer() const;
|
||||
uint32 getGameServer() const;
|
||||
NetworkId const & getTargetPlayer() const;
|
||||
std::string const & getTargetPlayerDescription() const;
|
||||
StationId getTargetStationId() const;
|
||||
NetworkId const & getTargetItem() const;
|
||||
std::string const & getTargetItemDescription() const;
|
||||
uint32 getGameCode() const;
|
||||
uint32 getFeatureId() const;
|
||||
int getOldValue() const;
|
||||
int getNewValue() const;
|
||||
unsigned int getResultCode() const; // 0 = SUCCESS
|
||||
bool getResultCameFromSession() const;
|
||||
std::string const & getSessionResultString() const;
|
||||
std::string const & getSessionResultText() const;
|
||||
void setSessionResultCode(unsigned int resultCode, const char * sessionResultString = NULL, const char * sessionResultText = NULL);
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<NetworkId> m_requestingPlayer;
|
||||
Archive::AutoVariable<uint32> m_gameServer;
|
||||
Archive::AutoVariable<NetworkId> m_targetPlayer;
|
||||
Archive::AutoVariable<std::string> m_targetPlayerDescription;
|
||||
Archive::AutoVariable<StationId> m_targetStationId;
|
||||
Archive::AutoVariable<NetworkId> m_targetItem;
|
||||
Archive::AutoVariable<std::string> m_targetItemDescription;
|
||||
Archive::AutoVariable<uint32> m_gameCode;
|
||||
Archive::AutoVariable<uint32> m_featureId;
|
||||
Archive::AutoVariable<int> m_oldValue;
|
||||
Archive::AutoVariable<int> m_newValue;
|
||||
Archive::AutoVariable<unsigned int> m_resultCode; // 0 = SUCCESS
|
||||
Archive::AutoVariable<bool> m_resultCameFromSession;
|
||||
Archive::AutoVariable<std::string> m_sessionResultString;
|
||||
Archive::AutoVariable<std::string> m_sessionResultText;
|
||||
|
||||
private:
|
||||
AdjustAccountFeatureIdResponse();
|
||||
AdjustAccountFeatureIdResponse(const AdjustAccountFeatureIdResponse&);
|
||||
AdjustAccountFeatureIdResponse& operator= (const AdjustAccountFeatureIdResponse&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId const & AdjustAccountFeatureIdResponse::getRequestingPlayer() const
|
||||
{
|
||||
return m_requestingPlayer.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 AdjustAccountFeatureIdResponse::getGameServer() const
|
||||
{
|
||||
return m_gameServer.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId const & AdjustAccountFeatureIdResponse::getTargetPlayer() const
|
||||
{
|
||||
return m_targetPlayer.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline std::string const & AdjustAccountFeatureIdResponse::getTargetPlayerDescription() const
|
||||
{
|
||||
return m_targetPlayerDescription.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline StationId AdjustAccountFeatureIdResponse::getTargetStationId() const
|
||||
{
|
||||
return m_targetStationId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId const & AdjustAccountFeatureIdResponse::getTargetItem() const
|
||||
{
|
||||
return m_targetItem.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline std::string const & AdjustAccountFeatureIdResponse::getTargetItemDescription() const
|
||||
{
|
||||
return m_targetItemDescription.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 AdjustAccountFeatureIdResponse::getGameCode() const
|
||||
{
|
||||
return m_gameCode.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 AdjustAccountFeatureIdResponse::getFeatureId() const
|
||||
{
|
||||
return m_featureId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline int AdjustAccountFeatureIdResponse::getOldValue() const
|
||||
{
|
||||
return m_oldValue.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline int AdjustAccountFeatureIdResponse::getNewValue() const
|
||||
{
|
||||
return m_newValue.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline unsigned int AdjustAccountFeatureIdResponse::getResultCode() const
|
||||
{
|
||||
return m_resultCode.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline bool AdjustAccountFeatureIdResponse::getResultCameFromSession() const
|
||||
{
|
||||
return m_resultCameFromSession.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline std::string const & AdjustAccountFeatureIdResponse::getSessionResultString() const
|
||||
{
|
||||
return m_sessionResultString.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline std::string const & AdjustAccountFeatureIdResponse::getSessionResultText() const
|
||||
{
|
||||
return m_sessionResultText.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline void AdjustAccountFeatureIdResponse::setSessionResultCode(unsigned int resultCode, const char * sessionResultString /*= NULL*/, const char * sessionResultText /*= NULL*/)
|
||||
{
|
||||
m_resultCode.set(resultCode);
|
||||
|
||||
if (sessionResultString)
|
||||
m_sessionResultString.set(std::string(sessionResultString));
|
||||
else
|
||||
m_sessionResultString.set(std::string());
|
||||
|
||||
if (sessionResultText)
|
||||
m_sessionResultText.set(std::string(sessionResultText));
|
||||
else
|
||||
m_sessionResultText.set(std::string());
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+237
@@ -0,0 +1,237 @@
|
||||
// CSToolRequest.cpp
|
||||
// Copyright 2005, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Rob Hanz
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/CSDBNetMessages.h"
|
||||
|
||||
|
||||
CSGetCharactersRequestMessage::CSGetCharactersRequestMessage (uint32 accountId, uint32 accessLevel, uint32 targetId, uint32 toolId, uint32 loginServer ) :
|
||||
GameNetworkMessage( "CSGetCharactersRequestMessage" ),
|
||||
m_accountId( accountId ),
|
||||
m_targetAccount( targetId ),
|
||||
m_accessLevel( accessLevel ),
|
||||
m_toolId( toolId ),
|
||||
m_loginServerId( loginServer )
|
||||
{
|
||||
addVariable( m_accountId );
|
||||
addVariable( m_targetAccount );
|
||||
addVariable( m_accessLevel );
|
||||
addVariable( m_toolId );
|
||||
addVariable( m_loginServerId );
|
||||
}
|
||||
|
||||
CSGetCharactersRequestMessage::CSGetCharactersRequestMessage( Archive::ReadIterator & source ) :
|
||||
GameNetworkMessage("CSGetCharactersRequestMessage"),
|
||||
m_accountId(0),
|
||||
m_targetAccount(0),
|
||||
m_accessLevel(0),
|
||||
m_toolId(0),
|
||||
m_loginServerId(0)
|
||||
{
|
||||
addVariable( m_accountId );
|
||||
addVariable( m_targetAccount );
|
||||
addVariable( m_accessLevel );
|
||||
addVariable( m_toolId );
|
||||
addVariable( m_loginServerId );
|
||||
AutoByteStream::unpack( source );
|
||||
}
|
||||
|
||||
CSGetCharactersRequestMessage::~CSGetCharactersRequestMessage()
|
||||
{
|
||||
}
|
||||
|
||||
GetCharactersForAccountCSReplyMsg::GetCharactersForAccountCSReplyMsg (uint32 accountId, uint32 accessLevel, uint32 targetId, uint32 toolId, uint32 loginServer, const std::string& response ) :
|
||||
GameNetworkMessage( "GetCharactersForAccountCSReplyMsg" ),
|
||||
m_accountId( accountId ),
|
||||
m_targetAccount( targetId ),
|
||||
m_accessLevel( accessLevel ),
|
||||
m_toolId( toolId ),
|
||||
m_loginServerId( loginServer ),
|
||||
m_responseString( response )
|
||||
{
|
||||
addVariable( m_accountId );
|
||||
addVariable( m_targetAccount );
|
||||
addVariable( m_accessLevel );
|
||||
addVariable( m_toolId );
|
||||
addVariable( m_loginServerId );
|
||||
addVariable( m_responseString );
|
||||
}
|
||||
|
||||
GetCharactersForAccountCSReplyMsg::GetCharactersForAccountCSReplyMsg( Archive::ReadIterator & source ) :
|
||||
GameNetworkMessage("GetCharactersForAccountCSReplyMsg"),
|
||||
m_accountId( 0 ),
|
||||
m_targetAccount( 0 ),
|
||||
m_accessLevel( 0 ),
|
||||
m_toolId( 0 ),
|
||||
m_loginServerId( 0 ),
|
||||
m_responseString()
|
||||
{
|
||||
addVariable( m_accountId );
|
||||
addVariable( m_targetAccount );
|
||||
addVariable( m_accessLevel );
|
||||
addVariable( m_toolId );
|
||||
addVariable( m_loginServerId );
|
||||
addVariable( m_responseString );
|
||||
AutoByteStream::unpack( source );
|
||||
}
|
||||
|
||||
GetCharactersForAccountCSReplyMsg::~GetCharactersForAccountCSReplyMsg()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
CSGetDeletedItemsRequestMessage::CSGetDeletedItemsRequestMessage(uint32 accountId, uint32 accessLevel, uint32 targetId, uint32 toolId, uint32 loginServer ) :
|
||||
GameNetworkMessage( "CSGetDeletedItemsRequestMessage" ),
|
||||
m_accountId( accountId ),
|
||||
m_targetAccount( targetId ),
|
||||
m_accessLevel( accessLevel ),
|
||||
m_toolId( toolId ),
|
||||
m_loginServerId( loginServer )
|
||||
{
|
||||
addVariable( m_accountId );
|
||||
addVariable( m_targetAccount );
|
||||
addVariable( m_accessLevel );
|
||||
addVariable( m_toolId );
|
||||
addVariable( m_loginServerId );
|
||||
}
|
||||
|
||||
CSGetDeletedItemsRequestMessage::CSGetDeletedItemsRequestMessage( Archive::ReadIterator & source ) :
|
||||
GameNetworkMessage("CSGetDeletedItemsRequestMessage"),
|
||||
m_accountId( 0 ),
|
||||
m_targetAccount( 0 ),
|
||||
m_accessLevel( 0 ),
|
||||
m_toolId( 0 ),
|
||||
m_loginServerId( 0 )
|
||||
{
|
||||
addVariable( m_accountId );
|
||||
addVariable( m_targetAccount );
|
||||
addVariable( m_accessLevel );
|
||||
addVariable( m_toolId );
|
||||
addVariable( m_loginServerId );
|
||||
AutoByteStream::unpack( source );
|
||||
}
|
||||
|
||||
CSGetDeletedItemsRequestMessage::~CSGetDeletedItemsRequestMessage()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
GetDeletedItemsReplyMessage::GetDeletedItemsReplyMessage (uint32 accountId, uint32 accessLevel, const NetworkId & targetId, uint32 toolId, uint32 loginServer, const std::string& response ) :
|
||||
GameNetworkMessage( "GetDeletedItemsReplyMessage" ),
|
||||
m_accountId( accountId ),
|
||||
m_characterId( targetId ),
|
||||
m_accessLevel( accessLevel ),
|
||||
m_toolId( toolId ),
|
||||
m_loginServerId( loginServer ),
|
||||
m_responseString( response )
|
||||
{
|
||||
addVariable( m_accountId );
|
||||
addVariable( m_characterId );
|
||||
addVariable( m_accessLevel );
|
||||
addVariable( m_toolId );
|
||||
addVariable( m_loginServerId );
|
||||
addVariable( m_responseString );
|
||||
}
|
||||
|
||||
GetDeletedItemsReplyMessage::GetDeletedItemsReplyMessage( Archive::ReadIterator & source ) :
|
||||
GameNetworkMessage("GetDeletedItemsReplyMessage"),
|
||||
m_accountId( 0 ),
|
||||
m_characterId(),
|
||||
m_accessLevel( 0 ),
|
||||
m_toolId( 0 ),
|
||||
m_loginServerId( 0 ),
|
||||
m_responseString( "" )
|
||||
{
|
||||
addVariable( m_accountId );
|
||||
addVariable( m_characterId );
|
||||
addVariable( m_accessLevel );
|
||||
addVariable( m_toolId );
|
||||
addVariable( m_loginServerId );
|
||||
addVariable( m_responseString );
|
||||
AutoByteStream::unpack( source );
|
||||
}
|
||||
|
||||
GetDeletedItemsReplyMessage::~GetDeletedItemsReplyMessage()
|
||||
{
|
||||
}
|
||||
|
||||
GetCharacterIdReplyMessage::GetCharacterIdReplyMessage (uint32 accountId, const NetworkId & targetId, uint32 toolId, uint32 loginServer, const std::string& characterName ) :
|
||||
GameNetworkMessage( "GetCharacterIdReplyMessage" ),
|
||||
m_accountId( accountId ),
|
||||
m_characterId( targetId ),
|
||||
m_toolId( toolId ),
|
||||
m_loginServerId( loginServer ),
|
||||
m_characterName( characterName )
|
||||
{
|
||||
addVariable( m_accountId );
|
||||
addVariable( m_characterId );
|
||||
addVariable( m_toolId );
|
||||
addVariable( m_loginServerId );
|
||||
addVariable( m_characterName );
|
||||
}
|
||||
|
||||
GetCharacterIdReplyMessage::GetCharacterIdReplyMessage( Archive::ReadIterator & source ) :
|
||||
GameNetworkMessage("GetCharacterIdReplyMessage"),
|
||||
m_accountId( 0 ),
|
||||
m_characterId(),
|
||||
m_toolId( 0 ),
|
||||
m_loginServerId( 0 ),
|
||||
m_characterName( "" )
|
||||
{
|
||||
addVariable( m_accountId );
|
||||
addVariable( m_characterId );
|
||||
addVariable( m_toolId );
|
||||
addVariable( m_loginServerId );
|
||||
addVariable( m_characterName );
|
||||
AutoByteStream::unpack( source );
|
||||
}
|
||||
|
||||
GetCharacterIdReplyMessage::~GetCharacterIdReplyMessage()
|
||||
{
|
||||
}
|
||||
|
||||
DBCSRequestMessage::DBCSRequestMessage( uint32 accountId, uint32 accessLevel, uint32 toolId, uint32 loginServerId, const std::string & command, const std::string & commandLine ) :
|
||||
GameNetworkMessage( "DBCSRequestMessage" ),
|
||||
m_accountId( accountId ),
|
||||
m_accessLevel( accessLevel ),
|
||||
m_toolId( toolId ),
|
||||
m_loginServer( loginServerId ),
|
||||
m_command( command ),
|
||||
m_commandLine( commandLine )
|
||||
{
|
||||
addVariable( m_accountId );
|
||||
addVariable( m_accessLevel );
|
||||
addVariable( m_toolId );
|
||||
addVariable( m_loginServer ),
|
||||
addVariable( m_command ),
|
||||
addVariable( m_commandLine );
|
||||
}
|
||||
|
||||
DBCSRequestMessage::DBCSRequestMessage( Archive::ReadIterator & source ) :
|
||||
GameNetworkMessage( "DBCSRequestMessage" ),
|
||||
m_accountId( 0 ),
|
||||
m_accessLevel( 0 ),
|
||||
m_toolId( 0 ),
|
||||
m_loginServer( 0 ),
|
||||
m_command( "" ),
|
||||
m_commandLine( "" )
|
||||
{
|
||||
addVariable( m_accountId );
|
||||
addVariable( m_accessLevel );
|
||||
addVariable( m_toolId );
|
||||
addVariable( m_loginServer ),
|
||||
addVariable( m_command ),
|
||||
addVariable( m_commandLine );
|
||||
|
||||
AutoByteStream::unpack( source );
|
||||
|
||||
}
|
||||
|
||||
DBCSRequestMessage::~DBCSRequestMessage()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+351
@@ -0,0 +1,351 @@
|
||||
// CSToolREquest.h
|
||||
// Copyright 2004, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Rob Hanz
|
||||
|
||||
#ifndef _INCLUDED_CSDBNetMessages_H
|
||||
#define _INCLUDED_CSDBNetMessages_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
/** A Central Server is telling the login server which cluster it is
|
||||
servicing.
|
||||
*/
|
||||
class CSGetCharactersRequestMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
CSGetCharactersRequestMessage (uint32 accountId, uint32 accessLevel, uint32 targetId, uint32 toolId, uint32 loginServer );
|
||||
CSGetCharactersRequestMessage (Archive::ReadIterator & source);
|
||||
virtual ~CSGetCharactersRequestMessage();
|
||||
|
||||
uint32 getAccountId () const;
|
||||
uint32 getTargetAccountId() const;
|
||||
uint32 getAccessLevel() const;
|
||||
uint32 getToolId() const;
|
||||
uint32 getLoginServerId() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable< uint32 > m_accountId;
|
||||
Archive::AutoVariable< uint32 > m_targetAccount;
|
||||
Archive::AutoVariable< uint32 > m_accessLevel;
|
||||
Archive::AutoVariable< uint32 > m_toolId;
|
||||
Archive::AutoVariable< uint32 > m_loginServerId;
|
||||
|
||||
|
||||
CSGetCharactersRequestMessage();
|
||||
CSGetCharactersRequestMessage(const CSGetCharactersRequestMessage&);
|
||||
CSGetCharactersRequestMessage & operator= (const CSGetCharactersRequestMessage&);
|
||||
|
||||
};
|
||||
|
||||
inline uint32 CSGetCharactersRequestMessage::getAccountId() const
|
||||
{
|
||||
return m_accountId.get();
|
||||
}
|
||||
|
||||
inline uint32 CSGetCharactersRequestMessage::getTargetAccountId() const
|
||||
{
|
||||
return m_targetAccount.get();
|
||||
}
|
||||
|
||||
inline uint32 CSGetCharactersRequestMessage::getAccessLevel() const
|
||||
{
|
||||
return m_accessLevel.get();
|
||||
}
|
||||
|
||||
inline uint32 CSGetCharactersRequestMessage::getToolId() const
|
||||
{
|
||||
return m_toolId.get();
|
||||
}
|
||||
|
||||
inline uint32 CSGetCharactersRequestMessage::getLoginServerId() const
|
||||
{
|
||||
return m_loginServerId.get();
|
||||
}
|
||||
|
||||
class GetCharactersForAccountCSReplyMsg : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
GetCharactersForAccountCSReplyMsg (uint32 accountId, uint32 accessLevel, uint32 targetId, uint32 toolId, uint32 loginServer, const std::string & response );
|
||||
GetCharactersForAccountCSReplyMsg (Archive::ReadIterator & source);
|
||||
virtual ~GetCharactersForAccountCSReplyMsg();
|
||||
|
||||
uint32 getAccountId () const;
|
||||
uint32 getTargetAccountId() const;
|
||||
uint32 getAccessLevel() const;
|
||||
uint32 getToolId() const;
|
||||
uint32 getLoginServerId() const;
|
||||
const std::string & getResponse() const;
|
||||
// data go here.
|
||||
|
||||
private:
|
||||
Archive::AutoVariable< uint32 > m_accountId;
|
||||
Archive::AutoVariable< uint32 > m_targetAccount;
|
||||
Archive::AutoVariable< uint32 > m_accessLevel;
|
||||
Archive::AutoVariable< uint32 > m_toolId;
|
||||
Archive::AutoVariable< uint32 > m_loginServerId;
|
||||
Archive::AutoVariable< std::string > m_responseString;
|
||||
|
||||
|
||||
GetCharactersForAccountCSReplyMsg();
|
||||
GetCharactersForAccountCSReplyMsg(const GetCharactersForAccountCSReplyMsg&);
|
||||
GetCharactersForAccountCSReplyMsg & operator= (const GetCharactersForAccountCSReplyMsg&);
|
||||
|
||||
};
|
||||
|
||||
inline uint32 GetCharactersForAccountCSReplyMsg::getAccountId() const
|
||||
{
|
||||
return m_accountId.get();
|
||||
}
|
||||
|
||||
inline uint32 GetCharactersForAccountCSReplyMsg::getTargetAccountId() const
|
||||
{
|
||||
return m_targetAccount.get();
|
||||
}
|
||||
|
||||
inline uint32 GetCharactersForAccountCSReplyMsg::getAccessLevel() const
|
||||
{
|
||||
return m_accessLevel.get();
|
||||
}
|
||||
|
||||
inline uint32 GetCharactersForAccountCSReplyMsg::getToolId() const
|
||||
{
|
||||
return m_toolId.get();
|
||||
}
|
||||
|
||||
inline uint32 GetCharactersForAccountCSReplyMsg::getLoginServerId() const
|
||||
{
|
||||
return m_loginServerId.get();
|
||||
}
|
||||
|
||||
const inline std::string& GetCharactersForAccountCSReplyMsg::getResponse() const
|
||||
{
|
||||
return m_responseString.get();
|
||||
}
|
||||
|
||||
class CSGetDeletedItemsRequestMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
CSGetDeletedItemsRequestMessage (uint32 accountId, uint32 accessLevel, uint32 targetId, uint32 toolId, uint32 loginServer );
|
||||
CSGetDeletedItemsRequestMessage (Archive::ReadIterator & source);
|
||||
virtual ~CSGetDeletedItemsRequestMessage();
|
||||
|
||||
uint32 getAccountId () const;
|
||||
uint32 getTargetAccountId() const;
|
||||
uint32 getAccessLevel() const;
|
||||
uint32 getToolId() const;
|
||||
uint32 getLoginServerId() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable< uint32 > m_accountId;
|
||||
Archive::AutoVariable< uint32 > m_targetAccount;
|
||||
Archive::AutoVariable< uint32 > m_accessLevel;
|
||||
Archive::AutoVariable< uint32 > m_toolId;
|
||||
Archive::AutoVariable< uint32 > m_loginServerId;
|
||||
|
||||
CSGetDeletedItemsRequestMessage();
|
||||
CSGetDeletedItemsRequestMessage(const CSGetDeletedItemsRequestMessage&);
|
||||
CSGetDeletedItemsRequestMessage & operator= (const CSGetDeletedItemsRequestMessage&);
|
||||
|
||||
};
|
||||
inline uint32 CSGetDeletedItemsRequestMessage::getAccountId() const
|
||||
{
|
||||
return m_accountId.get();
|
||||
}
|
||||
|
||||
inline uint32 CSGetDeletedItemsRequestMessage::getTargetAccountId() const
|
||||
{
|
||||
return m_targetAccount.get();
|
||||
}
|
||||
|
||||
inline uint32 CSGetDeletedItemsRequestMessage::getAccessLevel() const
|
||||
{
|
||||
return m_accessLevel.get();
|
||||
}
|
||||
|
||||
inline uint32 CSGetDeletedItemsRequestMessage::getToolId() const
|
||||
{
|
||||
return m_toolId.get();
|
||||
}
|
||||
|
||||
inline uint32 CSGetDeletedItemsRequestMessage::getLoginServerId() const
|
||||
{
|
||||
return m_loginServerId.get();
|
||||
}
|
||||
|
||||
class GetDeletedItemsReplyMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
GetDeletedItemsReplyMessage (uint32 accountId, uint32 accessLevel, const NetworkId &characterId, uint32 toolId, uint32 loginServer, const std::string & response );
|
||||
GetDeletedItemsReplyMessage (Archive::ReadIterator & source);
|
||||
virtual ~GetDeletedItemsReplyMessage();
|
||||
|
||||
uint32 getAccountId () const;
|
||||
const NetworkId & getCharacterId() const;
|
||||
uint32 getAccessLevel() const;
|
||||
uint32 getToolId() const;
|
||||
uint32 getLoginServerId() const;
|
||||
const std::string & getResponse() const;
|
||||
// data go here.
|
||||
|
||||
private:
|
||||
Archive::AutoVariable< uint32 > m_accountId;
|
||||
Archive::AutoVariable< NetworkId > m_characterId;
|
||||
Archive::AutoVariable< uint32 > m_accessLevel;
|
||||
Archive::AutoVariable< uint32 > m_toolId;
|
||||
Archive::AutoVariable< uint32 > m_loginServerId;
|
||||
Archive::AutoVariable< std::string > m_responseString;
|
||||
|
||||
|
||||
GetDeletedItemsReplyMessage();
|
||||
GetDeletedItemsReplyMessage(const GetDeletedItemsReplyMessage&);
|
||||
GetDeletedItemsReplyMessage & operator= (const GetDeletedItemsReplyMessage&);
|
||||
|
||||
};
|
||||
|
||||
inline uint32 GetDeletedItemsReplyMessage::getAccountId() const
|
||||
{
|
||||
return m_accountId.get();
|
||||
}
|
||||
|
||||
inline const NetworkId & GetDeletedItemsReplyMessage::getCharacterId() const
|
||||
{
|
||||
return m_characterId.get();
|
||||
}
|
||||
|
||||
inline uint32 GetDeletedItemsReplyMessage::getAccessLevel() const
|
||||
{
|
||||
return m_accessLevel.get();
|
||||
}
|
||||
|
||||
inline uint32 GetDeletedItemsReplyMessage::getToolId() const
|
||||
{
|
||||
return m_toolId.get();
|
||||
}
|
||||
|
||||
inline uint32 GetDeletedItemsReplyMessage::getLoginServerId() const
|
||||
{
|
||||
return m_loginServerId.get();
|
||||
}
|
||||
|
||||
const inline std::string& GetDeletedItemsReplyMessage::getResponse() const
|
||||
{
|
||||
return m_responseString.get();
|
||||
}
|
||||
|
||||
class GetCharacterIdReplyMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
GetCharacterIdReplyMessage (uint32 accountId, const NetworkId &characterId, uint32 toolId, uint32 loginServer, const std::string & characterName);
|
||||
GetCharacterIdReplyMessage (Archive::ReadIterator & source);
|
||||
virtual ~GetCharacterIdReplyMessage();
|
||||
|
||||
uint32 getAccountId () const;
|
||||
const NetworkId & getCharacterId() const;
|
||||
uint32 getToolId() const;
|
||||
uint32 getLoginServerId() const;
|
||||
const std::string & getCharacterName() const;
|
||||
// data go here.
|
||||
|
||||
private:
|
||||
Archive::AutoVariable< uint32 > m_accountId;
|
||||
Archive::AutoVariable< NetworkId > m_characterId;
|
||||
Archive::AutoVariable< uint32 > m_toolId;
|
||||
Archive::AutoVariable< uint32 > m_loginServerId;
|
||||
Archive::AutoVariable< std::string > m_characterName;
|
||||
|
||||
|
||||
GetCharacterIdReplyMessage();
|
||||
GetCharacterIdReplyMessage(const GetCharacterIdReplyMessage&);
|
||||
GetCharacterIdReplyMessage & operator= (const GetCharacterIdReplyMessage&);
|
||||
|
||||
};
|
||||
|
||||
inline uint32 GetCharacterIdReplyMessage::getAccountId() const
|
||||
{
|
||||
return m_accountId.get();
|
||||
}
|
||||
|
||||
inline const NetworkId & GetCharacterIdReplyMessage::getCharacterId() const
|
||||
{
|
||||
return m_characterId.get();
|
||||
}
|
||||
|
||||
inline const std::string & GetCharacterIdReplyMessage::getCharacterName() const
|
||||
{
|
||||
return m_characterName.get();
|
||||
}
|
||||
|
||||
inline uint32 GetCharacterIdReplyMessage::getToolId() const
|
||||
{
|
||||
return m_toolId.get();
|
||||
}
|
||||
|
||||
inline uint32 GetCharacterIdReplyMessage::getLoginServerId() const
|
||||
{
|
||||
return m_loginServerId.get();
|
||||
}
|
||||
|
||||
class DBCSRequestMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
DBCSRequestMessage( uint32 accountId, uint32 accessLevel, uint32 toolId, uint32 loginServer, const std::string & command, const std::string & commandline );
|
||||
|
||||
DBCSRequestMessage( Archive::ReadIterator & source );
|
||||
virtual ~DBCSRequestMessage();
|
||||
|
||||
uint32 getAccountId() const;
|
||||
uint32 getAccessLevel() const;
|
||||
uint32 getToolId() const;
|
||||
uint32 getLoginServerId() const;
|
||||
const std::string & getCommand() const;
|
||||
const std::string & getCommandLine() const;
|
||||
|
||||
|
||||
private:
|
||||
Archive::AutoVariable< uint32 > m_accountId;
|
||||
Archive::AutoVariable< uint32 > m_accessLevel;
|
||||
Archive::AutoVariable< uint32 > m_toolId;
|
||||
Archive::AutoVariable< uint32 > m_loginServer;
|
||||
Archive::AutoVariable< std::string > m_command;
|
||||
Archive::AutoVariable< std::string > m_commandLine;
|
||||
|
||||
DBCSRequestMessage();
|
||||
DBCSRequestMessage( const DBCSRequestMessage & );
|
||||
DBCSRequestMessage & operator = ( const DBCSRequestMessage& );
|
||||
};
|
||||
|
||||
inline uint32 DBCSRequestMessage::getAccountId() const
|
||||
{
|
||||
return m_accountId.get();
|
||||
}
|
||||
|
||||
inline uint32 DBCSRequestMessage::getAccessLevel() const
|
||||
{
|
||||
return m_accessLevel.get();
|
||||
}
|
||||
|
||||
inline uint32 DBCSRequestMessage::getToolId() const
|
||||
{
|
||||
return m_toolId.get();
|
||||
}
|
||||
|
||||
inline uint32 DBCSRequestMessage::getLoginServerId() const
|
||||
{
|
||||
return m_loginServer.get();
|
||||
}
|
||||
|
||||
inline const std::string& DBCSRequestMessage::getCommand() const
|
||||
{
|
||||
return m_command.get();
|
||||
}
|
||||
|
||||
inline const std::string& DBCSRequestMessage::getCommandLine() const
|
||||
{
|
||||
return m_commandLine.get();
|
||||
}
|
||||
|
||||
#endif //_INCLUDED_CSDBNetMessages_H
|
||||
//
|
||||
+538
@@ -0,0 +1,538 @@
|
||||
// CentralCommandChannelMessages.cpp
|
||||
// copyright 2001 Verant Interactive
|
||||
// Author: Justin Randall
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverKeyShare/KeyShare.h"
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "sharedFoundation/ApplicationVersion.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CentralGameServerConnect::CentralGameServerConnect(const std::string & newVolumeName,
|
||||
const std::string & newClientServiceAddress,
|
||||
const uint16 newClientServicePort,
|
||||
const std::string & newGameServiceAddress,
|
||||
const uint16 newGameServicePort) :
|
||||
GameNetworkMessage("CentralGameServerConnect"),
|
||||
clientServiceAddress(newClientServiceAddress),
|
||||
gameServiceAddress(newGameServiceAddress),
|
||||
volumeName(newVolumeName),
|
||||
clientServicePort(newClientServicePort),
|
||||
gameServicePort(newGameServicePort),
|
||||
buildVersionNumber(ApplicationVersion::getInternalVersion())
|
||||
{
|
||||
addVariable(clientServiceAddress);
|
||||
addVariable(gameServiceAddress);
|
||||
addVariable(volumeName);
|
||||
addVariable(clientServicePort);
|
||||
addVariable(gameServicePort);
|
||||
addVariable(buildVersionNumber);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CentralGameServerConnect::CentralGameServerConnect(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("CentralGameServerConnect"),
|
||||
clientServiceAddress(""),
|
||||
gameServiceAddress(""),
|
||||
volumeName(""),
|
||||
clientServicePort(0),
|
||||
gameServicePort(0),
|
||||
buildVersionNumber("")
|
||||
{
|
||||
addVariable(clientServiceAddress);
|
||||
addVariable(gameServiceAddress);
|
||||
addVariable(volumeName);
|
||||
addVariable(clientServicePort);
|
||||
addVariable(gameServicePort);
|
||||
addVariable(buildVersionNumber);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CentralGameServerConnect::~CentralGameServerConnect()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CentralGameServerSetProcessId::CentralGameServerSetProcessId(const uint32 newProcessId, const uint32 newClockSubtractInterval, const std::string & c) :
|
||||
GameNetworkMessage("CentralGameServerSetProcessId"),
|
||||
clockSubtractInterval(newClockSubtractInterval),
|
||||
clusterName(c),
|
||||
processId(newProcessId)
|
||||
{
|
||||
addVariable(processId);
|
||||
addVariable(clockSubtractInterval);
|
||||
addVariable(clusterName);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CentralGameServerSetProcessId::CentralGameServerSetProcessId(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("CentralGameServerSetProcessId"),
|
||||
clockSubtractInterval(0),
|
||||
clusterName(),
|
||||
processId()
|
||||
{
|
||||
addVariable(processId);
|
||||
addVariable(clockSubtractInterval);
|
||||
addVariable(clusterName);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CentralGameServerSetProcessId::~CentralGameServerSetProcessId()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CentralGameServerProxyObject::CentralGameServerProxyObject(const NetworkId newObjectId,
|
||||
const char * const newTemplateName,
|
||||
const uint32 newGameServerProcessId,
|
||||
const std::string & newGameServerAddress,
|
||||
const unsigned short newGameServerPort) :
|
||||
GameNetworkMessage("CentralGameServerProxyObject"),
|
||||
gameServerAddress(newGameServerAddress),
|
||||
gameServerPort(newGameServerPort),
|
||||
gameServerProcessId(newGameServerProcessId),
|
||||
objectId(newObjectId),
|
||||
templateName(newTemplateName)
|
||||
{
|
||||
addVariable(gameServerAddress);
|
||||
addVariable(gameServerPort);
|
||||
addVariable(gameServerProcessId);
|
||||
addVariable(objectId);
|
||||
addVariable(templateName);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CentralGameServerProxyObject::CentralGameServerProxyObject(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("CentralGameServerProxyObject"),
|
||||
gameServerAddress(),
|
||||
gameServerPort(),
|
||||
gameServerProcessId(),
|
||||
templateName()
|
||||
{
|
||||
addVariable(gameServerAddress);
|
||||
addVariable(gameServerPort);
|
||||
addVariable(gameServerProcessId);
|
||||
addVariable(objectId);
|
||||
addVariable(templateName);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CentralGameServerProxyObject::~CentralGameServerProxyObject()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
CentralGameServerDbProcessServerProcessId::CentralGameServerDbProcessServerProcessId(const uint32 newServerProcessId, const uint32 newGameTime) :
|
||||
GameNetworkMessage("CentralGameServerDbProcessServerProcessId"),
|
||||
serverProcessId(newServerProcessId),
|
||||
gameTime(newGameTime)
|
||||
{
|
||||
addVariable(serverProcessId);
|
||||
addVariable(gameTime);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CentralGameServerDbProcessServerProcessId::CentralGameServerDbProcessServerProcessId(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("CentralGameServerDbProcessServerProcessId"),
|
||||
serverProcessId(0)
|
||||
{
|
||||
addVariable(serverProcessId);
|
||||
addVariable(gameTime);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CentralGameServerDbProcessServerProcessId::~CentralGameServerDbProcessServerProcessId()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CentralCreateCharacter::CentralCreateCharacter(const uint32 stationId, const Unicode::String & characterName, const std::string & templateName, float scaleFactor, const std::string & planetName, const Vector & coordinates, const NetworkId & cellId, const std::string & appearanceData, const std::string & hairTemplateName, const std::string & hairAppearanceData, const std::string & profession, const Unicode::String & biography, bool useNewbieTutorial, const std::string & skillTemplate, const std::string & workingSkill, bool jedi, uint32 gameFeatures) :
|
||||
GameNetworkMessage("CentralCreateCharacter"),
|
||||
m_appearanceData(appearanceData),
|
||||
m_cellId(cellId),
|
||||
m_coordinates(coordinates),
|
||||
m_characterName(characterName),
|
||||
m_planetName(planetName),
|
||||
m_stationId(stationId),
|
||||
m_hairTemplateName(hairTemplateName),
|
||||
m_hairAppearanceData (hairAppearanceData),
|
||||
m_templateName(templateName),
|
||||
m_profession(profession),
|
||||
m_scaleFactor(scaleFactor),
|
||||
m_biography(biography),
|
||||
m_useNewbieTutorial(useNewbieTutorial),
|
||||
m_skillTemplate(skillTemplate),
|
||||
m_workingSkill(workingSkill),
|
||||
m_jedi(jedi),
|
||||
m_gameFeatures(gameFeatures)
|
||||
{
|
||||
addVariable(m_appearanceData);
|
||||
addVariable(m_cellId);
|
||||
addVariable(m_coordinates);
|
||||
addVariable(m_characterName);
|
||||
addVariable(m_planetName);
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_hairTemplateName);
|
||||
addVariable(m_hairAppearanceData);
|
||||
addVariable(m_templateName);
|
||||
addVariable(m_profession);
|
||||
addVariable(m_scaleFactor);
|
||||
addVariable(m_biography);
|
||||
addVariable(m_useNewbieTutorial);
|
||||
addVariable(m_skillTemplate);
|
||||
addVariable(m_workingSkill);
|
||||
addVariable(m_jedi);
|
||||
addVariable(m_gameFeatures);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CentralCreateCharacter::CentralCreateCharacter(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("CentralCreateCharacter"),
|
||||
m_appearanceData(),
|
||||
m_cellId(),
|
||||
m_coordinates(),
|
||||
m_characterName(),
|
||||
m_planetName(),
|
||||
m_stationId(),
|
||||
m_hairTemplateName(),
|
||||
m_hairAppearanceData (),
|
||||
m_templateName(),
|
||||
m_profession(),
|
||||
m_scaleFactor(1.0f),
|
||||
m_biography(),
|
||||
m_useNewbieTutorial(false),
|
||||
m_skillTemplate(),
|
||||
m_workingSkill(),
|
||||
m_jedi(false),
|
||||
m_gameFeatures(0)
|
||||
{
|
||||
addVariable(m_appearanceData);
|
||||
addVariable(m_cellId);
|
||||
addVariable(m_coordinates);
|
||||
addVariable(m_characterName);
|
||||
addVariable(m_planetName);
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_hairTemplateName);
|
||||
addVariable(m_hairAppearanceData);
|
||||
addVariable(m_templateName);
|
||||
addVariable(m_profession);
|
||||
addVariable(m_scaleFactor);
|
||||
addVariable(m_biography);
|
||||
addVariable(m_useNewbieTutorial);
|
||||
addVariable(m_skillTemplate);
|
||||
addVariable(m_workingSkill);
|
||||
addVariable(m_jedi);
|
||||
addVariable(m_gameFeatures);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CentralCreateCharacter::~CentralCreateCharacter()
|
||||
{
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
const float CentralCreateCharacter::getScaleFactor () const
|
||||
{
|
||||
return m_scaleFactor.get ();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
VerifyNameRequest::VerifyNameRequest(const uint32 stationId, const NetworkId & characterId, const std::string &creatureTemplate, const Unicode::String & characterName) :
|
||||
GameNetworkMessage("VerifyNameRequest"),
|
||||
m_creatureTemplate(creatureTemplate),
|
||||
m_characterName(characterName),
|
||||
m_stationId(stationId),
|
||||
m_characterId(characterId)
|
||||
{
|
||||
addVariable(m_creatureTemplate);
|
||||
addVariable(m_characterName);
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_characterId);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
VerifyNameRequest::VerifyNameRequest(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("VerifyNameRequest"),
|
||||
m_creatureTemplate(),
|
||||
m_characterName(),
|
||||
m_stationId(),
|
||||
m_characterId()
|
||||
{
|
||||
addVariable(m_creatureTemplate);
|
||||
addVariable(m_characterName);
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_characterId);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
VerifyNameRequest::~VerifyNameRequest()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
VerifyNameResponse::VerifyNameResponse(const uint32 stationId, const NetworkId & characterId, const std::string &creatureTemplate, const Unicode::String & characterName, const StringId &errorMessage) :
|
||||
GameNetworkMessage("VerifyNameResponse"),
|
||||
m_stationId(stationId),
|
||||
m_characterId(characterId),
|
||||
m_creatureTemplate(creatureTemplate),
|
||||
m_name(characterName),
|
||||
m_errorMessage(errorMessage)
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_characterId);
|
||||
addVariable(m_creatureTemplate);
|
||||
addVariable(m_name);
|
||||
addVariable(m_errorMessage);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
VerifyNameResponse::VerifyNameResponse(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("VerifyNameResponse"),
|
||||
m_stationId(),
|
||||
m_characterId(),
|
||||
m_creatureTemplate(),
|
||||
m_name(),
|
||||
m_errorMessage()
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_characterId);
|
||||
addVariable(m_creatureTemplate);
|
||||
addVariable(m_name);
|
||||
addVariable(m_errorMessage);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
VerifyNameResponse::~VerifyNameResponse()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ReleaseNameMessage::ReleaseNameMessage(const uint32 stationId, const NetworkId & characterId) :
|
||||
GameNetworkMessage("ReleaseNameMessage"),
|
||||
m_stationId(stationId),
|
||||
m_characterId(characterId)
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_characterId);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ReleaseNameMessage::ReleaseNameMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ReleaseNameMessage"),
|
||||
m_stationId(),
|
||||
m_characterId()
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_characterId);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ReleaseNameMessage::~ReleaseNameMessage()
|
||||
{
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
DatabaseSaveStart::DatabaseSaveStart() : GameNetworkMessage("DatabaseSaveStart")
|
||||
{
|
||||
}
|
||||
|
||||
DatabaseSaveStart::DatabaseSaveStart(Archive::ReadIterator & source) : GameNetworkMessage("DatabaseSaveStart")
|
||||
{
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
DatabaseSaveStart::~DatabaseSaveStart()
|
||||
{
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
DatabaseCreateCharacterSuccess::DatabaseCreateCharacterSuccess(const NetworkId objectId, StationId stationId, const Unicode::String &characterName, int templateId, bool jedi) :
|
||||
GameNetworkMessage("DatabaseCreateCharacterSuccess"),
|
||||
m_objectId(objectId),
|
||||
m_stationId(stationId),
|
||||
m_characterName(characterName),
|
||||
m_templateId(templateId),
|
||||
m_jedi(jedi)
|
||||
{
|
||||
addVariable(m_objectId);
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_characterName);
|
||||
addVariable(m_templateId);
|
||||
addVariable(m_jedi);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
DatabaseCreateCharacterSuccess::DatabaseCreateCharacterSuccess(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("DatabaseCreateCharacterSuccess"),
|
||||
m_objectId(),
|
||||
m_stationId(),
|
||||
m_characterName(),
|
||||
m_templateId(),
|
||||
m_jedi()
|
||||
{
|
||||
addVariable(m_objectId);
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_characterName);
|
||||
addVariable(m_templateId);
|
||||
addVariable(m_jedi);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
DatabaseCreateCharacterSuccess::~DatabaseCreateCharacterSuccess()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
GameCreateCharacterFailed::GameCreateCharacterFailed(const uint32 stationId, const Unicode::String &name, const StringId &errorMessage, const std::string &optionalDetailedErrorMessage) :
|
||||
GameNetworkMessage("GameCreateCharacterFailed"),
|
||||
m_stationId(stationId),
|
||||
m_name(name),
|
||||
m_errorMessage(errorMessage),
|
||||
m_optionalDetailedErrorMessage(optionalDetailedErrorMessage)
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_name);
|
||||
addVariable(m_errorMessage);
|
||||
addVariable(m_optionalDetailedErrorMessage);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
GameCreateCharacterFailed::GameCreateCharacterFailed(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("GameCreateCharacterFailed"),
|
||||
m_stationId(),
|
||||
m_name(),
|
||||
m_errorMessage(),
|
||||
m_optionalDetailedErrorMessage()
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_name);
|
||||
addVariable(m_errorMessage);
|
||||
addVariable(m_optionalDetailedErrorMessage);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
GameCreateCharacterFailed::~GameCreateCharacterFailed()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnectionServerAddress ::ConnectionServerAddress (const std::string & newGameAddress, const uint16 newGamePort) :
|
||||
GameNetworkMessage("ConnectionServerAddress"),
|
||||
gameServiceAddress(newGameAddress),
|
||||
gameServicePort(newGamePort)
|
||||
{
|
||||
addVariable(gameServiceAddress);
|
||||
addVariable(gameServicePort);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnectionServerAddress ::ConnectionServerAddress (Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ConnectionServerAddress"),
|
||||
gameServiceAddress(),
|
||||
gameServicePort()
|
||||
{
|
||||
addVariable(gameServiceAddress);
|
||||
addVariable(gameServicePort);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnectionServerAddress ::~ConnectionServerAddress ()
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
ShutdownCluster::ShutdownCluster(const uint32 timeToShutdown, const uint32 maxTime, const Unicode::String systemMessage):
|
||||
GameNetworkMessage("ShutdownCluster"),
|
||||
m_timeToShutdown(timeToShutdown),
|
||||
m_maxTime(maxTime),
|
||||
m_systemMessage(systemMessage)
|
||||
{
|
||||
addVariable(m_timeToShutdown);
|
||||
addVariable(m_maxTime);
|
||||
addVariable(m_systemMessage);
|
||||
}
|
||||
|
||||
ShutdownCluster::ShutdownCluster( Archive::ReadIterator &source) :
|
||||
GameNetworkMessage("ShutdownCluster"),
|
||||
m_timeToShutdown(),
|
||||
m_maxTime(),
|
||||
m_systemMessage()
|
||||
{
|
||||
addVariable(m_timeToShutdown);
|
||||
addVariable(m_maxTime);
|
||||
addVariable(m_systemMessage);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
ShutdownCluster::~ShutdownCluster()
|
||||
{
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
AbortShutdown::AbortShutdown() : GameNetworkMessage("AbortShutdown")
|
||||
{
|
||||
}
|
||||
|
||||
AbortShutdown::AbortShutdown(Archive::ReadIterator & source) : GameNetworkMessage("AbortShutdown")
|
||||
{
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
AbortShutdown::~AbortShutdown()
|
||||
{
|
||||
}
|
||||
|
||||
+787
@@ -0,0 +1,787 @@
|
||||
// CentralGameServerMessages.h
|
||||
// copyright 2001 Verant Interactive
|
||||
// Author: Justin Randall
|
||||
|
||||
#ifndef _INCLUDED_CentralGameServerMessages_H
|
||||
#define _INCLUDED_CentralGameServerMessages_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "Archive/Archive.h"
|
||||
#include "StringId.h"
|
||||
#include "Unicode.h"
|
||||
#include "localizationArchive/StringIdArchive.h"
|
||||
#include "sharedFoundation/NetworkId.h"
|
||||
#include "sharedFoundation/StationId.h"
|
||||
#include "sharedMath/Vector.h"
|
||||
#include "sharedMathArchive/VectorArchive.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class CentralGameServerConnect : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
CentralGameServerConnect ( const std::string & newVolumeName,
|
||||
const std::string & newClientServiceAddress,
|
||||
const uint16 newClientServicePort,
|
||||
const std::string & newGameServiceAddress,
|
||||
const uint16 newGameServicePort);
|
||||
CentralGameServerConnect (Archive::ReadIterator & source);
|
||||
~CentralGameServerConnect ();
|
||||
const std::string & getClientServiceAddress (void) const;
|
||||
const uint16 getClientServicePort (void) const;
|
||||
const std::string & getGameServiceAddress (void) const;
|
||||
const uint16 getGameServicePort (void) const;
|
||||
const std::string & getVolumeName (void) const;
|
||||
const std::string & getBuildVersionNumber (void) const;
|
||||
private:
|
||||
Archive::AutoVariable<std::string> clientServiceAddress;
|
||||
Archive::AutoVariable<std::string> gameServiceAddress;
|
||||
Archive::AutoVariable<std::string> volumeName;
|
||||
Archive::AutoVariable<uint16> clientServicePort;
|
||||
Archive::AutoVariable<uint16> gameServicePort;
|
||||
Archive::AutoVariable<std::string> buildVersionNumber;
|
||||
|
||||
CentralGameServerConnect();
|
||||
CentralGameServerConnect(const CentralGameServerConnect&);
|
||||
CentralGameServerConnect& operator= (const CentralGameServerConnect&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & CentralGameServerConnect::getClientServiceAddress(void) const
|
||||
{
|
||||
return clientServiceAddress.get(); //lint !e1037 // const op () const is hardly ambiguous
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint16 CentralGameServerConnect::getClientServicePort(void) const
|
||||
{
|
||||
return clientServicePort.get(); //lint !e1037 // const op () const is hardly ambiguous
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & CentralGameServerConnect::getGameServiceAddress(void) const
|
||||
{
|
||||
return gameServiceAddress.get(); //lint !e1037 // const op () const is hardly ambiguous
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint16 CentralGameServerConnect::getGameServicePort(void) const
|
||||
{
|
||||
return gameServicePort.get(); //lint !e1037 // const op () const is hardly ambiguous
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & CentralGameServerConnect::getVolumeName(void) const
|
||||
{
|
||||
return volumeName.get(); //lint !e1037 // const op () const is hardly ambiguous
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & CentralGameServerConnect::getBuildVersionNumber(void) const
|
||||
{
|
||||
return buildVersionNumber.get(); //lint !e1037 // const op () const is hardly ambiguous
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
/**
|
||||
sent from the central server to a game server process advising it
|
||||
of the server's new process identifier in the cluster
|
||||
*/
|
||||
class CentralGameServerSetProcessId : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
explicit CentralGameServerSetProcessId(const uint32 newProcessId, const uint32 clockSubtractInterval, const std::string &newClusterName);
|
||||
|
||||
CentralGameServerSetProcessId(Archive::ReadIterator & source);
|
||||
~CentralGameServerSetProcessId();
|
||||
|
||||
const uint32 getClockSubtractInterval () const;
|
||||
const std::string &getClusterName () const;
|
||||
const uint32 getProcessId () const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> clockSubtractInterval;
|
||||
Archive::AutoVariable<std::string> clusterName;
|
||||
Archive::AutoVariable<uint32> processId;
|
||||
|
||||
CentralGameServerSetProcessId();
|
||||
CentralGameServerSetProcessId(const CentralGameServerSetProcessId&);
|
||||
CentralGameServerSetProcessId& operator= (const CentralGameServerSetProcessId&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint32 CentralGameServerSetProcessId::getClockSubtractInterval() const
|
||||
{
|
||||
return clockSubtractInterval.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string &CentralGameServerSetProcessId::getClusterName(void) const
|
||||
{
|
||||
return clusterName.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint32 CentralGameServerSetProcessId::getProcessId(void) const
|
||||
{
|
||||
return processId.get(); //lint !e1037 // const op () const is hardly ambiguous
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class CentralGameServerProxyObject : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
CentralGameServerProxyObject(const NetworkId newObjectId,
|
||||
const char * const newTemplateName,
|
||||
const uint32 newGameServerProcessId,
|
||||
const std::string & newGameServerAddress,
|
||||
const unsigned short newGameServerPort);
|
||||
CentralGameServerProxyObject(Archive::ReadIterator & source);
|
||||
~CentralGameServerProxyObject();
|
||||
|
||||
const std::string & getGameServerAddress() const;
|
||||
const uint16 getGameServerPort() const;
|
||||
const uint32 getGameServerProcessId() const;
|
||||
const NetworkId getObjectId() const;
|
||||
const std::string & getTemplateName() const;
|
||||
private:
|
||||
Archive::AutoVariable<std::string> gameServerAddress;
|
||||
Archive::AutoVariable<uint16> gameServerPort;
|
||||
Archive::AutoVariable<uint32> gameServerProcessId;
|
||||
Archive::AutoVariable<NetworkId> objectId;
|
||||
Archive::AutoVariable<std::string> templateName;
|
||||
|
||||
CentralGameServerProxyObject();
|
||||
CentralGameServerProxyObject(const CentralGameServerProxyObject&);
|
||||
CentralGameServerProxyObject& operator= (const CentralGameServerProxyObject&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & CentralGameServerProxyObject::getGameServerAddress(void) const
|
||||
{
|
||||
return gameServerAddress.get(); //lint !e1037 // const op () const is hardly ambiguous
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint16 CentralGameServerProxyObject::getGameServerPort() const
|
||||
{
|
||||
return gameServerPort.get(); //lint !e1037 // const op () const is hardly ambiguous
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint32 CentralGameServerProxyObject::getGameServerProcessId(void) const
|
||||
{
|
||||
return gameServerProcessId.get(); //lint !e1037 // const op () const is hardly ambiguous
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId CentralGameServerProxyObject::getObjectId(void) const
|
||||
{
|
||||
return objectId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & CentralGameServerProxyObject::getTemplateName(void) const
|
||||
{
|
||||
return templateName.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class CentralGameServerDbProcessServerProcessId : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
CentralGameServerDbProcessServerProcessId(const uint32 newServerProcessId, const uint32 gameTime);
|
||||
CentralGameServerDbProcessServerProcessId(Archive::ReadIterator & source);
|
||||
~CentralGameServerDbProcessServerProcessId();
|
||||
|
||||
const uint32 getSubtractInterval () const;
|
||||
const uint32 getServerProcessId () const;
|
||||
private:
|
||||
Archive::AutoVariable<uint32> serverProcessId;
|
||||
Archive::AutoVariable<uint32> gameTime;
|
||||
|
||||
CentralGameServerDbProcessServerProcessId();
|
||||
CentralGameServerDbProcessServerProcessId(const CentralGameServerDbProcessServerProcessId&);
|
||||
CentralGameServerDbProcessServerProcessId& operator= (const CentralGameServerDbProcessServerProcessId&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint32 CentralGameServerDbProcessServerProcessId::getServerProcessId(void) const
|
||||
{
|
||||
return serverProcessId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint32 CentralGameServerDbProcessServerProcessId::getSubtractInterval() const
|
||||
{
|
||||
return gameTime.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class CentralCreateCharacter : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
CentralCreateCharacter(const uint32 stationId,
|
||||
const Unicode::String & characterName,
|
||||
const std::string & templateName,
|
||||
float scaleFactor,
|
||||
const std::string & planetName,
|
||||
const Vector & coordinates,
|
||||
const NetworkId & cellId,
|
||||
const std::string & newAppearanceData,
|
||||
const std::string & hairTemplateName,
|
||||
const std::string & hairAppearanceData,
|
||||
const std::string & profession,
|
||||
const Unicode::String & biography,
|
||||
const bool useNewbieTutorial,
|
||||
const std::string & skillTemplate,
|
||||
const std::string & workingSkill,
|
||||
const bool jedi,
|
||||
const uint32 gameFeatures);
|
||||
|
||||
CentralCreateCharacter(Archive::ReadIterator & source);
|
||||
~CentralCreateCharacter();
|
||||
|
||||
const float getScaleFactor () const;
|
||||
const std::string & getAppearanceData () const;
|
||||
const NetworkId & getCell () const;
|
||||
const Unicode::String & getCharacterName () const;
|
||||
const Vector & getCoordinates () const;
|
||||
const std::string & getHairTemplateName () const;
|
||||
const std::string & getHairAppearanceData () const;
|
||||
const std::string & getPlanetName () const;
|
||||
const uint32 getStationId () const;
|
||||
const std::string & getTemplateName () const;
|
||||
const std::string & getProfession () const;
|
||||
const Unicode::String & getBiography () const;
|
||||
const bool getUseNewbieTutorial () const;
|
||||
const std::string & getSkillTemplate () const;
|
||||
const std::string & getWorkingSkill () const;
|
||||
const bool getJedi () const;
|
||||
const uint32 getGameFeatures () const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<std::string> m_appearanceData;
|
||||
Archive::AutoVariable<NetworkId> m_cellId;
|
||||
Archive::AutoVariable<Vector> m_coordinates;
|
||||
Archive::AutoVariable<Unicode::String> m_characterName;
|
||||
Archive::AutoVariable<std::string> m_planetName;
|
||||
Archive::AutoVariable<uint32> m_stationId;
|
||||
Archive::AutoVariable<std::string> m_hairTemplateName;
|
||||
Archive::AutoVariable<std::string> m_hairAppearanceData;
|
||||
Archive::AutoVariable<std::string> m_templateName;
|
||||
Archive::AutoVariable<std::string> m_profession;
|
||||
Archive::AutoVariable<float> m_scaleFactor;
|
||||
Archive::AutoVariable<Unicode::String> m_biography;
|
||||
Archive::AutoVariable<bool> m_useNewbieTutorial;
|
||||
Archive::AutoVariable<std::string> m_skillTemplate;
|
||||
Archive::AutoVariable<std::string> m_workingSkill;
|
||||
Archive::AutoVariable<bool> m_jedi;
|
||||
Archive::AutoVariable<uint32> m_gameFeatures;
|
||||
|
||||
CentralCreateCharacter();
|
||||
CentralCreateCharacter(const CentralCreateCharacter&);
|
||||
CentralCreateCharacter& operator= (const CentralCreateCharacter&);
|
||||
};
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & CentralCreateCharacter::getAppearanceData() const
|
||||
{
|
||||
return m_appearanceData.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & CentralCreateCharacter::getCell() const
|
||||
{
|
||||
return m_cellId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const Vector & CentralCreateCharacter::getCoordinates() const
|
||||
{
|
||||
return m_coordinates.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const Unicode::String & CentralCreateCharacter::getCharacterName() const
|
||||
{
|
||||
return m_characterName.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & CentralCreateCharacter::getHairTemplateName() const
|
||||
{
|
||||
return m_hairTemplateName.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & CentralCreateCharacter::getHairAppearanceData() const
|
||||
{
|
||||
return m_hairAppearanceData.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & CentralCreateCharacter::getPlanetName() const
|
||||
{
|
||||
return m_planetName.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint32 CentralCreateCharacter::getStationId() const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & CentralCreateCharacter::getTemplateName() const
|
||||
{
|
||||
return m_templateName.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & CentralCreateCharacter::getProfession() const
|
||||
{
|
||||
return m_profession.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const Unicode::String & CentralCreateCharacter::getBiography() const
|
||||
{
|
||||
return m_biography.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const bool CentralCreateCharacter::getUseNewbieTutorial() const
|
||||
{
|
||||
return m_useNewbieTutorial.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & CentralCreateCharacter::getSkillTemplate() const
|
||||
{
|
||||
return m_skillTemplate.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & CentralCreateCharacter::getWorkingSkill() const
|
||||
{
|
||||
return m_workingSkill.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const bool CentralCreateCharacter::getJedi() const
|
||||
{
|
||||
return m_jedi.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const uint32 CentralCreateCharacter::getGameFeatures() const
|
||||
{
|
||||
return m_gameFeatures.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class VerifyNameRequest: public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
VerifyNameRequest(const uint32 stationId, const NetworkId & characterId, const std::string &creatureTemplate, const Unicode::String & characterName);
|
||||
VerifyNameRequest(Archive::ReadIterator & source);
|
||||
~VerifyNameRequest();
|
||||
|
||||
const std::string &getCreatureTemplate() const;
|
||||
const Unicode::String & getCharacterName() const;
|
||||
const uint32 getStationId() const;
|
||||
const NetworkId & getCharacterId() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<std::string> m_creatureTemplate;
|
||||
Archive::AutoVariable<Unicode::String> m_characterName;
|
||||
Archive::AutoVariable<uint32> m_stationId;
|
||||
|
||||
// 0 means requesting to verify name for character creation; otherwise, it means
|
||||
// requesting to verify name for character rename for that particular character
|
||||
Archive::AutoVariable<NetworkId> m_characterId;
|
||||
|
||||
VerifyNameRequest();
|
||||
VerifyNameRequest(const VerifyNameRequest&);
|
||||
VerifyNameRequest& operator= (const VerifyNameRequest&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string &VerifyNameRequest::getCreatureTemplate() const
|
||||
{
|
||||
return m_creatureTemplate.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const Unicode::String & VerifyNameRequest::getCharacterName() const
|
||||
{
|
||||
return m_characterName.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint32 VerifyNameRequest::getStationId() const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & VerifyNameRequest::getCharacterId() const
|
||||
{
|
||||
return m_characterId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class VerifyNameResponse: public GameNetworkMessage
|
||||
{
|
||||
// See NameErrors.h for acceptable error codes
|
||||
public:
|
||||
VerifyNameResponse(const uint32 stationId, const NetworkId & characterId, const std::string &creatureTemplate, const Unicode::String & characterName, const StringId &errorMessage);
|
||||
VerifyNameResponse(Archive::ReadIterator & source);
|
||||
~VerifyNameResponse();
|
||||
|
||||
const uint32 getStationId() const;
|
||||
const NetworkId & getCharacterId() const;
|
||||
const std::string &getCreatureTemplate() const;
|
||||
const Unicode::String & getName() const;
|
||||
const StringId &getErrorMessage() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_stationId;
|
||||
Archive::AutoVariable<NetworkId> m_characterId;
|
||||
Archive::AutoVariable<std::string> m_creatureTemplate;
|
||||
Archive::AutoVariable<Unicode::String> m_name;
|
||||
Archive::AutoVariable<StringId> m_errorMessage;
|
||||
|
||||
VerifyNameResponse();
|
||||
VerifyNameResponse(const VerifyNameResponse&);
|
||||
VerifyNameResponse& operator= (const VerifyNameResponse&);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const std::string &VerifyNameResponse::getCreatureTemplate() const
|
||||
{
|
||||
return m_creatureTemplate.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint32 VerifyNameResponse::getStationId() const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & VerifyNameResponse::getCharacterId() const
|
||||
{
|
||||
return m_characterId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const Unicode::String & VerifyNameResponse::getName() const
|
||||
{
|
||||
return m_name.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const StringId &VerifyNameResponse::getErrorMessage() const
|
||||
{
|
||||
return m_errorMessage.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class ReleaseNameMessage: public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
ReleaseNameMessage(const uint32 stationId, const NetworkId & characterId); // if name is empty, release all names
|
||||
ReleaseNameMessage(Archive::ReadIterator & source);
|
||||
~ReleaseNameMessage();
|
||||
|
||||
const uint32 getStationId() const;
|
||||
const NetworkId & getCharacterId() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_stationId;
|
||||
Archive::AutoVariable<NetworkId> m_characterId;
|
||||
|
||||
ReleaseNameMessage();
|
||||
ReleaseNameMessage(const ReleaseNameMessage&);
|
||||
ReleaseNameMessage& operator= (const ReleaseNameMessage&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint32 ReleaseNameMessage::getStationId() const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & ReleaseNameMessage::getCharacterId() const
|
||||
{
|
||||
return m_characterId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// This message is sent from Persister to Central Server to indicate
|
||||
// that a save is starting.
|
||||
class DatabaseSaveStart : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
DatabaseSaveStart();
|
||||
DatabaseSaveStart(Archive::ReadIterator & source);
|
||||
~DatabaseSaveStart();
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
class DatabaseCreateCharacterSuccess : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
DatabaseCreateCharacterSuccess(const NetworkId objectId, StationId stationId, const Unicode::String &characterName, int templateId, bool jedi);
|
||||
DatabaseCreateCharacterSuccess(Archive::ReadIterator & source);
|
||||
~DatabaseCreateCharacterSuccess();
|
||||
|
||||
const NetworkId & getObjectId() const;
|
||||
const StationId getStationId() const;
|
||||
const Unicode::String & getCharacterName() const;
|
||||
const int getTemplateId() const;
|
||||
const bool getJedi() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<NetworkId> m_objectId;
|
||||
Archive::AutoVariable<StationId> m_stationId;
|
||||
Archive::AutoVariable<Unicode::String> m_characterName;
|
||||
Archive::AutoVariable<int> m_templateId;
|
||||
Archive::AutoVariable<bool> m_jedi;
|
||||
|
||||
DatabaseCreateCharacterSuccess();
|
||||
DatabaseCreateCharacterSuccess(const DatabaseCreateCharacterSuccess&);
|
||||
DatabaseCreateCharacterSuccess& operator= (const DatabaseCreateCharacterSuccess&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & DatabaseCreateCharacterSuccess::getObjectId(void) const
|
||||
{
|
||||
return m_objectId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const StationId DatabaseCreateCharacterSuccess::getStationId(void) const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const Unicode::String & DatabaseCreateCharacterSuccess::getCharacterName() const
|
||||
{
|
||||
return m_characterName.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const int DatabaseCreateCharacterSuccess::getTemplateId() const
|
||||
{
|
||||
return m_templateId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const bool DatabaseCreateCharacterSuccess:: getJedi() const
|
||||
{
|
||||
return m_jedi.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class GameCreateCharacterFailed : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
explicit GameCreateCharacterFailed(const uint32 stationId, const Unicode::String &name, const StringId &errorCode, const std::string &optionalDetailedErrorMessage);
|
||||
GameCreateCharacterFailed(Archive::ReadIterator & source);
|
||||
~GameCreateCharacterFailed();
|
||||
|
||||
const uint32 getStationId(void) const;
|
||||
const Unicode::String &getName(void) const;
|
||||
const StringId &getErrorMessage(void) const;
|
||||
const std::string &getOptionalDetailedErrorMessage() const;
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_stationId;
|
||||
Archive::AutoVariable<Unicode::String> m_name;
|
||||
Archive::AutoVariable<StringId> m_errorMessage;
|
||||
Archive::AutoVariable<std::string> m_optionalDetailedErrorMessage;
|
||||
|
||||
GameCreateCharacterFailed();
|
||||
GameCreateCharacterFailed(const GameCreateCharacterFailed&);
|
||||
GameCreateCharacterFailed& operator= (const GameCreateCharacterFailed&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint32 GameCreateCharacterFailed::getStationId(void) const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const Unicode::String &GameCreateCharacterFailed::getName(void) const
|
||||
{
|
||||
return m_name.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const StringId &GameCreateCharacterFailed::getErrorMessage(void) const
|
||||
{
|
||||
return m_errorMessage.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const std::string &GameCreateCharacterFailed::getOptionalDetailedErrorMessage() const
|
||||
{
|
||||
return m_optionalDetailedErrorMessage.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* the ConnectionServerAddress message is sent from central to game when a user server connects to the login server so the game can establish a connection with it.
|
||||
*/
|
||||
|
||||
class ConnectionServerAddress : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
ConnectionServerAddress (const std::string & newGameAddress, const uint16 newGamePort);
|
||||
ConnectionServerAddress (Archive::ReadIterator & source);
|
||||
virtual ~ConnectionServerAddress ();
|
||||
|
||||
const std::string & getGameServiceAddress (void) const;
|
||||
const uint16 getGameServicePort (void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<std::string> gameServiceAddress;
|
||||
Archive::AutoVariable<uint16> gameServicePort;
|
||||
|
||||
ConnectionServerAddress(const ConnectionServerAddress&);
|
||||
ConnectionServerAddress& operator= (const ConnectionServerAddress&);
|
||||
};
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & ConnectionServerAddress::getGameServiceAddress (void) const
|
||||
{
|
||||
return gameServiceAddress.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint16 ConnectionServerAddress::getGameServicePort (void) const
|
||||
{
|
||||
return gameServicePort.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
// Send this message to CentralServer to begin the shutdown sequence (broadcasts to the players, database save, etc)
|
||||
class ShutdownCluster : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
ShutdownCluster( const uint32 timeToShutdown, const uint32 maxTime, const Unicode::String systemMessage);
|
||||
ShutdownCluster(Archive::ReadIterator &source);
|
||||
virtual ~ShutdownCluster();
|
||||
|
||||
const uint32 getTimeToShutdown(void) const;
|
||||
const uint32 getMaxTime(void) const;
|
||||
const Unicode::String getSystemMessage(void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_timeToShutdown;
|
||||
Archive::AutoVariable<uint32> m_maxTime;
|
||||
Archive::AutoVariable<Unicode::String> m_systemMessage;
|
||||
|
||||
ShutdownCluster();
|
||||
ShutdownCluster( const ShutdownCluster& );
|
||||
ShutdownCluster& operator= (const ShutdownCluster& );
|
||||
};
|
||||
|
||||
inline const uint32 ShutdownCluster::getTimeToShutdown(void) const
|
||||
{
|
||||
return m_timeToShutdown.get();
|
||||
}
|
||||
|
||||
inline const uint32 ShutdownCluster::getMaxTime(void) const
|
||||
{
|
||||
return m_maxTime.get();
|
||||
}
|
||||
|
||||
inline const Unicode::String ShutdownCluster::getSystemMessage(void) const
|
||||
{
|
||||
return m_systemMessage.get();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// This message is sent to Central Server to stop any shutdown sequence that is in progress
|
||||
class AbortShutdown : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
AbortShutdown();
|
||||
AbortShutdown(Archive::ReadIterator & source);
|
||||
~AbortShutdown();
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // _INCLUDED_CentralGameServerMessages_H
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
//========================================================================
|
||||
//
|
||||
// CentralPingMessage.cpp - tells Centralserver we want all the objects in a chunk.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/CentralPingMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
CentralPingMessage::CentralPingMessage () :
|
||||
GameNetworkMessage("CentralPingMessage")
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CentralPingMessage::CentralPingMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("CentralPingMessage")
|
||||
{
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CentralPingMessage::~CentralPingMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// CentralPingMessage.h
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_CentralPingMessage_H
|
||||
#define INCLUDED_CentralPingMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Sent from: Central / Game Server
|
||||
* Sent to: Game Server / Central
|
||||
* Action: Verfiy that we have two-way communications and that the game
|
||||
* server is responding.
|
||||
*/
|
||||
class CentralPingMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
CentralPingMessage ();
|
||||
CentralPingMessage (Archive::ReadIterator & source);
|
||||
~CentralPingMessage ();
|
||||
|
||||
uint32 getPingNumber() const;
|
||||
|
||||
private:
|
||||
|
||||
CentralPingMessage(const CentralPingMessage&);
|
||||
CentralPingMessage& operator= (const CentralPingMessage&);
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
//========================================================================
|
||||
//
|
||||
// ChangeUniverseProcessMessage.cpp - tells CentralServer to unload all instances of
|
||||
// an object.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/ChangeUniverseProcessMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param id id of object we want to unload
|
||||
*/
|
||||
ChangeUniverseProcessMessage::ChangeUniverseProcessMessage(int id) :
|
||||
GameNetworkMessage("ChangeUniverseProcessMessage"),
|
||||
m_id(id)
|
||||
{
|
||||
addVariable(m_id);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ChangeUniverseProcessMessage::ChangeUniverseProcessMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ChangeUniverseProcessMessage"),
|
||||
m_id(0)
|
||||
{
|
||||
addVariable(m_id);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class destructor.
|
||||
*/
|
||||
ChangeUniverseProcessMessage::~ChangeUniverseProcessMessage()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
//========================================================================
|
||||
//
|
||||
// ChangeUniverseProcessMessage.h - tells CentralServer to unload all instances of
|
||||
// an object.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_ChangeUniverseProcessMessage_H
|
||||
#define _INCLUDED_ChangeUniverseProcessMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class ChangeUniverseProcessMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
|
||||
explicit ChangeUniverseProcessMessage (int id);
|
||||
ChangeUniverseProcessMessage (Archive::ReadIterator & source);
|
||||
~ChangeUniverseProcessMessage ();
|
||||
|
||||
int getId() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<int> m_id;
|
||||
|
||||
ChangeUniverseProcessMessage();
|
||||
ChangeUniverseProcessMessage(const ChangeUniverseProcessMessage&);
|
||||
ChangeUniverseProcessMessage& operator= (const ChangeUniverseProcessMessage&);
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline int ChangeUniverseProcessMessage::getId(void) const
|
||||
{
|
||||
return m_id.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#endif
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// CharacterListMessage.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/CharacterListMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
CharacterListMessage::CharacterListMessage(uint32 accountNumber, const std::vector<CharacterListMessageData> &data) :
|
||||
GameNetworkMessage("CharacterListMessage"),
|
||||
m_data(),
|
||||
m_accountNumber(accountNumber)
|
||||
{
|
||||
m_data.set(data);
|
||||
|
||||
addVariable(m_data);
|
||||
addVariable(m_accountNumber);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CharacterListMessage::CharacterListMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("CharacterListMessage"),
|
||||
m_data(),
|
||||
m_accountNumber()
|
||||
{
|
||||
addVariable(m_data);
|
||||
addVariable(m_accountNumber);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
CharacterListMessage::~CharacterListMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
const std::vector<CharacterListMessageData> &CharacterListMessage::getData() const
|
||||
{
|
||||
return m_data.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
namespace Archive
|
||||
{
|
||||
void get(ReadIterator & source, CharacterListMessageData &c)
|
||||
{
|
||||
get(source,c.m_name);
|
||||
get(source,c.m_objectTemplate);
|
||||
get(source,c.m_characterId);
|
||||
get(source,c.m_containerId);
|
||||
get(source,c.m_location);
|
||||
get(source,c.m_coordinates);
|
||||
}
|
||||
|
||||
void put(ByteStream & target, const CharacterListMessageData &c)
|
||||
{
|
||||
put(target,c.m_name);
|
||||
put(target,c.m_objectTemplate);
|
||||
put(target,c.m_characterId);
|
||||
put(target,c.m_containerId);
|
||||
put(target,c.m_location);
|
||||
put(target,c.m_coordinates);
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
CharacterListMessageData::CharacterListMessageData(const Unicode::String &name, const std::string &objectTemplate, const NetworkId &characterId, const NetworkId &containerId, const std::string &location, const Vector &coordinates) :
|
||||
m_name(name),
|
||||
m_objectTemplate(objectTemplate),
|
||||
m_characterId(characterId),
|
||||
m_containerId(containerId),
|
||||
m_location(location),
|
||||
m_coordinates(coordinates)
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
CharacterListMessageData::CharacterListMessageData() :
|
||||
m_name(),
|
||||
m_objectTemplate(),
|
||||
m_characterId(),
|
||||
m_containerId(),
|
||||
m_location(),
|
||||
m_coordinates()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// CharacterListMessage.h
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_CharacterListMessage_H
|
||||
#define INCLUDED_CharacterListMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Unicode.h"
|
||||
#include "sharedMath/Vector.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* This is declared as a separate class so that it can be forwarded.
|
||||
* Otherwise, it would be nested in CharacterListMessage
|
||||
*/
|
||||
class CharacterListMessageData
|
||||
{
|
||||
public:
|
||||
Unicode::String m_name;
|
||||
std::string m_objectTemplate;
|
||||
NetworkId m_characterId;
|
||||
NetworkId m_containerId;
|
||||
std::string m_location;
|
||||
Vector m_coordinates;
|
||||
|
||||
CharacterListMessageData();
|
||||
CharacterListMessageData(const Unicode::String &name, const std::string &objectTemplate, const NetworkId &characterId, const NetworkId &containerId, const std::string &location, const Vector &coordinates);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* List a character for an account
|
||||
* Sent from: DBProcess
|
||||
* Sent to: Central
|
||||
* Action: Forward the character list to the client.
|
||||
*/
|
||||
class CharacterListMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
CharacterListMessage (uint32 accountNumber, const std::vector<CharacterListMessageData> &data);
|
||||
CharacterListMessage (Archive::ReadIterator & source);
|
||||
~CharacterListMessage ();
|
||||
|
||||
uint32 getAccountNumber() const;
|
||||
const std::vector<CharacterListMessageData> &getData() const;
|
||||
|
||||
private:
|
||||
Archive::AutoArray<CharacterListMessageData> m_data;
|
||||
Archive::AutoVariable<uint32> m_accountNumber;
|
||||
|
||||
CharacterListMessage();
|
||||
CharacterListMessage(const CharacterListMessage&);
|
||||
CharacterListMessage& operator= (const CharacterListMessage&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 CharacterListMessage::getAccountNumber(void) const
|
||||
{
|
||||
return m_accountNumber.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
namespace Archive
|
||||
{
|
||||
void get(ReadIterator & source, CharacterListMessageData &c);
|
||||
void put(ByteStream & target, const CharacterListMessageData &c);
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
//========================================================================
|
||||
//
|
||||
// CharacterTransferStatusMessage.cpp - tells Centralserver a new object is being created.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/CharacterTransferStatusMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
#include "sharedMathArchive/VectorArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param id id of object that was created
|
||||
*/
|
||||
CharacterTransferStatusMessage::CharacterTransferStatusMessage(unsigned int gameServerId, const NetworkId & toCharacterId, const std::string & statusMessage) :
|
||||
GameNetworkMessage("CharacterTransferStatusMessage"),
|
||||
m_gameServerId(gameServerId),
|
||||
m_toCharacterId(toCharacterId),
|
||||
m_statusMessage(statusMessage)
|
||||
{
|
||||
addVariable(m_gameServerId);
|
||||
addVariable(m_toCharacterId);
|
||||
addVariable(m_statusMessage);
|
||||
} // CharacterTransferStatusMessage::CharacterTransferStatusMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CharacterTransferStatusMessage::CharacterTransferStatusMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("CharacterTransferStatusMessage"),
|
||||
m_gameServerId(),
|
||||
m_toCharacterId(),
|
||||
m_statusMessage()
|
||||
{
|
||||
addVariable(m_gameServerId);
|
||||
addVariable(m_toCharacterId);
|
||||
addVariable(m_statusMessage);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class destructor.
|
||||
*/
|
||||
CharacterTransferStatusMessage::~CharacterTransferStatusMessage()
|
||||
{
|
||||
} // CharacterTransferStatusMessage::~CharacterTransferStatusMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
//========================================================================
|
||||
//
|
||||
// CharacterTransferStatusMessage.h - tells Centralserver a new object is being created.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_CharacterTransferStatusMessage_H
|
||||
#define _INCLUDED_CharacterTransferStatusMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include <string>
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
#include "sharedMath/Vector.h"
|
||||
#include "sharedFoundation/NetworkId.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class CharacterTransferStatusMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
CharacterTransferStatusMessage (unsigned int gameServerId, const NetworkId & toCharacterId, const std::string & statusMessage);
|
||||
CharacterTransferStatusMessage (Archive::ReadIterator & source);
|
||||
~CharacterTransferStatusMessage ();
|
||||
|
||||
unsigned int getGameServerId () const;
|
||||
const NetworkId & getToCharacterId () const;
|
||||
const std::string & getStatusMessage () const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<unsigned int> m_gameServerId;
|
||||
Archive::AutoVariable<NetworkId> m_toCharacterId;
|
||||
Archive::AutoVariable<std::string> m_statusMessage;
|
||||
|
||||
CharacterTransferStatusMessage();
|
||||
CharacterTransferStatusMessage(const CharacterTransferStatusMessage&);
|
||||
CharacterTransferStatusMessage& operator= (const CharacterTransferStatusMessage&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline unsigned int CharacterTransferStatusMessage::getGameServerId() const
|
||||
{
|
||||
return m_gameServerId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & CharacterTransferStatusMessage::getToCharacterId() const
|
||||
{
|
||||
return m_toCharacterId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & CharacterTransferStatusMessage::getStatusMessage() const
|
||||
{
|
||||
return m_statusMessage.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#endif // _INCLUDED_CharacterTransferStatusMessage_H
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// ChunkCompleteMessage.cpp
|
||||
//
|
||||
// Copyright 2002 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/ChunkCompleteMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
ChunkCompleteMessage::ChunkCompleteMessage(std::vector<std::pair<int, int> > const & chunks) :
|
||||
GameNetworkMessage("ChunkCompleteMessage"),
|
||||
m_chunks()
|
||||
{
|
||||
m_chunks.set(chunks);
|
||||
|
||||
addVariable(m_chunks);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
ChunkCompleteMessage::ChunkCompleteMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ChunkCompleteMessage"),
|
||||
m_chunks()
|
||||
{
|
||||
addVariable(m_chunks);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
ChunkCompleteMessage::~ChunkCompleteMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
std::vector<std::pair<int, int> > const & ChunkCompleteMessage::getChunks() const
|
||||
{
|
||||
return m_chunks.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// ChunkCompleteMessage.h
|
||||
//
|
||||
// Copyright 2002 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef _INCLUDED_ChunkCompleteMessage_H
|
||||
#define _INCLUDED_ChunkCompleteMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class ChunkCompleteMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
ChunkCompleteMessage (std::vector<std::pair<int, int> > const & chunks);
|
||||
ChunkCompleteMessage (Archive::ReadIterator & source);
|
||||
~ChunkCompleteMessage ();
|
||||
|
||||
std::vector<std::pair<int, int> > const & getChunks() const;
|
||||
|
||||
private:
|
||||
Archive::AutoArray<std::pair<int, int> > m_chunks;
|
||||
|
||||
ChunkCompleteMessage();
|
||||
ChunkCompleteMessage(const ChunkCompleteMessage&);
|
||||
ChunkCompleteMessage& operator= (const ChunkCompleteMessage&);
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif // _INCLUDED_ChunkCompleteMessage_H
|
||||
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
//========================================================================
|
||||
//
|
||||
// ChunkObjectListMessage.cpp -
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/ChunkObjectListMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param process gameserver id requesting the chunk (from RequestChunkMessage)
|
||||
* @param count number of ids in the chunk
|
||||
* @param ids list of ids
|
||||
*/
|
||||
ChunkObjectListMessage::ChunkObjectListMessage(uint32 process, uint16 count,
|
||||
const NetworkId* ids) :
|
||||
GameNetworkMessage("ChunkObjectListMessage"),
|
||||
m_process(process),
|
||||
m_ids()
|
||||
{
|
||||
addVariable(m_process);
|
||||
addVariable(m_ids);
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
NOT_NULL(ids);
|
||||
std::vector<NetworkId> v;
|
||||
|
||||
for (size_t i = 0; i < count; ++i)
|
||||
v.push_back(ids[i]);
|
||||
m_ids.set(v);
|
||||
}
|
||||
} // RequestChunkMessage::RequestChunkMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ChunkObjectListMessage::ChunkObjectListMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ChunkObjectListMessage"),
|
||||
m_process(),
|
||||
m_ids()
|
||||
{
|
||||
addVariable(m_process);
|
||||
addVariable(m_ids);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class destructor.
|
||||
*/
|
||||
ChunkObjectListMessage::~ChunkObjectListMessage()
|
||||
{
|
||||
} // ChunkObjectListMessage::~ChunkObjectListMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
//========================================================================
|
||||
//
|
||||
// ChunkObjectListMessage.h - tells Centralserver all the object ids in a chunk.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_ChunkObjectListMessage_H
|
||||
#define _INCLUDED_ChunkObjectListMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
#include <vector>
|
||||
|
||||
/** @todo: right now this will every object in the game, we need to modify to
|
||||
* give a chunk id list
|
||||
*/
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class ChunkObjectListMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
ChunkObjectListMessage (uint32 process, uint16 count, const NetworkId* ids);
|
||||
ChunkObjectListMessage (Archive::ReadIterator & source);
|
||||
~ChunkObjectListMessage ();
|
||||
|
||||
const uint32 getProcess(void) const;
|
||||
const uint16 getCount(void) const;
|
||||
const std::vector<NetworkId> & getIds(void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_process; // gameserver id requesting the chunk (from RequestChunkMessage)
|
||||
//uint16 m_count; // number of ids in the chunk
|
||||
//NetworkId* m_ids; // list of ids
|
||||
Archive::AutoArray<NetworkId> m_ids;
|
||||
|
||||
ChunkObjectListMessage();
|
||||
ChunkObjectListMessage(const ChunkObjectListMessage&);
|
||||
ChunkObjectListMessage& operator= (const ChunkObjectListMessage&);
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint32 ChunkObjectListMessage::getProcess(void) const
|
||||
{
|
||||
return m_process.get();
|
||||
} // ChunkObjectListMessage::getProcess
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::vector<NetworkId> & ChunkObjectListMessage::getIds(void) const
|
||||
{
|
||||
return m_ids.get();
|
||||
} // ChunkObjectListMessage::getIds
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint16 ChunkObjectListMessage::getCount() const
|
||||
{
|
||||
// cast back to a 16 bit int to save space over the network
|
||||
return static_cast<uint16>(m_ids.get().size());
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#endif // _INCLUDED_ChunkObjectListMessage_H
|
||||
+182
@@ -0,0 +1,182 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// ClaimRewardsMessage.cpp
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/ClaimRewardsMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
ClaimRewardsMessage::ClaimRewardsMessage (uint32 gameServer, StationId stationId, NetworkId const & player, std::string const & rewardEvent, bool consumeEvent, std::string const & rewardItem, bool consumeItem, uint32 accountFeatureId, bool consumeAccountFeatureId) :
|
||||
GameNetworkMessage("ClaimRewardsMessage"),
|
||||
m_gameServer(gameServer),
|
||||
m_stationId(stationId),
|
||||
m_player(player),
|
||||
m_rewardEvent(rewardEvent),
|
||||
m_consumeEvent(consumeEvent),
|
||||
m_accountUniqueItems(),
|
||||
m_additionalItems(),
|
||||
m_accountFeatureId(accountFeatureId),
|
||||
m_consumeAccountFeatureId((accountFeatureId > 0) ? consumeAccountFeatureId : false), // m_consumeAccountFeatureId is only meaningful if m_accountFeatureId > 0
|
||||
m_accountFeatureIdOldValue(),
|
||||
m_accountFeatureIdNewValue()
|
||||
{
|
||||
if (consumeItem)
|
||||
m_accountUniqueItems.get().push_back(rewardItem);
|
||||
else
|
||||
m_additionalItems.get().push_back(rewardItem);
|
||||
|
||||
addVariable(m_gameServer);
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_player);
|
||||
addVariable(m_rewardEvent);
|
||||
addVariable(m_consumeEvent);
|
||||
addVariable(m_accountUniqueItems);
|
||||
addVariable(m_additionalItems);
|
||||
addVariable(m_accountFeatureId);
|
||||
addVariable(m_consumeAccountFeatureId);
|
||||
addVariable(m_accountFeatureIdOldValue);
|
||||
addVariable(m_accountFeatureIdNewValue);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ClaimRewardsMessage::ClaimRewardsMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ClaimRewardsMessage"),
|
||||
m_gameServer(),
|
||||
m_stationId(),
|
||||
m_player(),
|
||||
m_rewardEvent(),
|
||||
m_consumeEvent(),
|
||||
m_accountUniqueItems(),
|
||||
m_additionalItems(),
|
||||
m_accountFeatureId(),
|
||||
m_consumeAccountFeatureId(),
|
||||
m_accountFeatureIdOldValue(),
|
||||
m_accountFeatureIdNewValue()
|
||||
{
|
||||
addVariable(m_gameServer);
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_player);
|
||||
addVariable(m_rewardEvent);
|
||||
addVariable(m_consumeEvent);
|
||||
addVariable(m_accountUniqueItems);
|
||||
addVariable(m_additionalItems);
|
||||
addVariable(m_accountFeatureId);
|
||||
addVariable(m_consumeAccountFeatureId);
|
||||
addVariable(m_accountFeatureIdOldValue);
|
||||
addVariable(m_accountFeatureIdNewValue);
|
||||
|
||||
unpack(source); //lint !e1506 Call to virtual from constructor
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ClaimRewardsMessage::~ClaimRewardsMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
uint32 ClaimRewardsMessage::getGameServer() const
|
||||
{
|
||||
return m_gameServer.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
StationId ClaimRewardsMessage::getStationId() const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
NetworkId const & ClaimRewardsMessage::getPlayer() const
|
||||
{
|
||||
return m_player.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
std::string const & ClaimRewardsMessage::getRewardEvent() const
|
||||
{
|
||||
return m_rewardEvent.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool ClaimRewardsMessage::getConsumeEvent() const
|
||||
{
|
||||
return m_consumeEvent.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
std::string const & ClaimRewardsMessage::getRewardItem() const
|
||||
{
|
||||
static const std::string empty;
|
||||
|
||||
if (!m_accountUniqueItems.get().empty())
|
||||
return (m_accountUniqueItems.get())[0];
|
||||
else if (!m_additionalItems.get().empty())
|
||||
return (m_additionalItems.get())[0];
|
||||
|
||||
return empty;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool ClaimRewardsMessage::getConsumeItem() const
|
||||
{
|
||||
return (!m_accountUniqueItems.get().empty());
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
uint32 ClaimRewardsMessage::getAccountFeatureId() const
|
||||
{
|
||||
return m_accountFeatureId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool ClaimRewardsMessage::getConsumeAccountFeatureId() const
|
||||
{
|
||||
return m_consumeAccountFeatureId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
std::string const & ClaimRewardsMessage::getAccountFeatureIdOldValue() const
|
||||
{
|
||||
return m_accountFeatureIdOldValue.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void ClaimRewardsMessage::setAccountFeatureIdOldValue(std::string const & accountFeatureIdOldValue)
|
||||
{
|
||||
m_accountFeatureIdOldValue.set(accountFeatureIdOldValue);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
std::string const & ClaimRewardsMessage::getAccountFeatureIdNewValue() const
|
||||
{
|
||||
return m_accountFeatureIdNewValue.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void ClaimRewardsMessage::setAccountFeatureIdNewValue(std::string const & accountFeatureIdNewValue)
|
||||
{
|
||||
m_accountFeatureIdNewValue.set(accountFeatureIdNewValue);
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// ClaimRewardsMessage.h
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_ClaimRewardsMessage_H
|
||||
#define INCLUDED_ClaimRewardsMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedFoundation/StationId.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Request claiming a set of veteran rewards
|
||||
* Sent from: Game Server
|
||||
* Sent to: Login Server (via Central)
|
||||
* Action: Check that these rewards can still be claimed on this account.
|
||||
*/
|
||||
class ClaimRewardsMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
ClaimRewardsMessage (uint32 gameServer, StationId stationId, NetworkId const & player, std::string const & rewardEvent, bool consumeEvent, std::string const & rewardItem, bool consumeItem, uint32 accountFeatureId, bool consumeAccountFeatureId);
|
||||
ClaimRewardsMessage (Archive::ReadIterator & source);
|
||||
virtual ~ClaimRewardsMessage ();
|
||||
|
||||
uint32 getGameServer() const;
|
||||
StationId getStationId() const;
|
||||
NetworkId const & getPlayer() const;
|
||||
std::string const & getRewardEvent() const;
|
||||
bool getConsumeEvent() const;
|
||||
std::string const & getRewardItem() const;
|
||||
bool getConsumeItem() const;
|
||||
uint32 getAccountFeatureId() const;
|
||||
bool getConsumeAccountFeatureId() const;
|
||||
std::string const & getAccountFeatureIdOldValue() const;
|
||||
void setAccountFeatureIdOldValue(std::string const & accountFeatureIdOldValue);
|
||||
std::string const & getAccountFeatureIdNewValue() const;
|
||||
void setAccountFeatureIdNewValue(std::string const & accountFeatureIdNewValue);
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_gameServer;
|
||||
Archive::AutoVariable<StationId> m_stationId;
|
||||
Archive::AutoVariable<NetworkId> m_player;
|
||||
Archive::AutoVariable<std::string> m_rewardEvent;
|
||||
Archive::AutoVariable<bool> m_consumeEvent;
|
||||
Archive::AutoArray<std::string> m_accountUniqueItems; // once-per-account items that should be registered in the login database
|
||||
Archive::AutoArray<std::string> m_additionalItems; // rewards the player is claiming which are not once-per-account and don't need to be registered in the login database
|
||||
Archive::AutoVariable<uint32> m_accountFeatureId; // if non-zero, reward requires that the account has this feature id, and reward will consume 1 count of this feature id
|
||||
Archive::AutoVariable<bool> m_consumeAccountFeatureId; // for account feature Id reward, indicates whether to consume the account feature Id
|
||||
|
||||
// for reward that requires an account feature id,
|
||||
// these fields will contain the old and new value
|
||||
// of the account feature id; these values are passed to
|
||||
// session/Platform to update the account feature id; only
|
||||
// on a successful update will the reward then be granted
|
||||
Archive::AutoVariable<std::string> m_accountFeatureIdOldValue;
|
||||
Archive::AutoVariable<std::string> m_accountFeatureIdNewValue;
|
||||
|
||||
private:
|
||||
ClaimRewardsMessage();
|
||||
ClaimRewardsMessage(const ClaimRewardsMessage&);
|
||||
ClaimRewardsMessage& operator= (const ClaimRewardsMessage&);
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// ClaimRewardsReplyMessage.cpp
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/ClaimRewardsReplyMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
ClaimRewardsReplyMessage::ClaimRewardsReplyMessage(uint32 gameServer, StationId stationId, NetworkId const & player, std::string const & rewardEvent, std::string const & rewardItem, uint32 accountFeatureId, bool consumeAccountFeatureId, int previousAccountFeatureIdCount, int currentAccountFeatureIdCount, bool result) :
|
||||
GameNetworkMessage("ClaimRewardsReplyMessage"),
|
||||
m_gameServer(gameServer),
|
||||
m_stationId(stationId),
|
||||
m_player(player),
|
||||
m_rewardEvent(rewardEvent),
|
||||
m_accountUniqueItems(),
|
||||
m_additionalItems(),
|
||||
m_accountFeatureId(accountFeatureId),
|
||||
m_consumeAccountFeatureId((accountFeatureId > 0) ? consumeAccountFeatureId : false), // m_consumeAccountFeatureId is only meaningful if m_accountFeatureId > 0
|
||||
m_previousAccountFeatureIdCount(previousAccountFeatureIdCount),
|
||||
m_currentAccountFeatureIdCount(currentAccountFeatureIdCount),
|
||||
m_result(result)
|
||||
{
|
||||
m_accountUniqueItems.get().push_back(rewardItem);
|
||||
|
||||
addVariable(m_gameServer);
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_player);
|
||||
addVariable(m_rewardEvent);
|
||||
addVariable(m_accountUniqueItems);
|
||||
addVariable(m_additionalItems);
|
||||
addVariable(m_accountFeatureId);
|
||||
addVariable(m_consumeAccountFeatureId);
|
||||
addVariable(m_previousAccountFeatureIdCount);
|
||||
addVariable(m_currentAccountFeatureIdCount);
|
||||
addVariable(m_result);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ClaimRewardsReplyMessage::ClaimRewardsReplyMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ClaimRewardsReplyMessage"),
|
||||
m_gameServer(),
|
||||
m_stationId(),
|
||||
m_player(),
|
||||
m_rewardEvent(),
|
||||
m_accountUniqueItems(),
|
||||
m_additionalItems(),
|
||||
m_accountFeatureId(),
|
||||
m_consumeAccountFeatureId(),
|
||||
m_previousAccountFeatureIdCount(),
|
||||
m_currentAccountFeatureIdCount(),
|
||||
m_result()
|
||||
{
|
||||
addVariable(m_gameServer);
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_player);
|
||||
addVariable(m_rewardEvent);
|
||||
addVariable(m_accountUniqueItems);
|
||||
addVariable(m_additionalItems);
|
||||
addVariable(m_accountFeatureId);
|
||||
addVariable(m_consumeAccountFeatureId);
|
||||
addVariable(m_previousAccountFeatureIdCount);
|
||||
addVariable(m_currentAccountFeatureIdCount);
|
||||
addVariable(m_result);
|
||||
|
||||
unpack(source); //lint !e1506 Call to virtual from constructor
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ClaimRewardsReplyMessage::~ClaimRewardsReplyMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
uint32 ClaimRewardsReplyMessage::getGameServer() const
|
||||
{
|
||||
return m_gameServer.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
StationId ClaimRewardsReplyMessage::getStationId() const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
NetworkId const & ClaimRewardsReplyMessage::getPlayer() const
|
||||
{
|
||||
return m_player.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
std::string const & ClaimRewardsReplyMessage::getRewardEvent() const
|
||||
{
|
||||
return m_rewardEvent.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
std::string const & ClaimRewardsReplyMessage::getRewardItem() const
|
||||
{
|
||||
static const std::string empty;
|
||||
|
||||
if (!m_accountUniqueItems.get().empty())
|
||||
return (m_accountUniqueItems.get())[0];
|
||||
else if (!m_additionalItems.get().empty())
|
||||
return (m_additionalItems.get())[0];
|
||||
|
||||
return empty;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
uint32 ClaimRewardsReplyMessage::getAccountFeatureId() const
|
||||
{
|
||||
return m_accountFeatureId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool ClaimRewardsReplyMessage::getConsumeAccountFeatureId() const
|
||||
{
|
||||
return m_consumeAccountFeatureId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
int ClaimRewardsReplyMessage::getPreviousAccountFeatureIdCount() const
|
||||
{
|
||||
return m_previousAccountFeatureIdCount.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
int ClaimRewardsReplyMessage::getCurrentAccountFeatureIdCount() const
|
||||
{
|
||||
return m_currentAccountFeatureIdCount.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool ClaimRewardsReplyMessage::getResult() const
|
||||
{
|
||||
return m_result.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// ClaimRewardsReplyMessage.h
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_ClaimRewardsReplyMessage_H
|
||||
#define INCLUDED_ClaimRewardsReplyMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedFoundation/NetworkIdArchive.h"
|
||||
#include "sharedFoundation/StationId.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Request claiming a set of veteran rewards
|
||||
* Sent from: Game Server
|
||||
* Sent to: Login Server (via Central)
|
||||
* Action: Check that these rewards can still be claimed on this account.
|
||||
*/
|
||||
class ClaimRewardsReplyMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
ClaimRewardsReplyMessage (uint32 gameServer, StationId stationId, NetworkId const & player, std::string const & rewardEvent, std::string const & rewardItem, uint32 accountFeatureId, bool consumeAccountFeatureId, int previousAccountFeatureIdCount, int currentAccountFeatureIdCount, bool result);
|
||||
ClaimRewardsReplyMessage (Archive::ReadIterator & source);
|
||||
~ClaimRewardsReplyMessage ();
|
||||
|
||||
uint32 getGameServer() const;
|
||||
StationId getStationId() const;
|
||||
NetworkId const & getPlayer() const;
|
||||
std::string const & getRewardEvent() const;
|
||||
std::string const & getRewardItem() const;
|
||||
uint32 getAccountFeatureId() const;
|
||||
bool getConsumeAccountFeatureId() const;
|
||||
int getPreviousAccountFeatureIdCount() const;
|
||||
int getCurrentAccountFeatureIdCount() const;
|
||||
bool getResult() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_gameServer;
|
||||
Archive::AutoVariable<StationId> m_stationId;
|
||||
Archive::AutoVariable<NetworkId> m_player;
|
||||
Archive::AutoVariable<std::string> m_rewardEvent;
|
||||
Archive::AutoArray<std::string> m_accountUniqueItems; // once-per-account items that should be registered in the login database
|
||||
Archive::AutoArray<std::string> m_additionalItems; // rewards the player is claiming which are not once-per-account and don't need to be registered in the login database
|
||||
Archive::AutoVariable<uint32> m_accountFeatureId; // if non-zero, reward required that the account has this feature id, and reward has consumed 1 count of this feature id
|
||||
Archive::AutoVariable<bool> m_consumeAccountFeatureId; // for account feature Id reward, indicates whether to consume the account feature Id
|
||||
Archive::AutoVariable<int> m_previousAccountFeatureIdCount;
|
||||
Archive::AutoVariable<int> m_currentAccountFeatureIdCount;
|
||||
Archive::AutoVariable<bool> m_result;
|
||||
|
||||
private:
|
||||
ClaimRewardsReplyMessage();
|
||||
ClaimRewardsReplyMessage(const ClaimRewardsReplyMessage&);
|
||||
ClaimRewardsReplyMessage& operator= (const ClaimRewardsReplyMessage&);
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
//========================================================================
|
||||
//
|
||||
// CreateNewObjectMessage.cpp - tells Centralserver a new object is being created.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/CreateNewObjectMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
#include "sharedMathArchive/VectorArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param id id of object that was created
|
||||
*/
|
||||
CreateNewObjectMessage::CreateNewObjectMessage(const NetworkId& id, uint32 process,
|
||||
const std::string &scene, const Vector &pos) :
|
||||
GameNetworkMessage("CreateNewObjectMessage"),
|
||||
m_id(id),
|
||||
m_process(process),
|
||||
m_scene(scene),
|
||||
m_pos(pos)
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_process);
|
||||
addVariable(m_scene);
|
||||
addVariable(m_pos);
|
||||
} // CreateNewObjectMessage::CreateNewObjectMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
CreateNewObjectMessage::CreateNewObjectMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("CreateNewObjectMessage"),
|
||||
m_id(),
|
||||
m_process(),
|
||||
m_scene(),
|
||||
m_pos()
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_process);
|
||||
addVariable(m_scene);
|
||||
addVariable(m_pos);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class destructor.
|
||||
*/
|
||||
CreateNewObjectMessage::~CreateNewObjectMessage()
|
||||
{
|
||||
} // CreateNewObjectMessage::~CreateNewObjectMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
//========================================================================
|
||||
//
|
||||
// CreateNewObjectMessage.h - tells Centralserver a new object is being created.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_CreateNewObjectMessage_H
|
||||
#define _INCLUDED_CreateNewObjectMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include <string>
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
#include "sharedMath/Vector.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class CreateNewObjectMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
CreateNewObjectMessage (const NetworkId& id, uint32 process, const std::string &scene, const Vector &pos);
|
||||
CreateNewObjectMessage (Archive::ReadIterator & source);
|
||||
~CreateNewObjectMessage ();
|
||||
|
||||
const NetworkId& getId(void) const;
|
||||
uint32 getProcess(void) const;
|
||||
const std::string& getScene(void) const;
|
||||
const Vector& getPos(void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<NetworkId> m_id; // id of object that was created
|
||||
Archive::AutoVariable<uint32> m_process; // process the object was created on
|
||||
Archive::AutoVariable<std::string> m_scene; // scene (planet) the object is in
|
||||
Archive::AutoVariable<Vector> m_pos; // position of the object
|
||||
|
||||
CreateNewObjectMessage();
|
||||
CreateNewObjectMessage(const CreateNewObjectMessage&);
|
||||
CreateNewObjectMessage& operator= (const CreateNewObjectMessage&);
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId& CreateNewObjectMessage::getId(void) const
|
||||
{
|
||||
return m_id.get();
|
||||
} // CreateNewObjectMessage::getId
|
||||
|
||||
inline uint32 CreateNewObjectMessage::getProcess(void) const
|
||||
{
|
||||
return m_process.get();
|
||||
} // CreateNewObjectMessage::getProcess
|
||||
|
||||
inline const std::string& CreateNewObjectMessage::getScene(void) const
|
||||
{
|
||||
return m_scene.get();
|
||||
} // CreateNewObjectMessage::getScene
|
||||
|
||||
inline const Vector& CreateNewObjectMessage::getPos(void) const
|
||||
{
|
||||
return m_pos.get();
|
||||
} // CreateNewObjectMessage::getPos
|
||||
|
||||
#endif // _INCLUDED_CreateNewObjectMessage_H
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
//========================================================================
|
||||
//
|
||||
// DownloadCharacterMessage.cpp - tells Centralserver a new object is being created.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/DownloadCharacterMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
#include "sharedMathArchive/VectorArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param id id of object that was created
|
||||
*/
|
||||
DownloadCharacterMessage::DownloadCharacterMessage(unsigned int stationId, unsigned int gameServerId, const NetworkId & toCharacterId, bool isAdmin) :
|
||||
GameNetworkMessage("DownloadCharacterMessage"),
|
||||
m_stationId(stationId),
|
||||
m_gameServerId(gameServerId),
|
||||
m_toCharacterId(toCharacterId),
|
||||
m_isAdmin(isAdmin)
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_gameServerId);
|
||||
addVariable(m_toCharacterId);
|
||||
addVariable(m_isAdmin);
|
||||
} // DownloadCharacterMessage::DownloadCharacterMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
DownloadCharacterMessage::DownloadCharacterMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("DownloadCharacterMessage"),
|
||||
m_stationId(),
|
||||
m_gameServerId(),
|
||||
m_toCharacterId(),
|
||||
m_isAdmin()
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_gameServerId);
|
||||
addVariable(m_toCharacterId);
|
||||
addVariable(m_isAdmin);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class destructor.
|
||||
*/
|
||||
DownloadCharacterMessage::~DownloadCharacterMessage()
|
||||
{
|
||||
} // DownloadCharacterMessage::~DownloadCharacterMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
//========================================================================
|
||||
//
|
||||
// DownloadCharacterMessage.h - tells Centralserver a new object is being created.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_DownloadCharacterMessage_H
|
||||
#define _INCLUDED_DownloadCharacterMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include <string>
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
#include "sharedMath/Vector.h"
|
||||
#include "sharedFoundation/NetworkId.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class DownloadCharacterMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
DownloadCharacterMessage (unsigned int stationId, unsigned int gameServerId, const NetworkId & toCharacterId, bool isAdmin);
|
||||
DownloadCharacterMessage (Archive::ReadIterator & source);
|
||||
~DownloadCharacterMessage ();
|
||||
|
||||
unsigned int getStationId () const;
|
||||
unsigned int getGameServerId () const;
|
||||
const NetworkId & getToCharacterId () const;
|
||||
bool getIsAdmin () const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<unsigned int> m_stationId;
|
||||
Archive::AutoVariable<unsigned int> m_gameServerId;
|
||||
Archive::AutoVariable<NetworkId> m_toCharacterId;
|
||||
Archive::AutoVariable<bool> m_isAdmin;
|
||||
|
||||
DownloadCharacterMessage();
|
||||
DownloadCharacterMessage(const DownloadCharacterMessage&);
|
||||
DownloadCharacterMessage& operator= (const DownloadCharacterMessage&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline unsigned int DownloadCharacterMessage::getStationId() const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline unsigned int DownloadCharacterMessage::getGameServerId() const
|
||||
{
|
||||
return m_gameServerId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & DownloadCharacterMessage::getToCharacterId() const
|
||||
{
|
||||
return m_toCharacterId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline bool DownloadCharacterMessage::getIsAdmin() const
|
||||
{
|
||||
return m_isAdmin.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#endif // _INCLUDED_DownloadCharacterMessage_H
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
//========================================================================
|
||||
//
|
||||
// ExcommunicateGameServerMessage.cpp
|
||||
//
|
||||
// copyright 2003 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/ExcommunicateGameServerMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
ExcommunicateGameServerMessage::ExcommunicateGameServerMessage(uint32 serverId, uint32 pid, const std::string & h) :
|
||||
GameNetworkMessage("ExcommunicateGameServerMessage"),
|
||||
m_serverId(serverId),
|
||||
m_processId(pid),
|
||||
m_hostName(h)
|
||||
{
|
||||
addVariable(m_serverId);
|
||||
addVariable(m_processId);
|
||||
addVariable(m_hostName);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ExcommunicateGameServerMessage::ExcommunicateGameServerMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ExcommunicateGameServerMessage"),
|
||||
m_serverId()
|
||||
{
|
||||
addVariable(m_serverId);
|
||||
addVariable(m_processId);
|
||||
addVariable(m_hostName);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ExcommunicateGameServerMessage::~ExcommunicateGameServerMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// ExcommunicateGameServerMessage.h
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_ExcommunicateGameServerMessage_H
|
||||
#define INCLUDED_ExcommunicateGameServerMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Sent from: Central
|
||||
* Sent to: everybody
|
||||
* Action: Drop connection to the specified game server, doing the same
|
||||
* things that would be done normally if the game server closed connection
|
||||
* (e.g. drop proxies, start recovery on the planet server, etc.)
|
||||
*/
|
||||
class ExcommunicateGameServerMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
ExcommunicateGameServerMessage (uint32 serverId, uint32 pid, const std::string & hostName);
|
||||
explicit ExcommunicateGameServerMessage (Archive::ReadIterator & source);
|
||||
~ExcommunicateGameServerMessage ();
|
||||
|
||||
uint32 getServerId () const;
|
||||
uint32 getProcessId () const;
|
||||
const std::string & getHostName () const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_serverId;
|
||||
Archive::AutoVariable<uint32> m_processId;
|
||||
Archive::AutoVariable<std::string> m_hostName;
|
||||
|
||||
ExcommunicateGameServerMessage();
|
||||
ExcommunicateGameServerMessage(const ExcommunicateGameServerMessage&);
|
||||
ExcommunicateGameServerMessage& operator= (const ExcommunicateGameServerMessage&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 ExcommunicateGameServerMessage::getServerId() const
|
||||
{
|
||||
return m_serverId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline uint32 ExcommunicateGameServerMessage::getProcessId() const
|
||||
{
|
||||
return m_processId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & ExcommunicateGameServerMessage::getHostName() const
|
||||
{
|
||||
return m_hostName.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
//========================================================================
|
||||
//
|
||||
// FailedToLoadObjectMessage.cpp - tells Centralserver an object couldn't be loaded.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/FailedToLoadObjectMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param id id of object we didn't load
|
||||
* @param requestingProcess process that originally requested the load
|
||||
*/
|
||||
FailedToLoadObjectMessage::FailedToLoadObjectMessage(const NetworkId& id,
|
||||
uint32 requestingProcess) :
|
||||
GameNetworkMessage("FailedToLoadObjectMessage"),
|
||||
m_id(id),
|
||||
m_process(requestingProcess)
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_process);
|
||||
} // FailedToLoadObjectMessage::FailedToLoadObjectMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
FailedToLoadObjectMessage::FailedToLoadObjectMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("FailedToLoadObjectMessage"),
|
||||
m_id(),
|
||||
m_process()
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_process);
|
||||
unpack(source);
|
||||
} // FailedToLoadObjectMessage::FailedToLoadObjectMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class destructor.
|
||||
*/
|
||||
FailedToLoadObjectMessage::~FailedToLoadObjectMessage()
|
||||
{
|
||||
} // FailedToLoadObjectMessage::~FailedToLoadObjectMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
//========================================================================
|
||||
//
|
||||
// FailedToLoadObjectMessage.h - tells Centralserver an object couldn't be loaded.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_FailedToLoadObjectMessage_H
|
||||
#define _INCLUDED_FailedToLoadObjectMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class FailedToLoadObjectMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
FailedToLoadObjectMessage (const NetworkId& id, uint32 requestingProcess);
|
||||
FailedToLoadObjectMessage (Archive::ReadIterator & source);
|
||||
~FailedToLoadObjectMessage ();
|
||||
|
||||
const NetworkId& getId(void) const;
|
||||
uint32 getRequestingProcess(void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<NetworkId> m_id; // id of object we didn't load
|
||||
Archive::AutoVariable<uint32> m_process; // process that originally requested the load
|
||||
|
||||
FailedToLoadObjectMessage();
|
||||
FailedToLoadObjectMessage(const FailedToLoadObjectMessage&);
|
||||
FailedToLoadObjectMessage& operator= (const FailedToLoadObjectMessage&);
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId& FailedToLoadObjectMessage::getId(void) const
|
||||
{
|
||||
return m_id.get();
|
||||
} // FailedToLoadObjectMessage::getId
|
||||
|
||||
inline uint32 FailedToLoadObjectMessage::getRequestingProcess(void) const
|
||||
{
|
||||
return m_process.get();
|
||||
} // FailedToLoadObjectMessage::getRequestingProcess
|
||||
|
||||
|
||||
#endif // _INCLUDED_FailedToLoadObjectMessage_H
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// FeatureIdTransactionRequest.cpp
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/FeatureIdTransactionRequest.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
FeatureIdTransactionRequest::FeatureIdTransactionRequest(uint32 gameServer, StationId stationId, NetworkId const & player) :
|
||||
GameNetworkMessage("FeatureIdTransactionRequest"),
|
||||
m_gameServer(gameServer),
|
||||
m_stationId(stationId),
|
||||
m_player(player)
|
||||
{
|
||||
addVariable(m_gameServer);
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_player);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
FeatureIdTransactionRequest::FeatureIdTransactionRequest(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("FeatureIdTransactionRequest"),
|
||||
m_gameServer(),
|
||||
m_stationId(),
|
||||
m_player()
|
||||
{
|
||||
addVariable(m_gameServer);
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_player);
|
||||
|
||||
unpack(source); //lint !e1506 Call to virtual from constructor
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
FeatureIdTransactionRequest::~FeatureIdTransactionRequest()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// FeatureIdTransactionRequest.h
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_FeatureIdTransactionRequest_H
|
||||
#define INCLUDED_FeatureIdTransactionRequest_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedFoundation/StationId.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class FeatureIdTransactionRequest : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
FeatureIdTransactionRequest (uint32 gameServer, StationId stationId, NetworkId const & player);
|
||||
FeatureIdTransactionRequest (Archive::ReadIterator & source);
|
||||
virtual ~FeatureIdTransactionRequest ();
|
||||
|
||||
uint32 getGameServer() const;
|
||||
StationId getStationId() const;
|
||||
NetworkId const & getPlayer() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_gameServer;
|
||||
Archive::AutoVariable<StationId> m_stationId;
|
||||
Archive::AutoVariable<NetworkId> m_player;
|
||||
|
||||
private:
|
||||
FeatureIdTransactionRequest();
|
||||
FeatureIdTransactionRequest(const FeatureIdTransactionRequest&);
|
||||
FeatureIdTransactionRequest& operator= (const FeatureIdTransactionRequest&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 FeatureIdTransactionRequest::getGameServer() const
|
||||
{
|
||||
return m_gameServer.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline StationId FeatureIdTransactionRequest::getStationId() const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId const & FeatureIdTransactionRequest::getPlayer() const
|
||||
{
|
||||
return m_player.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// FeatureIdTransactionResponse.cpp
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/FeatureIdTransactionResponse.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
FeatureIdTransactionResponse::FeatureIdTransactionResponse(uint32 gameServer, NetworkId const & player, std::map<std::string, int> const & transactions) :
|
||||
GameNetworkMessage("FeatureIdTransactionResponse"),
|
||||
m_gameServer(gameServer),
|
||||
m_player(player),
|
||||
m_transactions(transactions)
|
||||
{
|
||||
addVariable(m_gameServer);
|
||||
addVariable(m_player);
|
||||
addVariable(m_transactions);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
FeatureIdTransactionResponse::FeatureIdTransactionResponse(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("FeatureIdTransactionResponse"),
|
||||
m_gameServer(),
|
||||
m_player(),
|
||||
m_transactions()
|
||||
{
|
||||
addVariable(m_gameServer);
|
||||
addVariable(m_player);
|
||||
addVariable(m_transactions);
|
||||
|
||||
unpack(source); //lint !e1506 Call to virtual from constructor
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
FeatureIdTransactionResponse::~FeatureIdTransactionResponse()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// FeatureIdTransactionResponse.h
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_FeatureIdTransactionResponse_H
|
||||
#define INCLUDED_FeatureIdTransactionResponse_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedFoundation/StationId.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class FeatureIdTransactionResponse : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
FeatureIdTransactionResponse (uint32 gameServer, NetworkId const & player, std::map<std::string, int> const & transactions);
|
||||
FeatureIdTransactionResponse (Archive::ReadIterator & source);
|
||||
virtual ~FeatureIdTransactionResponse ();
|
||||
|
||||
uint32 getGameServer() const;
|
||||
NetworkId const & getPlayer() const;
|
||||
std::map<std::string, int> const & getTransactions() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_gameServer;
|
||||
Archive::AutoVariable<NetworkId> m_player;
|
||||
Archive::AutoVariable<std::map<std::string, int> > m_transactions;
|
||||
|
||||
private:
|
||||
FeatureIdTransactionResponse();
|
||||
FeatureIdTransactionResponse(const FeatureIdTransactionResponse&);
|
||||
FeatureIdTransactionResponse& operator= (const FeatureIdTransactionResponse&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 FeatureIdTransactionResponse::getGameServer() const
|
||||
{
|
||||
return m_gameServer.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId const & FeatureIdTransactionResponse::getPlayer() const
|
||||
{
|
||||
return m_player.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline std::map<std::string, int> const & FeatureIdTransactionResponse::getTransactions() const
|
||||
{
|
||||
return m_transactions.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// FeatureIdTransactionSyncUpdate.cpp
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/FeatureIdTransactionSyncUpdate.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
FeatureIdTransactionSyncUpdate::FeatureIdTransactionSyncUpdate(StationId stationId, NetworkId const & player, std::string const & itemId, int adjustment) :
|
||||
GameNetworkMessage("FeatureIdTransactionSyncUpdate"),
|
||||
m_stationId(stationId),
|
||||
m_player(player),
|
||||
m_itemId(itemId),
|
||||
m_adjustment(adjustment)
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_player);
|
||||
addVariable(m_itemId);
|
||||
addVariable(m_adjustment);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
FeatureIdTransactionSyncUpdate::FeatureIdTransactionSyncUpdate(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("FeatureIdTransactionSyncUpdate"),
|
||||
m_stationId(),
|
||||
m_player(),
|
||||
m_itemId(),
|
||||
m_adjustment()
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_player);
|
||||
addVariable(m_itemId);
|
||||
addVariable(m_adjustment);
|
||||
|
||||
unpack(source); //lint !e1506 Call to virtual from constructor
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
FeatureIdTransactionSyncUpdate::~FeatureIdTransactionSyncUpdate()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// FeatureIdTransactionSyncUpdate.h
|
||||
// copyright (c) 2004 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_FeatureIdTransactionSyncUpdate_H
|
||||
#define INCLUDED_FeatureIdTransactionSyncUpdate_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedFoundation/StationId.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class FeatureIdTransactionSyncUpdate : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
FeatureIdTransactionSyncUpdate (StationId stationId, NetworkId const & player, std::string const & itemId, int adjustment);
|
||||
FeatureIdTransactionSyncUpdate (Archive::ReadIterator & source);
|
||||
virtual ~FeatureIdTransactionSyncUpdate ();
|
||||
|
||||
StationId getStationId() const;
|
||||
NetworkId const & getPlayer() const;
|
||||
std::string const & getItemId() const;
|
||||
int getAdjustment() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<StationId> m_stationId;
|
||||
Archive::AutoVariable<NetworkId> m_player;
|
||||
Archive::AutoVariable<std::string> m_itemId;
|
||||
Archive::AutoVariable<int> m_adjustment;
|
||||
|
||||
private:
|
||||
FeatureIdTransactionSyncUpdate();
|
||||
FeatureIdTransactionSyncUpdate(const FeatureIdTransactionSyncUpdate&);
|
||||
FeatureIdTransactionSyncUpdate& operator= (const FeatureIdTransactionSyncUpdate&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline StationId FeatureIdTransactionSyncUpdate::getStationId() const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId const & FeatureIdTransactionSyncUpdate::getPlayer() const
|
||||
{
|
||||
return m_player.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline std::string const & FeatureIdTransactionSyncUpdate::getItemId() const
|
||||
{
|
||||
return m_itemId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline int FeatureIdTransactionSyncUpdate::getAdjustment() const
|
||||
{
|
||||
return m_adjustment.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
//========================================================================
|
||||
//
|
||||
// FlagObjectForDeleteMessage.cpp - tells CentralServer to unload all instances of
|
||||
// an object.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/FlagObjectForDeleteMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param id id of object we want to unload
|
||||
*/
|
||||
FlagObjectForDeleteMessage::FlagObjectForDeleteMessage(const NetworkId& id, int reason, bool immediate, bool demandLoadedContainer, bool cascadeReason) :
|
||||
GameNetworkMessage("FlagObjectForDeleteMessage"),
|
||||
m_id(id),
|
||||
m_reason(reason),
|
||||
m_immediate(immediate),
|
||||
m_demandLoadedContainer(demandLoadedContainer),
|
||||
m_cascadeReason(cascadeReason)
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_reason);
|
||||
addVariable(m_immediate);
|
||||
addVariable(m_demandLoadedContainer);
|
||||
addVariable(m_cascadeReason);
|
||||
|
||||
DEBUG_FATAL(cascadeReason && !demandLoadedContainer,("Programmer bug: using cascadeReason with FlagObjectForDeleteMessage is only supported if the object is a demand-loaded container."));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
FlagObjectForDeleteMessage::FlagObjectForDeleteMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("FlagObjectForDeleteMessage"),
|
||||
m_id(NetworkId::cms_invalid),
|
||||
m_reason(0),
|
||||
m_immediate(false),
|
||||
m_cascadeReason(false)
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_reason);
|
||||
addVariable(m_immediate);
|
||||
addVariable(m_demandLoadedContainer);
|
||||
addVariable(m_cascadeReason);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class destructor.
|
||||
*/
|
||||
FlagObjectForDeleteMessage::~FlagObjectForDeleteMessage()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
//========================================================================
|
||||
//
|
||||
// FlagObjectForDeleteMessage.h - tells CentralServer to unload all instances of
|
||||
// an object.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_FlagObjectForDeleteMessage_H
|
||||
#define _INCLUDED_FlagObjectForDeleteMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class FlagObjectForDeleteMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
|
||||
explicit FlagObjectForDeleteMessage (const NetworkId& id, int reason, bool immediate, bool demandLoadedContainer, bool cascadeReason);
|
||||
FlagObjectForDeleteMessage (Archive::ReadIterator & source);
|
||||
~FlagObjectForDeleteMessage ();
|
||||
|
||||
const NetworkId& getId() const;
|
||||
int getReason() const;
|
||||
bool getImmediate() const;
|
||||
bool getDemandLoadedContainer() const;
|
||||
bool getCascadeReason() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<NetworkId> m_id;
|
||||
Archive::AutoVariable<int> m_reason;
|
||||
Archive::AutoVariable<bool> m_immediate;
|
||||
Archive::AutoVariable<bool> m_demandLoadedContainer;
|
||||
Archive::AutoVariable<bool> m_cascadeReason;
|
||||
|
||||
FlagObjectForDeleteMessage();
|
||||
FlagObjectForDeleteMessage(const FlagObjectForDeleteMessage&);
|
||||
FlagObjectForDeleteMessage& operator= (const FlagObjectForDeleteMessage&);
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId& FlagObjectForDeleteMessage::getId(void) const
|
||||
{
|
||||
return m_id.get();
|
||||
} // FlagObjectForDeleteMessage::getId
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline int FlagObjectForDeleteMessage::getReason(void) const
|
||||
{
|
||||
return m_reason.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline bool FlagObjectForDeleteMessage::getImmediate() const
|
||||
{
|
||||
return m_immediate.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline bool FlagObjectForDeleteMessage::getDemandLoadedContainer() const
|
||||
{
|
||||
return m_demandLoadedContainer.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline bool FlagObjectForDeleteMessage::getCascadeReason() const
|
||||
{
|
||||
return m_cascadeReason.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif // _INCLUDED_FlagObjectForDeleteMessage_H
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
//========================================================================
|
||||
//
|
||||
// ForceUnloadObjectMessage.cpp - tells CentralServer to unload all instances of
|
||||
// an object.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/ForceUnloadObjectMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param id id of object we want to unload
|
||||
*/
|
||||
ForceUnloadObjectMessage::ForceUnloadObjectMessage(const NetworkId& id, bool permaDelete) :
|
||||
GameNetworkMessage("ForceUnloadObjectMessage"),
|
||||
m_id(id),
|
||||
m_permaDelete(permaDelete)
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_permaDelete);
|
||||
} // ForceUnloadObjectMessage::ForceUnloadObjectMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ForceUnloadObjectMessage::ForceUnloadObjectMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ForceUnloadObjectMessage"),
|
||||
m_id(NetworkId::cms_invalid),
|
||||
m_permaDelete(false)
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_permaDelete);
|
||||
unpack(source);
|
||||
} // ForceUnloadObjectMessage::ForceUnloadObjectMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class destructor.
|
||||
*/
|
||||
ForceUnloadObjectMessage::~ForceUnloadObjectMessage()
|
||||
{
|
||||
} // ForceUnloadObjectMessage::~ForceUnloadObjectMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
//========================================================================
|
||||
//
|
||||
// ForceUnloadObjectMessage.h - tells CentralServer to unload all instances of
|
||||
// an object.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_ForceUnloadObjectMessage_H
|
||||
#define _INCLUDED_ForceUnloadObjectMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class ForceUnloadObjectMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
explicit ForceUnloadObjectMessage (const NetworkId& id, bool permaDelete = false);
|
||||
ForceUnloadObjectMessage (Archive::ReadIterator & source);
|
||||
~ForceUnloadObjectMessage ();
|
||||
|
||||
const NetworkId& getId(void) const;
|
||||
bool getPermaDelete(void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<NetworkId> m_id; ///< id of object we want to unload
|
||||
Archive::AutoVariable<bool> m_permaDelete; ///< whether or not to delete this from the DB.
|
||||
|
||||
ForceUnloadObjectMessage();
|
||||
ForceUnloadObjectMessage(const ForceUnloadObjectMessage&);
|
||||
ForceUnloadObjectMessage& operator= (const ForceUnloadObjectMessage&);
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId& ForceUnloadObjectMessage::getId(void) const
|
||||
{
|
||||
return m_id.get();
|
||||
} // ForceUnloadObjectMessage::getId
|
||||
|
||||
inline bool ForceUnloadObjectMessage::getPermaDelete(void) const
|
||||
{
|
||||
return m_permaDelete.get();
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
|
||||
#endif // _INCLUDED_ForceUnloadObjectMessage_H
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
// GameServerCSToolRequest.cpp
|
||||
// Copyright 2005, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Rob Hanz
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/GameServerCSRequestMessage.h"
|
||||
#include "serverNetworkMessages/CSToolRequest.h"
|
||||
|
||||
|
||||
GameServerCSRequestMessage::GameServerCSRequestMessage ( uint32 accountId,
|
||||
const std::string & command,
|
||||
uint32 toolId,
|
||||
uint32 accessLevel,
|
||||
uint32 loginServerID,
|
||||
const std::string & userName,
|
||||
const std::string & commandName ) :
|
||||
GameNetworkMessage( "GameServerCSRequest" ),
|
||||
m_accountId( accountId ),
|
||||
m_command( command ),
|
||||
m_toolId( toolId ),
|
||||
m_accessLevel( accessLevel ),
|
||||
m_loginServerID( loginServerID ),
|
||||
m_userName( userName ),
|
||||
m_commandName( commandName )
|
||||
{
|
||||
addVariable( m_accountId );
|
||||
addVariable( m_command );
|
||||
addVariable( m_toolId );
|
||||
addVariable( m_accessLevel );
|
||||
addVariable( m_loginServerID );
|
||||
addVariable( m_userName );
|
||||
addVariable( m_commandName );
|
||||
}
|
||||
|
||||
GameServerCSRequestMessage::GameServerCSRequestMessage( Archive::ReadIterator & source ) :
|
||||
GameNetworkMessage("GameServerCSRequest"),
|
||||
m_accountId( 0 ),
|
||||
m_command( "" ),
|
||||
m_toolId( 0 ),
|
||||
m_accessLevel( 0 ),
|
||||
m_loginServerID( 0 ),
|
||||
m_userName( "" ),
|
||||
m_commandName( "" )
|
||||
{
|
||||
addVariable( m_accountId );
|
||||
addVariable( m_command );
|
||||
addVariable( m_toolId );
|
||||
addVariable( m_accessLevel );
|
||||
addVariable( m_loginServerID );
|
||||
addVariable( m_userName );
|
||||
addVariable( m_commandName );
|
||||
AutoByteStream::unpack( source );
|
||||
}
|
||||
|
||||
GameServerCSRequestMessage::~GameServerCSRequestMessage()
|
||||
{
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
// CSToolREquest.h
|
||||
// Copyright 2004, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Rob Hanz
|
||||
|
||||
#ifndef _INCLUDED_GameServerCSRequest_H
|
||||
#define _INCLUDED_GameServerCSRequest_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
class CSToolRequest;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
/** A Central Server is telling the login server which cluster it is
|
||||
servicing.
|
||||
*/
|
||||
class GameServerCSRequestMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
GameServerCSRequestMessage ( uint32 accountId,
|
||||
const std::string & command,
|
||||
uint32 toolId,
|
||||
uint32 accessLevel,
|
||||
uint32 loginServerID,
|
||||
const std::string & userName,
|
||||
const std::string & commandName );
|
||||
GameServerCSRequestMessage (Archive::ReadIterator & source);
|
||||
virtual ~GameServerCSRequestMessage ();
|
||||
|
||||
uint32 getAccountId () const;
|
||||
const std::string & getCommandString() const;
|
||||
uint32 getToolId() const;
|
||||
uint32 getAccessLevel() const;
|
||||
uint32 getLoginServerID() const;
|
||||
const std::string& getUserName() const;
|
||||
const std::string& getCommandName() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable< uint32 > m_accountId;
|
||||
Archive::AutoVariable<std::string> m_command;
|
||||
Archive::AutoVariable< uint32 > m_toolId;
|
||||
Archive::AutoVariable< uint32 > m_accessLevel;
|
||||
Archive::AutoVariable< uint32 > m_loginServerID;
|
||||
Archive::AutoVariable< std::string > m_userName;
|
||||
Archive::AutoVariable< std::string > m_commandName;
|
||||
|
||||
|
||||
GameServerCSRequestMessage();
|
||||
GameServerCSRequestMessage(const GameServerCSRequestMessage&);
|
||||
GameServerCSRequestMessage& operator= (const GameServerCSRequestMessage&);
|
||||
|
||||
};
|
||||
|
||||
inline uint32 GameServerCSRequestMessage::getAccountId() const
|
||||
{
|
||||
return m_accountId.get();
|
||||
}
|
||||
|
||||
inline const std::string & GameServerCSRequestMessage::getCommandString() const
|
||||
{
|
||||
return m_command.get();
|
||||
}
|
||||
|
||||
inline uint32 GameServerCSRequestMessage::getAccessLevel() const
|
||||
{
|
||||
return m_accessLevel.get();
|
||||
}
|
||||
|
||||
inline uint32 GameServerCSRequestMessage::getToolId() const
|
||||
{
|
||||
return m_toolId.get();
|
||||
}
|
||||
|
||||
inline uint32 GameServerCSRequestMessage::getLoginServerID() const
|
||||
{
|
||||
return m_loginServerID.get();
|
||||
}
|
||||
|
||||
inline const std::string & GameServerCSRequestMessage::getUserName() const
|
||||
{
|
||||
return m_userName.get();
|
||||
}
|
||||
|
||||
inline const std::string & GameServerCSRequestMessage::getCommandName() const
|
||||
{
|
||||
return m_commandName.get();
|
||||
}
|
||||
#endif //_INCLUDED_GameServerCSRequest_H
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
// CSToolRequest.cpp
|
||||
// Copyright 2005, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Rob Hanz
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/GameServerCSRequestMessage.h"
|
||||
#include "serverNetworkMessages/GameServerCSResponseMessage.h"
|
||||
|
||||
|
||||
GameServerCSResponseMessage::GameServerCSResponseMessage( const GameServerCSRequestMessage & source ) :
|
||||
GameNetworkMessage( "GameServerCSResponse" ),
|
||||
m_accountId( source.getAccountId() ),
|
||||
m_response( "" ),
|
||||
m_toolId( source.getToolId() ),
|
||||
m_loginServerID( source.getLoginServerID() )
|
||||
{
|
||||
addVariable( m_accountId );
|
||||
addVariable( m_response );
|
||||
addVariable( m_toolId );
|
||||
addVariable( m_loginServerID );
|
||||
}
|
||||
|
||||
GameServerCSResponseMessage::GameServerCSResponseMessage( Archive::ReadIterator & source ) :
|
||||
GameNetworkMessage("GameServerCSResponse"),
|
||||
m_accountId( 0 ),
|
||||
m_response( "" ),
|
||||
m_toolId( 0 ),
|
||||
m_loginServerID( 0 )
|
||||
{
|
||||
addVariable( m_accountId );
|
||||
addVariable( m_response );
|
||||
addVariable( m_toolId );
|
||||
addVariable( m_loginServerID );
|
||||
AutoByteStream::unpack( source );
|
||||
}
|
||||
|
||||
GameServerCSResponseMessage::~GameServerCSResponseMessage()
|
||||
{
|
||||
}
|
||||
|
||||
void GameServerCSResponseMessage::setResponse( const std::string & response )
|
||||
{
|
||||
m_response.set( response );
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
// CSToolREquest.h
|
||||
// Copyright 2004, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Rob Hanz
|
||||
|
||||
#ifndef _INCLUDED_GameServerCSResponse_H
|
||||
#define _INCLUDED_GameServerCSResponse_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
#include "serverNetworkMessages/GameServerCSRequestMessage.h"
|
||||
//-----------------------------------------------------------------------
|
||||
/** A Central Server is telling the login server which cluster it is
|
||||
servicing.
|
||||
*/
|
||||
class GameServerCSResponseMessage: public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
GameServerCSResponseMessage( const GameServerCSRequestMessage & source );
|
||||
GameServerCSResponseMessage(Archive::ReadIterator & source);
|
||||
virtual ~GameServerCSResponseMessage ();
|
||||
|
||||
uint32 getAccountId () const;
|
||||
const std::string & getResponse() const;
|
||||
uint32 getToolId() const;
|
||||
uint32 getLoginServerID() const;
|
||||
|
||||
void setResponse( const std::string & response );
|
||||
|
||||
private:
|
||||
Archive::AutoVariable< uint32 > m_accountId;
|
||||
Archive::AutoVariable<std::string> m_response;
|
||||
Archive::AutoVariable< uint32 > m_toolId;
|
||||
Archive::AutoVariable< uint32 > m_loginServerID;
|
||||
|
||||
|
||||
GameServerCSResponseMessage();
|
||||
GameServerCSResponseMessage(const GameServerCSResponseMessage&);
|
||||
GameServerCSResponseMessage& operator= (const GameServerCSResponseMessage&);
|
||||
|
||||
};
|
||||
|
||||
inline const std::string & GameServerCSResponseMessage::getResponse() const
|
||||
{
|
||||
return m_response.get();
|
||||
}
|
||||
|
||||
inline uint32 GameServerCSResponseMessage::getAccountId() const
|
||||
{
|
||||
return m_accountId.get();
|
||||
}
|
||||
|
||||
inline uint32 GameServerCSResponseMessage::getToolId() const
|
||||
{
|
||||
return m_toolId.get();
|
||||
}
|
||||
|
||||
inline uint32 GameServerCSResponseMessage::getLoginServerID() const
|
||||
{
|
||||
return m_loginServerID.get();
|
||||
}
|
||||
|
||||
#endif //_INCLUDED_GameServerCSResponse_H
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
//========================================================================
|
||||
//
|
||||
// GameServerReadyMessage.cpp - tells Centralserver we want all the objects in a chunk.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/GameServerReadyMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
GameServerReadyMessage::GameServerReadyMessage(int mapWidth) :
|
||||
GameNetworkMessage("GameServerReadyMessage"),
|
||||
m_mapWidth(mapWidth)
|
||||
{
|
||||
addVariable(m_mapWidth);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
GameServerReadyMessage::GameServerReadyMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("GameServerReadyMessage")
|
||||
{
|
||||
addVariable(m_mapWidth);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
GameServerReadyMessage::~GameServerReadyMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
int GameServerReadyMessage::getMapWidth() const
|
||||
{
|
||||
return m_mapWidth.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// GameServerReadyMessage.h
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_GameServerReadyMessage_H
|
||||
#define INCLUDED_GameServerReadyMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Sent from: GameServer
|
||||
* Sent to: Central and Planet Servers
|
||||
* Action: The GameServer has finished initialization and is ready to
|
||||
* handle requests.
|
||||
*/
|
||||
class GameServerReadyMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
GameServerReadyMessage (int mapWidth);
|
||||
GameServerReadyMessage (Archive::ReadIterator & source);
|
||||
~GameServerReadyMessage ();
|
||||
|
||||
int getMapWidth() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<int> m_mapWidth;
|
||||
|
||||
private:
|
||||
|
||||
GameServerReadyMessage(const GameServerReadyMessage&);
|
||||
GameServerReadyMessage& operator= (const GameServerReadyMessage&);
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// GameServerUniverseLoadedMessage.cpp
|
||||
//
|
||||
// Copyright 2002 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/GameServerUniverseLoadedMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
GameServerUniverseLoadedMessage::GameServerUniverseLoadedMessage(uint32 processId, uint32 sourceOfUniverseDataProcessId) :
|
||||
GameNetworkMessage("GameServerUniverseLoadedMessage"),
|
||||
m_processId(processId),
|
||||
m_sourceOfUniverseDataProcessId(sourceOfUniverseDataProcessId)
|
||||
{
|
||||
addVariable(m_processId);
|
||||
addVariable(m_sourceOfUniverseDataProcessId);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
GameServerUniverseLoadedMessage::GameServerUniverseLoadedMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("GameServerUniverseLoadedMessage"),
|
||||
m_processId(),
|
||||
m_sourceOfUniverseDataProcessId()
|
||||
{
|
||||
addVariable(m_processId);
|
||||
addVariable(m_sourceOfUniverseDataProcessId);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
GameServerUniverseLoadedMessage::~GameServerUniverseLoadedMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// GameServerUniverseLoadedMessage.h
|
||||
//
|
||||
// Copyright 2002 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_GameServerUniverseLoadedMessage_H
|
||||
#define INCLUDED_GameServerUniverseLoadedMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Sent from: GameServer
|
||||
* Sent to: Central
|
||||
* Action: The GameServer has completed loading its universe objects.
|
||||
*/
|
||||
class GameServerUniverseLoadedMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
GameServerUniverseLoadedMessage (uint32 processId, uint32 sourceOfUniverseDataProcessId);
|
||||
GameServerUniverseLoadedMessage (Archive::ReadIterator & source);
|
||||
~GameServerUniverseLoadedMessage ();
|
||||
|
||||
uint32 getProcessId() const;
|
||||
uint32 getSourceOfUniverseDataProcessId() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_processId;
|
||||
Archive::AutoVariable<uint32> m_sourceOfUniverseDataProcessId;
|
||||
|
||||
GameServerUniverseLoadedMessage(const GameServerUniverseLoadedMessage&);
|
||||
GameServerUniverseLoadedMessage& operator= (const GameServerUniverseLoadedMessage&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 GameServerUniverseLoadedMessage::getProcessId() const
|
||||
{
|
||||
return m_processId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 GameServerUniverseLoadedMessage::getSourceOfUniverseDataProcessId() const
|
||||
{
|
||||
return m_sourceOfUniverseDataProcessId.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// LoadObjectMessage.cpp - tells Gameserver another Gameserver wants to load a
|
||||
// proxy from an authoritative object.
|
||||
//
|
||||
// Copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/LoadObjectMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param id id of object we want to load
|
||||
* @param process process id of Gameserver that wants to load the object
|
||||
*/
|
||||
LoadObjectMessage::LoadObjectMessage(NetworkId const &id, uint32 process) :
|
||||
GameNetworkMessage("LoadObjectMessage"),
|
||||
m_id(id),
|
||||
m_process(process)
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_process);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
LoadObjectMessage::LoadObjectMessage(Archive::ReadIterator &source) :
|
||||
GameNetworkMessage("LoadObjectMessage"),
|
||||
m_id(),
|
||||
m_process()
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_process);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class destructor.
|
||||
*/
|
||||
LoadObjectMessage::~LoadObjectMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// LoadObjectMessage.h - tells Gameserver another Gameserver wants to load a
|
||||
// proxy from an authoritative object.
|
||||
//
|
||||
// Copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef _INCLUDED_LoadObjectMessage_H
|
||||
#define _INCLUDED_LoadObjectMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class LoadObjectMessage: public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
LoadObjectMessage(NetworkId const &id, uint32 process);
|
||||
LoadObjectMessage(Archive::ReadIterator &source);
|
||||
~LoadObjectMessage();
|
||||
|
||||
NetworkId const & getId() const;
|
||||
uint32 getProcess() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<NetworkId> m_id; // id of object we want to load
|
||||
Archive::AutoVariable<uint32> m_process; // process id of Gameserver that wants to load the object
|
||||
|
||||
LoadObjectMessage();
|
||||
LoadObjectMessage(LoadObjectMessage const &);
|
||||
LoadObjectMessage &operator=(LoadObjectMessage const &);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId const &LoadObjectMessage::getId() const
|
||||
{
|
||||
return m_id.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 LoadObjectMessage::getProcess() const
|
||||
{
|
||||
return m_process.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif // _INCLUDED_LoadObjectMessage_H
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
//========================================================================
|
||||
//
|
||||
// LoadUniverseMessage.cpp - tells Centralserver we want all the objects in a chunk.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/LoadUniverseMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param process gameserver id that should receive the loaded objects
|
||||
*/
|
||||
LoadUniverseMessage::LoadUniverseMessage (uint32 process) :
|
||||
GameNetworkMessage("LoadUniverseMessage"),
|
||||
m_process(process)
|
||||
{
|
||||
addVariable(m_process);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
LoadUniverseMessage::LoadUniverseMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("LoadUniverseMessage"),
|
||||
m_process()
|
||||
{
|
||||
addVariable(m_process);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
LoadUniverseMessage::~LoadUniverseMessage()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
//========================================================================
|
||||
//
|
||||
// LoadUniverseMessage.h - tells Gameserver another Gameserver wants to load a
|
||||
// proxy from an authoritative object.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_LoadUniverseMessage_H
|
||||
#define _INCLUDED_LoadUniverseMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class LoadUniverseMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
LoadUniverseMessage (uint32 process);
|
||||
LoadUniverseMessage (Archive::ReadIterator & source);
|
||||
~LoadUniverseMessage ();
|
||||
|
||||
uint32 getProcess(void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_process; // process id of Gameserver that wants to load the object
|
||||
|
||||
private:
|
||||
LoadUniverseMessage();
|
||||
LoadUniverseMessage(const LoadUniverseMessage&);
|
||||
LoadUniverseMessage& operator= (const LoadUniverseMessage&);
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline uint32 LoadUniverseMessage::getProcess(void) const
|
||||
{
|
||||
return m_process.get();
|
||||
} // LoadUniverseMessage::getProcess
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#endif // _INCLUDED_LoadUniverseMessage_H
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageToAckMessage.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/MessageToAckMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
MessageToAckMessage::MessageToAckMessage(const NetworkId &messageId) :
|
||||
GameNetworkMessage("MessageToAckMessage"),
|
||||
m_messageId(messageId)
|
||||
{
|
||||
addVariable(m_messageId);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
MessageToAckMessage::MessageToAckMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("MessageToAckMessage"),
|
||||
m_messageId()
|
||||
{
|
||||
addVariable(m_messageId);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
MessageToAckMessage::~MessageToAckMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageToAckMessage.h
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_MessageToAckMessage_H
|
||||
#define INCLUDED_MessageToAckMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
/**
|
||||
* Case 1:
|
||||
* Sent from: GameServer
|
||||
* Sent to: Central
|
||||
* Action: Acknowldege that a MessageTo has been handled.
|
||||
*
|
||||
* Case 2:
|
||||
* Sent from: Central
|
||||
* Sent to: DBProcess
|
||||
* Action: Remove a MessageTo from the database.
|
||||
*/
|
||||
class MessageToAckMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
MessageToAckMessage (const NetworkId &messageId);
|
||||
MessageToAckMessage (Archive::ReadIterator & source);
|
||||
~MessageToAckMessage ();
|
||||
|
||||
const NetworkId & getMessageId() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<NetworkId> m_messageId;
|
||||
|
||||
MessageToAckMessage();
|
||||
MessageToAckMessage(const MessageToAckMessage&);
|
||||
MessageToAckMessage& operator= (const MessageToAckMessage&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & MessageToAckMessage::getMessageId() const
|
||||
{
|
||||
return m_messageId.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageToMessage.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/MessageToMessage.h"
|
||||
#include "sharedNetwork/NetworkHandler.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
MessageToMessage::MessageToMessage(MessageToPayload const &data, uint32 sourceServerPid) :
|
||||
GameNetworkMessage("MessageToMessage"),
|
||||
m_data(data),
|
||||
m_sourceServerPid(sourceServerPid)
|
||||
{
|
||||
addVariable(m_data);
|
||||
addVariable(m_sourceServerPid);
|
||||
std::string messageName = "MessageToPayload." + m_data.get().getMethod();
|
||||
NetworkHandler::reportMessage(messageName, m_data.get().getPackedDataVector().size());
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
MessageToMessage::MessageToMessage(Archive::ReadIterator &source) :
|
||||
GameNetworkMessage("MessageToMessage"),
|
||||
m_data(),
|
||||
m_sourceServerPid()
|
||||
{
|
||||
addVariable(m_data);
|
||||
addVariable(m_sourceServerPid);
|
||||
unpack(source);
|
||||
std::string messageName = "MessageToPayload." + m_data.get().getMethod();
|
||||
NetworkHandler::reportMessage(messageName, m_data.get().getPackedDataVector().size());
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
MessageToMessage::~MessageToMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageToMessage.h
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_MessageToMessage_H
|
||||
#define INCLUDED_MessageToMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/MessageToPayload.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class MessageToMessage: public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
MessageToMessage(MessageToPayload const &data, uint32 sourceServerPid);
|
||||
MessageToMessage(Archive::ReadIterator &source);
|
||||
~MessageToMessage();
|
||||
|
||||
MessageToPayload const &getData() const;
|
||||
uint32 getSourceServerPid() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<MessageToPayload> m_data;
|
||||
Archive::AutoVariable<uint32> m_sourceServerPid;
|
||||
|
||||
MessageToMessage();
|
||||
MessageToMessage(MessageToMessage const &);
|
||||
MessageToMessage &operator=(MessageToMessage const &);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline MessageToPayload const &MessageToMessage::getData() const
|
||||
{
|
||||
return m_data.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 MessageToMessage::getSourceServerPid() const
|
||||
{
|
||||
return m_sourceServerPid.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
|
||||
+272
@@ -0,0 +1,272 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageToPayload.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/MessageToPayload.h"
|
||||
|
||||
#include "MessageToPayloadImpl.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
MessageToPayload::MessageToPayload(const NetworkId &networkId, const MessageToId &messageId, const std::string &method, const std::string &packedData, unsigned long callTime, bool guaranteed, DeliveryType deliveryType, NetworkId const & undeliveredCallbackObject, std::string const & undeliveredCallbackMethod, int recurringTime) :
|
||||
m_impl(new MessageToPayloadImpl(networkId, messageId, method, packedData, callTime, guaranteed, deliveryType, undeliveredCallbackObject, undeliveredCallbackMethod, recurringTime))
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageToPayload::MessageToPayload(const NetworkId &networkId, const MessageToId &messageId, const std::string &method, const std::vector<int8> &packedData, unsigned long callTime, bool guaranteed, DeliveryType deliveryType, NetworkId const & undeliveredCallbackObject, std::string const & undeliveredCallbackMethod, int recurringTime) :
|
||||
m_impl(new MessageToPayloadImpl(networkId, messageId, method, packedData, callTime, guaranteed, deliveryType, undeliveredCallbackObject, undeliveredCallbackMethod, recurringTime))
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageToPayload::MessageToPayload() :
|
||||
m_impl(new MessageToPayloadImpl())
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageToPayload::MessageToPayload(MessageToPayload const & rhs) :
|
||||
m_impl(rhs.m_impl)
|
||||
{
|
||||
m_impl->increaseRefCount();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageToPayload::~MessageToPayload()
|
||||
{
|
||||
m_impl->decreaseRefCount();
|
||||
if (m_impl->getRefCount()==0)
|
||||
delete m_impl;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageToPayload & MessageToPayload::operator=(MessageToPayload const & rhs)
|
||||
{
|
||||
if (&rhs != this)
|
||||
{
|
||||
m_impl->decreaseRefCount();
|
||||
if (m_impl->getRefCount()==0)
|
||||
delete m_impl;
|
||||
m_impl=rhs.m_impl;
|
||||
m_impl->increaseRefCount();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageToPayload::setGuaranteed(bool guaranteed)
|
||||
{
|
||||
// This does not do a copy-on-write if the refcount > 1, because currently
|
||||
// we don't expect the code to ever change the guaranteed flag when there
|
||||
// is more than one reference to the message. If it does, it probably
|
||||
// indicates incorrect behavior.
|
||||
m_impl->setGuaranteed(guaranteed);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageToPayload::pack(Archive::ByteStream &target) const
|
||||
{
|
||||
m_impl->pack(target);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageToPayload::unpack(Archive::ReadIterator &source)
|
||||
{
|
||||
if (m_impl->getRefCount() > 1)
|
||||
{
|
||||
// copy-on-write
|
||||
m_impl->decreaseRefCount();
|
||||
m_impl=new MessageToPayloadImpl();
|
||||
}
|
||||
m_impl->unpack(source);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
NetworkId const & MessageToPayload::getUndeliveredCallbackObject() const
|
||||
{
|
||||
return m_impl->getUndeliveredCallbackObject();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
std::string const & MessageToPayload::getUndeliveredCallbackMethod() const
|
||||
{
|
||||
return m_impl->getUndeliveredCallbackMethod();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
std::string MessageToPayload::getDataAsString() const
|
||||
{
|
||||
return m_impl->getDataAsString();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool MessageToPayload::operator==(MessageToPayload const & rhs) const
|
||||
{
|
||||
return (m_impl == rhs.m_impl || *m_impl == *(rhs.m_impl));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool MessageToPayload::operator!=(MessageToPayload const & rhs) const
|
||||
{
|
||||
return (m_impl != rhs.m_impl && *m_impl != *(rhs.m_impl));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
int MessageToPayload::getRecurringTime() const
|
||||
{
|
||||
return m_impl->getRecurringTime();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
int MessageToPayload::getInstanceCount()
|
||||
{
|
||||
return MessageToPayloadImpl::getInstanceCount();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
NetworkId const & MessageToPayload::getNetworkId() const
|
||||
{
|
||||
return m_impl->getNetworkId();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageToId const & MessageToPayload::getMessageId() const
|
||||
{
|
||||
return m_impl->getMessageId();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
std::string const & MessageToPayload::getMethod() const
|
||||
{
|
||||
return m_impl->getMethod();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
std::vector<int8> const & MessageToPayload::getPackedDataVector() const
|
||||
{
|
||||
return m_impl->getPackedDataVector();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
unsigned long MessageToPayload::getCallTime() const
|
||||
{
|
||||
return m_impl->getCallTime();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool MessageToPayload::getGuaranteed() const
|
||||
{
|
||||
return m_impl->getGuaranteed();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageToPayload::DeliveryType MessageToPayload::getDeliveryType() const
|
||||
{
|
||||
return m_impl->getDeliveryType();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
uint64 MessageToPayload::getCounterMessageToPayload() const
|
||||
{
|
||||
return m_impl->getCounterMessageToPayload();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool MessageToPayload::getPersisted() const
|
||||
{
|
||||
return m_impl->getPersisted();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageToPayload::setPersisted(bool persisted)
|
||||
{
|
||||
m_impl->setPersisted(persisted);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageToPayload::addBroadcastCount()
|
||||
{
|
||||
m_impl->addBroadcastCount();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageToPayload::addBounceServer(uint32 serverProcessId)
|
||||
{
|
||||
m_impl->addBounceServer(serverProcessId);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool MessageToPayload::hasBounceServer(uint32 serverProcessId) const
|
||||
{
|
||||
return m_impl->hasBounceServer(serverProcessId);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageToPayload::clearBounceServers()
|
||||
{
|
||||
m_impl->clearBounceServers();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
int MessageToPayload::getBroadcastCount() const
|
||||
{
|
||||
return m_impl->getBroadcastCount();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
int MessageToPayload::getBounceCount() const
|
||||
{
|
||||
return m_impl->getBounceCount();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
void Archive::put(ByteStream & target, const MessageToPayload & source)
|
||||
{
|
||||
source.pack(target);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void Archive::get(ReadIterator & source, MessageToPayload & target)
|
||||
{
|
||||
target.unpack(source);
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageToPayload.h
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//const
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_MessageToPayload_H
|
||||
#define INCLUDED_MessageToPayload_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class NetworkId;
|
||||
typedef NetworkId MessageToId;
|
||||
class MessageToPayload;
|
||||
class MessageToPayloadImpl;
|
||||
|
||||
namespace Archive
|
||||
{
|
||||
class ByteStream;
|
||||
class ReadIterator;
|
||||
|
||||
void put(ByteStream & target, const MessageToPayload & source);
|
||||
void get(ReadIterator & source, MessageToPayload & target);
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Data associated with a MessageTo
|
||||
*
|
||||
* Implemented as a pointer to a refcounted class, because the game server
|
||||
* copies these often.
|
||||
*/
|
||||
class MessageToPayload
|
||||
{
|
||||
public:
|
||||
enum DeliveryType
|
||||
{
|
||||
DT_c,
|
||||
DT_java,
|
||||
DT_none
|
||||
};
|
||||
|
||||
public:
|
||||
MessageToPayload(const NetworkId &networkId, const MessageToId &messageId, const std::string &method, const std::string &packedData, unsigned long callTime, bool guaranteed, DeliveryType deliveryType, NetworkId const & undeliveredCallbackObject, std::string const & undeliveredCallbackMethod, int recurringTime);
|
||||
MessageToPayload(const NetworkId &networkId, const MessageToId &messageId, const std::string &method, const stdvector<int8>::fwd &packedData, unsigned long callTime, bool guaranteed, DeliveryType deliveryType, NetworkId const & undeliveredCallbackObject, std::string const & undeliveredCallbackMethod, int recurringTime);
|
||||
MessageToPayload(MessageToPayload const & rhs);
|
||||
MessageToPayload();
|
||||
~MessageToPayload();
|
||||
MessageToPayload & operator=(MessageToPayload const & rhs);
|
||||
|
||||
bool operator==(MessageToPayload const & rhs) const;
|
||||
bool operator!=(MessageToPayload const & rhs) const;
|
||||
|
||||
void pack(Archive::ByteStream &target) const;
|
||||
void unpack(Archive::ReadIterator &source);
|
||||
|
||||
void setGuaranteed(bool guaranteed);
|
||||
void setPersisted(bool persisted);
|
||||
void addBroadcastCount();
|
||||
void addBounceServer(uint32 serverProcessId);
|
||||
bool hasBounceServer(uint32 serverProcessId) const;
|
||||
void clearBounceServers();
|
||||
|
||||
NetworkId const &getNetworkId() const;
|
||||
MessageToId const &getMessageId() const;
|
||||
std::string const &getMethod() const;
|
||||
stdvector<int8>::fwd const &getPackedDataVector() const;
|
||||
std::string getDataAsString() const;
|
||||
unsigned long getCallTime() const;
|
||||
bool getGuaranteed() const;
|
||||
DeliveryType getDeliveryType() const;
|
||||
NetworkId const & getUndeliveredCallbackObject() const;
|
||||
std::string const & getUndeliveredCallbackMethod() const;
|
||||
int getRecurringTime() const;
|
||||
uint64 getCounterMessageToPayload() const;
|
||||
bool getPersisted() const;
|
||||
int getBroadcastCount() const;
|
||||
int getBounceCount() const;
|
||||
|
||||
static int getInstanceCount();
|
||||
|
||||
private:
|
||||
MessageToPayloadImpl * m_impl;
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+290
@@ -0,0 +1,290 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageToPayloadImpl.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "MessageToPayloadImpl.h"
|
||||
|
||||
uint64 MessageToPayloadImpl::ms_counterMessageToPayload = 0;
|
||||
int MessageToPayloadImpl::ms_instanceCount = 0;
|
||||
|
||||
// ======================================================================
|
||||
|
||||
MessageToPayloadImpl::MessageToPayloadImpl(const NetworkId &networkId, const MessageToId &messageId, const std::string &method, const std::string &packedData, unsigned long callTime, bool guaranteed, MessageToPayload::DeliveryType deliveryType, NetworkId const & undeliveredCallbackObject, std::string const & undeliveredCallbackMethod, int recurringTime) :
|
||||
m_networkId(networkId),
|
||||
m_messageId(messageId),
|
||||
m_method(method),
|
||||
m_packedData(packedData.begin(), packedData.end()),
|
||||
m_callTime(callTime),
|
||||
m_guaranteed(guaranteed),
|
||||
m_persisted(false),
|
||||
m_deliveryType(deliveryType),
|
||||
m_undeliveredCallbackObject(undeliveredCallbackObject),
|
||||
m_undeliveredCallbackMethod(undeliveredCallbackMethod),
|
||||
m_recurringTime(recurringTime),
|
||||
m_broadcastCount(0),
|
||||
m_bounceCount(0),
|
||||
m_bounceServers(),
|
||||
m_refCount(1),
|
||||
m_counterMessageToPayload(++ms_counterMessageToPayload)
|
||||
{
|
||||
DEBUG_FATAL(m_guaranteed && m_recurringTime!=0,("Attempted to create MessageToPayloadImpl for message %s, which was guaranteed and had a recurringTime. Recurring MessageTos may not be guaranteed."));
|
||||
++ms_instanceCount;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageToPayloadImpl::MessageToPayloadImpl(const NetworkId &networkId, const MessageToId &messageId, const std::string &method, const std::vector<int8> &packedData, unsigned long callTime, bool guaranteed, MessageToPayload::DeliveryType deliveryType, NetworkId const & undeliveredCallbackObject, std::string const & undeliveredCallbackMethod, int recurringTime) :
|
||||
m_networkId(networkId),
|
||||
m_messageId(messageId),
|
||||
m_method(method),
|
||||
m_packedData(packedData),
|
||||
m_callTime(callTime),
|
||||
m_guaranteed(guaranteed),
|
||||
m_persisted(false),
|
||||
m_deliveryType(deliveryType),
|
||||
m_undeliveredCallbackObject(undeliveredCallbackObject),
|
||||
m_undeliveredCallbackMethod(undeliveredCallbackMethod),
|
||||
m_recurringTime(recurringTime),
|
||||
m_broadcastCount(0),
|
||||
m_bounceCount(0),
|
||||
m_bounceServers(),
|
||||
m_refCount(1),
|
||||
m_counterMessageToPayload(++ms_counterMessageToPayload)
|
||||
{
|
||||
DEBUG_FATAL(m_guaranteed && m_recurringTime!=0,("Attempted to create MessageToPayloadImpl for message %s, which was guaranteed and had a recurringTime. Recurring MessageTos may not be guaranteed."));
|
||||
++ms_instanceCount;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageToPayloadImpl::MessageToPayloadImpl() :
|
||||
m_networkId(),
|
||||
m_messageId(),
|
||||
m_method(),
|
||||
m_packedData(),
|
||||
m_callTime(0),
|
||||
m_guaranteed(false),
|
||||
m_persisted(false),
|
||||
m_deliveryType(MessageToPayload::DT_none),
|
||||
m_undeliveredCallbackObject(NetworkId::cms_invalid),
|
||||
m_undeliveredCallbackMethod(),
|
||||
m_recurringTime(0),
|
||||
m_broadcastCount(0),
|
||||
m_bounceCount(0),
|
||||
m_bounceServers(),
|
||||
m_refCount(1),
|
||||
m_counterMessageToPayload(++ms_counterMessageToPayload)
|
||||
{
|
||||
++ms_instanceCount;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageToPayloadImpl::MessageToPayloadImpl(MessageToPayloadImpl const & rhs) :
|
||||
m_networkId(rhs.m_networkId),
|
||||
m_messageId(rhs.m_messageId),
|
||||
m_method(rhs.m_method),
|
||||
m_packedData(rhs.m_packedData),
|
||||
m_callTime(rhs.m_callTime),
|
||||
m_guaranteed(rhs.m_guaranteed),
|
||||
m_persisted(rhs.m_persisted),
|
||||
m_deliveryType(rhs.m_deliveryType),
|
||||
m_undeliveredCallbackObject(rhs.m_undeliveredCallbackObject),
|
||||
m_undeliveredCallbackMethod(rhs.m_undeliveredCallbackMethod),
|
||||
m_recurringTime(rhs.m_recurringTime),
|
||||
m_broadcastCount(0),
|
||||
m_bounceCount(0),
|
||||
m_bounceServers(),
|
||||
m_refCount(1),
|
||||
m_counterMessageToPayload(rhs.m_counterMessageToPayload)
|
||||
{
|
||||
++ms_instanceCount;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageToPayloadImpl::~MessageToPayloadImpl()
|
||||
{
|
||||
--ms_instanceCount;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageToPayloadImpl::setGuaranteed(bool guaranteed)
|
||||
{
|
||||
WARNING_DEBUG_FATAL(m_refCount > 1,("Programmer bug: attempted to set data on a MessageToPayloadImpl that had a refcount > 1. This would overwrite data that is referenced in multiple places, which is not safe."));
|
||||
m_guaranteed = guaranteed;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageToPayloadImpl::setPersisted(bool persisted)
|
||||
{
|
||||
WARNING_DEBUG_FATAL(m_refCount > 1,("Programmer bug: attempted to set data on a MessageToPayloadImpl that had a refcount > 1. This would overwrite data that is referenced in multiple places, which is not safe."));
|
||||
m_persisted = persisted;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageToPayloadImpl::pack(Archive::ByteStream &target) const
|
||||
{
|
||||
Archive::put(target, m_networkId);
|
||||
Archive::put(target, m_messageId);
|
||||
Archive::put(target, m_method);
|
||||
Archive::put(target, m_packedData);
|
||||
Archive::put(target, m_callTime);
|
||||
Archive::put(target, m_guaranteed);
|
||||
Archive::put(target, m_persisted);
|
||||
int temp = static_cast<int>(m_deliveryType);
|
||||
Archive::put(target, temp);
|
||||
Archive::put(target, m_undeliveredCallbackObject);
|
||||
Archive::put(target, m_undeliveredCallbackMethod);
|
||||
Archive::put(target, m_recurringTime);
|
||||
Archive::put(target, m_broadcastCount);
|
||||
Archive::put(target, m_bounceCount);
|
||||
Archive::put(target, m_bounceServers);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageToPayloadImpl::unpack(Archive::ReadIterator &source)
|
||||
{
|
||||
WARNING_DEBUG_FATAL(m_refCount > 1,("Programmer bug: attempted to unpack a MessageToPayloadImpl that had a refcount > 1. This would overwrite data that is referenced in multiple places, which is not safe."));
|
||||
|
||||
Archive::get(source, m_networkId);
|
||||
Archive::get(source, m_messageId);
|
||||
Archive::get(source, m_method);
|
||||
Archive::get(source, m_packedData);
|
||||
Archive::get(source, m_callTime);
|
||||
Archive::get(source, m_guaranteed);
|
||||
Archive::get(source, m_persisted);
|
||||
int temp;
|
||||
Archive::get(source, temp);
|
||||
m_deliveryType = static_cast<MessageToPayload::DeliveryType>(temp);
|
||||
Archive::get(source, m_undeliveredCallbackObject);
|
||||
Archive::get(source, m_undeliveredCallbackMethod);
|
||||
Archive::get(source, m_recurringTime);
|
||||
Archive::get(source, m_broadcastCount);
|
||||
Archive::get(source, m_bounceCount);
|
||||
Archive::get(source, m_bounceServers);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
NetworkId const & MessageToPayloadImpl::getUndeliveredCallbackObject() const
|
||||
{
|
||||
return m_undeliveredCallbackObject;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
std::string const & MessageToPayloadImpl::getUndeliveredCallbackMethod() const
|
||||
{
|
||||
return m_undeliveredCallbackMethod;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
std::string MessageToPayloadImpl::getDataAsString() const
|
||||
{
|
||||
return std::string(m_packedData.begin(), m_packedData.end());
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool MessageToPayloadImpl::operator==(MessageToPayloadImpl const & rhs) const
|
||||
{
|
||||
return (m_messageId == rhs.m_messageId);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool MessageToPayloadImpl::operator!=(MessageToPayloadImpl const & rhs) const
|
||||
{
|
||||
return (m_messageId != rhs.m_messageId);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
int MessageToPayloadImpl::getRecurringTime() const
|
||||
{
|
||||
return m_recurringTime;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
int MessageToPayloadImpl::getInstanceCount()
|
||||
{
|
||||
return ms_instanceCount;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageToPayloadImpl::increaseRefCount()
|
||||
{
|
||||
++m_refCount;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageToPayloadImpl::decreaseRefCount()
|
||||
{
|
||||
--m_refCount;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
int MessageToPayloadImpl::getRefCount() const
|
||||
{
|
||||
return m_refCount;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageToPayloadImpl::addBroadcastCount()
|
||||
{
|
||||
m_broadcastCount++;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageToPayloadImpl::addBounceServer(uint32 serverProcessId)
|
||||
{
|
||||
WARNING_DEBUG_FATAL(m_refCount > 1,("Programmer bug: attempted to change a MessageToPayloadImpl that had a refcount > 1. MessageToPayloadImpls do not have copy-on-write, so this is not safe."));
|
||||
m_bounceServers.insert(serverProcessId);
|
||||
m_bounceCount++;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool MessageToPayloadImpl::hasBounceServer(uint32 serverProcessId) const
|
||||
{
|
||||
return (m_bounceServers.count(serverProcessId) > 0);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageToPayloadImpl::clearBounceServers()
|
||||
{
|
||||
m_bounceServers.clear();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
void Archive::put(ByteStream & target, const MessageToPayloadImpl & source)
|
||||
{
|
||||
source.pack(target);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void Archive::get(ReadIterator & source, MessageToPayloadImpl & target)
|
||||
{
|
||||
target.unpack(source);
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageToPayloadImpl.h
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//const
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_MessageToPayloadImpl_H
|
||||
#define INCLUDED_MessageToPayloadImpl_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/MessageToPayload.h"
|
||||
#include "sharedFoundation/NetworkId.h"
|
||||
#include "sharedFoundation/NetworkIdArchive.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Data associated with a MessageTo, used by several different network messages.
|
||||
*/
|
||||
class MessageToPayloadImpl
|
||||
{
|
||||
public:
|
||||
MessageToPayloadImpl(const NetworkId &networkId, const MessageToId &messageId, const std::string &method, const std::string &packedData, unsigned long callTime, bool guaranteed, MessageToPayload::DeliveryType deliveryType, NetworkId const & undeliveredCallbackObject, std::string const & undeliveredCallbackMethod, int recurringTime);
|
||||
MessageToPayloadImpl(const NetworkId &networkId, const MessageToId &messageId, const std::string &method, const stdvector<int8>::fwd &packedData, unsigned long callTime, bool guaranteed, MessageToPayload::DeliveryType deliveryType, NetworkId const & undeliveredCallbackObject, std::string const & undeliveredCallbackMethod, int recurringTime);
|
||||
MessageToPayloadImpl();
|
||||
~MessageToPayloadImpl();
|
||||
|
||||
bool operator==(MessageToPayloadImpl const & rhs) const;
|
||||
bool operator!=(MessageToPayloadImpl const & rhs) const;
|
||||
|
||||
void pack(Archive::ByteStream &target) const;
|
||||
void unpack(Archive::ReadIterator &source);
|
||||
|
||||
void setGuaranteed(bool guaranteed);
|
||||
void setPersisted(bool persisted);
|
||||
void addBroadcastCount();
|
||||
void addBounceServer(uint32 serverProcessId);
|
||||
bool hasBounceServer(uint32 serverProcessId) const;
|
||||
void clearBounceServers();
|
||||
|
||||
NetworkId const &getNetworkId() const;
|
||||
MessageToId const &getMessageId() const;
|
||||
std::string const &getMethod() const;
|
||||
std::vector<int8> const &getPackedDataVector() const;
|
||||
std::string getDataAsString() const;
|
||||
unsigned long getCallTime() const;
|
||||
bool getGuaranteed() const;
|
||||
bool getPersisted() const;
|
||||
MessageToPayload::DeliveryType getDeliveryType() const;
|
||||
NetworkId const & getUndeliveredCallbackObject() const;
|
||||
std::string const & getUndeliveredCallbackMethod() const;
|
||||
int getRecurringTime() const;
|
||||
uint64 getCounterMessageToPayload() const;
|
||||
int getBroadcastCount() const;
|
||||
int getBounceCount() const;
|
||||
static int getInstanceCount();
|
||||
void increaseRefCount();
|
||||
void decreaseRefCount();
|
||||
int getRefCount() const;
|
||||
|
||||
private:
|
||||
NetworkId m_networkId;
|
||||
MessageToId m_messageId;
|
||||
std::string m_method;
|
||||
std::vector<int8> m_packedData;
|
||||
unsigned long m_callTime;
|
||||
bool m_guaranteed;
|
||||
bool m_persisted;
|
||||
MessageToPayload::DeliveryType m_deliveryType;
|
||||
NetworkId m_undeliveredCallbackObject;
|
||||
std::string m_undeliveredCallbackMethod;
|
||||
int m_recurringTime;
|
||||
int m_broadcastCount; // home many times this message has been broadcasted to find the recipient
|
||||
int m_bounceCount; // how many times this message has been forwarded to a new server
|
||||
std::set<uint32> m_bounceServers; // the servers which have forwarded this message, to catch circular forwarding
|
||||
int m_refCount;
|
||||
|
||||
// there is no need to pack this var, it is used to "mark" each MessageToPayloadImpl
|
||||
// on a per game server execution basis, and is used as the second criterion
|
||||
// when prioritizing messageTo that originated on the game server and has
|
||||
// the same calltime, so that the messageTo will execute in the order that
|
||||
// they were originated
|
||||
uint64 m_counterMessageToPayload;
|
||||
|
||||
// used to assign m_counterMessageToPayload
|
||||
static uint64 ms_counterMessageToPayload;
|
||||
|
||||
// used to count how many messages there are at one time
|
||||
static int ms_instanceCount;
|
||||
|
||||
private:
|
||||
MessageToPayloadImpl & operator=(MessageToPayloadImpl const & rhs); // disable
|
||||
MessageToPayloadImpl(MessageToPayloadImpl const & rhs); // disable
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId const &MessageToPayloadImpl::getNetworkId() const
|
||||
{
|
||||
return m_networkId;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline MessageToId const &MessageToPayloadImpl::getMessageId() const
|
||||
{
|
||||
return m_messageId;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline std::string const &MessageToPayloadImpl::getMethod() const
|
||||
{
|
||||
return m_method;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline std::vector<int8> const &MessageToPayloadImpl::getPackedDataVector() const
|
||||
{
|
||||
return m_packedData;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline unsigned long MessageToPayloadImpl::getCallTime() const
|
||||
{
|
||||
return m_callTime;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline bool MessageToPayloadImpl::getGuaranteed() const
|
||||
{
|
||||
return m_guaranteed;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline bool MessageToPayloadImpl::getPersisted() const
|
||||
{
|
||||
return m_persisted;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline MessageToPayload::DeliveryType MessageToPayloadImpl::getDeliveryType() const
|
||||
{
|
||||
return m_deliveryType;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint64 MessageToPayloadImpl::getCounterMessageToPayload() const
|
||||
{
|
||||
return m_counterMessageToPayload;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline int MessageToPayloadImpl::getBroadcastCount() const
|
||||
{
|
||||
return m_broadcastCount;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline int MessageToPayloadImpl::getBounceCount() const
|
||||
{
|
||||
return m_bounceCount;
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
namespace Archive
|
||||
{
|
||||
void put(ByteStream & target, const MessageToPayloadImpl & source);
|
||||
void get(ReadIterator & source, MessageToPayloadImpl & target);
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
//========================================================================
|
||||
//
|
||||
// PlanetObjectIdMessage.cpp - tells Centralserver we want all the objects in a chunk.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/PlanetObjectIdMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param process gameserver id that should receive the loaded objects
|
||||
*/
|
||||
PlanetObjectIdMessage::PlanetObjectIdMessage (const std::string &sceneId, NetworkId planetObject) :
|
||||
GameNetworkMessage("PlanetObjectIdMessage"),
|
||||
m_sceneId(sceneId),
|
||||
m_planetObject(planetObject)
|
||||
{
|
||||
addVariable(m_sceneId);
|
||||
addVariable(m_planetObject);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
PlanetObjectIdMessage::PlanetObjectIdMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("PlanetObjectIdMessage"),
|
||||
m_sceneId(),
|
||||
m_planetObject()
|
||||
{
|
||||
addVariable(m_sceneId);
|
||||
addVariable(m_planetObject);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
PlanetObjectIdMessage::~PlanetObjectIdMessage()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
//========================================================================
|
||||
//
|
||||
// PlanetObjectIdMessage.h - tells Centralserver we want all the objects in a chunk.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_PlanetObjectIdMessage_H
|
||||
#define _INCLUDED_PlanetObjectIdMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class PlanetObjectIdMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
PlanetObjectIdMessage (const std::string &sceneId, NetworkId planetObject);
|
||||
PlanetObjectIdMessage (Archive::ReadIterator & source);
|
||||
~PlanetObjectIdMessage ();
|
||||
|
||||
std::string getSceneId (void) const;
|
||||
NetworkId getPlanetObject (void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<std::string> m_sceneId;
|
||||
Archive::AutoVariable<NetworkId> m_planetObject;
|
||||
|
||||
PlanetObjectIdMessage();
|
||||
PlanetObjectIdMessage(const PlanetObjectIdMessage&);
|
||||
PlanetObjectIdMessage& operator= (const PlanetObjectIdMessage&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline std::string PlanetObjectIdMessage::getSceneId (void) const
|
||||
{
|
||||
return m_sceneId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId PlanetObjectIdMessage::getPlanetObject (void) const
|
||||
{
|
||||
return m_planetObject.get();
|
||||
}
|
||||
// ======================================================================
|
||||
|
||||
#endif // _INCLUDED_PlanetObjectIdMessage_H
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// PopulationListMessage.cpp
|
||||
// copyright (c) 2003 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/PopulationListMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
PopulationListMessage::PopulationListMessage(const PopulationList &list) :
|
||||
GameNetworkMessage("PopulationListMessage"),
|
||||
m_list(list)
|
||||
{
|
||||
addVariable(m_list);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
PopulationListMessage::PopulationListMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("PopulationListMessage"),
|
||||
m_list()
|
||||
{
|
||||
addVariable(m_list);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
PopulationListMessage::~PopulationListMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// PopulationListMessage.h
|
||||
// copyright (c) 2003 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_PopulationListMessage_H
|
||||
#define INCLUDED_PopulationListMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "serverUtility/PopulationList.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class PopulationListMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
PopulationListMessage (const PopulationList &list);
|
||||
PopulationListMessage (Archive::ReadIterator & source);
|
||||
~PopulationListMessage ();
|
||||
|
||||
const PopulationList& getList(void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<PopulationList> m_list;
|
||||
|
||||
PopulationListMessage();
|
||||
PopulationListMessage(const PopulationListMessage&);
|
||||
PopulationListMessage& operator= (const PopulationListMessage&);
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
inline const PopulationList& PopulationListMessage::getList(void) const
|
||||
{
|
||||
return m_list.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
//========================================================================
|
||||
//
|
||||
// PreloadFinishedMessage.cpp
|
||||
//
|
||||
// copyright 2002 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/PreloadFinishedMessage.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
PreloadFinishedMessage::PreloadFinishedMessage(bool finished) :
|
||||
GameNetworkMessage("PreloadFinishedMessage"),
|
||||
m_finished(finished)
|
||||
{
|
||||
addVariable(m_finished);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
PreloadFinishedMessage::PreloadFinishedMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("PreloadFinishedMessage"),
|
||||
m_finished(false)
|
||||
{
|
||||
addVariable(m_finished);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
PreloadFinishedMessage::~PreloadFinishedMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
//========================================================================
|
||||
//
|
||||
// PreloadFinishedMessage.h
|
||||
//
|
||||
// copyright 2002 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_PreloadFinishedMessage_H
|
||||
#define _INCLUDED_PreloadFinishedMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Sent From: PlanetServer
|
||||
* Sent To: Central
|
||||
* Action: All the GameServers on this planet have/haven't finished preloading.
|
||||
*
|
||||
* Sent From: LoginServer
|
||||
* Sent To: Central
|
||||
* Action: All the planets in the cluster have/haven't finished preloading.
|
||||
* If preloading is already finished when the login server connects,
|
||||
* this message is sent immediately.
|
||||
*/
|
||||
|
||||
class PreloadFinishedMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
PreloadFinishedMessage (bool finished);
|
||||
PreloadFinishedMessage (Archive::ReadIterator & source);
|
||||
~PreloadFinishedMessage ();
|
||||
|
||||
const uint32 getGameServerId() const;
|
||||
|
||||
bool getFinished() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<bool> m_finished;
|
||||
|
||||
private:
|
||||
PreloadFinishedMessage(const PreloadFinishedMessage&);
|
||||
PreloadFinishedMessage& operator= (const PreloadFinishedMessage&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline bool PreloadFinishedMessage::getFinished() const
|
||||
{
|
||||
return m_finished.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif // _INCLUDED_PreloadFinishedMessage_H
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
//========================================================================
|
||||
//
|
||||
// PreloadRequestCompleteMessage.cpp
|
||||
//
|
||||
// copyright 2002 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/PreloadRequestCompleteMessage.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
PreloadRequestCompleteMessage::PreloadRequestCompleteMessage(uint32 gameServerId, uint32 preloadAreaId) :
|
||||
GameNetworkMessage("PreloadRequestCompleteMessage"),
|
||||
m_gameServerId(gameServerId),
|
||||
m_preloadAreaId(preloadAreaId)
|
||||
{
|
||||
addVariable(m_gameServerId);
|
||||
addVariable(m_preloadAreaId);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
PreloadRequestCompleteMessage::PreloadRequestCompleteMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("PreloadRequestCompleteMessage"),
|
||||
m_gameServerId(),
|
||||
m_preloadAreaId()
|
||||
{
|
||||
addVariable(m_gameServerId);
|
||||
addVariable(m_preloadAreaId);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
PreloadRequestCompleteMessage::~PreloadRequestCompleteMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
//========================================================================
|
||||
//
|
||||
// PreloadRequestCompleteMessage.h
|
||||
//
|
||||
// copyright 2002 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_PreloadRequestCompleteMessage_H
|
||||
#define _INCLUDED_PreloadRequestCompleteMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Sent From: PlanetServer
|
||||
* Sent To: DatabaseProcess (via Central)
|
||||
* Action: All the objects/chunks needed for preload have now been requested.
|
||||
* When pending loads are completed, notify the game server
|
||||
* that it has all of the preload stuff.
|
||||
*
|
||||
* Sent From: DatabaseProcess
|
||||
* Sent To: GameServer
|
||||
* Action: The DatabaseProcess has sent the GameServer all the objects
|
||||
* it needs for preload. When they are all instantiated, send this
|
||||
* message to the PlanetServer.
|
||||
*
|
||||
* Sent From: GameServer
|
||||
* Sent To: PlanetServer
|
||||
* Action: The GameServer has instantiated all the objects from the
|
||||
* preload list.
|
||||
*/
|
||||
|
||||
class PreloadRequestCompleteMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
PreloadRequestCompleteMessage (uint32 gameServerId, uint32 preloadAreaId);
|
||||
PreloadRequestCompleteMessage (Archive::ReadIterator & source);
|
||||
~PreloadRequestCompleteMessage ();
|
||||
|
||||
const uint32 getGameServerId() const;
|
||||
const uint32 getPreloadAreaId() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_gameServerId;
|
||||
Archive::AutoVariable<uint32> m_preloadAreaId;
|
||||
|
||||
private:
|
||||
PreloadRequestCompleteMessage();
|
||||
PreloadRequestCompleteMessage(const PreloadRequestCompleteMessage&);
|
||||
PreloadRequestCompleteMessage& operator= (const PreloadRequestCompleteMessage&);
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
inline const uint32 PreloadRequestCompleteMessage::getGameServerId() const
|
||||
{
|
||||
return m_gameServerId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const uint32 PreloadRequestCompleteMessage::getPreloadAreaId() const
|
||||
{
|
||||
return m_preloadAreaId.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif // _INCLUDED_PreloadRequestCompleteMessage_H
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
//========================================================================
|
||||
//
|
||||
// ReleaseAuthoritativeMessage.cpp - tells Centralserver an authoritative object
|
||||
// wants to release it's authority to a proxy.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/ReleaseAuthoritativeMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param id id of object that is releasing it's authority
|
||||
* @param process process we would like to release the authority to (0 = any)
|
||||
*/
|
||||
ReleaseAuthoritativeMessage::ReleaseAuthoritativeMessage(const NetworkId& id, uint32 process) :
|
||||
GameNetworkMessage("ReleaseAuthoritativeMessage"),
|
||||
m_id(id),
|
||||
m_process(process)
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_process);
|
||||
} // ReleaseAuthoritativeMessage::ReleaseAuthoritativeMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ReleaseAuthoritativeMessage::ReleaseAuthoritativeMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ReleaseAuthoritativeMessage"),
|
||||
m_id(),
|
||||
m_process()
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_process);
|
||||
unpack(source);
|
||||
} // ReleaseAuthoritativeMessage::ReleaseAuthoritativeMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class destructor.
|
||||
*/
|
||||
ReleaseAuthoritativeMessage::~ReleaseAuthoritativeMessage()
|
||||
{
|
||||
} // ReleaseAuthoritativeMessage::~ReleaseAuthoritativeMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
//========================================================================
|
||||
//
|
||||
// ReleaseAuthoritativeMessage.h - tells Centralserver an authoritative object
|
||||
// wants to release it's authority to a proxy.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_ReleaseAuthoritativeMessage_H
|
||||
#define _INCLUDED_ReleaseAuthoritativeMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class ReleaseAuthoritativeMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
explicit ReleaseAuthoritativeMessage (const NetworkId& id, uint32 process = 0);
|
||||
ReleaseAuthoritativeMessage (Archive::ReadIterator & source);
|
||||
~ReleaseAuthoritativeMessage ();
|
||||
|
||||
const NetworkId& getId(void) const;
|
||||
uint32 getProcess(void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<NetworkId> m_id; // id of object that is releasing it's authority
|
||||
Archive::AutoVariable<uint32> m_process; // process we would like to release the authority to (-1 = any)
|
||||
|
||||
ReleaseAuthoritativeMessage();
|
||||
ReleaseAuthoritativeMessage(const ReleaseAuthoritativeMessage&);
|
||||
ReleaseAuthoritativeMessage& operator= (const ReleaseAuthoritativeMessage&);
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId& ReleaseAuthoritativeMessage::getId(void) const
|
||||
{
|
||||
return m_id.get();
|
||||
} // ReleaseAuthoritativeMessage::getId
|
||||
|
||||
inline uint32 ReleaseAuthoritativeMessage::getProcess(void) const
|
||||
{
|
||||
return m_process.get();
|
||||
} // ReleaseAuthoritativeMessage::getProcess
|
||||
|
||||
|
||||
#endif // _INCLUDED_ReleaseAuthoritativeMessage_H
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
//========================================================================
|
||||
//
|
||||
// RequestChunkMessage.cpp - tells Centralserver we want all the objects in a chunk.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/RequestChunkMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param process gameserver id that should receive the loaded objects
|
||||
*/
|
||||
RequestChunkMessage::RequestChunkMessage (std::vector<Chunk> chunks, const std::string &sceneId) :
|
||||
GameNetworkMessage("RequestChunkMessage"),
|
||||
m_chunks(),
|
||||
m_sceneId(sceneId)
|
||||
{
|
||||
m_chunks.set(chunks);
|
||||
|
||||
addVariable(m_chunks);
|
||||
addVariable(m_sceneId);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RequestChunkMessage::RequestChunkMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("RequestChunkMessage"),
|
||||
m_chunks(),
|
||||
m_sceneId()
|
||||
{
|
||||
addVariable(m_chunks);
|
||||
addVariable(m_sceneId);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RequestChunkMessage::~RequestChunkMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
std::vector<RequestChunkMessage::Chunk> const & RequestChunkMessage::getChunks() const
|
||||
{
|
||||
return m_chunks.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
RequestChunkMessage::Chunk::Chunk() :
|
||||
m_process(),
|
||||
m_nodeX(),
|
||||
m_nodeZ()
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
RequestChunkMessage::Chunk::Chunk(uint32 process, int nodeX, int nodeZ) :
|
||||
m_process(process),
|
||||
m_nodeX(nodeX),
|
||||
m_nodeZ(nodeZ)
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
namespace Archive
|
||||
{
|
||||
void get(ReadIterator & source, RequestChunkMessage::Chunk & chunk)
|
||||
{
|
||||
get(source,chunk.m_process);
|
||||
get(source,chunk.m_nodeX);
|
||||
get(source,chunk.m_nodeZ);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void put(ByteStream & target, const RequestChunkMessage::Chunk & chunk)
|
||||
{
|
||||
put(target,chunk.m_process);
|
||||
put(target,chunk.m_nodeX);
|
||||
put(target,chunk.m_nodeZ);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
//========================================================================
|
||||
//
|
||||
// RequestChunkMessage.h - tells Centralserver we want all the objects in a chunk.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_RequestChunkMessage_H
|
||||
#define _INCLUDED_RequestChunkMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class RequestChunkMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
struct Chunk
|
||||
{
|
||||
uint32 m_process;
|
||||
int m_nodeX;
|
||||
int m_nodeZ;
|
||||
|
||||
Chunk();
|
||||
Chunk(uint32 process, int nodeX, int nodeZ);
|
||||
};
|
||||
|
||||
public:
|
||||
RequestChunkMessage (std::vector<Chunk> chunks, const std::string &sceneId);
|
||||
RequestChunkMessage (Archive::ReadIterator & source);
|
||||
~RequestChunkMessage ();
|
||||
|
||||
std::vector<Chunk> const & getChunks() const;
|
||||
std::string getSceneId (void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoArray<Chunk> m_chunks;
|
||||
Archive::AutoVariable<std::string> m_sceneId;
|
||||
|
||||
RequestChunkMessage();
|
||||
RequestChunkMessage(const RequestChunkMessage&);
|
||||
RequestChunkMessage& operator= (const RequestChunkMessage&);
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
namespace Archive
|
||||
{
|
||||
class ReadIterator;
|
||||
class ByteStream;
|
||||
|
||||
void get(ReadIterator & source, RequestChunkMessage::Chunk & chunk);
|
||||
void put(ByteStream & target, const RequestChunkMessage::Chunk & chunk);
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
inline std::string RequestChunkMessage::getSceneId (void) const
|
||||
{
|
||||
return m_sceneId.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif // _INCLUDED_RequestChunkMessage_H
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
//========================================================================
|
||||
//
|
||||
// RequestOIDsMessage.cpp
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/RequestObjectIdsMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RequestOIDsMessage::RequestOIDsMessage(uint32 serverId, uint32 howMany, bool logRequest) :
|
||||
GameNetworkMessage("RequestOIDsMessage"),
|
||||
m_serverId(serverId),
|
||||
m_howMany(howMany),
|
||||
m_logRequest(logRequest)
|
||||
{
|
||||
addVariable(m_serverId);
|
||||
addVariable(m_howMany);
|
||||
addVariable(m_logRequest);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RequestOIDsMessage::RequestOIDsMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("RequestOIDsMessage")
|
||||
{
|
||||
addVariable(m_serverId);
|
||||
addVariable(m_howMany);
|
||||
addVariable(m_logRequest);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RequestOIDsMessage::~RequestOIDsMessage()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
//========================================================================
|
||||
//
|
||||
// RequestOIDsMessage.h
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_RequestOIDsMessage_H
|
||||
#define _INCLUDED_RequestOIDsMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class RequestOIDsMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
RequestOIDsMessage (uint32 serverId, uint32 howMany, bool logRequest);
|
||||
RequestOIDsMessage (Archive::ReadIterator & source);
|
||||
~RequestOIDsMessage ();
|
||||
|
||||
uint32 getHowMany(void) const;
|
||||
uint32 getServerId(void) const;
|
||||
bool getLogRequest(void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_serverId;
|
||||
Archive::AutoVariable<uint32> m_howMany;
|
||||
Archive::AutoVariable<bool> m_logRequest;
|
||||
|
||||
RequestOIDsMessage();
|
||||
RequestOIDsMessage(const RequestOIDsMessage&);
|
||||
RequestOIDsMessage& operator= (const RequestOIDsMessage&);
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline uint32 RequestOIDsMessage::getHowMany(void) const
|
||||
{
|
||||
return m_howMany.get();
|
||||
}
|
||||
|
||||
inline uint32 RequestOIDsMessage::getServerId(void) const
|
||||
{
|
||||
return m_serverId.get();
|
||||
}
|
||||
|
||||
inline bool RequestOIDsMessage::getLogRequest(void) const
|
||||
{
|
||||
return m_logRequest.get();
|
||||
}
|
||||
|
||||
#endif // _INCLUDED_RequestOIDsMessage_H
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
//========================================================================
|
||||
//
|
||||
// RequestObjectMessage.cpp - tells Centralserver a Gameserver wants to create a
|
||||
// proxy of an object.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/RequestObjectMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param id id of object we want to create
|
||||
* @param process process requesting the object
|
||||
*/
|
||||
RequestObjectMessage::RequestObjectMessage(const NetworkId& id, uint32 process) :
|
||||
GameNetworkMessage("RequestObjectMessage"),
|
||||
m_id(id),
|
||||
m_process(process)
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_process);
|
||||
} // RequestObjectMessage::RequestObjectMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RequestObjectMessage::RequestObjectMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("RequestObjectMessage"),
|
||||
m_id(),
|
||||
m_process()
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_process);
|
||||
unpack(source);
|
||||
} // RequestObjectMessage::RequestObjectMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class destructor.
|
||||
*/
|
||||
RequestObjectMessage::~RequestObjectMessage()
|
||||
{
|
||||
} // RequestObjectMessage::~RequestObjectMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
//========================================================================
|
||||
//
|
||||
// RequestObjectMessage.h - tells Centralserver a Gameserver wants to create a
|
||||
// proxy of an object.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_RequestObjectMessage_H
|
||||
#define _INCLUDED_RequestObjectMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class RequestObjectMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
RequestObjectMessage (const NetworkId& id, uint32 process);
|
||||
RequestObjectMessage (Archive::ReadIterator & source);
|
||||
~RequestObjectMessage ();
|
||||
|
||||
const NetworkId& getId(void) const;
|
||||
uint32 getProcess(void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<NetworkId> m_id; // id of object we want to create
|
||||
Archive::AutoVariable<uint32> m_process; // process requesting the object
|
||||
|
||||
RequestObjectMessage();
|
||||
RequestObjectMessage(const RequestObjectMessage&);
|
||||
RequestObjectMessage& operator= (const RequestObjectMessage&);
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId& RequestObjectMessage::getId(void) const
|
||||
{
|
||||
return m_id.get();
|
||||
} // RequestObjectMessage::getId
|
||||
|
||||
inline uint32 RequestObjectMessage::getProcess(void) const
|
||||
{
|
||||
return m_process.get();
|
||||
} // RequestObjectMessage::getProcess
|
||||
|
||||
#endif // _INCLUDED_RequestObjectMessage_H
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
//========================================================================
|
||||
//
|
||||
// RequestPlanetObjectIdMessage.cpp - tells Centralserver we want all the objects in a chunk.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/RequestPlanetObjectIdMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param process gameserver id that should receive the loaded objects
|
||||
*/
|
||||
RequestPlanetObjectIdMessage::RequestPlanetObjectIdMessage (const std::string &sceneId) :
|
||||
GameNetworkMessage("RequestPlanetObjectIdMessage"),
|
||||
m_sceneId(sceneId)
|
||||
{
|
||||
addVariable(m_sceneId);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RequestPlanetObjectIdMessage::RequestPlanetObjectIdMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("RequestPlanetObjectIdMessage"),
|
||||
m_sceneId()
|
||||
{
|
||||
addVariable(m_sceneId);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RequestPlanetObjectIdMessage::~RequestPlanetObjectIdMessage()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
//========================================================================
|
||||
//
|
||||
// RequestPlanetObjectIdMessage.h - tells Centralserver we want all the objects in a chunk.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_RequestPlanetObjectIdMessage_H
|
||||
#define _INCLUDED_RequestPlanetObjectIdMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class RequestPlanetObjectIdMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
RequestPlanetObjectIdMessage (const std::string &sceneId);
|
||||
RequestPlanetObjectIdMessage (Archive::ReadIterator & source);
|
||||
~RequestPlanetObjectIdMessage ();
|
||||
|
||||
std::string getSceneId (void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<std::string> m_sceneId;
|
||||
|
||||
RequestPlanetObjectIdMessage();
|
||||
RequestPlanetObjectIdMessage(const RequestPlanetObjectIdMessage&);
|
||||
RequestPlanetObjectIdMessage& operator= (const RequestPlanetObjectIdMessage&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline std::string RequestPlanetObjectIdMessage::getSceneId (void) const
|
||||
{
|
||||
return m_sceneId.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif // _INCLUDED_RequestPlanetObjectIdMessage_H
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
//========================================================================
|
||||
//
|
||||
// RequestUnloadObjectMessage.cpp - tells CentralServer we want to unload an object.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/RequestUnloadObjectMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param id id of object we want to unload
|
||||
* @param process process id of Gameserver that wants to unload the object
|
||||
*/
|
||||
RequestUnloadObjectMessage::RequestUnloadObjectMessage(const NetworkId& id, uint32 process) :
|
||||
GameNetworkMessage("RequestUnloadObjectMessage"),
|
||||
m_id(id),
|
||||
m_process(process)
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_process);
|
||||
} // RequestUnloadObjectMessage::RequestUnloadObjectMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RequestUnloadObjectMessage::RequestUnloadObjectMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("RequestUnloadObjectMessage"),
|
||||
m_id(),
|
||||
m_process()
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_process);
|
||||
unpack(source);
|
||||
} // RequestUnloadObjectMessage::RequestUnloadObjectMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class destructor.
|
||||
*/
|
||||
RequestUnloadObjectMessage::~RequestUnloadObjectMessage()
|
||||
{
|
||||
} // RequestUnloadObjectMessage::~RequestUnloadObjectMessage
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
//========================================================================
|
||||
//
|
||||
// RequestUnloadObjectMessage.h - tells CentralServer we want to unload an object.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_RequestUnloadObjectMessage_H
|
||||
#define _INCLUDED_RequestUnloadObjectMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class RequestUnloadObjectMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
RequestUnloadObjectMessage (const NetworkId& id, uint32 process);
|
||||
RequestUnloadObjectMessage (Archive::ReadIterator & source);
|
||||
~RequestUnloadObjectMessage ();
|
||||
|
||||
const NetworkId& getId(void) const;
|
||||
uint32 getProcess(void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<NetworkId> m_id; // id of object we want to unload
|
||||
Archive::AutoVariable<uint32> m_process; // process id of Gameserver that wants to unload the object
|
||||
|
||||
RequestUnloadObjectMessage();
|
||||
RequestUnloadObjectMessage(const RequestUnloadObjectMessage&);
|
||||
RequestUnloadObjectMessage& operator= (const RequestUnloadObjectMessage&);
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId& RequestUnloadObjectMessage::getId(void) const
|
||||
{
|
||||
return m_id.get();
|
||||
} // RequestUnloadObjectMessage::getId
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 RequestUnloadObjectMessage::getProcess(void) const
|
||||
{
|
||||
return m_process.get();
|
||||
} // RequestUnloadObjectMessage::getProcess
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
|
||||
#endif // _INCLUDED_RequestUnloadObjectMessage_H
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
// SceneTransferMessages.cpp
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
|
||||
#include "serverNetworkMessages/SceneTransferMessages.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RequestSceneTransfer::RequestSceneTransfer(const NetworkId &oid, const std::string & sceneName, uint32 sourceGameServer, const Vector &position_p, const Vector &position_w, const NetworkId &containerId, const char * scriptCallback) :
|
||||
GameNetworkMessage("RequestSceneTransfer"),
|
||||
m_oid(oid),
|
||||
m_sceneName(sceneName),
|
||||
m_sourceGameServer(sourceGameServer),
|
||||
m_position_p(position_p),
|
||||
m_position_w(position_w),
|
||||
m_containerId(containerId),
|
||||
m_containerName(),
|
||||
m_scriptCallback()
|
||||
{
|
||||
if (scriptCallback != NULL)
|
||||
m_scriptCallback.set(scriptCallback);
|
||||
|
||||
addVariable(m_oid);
|
||||
addVariable(m_sceneName);
|
||||
addVariable(m_sourceGameServer);
|
||||
addVariable(m_position_p);
|
||||
addVariable(m_position_w);
|
||||
addVariable(m_containerId);
|
||||
addVariable(m_containerName);
|
||||
addVariable(m_scriptCallback);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RequestSceneTransfer::RequestSceneTransfer(const NetworkId &oid, const std::string & sceneName, uint32 sourceGameServer, const Vector &position_p, const Vector &position_w, const NetworkId &buildingId, const std::string &containerName, const char * scriptCallback) :
|
||||
GameNetworkMessage("RequestSceneTransfer"),
|
||||
m_oid(oid),
|
||||
m_sceneName(sceneName),
|
||||
m_sourceGameServer(sourceGameServer),
|
||||
m_position_p(position_p),
|
||||
m_position_w(position_w),
|
||||
m_containerId(buildingId),
|
||||
m_containerName(containerName),
|
||||
m_scriptCallback()
|
||||
{
|
||||
if (scriptCallback != NULL)
|
||||
m_scriptCallback.set(scriptCallback);
|
||||
|
||||
addVariable(m_oid);
|
||||
addVariable(m_sceneName);
|
||||
addVariable(m_sourceGameServer);
|
||||
addVariable(m_position_p);
|
||||
addVariable(m_position_w);
|
||||
addVariable(m_containerId);
|
||||
addVariable(m_containerName);
|
||||
addVariable(m_scriptCallback);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RequestSceneTransfer::RequestSceneTransfer(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("RequestSceneTransfer"),
|
||||
m_oid(NetworkId::cms_invalid),
|
||||
m_sceneName(),
|
||||
m_sourceGameServer(),
|
||||
m_position_p(),
|
||||
m_position_w(),
|
||||
m_containerId(),
|
||||
m_containerName(),
|
||||
m_scriptCallback()
|
||||
{
|
||||
addVariable(m_oid);
|
||||
addVariable(m_sceneName);
|
||||
addVariable(m_sourceGameServer);
|
||||
addVariable(m_position_p);
|
||||
addVariable(m_position_w);
|
||||
addVariable(m_containerId);
|
||||
addVariable(m_containerName);
|
||||
addVariable(m_scriptCallback);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RequestSceneTransfer::~RequestSceneTransfer()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
SceneTransferMessage::SceneTransferMessage(const RequestSceneTransfer &source, uint32 destinationGameServer) :
|
||||
GameNetworkMessage("SceneTransferMessage"),
|
||||
m_oid(source.getNetworkId()),
|
||||
m_sceneName(source.getSceneName()),
|
||||
m_sourceGameServer(source.getSourceGameServer()),
|
||||
m_position_p(source.getPosition_p()),
|
||||
m_position_w(source.getPosition_w()),
|
||||
m_containerId(source.getContainerId()),
|
||||
m_containerName(source.getContainerName()),
|
||||
m_scriptCallback(source.getScriptCallback()),
|
||||
m_destinationGameServer(destinationGameServer)
|
||||
{
|
||||
addVariable(m_oid);
|
||||
addVariable(m_sceneName);
|
||||
addVariable(m_sourceGameServer);
|
||||
addVariable(m_position_p);
|
||||
addVariable(m_position_w);
|
||||
addVariable(m_containerId);
|
||||
addVariable(m_containerName);
|
||||
addVariable(m_scriptCallback);
|
||||
addVariable(m_destinationGameServer);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
SceneTransferMessage::SceneTransferMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("SceneTransferMessage"),
|
||||
m_oid(NetworkId::cms_invalid),
|
||||
m_sceneName(),
|
||||
m_sourceGameServer(),
|
||||
m_position_p(),
|
||||
m_position_w(),
|
||||
m_containerId(),
|
||||
m_containerName(),
|
||||
m_scriptCallback(),
|
||||
m_destinationGameServer()
|
||||
{
|
||||
addVariable(m_oid);
|
||||
addVariable(m_sceneName);
|
||||
addVariable(m_sourceGameServer);
|
||||
addVariable(m_position_p);
|
||||
addVariable(m_position_w);
|
||||
addVariable(m_containerId);
|
||||
addVariable(m_containerName);
|
||||
addVariable(m_scriptCallback);
|
||||
addVariable(m_destinationGameServer);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
SceneTransferMessage::~SceneTransferMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
+223
@@ -0,0 +1,223 @@
|
||||
// SceneTransferMessages.h
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
|
||||
#ifndef _INCLUDED_SceneTransferMessages_H
|
||||
#define _INCLUDED_SceneTransferMessages_H
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Initiate the process of transferring an object to a different scene.
|
||||
*
|
||||
* Sent from: Gameserver
|
||||
* Sent to: PlanetServer for new scene (via Central)
|
||||
* Action: Select a game server to receive the object. Reply with
|
||||
* SceneTransferMessage.
|
||||
*/
|
||||
class RequestSceneTransfer : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
|
||||
RequestSceneTransfer(const NetworkId &oid, const std::string & sceneName, uint32 sourceGameServer, const Vector &position_p, const Vector &position_w, const NetworkId &containerId, const char * scriptCallback = NULL);
|
||||
RequestSceneTransfer(const NetworkId &oid, const std::string & sceneName, uint32 sourceGameServer, const Vector &position_p, const Vector &position_w, const NetworkId &buildingId, const std::string &containerName, const char * scriptCallback = NULL);
|
||||
RequestSceneTransfer(Archive::ReadIterator & source);
|
||||
~RequestSceneTransfer();
|
||||
|
||||
const NetworkId & getNetworkId() const;
|
||||
const std::string & getSceneName() const;
|
||||
uint32 getSourceGameServer() const;
|
||||
const Vector & getPosition_p() const;
|
||||
const Vector & getPosition_w() const;
|
||||
const NetworkId & getContainerId() const;
|
||||
const std::string & getContainerName() const;
|
||||
const std::string & getScriptCallback() const;
|
||||
|
||||
private:
|
||||
|
||||
Archive::AutoVariable<NetworkId> m_oid;
|
||||
Archive::AutoVariable<std::string> m_sceneName;
|
||||
Archive::AutoVariable<uint32> m_sourceGameServer;
|
||||
Archive::AutoVariable<Vector> m_position_p;
|
||||
Archive::AutoVariable<Vector> m_position_w;
|
||||
Archive::AutoVariable<NetworkId> m_containerId;
|
||||
Archive::AutoVariable<std::string> m_containerName;
|
||||
Archive::AutoVariable<std::string> m_scriptCallback;
|
||||
|
||||
private:
|
||||
RequestSceneTransfer();
|
||||
RequestSceneTransfer(const RequestSceneTransfer&);
|
||||
RequestSceneTransfer & operator= (const RequestSceneTransfer&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & RequestSceneTransfer::getNetworkId() const
|
||||
{
|
||||
return m_oid.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & RequestSceneTransfer::getSceneName() const
|
||||
{
|
||||
return m_sceneName.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 RequestSceneTransfer::getSourceGameServer() const
|
||||
{
|
||||
return m_sourceGameServer.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const Vector & RequestSceneTransfer::getPosition_p() const
|
||||
{
|
||||
return m_position_p.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const Vector & RequestSceneTransfer::getPosition_w() const
|
||||
{
|
||||
return m_position_w.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & RequestSceneTransfer::getContainerId() const
|
||||
{
|
||||
return m_containerId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & RequestSceneTransfer::getContainerName() const
|
||||
{
|
||||
return m_containerName.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & RequestSceneTransfer::getScriptCallback() const
|
||||
{
|
||||
return m_scriptCallback.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Tell the Gameserver to transfer an object to a scene. Usually (always?)
|
||||
* sent in reply to RequestSceneTransfer
|
||||
*
|
||||
* Sent from: PlanetServer
|
||||
* Sent to: Gameserver (via Central)
|
||||
* Action: Create a proxy on the specified game server, then make the
|
||||
* proxy authoritative. Remove all other proxies
|
||||
*/
|
||||
class SceneTransferMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
SceneTransferMessage(const RequestSceneTransfer &source, uint32 destinationGameServer);
|
||||
SceneTransferMessage(Archive::ReadIterator & source);
|
||||
~SceneTransferMessage();
|
||||
|
||||
public:
|
||||
const NetworkId & getNetworkId() const;
|
||||
const std::string & getSceneName() const;
|
||||
uint32 getSourceGameServer() const;
|
||||
const Vector & getPosition_p() const;
|
||||
const Vector & getPosition_w() const;
|
||||
const NetworkId & getContainerId() const;
|
||||
const std::string & getContainerName() const;
|
||||
const std::string & getScriptCallback() const;
|
||||
uint32 getDestinationGameServer() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<NetworkId> m_oid;
|
||||
Archive::AutoVariable<std::string> m_sceneName;
|
||||
Archive::AutoVariable<uint32> m_sourceGameServer;
|
||||
Archive::AutoVariable<Vector> m_position_p;
|
||||
Archive::AutoVariable<Vector> m_position_w;
|
||||
Archive::AutoVariable<NetworkId> m_containerId;
|
||||
Archive::AutoVariable<std::string> m_containerName;
|
||||
Archive::AutoVariable<std::string> m_scriptCallback;
|
||||
Archive::AutoVariable<uint32> m_destinationGameServer;
|
||||
|
||||
private:
|
||||
SceneTransferMessage();
|
||||
SceneTransferMessage(const SceneTransferMessage&);
|
||||
SceneTransferMessage & operator= (const SceneTransferMessage&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & SceneTransferMessage::getNetworkId() const
|
||||
{
|
||||
return m_oid.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const std::string &SceneTransferMessage::getSceneName() const
|
||||
{
|
||||
return m_sceneName.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 SceneTransferMessage::getSourceGameServer() const
|
||||
{
|
||||
return m_sourceGameServer.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const Vector &SceneTransferMessage::getPosition_p() const
|
||||
{
|
||||
return m_position_p.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const Vector &SceneTransferMessage::getPosition_w() const
|
||||
{
|
||||
return m_position_w.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId &SceneTransferMessage::getContainerId() const
|
||||
{
|
||||
return m_containerId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const std::string &SceneTransferMessage::getContainerName() const
|
||||
{
|
||||
return m_containerName.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & SceneTransferMessage::getScriptCallback() const
|
||||
{
|
||||
return m_scriptCallback.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 SceneTransferMessage::getDestinationGameServer() const
|
||||
{
|
||||
return m_destinationGameServer.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif //_INCLUDED_SceneTransferMessages_H
|
||||
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// SetAuthoritativeMessage.cpp - tells a Gameserver which server is authoritative
|
||||
// over an object..
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/SetAuthoritativeMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "sharedMathArchive/TransformArchive.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
SetAuthoritativeMessage::SetAuthoritativeMessage(NetworkId const &id, uint32 process, bool sceneChange, bool handlingCrash, NetworkId const &goalCell, Transform const &goalTransform, bool goalIsValid) :
|
||||
GameNetworkMessage("SetAuthoritativeMessage"),
|
||||
m_id(id),
|
||||
m_process(process),
|
||||
m_sceneChange(sceneChange),
|
||||
m_handlingCrash(handlingCrash),
|
||||
m_goalCell(goalCell),
|
||||
m_goalTransform(goalTransform),
|
||||
m_goalIsValid(goalIsValid)
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_process);
|
||||
addVariable(m_sceneChange);
|
||||
addVariable(m_handlingCrash);
|
||||
addVariable(m_goalCell);
|
||||
addVariable(m_goalTransform);
|
||||
addVariable(m_goalIsValid);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
SetAuthoritativeMessage::SetAuthoritativeMessage(Archive::ReadIterator &source) :
|
||||
GameNetworkMessage("SetAuthoritativeMessage"),
|
||||
m_id(),
|
||||
m_process(),
|
||||
m_sceneChange(),
|
||||
m_handlingCrash(),
|
||||
m_goalCell(),
|
||||
m_goalTransform(),
|
||||
m_goalIsValid()
|
||||
{
|
||||
addVariable(m_id);
|
||||
addVariable(m_process);
|
||||
addVariable(m_sceneChange);
|
||||
addVariable(m_handlingCrash);
|
||||
addVariable(m_goalCell);
|
||||
addVariable(m_goalTransform);
|
||||
addVariable(m_goalIsValid);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
SetAuthoritativeMessage::~SetAuthoritativeMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// SetAuthoritativeMessage.h - tells a Gameserver which server is authoritative
|
||||
// over an object.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef _INCLUDED_SetAuthoritativeMessage_H
|
||||
#define _INCLUDED_SetAuthoritativeMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedMath/Transform.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class SetAuthoritativeMessage: public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
SetAuthoritativeMessage(NetworkId const &id, uint32 process, bool sceneChange, bool handlingCrash, NetworkId const &goalCell, Transform const &goalTransform, bool goalIsValid);
|
||||
SetAuthoritativeMessage(Archive::ReadIterator & source);
|
||||
~SetAuthoritativeMessage();
|
||||
|
||||
NetworkId const & getId() const;
|
||||
uint32 getProcess() const;
|
||||
bool getSceneChange() const;
|
||||
bool getHandlingCrash() const;
|
||||
NetworkId const & getGoalCell() const;
|
||||
Transform const & getGoalTransform() const;
|
||||
bool getGoalIsValid() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<NetworkId> m_id; // id of object being made authoritative
|
||||
Archive::AutoVariable<uint32> m_process; // process that is authoritative
|
||||
Archive::AutoVariable<bool> m_sceneChange; // whether authority transfer due to scene change
|
||||
Archive::AutoVariable<bool> m_handlingCrash; // whether authority transfer due to server crash
|
||||
Archive::AutoVariable<NetworkId> m_goalCell; // Cell we're trying to move into
|
||||
Archive::AutoVariable<Transform> m_goalTransform; // Transform we'd like to have when we move into the cell
|
||||
Archive::AutoVariable<bool> m_goalIsValid; // Whether the goalCell and goalTransform should be used
|
||||
|
||||
SetAuthoritativeMessage();
|
||||
SetAuthoritativeMessage(SetAuthoritativeMessage const &);
|
||||
SetAuthoritativeMessage &operator=(SetAuthoritativeMessage const &);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId const &SetAuthoritativeMessage::getId() const
|
||||
{
|
||||
return m_id.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 SetAuthoritativeMessage::getProcess() const
|
||||
{
|
||||
return m_process.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline bool SetAuthoritativeMessage::getSceneChange() const
|
||||
{
|
||||
return m_sceneChange.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline bool SetAuthoritativeMessage::getHandlingCrash() const
|
||||
{
|
||||
return m_handlingCrash.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline NetworkId const &SetAuthoritativeMessage::getGoalCell() const
|
||||
{
|
||||
return m_goalCell.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline Transform const &SetAuthoritativeMessage::getGoalTransform() const
|
||||
{
|
||||
return m_goalTransform.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline bool SetAuthoritativeMessage::getGoalIsValid() const
|
||||
{
|
||||
return m_goalIsValid.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif // _INCLUDED_SetAuthoritativeMessage_H
|
||||
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
//========================================================================
|
||||
//
|
||||
// SetObjectPositionMessage.cpp - tells where to put an object.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/SetObjectPositionMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
#include "sharedMathArchive/VectorArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param id id of object that was created
|
||||
*/
|
||||
SetObjectPositionMessage::SetObjectPositionMessage(const NetworkId& id,
|
||||
const std::string &scene, bool added, bool authoritative) :
|
||||
GameNetworkMessage("SetObjectPositionMessage"),
|
||||
m_added(added),
|
||||
m_authoritative(authoritative),
|
||||
m_id(id),
|
||||
m_scene(scene)
|
||||
{
|
||||
addVariable(m_added);
|
||||
addVariable(m_authoritative);
|
||||
addVariable(m_id);
|
||||
addVariable(m_scene);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
SetObjectPositionMessage::SetObjectPositionMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("SetObjectPositionMessage"),
|
||||
m_added(false),
|
||||
m_authoritative(false),
|
||||
m_id(),
|
||||
m_scene()
|
||||
{
|
||||
addVariable(m_added);
|
||||
addVariable(m_authoritative);
|
||||
addVariable(m_id);
|
||||
addVariable(m_scene);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class destructor.
|
||||
*/
|
||||
SetObjectPositionMessage::~SetObjectPositionMessage()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
//========================================================================
|
||||
//
|
||||
// SetObjectPositionMessage.h - tells where to put an object.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_SetObjectPositionMessage_H
|
||||
#define _INCLUDED_SetObjectPositionMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include <string>
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
#include "sharedMath/Vector.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class SetObjectPositionMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
SetObjectPositionMessage (const NetworkId& id, const std::string &scene, bool added, bool authoritative);
|
||||
SetObjectPositionMessage (Archive::ReadIterator & source);
|
||||
~SetObjectPositionMessage ();
|
||||
|
||||
bool getAdded() const;
|
||||
bool getAuthoritative() const;
|
||||
const NetworkId& getId(void) const;
|
||||
const std::string& getScene(void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<bool> m_added;
|
||||
Archive::AutoVariable<bool> m_authoritative;
|
||||
Archive::AutoVariable<NetworkId> m_id; // id of object that was created
|
||||
Archive::AutoVariable<std::string> m_scene; // scene (planet) the object is in
|
||||
|
||||
SetObjectPositionMessage();
|
||||
SetObjectPositionMessage(const SetObjectPositionMessage&);
|
||||
SetObjectPositionMessage& operator= (const SetObjectPositionMessage&);
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
inline bool SetObjectPositionMessage::getAdded() const
|
||||
{
|
||||
return m_added.get();
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline bool SetObjectPositionMessage::getAuthoritative() const
|
||||
{
|
||||
return m_authoritative.get();
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId& SetObjectPositionMessage::getId(void) const
|
||||
{
|
||||
return m_id.get();
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string& SetObjectPositionMessage::getScene(void) const
|
||||
{
|
||||
return m_scene.get();
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
|
||||
#endif // _INCLUDED_SetObjectPositionMessage_H
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
//========================================================================
|
||||
//
|
||||
// SetPlanetServerMessage.cpp - tells Centralserver we want all the objects in a chunk.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/SetPlanetServerMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
SetPlanetServerMessage::SetPlanetServerMessage(const std::string &address, uint16 port) :
|
||||
GameNetworkMessage("SetPlanetServerMessage"),
|
||||
m_address(address),
|
||||
m_port(port)
|
||||
{
|
||||
addVariable(m_address);
|
||||
addVariable(m_port);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
SetPlanetServerMessage::SetPlanetServerMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("SetPlanetServerMessage"),
|
||||
m_address(),
|
||||
m_port()
|
||||
{
|
||||
addVariable(m_address);
|
||||
addVariable(m_port);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
SetPlanetServerMessage::~SetPlanetServerMessage()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// SetPlanetServerMessage.h
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_SetPlanetServerMessage_H
|
||||
#define INCLUDED_SetPlanetServerMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class SetPlanetServerMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
SetPlanetServerMessage (const std::string &address, uint16 port);
|
||||
SetPlanetServerMessage (Archive::ReadIterator & source);
|
||||
virtual ~SetPlanetServerMessage ();
|
||||
|
||||
const std::string &getAddress() const;
|
||||
uint16 getPort() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<std::string> m_address;
|
||||
Archive::AutoVariable<uint16> m_port;
|
||||
|
||||
SetPlanetServerMessage();
|
||||
SetPlanetServerMessage(const SetPlanetServerMessage&);
|
||||
SetPlanetServerMessage& operator= (const SetPlanetServerMessage&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string& SetPlanetServerMessage::getAddress(void) const
|
||||
{
|
||||
return m_address.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint16 SetPlanetServerMessage::getPort(void) const
|
||||
{
|
||||
return m_port.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#endif
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
//========================================================================
|
||||
//
|
||||
// SetUniverseAuthoritativeMessage.cpp - tells Centralserver we want all the objects in a chunk.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/SetUniverseAuthoritativeMessage.h"
|
||||
|
||||
#include "serverNetworkMessages/CentralGameServerMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param process gameserver id that should receive the loaded objects
|
||||
*/
|
||||
SetUniverseAuthoritativeMessage::SetUniverseAuthoritativeMessage (uint32 process) :
|
||||
GameNetworkMessage("SetUniverseAuthoritativeMessage"),
|
||||
m_process(process)
|
||||
{
|
||||
addVariable(m_process);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
SetUniverseAuthoritativeMessage::SetUniverseAuthoritativeMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("SetUniverseAuthoritativeMessage"),
|
||||
m_process()
|
||||
{
|
||||
addVariable(m_process);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
SetUniverseAuthoritativeMessage::~SetUniverseAuthoritativeMessage()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
//========================================================================
|
||||
//
|
||||
// SetUniverseAuthoritativeMessage.h - tells Gameserver another Gameserver wants to load a
|
||||
// proxy from an authoritative object.
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#ifndef _INCLUDED_SetUniverseAuthoritativeMessage_H
|
||||
#define _INCLUDED_SetUniverseAuthoritativeMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Sent from: Central
|
||||
* Sent to: all GameServers
|
||||
* Action: Tells the GameServers which one should be authoritative for
|
||||
* universe objects.
|
||||
*/
|
||||
|
||||
class SetUniverseAuthoritativeMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
SetUniverseAuthoritativeMessage (uint32 process);
|
||||
SetUniverseAuthoritativeMessage (Archive::ReadIterator & source);
|
||||
~SetUniverseAuthoritativeMessage ();
|
||||
|
||||
uint32 getProcess(void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_process;
|
||||
|
||||
private:
|
||||
SetUniverseAuthoritativeMessage();
|
||||
SetUniverseAuthoritativeMessage(const SetUniverseAuthoritativeMessage&);
|
||||
SetUniverseAuthoritativeMessage& operator= (const SetUniverseAuthoritativeMessage&);
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline uint32 SetUniverseAuthoritativeMessage::getProcess(void) const
|
||||
{
|
||||
return m_process.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#endif // _INCLUDED_SetUniverseAuthoritativeMessage_H
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user