mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-10-06 21:13:12 -04:00
Added serverNetworkMessages library
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// AvatarList.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "AvatarList.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
// ======================================================================
|
||||
@@ -0,0 +1,36 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// AvatarList.h
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_AvatarList_H
|
||||
#define INCLUDED_AvatarList_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "Unicode.h"
|
||||
#include "sharedFoundation/NetworkId.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Data structures for passing around the list of avatars for an account.
|
||||
*/
|
||||
struct AvatarRecord
|
||||
{
|
||||
Unicode::String m_name;
|
||||
int m_objectTemplateId;
|
||||
NetworkId m_networkId;
|
||||
uint32 m_clusterId;
|
||||
int m_characterType;
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
typedef stdvector<AvatarRecord>::fwd AvatarList;
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,35 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// AvatarList.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "Archive/Archive.h"
|
||||
#include "serverNetworkMessages/AvatarList.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
namespace Archive
|
||||
{
|
||||
void get (ReadIterator & source, AvatarRecord & target)
|
||||
{
|
||||
get(source, target.m_name);
|
||||
get(source, target.m_objectTemplateId);
|
||||
get(source, target.m_networkId);
|
||||
get(source, target.m_clusterId);
|
||||
get(source, target.m_characterType);
|
||||
}
|
||||
|
||||
void put (ByteStream & target, const AvatarRecord & source)
|
||||
{
|
||||
put(target, source.m_name);
|
||||
put(target, source.m_objectTemplateId);
|
||||
put(target, source.m_networkId);
|
||||
put(target, source.m_clusterId);
|
||||
put(target, source.m_characterType);
|
||||
}
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
@@ -0,0 +1,31 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// AvatarList.h
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_AvatarListArchive_H
|
||||
#define INCLUDED_AvatarListArchive_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/AvatarList.h"
|
||||
#include "sharedFoundation/NetworkId.h"
|
||||
namespace Archive
|
||||
{
|
||||
class ByteStream;
|
||||
class ReadIterator;
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
namespace Archive
|
||||
{
|
||||
void get (ReadIterator & source, AvatarRecord & target);
|
||||
void put (ByteStream & target, const AvatarRecord & source);
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,51 @@
|
||||
// ChatConnectAvatar.cpp
|
||||
// Copyright 2000-02, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "ChatConnectAvatar.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ChatConnectAvatar::ChatConnectAvatar(const std::string & n, const NetworkId & i, const unsigned int s, bool secure, bool subscribed) :
|
||||
GameNetworkMessage("ChatConnectAvatar"),
|
||||
characterId(i),
|
||||
characterName(n),
|
||||
stationId(s),
|
||||
isSecure(secure),
|
||||
isSubscribed(subscribed)
|
||||
{
|
||||
addVariable(characterId);
|
||||
addVariable(characterName);
|
||||
addVariable(stationId);
|
||||
addVariable(isSecure);
|
||||
addVariable(isSubscribed);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ChatConnectAvatar::ChatConnectAvatar(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ChatConnectAvatar"),
|
||||
characterId(),
|
||||
characterName(),
|
||||
stationId(),
|
||||
isSecure(false),
|
||||
isSubscribed(false)
|
||||
{
|
||||
addVariable(characterId);
|
||||
addVariable(characterName);
|
||||
addVariable(stationId);
|
||||
addVariable(isSecure);
|
||||
addVariable(isSubscribed);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ChatConnectAvatar::~ChatConnectAvatar()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
@@ -0,0 +1,77 @@
|
||||
// ChatConnectAvatar.h
|
||||
// Copyright 2000-02, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
#ifndef _INCLUDED_ChatConnectAvatar_H
|
||||
#define _INCLUDED_ChatConnectAvatar_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
#include "sharedFoundation/NetworkId.h"
|
||||
#include <string>
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class ChatConnectAvatar : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
ChatConnectAvatar(const std::string & characterName, const NetworkId & characterId, const unsigned int stationId, bool isSecure, bool isSubscribed);
|
||||
explicit ChatConnectAvatar(Archive::ReadIterator & source);
|
||||
~ChatConnectAvatar();
|
||||
|
||||
const NetworkId & getCharacterId () const;
|
||||
const std::string & getCharacterName () const;
|
||||
const bool getIsSecure () const;
|
||||
const bool getIsSubscribed () const;
|
||||
const unsigned int getStationId () const;
|
||||
|
||||
private:
|
||||
ChatConnectAvatar & operator = (const ChatConnectAvatar & rhs);
|
||||
ChatConnectAvatar(const ChatConnectAvatar & source);
|
||||
|
||||
Archive::AutoVariable<NetworkId> characterId;
|
||||
Archive::AutoVariable<std::string> characterName;
|
||||
Archive::AutoVariable<unsigned int> stationId;
|
||||
Archive::AutoVariable<bool> isSecure;
|
||||
Archive::AutoVariable<bool> isSubscribed;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & ChatConnectAvatar::getCharacterId() const
|
||||
{
|
||||
return characterId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & ChatConnectAvatar::getCharacterName() const
|
||||
{
|
||||
return characterName.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const bool ChatConnectAvatar::getIsSecure() const
|
||||
{
|
||||
return isSecure.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const bool ChatConnectAvatar::getIsSubscribed() const
|
||||
{
|
||||
return isSubscribed.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const unsigned int ChatConnectAvatar::getStationId() const
|
||||
{
|
||||
return stationId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#endif // _INCLUDED_ChatConnectAvatar_H
|
||||
@@ -0,0 +1,36 @@
|
||||
// ChatDisconnectAvatar.cpp
|
||||
// Copyright 2000-02, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "ChatDisconnectAvatar.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ChatDisconnectAvatar::ChatDisconnectAvatar(const NetworkId & i) :
|
||||
GameNetworkMessage("ChatDisconnectAvatar"),
|
||||
characterId(i)
|
||||
{
|
||||
addVariable(characterId);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ChatDisconnectAvatar::ChatDisconnectAvatar(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ChatDisconnectAvatar"),
|
||||
characterId()
|
||||
{
|
||||
addVariable(characterId);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ChatDisconnectAvatar::~ChatDisconnectAvatar()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
// ChatDisconnectAvatar.h
|
||||
// Copyright 2000-02, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
#ifndef _INCLUDED_ChatDisconnectAvatar_H
|
||||
#define _INCLUDED_ChatDisconnectAvatar_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class ChatDisconnectAvatar : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
explicit ChatDisconnectAvatar(const NetworkId & characterId);
|
||||
explicit ChatDisconnectAvatar(Archive::ReadIterator & source);
|
||||
~ChatDisconnectAvatar();
|
||||
|
||||
const NetworkId & getCharacterId () const;
|
||||
|
||||
private:
|
||||
ChatDisconnectAvatar & operator = (const ChatDisconnectAvatar & rhs);
|
||||
ChatDisconnectAvatar(const ChatDisconnectAvatar & source);
|
||||
|
||||
Archive::AutoVariable<NetworkId> characterId;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & ChatDisconnectAvatar::getCharacterId() const
|
||||
{
|
||||
return characterId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#endif // _INCLUDED_ChatDisconnectAvatar_H
|
||||
@@ -0,0 +1,40 @@
|
||||
// ChatServerOnline.cpp
|
||||
// Copyright 2000-02, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/ChatServerOnline.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ChatServerOnline::ChatServerOnline(const std::string & a, const unsigned short p) :
|
||||
GameNetworkMessage("ChatServerOnline"),
|
||||
address(a),
|
||||
port(p)
|
||||
{
|
||||
addVariable(address);
|
||||
addVariable(port);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ChatServerOnline::ChatServerOnline(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("ChatServerOnline"),
|
||||
address(),
|
||||
port()
|
||||
{
|
||||
addVariable(address);
|
||||
addVariable(port);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
ChatServerOnline::~ChatServerOnline()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
// ChatServerOnline.h
|
||||
// Copyright 2000-02, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
#ifndef _INCLUDED_ChatServerOnline_H
|
||||
#define _INCLUDED_ChatServerOnline_H
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class ChatServerOnline : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
ChatServerOnline(const std::string & address, const unsigned short port);
|
||||
ChatServerOnline(Archive::ReadIterator & source);
|
||||
~ChatServerOnline();
|
||||
|
||||
const std::string & getAddress () const;
|
||||
const unsigned short getPort () const;
|
||||
|
||||
private:
|
||||
ChatServerOnline & operator = (const ChatServerOnline & rhs);
|
||||
ChatServerOnline(const ChatServerOnline & source);
|
||||
|
||||
Archive::AutoVariable<std::string> address;
|
||||
Archive::AutoVariable<unsigned short> port;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & ChatServerOnline::getAddress() const
|
||||
{
|
||||
return address.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const unsigned short ChatServerOnline::getPort() const
|
||||
{
|
||||
return port.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#endif // _INCLUDED_ChatServerOnline_H
|
||||
@@ -0,0 +1,48 @@
|
||||
// EnumerateServers.cpp
|
||||
// Copyright 2000-02, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "EnumerateServers.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
EnumerateServers::EnumerateServers(const bool a, const std::string addr, const unsigned short p, const int t) :
|
||||
GameNetworkMessage("EnumerateServers"),
|
||||
add(a),
|
||||
address(addr),
|
||||
port(p),
|
||||
serverType(t)
|
||||
{
|
||||
addVariable(add);
|
||||
addVariable(address);
|
||||
addVariable(port);
|
||||
addVariable(serverType);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
EnumerateServers::EnumerateServers(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("EnumerateServers"),
|
||||
add(),
|
||||
address(),
|
||||
port(),
|
||||
serverType()
|
||||
{
|
||||
addVariable(add);
|
||||
addVariable(address);
|
||||
addVariable(port);
|
||||
addVariable(serverType);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
EnumerateServers::~EnumerateServers()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
// EnumerateServers.h
|
||||
// Copyright 2000-02, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
#ifndef _INCLUDED_EnumerateServers_H
|
||||
#define _INCLUDED_EnumerateServers_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class EnumerateServers : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
enum ServerTypes
|
||||
{
|
||||
CONNECTION_SERVER,
|
||||
GAME_SERVER,
|
||||
PLANET_SERVER
|
||||
};
|
||||
|
||||
EnumerateServers(const bool add, const std::string address, const unsigned short port, const int serverType);
|
||||
explicit EnumerateServers(Archive::ReadIterator & source);
|
||||
~EnumerateServers();
|
||||
|
||||
const bool getAdd () const;
|
||||
const std::string & getAddress () const;
|
||||
const unsigned short getPort () const;
|
||||
const int getServerType () const;
|
||||
|
||||
private:
|
||||
EnumerateServers & operator = (const EnumerateServers & rhs);
|
||||
EnumerateServers(const EnumerateServers & source);
|
||||
|
||||
Archive::AutoVariable<bool> add;
|
||||
Archive::AutoVariable<std::string> address;
|
||||
Archive::AutoVariable<unsigned short> port;
|
||||
Archive::AutoVariable<int> serverType;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const bool EnumerateServers::getAdd() const
|
||||
{
|
||||
return add.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & EnumerateServers::getAddress() const
|
||||
{
|
||||
return address.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const unsigned short EnumerateServers::getPort() const
|
||||
{
|
||||
return port.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const int EnumerateServers::getServerType() const
|
||||
{
|
||||
return serverType.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#endif // _INCLUDED_EnumerateServers_H
|
||||
@@ -0,0 +1,82 @@
|
||||
//------------------------------------------
|
||||
// CentralConnectionServerMessages.cpp
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/RandomName.h"
|
||||
|
||||
//====================================================================
|
||||
|
||||
RandomNameRequest::RandomNameRequest(uint32 stationId, const std::string & creatureTemplate) :
|
||||
GameNetworkMessage("RandomNameRequest"),
|
||||
m_stationId(stationId),
|
||||
m_creatureTemplate(creatureTemplate)
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_creatureTemplate);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RandomNameRequest::RandomNameRequest(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("RandomNameRequest"),
|
||||
m_stationId(),
|
||||
m_creatureTemplate()
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_creatureTemplate);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RandomNameRequest::~RandomNameRequest()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RandomNameResponse::RandomNameResponse(uint32 stationId, const std::string & creatureTemplate, const Unicode::String &name, const StringId &errorMessage) :
|
||||
GameNetworkMessage("RandomNameResponse"),
|
||||
m_stationId(stationId),
|
||||
m_creatureTemplate(creatureTemplate),
|
||||
m_name(name),
|
||||
m_errorMessage(errorMessage)
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_creatureTemplate);
|
||||
addVariable(m_name);
|
||||
addVariable(m_errorMessage);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RandomNameResponse::RandomNameResponse(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("RandomNameResponse"),
|
||||
m_stationId(),
|
||||
m_creatureTemplate(),
|
||||
m_name(),
|
||||
m_errorMessage()
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_creatureTemplate);
|
||||
addVariable(m_name);
|
||||
addVariable(m_errorMessage);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
RandomNameResponse::~RandomNameResponse()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
// RandomName.h
|
||||
// copyright 2001 Verant Interactive
|
||||
|
||||
#ifndef _INCLUDED_RandomName_H
|
||||
#define _INCLUDED_RandomName_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class RandomNameRequest: public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
explicit RandomNameRequest(uint32 stationId, const std::string &creatureTemplate);
|
||||
explicit RandomNameRequest(Archive::ReadIterator & source);
|
||||
~RandomNameRequest();
|
||||
|
||||
const uint32 getStationId() const;
|
||||
const std::string &getCreatureTemplate() const;
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_stationId;
|
||||
Archive::AutoVariable<std::string> m_creatureTemplate;
|
||||
|
||||
RandomNameRequest(const RandomNameRequest & source);
|
||||
RandomNameRequest & operator = (const RandomNameRequest & other);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const uint32 RandomNameRequest::getStationId() const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const std::string &RandomNameRequest::getCreatureTemplate() const
|
||||
{
|
||||
return m_creatureTemplate.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class RandomNameResponse: public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
explicit RandomNameResponse(uint32 stationId, const std::string &creatureTemplate, const Unicode::String &name, const StringId &errorMessage);
|
||||
explicit RandomNameResponse(Archive::ReadIterator & source);
|
||||
~RandomNameResponse();
|
||||
|
||||
const uint32 getStationId() const;
|
||||
const std::string &getCreatureTemplate() const;
|
||||
const Unicode::String &getName() const;
|
||||
const StringId &getErrorMessage() const;
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_stationId;
|
||||
Archive::AutoVariable<std::string> m_creatureTemplate;
|
||||
Archive::AutoVariable<Unicode::String> m_name;
|
||||
Archive::AutoVariable<StringId> m_errorMessage;
|
||||
|
||||
RandomNameResponse(const RandomNameRequest & source);
|
||||
RandomNameResponse & operator = (const RandomNameRequest & other);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const std::string &RandomNameResponse::getCreatureTemplate() const
|
||||
{
|
||||
return m_creatureTemplate.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const uint32 RandomNameResponse::getStationId() const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const Unicode::String &RandomNameResponse::getName() const
|
||||
{
|
||||
return m_name.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const StringId &RandomNameResponse::getErrorMessage() const
|
||||
{
|
||||
return m_errorMessage.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// TaskConnectionIdMessage.cpp
|
||||
// Copyright 2000-01, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "TaskConnectionIdMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskConnectionIdMessage::TaskConnectionIdMessage(enum Id id, const std::string & pCommandLine, const std::string & pClusterName) :
|
||||
GameNetworkMessage("TaskConnectionIdMessage"),
|
||||
serverType(static_cast<unsigned char>(id)),
|
||||
commandLine(pCommandLine),
|
||||
clusterName(pClusterName),
|
||||
currentEpochTime(static_cast<long>(::time(NULL)))
|
||||
{
|
||||
addVariable(serverType);
|
||||
addVariable(commandLine);
|
||||
addVariable(clusterName);
|
||||
addVariable(currentEpochTime);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskConnectionIdMessage::TaskConnectionIdMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("TaskConnectionIdMessage"),
|
||||
serverType(0),
|
||||
commandLine(),
|
||||
clusterName(),
|
||||
currentEpochTime(0)
|
||||
{
|
||||
addVariable(serverType);
|
||||
addVariable(commandLine);
|
||||
addVariable(clusterName);
|
||||
addVariable(currentEpochTime);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskConnectionIdMessage::~TaskConnectionIdMessage()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskConnectionIdMessage & TaskConnectionIdMessage::operator = (const TaskConnectionIdMessage & rhs)
|
||||
{
|
||||
if(this != &rhs)
|
||||
{
|
||||
// make assignments if right hand side is not this instance
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
@@ -0,0 +1,78 @@
|
||||
// TaskConnectionIdMessage.h
|
||||
// Copyright 2000-01, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
#ifndef _INCLUDED_TaskConnectionIdMessage_H
|
||||
#define _INCLUDED_TaskConnectionIdMessage_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class TaskConnectionIdMessage : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
enum Id
|
||||
{
|
||||
Login,
|
||||
Central,
|
||||
Connection,
|
||||
Database,
|
||||
Metrics,
|
||||
Planet,
|
||||
Game,
|
||||
ServerManager,
|
||||
TaskManager
|
||||
};
|
||||
public:
|
||||
TaskConnectionIdMessage(enum Id id, const std::string & pCommandLine, const std::string & pClusterName);
|
||||
TaskConnectionIdMessage(Archive::ReadIterator & source);
|
||||
~TaskConnectionIdMessage();
|
||||
|
||||
const unsigned char getServerType () const;
|
||||
const std::string & getCommandLine () const;
|
||||
const std::string & getClusterName () const;
|
||||
const long getCurrentEpochTime() const;
|
||||
private:
|
||||
TaskConnectionIdMessage & operator = (const TaskConnectionIdMessage & rhs);
|
||||
TaskConnectionIdMessage(const TaskConnectionIdMessage & source);
|
||||
|
||||
Archive::AutoVariable<unsigned char> serverType;
|
||||
Archive::AutoVariable<std::string> commandLine;
|
||||
Archive::AutoVariable<std::string> clusterName;
|
||||
Archive::AutoVariable<long> currentEpochTime;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & TaskConnectionIdMessage::getCommandLine() const
|
||||
{
|
||||
return commandLine.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & TaskConnectionIdMessage::getClusterName() const
|
||||
{
|
||||
return clusterName.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const unsigned char TaskConnectionIdMessage::getServerType() const
|
||||
{
|
||||
return serverType.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const long TaskConnectionIdMessage::getCurrentEpochTime() const
|
||||
{
|
||||
return currentEpochTime.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#endif // _INCLUDED_TaskConnectionIdMessage_H
|
||||
@@ -0,0 +1,37 @@
|
||||
// TaskEnumCluster.cpp
|
||||
// Copyright 2000-01, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "TaskEnumCluster.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskEnumCluster::TaskEnumCluster(const std::vector<std::string> & n) :
|
||||
GameNetworkMessage("TaskEnumCluster"),
|
||||
clusterNames()
|
||||
{
|
||||
clusterNames.set(n);
|
||||
addVariable(clusterNames);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskEnumCluster::TaskEnumCluster(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("TaskEnumCluster"),
|
||||
clusterNames()
|
||||
{
|
||||
addVariable(clusterNames);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskEnumCluster::~TaskEnumCluster()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
// TaskEnumCluster.h
|
||||
// Copyright 2000-01, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
#ifndef _INCLUDED_TaskEnumCluster_H
|
||||
#define _INCLUDED_TaskEnumCluster_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class TaskEnumCluster : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
explicit TaskEnumCluster(const std::vector<std::string> & clusterNames);
|
||||
explicit TaskEnumCluster(Archive::ReadIterator & s);
|
||||
~TaskEnumCluster();
|
||||
|
||||
const std::vector<std::string> & getClusterNames() const;
|
||||
|
||||
private:
|
||||
TaskEnumCluster & operator = (const TaskEnumCluster & rhs);
|
||||
TaskEnumCluster(const TaskEnumCluster & source);
|
||||
|
||||
private:
|
||||
Archive::AutoArray<std::string> clusterNames;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::vector<std::string> & TaskEnumCluster::getClusterNames() const
|
||||
{
|
||||
return clusterNames.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#endif // _INCLUDED_TaskEnumCluster_H
|
||||
@@ -0,0 +1,50 @@
|
||||
// TaskEnumProcesses.cpp
|
||||
// Copyright 2000-01, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "TaskEnumProcesses.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskEnumProcesses::TaskEnumProcesses(const std::string & h, const std::vector<std::string> & c, const std::vector<uint32> & p, const std::vector<bool> & l) :
|
||||
GameNetworkMessage("TaskEnumProcesses"),
|
||||
commandLines(),
|
||||
hostAddress(h),
|
||||
loadedOnStartup(),
|
||||
pids()
|
||||
{
|
||||
commandLines.set(c);
|
||||
loadedOnStartup.set(l);
|
||||
pids.set(p);
|
||||
addVariable(hostAddress);
|
||||
addVariable(commandLines);
|
||||
addVariable(loadedOnStartup);
|
||||
addVariable(pids);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskEnumProcesses::TaskEnumProcesses(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("TaskEnumProcesses"),
|
||||
commandLines(),
|
||||
hostAddress(),
|
||||
pids()
|
||||
{
|
||||
addVariable(hostAddress);
|
||||
addVariable(commandLines);
|
||||
addVariable(loadedOnStartup);
|
||||
addVariable(pids);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskEnumProcesses::~TaskEnumProcesses()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
// TaskEnumProcesses.h
|
||||
// Copyright 2000-01, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
#ifndef _INCLUDED_TaskEnumProcesses_H
|
||||
#define _INCLUDED_TaskEnumProcesses_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
#include "sharedNetworkMessages/NetworkMessageFactory.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class TaskEnumProcesses : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
TaskEnumProcesses(const std::string & hostAddress, const std::vector<std::string> & commandLines, const std::vector<uint32> & pids, const std::vector<bool> & loadedOnStartup);
|
||||
TaskEnumProcesses(Archive::ReadIterator & source);
|
||||
~TaskEnumProcesses();
|
||||
|
||||
const std::vector<std::string> & getCommandLines () const;
|
||||
const std::string & getHostAddress () const;
|
||||
const std::vector<bool> & getLoadedOnStartup () const;
|
||||
const std::vector<uint32> & getPids () const;
|
||||
|
||||
private:
|
||||
TaskEnumProcesses & operator = (const TaskEnumProcesses & rhs);
|
||||
TaskEnumProcesses(const TaskEnumProcesses & source);
|
||||
|
||||
private:
|
||||
Archive::AutoArray<std::string> commandLines;
|
||||
Archive::AutoVariable<std::string> hostAddress;
|
||||
Archive::AutoArray<bool> loadedOnStartup;
|
||||
Archive::AutoArray<uint32> pids;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::vector<std::string> & TaskEnumProcesses::getCommandLines() const
|
||||
{
|
||||
return commandLines.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & TaskEnumProcesses::getHostAddress() const
|
||||
{
|
||||
return hostAddress.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::vector<bool> & TaskEnumProcesses::getLoadedOnStartup() const
|
||||
{
|
||||
return loadedOnStartup.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::vector<uint32> & TaskEnumProcesses::getPids() const
|
||||
{
|
||||
return pids.get();
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#endif // _INCLUDED_TaskEnumProcesses_H
|
||||
@@ -0,0 +1,44 @@
|
||||
// TaskKillProcess.cpp
|
||||
// Copyright 2000-01, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "TaskKillProcess.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskKillProcess::TaskKillProcess(const std::string & h, const unsigned int p, bool f) :
|
||||
GameNetworkMessage("TaskKillProcess"),
|
||||
m_hostName(h),
|
||||
m_pid(p),
|
||||
m_forceCore(f)
|
||||
{
|
||||
addVariable(m_hostName);
|
||||
addVariable(m_pid);
|
||||
addVariable(m_forceCore);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskKillProcess::TaskKillProcess(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("TaskKillProcess"),
|
||||
m_hostName(),
|
||||
m_pid(),
|
||||
m_forceCore()
|
||||
{
|
||||
addVariable(m_hostName);
|
||||
addVariable(m_pid);
|
||||
addVariable(m_forceCore);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskKillProcess::~TaskKillProcess()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
// TaskKillProcess.h
|
||||
// Copyright 2000-01, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
#ifndef _INCLUDED_TaskKillProcess_H
|
||||
#define _INCLUDED_TaskKillProcess_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
#include "sharedNetworkMessages/NetworkMessageFactory.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class TaskKillProcess : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
TaskKillProcess(const std::string & hostName, const unsigned int pid, bool forceCore);
|
||||
TaskKillProcess(Archive::ReadIterator & source);
|
||||
~TaskKillProcess();
|
||||
|
||||
const std::string & getHostName () const;
|
||||
const unsigned int getPid () const;
|
||||
const bool getForceCore () const;
|
||||
|
||||
private:
|
||||
TaskKillProcess & operator = (const TaskKillProcess & rhs);
|
||||
TaskKillProcess(const TaskKillProcess & source);
|
||||
|
||||
Archive::AutoVariable<std::string> m_hostName;
|
||||
Archive::AutoVariable<unsigned int> m_pid;
|
||||
Archive::AutoVariable<bool> m_forceCore;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & TaskKillProcess::getHostName() const
|
||||
{
|
||||
return m_hostName.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const unsigned int TaskKillProcess::getPid() const
|
||||
{
|
||||
return m_pid.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const bool TaskKillProcess::getForceCore() const
|
||||
{
|
||||
return m_forceCore.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#endif // _INCLUDED_TaskKillProcess_H
|
||||
@@ -0,0 +1,73 @@
|
||||
// TaskSpawnProcess.cpp
|
||||
// Copyright 2000-01, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "TaskSpawnProcess.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
namespace TaskSpawnProcessNamespace
|
||||
{
|
||||
int s_transactionId = 0;
|
||||
}
|
||||
using namespace TaskSpawnProcessNamespace;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskSpawnProcess::TaskSpawnProcess(const std::string & h, const std::string & p, const std::string & o, const unsigned int d/* = 0*/) :
|
||||
GameNetworkMessage("TaskSpawnProcess"),
|
||||
options(o),
|
||||
processName(p),
|
||||
targetHostAddress(h),
|
||||
transactionId(++s_transactionId),
|
||||
spawnDelay(d)
|
||||
{
|
||||
addVariable(options);
|
||||
addVariable(processName);
|
||||
addVariable(targetHostAddress);
|
||||
addVariable(transactionId);
|
||||
addVariable(spawnDelay);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskSpawnProcess::TaskSpawnProcess(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("TaskSpawnProcess"),
|
||||
options(),
|
||||
processName(),
|
||||
targetHostAddress(),
|
||||
transactionId(),
|
||||
spawnDelay(0)
|
||||
{
|
||||
addVariable(options);
|
||||
addVariable(processName);
|
||||
addVariable(targetHostAddress);
|
||||
addVariable(transactionId);
|
||||
addVariable(spawnDelay);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskSpawnProcess::~TaskSpawnProcess()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
int TaskSpawnProcess::getTransactionId() const
|
||||
{
|
||||
return transactionId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
unsigned int TaskSpawnProcess::getSpawnDelay() const
|
||||
{
|
||||
return spawnDelay.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
@@ -0,0 +1,61 @@
|
||||
// TaskSpawnProcess.h
|
||||
// Copyright 2000-01, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
#ifndef _INCLUDED_TaskSpawnProcess_H
|
||||
#define _INCLUDED_TaskSpawnProcess_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class TaskSpawnProcess : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
TaskSpawnProcess(const std::string & targetHostAddress, const std::string & processName, const std::string & options, unsigned int spawnDelay = 0);
|
||||
TaskSpawnProcess(Archive::ReadIterator & r);
|
||||
~TaskSpawnProcess();
|
||||
|
||||
const std::string & getOptions () const;
|
||||
const std::string & getProcessName () const;
|
||||
const std::string & getTargetHostAddress () const;
|
||||
int getTransactionId () const;
|
||||
unsigned int getSpawnDelay () const;
|
||||
|
||||
private:
|
||||
TaskSpawnProcess & operator = (const TaskSpawnProcess & rhs);
|
||||
TaskSpawnProcess(const TaskSpawnProcess & source);
|
||||
|
||||
Archive::AutoVariable<std::string> options;
|
||||
Archive::AutoVariable<std::string> processName;
|
||||
Archive::AutoVariable<std::string> targetHostAddress;
|
||||
Archive::AutoVariable<int> transactionId;
|
||||
Archive::AutoVariable<unsigned int> spawnDelay; // seconds
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & TaskSpawnProcess::getOptions() const
|
||||
{
|
||||
return options.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & TaskSpawnProcess::getProcessName() const
|
||||
{
|
||||
return processName.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & TaskSpawnProcess::getTargetHostAddress() const
|
||||
{
|
||||
return targetHostAddress.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#endif // _INCLUDED_TaskSpawnProcess_H
|
||||
@@ -0,0 +1,43 @@
|
||||
// TaskSpawnProcessAck.cpp
|
||||
// Copyright 2000-04, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "TaskSpawnProcessAck.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskSpawnProcessAck::TaskSpawnProcessAck(const int transactionId) :
|
||||
GameNetworkMessage("TaskSpawnProcessAck"),
|
||||
m_transactionId(transactionId)
|
||||
{
|
||||
addVariable(m_transactionId);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskSpawnProcessAck::TaskSpawnProcessAck(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("TaskSpawnProcessAck"),
|
||||
m_transactionId()
|
||||
{
|
||||
addVariable(m_transactionId);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskSpawnProcessAck::~TaskSpawnProcessAck()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
int TaskSpawnProcessAck::getTransactionId() const
|
||||
{
|
||||
return m_transactionId.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
// TaskSpawnProcessAck.h
|
||||
// Copyright 2000-04, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
#ifndef _INCLUDED_TaskSpawnProcessAck_H
|
||||
#define _INCLUDED_TaskSpawnProcessAck_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class TaskSpawnProcessAck : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
TaskSpawnProcessAck(int transactionId);
|
||||
TaskSpawnProcessAck(Archive::ReadIterator & r);
|
||||
~TaskSpawnProcessAck();
|
||||
|
||||
int getTransactionId () const;
|
||||
|
||||
private:
|
||||
TaskSpawnProcessAck & operator = (const TaskSpawnProcessAck & rhs);
|
||||
TaskSpawnProcessAck(const TaskSpawnProcessAck & source);
|
||||
|
||||
Archive::AutoVariable<int> m_transactionId;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#endif // _INCLUDED_TaskSpawnProcessAck_H
|
||||
@@ -0,0 +1,51 @@
|
||||
// TaskUtilization.cpp
|
||||
// Copyright 2000-01, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "TaskUtilization.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskUtilization::TaskUtilization(const unsigned char t, const float a) :
|
||||
GameNetworkMessage("TaskUtilization"),
|
||||
utilType(t),
|
||||
utilAmount(a)
|
||||
{
|
||||
addVariable(utilType);
|
||||
addVariable(utilAmount);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskUtilization::TaskUtilization(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("TaskUtilization"),
|
||||
utilType(0),
|
||||
utilAmount(0)
|
||||
{
|
||||
addVariable(utilType);
|
||||
addVariable(utilAmount);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskUtilization::~TaskUtilization()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskUtilization & TaskUtilization::operator = (const TaskUtilization & rhs)
|
||||
{
|
||||
if(this != &rhs)
|
||||
{
|
||||
// make assignments if right hand side is not this instance
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// TaskUtilization.h
|
||||
// Copyright 2000-01, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
#ifndef _INCLUDED_TaskUtilization_H
|
||||
#define _INCLUDED_TaskUtilization_H
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class TaskUtilization : public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
enum UtilTypes
|
||||
{
|
||||
SYSTEM_CPU,
|
||||
SYSTEM_MEMORY,
|
||||
SYSTEM_NETWORK_IO,
|
||||
SYSTEM_AVG,
|
||||
PROCESS_CPU,
|
||||
PROCESS_MEMORY,
|
||||
PROCESS_NETWORK_IO
|
||||
};
|
||||
|
||||
TaskUtilization(const unsigned char utilType, const float utilAmount);
|
||||
TaskUtilization(Archive::ReadIterator & source);
|
||||
~TaskUtilization();
|
||||
|
||||
const unsigned char getUtilType() const;
|
||||
const float getUtilAmount() const;
|
||||
|
||||
private:
|
||||
TaskUtilization & operator = (const TaskUtilization & rhs);
|
||||
TaskUtilization(const TaskUtilization & source);
|
||||
|
||||
Archive::AutoVariable<unsigned char> utilType;
|
||||
Archive::AutoVariable<float> utilAmount;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const unsigned char TaskUtilization::getUtilType() const
|
||||
{
|
||||
return utilType.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const float TaskUtilization::getUtilAmount() const
|
||||
{
|
||||
return utilAmount.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#endif // _INCLUDED_TaskUtilization_H
|
||||
@@ -0,0 +1,94 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// FileManifest.h
|
||||
// Copyright 2005 Sony Online Entertainment
|
||||
// All Rights Reserved.
|
||||
// Author: Vijay Thakkar
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "serverNetworkMessages/VerifyAndLockName.h"
|
||||
|
||||
//====================================================================
|
||||
|
||||
VerifyAndLockNameRequest::VerifyAndLockNameRequest(uint32 stationId, const NetworkId & characterId, const std::string& templateName, const Unicode::String& characterName, uint32 gameFeatures) :
|
||||
GameNetworkMessage("VerifyAndLockNameRequest"),
|
||||
m_stationId(stationId),
|
||||
m_characterId(characterId),
|
||||
m_templateName(templateName),
|
||||
m_characterName(characterName),
|
||||
m_gameFeatures(gameFeatures)
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_characterId);
|
||||
addVariable(m_templateName);
|
||||
addVariable(m_characterName);
|
||||
addVariable(m_gameFeatures);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
VerifyAndLockNameRequest::VerifyAndLockNameRequest(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("VerifyAndLockNameRequest"),
|
||||
m_stationId(),
|
||||
m_characterId(),
|
||||
m_templateName(),
|
||||
m_characterName(),
|
||||
m_gameFeatures()
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_characterId);
|
||||
addVariable(m_templateName);
|
||||
addVariable(m_characterName);
|
||||
addVariable(m_gameFeatures);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
VerifyAndLockNameRequest::~VerifyAndLockNameRequest()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
VerifyAndLockNameResponse::VerifyAndLockNameResponse(uint32 stationId, const Unicode::String& characterName, const StringId &errorMessage) :
|
||||
GameNetworkMessage("VerifyAndLockNameResponse"),
|
||||
m_stationId(stationId),
|
||||
m_characterName(characterName),
|
||||
m_errorMessage(errorMessage)
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_characterName);
|
||||
addVariable(m_errorMessage);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
VerifyAndLockNameResponse::VerifyAndLockNameResponse(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("VerifyAndLockNameResponse"),
|
||||
m_stationId(),
|
||||
m_characterName(),
|
||||
m_errorMessage()
|
||||
{
|
||||
addVariable(m_stationId);
|
||||
addVariable(m_characterName);
|
||||
addVariable(m_errorMessage);
|
||||
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
VerifyAndLockNameResponse::~VerifyAndLockNameResponse()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// FileManifest.h
|
||||
// Copyright 2005 Sony Online Entertainment
|
||||
// All Rights Reserved.
|
||||
// Author: Vijay Thakkar
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef _INCLUDED_VerifyAnyLockName_H
|
||||
#define _INCLUDED_VerifyAnyLockName_H
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "StringId.h"
|
||||
#include "Unicode.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class VerifyAndLockNameRequest: public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
explicit VerifyAndLockNameRequest(uint32 stationId, const NetworkId & characterId, const std::string& templateName, const Unicode::String& characterName, uint32 gameFeatures);
|
||||
explicit VerifyAndLockNameRequest(Archive::ReadIterator & source);
|
||||
~VerifyAndLockNameRequest();
|
||||
|
||||
const uint32 getStationId() const;
|
||||
const NetworkId & getCharacterId() const;
|
||||
const std::string& getTemplateName() const;
|
||||
const Unicode::String& getCharacterName() const;
|
||||
const uint32 getGameFeatures() const;
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_stationId;
|
||||
Archive::AutoVariable<NetworkId> m_characterId;
|
||||
Archive::AutoVariable<std::string> m_templateName;
|
||||
Archive::AutoVariable<Unicode::String> m_characterName;
|
||||
Archive::AutoVariable<uint32> m_gameFeatures;
|
||||
|
||||
VerifyAndLockNameRequest(const VerifyAndLockNameRequest & source);
|
||||
VerifyAndLockNameRequest & operator = (const VerifyAndLockNameRequest & other);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const uint32 VerifyAndLockNameRequest::getStationId() const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & VerifyAndLockNameRequest::getCharacterId() const
|
||||
{
|
||||
return m_characterId.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const std::string& VerifyAndLockNameRequest::getTemplateName() const
|
||||
{
|
||||
return m_templateName.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const Unicode::String& VerifyAndLockNameRequest::getCharacterName() const
|
||||
{
|
||||
return m_characterName.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline const uint32 VerifyAndLockNameRequest::getGameFeatures() const
|
||||
{
|
||||
return m_gameFeatures.get();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
class VerifyAndLockNameResponse: public GameNetworkMessage
|
||||
{
|
||||
public:
|
||||
explicit VerifyAndLockNameResponse(uint32 stationId, const Unicode::String &characterName, const StringId& errorMessage);
|
||||
explicit VerifyAndLockNameResponse(Archive::ReadIterator & source);
|
||||
~VerifyAndLockNameResponse();
|
||||
|
||||
const uint32 getStationId() const;
|
||||
const Unicode::String& getCharacterName() const;
|
||||
const StringId& getErrorMessage() const;
|
||||
private:
|
||||
Archive::AutoVariable<uint32> m_stationId;
|
||||
Archive::AutoVariable<Unicode::String> m_characterName;
|
||||
Archive::AutoVariable<StringId> m_errorMessage;
|
||||
|
||||
VerifyAndLockNameResponse(const VerifyAndLockNameRequest & source);
|
||||
VerifyAndLockNameResponse & operator = (const VerifyAndLockNameRequest & other);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const uint32 VerifyAndLockNameResponse::getStationId() const
|
||||
{
|
||||
return m_stationId.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const Unicode::String &VerifyAndLockNameResponse::getCharacterName() const
|
||||
{
|
||||
return m_characterName.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
inline const StringId &VerifyAndLockNameResponse::getErrorMessage() const
|
||||
{
|
||||
return m_errorMessage.get();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
|
||||
+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
|
||||
|
||||
+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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user