mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-08-02 03:16:11 -04:00
Added serverNetworkMessages library
This commit is contained in:
+350
@@ -0,0 +1,350 @@
|
||||
//------------------------------------------
|
||||
// CentralConnectionServerMessages.cpp
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/CentralConnectionServerMessages.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
NewCentralConnectionServer::NewCentralConnectionServer(const std::string & address, const std::string & csa, const std::string & chatAddr, const std::string & customerAddr, const uint16 clientPortPrivate, const uint16 clientPortPublic, const uint16 gamePort, const uint16 chatPort, const uint16 _customerServicePort, const uint16 pingPort, const int connectionServerNumber) :
|
||||
GameNetworkMessage ("NewCentralConnectionServer"),
|
||||
chatServicePort (chatPort),
|
||||
customerServicePort (_customerServicePort),
|
||||
clientServicePortPrivate (clientPortPrivate),
|
||||
clientServicePortPublic (clientPortPublic),
|
||||
gameServicePort (gamePort),
|
||||
m_pingPort (pingPort),
|
||||
m_connectionServerNumber (connectionServerNumber),
|
||||
serviceAddress (address),
|
||||
clientServiceAddress (csa),
|
||||
chatServiceAddress (chatAddr),
|
||||
customerServiceAddress (customerAddr)
|
||||
{
|
||||
addVariable(chatServicePort);
|
||||
addVariable(customerServicePort);
|
||||
addVariable(clientServicePortPrivate);
|
||||
addVariable(clientServicePortPublic);
|
||||
addVariable(gameServicePort);
|
||||
addVariable(m_pingPort);
|
||||
addVariable(m_connectionServerNumber);
|
||||
addVariable(serviceAddress);
|
||||
addVariable(clientServiceAddress);
|
||||
addVariable(chatServiceAddress);
|
||||
addVariable(customerServiceAddress);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
NewCentralConnectionServer::NewCentralConnectionServer(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage ("NewCentralConnectionServer"),
|
||||
chatServicePort (0),
|
||||
customerServicePort(0),
|
||||
clientServicePortPrivate (0),
|
||||
clientServicePortPublic (0),
|
||||
gameServicePort (0),
|
||||
m_pingPort (0),
|
||||
m_connectionServerNumber (0),
|
||||
serviceAddress (),
|
||||
clientServiceAddress (),
|
||||
chatServiceAddress (),
|
||||
customerServiceAddress ()
|
||||
{
|
||||
addVariable(chatServicePort);
|
||||
addVariable(customerServicePort);
|
||||
addVariable(clientServicePortPrivate);
|
||||
addVariable(clientServicePortPublic);
|
||||
addVariable(gameServicePort);
|
||||
addVariable(m_pingPort);
|
||||
addVariable(m_connectionServerNumber);
|
||||
addVariable(serviceAddress);
|
||||
addVariable(clientServiceAddress);
|
||||
addVariable(chatServiceAddress);
|
||||
addVariable(customerServiceAddress);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
NewCentralConnectionServer::~NewCentralConnectionServer()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnectionServerId::ConnectionServerId(int newId) :
|
||||
GameNetworkMessage("ConnectionServerId"),
|
||||
m_id(newId)
|
||||
{
|
||||
addVariable(m_id);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
ConnectionServerId::ConnectionServerId(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ConnectionServerId"),
|
||||
m_id(0)
|
||||
{
|
||||
addVariable(m_id);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnectionServerId::~ConnectionServerId()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnectionKeyPush::ConnectionKeyPush(const KeyShare::Key & sourceKey) :
|
||||
GameNetworkMessage("ConnectionKeyPush"),
|
||||
key(sourceKey)
|
||||
{
|
||||
addVariable(key);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnectionKeyPush::ConnectionKeyPush(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ConnectionKeyPush"),
|
||||
key()
|
||||
{
|
||||
addVariable(key);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnectionKeyPush::~ConnectionKeyPush()
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
LoggedInMessage::LoggedInMessage(uint32 accountNumber) :
|
||||
GameNetworkMessage("LoggedInMessage"),
|
||||
m_accountNumber(accountNumber)
|
||||
{
|
||||
addVariable(m_accountNumber);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
LoggedInMessage::LoggedInMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("LoggedInMessage"),
|
||||
m_accountNumber()
|
||||
{
|
||||
addVariable(m_accountNumber);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
LoggedInMessage::~LoggedInMessage()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnEnumerateCharacterId::ConnEnumerateCharacterId(uint32 newAccountNumber, const Unicode::String & newName, const std::string & newLocation, const std::string & newObjectTemplate) :
|
||||
GameNetworkMessage("ConnEnumerateCharacterId"),
|
||||
accountNumber(newAccountNumber),
|
||||
location(newLocation),
|
||||
name(newName),
|
||||
objectTemplate(newObjectTemplate)
|
||||
{
|
||||
addVariable(accountNumber);
|
||||
addVariable(location);
|
||||
addVariable(name);
|
||||
addVariable(objectTemplate);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnEnumerateCharacterId::ConnEnumerateCharacterId(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ConnEnumerateCharacterId"),
|
||||
accountNumber(0),
|
||||
location(),
|
||||
name(),
|
||||
objectTemplate()
|
||||
{
|
||||
addVariable(accountNumber);
|
||||
addVariable(location);
|
||||
addVariable(name);
|
||||
addVariable(objectTemplate);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnEnumerateCharacterId::~ConnEnumerateCharacterId()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
ConnectionCreateCharacter::ConnectionCreateCharacter(const uint32 newStationId, const Unicode::String & newCharacterName, const std::string & newTemplateName, float scaleFactor, const std::string & newStartingLocation, const std::string & newAppearanceData, const std::string & newHairTemplateName, const std::string & hairAppearanceData, const std::string & profession, bool jedi, const Unicode::String & biography, bool useNewbieTutorial, const std::string & skillTemplate, const std::string & workingSkill, bool noRateLimit, bool isForCharacterTransfer, uint32 gameFeatures) :
|
||||
GameNetworkMessage("ConnectionCreateCharacter"),
|
||||
m_appearanceData(newAppearanceData),
|
||||
m_characterName(newCharacterName),
|
||||
m_templateName(newTemplateName),
|
||||
m_startingLocation(newStartingLocation),
|
||||
m_hairTemplateName(newHairTemplateName),
|
||||
m_hairAppearanceData (hairAppearanceData),
|
||||
m_stationId(newStationId),
|
||||
m_profession(profession),
|
||||
m_jedi(jedi),
|
||||
m_scaleFactor(scaleFactor),
|
||||
m_biography(biography),
|
||||
m_useNewbieTutorial(useNewbieTutorial),
|
||||
m_skillTemplate(skillTemplate),
|
||||
m_workingSkill(workingSkill),
|
||||
m_noRateLimit(noRateLimit),
|
||||
m_isForCharacterTransfer(isForCharacterTransfer),
|
||||
m_gameFeatures(gameFeatures)
|
||||
{
|
||||
addVariable(m_appearanceData);
|
||||
addVariable(m_characterName);
|
||||
addVariable(m_templateName);
|
||||
addVariable(m_startingLocation);
|
||||
addVariable(m_hairTemplateName);
|
||||
addVariable(m_hairAppearanceData);
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_profession);
|
||||
addVariable(m_jedi);
|
||||
addVariable(m_scaleFactor);
|
||||
addVariable(m_biography);
|
||||
addVariable(m_useNewbieTutorial);
|
||||
addVariable(m_skillTemplate);
|
||||
addVariable(m_workingSkill);
|
||||
addVariable(m_noRateLimit);
|
||||
addVariable(m_isForCharacterTransfer);
|
||||
addVariable(m_gameFeatures);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnectionCreateCharacter::ConnectionCreateCharacter(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ConnectionCreateCharacter"),
|
||||
m_appearanceData(),
|
||||
m_characterName(),
|
||||
m_templateName(),
|
||||
m_startingLocation(),
|
||||
m_hairTemplateName(),
|
||||
m_hairAppearanceData (),
|
||||
m_stationId(0),
|
||||
m_profession(),
|
||||
m_jedi(),
|
||||
m_scaleFactor(1.0f),
|
||||
m_biography(),
|
||||
m_useNewbieTutorial(false),
|
||||
m_skillTemplate(),
|
||||
m_workingSkill(),
|
||||
m_noRateLimit(false),
|
||||
m_isForCharacterTransfer(),
|
||||
m_gameFeatures(0)
|
||||
{
|
||||
addVariable(m_appearanceData);
|
||||
addVariable(m_characterName);
|
||||
addVariable(m_templateName);
|
||||
addVariable(m_startingLocation);
|
||||
addVariable(m_hairTemplateName);
|
||||
addVariable(m_hairAppearanceData);
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_profession);
|
||||
addVariable(m_jedi);
|
||||
addVariable(m_scaleFactor);
|
||||
addVariable(m_biography);
|
||||
addVariable(m_useNewbieTutorial);
|
||||
addVariable(m_skillTemplate);
|
||||
addVariable(m_workingSkill);
|
||||
addVariable(m_noRateLimit);
|
||||
addVariable(m_isForCharacterTransfer);
|
||||
addVariable(m_gameFeatures);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnectionCreateCharacter::~ConnectionCreateCharacter()
|
||||
{
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
const float ConnectionCreateCharacter::getScaleFactor () const
|
||||
{
|
||||
return m_scaleFactor.get ();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnectionCreateCharacterSuccess::ConnectionCreateCharacterSuccess(uint32 suid, const NetworkId & networkId) :
|
||||
GameNetworkMessage("ConnectionCreateCharacterSuccess"),
|
||||
stationId(suid),
|
||||
m_networkId (networkId)
|
||||
{
|
||||
addVariable(stationId);
|
||||
addVariable(m_networkId);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnectionCreateCharacterSuccess::ConnectionCreateCharacterSuccess(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ConnectionCreateCharacterSuccess"),
|
||||
stationId(0),
|
||||
m_networkId ()
|
||||
{
|
||||
addVariable(stationId);
|
||||
addVariable(m_networkId);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnectionCreateCharacterSuccess::~ConnectionCreateCharacterSuccess()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnectionCreateCharacterFailed::ConnectionCreateCharacterFailed(uint32 newStationId, const Unicode::String &name, const StringId &errorMessage, const std::string &optionalDetailedErrorMessage) :
|
||||
GameNetworkMessage("ConnectionCreateCharacterFailed"),
|
||||
m_name(name),
|
||||
m_errorMessage(errorMessage),
|
||||
m_optionalDetailedErrorMessage(optionalDetailedErrorMessage),
|
||||
stationId(newStationId)
|
||||
{
|
||||
addVariable(stationId);
|
||||
addVariable(m_name);
|
||||
addVariable(m_errorMessage);
|
||||
addVariable(m_optionalDetailedErrorMessage);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnectionCreateCharacterFailed::ConnectionCreateCharacterFailed(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ConnectionCreateCharacterFailed"),
|
||||
m_name(),
|
||||
m_errorMessage(),
|
||||
m_optionalDetailedErrorMessage(),
|
||||
stationId(0)
|
||||
{
|
||||
addVariable(stationId);
|
||||
addVariable(m_name);
|
||||
addVariable(m_errorMessage);
|
||||
addVariable(m_optionalDetailedErrorMessage);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ConnectionCreateCharacterFailed::~ConnectionCreateCharacterFailed()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+590
@@ -0,0 +1,590 @@
|
||||
|
||||
// CentralConnectionServerMessages.h
|
||||
// copyright 2001 Verant Interactive
|
||||
|
||||
#ifndef _INCLUDED_CentralConnectionServerMessages_H
|
||||
#define _INCLUDED_CentralConnectionServerMessages_H
|
||||
|
||||
#include "StringId.h"
|
||||
#include "Unicode.h"
|
||||
#include "localizationArchive/StringIdArchive.h"
|
||||
#include "serverKeyShare/KeyShare.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class NewCentralConnectionServer : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
NewCentralConnectionServer (const std::string & address, const std::string & clientServiceAddress, const std::string & chatServiceAddress, const std::string & customerServiceAddress, const uint16 clientPortPrivate, const uint16 clientPortPublic, const uint16 gamePort, const uint16 chatPort, const uint16 customerServicePort, const uint16 pingPort, const int connectionServerNumber);
|
||||
NewCentralConnectionServer (Archive::ReadIterator & source);
|
||||
~NewCentralConnectionServer ();
|
||||
|
||||
const uint16 getChatServicePort () const;
|
||||
const uint16 getCustomerServicePort () const;
|
||||
const uint16 getClientServicePortPrivate () const;
|
||||
const uint16 getClientServicePortPublic () const;
|
||||
const uint16 getGameServicePort () const;
|
||||
const uint16 getPingPort () const;
|
||||
const int getConnectionServerNumber () const;
|
||||
const std::string & getChatServiceAddress () const;
|
||||
const std::string & getClientServiceAddress () const;
|
||||
const std::string & getGameServiceAddress () const;
|
||||
const std::string & getCustomerServiceAddress () const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint16> chatServicePort;
|
||||
Archive::AutoVariable<uint16> customerServicePort;
|
||||
Archive::AutoVariable<uint16> clientServicePortPrivate;
|
||||
Archive::AutoVariable<uint16> clientServicePortPublic;
|
||||
Archive::AutoVariable<uint16> gameServicePort;
|
||||
Archive::AutoVariable<uint16> m_pingPort;
|
||||
Archive::AutoVariable<int> m_connectionServerNumber;
|
||||
Archive::AutoVariable<std::string> serviceAddress;
|
||||
Archive::AutoVariable<std::string> clientServiceAddress;
|
||||
Archive::AutoVariable<std::string> chatServiceAddress;
|
||||
Archive::AutoVariable<std::string> customerServiceAddress;
|
||||
|
||||
|
||||
NewCentralConnectionServer();
|
||||
NewCentralConnectionServer(const NewCentralConnectionServer&);
|
||||
NewCentralConnectionServer& operator= (const NewCentralConnectionServer&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint16 NewCentralConnectionServer::getChatServicePort() const
|
||||
{
|
||||
return chatServicePort.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & NewCentralConnectionServer::getCustomerServiceAddress() const
|
||||
{
|
||||
return customerServiceAddress.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & NewCentralConnectionServer::getClientServiceAddress() const
|
||||
{
|
||||
return clientServiceAddress.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint16 NewCentralConnectionServer::getCustomerServicePort() const
|
||||
{
|
||||
return customerServicePort.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & NewCentralConnectionServer::getGameServiceAddress () const
|
||||
{
|
||||
return serviceAddress.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint16 NewCentralConnectionServer::getClientServicePortPrivate() const
|
||||
{
|
||||
return clientServicePortPrivate.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint16 NewCentralConnectionServer::getClientServicePortPublic() const
|
||||
{
|
||||
return clientServicePortPublic.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & NewCentralConnectionServer::getChatServiceAddress() const
|
||||
{
|
||||
return chatServiceAddress.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint16 NewCentralConnectionServer::getGameServicePort () const
|
||||
{
|
||||
return gameServicePort.get();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
inline const uint16 NewCentralConnectionServer::getPingPort () const
|
||||
{
|
||||
return m_pingPort.get ();
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
inline const int NewCentralConnectionServer::getConnectionServerNumber() const
|
||||
{
|
||||
return m_connectionServerNumber.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
//This message is sent from Central to the conenction server when they establish a connection
|
||||
//To give it an id to pass around to servers that need it.
|
||||
class ConnectionServerId: public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
explicit ConnectionServerId(int newId);
|
||||
ConnectionServerId(Archive::ReadIterator & source);
|
||||
~ConnectionServerId();
|
||||
|
||||
int getId() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<int> m_id;
|
||||
|
||||
ConnectionServerId();
|
||||
ConnectionServerId(const ConnectionServerId&);
|
||||
ConnectionServerId& operator= (const ConnectionServerId&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline int ConnectionServerId::getId() const
|
||||
{
|
||||
return m_id.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class ConnectionKeyPush : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
explicit ConnectionKeyPush (const KeyShare::Key& sourceKey);
|
||||
ConnectionKeyPush (Archive::ReadIterator & source);
|
||||
~ConnectionKeyPush();
|
||||
const KeyShare::Key& getKey(void) const;
|
||||
private:
|
||||
AutoVariableKeyShare key;
|
||||
|
||||
ConnectionKeyPush();
|
||||
ConnectionKeyPush(const ConnectionKeyPush&);
|
||||
ConnectionKeyPush& operator= (const ConnectionKeyPush&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const KeyShare::Key & ConnectionKeyPush::getKey(void) const
|
||||
{
|
||||
return key;
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class LoggedInMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
LoggedInMessage (uint32 accountNumber);
|
||||
LoggedInMessage (Archive::ReadIterator & source);
|
||||
~LoggedInMessage ();
|
||||
|
||||
uint32 getAccountNumber(void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_accountNumber;
|
||||
|
||||
LoggedInMessage();
|
||||
LoggedInMessage(const LoggedInMessage&);
|
||||
LoggedInMessage& operator= (const LoggedInMessage&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline uint32 LoggedInMessage::getAccountNumber(void) const
|
||||
{
|
||||
return m_accountNumber.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class ConnEnumerateCharacterId : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
ConnEnumerateCharacterId(uint32 newAccountNumber, const Unicode::String & newName, const std::string & newLocation, const std::string & newObjectTemplate);
|
||||
explicit ConnEnumerateCharacterId(Archive::ReadIterator & source);
|
||||
~ConnEnumerateCharacterId();
|
||||
|
||||
|
||||
const uint32 getAccountNumber (void) const;
|
||||
const std::string & getLocation (void) const;
|
||||
const Unicode::String & getName (void) const;
|
||||
const std::string & getObjectTemplate (void) const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> accountNumber;
|
||||
Archive::AutoVariable<std::string> location;
|
||||
Archive::AutoVariable<Unicode::String> name;
|
||||
Archive::AutoVariable<std::string> objectTemplate;
|
||||
|
||||
ConnEnumerateCharacterId();
|
||||
ConnEnumerateCharacterId(const ConnEnumerateCharacterId&);
|
||||
ConnEnumerateCharacterId& operator= (const ConnEnumerateCharacterId&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint32 ConnEnumerateCharacterId::getAccountNumber(void) const
|
||||
{
|
||||
return accountNumber.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & ConnEnumerateCharacterId::getLocation(void) const
|
||||
{
|
||||
return location.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const Unicode::String & ConnEnumerateCharacterId::getName(void) const
|
||||
{
|
||||
return name.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & ConnEnumerateCharacterId::getObjectTemplate(void) const
|
||||
{
|
||||
return objectTemplate.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class ConnectionCreateCharacter : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
ConnectionCreateCharacter(uint32 stationId, const Unicode::String & characterName, const std::string & templateName, float scaleFactor, const std::string & startingLocation, const std::string & newAppeareanceData, const std::string & hairTemplateName, const std::string & hairAppearanceData, const std::string & profession, bool jedi, const Unicode::String & biography, bool useNewbieTutorial, const std::string & skillTemplate, const std::string & workingSkill, bool noRateLimit, bool isForCharacterTransfer, uint32 gameFeatures);
|
||||
explicit ConnectionCreateCharacter(Archive::ReadIterator & source);
|
||||
~ConnectionCreateCharacter();
|
||||
|
||||
const float getScaleFactor () const;
|
||||
const std::string & getAppearanceData() const;
|
||||
const Unicode::String & getCharacterName() const;
|
||||
const std::string & getHairTemplateName() const;
|
||||
const std::string & getHairAppearanceData () const;
|
||||
const std::string & getStartingLocation() const;
|
||||
const uint32 getStationId() const;
|
||||
const std::string & getTemplateName() const;
|
||||
const std::string & getProfession() const;
|
||||
const bool getJedi() const;
|
||||
const Unicode::String & getBiography() const;
|
||||
const bool getUseNewbieTutorial() const;
|
||||
const std::string & getSkillTemplate() const;
|
||||
const std::string & getWorkingSkill() const;
|
||||
const bool getNoRateLimit() const;
|
||||
const bool getIsForCharacterTransfer() const;
|
||||
const uint32 getGameFeatures() const;
|
||||
|
||||
private:
|
||||
|
||||
Archive::AutoVariable<std::string> m_appearanceData;
|
||||
Archive::AutoVariable<Unicode::String> m_characterName;
|
||||
Archive::AutoVariable<std::string> m_templateName;
|
||||
Archive::AutoVariable<std::string> m_startingLocation;
|
||||
Archive::AutoVariable<std::string> m_hairTemplateName;
|
||||
Archive::AutoVariable<std::string> m_hairAppearanceData;
|
||||
Archive::AutoVariable<uint32> m_stationId;
|
||||
Archive::AutoVariable<std::string> m_profession;
|
||||
Archive::AutoVariable<bool> m_jedi;
|
||||
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_noRateLimit;
|
||||
Archive::AutoVariable<bool> m_isForCharacterTransfer;
|
||||
Archive::AutoVariable<uint32> m_gameFeatures;
|
||||
|
||||
ConnectionCreateCharacter();
|
||||
ConnectionCreateCharacter(const ConnectionCreateCharacter&);
|
||||
ConnectionCreateCharacter& operator= (const ConnectionCreateCharacter&);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const bool ConnectionCreateCharacter::getIsForCharacterTransfer() const
|
||||
{
|
||||
return m_isForCharacterTransfer.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & ConnectionCreateCharacter::getAppearanceData(void) const
|
||||
{
|
||||
return m_appearanceData.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const Unicode::String & ConnectionCreateCharacter::getCharacterName(void) const
|
||||
{
|
||||
return m_characterName.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & ConnectionCreateCharacter::getHairTemplateName() const
|
||||
{
|
||||
return m_hairTemplateName.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & ConnectionCreateCharacter::getHairAppearanceData() const
|
||||
{
|
||||
return m_hairAppearanceData.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & ConnectionCreateCharacter::getStartingLocation(void) const
|
||||
{
|
||||
return m_startingLocation.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
inline const uint32 ConnectionCreateCharacter::getStationId(void) const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
inline const std::string & ConnectionCreateCharacter::getTemplateName(void) const
|
||||
{
|
||||
return m_templateName.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & ConnectionCreateCharacter::getProfession() const
|
||||
{
|
||||
return m_profession.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const bool ConnectionCreateCharacter::getJedi() const
|
||||
{
|
||||
return m_jedi.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const Unicode::String & ConnectionCreateCharacter::getBiography() const
|
||||
{
|
||||
return m_biography.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const bool ConnectionCreateCharacter::getUseNewbieTutorial() const
|
||||
{
|
||||
return m_useNewbieTutorial.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & ConnectionCreateCharacter::getSkillTemplate() const
|
||||
{
|
||||
return m_skillTemplate.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & ConnectionCreateCharacter::getWorkingSkill() const
|
||||
{
|
||||
return m_workingSkill.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const bool ConnectionCreateCharacter::getNoRateLimit() const
|
||||
{
|
||||
return m_noRateLimit.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const uint32 ConnectionCreateCharacter::getGameFeatures() const
|
||||
{
|
||||
return m_gameFeatures.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class ConnectionCreateCharacterSuccess : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
ConnectionCreateCharacterSuccess (uint32 stationId, const NetworkId & id);
|
||||
explicit ConnectionCreateCharacterSuccess(Archive::ReadIterator & source);
|
||||
~ConnectionCreateCharacterSuccess();
|
||||
|
||||
uint32 getStationId () const;
|
||||
const NetworkId & getNetworkId () const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint32> stationId;
|
||||
Archive::AutoVariable<NetworkId> m_networkId;
|
||||
|
||||
ConnectionCreateCharacterSuccess();
|
||||
ConnectionCreateCharacterSuccess(const ConnectionCreateCharacterSuccess & source);
|
||||
ConnectionCreateCharacterSuccess & operator = (const ConnectionCreateCharacterSuccess & rhs);
|
||||
};
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline uint32 ConnectionCreateCharacterSuccess::getStationId() const
|
||||
{
|
||||
return stationId.get();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & ConnectionCreateCharacterSuccess::getNetworkId () const
|
||||
{
|
||||
return m_networkId.get ();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class ConnectionCreateCharacterFailed : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
ConnectionCreateCharacterFailed(uint32 stationId, const Unicode::String &name, const StringId &errorMessage, const std::string &optionalDetailedErrorMessage);
|
||||
explicit ConnectionCreateCharacterFailed(Archive::ReadIterator & source);
|
||||
~ConnectionCreateCharacterFailed();
|
||||
|
||||
const Unicode::String &getName() const;
|
||||
const StringId &getErrorMessage() const;
|
||||
const std::string &getOptionalDetailedErrorMessage() const;
|
||||
uint32 getStationId() const;
|
||||
|
||||
private:
|
||||
|
||||
Archive::AutoVariable<Unicode::String> m_name;
|
||||
Archive::AutoVariable<StringId> m_errorMessage;
|
||||
Archive::AutoVariable<std::string> m_optionalDetailedErrorMessage;
|
||||
Archive::AutoVariable<uint32> stationId;
|
||||
|
||||
ConnectionCreateCharacterFailed();
|
||||
ConnectionCreateCharacterFailed(const ConnectionCreateCharacterFailed & source);
|
||||
ConnectionCreateCharacterFailed & operator = (const ConnectionCreateCharacterFailed & rhs);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const Unicode::String &ConnectionCreateCharacterFailed::getName() const
|
||||
{
|
||||
return m_name.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const StringId &ConnectionCreateCharacterFailed::getErrorMessage() const
|
||||
{
|
||||
return m_errorMessage.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const std::string &ConnectionCreateCharacterFailed::getOptionalDetailedErrorMessage() const
|
||||
{
|
||||
return m_optionalDetailedErrorMessage.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline uint32 ConnectionCreateCharacterFailed::getStationId() const
|
||||
{
|
||||
return stationId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class ConnectionRandomNameRequest: public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
explicit ConnectionRandomNameRequest(uint32 stationId, const std::string &creatureTemplate);
|
||||
explicit ConnectionRandomNameRequest(Archive::ReadIterator & source);
|
||||
~ConnectionRandomNameRequest();
|
||||
|
||||
const uint32 getStationId() const;
|
||||
const std::string &getCreatureTemplate() const;
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_stationId;
|
||||
Archive::AutoVariable<std::string> m_creatureTemplate;
|
||||
|
||||
ConnectionRandomNameRequest(const ConnectionRandomNameRequest & source);
|
||||
ConnectionRandomNameRequest & operator = (const ConnectionRandomNameRequest & other);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const uint32 ConnectionRandomNameRequest::getStationId() const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const std::string &ConnectionRandomNameRequest::getCreatureTemplate() const
|
||||
{
|
||||
return m_creatureTemplate.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class ConnectionRandomNameResponse: public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
explicit ConnectionRandomNameResponse(uint32 stationId, const std::string &creatureTemplate, const Unicode::String &name);
|
||||
explicit ConnectionRandomNameResponse(Archive::ReadIterator & source);
|
||||
~ConnectionRandomNameResponse();
|
||||
|
||||
const uint32 getStationId() const;
|
||||
const std::string &getCreatureTemplate() const;
|
||||
const Unicode::String &getName() const;
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_stationId;
|
||||
Archive::AutoVariable<std::string> m_creatureTemplate;
|
||||
Archive::AutoVariable<Unicode::String> m_name;
|
||||
|
||||
ConnectionRandomNameResponse(const ConnectionRandomNameRequest & source);
|
||||
ConnectionRandomNameResponse & operator = (const ConnectionRandomNameRequest & other);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const uint32 ConnectionRandomNameResponse::getStationId() const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const std::string &ConnectionRandomNameResponse::getCreatureTemplate() const
|
||||
{
|
||||
return m_creatureTemplate.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const Unicode::String &ConnectionRandomNameResponse::getName() const
|
||||
{
|
||||
return m_name.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
// SetConnectionServerPublic.cpp
|
||||
// Copyright 2000-02, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/SetConnectionServerPublic.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
SetConnectionServerPublic::SetConnectionServerPublic(const bool isPublic) :
|
||||
GameNetworkMessage("SetConnectionServerPublic"),
|
||||
m_isPublic(isPublic)
|
||||
{
|
||||
addVariable(m_isPublic);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
SetConnectionServerPublic::SetConnectionServerPublic(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("SetConnectionServerPublic"),
|
||||
m_isPublic()
|
||||
{
|
||||
addVariable(m_isPublic);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
SetConnectionServerPublic::~SetConnectionServerPublic()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
// SetConnectionServerPublic.h
|
||||
// Copyright 2000-02, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
#ifndef _INCLUDED_SetConnectionServerPublic_H
|
||||
#define _INCLUDED_SetConnectionServerPublic_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class SetConnectionServerPublic : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
explicit SetConnectionServerPublic(const bool isPublic);
|
||||
explicit SetConnectionServerPublic(Archive::ReadIterator & source);
|
||||
~SetConnectionServerPublic();
|
||||
|
||||
const bool getIsPublic () const;
|
||||
|
||||
private:
|
||||
SetConnectionServerPublic & operator = (const SetConnectionServerPublic & rhs);
|
||||
SetConnectionServerPublic(const SetConnectionServerPublic & source);
|
||||
|
||||
Archive::AutoVariable<bool> m_isPublic;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const bool SetConnectionServerPublic::getIsPublic() const
|
||||
{
|
||||
return m_isPublic.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#endif // _INCLUDED_SetConnectionServerPublic_H
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// UpdateConnectionServerStatus.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/UpdateConnectionServerStatus.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
UpdateConnectionServerStatus::UpdateConnectionServerStatus(uint16 publicPort, uint16 privatePort) :
|
||||
GameNetworkMessage("UpdateConnectionServerStatus"),
|
||||
m_publicPort(publicPort),
|
||||
m_privatePort(privatePort)
|
||||
{
|
||||
addVariable(m_publicPort);
|
||||
addVariable(m_privatePort);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
UpdateConnectionServerStatus::UpdateConnectionServerStatus(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("UpdateConnectionServerStatus"),
|
||||
m_publicPort(0),
|
||||
m_privatePort(0)
|
||||
{
|
||||
addVariable(m_publicPort);
|
||||
addVariable(m_privatePort);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// UpdateConnectionServerStatus.h
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_UpdateConnectionServerStatus_H
|
||||
#define INCLUDED_UpdateConnectionServerStatus_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Sent from: Connection Server
|
||||
* Sent to: Central
|
||||
* Action: Reports the number of players connected to that ConnectionServer
|
||||
*/
|
||||
class UpdateConnectionServerStatus : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
UpdateConnectionServerStatus(uint16 publicPort, uint16 privatePort);
|
||||
UpdateConnectionServerStatus(Archive::ReadIterator & source);
|
||||
|
||||
public:
|
||||
uint16 getPublicPort() const;
|
||||
uint16 getPrivatePort() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<uint16> m_publicPort;
|
||||
Archive::AutoVariable<uint16> m_privatePort;
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
inline uint16 UpdateConnectionServerStatus::getPublicPort() const
|
||||
{
|
||||
return m_publicPort.get();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
inline uint16 UpdateConnectionServerStatus::getPrivatePort() const
|
||||
{
|
||||
return m_privatePort.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// UpdatePlayerCountMessage.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/UpdatePlayerCountMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
UpdatePlayerCountMessage::UpdatePlayerCountMessage(bool loadedRecently, int playerCount, int emptySceneCount, int freeTrialCount, int tutorialSceneCount, int falconSceneCount) :
|
||||
GameNetworkMessage("UpdatePlayerCountMessage"),
|
||||
m_loadedRecently(loadedRecently),
|
||||
m_playerCount(playerCount),
|
||||
m_freeTrialCount(freeTrialCount),
|
||||
m_emptySceneCount(emptySceneCount),
|
||||
m_tutorialSceneCount(tutorialSceneCount),
|
||||
m_falconSceneCount(falconSceneCount)
|
||||
{
|
||||
addVariable(m_loadedRecently);
|
||||
addVariable(m_playerCount);
|
||||
addVariable(m_freeTrialCount);
|
||||
addVariable(m_emptySceneCount);
|
||||
addVariable(m_tutorialSceneCount);
|
||||
addVariable(m_falconSceneCount);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
UpdatePlayerCountMessage::UpdatePlayerCountMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("UpdatePlayerCountMessage"),
|
||||
m_loadedRecently(false),
|
||||
m_playerCount(0),
|
||||
m_freeTrialCount(0),
|
||||
m_emptySceneCount(0),
|
||||
m_tutorialSceneCount(0),
|
||||
m_falconSceneCount(0)
|
||||
{
|
||||
addVariable(m_loadedRecently);
|
||||
addVariable(m_playerCount);
|
||||
addVariable(m_freeTrialCount);
|
||||
addVariable(m_emptySceneCount);
|
||||
addVariable(m_tutorialSceneCount);
|
||||
addVariable(m_falconSceneCount);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// UpdatePlayerCountMessage.h
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_UpdatePlayerCountMessage_H
|
||||
#define INCLUDED_UpdatePlayerCountMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "Unicode.h"
|
||||
#include "sharedFoundation/StationId.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Sent from: Connection Server
|
||||
* Sent to: Central
|
||||
* Action: Reports the number of players connected to that ConnectionServer
|
||||
*/
|
||||
class UpdatePlayerCountMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
UpdatePlayerCountMessage(bool loadedRecently, int playerCount, int freeTrialCount, int emptySceneCount, int tutorialSceneCount, int falconSceneCount);
|
||||
UpdatePlayerCountMessage(Archive::ReadIterator & source);
|
||||
|
||||
public:
|
||||
bool getLoadedRecently() const;
|
||||
int getCount() const;
|
||||
int getFreeTrialCount() const;
|
||||
int getEmptySceneCount() const;
|
||||
int getTutorialSceneCount() const;
|
||||
int getFalconSceneCount() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<bool> m_loadedRecently;
|
||||
Archive::AutoVariable<int> m_playerCount;
|
||||
Archive::AutoVariable<int> m_freeTrialCount;
|
||||
Archive::AutoVariable<int> m_emptySceneCount;
|
||||
Archive::AutoVariable<int> m_tutorialSceneCount;
|
||||
Archive::AutoVariable<int> m_falconSceneCount;
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
inline bool UpdatePlayerCountMessage::getLoadedRecently() const
|
||||
{
|
||||
return m_loadedRecently.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline int UpdatePlayerCountMessage::getCount() const
|
||||
{
|
||||
return m_playerCount.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline int UpdatePlayerCountMessage::getFreeTrialCount() const
|
||||
{
|
||||
return m_freeTrialCount.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline int UpdatePlayerCountMessage::getEmptySceneCount() const
|
||||
{
|
||||
return m_emptySceneCount.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline int UpdatePlayerCountMessage::getTutorialSceneCount() const
|
||||
{
|
||||
return m_tutorialSceneCount.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline int UpdatePlayerCountMessage::getFalconSceneCount() const
|
||||
{
|
||||
return m_falconSceneCount.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// ValidateCharacterForLoginMessage.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/ValidateCharacterForLoginMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
ValidateCharacterForLoginMessage::ValidateCharacterForLoginMessage(StationId suid, const NetworkId &characterId) :
|
||||
GameNetworkMessage("ValidateCharacterForLoginMessage"),
|
||||
m_suid(suid),
|
||||
m_characterId(characterId)
|
||||
{
|
||||
addVariable(m_suid);
|
||||
addVariable(m_characterId);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
ValidateCharacterForLoginMessage::ValidateCharacterForLoginMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ValidateCharacterForLoginMessage")
|
||||
{
|
||||
addVariable(m_suid);
|
||||
addVariable(m_characterId);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// ValidateCharacterForLoginMessage.h
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_ValidateCharacterForLoginMessage_H
|
||||
#define INCLUDED_ValidateCharacterForLoginMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedFoundation/StationId.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Sent from: Connection Server
|
||||
* Sent to: Central, which forwards to DatabaseProcess
|
||||
* Action: A player has requested to play a particular character.
|
||||
* Check whether the character is valid for that account, and if it is figure
|
||||
* out where it is located in the world.
|
||||
* Respond with ValidateCharacterForLoginReplyMessage
|
||||
*/
|
||||
class ValidateCharacterForLoginMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
ValidateCharacterForLoginMessage(StationId suid, const NetworkId &characterId);
|
||||
ValidateCharacterForLoginMessage(Archive::ReadIterator & source);
|
||||
|
||||
public:
|
||||
StationId getSuid() const;
|
||||
const NetworkId & getCharacterId() const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<StationId> m_suid;
|
||||
Archive::AutoVariable<NetworkId> m_characterId;
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
inline StationId ValidateCharacterForLoginMessage::getSuid() const
|
||||
{
|
||||
return m_suid.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId &ValidateCharacterForLoginMessage::getCharacterId() const
|
||||
{
|
||||
return m_characterId.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// ValidateCharacterForLoginReplyMessage.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/ValidateCharacterForLoginReplyMessage.h"
|
||||
|
||||
#include "sharedMathArchive/VectorArchive.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
ValidateCharacterForLoginReplyMessage::ValidateCharacterForLoginReplyMessage(bool approved, StationId suid, const NetworkId &characterId, const NetworkId &containerId, const std::string &scene, const Vector &coordinates, const Unicode::String &characterName) :
|
||||
GameNetworkMessage("ValidateCharacterForLoginReplyMessage"),
|
||||
m_approved(approved),
|
||||
m_suid(suid),
|
||||
m_characterId(characterId),
|
||||
m_containerId(containerId),
|
||||
m_scene(scene),
|
||||
m_coordinates(coordinates),
|
||||
m_characterName(characterName)
|
||||
{
|
||||
addVariable(m_approved);
|
||||
addVariable(m_suid);
|
||||
addVariable(m_characterId);
|
||||
addVariable(m_containerId);
|
||||
addVariable(m_scene);
|
||||
addVariable(m_coordinates);
|
||||
addVariable(m_characterName);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
ValidateCharacterForLoginReplyMessage::ValidateCharacterForLoginReplyMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ValidateCharacterForLoginMessage")
|
||||
{
|
||||
addVariable(m_approved);
|
||||
addVariable(m_suid);
|
||||
addVariable(m_characterId);
|
||||
addVariable(m_containerId);
|
||||
addVariable(m_scene);
|
||||
addVariable(m_coordinates);
|
||||
addVariable(m_characterName);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// ValidateCharacterForLoginReplyMessage.h
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_ValidateCharacterForLoginReplyMessage_H
|
||||
#define INCLUDED_ValidateCharacterForLoginReplyMessage_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "Unicode.h"
|
||||
#include "sharedFoundation/StationId.h"
|
||||
#include "sharedMathArchive/VectorArchive.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Sent from: DatabaseProcess
|
||||
* Sent to: Central, which forwards to the appropriate ConnectionServer
|
||||
* Action: Reply to ValidateCharacterForLoginMessage. Tells the Connection
|
||||
* Server whether the character is valid, and if so,
|
||||
* where it is located in the world.
|
||||
*/
|
||||
class ValidateCharacterForLoginReplyMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
ValidateCharacterForLoginReplyMessage(bool approved, StationId suid, const NetworkId &characterId, const NetworkId &containerId, const std::string &scene, const Vector &coordinates, const Unicode::String &characterName);
|
||||
ValidateCharacterForLoginReplyMessage(Archive::ReadIterator & source);
|
||||
|
||||
bool getApproved () const;
|
||||
StationId getSuid () const;
|
||||
const NetworkId & getCharacterId () const;
|
||||
const NetworkId & getContainerId () const;
|
||||
const std::string & getScene () const;
|
||||
const Vector & getCoordinates () const;
|
||||
const Unicode::String &getCharacterName () const;
|
||||
|
||||
private:
|
||||
Archive::AutoVariable<bool> m_approved;
|
||||
Archive::AutoVariable<StationId> m_suid;
|
||||
Archive::AutoVariable<NetworkId> m_characterId;
|
||||
Archive::AutoVariable<NetworkId> m_containerId;
|
||||
Archive::AutoVariable<std::string> m_scene;
|
||||
Archive::AutoVariable<Vector> m_coordinates;
|
||||
Archive::AutoVariable<Unicode::String> m_characterName;
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
inline bool ValidateCharacterForLoginReplyMessage::getApproved() const
|
||||
{
|
||||
return m_approved.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline StationId ValidateCharacterForLoginReplyMessage::getSuid() const
|
||||
{
|
||||
return m_suid.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & ValidateCharacterForLoginReplyMessage::getCharacterId() const
|
||||
{
|
||||
return m_characterId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & ValidateCharacterForLoginReplyMessage::getContainerId() const
|
||||
{
|
||||
return m_containerId.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & ValidateCharacterForLoginReplyMessage::getScene() const
|
||||
{
|
||||
return m_scene.get();
|
||||
}
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const Vector & ValidateCharacterForLoginReplyMessage::getCoordinates() const
|
||||
{
|
||||
return m_coordinates.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const Unicode::String &ValidateCharacterForLoginReplyMessage::getCharacterName () const
|
||||
{
|
||||
return m_characterName.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user