mirror of
https://bitbucket.org/seefoe/src.git
synced 2026-07-31 01:15:45 -04:00
Added swgServerNetworkMessages library
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
|
||||
add_subdirectory(server)
|
||||
add_subdirectory(shared)
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
#add_subdirectory(application)
|
||||
add_subdirectory(library)
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
add_subdirectory(swgServerNetworkMessages)
|
||||
@@ -0,0 +1,11 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(swgSharedNetworkMessages)
|
||||
|
||||
if(WIN32)
|
||||
add_definitions(/D_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/public)
|
||||
|
||||
add_subdirectory(src)
|
||||
+1
@@ -0,0 +1 @@
|
||||
#include "../../src/shared/core/FirstSwgServerNetworkMessages.h"
|
||||
+1
@@ -0,0 +1 @@
|
||||
#include "../../src/shared/resource/MessageQueueActivateInstallation.h"
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
#include "../../src/shared/combat/MessageQueueCombatDamageList.h"
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
#include "../../src/shared/resource/MessageQueueDeactivateInstallation.h"
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
#include "../../src/shared/combat/MessageQueueDirectDamage.h"
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
#include "../../src/shared/resource/MessageQueueInstallationHarvest.h"
|
||||
+1
@@ -0,0 +1 @@
|
||||
#include "../../src/shared/jedi/MessageQueueJediData.h"
|
||||
+1
@@ -0,0 +1 @@
|
||||
#include "../../src/shared/jedi/MessageQueueJediLocation.h"
|
||||
+1
@@ -0,0 +1 @@
|
||||
#include "../../src/shared/travel/MessageQueuePlanetAddTravelPoint.h"
|
||||
+1
@@ -0,0 +1 @@
|
||||
#include "../../src/shared/jedi/MessageQueueRequestJediBounty.h"
|
||||
+1
@@ -0,0 +1 @@
|
||||
#include "../../src/shared/resource/MessageQueueResourceAdd.h"
|
||||
+1
@@ -0,0 +1 @@
|
||||
#include "../../src/shared/resource/MessageQueueResourceFinishHarvest.h"
|
||||
+1
@@ -0,0 +1 @@
|
||||
#include "../../src/shared/resource/MessageQueueResourceSetInstalledEfficiency.h"
|
||||
+1
@@ -0,0 +1 @@
|
||||
#include "../../src/shared/resource/MessageQueueResourceTypeDepleted.h"
|
||||
+1
@@ -0,0 +1 @@
|
||||
#include "../../src/shared/money/MessageQueueScriptTransferMoney.h"
|
||||
+1
@@ -0,0 +1 @@
|
||||
#include "../../src/shared/core/SetupSwgServerNetworkMessages.h"
|
||||
@@ -0,0 +1,76 @@
|
||||
|
||||
set(SHARED_SOURCES
|
||||
shared/combat/MessageQueueCombatDamageList.cpp
|
||||
shared/combat/MessageQueueCombatDamageList.h
|
||||
shared/combat/MessageQueueDirectDamage.cpp
|
||||
shared/combat/MessageQueueDirectDamage.h
|
||||
|
||||
shared/core/FirstSwgServerNetworkMessages.h
|
||||
shared/core/SetupSwgServerNetworkMessages.cpp
|
||||
shared/core/SetupSwgServerNetworkMessages.h
|
||||
|
||||
shared/jedi/MessageQueueJediData.cpp
|
||||
shared/jedi/MessageQueueJediData.h
|
||||
shared/jedi/MessageQueueJediLocation.cpp
|
||||
shared/jedi/MessageQueueJediLocation.h
|
||||
shared/jedi/MessageQueueRequestJediBounty.cpp
|
||||
shared/jedi/MessageQueueRequestJediBounty.h
|
||||
|
||||
shared/money/MessageQueueScriptTransferMoney.cpp
|
||||
shared/money/MessageQueueScriptTransferMoney.h
|
||||
|
||||
shared/resource/MessageQueueActivateInstallation.cpp
|
||||
shared/resource/MessageQueueActivateInstallation.h
|
||||
shared/resource/MessageQueueDeactivateInstallation.cpp
|
||||
shared/resource/MessageQueueDeactivateInstallation.h
|
||||
shared/resource/MessageQueueInstallationHarvest.cpp
|
||||
shared/resource/MessageQueueInstallationHarvest.h
|
||||
shared/resource/MessageQueueResourceAdd.cpp
|
||||
shared/resource/MessageQueueResourceAdd.h
|
||||
shared/resource/MessageQueueResourceFinishHarvest.cpp
|
||||
shared/resource/MessageQueueResourceFinishHarvest.h
|
||||
shared/resource/MessageQueueResourceSetInstalledEfficiency.cpp
|
||||
shared/resource/MessageQueueResourceSetInstalledEfficiency.h
|
||||
shared/resource/MessageQueueResourceTypeDepleted.cpp
|
||||
shared/resource/MessageQueueResourceTypeDepleted.h
|
||||
|
||||
shared/travel/MessageQueuePlanetAddTravelPoint.cpp
|
||||
shared/travel/MessageQueuePlanetAddTravelPoint.h
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set(PLATFORM_SOURCES
|
||||
win32/FirstSwgServerNetworkMessages.cpp
|
||||
)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/win32)
|
||||
else()
|
||||
set(PLATFORM_SOURCES "")
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shared
|
||||
${SWG_ENGINE_SOURCE_DIR}/shared/library/sharedDebug/include/public
|
||||
${SWG_ENGINE_SOURCE_DIR}/shared/library/sharedFoundation/include/public
|
||||
${SWG_ENGINE_SOURCE_DIR}/shared/library/sharedFoundationTypes/include/public
|
||||
${SWG_ENGINE_SOURCE_DIR}/shared/library/sharedGame/include/public
|
||||
${SWG_ENGINE_SOURCE_DIR}/shared/library/sharedMath/include/public
|
||||
${SWG_ENGINE_SOURCE_DIR}/shared/library/sharedMathArchive/include/public
|
||||
${SWG_ENGINE_SOURCE_DIR}/shared/library/sharedMemoryManager/include/public
|
||||
${SWG_ENGINE_SOURCE_DIR}/shared/library/sharedMessageDispatch/include/public
|
||||
${SWG_ENGINE_SOURCE_DIR}/shared/library/sharedNetworkMessages/include/public
|
||||
${SWG_ENGINE_SOURCE_DIR}/shared/library/sharedObject/include/public
|
||||
${SWG_ENGINE_SOURCE_DIR}/server/library/serverNetworkMessages/include/public
|
||||
${SWG_ENGINE_SOURCE_DIR}/server/library/serverUtility/include/public
|
||||
${SWG_GAME_SOURCE_DIR}/shared/library/swgSharedUtility/include/public
|
||||
${SWG_EXTERNALS_SOURCE_DIR}/ours/library/archive/include
|
||||
${SWG_EXTERNALS_SOURCE_DIR}/ours/library/localization/include
|
||||
${SWG_EXTERNALS_SOURCE_DIR}/ours/library/localizationArchive/include/public
|
||||
${SWG_EXTERNALS_SOURCE_DIR}/ours/library/unicode/include
|
||||
${SWG_EXTERNALS_SOURCE_DIR}/ours/library/unicodeArchive/include/public
|
||||
)
|
||||
|
||||
add_library(swgServerNetworkMessages STATIC
|
||||
${SHARED_SOURCES}
|
||||
${PLATFORM_SOURCES}
|
||||
)
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
//========================================================================
|
||||
//
|
||||
// MessageQueueCombatDamageList.h
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "swgServerNetworkMessages/FirstSwgServerNetworkMessages.h"
|
||||
#include "MessageQueueCombatDamageList.h"
|
||||
#include "sharedFoundation/MemoryBlockManager.h"
|
||||
#include "sharedFoundation/ExitChain.h"
|
||||
#include "sharedFoundation/GameControllerMessage.h"
|
||||
#include "sharedGame/AttribModArchive.h"
|
||||
#include "sharedNetworkMessages/ControllerMessageFactory.h"
|
||||
#include "sharedObject/CachedNetworkIdArchive.h"
|
||||
|
||||
//===================================================================
|
||||
|
||||
CONTROLLER_MESSAGE_IMPLEMENTATION(MessageQueueCombatDamageList, CM_combatDamageList);
|
||||
|
||||
//===================================================================
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
MessageQueueCombatDamageList::MessageQueueCombatDamageList(void)
|
||||
{
|
||||
} // MessageQueueCombatDamageList::MessageQueueCombatDamageList
|
||||
|
||||
/**
|
||||
* Class destructor.
|
||||
*/
|
||||
MessageQueueCombatDamageList::~MessageQueueCombatDamageList()
|
||||
{
|
||||
} // MessageQueueCombatDamageList::~MessageQueueCombatDamageList
|
||||
|
||||
|
||||
void MessageQueueCombatDamageList::pack(const MessageQueue::Data* const data, Archive::ByteStream & target)
|
||||
{
|
||||
uint16 count;
|
||||
uint8 temp8;
|
||||
|
||||
const MessageQueueCombatDamageList* const msg = safe_cast<const MessageQueueCombatDamageList*> (data);
|
||||
|
||||
if (msg)
|
||||
{
|
||||
const std::vector<CombatEngineData::DamageData> & damageList =
|
||||
msg->getDamageList();
|
||||
count = static_cast<uint16>(damageList.size());
|
||||
Archive::put(target, count);
|
||||
for (std::vector<CombatEngineData::DamageData>::const_iterator
|
||||
iter = damageList.begin(); iter != damageList.end(); ++iter)
|
||||
{
|
||||
Archive::put(target, (*iter).attackerId);
|
||||
Archive::put(target, (*iter).weaponId);
|
||||
Archive::put(target, (*iter).actionId);
|
||||
temp8 = static_cast<uint8>((*iter).damageType);
|
||||
Archive::put(target, temp8);
|
||||
temp8 = static_cast<uint8>((*iter).hitLocationIndex);
|
||||
Archive::put(target, temp8);
|
||||
temp8 = static_cast<uint8>((*iter).wounded);
|
||||
Archive::put(target, temp8);
|
||||
temp8 = static_cast<uint8>((*iter).ignoreInvulnerable);
|
||||
Archive::put(target, temp8);
|
||||
|
||||
const std::vector<AttribMod::AttribMod> & damage = (*iter).damage;
|
||||
count = static_cast<uint16>(damage.size());
|
||||
Archive::put(target, count);
|
||||
for (std::vector<AttribMod::AttribMod>::const_iterator
|
||||
iter2 = damage.begin(); iter2 != damage.end(); ++iter2)
|
||||
{
|
||||
Archive::put(target, *iter2);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // ControllerMessageFactory::packCombatDamageList
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
MessageQueue::Data* MessageQueueCombatDamageList::unpack(Archive::ReadIterator & source)
|
||||
{
|
||||
CombatEngineData::DamageData damageData;
|
||||
uint8 temp8;
|
||||
|
||||
MessageQueueCombatDamageList * msg = new MessageQueueCombatDamageList;
|
||||
NOT_NULL(msg);
|
||||
|
||||
|
||||
uint16 listCount;
|
||||
Archive::get(source, listCount);
|
||||
for (uint16 i = 0; i < listCount; ++i)
|
||||
{
|
||||
damageData.damage.clear();
|
||||
|
||||
Archive::get(source, damageData.attackerId);
|
||||
Archive::get(source, damageData.weaponId);
|
||||
Archive::get(source, damageData.actionId);
|
||||
Archive::get(source, temp8);
|
||||
damageData.damageType = static_cast<CombatEngineData::DamageType>(temp8);
|
||||
Archive::get(source, temp8);
|
||||
damageData.hitLocationIndex = temp8;
|
||||
Archive::get(source, temp8);
|
||||
damageData.wounded = temp8 != 0;
|
||||
Archive::get(source, temp8);
|
||||
damageData.ignoreInvulnerable = temp8 != 0;
|
||||
|
||||
uint16 damageCount;
|
||||
Archive::get(source, damageCount);
|
||||
for (uint16 j = 0; j < damageCount; ++j)
|
||||
{
|
||||
damageData.damage.push_back(AttribMod::AttribMod());
|
||||
Archive::get(source, damageData.damage.back());
|
||||
}
|
||||
|
||||
msg->addDamage(damageData);
|
||||
}
|
||||
|
||||
return msg;
|
||||
} // ControllerMessageFactory::unpackCombatAction
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
//========================================================================
|
||||
//
|
||||
// MessageQueueCombatDamageList.h
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
|
||||
#ifndef INCLUDED_MessageQueueCombatDamageList_H
|
||||
#define INCLUDED_MessageQueueCombatDamageList_H
|
||||
|
||||
#include "sharedFoundation/MessageQueue.h"
|
||||
|
||||
#include "swgSharedUtility/CombatEngineData.h"
|
||||
|
||||
#include <vector>
|
||||
#include "sharedNetworkMessages/ControllerMessageMacros.h"
|
||||
|
||||
class MemoryBlockManager;
|
||||
|
||||
class MessageQueueCombatDamageList : public MessageQueue::Data
|
||||
{
|
||||
CONTROLLER_MESSAGE_INTERFACE;
|
||||
|
||||
public:
|
||||
MessageQueueCombatDamageList(void);
|
||||
virtual ~MessageQueueCombatDamageList();
|
||||
|
||||
MessageQueueCombatDamageList& operator= (const MessageQueueCombatDamageList & source);
|
||||
MessageQueueCombatDamageList(const MessageQueueCombatDamageList & source);
|
||||
|
||||
|
||||
void addDamage(const CombatEngineData::DamageData & data);
|
||||
CombatEngineData::DamageData & addDamage(void);
|
||||
const std::vector<CombatEngineData::DamageData> & getDamageList(void) const;
|
||||
|
||||
private:
|
||||
std::vector<CombatEngineData::DamageData> m_data;
|
||||
};
|
||||
|
||||
|
||||
inline void MessageQueueCombatDamageList::addDamage(const CombatEngineData::DamageData & data)
|
||||
{
|
||||
m_data.push_back(data);
|
||||
} // MessageQueueCombatDamageList::addDamage
|
||||
|
||||
inline CombatEngineData::DamageData & MessageQueueCombatDamageList::addDamage(void)
|
||||
{
|
||||
m_data.push_back(CombatEngineData::DamageData());
|
||||
return m_data.back();
|
||||
}
|
||||
|
||||
inline const std::vector<CombatEngineData::DamageData> &
|
||||
MessageQueueCombatDamageList::getDamageList(void) const
|
||||
{
|
||||
return m_data;
|
||||
} // MessageQueueCombatDamageList::getDamageList
|
||||
|
||||
|
||||
#endif // INCLUDED_MessageQueueCombatDamageList_H
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageQueueDirectDamage.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "swgServerNetworkMessages/FirstSwgServerNetworkMessages.h"
|
||||
#include "swgServerNetworkMessages/MessageQueueDirectDamage.h"
|
||||
|
||||
#include <string>
|
||||
#include "sharedFoundation/MemoryBlockManager.h"
|
||||
#include "sharedFoundation/ExitChain.h"
|
||||
#include "sharedFoundation/GameControllerMessage.h"
|
||||
#include "sharedMathArchive/VectorArchive.h"
|
||||
#include "sharedNetworkMessages/ControllerMessageFactory.h"
|
||||
|
||||
//===================================================================
|
||||
|
||||
CONTROLLER_MESSAGE_IMPLEMENTATION(MessageQueueDirectDamage, CM_directDamage);
|
||||
|
||||
//===================================================================
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueueDirectDamage::MessageQueueDirectDamage(int damageType, int hitLocation, int damageDone) :
|
||||
m_damageType(damageType),
|
||||
m_hitLocation(hitLocation),
|
||||
m_damageDone(damageDone)
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueueDirectDamage::~MessageQueueDirectDamage()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MessageQueueDirectDamage::pack(const MessageQueue::Data* const data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueDirectDamage* const msg = safe_cast<const MessageQueueDirectDamage*> (data);
|
||||
if (msg)
|
||||
{
|
||||
Archive::put(target, msg->m_damageType);
|
||||
Archive::put(target, msg->m_hitLocation);
|
||||
Archive::put(target, msg->m_damageDone);
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueue::Data* MessageQueueDirectDamage::unpack(Archive::ReadIterator & source)
|
||||
{
|
||||
int damageType, hitLocation, damageDone;
|
||||
|
||||
Archive::get(source, damageType);
|
||||
Archive::get(source, hitLocation);
|
||||
Archive::get(source, damageDone);
|
||||
|
||||
return new MessageQueueDirectDamage(damageType, hitLocation, damageDone);
|
||||
}
|
||||
|
||||
|
||||
// ======================================================================
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
//========================================================================
|
||||
//
|
||||
// MessageQueueDirectDamage.h
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
|
||||
#ifndef INCLUDED_MessageQueueDirectDamage_H
|
||||
#define INCLUDED_MessageQueueDirectDamage_H
|
||||
|
||||
#include "sharedFoundation/MessageQueue.h"
|
||||
#include "sharedFoundation/NetworkId.h"
|
||||
#include "sharedNetworkMessages/ControllerMessageMacros.h"
|
||||
|
||||
class MemoryBlockManager;
|
||||
|
||||
/**
|
||||
*/
|
||||
class MessageQueueDirectDamage : public MessageQueue::Data
|
||||
{
|
||||
CONTROLLER_MESSAGE_INTERFACE;
|
||||
|
||||
public:
|
||||
MessageQueueDirectDamage(int damageType, int hitLocation, int damageDone);
|
||||
virtual ~MessageQueueDirectDamage();
|
||||
|
||||
MessageQueueDirectDamage& operator= (const MessageQueueDirectDamage & source);
|
||||
MessageQueueDirectDamage(const MessageQueueDirectDamage & source);
|
||||
|
||||
int getDamageType() const;
|
||||
int getHitLocation() const;
|
||||
int getDamageDone() const;
|
||||
|
||||
private:
|
||||
int m_damageType;
|
||||
int m_hitLocation;
|
||||
int m_damageDone;
|
||||
};
|
||||
|
||||
|
||||
// ======================================================================
|
||||
|
||||
inline int MessageQueueDirectDamage::getDamageType() const
|
||||
{
|
||||
return m_damageType;
|
||||
}
|
||||
|
||||
inline int MessageQueueDirectDamage::getHitLocation() const
|
||||
{
|
||||
return m_hitLocation;
|
||||
}
|
||||
|
||||
inline int MessageQueueDirectDamage::getDamageDone() const
|
||||
{
|
||||
return m_damageDone;
|
||||
}
|
||||
|
||||
|
||||
// ======================================================================
|
||||
|
||||
|
||||
#endif // INCLUDED_MessageQueueDirectDamage_H
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// FirstSwgServerNetworkObject.h
|
||||
//
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_FirstSwgServerNetworkObject_H
|
||||
#define INCLUDED_FirstSwgServerNetworkObject_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedFoundation/FirstSharedFoundation.h"
|
||||
#include "sharedDebug/FirstSharedDebug.h"
|
||||
#include "sharedMemoryManager/FirstSharedMemoryManager.h"
|
||||
#include "sharedNetworkMessages/GameNetworkMessage.h"
|
||||
#include "Archive/AutoDeltaByteStream.h"
|
||||
#include "sharedFoundation/NetworkId.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
#include "sharedFoundation/NetworkIdArchive.h"
|
||||
// ======================================================================
|
||||
|
||||
#endif // INCLUDED_FirstSwgServerNetworkObject_H
|
||||
+909
@@ -0,0 +1,909 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// SetupSwgServerNetworkMessages.cpp
|
||||
// copyright 1998 Bootprint Entertainment
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "swgServerNetworkMessages/FirstSwgServerNetworkMessages.h"
|
||||
#include "swgServerNetworkMessages/SetupSwgServerNetworkMessages.h"
|
||||
|
||||
#include "StringId.h"
|
||||
#include "localizationArchive/StringIdArchive.h"
|
||||
#include "serverNetworkMessages/MessageQueueAlterAttribute.h"
|
||||
#include "serverNetworkMessages/MessageQueueTeleportObject.h"
|
||||
#include "serverUtility/LocationData.h"
|
||||
#include "sharedFoundation/DynamicVariable.h"
|
||||
#include "sharedFoundation/DynamicVariableLocationData.h"
|
||||
#include "sharedFoundation/ExitChain.h"
|
||||
#include "sharedFoundation/GameControllerMessage.h"
|
||||
#include "sharedGame/ProsePackage.h"
|
||||
#include "sharedGame/ProsePackageArchive.h"
|
||||
#include "sharedMathArchive/VectorArchive.h"
|
||||
#include "sharedNetworkMessages/ControllerMessageFactory.h"
|
||||
#include "sharedNetworkMessages/MapLocation.h"
|
||||
#include "sharedNetworkMessages/MapLocationArchive.h"
|
||||
#include "sharedNetworkMessages/MessageQueueDataTransformWithParent.h"
|
||||
#include "swgServerNetworkMessages/MessageQueueCombatDamageList.h"
|
||||
#include "swgServerNetworkMessages/MessageQueueDirectDamage.h"
|
||||
#include "swgServerNetworkMessages/MessageQueueInstallationHarvest.h"
|
||||
#include "swgServerNetworkMessages/MessageQueueJediData.h"
|
||||
#include "swgServerNetworkMessages/MessageQueueJediLocation.h"
|
||||
#include "swgServerNetworkMessages/MessageQueuePlanetAddTravelPoint.h"
|
||||
#include "swgServerNetworkMessages/MessageQueueRequestJediBounty.h"
|
||||
#include "swgServerNetworkMessages/MessageQueueScriptTransferMoney.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
namespace SetupSwgServerNetworkMessagesNamespace
|
||||
{
|
||||
static bool g_installed = false;
|
||||
|
||||
template <typename T> void packGenericMessage (const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<T> * const msg = safe_cast<const MessageQueueGenericValueType<T> *>(data);
|
||||
if (msg)
|
||||
{
|
||||
Archive::put (target, msg->getValue ());
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T> MessageQueue::Data * unpackGenericMessage (Archive::ReadIterator & source)
|
||||
{
|
||||
T v;
|
||||
Archive::get(source, v);
|
||||
MessageQueueGenericValueType<T> * result = new MessageQueueGenericValueType<T>(v);
|
||||
return result;
|
||||
}
|
||||
|
||||
void packString(const MessageQueue::Data *data, Archive::ByteStream &target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::string> * msg = safe_cast<const MessageQueueGenericValueType<std::string> *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data* unpackString(Archive::ReadIterator &source)
|
||||
{
|
||||
std::string v;
|
||||
Archive::get(source, v);
|
||||
MessageQueueGenericValueType<std::string> * result = new MessageQueueGenericValueType<std::string>(v);
|
||||
return result;
|
||||
}
|
||||
|
||||
void packNetworkIdString(const MessageQueue::Data *data, Archive::ByteStream &target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<NetworkId, std::string> > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<NetworkId, std::string> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
MessageQueue::Data* unpackNetworkIdString(Archive::ReadIterator &source)
|
||||
{
|
||||
std::pair<NetworkId, std::string> v;
|
||||
Archive::get(source, v);
|
||||
MessageQueueGenericValueType<std::pair<NetworkId, std::string> > * result = new MessageQueueGenericValueType<std::pair<NetworkId, std::string> >(v);
|
||||
return result;
|
||||
}
|
||||
|
||||
void packNetworkIdStringInt(const MessageQueue::Data *data, Archive::ByteStream &target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<NetworkId, std::pair<std::string, int> > > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<NetworkId, std::pair<std::string, int> > > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
MessageQueue::Data* unpackNetworkIdStringInt(Archive::ReadIterator &source)
|
||||
{
|
||||
std::pair<NetworkId, std::pair<std::string, int> > v;
|
||||
Archive::get(source, v);
|
||||
MessageQueueGenericValueType<std::pair<NetworkId, std::pair<std::string, int> > > * result = new MessageQueueGenericValueType<std::pair<NetworkId, std::pair<std::string, int> > >(v);
|
||||
return result;
|
||||
}
|
||||
|
||||
void packNetworkId(const MessageQueue::Data *data, Archive::ByteStream &target)
|
||||
{
|
||||
const MessageQueueGenericValueType<NetworkId> * msg = safe_cast<const MessageQueueGenericValueType<NetworkId> *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
MessageQueue::Data* unpackNetworkId(Archive::ReadIterator &source)
|
||||
{
|
||||
NetworkId v;
|
||||
Archive::get(source, v);
|
||||
MessageQueueGenericValueType<NetworkId> * result = new MessageQueueGenericValueType<NetworkId>(v);
|
||||
return result;
|
||||
}
|
||||
void packInt(const MessageQueue::Data *data, Archive::ByteStream &target)
|
||||
{
|
||||
const MessageQueueGenericValueType<int> * msg = safe_cast<const MessageQueueGenericValueType<int> *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
MessageQueue::Data* unpackInt(Archive::ReadIterator &source)
|
||||
{
|
||||
int v;
|
||||
Archive::get(source, v);
|
||||
MessageQueueGenericValueType<int> * result = new MessageQueueGenericValueType<int>(v);
|
||||
return result;
|
||||
}
|
||||
void packFloat(const MessageQueue::Data *data, Archive::ByteStream &target)
|
||||
{
|
||||
const MessageQueueGenericValueType<float> * msg = safe_cast<const MessageQueueGenericValueType<float> *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
MessageQueue::Data* unpackFloat(Archive::ReadIterator &source)
|
||||
{
|
||||
float v;
|
||||
Archive::get(source, v);
|
||||
MessageQueueGenericValueType<float> * result = new MessageQueueGenericValueType<float>(v);
|
||||
return result;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
void packMapLocationTypePair(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
packGenericMessage <std::pair <MapLocation, int> > (data, target);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
MessageQueue::Data* unpackMapLocationTypePair(Archive::ReadIterator &source)
|
||||
{
|
||||
return unpackGenericMessage <std::pair <MapLocation, int> > (source);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
void packStringId(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
packGenericMessage <StringId> (data, target);
|
||||
}
|
||||
|
||||
MessageQueue::Data* unpackStringId(Archive::ReadIterator &source)
|
||||
{
|
||||
return unpackGenericMessage <StringId> (source);
|
||||
}
|
||||
|
||||
void packStringIdProsePackage(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
packGenericMessage <std::pair<StringId, ProsePackage> >(data, target);
|
||||
}
|
||||
|
||||
MessageQueue::Data* unpackStringIdProsePackage(Archive::ReadIterator & source)
|
||||
{
|
||||
return unpackGenericMessage<std::pair<StringId, ProsePackage> > (source);
|
||||
}
|
||||
|
||||
void packStringNetworkIdStringIdProsePackage(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
packGenericMessage <std::pair<std::string, std::pair<NetworkId, std::pair<StringId, ProsePackage> > > >(data, target);
|
||||
}
|
||||
|
||||
MessageQueue::Data* unpackStringNetworkIdStringIdProsePackage (Archive::ReadIterator & source)
|
||||
{
|
||||
return unpackGenericMessage <std::pair<std::string, std::pair<NetworkId, std::pair<StringId, ProsePackage> > > >(source);
|
||||
}
|
||||
|
||||
void packUnsignedLong(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<unsigned long> * msg = safe_cast<const MessageQueueGenericValueType<unsigned long> *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackUnsignedLong(Archive::ReadIterator & source)
|
||||
{
|
||||
unsigned long v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<unsigned long>(v);
|
||||
}
|
||||
|
||||
void packUnicodeString(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<Unicode::String> * msg = safe_cast<const MessageQueueGenericValueType<Unicode::String> *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackUnicodeString(Archive::ReadIterator & source)
|
||||
{
|
||||
Unicode::String v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<Unicode::String>(v);
|
||||
}
|
||||
|
||||
void packNothing(const MessageQueue::Data *, Archive::ByteStream &)
|
||||
{
|
||||
}
|
||||
MessageQueue::Data* unpackNothing(Archive::ReadIterator &)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void packVectorNetworkIdVector(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<Vector, std::pair<NetworkId, Vector> > > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<Vector, std::pair<NetworkId, Vector> > > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackVectorNetworkIdVector(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<Vector, std::pair<NetworkId, Vector> > v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<Vector, std::pair<NetworkId, Vector> > >(v);
|
||||
}
|
||||
|
||||
void packIntVector(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<int, Vector> > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<int, Vector> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackIntVector(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<int, Vector> v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<int, Vector> >(v);
|
||||
}
|
||||
|
||||
|
||||
void packBool(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<bool> * msg = safe_cast<const MessageQueueGenericValueType<bool> *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackBool(Archive::ReadIterator & source)
|
||||
{
|
||||
bool v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<bool>(v);
|
||||
}
|
||||
|
||||
void packStringInt(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<std::string, int> > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<std::string, int> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackStringInt(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<std::string, int> v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<std::string, int> >(v);
|
||||
}
|
||||
|
||||
void packStringIntArray(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<std::string, std::vector<int> > > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<std::string, std::vector<int> > > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackStringIntArray(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<std::string, std::vector<int> > v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<std::string, std::vector<int> > >(v);
|
||||
}
|
||||
|
||||
void packLocationData(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<LocationData> * msg = safe_cast<const MessageQueueGenericValueType<LocationData> *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackLocationData(Archive::ReadIterator & source)
|
||||
{
|
||||
LocationData v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<LocationData>(v);
|
||||
}
|
||||
|
||||
void packBoolNetworkId(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<bool, NetworkId> > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<bool, NetworkId> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackBoolNetworkId(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<bool, NetworkId> v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<bool, NetworkId> >(v);
|
||||
}
|
||||
|
||||
void packIntNetworkId(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<int, NetworkId> > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<int, NetworkId> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackIntNetworkId(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<int, NetworkId> v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<int, NetworkId> >(v);
|
||||
}
|
||||
|
||||
void packNetworkIdInt(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<NetworkId, int> > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<NetworkId, int> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackNetworkIdInt(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<NetworkId, int> v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<NetworkId, int> >(v);
|
||||
}
|
||||
|
||||
void packNetworkIdFloat(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<NetworkId, float> > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<NetworkId, float> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackNetworkIdFloat(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<NetworkId, float> v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<NetworkId, float> >(v);
|
||||
}
|
||||
|
||||
void packNetworkIdNetworkId(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<NetworkId, NetworkId> > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<NetworkId, NetworkId> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackNetworkIdNetworkId(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<NetworkId, NetworkId> v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<NetworkId, NetworkId> >(v);
|
||||
}
|
||||
|
||||
void packIntArray(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::vector<int> > * msg = safe_cast<const MessageQueueGenericValueType<std::vector<int> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackIntArray(Archive::ReadIterator & source)
|
||||
{
|
||||
std::vector<int> v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::vector<int> >(v);
|
||||
}
|
||||
|
||||
void packStringFloat(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<std::string, float> > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<std::string, float> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackStringFloat(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<std::string, float> v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<std::string, float> >(v);
|
||||
}
|
||||
|
||||
void packStringFloatArray(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<std::string, std::vector<float> > > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<std::string, std::vector<float> > > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackStringFloatArray(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<std::string, std::vector<float> > v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<std::string, std::vector<float> > >(v);
|
||||
}
|
||||
|
||||
void packStringIdArray(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::vector<StringId> > * msg = safe_cast<const MessageQueueGenericValueType<std::vector<StringId> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackStringIdArray(Archive::ReadIterator & source)
|
||||
{
|
||||
std::vector<StringId> v;
|
||||
Archive::get(source, v);
|
||||
MessageQueueGenericValueType<std::vector<StringId> > * result = new MessageQueueGenericValueType<std::vector<StringId> >(v);
|
||||
return result;
|
||||
}
|
||||
|
||||
void packAttributeIntNetworkId(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<Attributes::Enumerator, std::pair<int, NetworkId> > > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<Attributes::Enumerator, std::pair<int, NetworkId> > > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
void packUnicodeStringArray(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::vector<Unicode::String> > * msg = safe_cast<const MessageQueueGenericValueType<std::vector<Unicode::String> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackUnicodeStringArray(Archive::ReadIterator & source)
|
||||
{
|
||||
std::vector<Unicode::String> v;
|
||||
Archive::get(source, v);
|
||||
MessageQueueGenericValueType<std::vector<Unicode::String> > * result = new MessageQueueGenericValueType<std::vector<Unicode::String> >(v);
|
||||
return result;
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackAttributeIntNetworkId(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<Attributes::Enumerator, std::pair<int, NetworkId> > v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<Attributes::Enumerator, std::pair<int, NetworkId> > >(v);
|
||||
}
|
||||
|
||||
void packAttributeIntFloatFloatFloat(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<Attributes::Enumerator, std::pair<int, std::pair<float, std::pair<float, float> > > > > * const msg = safe_cast<const MessageQueueGenericValueType<std::pair<Attributes::Enumerator, std::pair<int, std::pair<float, std::pair<float, float> > > > > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackAttributeIntFloatFloatFloat(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<Attributes::Enumerator, std::pair<int, std::pair<float, std::pair<float, float> > > > v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<Attributes::Enumerator, std::pair<int, std::pair<float, std::pair<float, float> > > > >(v);
|
||||
}
|
||||
|
||||
void packAttribute(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<Attributes::Enumerator> * msg = safe_cast<const MessageQueueGenericValueType<Attributes::Enumerator> *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackAttribute(Archive::ReadIterator & source)
|
||||
{
|
||||
Attributes::Enumerator v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<Attributes::Enumerator>(v);
|
||||
}
|
||||
|
||||
void packNetworkIdArray(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::vector<NetworkId> > * msg = safe_cast<const MessageQueueGenericValueType<std::vector<NetworkId> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackNetworkIdArray(Archive::ReadIterator & source)
|
||||
{
|
||||
std::vector<NetworkId> v;
|
||||
Archive::get(source, v);
|
||||
MessageQueueGenericValueType<std::vector<NetworkId> > * result = new MessageQueueGenericValueType<std::vector<NetworkId> >(v);
|
||||
return result;
|
||||
}
|
||||
|
||||
void packNetworkIdNetworkIdNetworkId(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<NetworkId, std::pair<NetworkId, NetworkId> > > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<NetworkId, std::pair<NetworkId, NetworkId> > > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * packNetworkIdNetworkIdNetworkId(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<NetworkId, std::pair<NetworkId, NetworkId> > v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<NetworkId, std::pair<NetworkId, NetworkId> > >(v);
|
||||
}
|
||||
|
||||
void packNetworkIdUint32(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<NetworkId, uint32> > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<NetworkId, uint32> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackNetworkIdUint32(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<NetworkId, uint32> v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<NetworkId, uint32> >(v);
|
||||
}
|
||||
|
||||
void packULongBool(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<unsigned long, bool> > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<unsigned long, bool> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackULongBool(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<unsigned long, bool> v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<unsigned long, bool> >(v);
|
||||
}
|
||||
|
||||
void packStringNetworkIdNetworkId(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<std::string, std::pair<NetworkId, NetworkId> > > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<std::string, std::pair<NetworkId, NetworkId> > > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackStringNetworkIdNetworkId(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<std::string, std::pair<NetworkId, NetworkId> > v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<std::string, std::pair<NetworkId, NetworkId> > >(v);
|
||||
}
|
||||
|
||||
void packDynamicVariableLocation(const MessageQueue::Data *data, Archive::ByteStream &target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<std::string, DynamicVariableLocationData> > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<std::string, DynamicVariableLocationData> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
MessageQueue::Data* unpackDynamicVariableLocation(Archive::ReadIterator &source)
|
||||
{
|
||||
std::pair<std::string, DynamicVariableLocationData> v;
|
||||
Archive::get(source, v);
|
||||
MessageQueueGenericValueType<std::pair<std::string, DynamicVariableLocationData> > * result = new MessageQueueGenericValueType<std::pair<std::string, DynamicVariableLocationData> >(v);
|
||||
return result;
|
||||
}
|
||||
|
||||
void packDynamicVariableLocationArray(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<std::string, std::vector<DynamicVariableLocationData> > > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<std::string, std::vector<DynamicVariableLocationData> > > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackDynamicVariableLocationArray(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<std::string, std::vector<DynamicVariableLocationData> > v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<std::string, std::vector<DynamicVariableLocationData> > >(v);
|
||||
}
|
||||
|
||||
void packStringNetworkId(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<std::string, NetworkId> > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<std::string, NetworkId> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackStringNetworkId(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<std::string, NetworkId> v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<std::string, NetworkId> >(v);
|
||||
}
|
||||
|
||||
void packStringStringNetworkId(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<std::string, std::pair<std::string, NetworkId> > > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<std::string, std::pair<std::string, NetworkId> > > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackStringStringNetworkId(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<std::string, std::pair<std::string, NetworkId> > v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<std::string, std::pair<std::string, NetworkId> > >(v);
|
||||
}
|
||||
|
||||
void packStringNetworkIdArray(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<std::string, std::vector<NetworkId> > > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<std::string, std::vector<NetworkId> > > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackStringNetworkIdArray(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<std::string, std::vector<NetworkId> > v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<std::string, std::vector<NetworkId> > >(v);
|
||||
}
|
||||
|
||||
void packStringStringId(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<std::string, StringId> > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<std::string, StringId> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackStringStringId(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<std::string, StringId> v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<std::string, StringId> >(v);
|
||||
}
|
||||
|
||||
void packStringStringIdArray(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<std::string, std::vector<StringId> > > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<std::string, std::vector<StringId> > > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackStringStringIdArray(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<std::string, std::vector<StringId> > v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<std::string, std::vector<StringId> > >(v);
|
||||
}
|
||||
|
||||
void packStringString(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<std::string, std::string> > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<std::string, std::string> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackStringString(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<std::string, std::string> v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<std::string, std::string> >(v);
|
||||
}
|
||||
|
||||
void packIntStringString(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<int, std::pair<std::string, std::string> > > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<int, std::pair<std::string, std::string> > > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackIntStringString(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<int, std::pair<std::string, std::string> > v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<int, std::pair<std::string, std::string> > >(v);
|
||||
}
|
||||
|
||||
void packStringUnicodeString(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<std::string, Unicode::String> > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<std::string, Unicode::String> > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackStringUnicodeString(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<std::string, Unicode::String> v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<std::string, Unicode::String> >(v);
|
||||
}
|
||||
|
||||
void packStringUnicodeStringArray(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<std::string, std::vector<Unicode::String> > > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<std::string, std::vector<Unicode::String> > > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackStringUnicodeStringArray(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<std::string, std::vector<Unicode::String> > v;
|
||||
Archive::get(source, v);
|
||||
return new MessageQueueGenericValueType<std::pair<std::string, std::vector<Unicode::String> > >(v);
|
||||
}
|
||||
|
||||
void packJediData(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
MessageQueueJediData::pack(data, target);
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackJediData(Archive::ReadIterator & source)
|
||||
{
|
||||
return MessageQueueJediData::unpack(source);
|
||||
}
|
||||
|
||||
void packJediLocation(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
MessageQueueJediLocation::pack(data, target);
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackJediLocation(Archive::ReadIterator & source)
|
||||
{
|
||||
return MessageQueueJediLocation::unpack(source);
|
||||
}
|
||||
|
||||
void packJediBounties(const MessageQueue::Data * data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueGenericValueType<std::pair<NetworkId, std::vector<NetworkId> > > * msg = safe_cast<const MessageQueueGenericValueType<std::pair<NetworkId, std::vector<NetworkId> > > *>(data);
|
||||
if(msg)
|
||||
{
|
||||
Archive::put(target, msg->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::Data * unpackJediBounties(Archive::ReadIterator & source)
|
||||
{
|
||||
std::pair<NetworkId, std::vector<NetworkId> > v;
|
||||
Archive::get(source, v);
|
||||
MessageQueueGenericValueType<std::pair<NetworkId, std::vector<NetworkId> > > * result = new MessageQueueGenericValueType<std::pair<NetworkId, std::vector<NetworkId> > >(v);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
using namespace SetupSwgServerNetworkMessagesNamespace;
|
||||
|
||||
SetupSwgServerNetworkMessages::SetupSwgServerNetworkMessages()
|
||||
{
|
||||
}
|
||||
|
||||
SetupSwgServerNetworkMessages::~SetupSwgServerNetworkMessages()
|
||||
{
|
||||
}
|
||||
|
||||
void SetupSwgServerNetworkMessages::install ()
|
||||
{
|
||||
SetupSwgServerNetworkMessages setup;
|
||||
setup.internalInstall();
|
||||
|
||||
ExitChain::add (SetupSwgServerNetworkMessages::remove, "SetupSwgServerNetworkMessages");
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
void SetupSwgServerNetworkMessages::internalInstall ()
|
||||
{
|
||||
DEBUG_FATAL(g_installed, ("SetupSwgServerNetworkMessages::install - is already installed"));
|
||||
|
||||
SetupServerNetworkMessages::internalInstall();
|
||||
|
||||
MessageQueueCombatDamageList::install();
|
||||
MessageQueueDirectDamage::install();
|
||||
MessageQueueInstallationHarvest::install();
|
||||
MessageQueueJediData::install();
|
||||
MessageQueueJediLocation::install();
|
||||
MessageQueuePlanetAddTravelPoint::install();
|
||||
MessageQueueRequestJediBounty::install();
|
||||
MessageQueueScriptTransferMoney::install();
|
||||
|
||||
ControllerMessageFactory::registerControllerMessageHandler(CM_removeJedi, packNetworkId, unpackNetworkId);
|
||||
ControllerMessageFactory::registerControllerMessageHandler(CM_updateJedi, packJediData, unpackJediData);
|
||||
ControllerMessageFactory::registerControllerMessageHandler(CM_removeJediBounty, packNetworkIdNetworkId, unpackNetworkIdNetworkId);
|
||||
ControllerMessageFactory::registerControllerMessageHandler(CM_setJediOffline, packJediLocation, unpackJediLocation);
|
||||
ControllerMessageFactory::registerControllerMessageHandler(CM_updateJediBounties, packJediBounties, unpackJediBounties);
|
||||
ControllerMessageFactory::registerControllerMessageHandler(CM_updateJediSpentJediSkillPoints, packNetworkIdInt, unpackNetworkIdInt);
|
||||
ControllerMessageFactory::registerControllerMessageHandler(CM_updateJediFaction, packNetworkIdInt, unpackNetworkIdInt);
|
||||
ControllerMessageFactory::registerControllerMessageHandler(CM_updateJediScriptData, packNetworkIdStringInt, unpackNetworkIdStringInt);
|
||||
ControllerMessageFactory::registerControllerMessageHandler(CM_removeJediScriptData, packNetworkIdString, unpackNetworkIdString);
|
||||
ControllerMessageFactory::registerControllerMessageHandler(CM_removeAllJediBounties, packNetworkId, unpackNetworkId);
|
||||
|
||||
g_installed = true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void SetupSwgServerNetworkMessages::remove ( void )
|
||||
{
|
||||
DEBUG_FATAL(!g_installed, ("SetupSwgServerNetworkMessages::remove - not already installed"));
|
||||
|
||||
SetupSwgServerNetworkMessages setup;
|
||||
setup.internalRemove();
|
||||
}
|
||||
|
||||
void SetupSwgServerNetworkMessages::internalRemove ( void )
|
||||
{
|
||||
SetupServerNetworkMessages::internalRemove();
|
||||
g_installed = false;
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// SetupSwgServerNetworkMessages.h
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_SetupSwgServerNetworkMessages_H
|
||||
#define INCLUDED_SetupSwgServerNetworkMessages_H
|
||||
|
||||
#include "serverNetworkMessages/SetupServerNetworkMessages.h"
|
||||
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class SetupSwgServerNetworkMessages : public SetupServerNetworkMessages
|
||||
{
|
||||
public:
|
||||
|
||||
static void install ( void );
|
||||
static void remove();
|
||||
|
||||
protected:
|
||||
SetupSwgServerNetworkMessages();
|
||||
virtual ~SetupSwgServerNetworkMessages();
|
||||
|
||||
virtual void internalInstall();
|
||||
virtual void internalRemove();
|
||||
|
||||
private:
|
||||
|
||||
SetupSwgServerNetworkMessages(const SetupSwgServerNetworkMessages&);
|
||||
SetupSwgServerNetworkMessages& operator= (const SetupSwgServerNetworkMessages&);
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,97 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageQueueJediData.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "swgServerNetworkMessages/FirstSwgServerNetworkMessages.h"
|
||||
#include "swgServerNetworkMessages/MessageQueueJediData.h"
|
||||
|
||||
#include <string>
|
||||
#include "sharedFoundation/MemoryBlockManager.h"
|
||||
#include "sharedFoundation/ExitChain.h"
|
||||
#include "sharedFoundation/GameControllerMessage.h"
|
||||
#include "sharedMathArchive/VectorArchive.h"
|
||||
#include "sharedNetworkMessages/ControllerMessageFactory.h"
|
||||
|
||||
//===================================================================
|
||||
|
||||
CONTROLLER_MESSAGE_IMPLEMENTATION(MessageQueueJediData, CM_addJedi);
|
||||
|
||||
//===================================================================
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueueJediData::MessageQueueJediData(const NetworkId & id,
|
||||
const Unicode::String & name, const Vector & location, const std::string & scene,
|
||||
int visibility, int bountyValue, int level, int hoursAlive, int state, int spentJediSkillPoints, int faction) :
|
||||
m_id(id),
|
||||
m_name(name),
|
||||
m_location(location),
|
||||
m_scene(scene),
|
||||
m_visibility(visibility),
|
||||
m_bountyValue(bountyValue),
|
||||
m_level(level),
|
||||
m_hoursAlive(hoursAlive),
|
||||
m_state(state),
|
||||
m_spentJediSkillPoints(spentJediSkillPoints),
|
||||
m_faction(faction)
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueueJediData::~MessageQueueJediData()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MessageQueueJediData::pack(const MessageQueue::Data* const data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueJediData* const msg = safe_cast<const MessageQueueJediData*> (data);
|
||||
if (msg)
|
||||
{
|
||||
Archive::put(target, msg->m_id);
|
||||
Archive::put(target, msg->m_name);
|
||||
Archive::put(target, msg->m_location);
|
||||
Archive::put(target, msg->m_scene);
|
||||
Archive::put(target, msg->m_visibility);
|
||||
Archive::put(target, msg->m_bountyValue);
|
||||
Archive::put(target, msg->m_level);
|
||||
Archive::put(target, msg->m_hoursAlive);
|
||||
Archive::put(target, msg->m_state);
|
||||
Archive::put(target, msg->m_spentJediSkillPoints);
|
||||
Archive::put(target, msg->m_faction);
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueue::Data* MessageQueueJediData::unpack(Archive::ReadIterator & source)
|
||||
{
|
||||
NetworkId id;
|
||||
Unicode::String name;
|
||||
Vector location;
|
||||
std::string scene;
|
||||
int visibility, bountyValue, level, hoursAlive, state, spentJediSkillPoints, faction;
|
||||
|
||||
Archive::get(source, id);
|
||||
Archive::get(source, name);
|
||||
Archive::get(source, location);
|
||||
Archive::get(source, scene);
|
||||
Archive::get(source, visibility);
|
||||
Archive::get(source, bountyValue);
|
||||
Archive::get(source, level);
|
||||
Archive::get(source, hoursAlive);
|
||||
Archive::get(source, state);
|
||||
Archive::get(source, spentJediSkillPoints);
|
||||
Archive::get(source, faction);
|
||||
|
||||
MessageQueueJediData * result = new MessageQueueJediData(id, name, location, scene, visibility, bountyValue, level, hoursAlive, state, spentJediSkillPoints, faction);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// ======================================================================
|
||||
@@ -0,0 +1,121 @@
|
||||
//========================================================================
|
||||
//
|
||||
// MessageQueueJediData.h
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
|
||||
#ifndef INCLUDED_MessageQueueJediData_H
|
||||
#define INCLUDED_MessageQueueJediData_H
|
||||
|
||||
#include "sharedFoundation/MessageQueue.h"
|
||||
#include "sharedFoundation/NetworkId.h"
|
||||
#include "sharedMath/Vector.h"
|
||||
#include "sharedNetworkMessages/ControllerMessageMacros.h"
|
||||
|
||||
|
||||
class MemoryBlockManager;
|
||||
|
||||
|
||||
/**
|
||||
*/
|
||||
class MessageQueueJediData : public MessageQueue::Data
|
||||
{
|
||||
CONTROLLER_MESSAGE_INTERFACE;
|
||||
|
||||
public:
|
||||
MessageQueueJediData(const NetworkId & id, const Unicode::String & name, const Vector & location, const std::string & scene, int visibility, int bountyValue, int level, int hoursAlive, int state, int spentJediSkillPoints, int faction);
|
||||
virtual ~MessageQueueJediData();
|
||||
|
||||
MessageQueueJediData& operator= (const MessageQueueJediData & source);
|
||||
MessageQueueJediData(const MessageQueueJediData & source);
|
||||
|
||||
const NetworkId & getId() const;
|
||||
const Unicode::String & getName() const;
|
||||
const Vector & getLocation() const;
|
||||
const std::string & getScene() const;
|
||||
int getVisibility() const;
|
||||
int getBountyValue() const;
|
||||
int getLevel() const;
|
||||
int getHoursAlive() const;
|
||||
int getState() const;
|
||||
int getSpentJediSkillPoints() const;
|
||||
int getFaction() const;
|
||||
|
||||
private:
|
||||
const NetworkId m_id;
|
||||
const Unicode::String m_name;
|
||||
const Vector m_location;
|
||||
const std::string m_scene;
|
||||
const int m_visibility;
|
||||
const int m_bountyValue;
|
||||
const int m_level;
|
||||
const int m_hoursAlive;
|
||||
const int m_state;
|
||||
const int m_spentJediSkillPoints;
|
||||
const int m_faction;
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
inline const NetworkId & MessageQueueJediData::getId() const
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
|
||||
inline const Unicode::String & MessageQueueJediData::getName() const
|
||||
{
|
||||
return m_name;
|
||||
}
|
||||
|
||||
inline const Vector & MessageQueueJediData::getLocation() const
|
||||
{
|
||||
return m_location;
|
||||
}
|
||||
|
||||
inline const std::string & MessageQueueJediData::getScene() const
|
||||
{
|
||||
return m_scene;
|
||||
}
|
||||
|
||||
inline int MessageQueueJediData::getVisibility() const
|
||||
{
|
||||
return m_visibility;
|
||||
}
|
||||
|
||||
inline int MessageQueueJediData::getBountyValue() const
|
||||
{
|
||||
return m_bountyValue;
|
||||
}
|
||||
|
||||
inline int MessageQueueJediData::getLevel() const
|
||||
{
|
||||
return m_level;
|
||||
}
|
||||
|
||||
inline int MessageQueueJediData::getHoursAlive() const
|
||||
{
|
||||
return m_hoursAlive;
|
||||
}
|
||||
|
||||
inline int MessageQueueJediData::getState() const
|
||||
{
|
||||
return m_state;
|
||||
}
|
||||
|
||||
inline int MessageQueueJediData::getSpentJediSkillPoints() const
|
||||
{
|
||||
return m_spentJediSkillPoints;
|
||||
}
|
||||
|
||||
inline int MessageQueueJediData::getFaction() const
|
||||
{
|
||||
return m_faction;
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
|
||||
#endif // INCLUDED_MessageQueueJediData_H
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageQueueJediLocation.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "swgServerNetworkMessages/FirstSwgServerNetworkMessages.h"
|
||||
#include "swgServerNetworkMessages/MessageQueueJediLocation.h"
|
||||
|
||||
#include <string>
|
||||
#include "sharedFoundation/MemoryBlockManager.h"
|
||||
#include "sharedFoundation/ExitChain.h"
|
||||
#include "sharedFoundation/GameControllerMessage.h"
|
||||
#include "sharedMathArchive/VectorArchive.h"
|
||||
#include "sharedNetworkMessages/ControllerMessageFactory.h"
|
||||
|
||||
//===================================================================
|
||||
|
||||
CONTROLLER_MESSAGE_IMPLEMENTATION(MessageQueueJediLocation, CM_updateJediLocation);
|
||||
|
||||
|
||||
//===================================================================
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueueJediLocation::MessageQueueJediLocation(const NetworkId & id,
|
||||
const Vector & location, const std::string & scene) :
|
||||
m_id(id),
|
||||
m_location(location),
|
||||
m_scene(scene)
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueueJediLocation::~MessageQueueJediLocation()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MessageQueueJediLocation::pack(const MessageQueue::Data* const data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueJediLocation* const msg = safe_cast<const MessageQueueJediLocation*> (data);
|
||||
if (msg)
|
||||
{
|
||||
Archive::put(target, msg->m_id);
|
||||
Archive::put(target, msg->m_location);
|
||||
Archive::put(target, msg->m_scene);
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueue::Data* MessageQueueJediLocation::unpack(Archive::ReadIterator & source)
|
||||
{
|
||||
NetworkId id;
|
||||
Vector location;
|
||||
std::string scene;
|
||||
|
||||
Archive::get(source, id);
|
||||
Archive::get(source, location);
|
||||
Archive::get(source, scene);
|
||||
|
||||
return new MessageQueueJediLocation(id, location, scene);
|
||||
}
|
||||
|
||||
|
||||
// ======================================================================
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
//========================================================================
|
||||
//
|
||||
// MessageQueueJediLocation.h
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
|
||||
#ifndef INCLUDED_MessageQueueJediLocation_H
|
||||
#define INCLUDED_MessageQueueJediLocation_H
|
||||
|
||||
#include "sharedFoundation/MessageQueue.h"
|
||||
#include "sharedFoundation/NetworkId.h"
|
||||
#include "sharedMath/Vector.h"
|
||||
#include "sharedNetworkMessages/ControllerMessageMacros.h"
|
||||
|
||||
|
||||
class MemoryBlockManager;
|
||||
|
||||
|
||||
/**
|
||||
*/
|
||||
class MessageQueueJediLocation : public MessageQueue::Data
|
||||
{
|
||||
CONTROLLER_MESSAGE_INTERFACE;
|
||||
|
||||
public:
|
||||
MessageQueueJediLocation(const NetworkId & id, const Vector & location, const std::string & scene);
|
||||
virtual ~MessageQueueJediLocation();
|
||||
|
||||
MessageQueueJediLocation& operator= (const MessageQueueJediLocation & source);
|
||||
MessageQueueJediLocation(const MessageQueueJediLocation & source);
|
||||
|
||||
const NetworkId & getId() const;
|
||||
const Vector & getLocation() const;
|
||||
const std::string & getScene() const;
|
||||
|
||||
private:
|
||||
const NetworkId m_id;
|
||||
const Vector m_location;
|
||||
const std::string m_scene;
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
inline const NetworkId & MessageQueueJediLocation::getId() const
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
|
||||
inline const Vector & MessageQueueJediLocation::getLocation() const
|
||||
{
|
||||
return m_location;
|
||||
}
|
||||
|
||||
inline const std::string & MessageQueueJediLocation::getScene() const
|
||||
{
|
||||
return m_scene;
|
||||
}
|
||||
|
||||
|
||||
// ======================================================================
|
||||
|
||||
|
||||
#endif // INCLUDED_MessageQueueJediLocation_H
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageQueueRequestJediBounty.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "swgServerNetworkMessages/FirstSwgServerNetworkMessages.h"
|
||||
#include "swgServerNetworkMessages/MessageQueueRequestJediBounty.h"
|
||||
|
||||
#include <string>
|
||||
#include "sharedFoundation/MemoryBlockManager.h"
|
||||
#include "sharedFoundation/ExitChain.h"
|
||||
#include "sharedFoundation/GameControllerMessage.h"
|
||||
#include "sharedMathArchive/VectorArchive.h"
|
||||
#include "sharedNetworkMessages/ControllerMessageFactory.h"
|
||||
|
||||
//===================================================================
|
||||
|
||||
CONTROLLER_MESSAGE_IMPLEMENTATION(MessageQueueRequestJediBounty, CM_requestJediBounty);
|
||||
|
||||
//===================================================================
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueueRequestJediBounty::MessageQueueRequestJediBounty(const NetworkId & targetId,
|
||||
const NetworkId & hunterId, const std::string & successCallback,
|
||||
const std::string & failCallback, const NetworkId & callbackObjectId) :
|
||||
m_targetId(targetId),
|
||||
m_hunterId(hunterId),
|
||||
m_successCallback(successCallback),
|
||||
m_failCallback(failCallback),
|
||||
m_callbackObjectId(callbackObjectId)
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueueRequestJediBounty::~MessageQueueRequestJediBounty()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MessageQueueRequestJediBounty::pack(const MessageQueue::Data* const data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueRequestJediBounty* const msg = safe_cast<const MessageQueueRequestJediBounty*> (data);
|
||||
if (msg)
|
||||
{
|
||||
Archive::put(target, msg->m_targetId);
|
||||
Archive::put(target, msg->m_hunterId);
|
||||
Archive::put(target, msg->m_successCallback);
|
||||
Archive::put(target, msg->m_failCallback);
|
||||
Archive::put(target, msg->m_callbackObjectId);
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueue::Data* MessageQueueRequestJediBounty::unpack(Archive::ReadIterator & source)
|
||||
{
|
||||
NetworkId targetId;
|
||||
NetworkId hunterId;
|
||||
std::string successCallback;
|
||||
std::string failCallback;
|
||||
NetworkId callbackObjectId;
|
||||
|
||||
Archive::get(source, targetId);
|
||||
Archive::get(source, hunterId);
|
||||
Archive::get(source, successCallback);
|
||||
Archive::get(source, failCallback);
|
||||
Archive::get(source, callbackObjectId);
|
||||
|
||||
return new MessageQueueRequestJediBounty(targetId, hunterId, successCallback,
|
||||
failCallback, callbackObjectId);
|
||||
}
|
||||
|
||||
|
||||
// ======================================================================
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
//========================================================================
|
||||
//
|
||||
// MessageQueueRequestJediBounty.h
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
|
||||
#ifndef INCLUDED_MessageQueueRequestJediBounty_H
|
||||
#define INCLUDED_MessageQueueRequestJediBounty_H
|
||||
|
||||
#include "sharedFoundation/MessageQueue.h"
|
||||
#include "sharedFoundation/NetworkId.h"
|
||||
#include "sharedNetworkMessages/ControllerMessageMacros.h"
|
||||
|
||||
class MemoryBlockManager;
|
||||
|
||||
/**
|
||||
*/
|
||||
class MessageQueueRequestJediBounty : public MessageQueue::Data
|
||||
{
|
||||
CONTROLLER_MESSAGE_INTERFACE;
|
||||
|
||||
public:
|
||||
MessageQueueRequestJediBounty(const NetworkId & targetId, const NetworkId & hunterId, const std::string & successCallback, const std::string & failCallback, const NetworkId & callbackObjectId);
|
||||
virtual ~MessageQueueRequestJediBounty();
|
||||
|
||||
MessageQueueRequestJediBounty& operator= (const MessageQueueRequestJediBounty & source);
|
||||
MessageQueueRequestJediBounty(const MessageQueueRequestJediBounty & source);
|
||||
|
||||
const NetworkId & getTargetId() const;
|
||||
const NetworkId & getHunterId() const;
|
||||
const std::string & getSuccessCallback() const;
|
||||
const std::string & getFailCallback() const;
|
||||
const NetworkId & getCallbackObjectId() const;
|
||||
|
||||
private:
|
||||
const NetworkId m_targetId;
|
||||
const NetworkId m_hunterId;
|
||||
const std::string m_successCallback;
|
||||
const std::string m_failCallback;
|
||||
const NetworkId m_callbackObjectId;
|
||||
};
|
||||
|
||||
|
||||
// ======================================================================
|
||||
|
||||
inline const NetworkId & MessageQueueRequestJediBounty::getTargetId() const
|
||||
{
|
||||
return m_targetId;
|
||||
}
|
||||
|
||||
inline const NetworkId & MessageQueueRequestJediBounty::getHunterId() const
|
||||
{
|
||||
return m_hunterId;
|
||||
}
|
||||
|
||||
inline const std::string & MessageQueueRequestJediBounty::getSuccessCallback() const
|
||||
{
|
||||
return m_successCallback;
|
||||
}
|
||||
|
||||
inline const std::string & MessageQueueRequestJediBounty::getFailCallback() const
|
||||
{
|
||||
return m_failCallback;
|
||||
}
|
||||
|
||||
inline const NetworkId & MessageQueueRequestJediBounty::getCallbackObjectId() const
|
||||
{
|
||||
return m_callbackObjectId;
|
||||
}
|
||||
|
||||
|
||||
// ======================================================================
|
||||
|
||||
|
||||
#endif // INCLUDED_MessageQueueRequestJediBounty_H
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageQueueScriptTransferMoney.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "swgServerNetworkMessages/FirstSwgServerNetworkMessages.h"
|
||||
#include "swgServerNetworkMessages/MessageQueueScriptTransferMoney.h"
|
||||
|
||||
#include <string>
|
||||
#include "sharedFoundation/MemoryBlockManager.h"
|
||||
#include "sharedFoundation/ExitChain.h"
|
||||
#include "sharedFoundation/GameControllerMessage.h"
|
||||
#include "sharedNetworkMessages/ControllerMessageFactory.h"
|
||||
|
||||
//===================================================================
|
||||
|
||||
CONTROLLER_MESSAGE_IMPLEMENTATION(MessageQueueScriptTransferMoney, CM_scriptTransferMoney);
|
||||
|
||||
// ======================================================================
|
||||
|
||||
MessageQueueScriptTransferMoney::MessageQueueScriptTransferMoney(TransactionType typeId, const NetworkId &target, const std::string &namedAccount, int amount, const NetworkId &replyTo, const std::string &successCallback, const std::string &failCallback, const std::vector<int8> &packedDictionary) :
|
||||
m_typeId (typeId),
|
||||
m_target (target),
|
||||
m_namedAccount (namedAccount),
|
||||
m_amount (amount),
|
||||
m_replyTo (replyTo),
|
||||
m_successCallback (successCallback),
|
||||
m_failCallback (failCallback),
|
||||
m_packedDictionary (packedDictionary)
|
||||
{
|
||||
DEBUG_FATAL(target != NetworkId::cms_invalid && namedAccount.size() > 0,("Target cannot be specified if a named account is specified.\n"));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueueScriptTransferMoney::~MessageQueueScriptTransferMoney()
|
||||
{
|
||||
}
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageQueueScriptTransferMoney::pack(const MessageQueue::Data* const data, Archive::ByteStream & target)
|
||||
{
|
||||
const MessageQueueScriptTransferMoney* const msg = safe_cast<const MessageQueueScriptTransferMoney*> (data);
|
||||
if (msg)
|
||||
{
|
||||
Archive::put (target, static_cast<int>(msg->getTypeId()));
|
||||
Archive::put (target, msg->getTarget());
|
||||
Archive::put (target, msg->getNamedAccount());
|
||||
Archive::put (target, msg->getAmount());
|
||||
Archive::put (target, msg->getReplyTo());
|
||||
Archive::put (target, msg->getSuccessCallback());
|
||||
Archive::put (target, msg->getFailCallback());
|
||||
Archive::put (target, msg->getPackedDictionary());
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
MessageQueue::Data* MessageQueueScriptTransferMoney::unpack(Archive::ReadIterator & source)
|
||||
{
|
||||
int typeId;
|
||||
NetworkId target;
|
||||
std::string namedAccount;
|
||||
int amount;
|
||||
NetworkId replyTo;
|
||||
std::string successCallback;
|
||||
std::string failCallback;
|
||||
std::vector<int8> packedDictionary;
|
||||
|
||||
Archive::get (source, typeId);
|
||||
Archive::get (source, target);
|
||||
Archive::get (source, namedAccount);
|
||||
Archive::get (source, amount);
|
||||
Archive::get (source, replyTo);
|
||||
Archive::get (source, successCallback);
|
||||
Archive::get (source, failCallback);
|
||||
Archive::get (source, packedDictionary);
|
||||
|
||||
return new MessageQueueScriptTransferMoney(static_cast<MessageQueueScriptTransferMoney::TransactionType>(typeId),target,namedAccount,amount,replyTo,successCallback,failCallback,packedDictionary);
|
||||
}
|
||||
|
||||
|
||||
// ======================================================================
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
//========================================================================
|
||||
//
|
||||
// MessageQueueResourcePoolCollectResource.h.h
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
|
||||
#ifndef INCLUDED_MessageQueueScriptTransferMoney_H
|
||||
#define INCLUDED_MessageQueueScriptTransferMoney_H
|
||||
|
||||
#include "sharedFoundation/MessageQueue.h"
|
||||
#include "sharedFoundation/NetworkId.h"
|
||||
#include "sharedNetworkMessages/ControllerMessageMacros.h"
|
||||
|
||||
class MemoryBlockManager;
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Sent by: Any script
|
||||
* Sent to: Any ServerObject
|
||||
* Action: Do the described money transfer, then send the results to a
|
||||
* script callback.
|
||||
*/
|
||||
|
||||
class MessageQueueScriptTransferMoney : public MessageQueue::Data
|
||||
{
|
||||
CONTROLLER_MESSAGE_INTERFACE;
|
||||
|
||||
public:
|
||||
enum TransactionType {TT_bankTransfer, TT_cashTransfer, TT_bankWithdrawal, TT_bankDeposit, TT_bankTransferToNamedAccount, TT_bankTransferFromNamedAccount};
|
||||
|
||||
public:
|
||||
MessageQueueScriptTransferMoney(TransactionType typeId, const NetworkId &target, const std::string &namedAccount, int amount, const NetworkId &replyTo, const std::string &successCallback, const std::string &failCallback, const stdvector<int8>::fwd &packedDictionary);
|
||||
virtual ~MessageQueueScriptTransferMoney();
|
||||
|
||||
TransactionType getTypeId() const;
|
||||
const NetworkId & getTarget() const;
|
||||
const std::string & getNamedAccount() const;
|
||||
int getAmount() const;
|
||||
const NetworkId & getReplyTo() const;
|
||||
const std::string & getSuccessCallback() const;
|
||||
const std::string & getFailCallback() const;
|
||||
const stdvector<int8>::fwd & getPackedDictionary() const;
|
||||
|
||||
private:
|
||||
TransactionType m_typeId;
|
||||
NetworkId m_target;
|
||||
std::string m_namedAccount;
|
||||
int m_amount;
|
||||
NetworkId m_replyTo;
|
||||
std::string m_successCallback;
|
||||
std::string m_failCallback;
|
||||
stdvector<int8>::fwd m_packedDictionary;
|
||||
|
||||
private:
|
||||
MessageQueueScriptTransferMoney& operator= (const MessageQueueScriptTransferMoney & source);
|
||||
MessageQueueScriptTransferMoney(const MessageQueueScriptTransferMoney & source);
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
inline MessageQueueScriptTransferMoney::TransactionType MessageQueueScriptTransferMoney::getTypeId() const
|
||||
{
|
||||
return m_typeId;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & MessageQueueScriptTransferMoney::getTarget() const
|
||||
{
|
||||
return m_target;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & MessageQueueScriptTransferMoney::getNamedAccount() const
|
||||
{
|
||||
return m_namedAccount;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline int MessageQueueScriptTransferMoney::getAmount() const
|
||||
{
|
||||
return m_amount;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId & MessageQueueScriptTransferMoney::getReplyTo() const
|
||||
{
|
||||
return m_replyTo;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & MessageQueueScriptTransferMoney::getSuccessCallback() const
|
||||
{
|
||||
return m_successCallback;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const std::string & MessageQueueScriptTransferMoney::getFailCallback() const
|
||||
{
|
||||
return m_failCallback;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const stdvector<int8>::fwd & MessageQueueScriptTransferMoney::getPackedDictionary() const
|
||||
{
|
||||
return m_packedDictionary;
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageQueueActivateInstallation.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "swgServerNetworkMessages/FirstSwgServerNetworkMessages.h"
|
||||
#include "MessageQueueActivateInstallation.h"
|
||||
|
||||
//#include <string>
|
||||
|
||||
// ======================================================================
|
||||
|
||||
MessageQueueActivateInstallation::MessageQueueActivateInstallation()
|
||||
{
|
||||
} // MessageQueueActivateInstallation::MessageQueueActivateInstallation
|
||||
|
||||
// ======================================================================
|
||||
|
||||
MessageQueueActivateInstallation::~MessageQueueActivateInstallation()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
//========================================================================
|
||||
//
|
||||
// MessageQueueActivateInstallation.h
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
|
||||
#ifndef INCLUDED_MessageQueueActivateInstallation_H
|
||||
#define INCLUDED_MessageQueueActivateInstallation_H
|
||||
|
||||
#include "sharedFoundation/MessageQueue.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Message sent to a installation to tell it to activate itself.
|
||||
*/
|
||||
|
||||
class MessageQueueActivateInstallation : public MessageQueue::Data
|
||||
{
|
||||
public:
|
||||
MessageQueueActivateInstallation();
|
||||
virtual ~MessageQueueActivateInstallation();
|
||||
|
||||
MessageQueueActivateInstallation& operator= (const MessageQueueActivateInstallation & source);
|
||||
MessageQueueActivateInstallation(const MessageQueueActivateInstallation & source);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#endif // INCLUDED_MessageQueueActivateInstallation_H
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageQueueDeactivateInstallation.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "swgServerNetworkMessages/FirstSwgServerNetworkMessages.h"
|
||||
#include "MessageQueueDeactivateInstallation.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
MessageQueueDeactivateInstallation::MessageQueueDeactivateInstallation()
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueueDeactivateInstallation::~MessageQueueDeactivateInstallation()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
//========================================================================
|
||||
//
|
||||
// MessageQueueDeactivateInstallation.h
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
|
||||
#ifndef INCLUDED_MessageQueueDeactivateInstallation_H
|
||||
#define INCLUDED_MessageQueueDeactivateInstallation_H
|
||||
|
||||
#include "sharedFoundation/MessageQueue.h"
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Message sent to a installation to tell it to deactivate itself.
|
||||
*/
|
||||
|
||||
class MessageQueueDeactivateInstallation : public MessageQueue::Data
|
||||
{
|
||||
public:
|
||||
MessageQueueDeactivateInstallation();
|
||||
virtual ~MessageQueueDeactivateInstallation();
|
||||
|
||||
MessageQueueDeactivateInstallation& operator= (const MessageQueueDeactivateInstallation & source);
|
||||
MessageQueueDeactivateInstallation(const MessageQueueDeactivateInstallation & source);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
#endif
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageQueueInstallationHarvest.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "swgServerNetworkMessages/FirstSwgServerNetworkMessages.h"
|
||||
#include "MessageQueueInstallationHarvest.h"
|
||||
|
||||
#include "sharedFoundation/ExitChain.h"
|
||||
#include "sharedFoundation/GameControllerMessage.h"
|
||||
#include "sharedFoundation/MemoryBlockManager.h"
|
||||
#include "sharedNetworkMessages/ControllerMessageFactory.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
CONTROLLER_MESSAGE_IMPLEMENTATION(MessageQueueInstallationHarvest, CM_installationHarvest);
|
||||
|
||||
// ======================================================================
|
||||
|
||||
MessageQueueInstallationHarvest::MessageQueueInstallationHarvest()
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueueInstallationHarvest::~MessageQueueInstallationHarvest()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void MessageQueueInstallationHarvest::pack(const MessageQueue::Data* const data, Archive::ByteStream & target)
|
||||
{
|
||||
UNREF(data);
|
||||
UNREF(target);
|
||||
// const MessageQueueInstallationHarvest* const msg = safe_cast<const MessageQueueInstallationHarvest*> (data);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueue::Data* MessageQueueInstallationHarvest::unpack(Archive::ReadIterator & source)
|
||||
{
|
||||
UNREF(source);
|
||||
return new MessageQueueInstallationHarvest();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
//========================================================================
|
||||
//
|
||||
// MessageQueueInstallationHarvest.h
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
|
||||
#ifndef INCLUDED_MessageQueueInstallationHarvest_H
|
||||
#define INCLUDED_MessageQueueInstallationHarvest_H
|
||||
|
||||
#include "sharedFoundation/MessageQueue.h"
|
||||
#include "sharedNetworkMessages/ControllerMessageMacros.h"
|
||||
|
||||
class MemoryBlockManager;
|
||||
/**
|
||||
* Sent by: anything
|
||||
* Sent to: installation
|
||||
* Action: Causes the installation to place all the resources/objects it has gathered
|
||||
* so far into its "hopper"
|
||||
*/
|
||||
|
||||
class MessageQueueInstallationHarvest : public MessageQueue::Data
|
||||
{
|
||||
CONTROLLER_MESSAGE_INTERFACE;
|
||||
|
||||
public:
|
||||
MessageQueueInstallationHarvest();
|
||||
virtual ~MessageQueueInstallationHarvest();
|
||||
|
||||
MessageQueueInstallationHarvest& operator= (const MessageQueueInstallationHarvest & source);
|
||||
MessageQueueInstallationHarvest(const MessageQueueInstallationHarvest & source);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageQueueResourceAdd.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "swgServerNetworkMessages/FirstSwgServerNetworkMessages.h"
|
||||
#include "MessageQueueResourceAdd.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
// ======================================================================
|
||||
|
||||
MessageQueueResourceAdd::MessageQueueResourceAdd(const NetworkId &resourceId, int32 amount) :
|
||||
m_resourceId(resourceId),
|
||||
m_amount(amount)
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
MessageQueueResourceAdd::~MessageQueueResourceAdd()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
//========================================================================
|
||||
//
|
||||
// MessageQueueResourceAdd.h
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
|
||||
#ifndef INCLUDED_MessageQueueResourceAdd_H
|
||||
#define INCLUDED_MessageQueueResourceAdd_H
|
||||
|
||||
#include "sharedFoundation/MessageQueue.h"
|
||||
#include "sharedFoundation/NetworkId.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class MessageQueueResourceAdd : public MessageQueue::Data
|
||||
{
|
||||
public:
|
||||
MessageQueueResourceAdd(const NetworkId &resourceId, int32 amount);
|
||||
virtual ~MessageQueueResourceAdd();
|
||||
|
||||
MessageQueueResourceAdd& operator= (const MessageQueueResourceAdd & source);
|
||||
MessageQueueResourceAdd(const MessageQueueResourceAdd & source);
|
||||
|
||||
const NetworkId &getResourceId() const;
|
||||
int getAmount() const;
|
||||
|
||||
private:
|
||||
NetworkId m_resourceId;
|
||||
int m_amount;
|
||||
};
|
||||
|
||||
inline const NetworkId &MessageQueueResourceAdd::getResourceId() const
|
||||
{
|
||||
return m_resourceId;
|
||||
}
|
||||
|
||||
inline int MessageQueueResourceAdd::getAmount() const
|
||||
{
|
||||
return m_amount;
|
||||
}
|
||||
|
||||
#endif // INCLUDED_MessageQueueResourceAdd_H
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageQueueResourceFinishHarvest.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "swgServerNetworkMessages/FirstSwgServerNetworkMessages.h"
|
||||
#include "MessageQueueResourceFinishHarvest.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
MessageQueueResourceFinishHarvest::MessageQueueResourceFinishHarvest(float amountCollected, float tickCount, const NetworkId &resourceId) :
|
||||
m_amountCollected(amountCollected),
|
||||
m_tickCount(tickCount),
|
||||
m_resourceId(resourceId)
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueueResourceFinishHarvest::~MessageQueueResourceFinishHarvest()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
//========================================================================
|
||||
//
|
||||
// MessageQueueResourceFinishHarvest.h
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
|
||||
#ifndef INCLUDED_MessageQueueResourceFinishHarvest_H
|
||||
#define INCLUDED_MessageQueueResourceFinishHarvest_H
|
||||
|
||||
#include "sharedFoundation/MessageQueue.h"
|
||||
#include "sharedFoundation/NetworkId.h"
|
||||
|
||||
/**
|
||||
* Sent by: Resource Pool
|
||||
* Sent to: Harvester
|
||||
* Action: Last step of the harvest action. The resource pool reports
|
||||
* the amount collected and the new tick count.
|
||||
*/
|
||||
|
||||
class MessageQueueResourceFinishHarvest : public MessageQueue::Data
|
||||
{
|
||||
public:
|
||||
MessageQueueResourceFinishHarvest(float amountCollected, float tickCount, const NetworkId &resourceId);
|
||||
virtual ~MessageQueueResourceFinishHarvest();
|
||||
|
||||
MessageQueueResourceFinishHarvest& operator= (const MessageQueueResourceFinishHarvest & source);
|
||||
MessageQueueResourceFinishHarvest(const MessageQueueResourceFinishHarvest & source);
|
||||
|
||||
float getAmountCollected() const;
|
||||
float getTickCount() const;
|
||||
const NetworkId &getResourceId() const;
|
||||
|
||||
private:
|
||||
float m_amountCollected;
|
||||
float m_tickCount;
|
||||
NetworkId m_resourceId;
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
inline float MessageQueueResourceFinishHarvest::getTickCount() const
|
||||
{
|
||||
return m_tickCount;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline float MessageQueueResourceFinishHarvest::getAmountCollected() const
|
||||
{
|
||||
return m_amountCollected;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const NetworkId &MessageQueueResourceFinishHarvest::getResourceId() const
|
||||
{
|
||||
return m_resourceId;
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageQueueResourceSetInstalledEfficiency.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "swgServerNetworkMessages/FirstSwgServerNetworkMessages.h"
|
||||
#include "MessageQueueResourceSetInstalledEfficiency.h"
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueueResourceSetInstalledEfficiency::MessageQueueResourceSetInstalledEfficiency(float installedEfficiency, float tickCount) :
|
||||
m_installedEfficiency(installedEfficiency),
|
||||
m_tickCount(tickCount)
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueueResourceSetInstalledEfficiency::~MessageQueueResourceSetInstalledEfficiency()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
//========================================================================
|
||||
//
|
||||
// MessageQueueResourceSetInstalledEfficiency.h
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
|
||||
#ifndef INCLUDED_MessageQueueResourceSetInstalledEfficiency_H
|
||||
#define INCLUDED_MessageQueueResourceSetInstalledEfficiency_H
|
||||
|
||||
#include "sharedFoundation/MessageQueue.h"
|
||||
|
||||
/**
|
||||
* Sent by: Resource Pool
|
||||
* Sent to: Harvester
|
||||
* Action: Informs the harvester what its efficiency is, based on its
|
||||
* installed location
|
||||
*/
|
||||
|
||||
class MessageQueueResourceSetInstalledEfficiency : public MessageQueue::Data
|
||||
{
|
||||
public:
|
||||
MessageQueueResourceSetInstalledEfficiency(float installedEfficiency, float tickCount);
|
||||
virtual ~MessageQueueResourceSetInstalledEfficiency();
|
||||
|
||||
MessageQueueResourceSetInstalledEfficiency& operator= (const MessageQueueResourceSetInstalledEfficiency & source);
|
||||
MessageQueueResourceSetInstalledEfficiency(const MessageQueueResourceSetInstalledEfficiency & source);
|
||||
|
||||
float getInstalledEfficiency() const;
|
||||
float getTickCount() const;
|
||||
|
||||
private:
|
||||
float m_installedEfficiency;
|
||||
float m_tickCount;
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
inline float MessageQueueResourceSetInstalledEfficiency::getInstalledEfficiency() const
|
||||
{
|
||||
return m_installedEfficiency;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline float MessageQueueResourceSetInstalledEfficiency::getTickCount() const
|
||||
{
|
||||
return m_tickCount;
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageQueueResourceTypeDepleted.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "swgServerNetworkMessages/FirstSwgServerNetworkMessages.h"
|
||||
#include "MessageQueueResourceTypeDepleted.h"
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueueResourceTypeDepleted::MessageQueueResourceTypeDepleted(NetworkId typeId) :
|
||||
m_typeId(typeId)
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueueResourceTypeDepleted::~MessageQueueResourceTypeDepleted()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
//========================================================================
|
||||
//
|
||||
// MessageQueueResourceTypeDepleted.h
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
|
||||
#ifndef INCLUDED_MessageQueueResourceTypeDepleted_H
|
||||
#define INCLUDED_MessageQueueResourceTypeDepleted_H
|
||||
|
||||
#include "sharedFoundation/MessageQueue.h"
|
||||
#include "sharedFoundation/NetworkId.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
/**
|
||||
* Sent by: Resource Type
|
||||
* Sent to: Resource Class
|
||||
* Action: Resource Type has been depleted. Spawn a new one or take other
|
||||
* appropriate action.
|
||||
*/
|
||||
|
||||
class MessageQueueResourceTypeDepleted : public MessageQueue::Data
|
||||
{
|
||||
public:
|
||||
MessageQueueResourceTypeDepleted(NetworkId typeId);
|
||||
virtual ~MessageQueueResourceTypeDepleted();
|
||||
|
||||
MessageQueueResourceTypeDepleted& operator= (const MessageQueueResourceTypeDepleted & source);
|
||||
MessageQueueResourceTypeDepleted(const MessageQueueResourceTypeDepleted & source);
|
||||
|
||||
public:
|
||||
NetworkId getTypeId() const;
|
||||
|
||||
private:
|
||||
NetworkId m_typeId;
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
inline NetworkId MessageQueueResourceTypeDepleted::getTypeId() const
|
||||
{
|
||||
return m_typeId;
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageQueuePlanetAddTravelPoint.cpp
|
||||
// asommers
|
||||
//
|
||||
// copyright 2002, sony online entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "swgServerNetworkMessages/FirstSwgServerNetworkMessages.h"
|
||||
#include "swgServerNetworkMessages/MessageQueuePlanetAddTravelPoint.h"
|
||||
|
||||
#include "sharedFoundation/ExitChain.h"
|
||||
#include "sharedFoundation/GameControllerMessage.h"
|
||||
#include "sharedFoundation/MemoryBlockManager.h"
|
||||
#include "sharedMathArchive/VectorArchive.h"
|
||||
#include "sharedNetworkMessages/ControllerMessageFactory.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
CONTROLLER_MESSAGE_IMPLEMENTATION_WITH_ARCHIVE (MessageQueuePlanetAddTravelPoint, CM_planetAddTravelPoint);
|
||||
|
||||
// ======================================================================
|
||||
|
||||
MessageQueuePlanetAddTravelPoint::MessageQueuePlanetAddTravelPoint (const std::string& travelPointName, const Vector& position_w, const int cost, const bool interplanetary, const uint32 type) :
|
||||
MessageQueue::Data (),
|
||||
m_travelPointName (travelPointName),
|
||||
m_position_w (position_w),
|
||||
m_cost (cost),
|
||||
m_interplanetary (interplanetary),
|
||||
m_type (type)
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueuePlanetAddTravelPoint::~MessageQueuePlanetAddTravelPoint ()
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
const std::string& MessageQueuePlanetAddTravelPoint::getTravelPointName () const
|
||||
{
|
||||
return m_travelPointName;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
const Vector& MessageQueuePlanetAddTravelPoint::getPosition_w () const
|
||||
{
|
||||
return m_position_w;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
int MessageQueuePlanetAddTravelPoint::getCost () const
|
||||
{
|
||||
return m_cost;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool MessageQueuePlanetAddTravelPoint::getInterplanetary () const
|
||||
{
|
||||
return m_interplanetary;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
uint32 MessageQueuePlanetAddTravelPoint::getType () const
|
||||
{
|
||||
return m_type;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
MessageQueue::Data* MessageQueuePlanetAddTravelPointArchive::get (Archive::ReadIterator& source)
|
||||
{
|
||||
std::string name;
|
||||
Archive::get (source, name);
|
||||
|
||||
Vector position_w;
|
||||
Archive::get (source, position_w);
|
||||
|
||||
int cost = 0;
|
||||
Archive::get (source, cost);
|
||||
|
||||
bool interplanetary = false;
|
||||
Archive::get (source, interplanetary);
|
||||
|
||||
uint32 type = 0;
|
||||
Archive::get (source, type);
|
||||
|
||||
return new MessageQueuePlanetAddTravelPoint (name, position_w, cost, interplanetary, type);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
void MessageQueuePlanetAddTravelPointArchive::put (const MessageQueue::Data* const source, Archive::ByteStream& target)
|
||||
{
|
||||
const MessageQueuePlanetAddTravelPoint* const message = dynamic_cast<const MessageQueuePlanetAddTravelPoint*> (source);
|
||||
NOT_NULL (message);
|
||||
|
||||
if (message)
|
||||
{
|
||||
Archive::put (target, message->getTravelPointName ());
|
||||
Archive::put (target, message->getPosition_w ());
|
||||
Archive::put (target, message->getCost ());
|
||||
Archive::put (target, message->getInterplanetary ());
|
||||
Archive::put (target, message->getType ());
|
||||
}
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// MessageQueuePlanetAddTravelPoint.h
|
||||
// asommers
|
||||
//
|
||||
// copyright 2002, sony online entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_MessageQueuePlanetAddTravelPoint_H
|
||||
#define INCLUDED_MessageQueuePlanetAddTravelPoint_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedFoundation/MessageQueue.h"
|
||||
#include "sharedMath/Vector.h"
|
||||
#include "sharedNetworkMessages/ControllerMessageMacros.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class MessageQueuePlanetAddTravelPoint : public MessageQueue::Data
|
||||
{
|
||||
CONTROLLER_MESSAGE_INTERFACE;
|
||||
|
||||
public:
|
||||
|
||||
MessageQueuePlanetAddTravelPoint (const std::string& travelPointName, const Vector& position_w, int cost, bool interplanetary, uint32 type);
|
||||
virtual ~MessageQueuePlanetAddTravelPoint ();
|
||||
|
||||
const std::string& getTravelPointName () const;
|
||||
const Vector& getPosition_w () const;
|
||||
int getCost () const;
|
||||
bool getInterplanetary () const;
|
||||
uint32 getType () const;
|
||||
|
||||
private:
|
||||
|
||||
MessageQueuePlanetAddTravelPoint ();
|
||||
MessageQueuePlanetAddTravelPoint (const MessageQueuePlanetAddTravelPoint&);
|
||||
MessageQueuePlanetAddTravelPoint& operator= (const MessageQueuePlanetAddTravelPoint&);
|
||||
|
||||
private:
|
||||
|
||||
const std::string m_travelPointName;
|
||||
const Vector m_position_w;
|
||||
const int m_cost;
|
||||
const bool m_interplanetary;
|
||||
const uint32 m_type;
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class MessageQueuePlanetAddTravelPointArchive
|
||||
{
|
||||
public:
|
||||
|
||||
static MessageQueue::Data* get (Archive::ReadIterator& source);
|
||||
static void put (const MessageQueue::Data* source, Archive::ByteStream& target);
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
//========================================================================
|
||||
//
|
||||
// FirstSwgServerNetworkMessages.cpp
|
||||
//
|
||||
// copyright 2001 Sony Online Entertainment
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "swgServerNetworkMessages/FirstSwgServerNetworkMessages.h"
|
||||
Reference in New Issue
Block a user