Added serverNetworkMessages library

This commit is contained in:
Anonymous
2014-01-15 02:34:23 -07:00
parent 222d858a18
commit 77f207ef4e
698 changed files with 35405 additions and 2 deletions
@@ -0,0 +1,41 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "AcceptHighBidMessage.h"
AcceptHighBidMessage::AcceptHighBidMessage(Archive::ReadIterator & source) :
GameNetworkMessage("AcceptHighBidMessage"),
m_responseId(),
m_trackId(),
m_auctionId(),
m_playerId()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_auctionId);
AutoByteStream::addVariable(m_playerId);
unpack(source);
}
AcceptHighBidMessage::AcceptHighBidMessage(
int requestId,
const NetworkId & auctionId,
const NetworkId & playerId
) :
GameNetworkMessage("AcceptHighBidMessage"),
m_responseId(requestId),
m_trackId(0),
m_auctionId(auctionId),
m_playerId(playerId)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_auctionId);
AutoByteStream::addVariable(m_playerId);
}
AcceptHighBidMessage::~AcceptHighBidMessage()
{
}
@@ -0,0 +1,32 @@
#ifndef AcceptHighBidMessage_h
#define AcceptHighBidMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class AcceptHighBidMessage : public GameNetworkMessage
{
public:
AcceptHighBidMessage( int requestId, const NetworkId & auctionId, const NetworkId & playerId );
explicit AcceptHighBidMessage(Archive::ReadIterator & source);
~AcceptHighBidMessage();
const NetworkId & GetAuctionId() const {return m_auctionId.get();}
const NetworkId & GetPlayerId() const {return m_playerId.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_auctionId;
Archive::AutoVariable<NetworkId> m_playerId;
};
#endif
@@ -0,0 +1,123 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "AddAuctionMessage.h"
AddAuctionMessage::AddAuctionMessage(Archive::ReadIterator & source) :
GameNetworkMessage("AddAuctionMessage"),
m_responseId(),
m_trackId(),
m_ownerId(),
m_ownerName(),
m_minimumBid(),
m_auctionTimer(),
m_itemId(),
m_itemNameLength(),
m_itemName(),
m_itemType(),
m_itemTemplateId(),
m_expireTimer(),
m_locationId(),
m_location(),
m_flags(),
m_userDescriptionLength(),
m_userDescription(),
m_itemSize(),
m_vendorLimit(),
m_vendorItemLimit()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_ownerName);
AutoByteStream::addVariable(m_minimumBid);
AutoByteStream::addVariable(m_auctionTimer);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_itemNameLength);
AutoByteStream::addVariable(m_itemName);
AutoByteStream::addVariable(m_itemType);
AutoByteStream::addVariable(m_itemTemplateId);
AutoByteStream::addVariable(m_expireTimer);
AutoByteStream::addVariable(m_locationId);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_flags);
AutoByteStream::addVariable(m_userDescriptionLength);
AutoByteStream::addVariable(m_userDescription);
AutoByteStream::addVariable(m_attributes);
AutoByteStream::addVariable(m_itemSize);
AutoByteStream::addVariable(m_vendorLimit);
AutoByteStream::addVariable(m_vendorItemLimit);
unpack(source);
}
AddAuctionMessage::AddAuctionMessage(
int responseId,
const NetworkId & ownerId,
const std::string & ownerName,
int minimumBid,
int auctionTimer,
const NetworkId & itemId,
int itemNameLength,
const Unicode::String & itemName,
int itemType,
int itemTemplateId,
int expireTimer,
const NetworkId & locationId,
const std::string & location,
int flags,
int userDescriptionLength,
const Unicode::String & userDescription,
std::vector<std::pair<std::string, Unicode::String> > const & attributes,
int itemSize,
int vendorLimit,
int vendorItemLimit) :
GameNetworkMessage("AddAuctionMessage"),
m_responseId(responseId),
m_trackId(0),
m_ownerId(ownerId),
m_ownerName(ownerName),
m_minimumBid(minimumBid),
m_auctionTimer(auctionTimer),
m_itemId(itemId),
m_itemNameLength(itemNameLength),
m_itemName(itemName),
m_itemType(itemType),
m_itemTemplateId(itemTemplateId),
m_expireTimer(expireTimer),
m_locationId(locationId),
m_location(location),
m_flags(flags),
m_userDescriptionLength(userDescriptionLength),
m_userDescription(userDescription),
m_attributes(),
m_itemSize(itemSize),
m_vendorLimit(vendorLimit),
m_vendorItemLimit(vendorItemLimit)
{
m_attributes.set(attributes);
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_ownerName);
AutoByteStream::addVariable(m_minimumBid);
AutoByteStream::addVariable(m_auctionTimer);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_itemNameLength);
AutoByteStream::addVariable(m_itemName);
AutoByteStream::addVariable(m_itemType);
AutoByteStream::addVariable(m_itemTemplateId);
AutoByteStream::addVariable(m_expireTimer);
AutoByteStream::addVariable(m_locationId);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_flags);
AutoByteStream::addVariable(m_userDescriptionLength);
AutoByteStream::addVariable(m_userDescription);
AutoByteStream::addVariable(m_attributes);
AutoByteStream::addVariable(m_itemSize);
AutoByteStream::addVariable(m_vendorLimit);
AutoByteStream::addVariable(m_vendorItemLimit);
}
AddAuctionMessage::~AddAuctionMessage()
{
}
@@ -0,0 +1,91 @@
#ifndef ADDAUCTIONMESSAGE_H
#define ADDAUCTIONMESSAGE_H
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
#include "Unicode.h"
class AddAuctionMessage : public GameNetworkMessage
{
public:
explicit AddAuctionMessage(
int responseId,
const NetworkId & ownerId,
const std::string & ownerName,
int minimumBid,
int auctionTimer,
const NetworkId & itemId,
int itemNameLength,
const Unicode::String & itemName,
int itemType,
int itemTemplateId,
int expireTimer,
const NetworkId & locationId,
const std::string & location,
int flags,
int userDescriptionLength,
const Unicode::String & userDescription,
std::vector<std::pair<std::string, Unicode::String> > const & attributes,
int itemSize,
int vendorLimit,
int vendorItemLimit);
AddAuctionMessage(Archive::ReadIterator & source);
~AddAuctionMessage();
const NetworkId & GetOwnerId() const {return m_ownerId.get();}
const std::string & GetOwnerName() const {return m_ownerName.get();}
int GetMinimumBid() const {return m_minimumBid.get();}
int GetAuctionTimer() const {return m_auctionTimer.get();}
const NetworkId & GetItemId() const {return m_itemId.get();}
int GetItemNameLength() const {return m_itemNameLength.get();}
const Unicode::String & GetItemName() const {return m_itemName.get();}
int GetItemType() const {return m_itemType.get();}
int GetItemTemplateId() const {return m_itemTemplateId.get();}
int GetExpireTimer() const {return m_expireTimer.get();}
const NetworkId & GetLocationId() const {return m_locationId.get();}
const std::string & GetLocation() const {return m_location.get();}
int GetFlags() const {return m_flags.get();}
int GetUserDescriptionLength() const {return m_userDescriptionLength.get();}
const Unicode::String & GetUserDescription() const {return m_userDescription.get();}
// int GetOobLength() const {return m_oobLength.get();}
// const Unicode::String & GetOobData() const {return m_oobData.get();}
std::vector<std::pair<std::string, Unicode::String> > const & GetAttributes() const {return m_attributes.get();}
int GetItemSize() const {return m_itemSize.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
int GetVendorLimit() const {return m_vendorLimit.get();}
int GetVendorItemLimit() const {return m_vendorItemLimit.get();}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_ownerId;
Archive::AutoVariable<std::string> m_ownerName;
Archive::AutoVariable<int> m_minimumBid;
Archive::AutoVariable<int> m_auctionTimer;
Archive::AutoVariable<NetworkId> m_itemId;
Archive::AutoVariable<int> m_itemNameLength;
Archive::AutoVariable<Unicode::String> m_itemName;
Archive::AutoVariable<int> m_itemType;
Archive::AutoVariable<int> m_itemTemplateId;
Archive::AutoVariable<int> m_expireTimer;
Archive::AutoVariable<NetworkId> m_locationId;
Archive::AutoVariable<std::string> m_location;
Archive::AutoVariable<int> m_flags;
Archive::AutoVariable<int> m_userDescriptionLength;
Archive::AutoVariable<Unicode::String> m_userDescription;
Archive::AutoArray<std::pair<std::string, Unicode::String> > m_attributes;
Archive::AutoVariable<int> m_itemSize;
Archive::AutoVariable<int> m_vendorLimit;
Archive::AutoVariable<int> m_vendorItemLimit;
};
#endif
@@ -0,0 +1,53 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "AddBidMessage.h"
AddBidMessage::AddBidMessage(Archive::ReadIterator & source) :
GameNetworkMessage("AddBidMessage"),
m_responseId(),
m_trackId(),
m_auctionId(),
m_playerId(),
m_bid(),
m_maxProxyBid(),
m_playerName()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_auctionId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_bid);
AutoByteStream::addVariable(m_maxProxyBid);
AutoByteStream::addVariable(m_playerName);
unpack(source);
}
AddBidMessage::AddBidMessage(
int requestId,
const NetworkId & auctionId,
const NetworkId & playerId,
int bid,
int maxProxyBid,
const std::string & playerName
) :
GameNetworkMessage("AddBidMessage"),
m_responseId(requestId),
m_trackId(0),
m_auctionId(auctionId),
m_playerId(playerId),
m_bid(bid),
m_maxProxyBid(maxProxyBid),
m_playerName(playerName)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_auctionId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_bid);
AutoByteStream::addVariable(m_maxProxyBid);
AutoByteStream::addVariable(m_playerName);
}
AddBidMessage::~AddBidMessage()
{
}
@@ -0,0 +1,45 @@
#ifndef AddBidMessage_h
#define AddBidMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class AddBidMessage : public GameNetworkMessage
{
public:
AddBidMessage(
int requestId,
const NetworkId & auctionId,
const NetworkId & playerId,
int bid,
int maxProxyBid,
const std::string & playerName
);
AddBidMessage(Archive::ReadIterator & source);
~AddBidMessage();
const NetworkId & GetAuctionId() const {return m_auctionId.get();}
const NetworkId & GetPlayerId() const {return m_playerId.get();}
int GetBid() const {return m_bid.get();}
int GetMaxProxyBid() const {return m_maxProxyBid.get();}
const std::string & GetPlayerName() const {return m_playerName.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_auctionId;
Archive::AutoVariable<NetworkId> m_playerId;
Archive::AutoVariable<int> m_bid;
Archive::AutoVariable<int> m_maxProxyBid;
Archive::AutoVariable<std::string> m_playerName;
};
#endif
@@ -0,0 +1,124 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "AddImmediateAuctionMessage.h"
AddImmediateAuctionMessage::AddImmediateAuctionMessage(Archive::ReadIterator & source) :
GameNetworkMessage("AddImmediateAuctionMessage"),
m_responseId(),
m_trackId(),
m_ownerId(),
m_ownerName(),
m_price(),
m_auctionTimer(),
m_itemId(),
m_itemNameLength(),
m_itemName(),
m_itemType(),
m_itemTemplateId(),
m_expireTimer(),
m_locationId(),
m_location(),
m_flags(),
m_userDescriptionLength(),
m_userDescription(),
m_attributes(),
m_itemSize(),
m_vendorLimit(),
m_vendorItemLimit()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_ownerName);
AutoByteStream::addVariable(m_price);
AutoByteStream::addVariable(m_auctionTimer);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_itemNameLength);
AutoByteStream::addVariable(m_itemName);
AutoByteStream::addVariable(m_itemType);
AutoByteStream::addVariable(m_itemTemplateId);
AutoByteStream::addVariable(m_expireTimer);
AutoByteStream::addVariable(m_locationId);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_flags);
AutoByteStream::addVariable(m_userDescriptionLength);
AutoByteStream::addVariable(m_userDescription);
AutoByteStream::addVariable(m_attributes);
AutoByteStream::addVariable(m_itemSize);
AutoByteStream::addVariable(m_vendorLimit);
AutoByteStream::addVariable(m_vendorItemLimit);
unpack(source);
}
AddImmediateAuctionMessage::AddImmediateAuctionMessage(
int responseId,
const NetworkId & ownerId,
const std::string & ownerName,
int price,
int auctionTimer,
const NetworkId & itemId,
int itemNameLength,
const Unicode::String & itemName,
int itemType,
int itemTemplateId,
int expireTimer,
const NetworkId & locationId,
const std::string & location,
int flags,
int userDescriptionLength,
const Unicode::String & userDescription,
std::vector<std::pair<std::string, Unicode::String> > const & attributes,
int itemSize,
int vendorLimit,
int vendorItemLimit) :
GameNetworkMessage("AddImmediateAuctionMessage"),
m_responseId(responseId),
m_trackId(0),
m_ownerId(ownerId),
m_ownerName(ownerName),
m_price(price),
m_auctionTimer(auctionTimer),
m_itemId(itemId),
m_itemNameLength(itemNameLength),
m_itemName(itemName),
m_itemType(itemType),
m_itemTemplateId(itemTemplateId),
m_expireTimer(expireTimer),
m_locationId(locationId),
m_location(location),
m_flags(flags),
m_userDescriptionLength(userDescriptionLength),
m_userDescription(userDescription),
m_attributes(),
m_itemSize(itemSize),
m_vendorLimit(vendorLimit),
m_vendorItemLimit(vendorItemLimit)
{
m_attributes.set(attributes);
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_ownerName);
AutoByteStream::addVariable(m_price);
AutoByteStream::addVariable(m_auctionTimer);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_itemNameLength);
AutoByteStream::addVariable(m_itemName);
AutoByteStream::addVariable(m_itemType);
AutoByteStream::addVariable(m_itemTemplateId);
AutoByteStream::addVariable(m_expireTimer);
AutoByteStream::addVariable(m_locationId);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_flags);
AutoByteStream::addVariable(m_userDescriptionLength);
AutoByteStream::addVariable(m_userDescription);
AutoByteStream::addVariable(m_attributes);
AutoByteStream::addVariable(m_itemSize);
AutoByteStream::addVariable(m_vendorLimit);
AutoByteStream::addVariable(m_vendorItemLimit);
}
AddImmediateAuctionMessage::~AddImmediateAuctionMessage()
{
}
@@ -0,0 +1,87 @@
#ifndef AddImmediateAuction_h
#define AddImmediateAuction_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
#include "Unicode.h"
class AddImmediateAuctionMessage : public GameNetworkMessage
{
public:
AddImmediateAuctionMessage(
int responseId,
const NetworkId & ownerId,
const std::string & ownerName,
int price,
int auctionTimer,
const NetworkId & itemId,
int itemNameLength,
const Unicode::String & itemName,
int itemType,
int itemTemplateId,
int expireTimer,
const NetworkId & locationId,
const std::string & location,
int flags,
int userDescriptionLength,
const Unicode::String & userDescription,
std::vector<std::pair<std::string, Unicode::String> > const & attributes,
int itemSize,
int vendorLimit,
int vendorItemLimit);
AddImmediateAuctionMessage(Archive::ReadIterator & source);
~AddImmediateAuctionMessage();
const NetworkId & GetOwnerId() const {return m_ownerId.get();}
const std::string & GetOwnerName() const {return m_ownerName.get();}
int GetPrice() const {return m_price.get();}
int GetAuctionTimer() const {return m_auctionTimer.get();}
const NetworkId & GetItemId() const {return m_itemId.get();}
int GetItemNameLength() const {return m_itemNameLength.get();}
const Unicode::String & GetItemName() const {return m_itemName.get();}
int GetItemType() const {return m_itemType.get();}
int GetItemTemplateId() const {return m_itemTemplateId.get();}
int GetExpireTimer() const {return m_expireTimer.get();}
const std::string & GetLocation() const {return m_location.get();}
const NetworkId & GetLocationId() const {return m_locationId.get();}
int GetFlags() const {return m_flags.get();}
int GetUserDescriptionLength() const {return m_userDescriptionLength.get();}
const Unicode::String & GetUserDescription() const {return m_userDescription.get();}
std::vector<std::pair<std::string, Unicode::String> > const & GetAttributes() const {return m_attributes.get();}
int GetItemSize() const {return m_itemSize.get();}
int GetVendorLimit() const {return m_vendorLimit.get();}
int GetVendorItemLimit() const {return m_vendorItemLimit.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_ownerId;
Archive::AutoVariable<std::string> m_ownerName;
Archive::AutoVariable<int> m_price;
Archive::AutoVariable<int> m_auctionTimer;
Archive::AutoVariable<NetworkId> m_itemId;
Archive::AutoVariable<int> m_itemNameLength;
Archive::AutoVariable<Unicode::String> m_itemName;
Archive::AutoVariable<int> m_itemType;
Archive::AutoVariable<int> m_itemTemplateId;
Archive::AutoVariable<int> m_expireTimer;
Archive::AutoVariable<NetworkId> m_locationId;
Archive::AutoVariable<std::string> m_location;
Archive::AutoVariable<int> m_flags;
Archive::AutoVariable<int> m_userDescriptionLength;
Archive::AutoVariable<Unicode::String> m_userDescription;
Archive::AutoArray<std::pair<std::string, Unicode::String> > m_attributes;
Archive::AutoVariable<int> m_itemSize;
Archive::AutoVariable<int> m_vendorLimit;
Archive::AutoVariable<int> m_vendorItemLimit;
};
#endif
@@ -0,0 +1,76 @@
#ifndef AUCTIONBASE_H
#define AUCTIONBASE_H
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
// These ***MUST*** be kept in sync in src/engine/shared/library/sharedNetworkMessages/src/shared/clientGameServer/AuctionData.h and src/engine/server/library/serverNetworkMessages/src/shared/gameCommoditiesServer/AuctionBase.h
#define AUCTION_ALWAYS_PRESENT (1 << 5)
#define AUCTION_PREMIUM_AUCTION (1 << 10)
#define AUCTION_ACTIVE (1 << 11)
#define AUCTION_VENDOR_TRANSFER (1 << 12)
#define AUCTION_OFFERED_ITEM (1 << 14)
#define MAX_AUCTIONS_PER_PLAYER 25
#include "AuctionData.h"
#ifndef max
#define max(a, b) ((a > b) ? a : b)
#endif
#ifndef min
#define min(a, b) ((a < b) ? a : b)
#endif
enum AuctionSearchType
{
AST_ByCategory,
AST_ByLocation,
AST_ByAll,
AST_ByPlayerSales,
AST_ByPlayerBids,
AST_ByPlayerStockroom,
AST_ByVendorOffers,
AST_ByVendorSelling,
AST_ByVendorStockroom,
AST_ByPlayerOffersToVendor
};
// DANGER!!!!
// If adding any values to this enumeration, add the values to the
// end of the list. There are hard-coded values in script that
// rely upon these values not to change.
enum AuctionResultCode
{
ARC_Success = 0,
ARC_AuctionAlreadyExists,
ARC_AuctionExpired,
ARC_OwnerBidOnOwnItem,
ARC_BidTooLow,
ARC_AuctionDoesNotExist,
ARC_NotItemOwner,
ARC_NoBids,
ARC_LocationAlreadyExists,
ARC_AuctionAtVendorMarket,
ARC_NotVendorOwner,
ARC_SuccessPermanentAuction,
ARC_TooManyAuctions,
ARC_AuctionAlreadyCompleted,
ARC_VendorOwnerCanceledCompletedAuction,
ARC_BidTooHigh,
ARC_BidOutbid,
ARC_LocationVendorLimitExceeded,
ARC_AuctionVendorLimitExceeded,
ARC_AuctionVendorItemLimitExceeded,
ARC_VendorStatusEmpty, // vendor status must be consecutive and appear between ARC_VendorStatusEmpty and ARC_VendorRemoved
ARC_VendorStatusNotEmpty,
ARC_VendorUnaccessed,
ARC_VendorEndangered,
ARC_VendorRemoved,
ARC_InvalidBid
};
#endif
@@ -0,0 +1,54 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include <string.h>
#include "AuctionData.h"
AuctionDataHeader::AuctionDataHeader() :
type(0),
auctionId(),
itemId(),
itemNameLength(0),
itemName(),
minBid(0),
highBid(0),
timer(0),
buyNowPrice(0),
location(),
ownerId(),
highBidderId(),
maxProxyBid(0),
myBid(0),
itemType(0),
resourceContainerClassCrc(0),
flags(0),
entranceCharge(0)
{
}
AuctionDataHeader::AuctionDataHeader(const AuctionDataHeader & original) :
type(original.type),
auctionId(original.auctionId),
itemId(original.itemId),
itemNameLength(original.itemNameLength),
itemName(original.itemName),
minBid(original.minBid),
highBid(original.highBid),
timer(original.timer),
buyNowPrice(original.buyNowPrice),
location(original.location),
ownerId(original.ownerId),
highBidderId(original.highBidderId),
maxProxyBid(original.maxProxyBid),
myBid(original.myBid),
itemType(original.itemType),
resourceContainerClassCrc(original.resourceContainerClassCrc),
flags(original.flags),
entranceCharge(original.entranceCharge)
{
}
AuctionDataHeader::~AuctionDataHeader()
{
}
@@ -0,0 +1,45 @@
// AuctionData.h
#ifndef AUCTION_DATA_H
#define AUCTION_DATA_H
#include "sharedFoundation/FirstSharedFoundation.h"
#include "sharedFoundation/NetworkId.h"
#include "Unicode.h"
/// length of static memory used for storing location data
const int LOCATION_LENGTH = 256;
const int NAME_LENGTH = 64;
const int DESCRIPTION_LENGTH = 512;
// ----------------------------------------------------------------------
struct AuctionDataHeader {
AuctionDataHeader();
/// copy constructor
AuctionDataHeader(const AuctionDataHeader & original);
virtual ~AuctionDataHeader();
int type; /// was char
NetworkId auctionId; ///< identifies the auction in both client and server
NetworkId itemId; ///< identifies the item for sale
int itemNameLength;
Unicode::String itemName;
int minBid; ///< the minimum bid allowed for this auction
int highBid; ///< if non-zero, the highest current valid bid
int timer; ///< timeout for auction expiration
int buyNowPrice;
std::string location; ///< which auction house/spaceport is this item stored
NetworkId ownerId; ///< the identifier for the player that created this auction
NetworkId highBidderId; ///< identifies the player with the current high bid
int maxProxyBid; ///< if non-zero, the highest bid the current bidder will place
int myBid;
int itemType;
int resourceContainerClassCrc;
int flags;
int entranceCharge;
};
// ----------------------------------------------------------------------
#endif //AUCTION_DATA_H
@@ -0,0 +1,45 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "CancelAuctionMessage.h"
// namespace CommoditiesNamespace {
CancelAuctionMessage::CancelAuctionMessage(Archive::ReadIterator & source) :
GameNetworkMessage("CancelAuctionMessage"),
m_responseId(),
m_trackId(),
m_auctionId(),
m_playerId()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_auctionId);
AutoByteStream::addVariable(m_playerId);
unpack(source);
}
CancelAuctionMessage::CancelAuctionMessage(
int requestId,
const NetworkId & auctionId,
const NetworkId & playerId
) :
GameNetworkMessage("CancelAuctionMessage"),
m_responseId(requestId),
m_trackId(0),
m_auctionId(auctionId),
m_playerId(playerId)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_auctionId);
AutoByteStream::addVariable(m_playerId);
}
CancelAuctionMessage::~CancelAuctionMessage()
{
}
// }
@@ -0,0 +1,32 @@
#ifndef CancelAuctionMessage_h
#define CancelAuctionMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class CancelAuctionMessage : public GameNetworkMessage
{
public:
explicit CancelAuctionMessage( int requestId, const NetworkId & auctionId, const NetworkId & playerId );
CancelAuctionMessage(Archive::ReadIterator & source);
~CancelAuctionMessage();
const NetworkId & GetAuctionId() const {return m_auctionId.get();}
const NetworkId & GetPlayerId() const {return m_playerId.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_auctionId;
Archive::AutoVariable<NetworkId> m_playerId;
};
#endif
@@ -0,0 +1,30 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "CleanupInvalidItemRetrievalMessage.h"
CleanupInvalidItemRetrievalMessage::CleanupInvalidItemRetrievalMessage(Archive::ReadIterator & source) :
GameNetworkMessage("CleanupInvalidItemRetrievalMessage"),
m_responseId(),
m_trackId(),
m_itemId()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
unpack(source);
}
CleanupInvalidItemRetrievalMessage::CleanupInvalidItemRetrievalMessage( int responseId, const NetworkId & itemId) :
GameNetworkMessage("CleanupInvalidItemRetrievalMessage"),
m_responseId(responseId),
m_trackId(0),
m_itemId(itemId)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
}
CleanupInvalidItemRetrievalMessage::~CleanupInvalidItemRetrievalMessage()
{
}
@@ -0,0 +1,29 @@
#ifndef CleanupInvalidItemRetrievalMessage_h
#define CleanupInvalidItemRetrievalMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class CleanupInvalidItemRetrievalMessage : public GameNetworkMessage
{
public:
CleanupInvalidItemRetrievalMessage(int responseId, const NetworkId & itemId);
CleanupInvalidItemRetrievalMessage(Archive::ReadIterator & source);
~CleanupInvalidItemRetrievalMessage();
const NetworkId & GetItemId() const {return m_itemId.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_itemId;
};
#endif
@@ -0,0 +1,48 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "CreateVendorMarketMessage.h"
CreateVendorMarketMessage::CreateVendorMarketMessage(Archive::ReadIterator & source) :
GameNetworkMessage("CreateVendorMarketMessage"),
m_responseId(),
m_trackId(),
m_ownerId(),
m_location(),
m_playerVendorLimit(),
m_entranceCharge()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_playerVendorLimit);
AutoByteStream::addVariable(m_entranceCharge);
unpack(source);
}
CreateVendorMarketMessage::CreateVendorMarketMessage(
int responseId,
const NetworkId & ownerId,
const std::string & location,
int playerVendorLimit,
int entranceCharge
) :
GameNetworkMessage("CreateVendorMarketMessage"),
m_responseId(responseId),
m_trackId(0),
m_ownerId(ownerId),
m_location(location),
m_playerVendorLimit(playerVendorLimit),
m_entranceCharge(entranceCharge)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_playerVendorLimit);
AutoByteStream::addVariable(m_entranceCharge);
}
CreateVendorMarketMessage::~CreateVendorMarketMessage()
{
}
@@ -0,0 +1,41 @@
#ifndef CreateVendorMarketMessage_h
#define CreateVendorMarketMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class CreateVendorMarketMessage : public GameNetworkMessage
{
public:
CreateVendorMarketMessage(
int responseId,
const NetworkId & ownerId,
const std::string & location,
int playerVendorLimit,
int entranceCharge);
CreateVendorMarketMessage(Archive::ReadIterator & source);
~CreateVendorMarketMessage();
const NetworkId & GetOwnerId() const {return m_ownerId.get();}
const std::string & GetLocation() const {return m_location.get();}
int GetVendorLimit() const {return m_playerVendorLimit.get();}
int GetEntranceCharge() const {return m_entranceCharge.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_ownerId;
Archive::AutoVariable<std::string> m_location;
Archive::AutoVariable<int> m_playerVendorLimit;
Archive::AutoVariable<int> m_entranceCharge;
};
#endif
@@ -0,0 +1,38 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "DeleteAuctionLocationMessage.h"
DeleteAuctionLocationMessage::DeleteAuctionLocationMessage(Archive::ReadIterator & source) :
GameNetworkMessage("DeleteAuctionLocationMessage"),
m_responseId(),
m_trackId(),
m_locationId(),
m_whoRequested()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_locationId);
AutoByteStream::addVariable(m_whoRequested);
unpack(source);
}
DeleteAuctionLocationMessage::DeleteAuctionLocationMessage(
int responseId,
const NetworkId & locationId,
const std::string & whoRequested
) :
GameNetworkMessage("DeleteAuctionLocationMessage"),
m_responseId(responseId),
m_trackId(0),
m_locationId(locationId),
m_whoRequested(whoRequested)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_locationId);
AutoByteStream::addVariable(m_whoRequested);
}
DeleteAuctionLocationMessage::~DeleteAuctionLocationMessage()
{
}
@@ -0,0 +1,37 @@
#ifndef DeleteAuctionLocationMessage_h
#define DeleteAuctionLocationMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class DeleteAuctionLocationMessage : public GameNetworkMessage
{
public:
DeleteAuctionLocationMessage(
int responseId,
const NetworkId & locationId,
const std::string & whoRequested);
DeleteAuctionLocationMessage(Archive::ReadIterator & source);
~DeleteAuctionLocationMessage();
const NetworkId & GetLocationId() const {return m_locationId.get();}
const std::string & GetWhoRequested() const {return m_whoRequested.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_locationId;
Archive::AutoVariable<std::string> m_whoRequested;
};
#endif
@@ -0,0 +1,43 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "DestroyVendorMarketMessage.h"
DestroyVendorMarketMessage::DestroyVendorMarketMessage(Archive::ReadIterator & source) :
GameNetworkMessage("DestroyVendorMarketMessage"),
m_responseId(),
m_trackId(),
m_ownerId(),
m_ownerName(),
m_location()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_ownerName);
AutoByteStream::addVariable(m_location);
unpack(source);
}
DestroyVendorMarketMessage::DestroyVendorMarketMessage(
int responseId,
const NetworkId & ownerId,
const std::string & ownerName,
const std::string & location
) :
GameNetworkMessage("DestroyVendorMarketMessage"),
m_responseId(responseId),
m_trackId(0),
m_ownerId(ownerId),
m_ownerName(ownerName),
m_location(location)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_ownerName);
AutoByteStream::addVariable(m_location);
}
DestroyVendorMarketMessage::~DestroyVendorMarketMessage()
{
}
@@ -0,0 +1,40 @@
#ifndef DestroyVendorMarketMessage_h
#define DestroyVendorMarketMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class DestroyVendorMarketMessage : public GameNetworkMessage
{
public:
DestroyVendorMarketMessage(
int responseId,
const NetworkId & ownerId,
const std::string & ownerName,
const std::string & location);
DestroyVendorMarketMessage(Archive::ReadIterator & source);
~DestroyVendorMarketMessage();
const NetworkId & GetOwnerId() const {return m_ownerId.get();}
const std::string & GetOwnerName() const {return m_ownerName.get();}
const std::string & GetLocation() const {return m_location.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_ownerId;
Archive::AutoVariable<std::string> m_ownerName;
Archive::AutoVariable<std::string> m_location;
};
#endif
@@ -0,0 +1,41 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "GetItemDetailsMessage.h"
GetItemDetailsMessage::GetItemDetailsMessage(Archive::ReadIterator & source) :
GameNetworkMessage("GetItemDetailsMessage"),
m_responseId(),
m_trackId(),
m_auctionId(),
m_playerId()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_auctionId);
AutoByteStream::addVariable(m_playerId);
unpack(source);
}
GetItemDetailsMessage::GetItemDetailsMessage(
int requestId,
const NetworkId & auctionId,
const NetworkId & playerId
) :
GameNetworkMessage("GetItemDetailsMessage"),
m_responseId(requestId),
m_trackId(0),
m_auctionId(auctionId),
m_playerId(playerId)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_auctionId);
AutoByteStream::addVariable(m_playerId);
}
GetItemDetailsMessage::~GetItemDetailsMessage()
{
}
@@ -0,0 +1,33 @@
#ifndef GetItemDetailsMessage_h
#define GetItemDetailsMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class GetItemDetailsMessage : public GameNetworkMessage
{
public:
explicit GetItemDetailsMessage( int requestId, const NetworkId & auctionId, const NetworkId & playerId );
GetItemDetailsMessage(Archive::ReadIterator & source);
~GetItemDetailsMessage();
const NetworkId & GetAuctionId() const {return m_auctionId.get();}
const NetworkId & GetPlayerId() const {return m_playerId.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_auctionId;
Archive::AutoVariable<NetworkId> m_playerId;
};
#endif
@@ -0,0 +1,42 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "GetItemMessage.h"
GetItemMessage::GetItemMessage(Archive::ReadIterator & source) :
GameNetworkMessage("GetItemMessage"),
m_responseId(),
m_trackId(),
m_itemId(),
m_playerId(),
m_location()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_location);
unpack(source);
}
GetItemMessage::GetItemMessage(
int requestId,
const NetworkId & itemId,
const NetworkId & playerId,
const std::string & location
) :
GameNetworkMessage("GetItemMessage"),
m_responseId(requestId),
m_trackId(0),
m_itemId(itemId),
m_playerId(playerId),
m_location(location)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_location);
}
GetItemMessage::~GetItemMessage()
{
}
@@ -0,0 +1,39 @@
#ifndef GetItemMessage_h
#define GetItemMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class GetItemMessage : public GameNetworkMessage
{
public:
GetItemMessage(
int requestId,
const NetworkId & itemId,
const NetworkId & playerId,
const std::string & location
);
GetItemMessage(Archive::ReadIterator & source);
~GetItemMessage();
const NetworkId & GetItemId() const {return m_itemId.get();}
const NetworkId & GetPlayerId() const {return m_playerId.get();}
const std::string & GetLocation() const {return m_location.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_itemId;
Archive::AutoVariable<NetworkId> m_playerId;
Archive::AutoVariable<std::string> m_location;
};
#endif
@@ -0,0 +1,33 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "GetPlayerVendorCountMessage.h"
GetPlayerVendorCountMessage::GetPlayerVendorCountMessage(Archive::ReadIterator & source) :
GameNetworkMessage("GetPlayerVendorCountMessage"),
m_responseId(),
m_trackId(),
m_playerId()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_playerId);
unpack(source);
}
GetPlayerVendorCountMessage::GetPlayerVendorCountMessage(
int responseId,
const NetworkId & playerId
) :
GameNetworkMessage("GetPlayerVendorCountMessage"),
m_responseId(responseId),
m_trackId(0),
m_playerId(playerId)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_playerId);
}
GetPlayerVendorCountMessage::~GetPlayerVendorCountMessage()
{
}
@@ -0,0 +1,30 @@
#ifndef GetPlayerVendorCountMessage_h
#define GetPlayerVendorCountMessage_h
#include "sharedNetworkMessages/GameNetworkMessage.h"
class GetPlayerVendorCountMessage : public GameNetworkMessage
{
public:
GetPlayerVendorCountMessage(
int responseId,
const NetworkId & playerId);
GetPlayerVendorCountMessage(Archive::ReadIterator & source);
~GetPlayerVendorCountMessage();
const NetworkId & GetPlayerId() const {return m_playerId.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_playerId;
};
#endif
@@ -0,0 +1,38 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "GetVendorOwnerMessage.h"
GetVendorOwnerMessage::GetVendorOwnerMessage(Archive::ReadIterator & source) :
GameNetworkMessage("GetVendorOwnerMessage"),
m_responseId(),
m_trackId(),
m_ownerId(),
m_location()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_location);
unpack(source);
}
GetVendorOwnerMessage::GetVendorOwnerMessage(
int responseId,
const NetworkId & ownerId,
const std::string & location
) :
GameNetworkMessage("GetVendorOwnerMessage"),
m_responseId(responseId),
m_trackId(0),
m_ownerId(ownerId),
m_location(location)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_location);
}
GetVendorOwnerMessage::~GetVendorOwnerMessage()
{
}
@@ -0,0 +1,36 @@
#ifndef GetVendorOwnerMessage_h
#define GetVendorOwnerMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class GetVendorOwnerMessage : public GameNetworkMessage
{
public:
GetVendorOwnerMessage(
int responseId,
const NetworkId & ownerId,
const std::string & location);
GetVendorOwnerMessage(Archive::ReadIterator & source);
~GetVendorOwnerMessage();
const NetworkId & GetOwnerId() const {return m_ownerId.get();}
const std::string & GetLocation() const {return m_location.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_ownerId;
Archive::AutoVariable<std::string> m_location;
};
#endif
@@ -0,0 +1,33 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "GetVendorValueMessage.h"
GetVendorValueMessage::GetVendorValueMessage(Archive::ReadIterator & source) :
GameNetworkMessage("GetVendorValueMessage"),
m_responseId(),
m_trackId(),
m_location()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_location);
unpack(source);
}
GetVendorValueMessage::GetVendorValueMessage(
int responseId,
const std::string & location
) :
GameNetworkMessage("GetVendorValueMessage"),
m_responseId(responseId),
m_trackId(0),
m_location(location)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_location);
}
GetVendorValueMessage::~GetVendorValueMessage()
{
}
@@ -0,0 +1,31 @@
#ifndef GetVendorValueMessage_h
#define GetVendorValueMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
class GetVendorValueMessage : public GameNetworkMessage
{
public:
GetVendorValueMessage(
int responseId,
const std::string & location);
GetVendorValueMessage(Archive::ReadIterator & source);
~GetVendorValueMessage();
const std::string & GetLocation() const {return m_location.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<std::string> m_location;
};
#endif
@@ -0,0 +1,33 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "ItemMovedMessage.h"
ItemMovedMessage::ItemMovedMessage(Archive::ReadIterator & source) :
GameNetworkMessage("ItemMovedMessage"),
m_playerId(),
m_locationNameLength(),
m_locationName()
{
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_locationNameLength);
AutoByteStream::addVariable(m_locationName);
unpack(source);
}
ItemMovedMessage::ItemMovedMessage(
const NetworkId & playerId,
const int locationNameLength,
const std::string & locationName
):
GameNetworkMessage("ItemMovedMessage"),
m_playerId(playerId),
m_locationNameLength(locationNameLength),
m_locationName(locationName)
{
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_locationNameLength);
AutoByteStream::addVariable(m_locationName);
}
ItemMovedMessage::~ItemMovedMessage()
{
}
@@ -0,0 +1,32 @@
#ifndef ItemMovedMessage_H
#define ItemMovedMessage_H
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class ItemMovedMessage : public GameNetworkMessage
{
public:
explicit ItemMovedMessage(
const NetworkId & playerId,
const int locationNameLength,
const std::string & locationName
);
ItemMovedMessage(Archive::ReadIterator & source);
~ItemMovedMessage();
const NetworkId & GetPlayerId() const {return m_playerId.get();}
const int GetLocationNameLength() const {return m_locationNameLength.get();}
const std::string & GetLocationName() const {return m_locationName.get();}
protected:
private:
Archive::AutoVariable<NetworkId> m_playerId;
Archive::AutoVariable<int> m_locationNameLength;
Archive::AutoVariable<std::string> m_locationName;
};
#endif
@@ -0,0 +1,43 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnAcceptHighBidMessage.h"
OnAcceptHighBidMessage::OnAcceptHighBidMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnAcceptHighBidMessage"),
m_responseId(),
m_trackId(),
m_itemId(),
m_playerId(),
m_resultCode()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_resultCode);
unpack(source);
}
OnAcceptHighBidMessage::OnAcceptHighBidMessage(
int responseId,
int resultCode,
const NetworkId & itemId,
const NetworkId & playerId
) :
GameNetworkMessage("OnAcceptHighBidMessage"),
m_responseId(responseId),
m_trackId(0),
m_itemId(itemId),
m_playerId(playerId),
m_resultCode(resultCode)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_resultCode);
}
OnAcceptHighBidMessage::~OnAcceptHighBidMessage()
{
}
@@ -0,0 +1,38 @@
#ifndef OnAcceptHighBidMessage_h
#define OnAcceptHighBidMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class OnAcceptHighBidMessage : public GameNetworkMessage
{
public:
OnAcceptHighBidMessage(
int responseId,
int resultCode,
const NetworkId & itemId,
const NetworkId & playerId
);
OnAcceptHighBidMessage(Archive::ReadIterator & source);
~OnAcceptHighBidMessage();
const NetworkId & GetItemId() const {return m_itemId.get();}
const NetworkId & GetPlayerId() const {return m_playerId.get();}
int GetResultCode() const {return m_resultCode.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_itemId;
Archive::AutoVariable<NetworkId> m_playerId;
Archive::AutoVariable<int> m_resultCode;
};
#endif
@@ -0,0 +1,58 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnAddAuctionMessage.h"
OnAddAuctionMessage::OnAddAuctionMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnAddAuctionMessage"),
m_responseId(),
m_trackId(),
m_itemId(),
m_ownerId(),
m_resultCode(),
m_vendorId(),
m_ownerName(),
m_location()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_resultCode);
AutoByteStream::addVariable(m_vendorId);
AutoByteStream::addVariable(m_ownerName);
AutoByteStream::addVariable(m_location);
unpack(source);
}
OnAddAuctionMessage::OnAddAuctionMessage(
int responseId,
int resultCode,
const NetworkId & itemId,
const NetworkId & ownerId,
const std::string & ownerName,
const NetworkId & vendorId,
const std::string & location
) :
GameNetworkMessage("OnAddAuctionMessage"),
m_responseId(responseId),
m_trackId(0),
m_itemId(itemId),
m_ownerId(ownerId),
m_resultCode(resultCode),
m_vendorId(vendorId),
m_ownerName(ownerName),
m_location(location)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_resultCode);
AutoByteStream::addVariable(m_vendorId);
AutoByteStream::addVariable(m_ownerName);
AutoByteStream::addVariable(m_location);
}
OnAddAuctionMessage::~OnAddAuctionMessage()
{
}
@@ -0,0 +1,46 @@
#ifndef OnAddAuctionMessage_h
#define OnAddAuctionMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class OnAddAuctionMessage : public GameNetworkMessage
{
public:
OnAddAuctionMessage(
int responseId,
int resultCode,
const NetworkId & itemId,
const NetworkId & ownerId,
const std::string & ownerName,
const NetworkId & vendorId,
const std::string & location);
OnAddAuctionMessage(Archive::ReadIterator & source);
~OnAddAuctionMessage();
const NetworkId & GetOwnerId() const {return m_ownerId.get();}
const std::string & GetOwnerName() const {return m_ownerName.get();}
const NetworkId & GetItemId() const {return m_itemId.get();}
const NetworkId & GetVendorId() const {return m_vendorId.get();}
int GetResultCode() const {return m_resultCode.get();}
const std::string & GetLocation() const {return m_location.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_itemId;
Archive::AutoVariable<NetworkId> m_ownerId;
Archive::AutoVariable<int> m_resultCode;
Archive::AutoVariable<NetworkId> m_vendorId;
Archive::AutoVariable<std::string> m_ownerName;
Archive::AutoVariable<std::string> m_location;
};
#endif
@@ -0,0 +1,93 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnAddBidMessage.h"
OnAddBidMessage::OnAddBidMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnAddBidMessage"),
m_responseId(),
m_trackId(),
m_itemId(),
m_ownerId(),
m_bidderId(),
m_previousBidderId(),
m_bidAmount(),
m_previousBidAmount(),
m_maxProxyBid(),
m_location(),
m_resultCode(),
m_itemNameLength(),
m_itemName(),
m_salesTaxAmount(),
m_salesTaxBankId()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_bidderId);
AutoByteStream::addVariable(m_previousBidderId);
AutoByteStream::addVariable(m_bidAmount);
AutoByteStream::addVariable(m_previousBidAmount);
AutoByteStream::addVariable(m_maxProxyBid);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_resultCode);
AutoByteStream::addVariable(m_itemNameLength);
AutoByteStream::addVariable(m_itemName);
AutoByteStream::addVariable(m_salesTaxAmount);
AutoByteStream::addVariable(m_salesTaxBankId);
unpack(source);
}
OnAddBidMessage::OnAddBidMessage(
int responseId,
int resultCode,
const NetworkId & itemId,
const NetworkId & ownerId,
const NetworkId & bidderId,
const NetworkId & previousBidderId,
int bidAmount,
int previousBidAmount,
int maxProxyBid,
const std::string &location,
int itemNameLength,
const Unicode::String &itemName,
int salesTaxAmount,
const NetworkId & salesTaxBankId
) :
GameNetworkMessage("OnAddBidMessage"),
m_responseId(responseId),
m_trackId(0),
m_itemId(itemId),
m_ownerId(ownerId),
m_bidderId(bidderId),
m_previousBidderId(previousBidderId),
m_bidAmount(bidAmount),
m_previousBidAmount(previousBidAmount),
m_maxProxyBid(maxProxyBid),
m_location(location),
m_resultCode(resultCode),
m_itemNameLength(itemNameLength),
m_itemName(itemName),
m_salesTaxAmount(salesTaxAmount),
m_salesTaxBankId(salesTaxBankId)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_bidderId);
AutoByteStream::addVariable(m_previousBidderId);
AutoByteStream::addVariable(m_bidAmount);
AutoByteStream::addVariable(m_previousBidAmount);
AutoByteStream::addVariable(m_maxProxyBid);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_resultCode);
AutoByteStream::addVariable(m_itemNameLength);
AutoByteStream::addVariable(m_itemName);
AutoByteStream::addVariable(m_salesTaxAmount);
AutoByteStream::addVariable(m_salesTaxBankId);
}
OnAddBidMessage::~OnAddBidMessage()
{
}
@@ -0,0 +1,70 @@
#ifndef OnAddBidMessage_h
#define OnAddBidMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
#include "Unicode.h"
class OnAddBidMessage : public GameNetworkMessage
{
public:
OnAddBidMessage(
int responseId,
int resultCode,
const NetworkId & itemId,
const NetworkId & ownerId,
const NetworkId & bidderId,
const NetworkId & previousBidderId,
int bidAmount,
int previousBidAmount,
int maxProxyBid,
const std::string &location,
int itemNameLength,
const Unicode::String &itemName,
int salesTaxAmount,
const NetworkId & salesTaxBankId
);
OnAddBidMessage(Archive::ReadIterator & source);
~OnAddBidMessage();
const NetworkId & GetItemId() const {return m_itemId.get();}
const NetworkId & GetOwnerId() const {return m_ownerId.get();}
const NetworkId & GetBidderId() const {return m_bidderId.get();}
const NetworkId & GetPreviousBidderId() const {return m_previousBidderId.get();}
int GetBid() const {return m_bidAmount.get();}
int GetPreviousBid() const {return m_previousBidAmount.get();}
int GetMaxProxyBid() const {return m_maxProxyBid.get();}
const std::string & GetLocation() const {return m_location.get();}
int GetResultCode() const {return m_resultCode.get();}
int GetItemNameLength() const {return m_itemNameLength.get();}
const Unicode::String & GetItemName() const {return m_itemName.get();}
int GetSalesTaxAmount() const {return m_salesTaxAmount.get();}
const NetworkId & GetSalesTaxBankId() const {return m_salesTaxBankId.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_itemId;
Archive::AutoVariable<NetworkId> m_ownerId;
Archive::AutoVariable<NetworkId> m_bidderId;
Archive::AutoVariable<NetworkId> m_previousBidderId;
Archive::AutoVariable<int> m_bidAmount;
Archive::AutoVariable<int> m_previousBidAmount;
Archive::AutoVariable<int> m_maxProxyBid;
Archive::AutoVariable<std::string> m_location;
Archive::AutoVariable<int> m_resultCode;
Archive::AutoVariable<int> m_itemNameLength;
Archive::AutoVariable<Unicode::String> m_itemName;
Archive::AutoVariable<int> m_salesTaxAmount;
Archive::AutoVariable<NetworkId> m_salesTaxBankId;
};
#endif
@@ -0,0 +1,81 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnAuctionExpiredMessage.h"
OnAuctionExpiredMessage::OnAuctionExpiredMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnAuctionExpiredMessage"),
m_responseId(),
m_trackId(),
m_ownerId(),
m_sold(),
m_buyerId(),
m_bidAmount(),
m_itemId(),
m_maxProxyBid(),
m_location(),
m_immediate(),
m_itemNameLength(),
m_itemName(),
m_sendSellerMail()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_sold);
AutoByteStream::addVariable(m_buyerId);
AutoByteStream::addVariable(m_bidAmount);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_maxProxyBid);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_immediate);
AutoByteStream::addVariable(m_itemNameLength);
AutoByteStream::addVariable(m_itemName);
AutoByteStream::addVariable(m_sendSellerMail);
unpack(source);
}
OnAuctionExpiredMessage::OnAuctionExpiredMessage(
const NetworkId & ownerId,
bool sold,
const NetworkId & buyerId,
int bidAmount,
const NetworkId & itemId,
int maxProxyBid,
const std::string & location,
bool immediate,
int itemNameLength,
const Unicode::String & itemName,
bool sendSellerMail
) :
GameNetworkMessage("OnAuctionExpiredMessage"),
m_responseId(0),
m_trackId(0),
m_ownerId(ownerId),
m_sold(sold),
m_buyerId(buyerId),
m_bidAmount(bidAmount),
m_itemId(itemId),
m_maxProxyBid(maxProxyBid),
m_location(location),
m_immediate(immediate),
m_itemNameLength(itemNameLength),
m_itemName(itemName),
m_sendSellerMail(sendSellerMail)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_sold);
AutoByteStream::addVariable(m_buyerId);
AutoByteStream::addVariable(m_bidAmount);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_maxProxyBid);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_immediate);
AutoByteStream::addVariable(m_itemNameLength);
AutoByteStream::addVariable(m_itemName);
AutoByteStream::addVariable(m_sendSellerMail);
}
OnAuctionExpiredMessage::~OnAuctionExpiredMessage()
{
}
@@ -0,0 +1,62 @@
#ifndef OnAuctionExpiredMessage_h
#define OnAuctionExpiredMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
#include "Unicode.h"
class OnAuctionExpiredMessage : public GameNetworkMessage
{
public:
OnAuctionExpiredMessage(
const NetworkId & ownerId,
bool sold,
const NetworkId & buyerId,
int bidAmount,
const NetworkId & itemId,
int maxProxyBid,
const std::string & location,
bool immediate,
int itemNameLength,
const Unicode::String &itemName,
bool sendSellerMail
);
OnAuctionExpiredMessage(Archive::ReadIterator & source);
~OnAuctionExpiredMessage();
const NetworkId & GetItemId() const {return m_itemId.get();}
const NetworkId & GetOwnerId() const {return m_ownerId.get();}
const NetworkId & GetBuyerId() const {return m_buyerId.get();}
int GetBid() const {return m_bidAmount.get();}
int GetMaxProxyBid() const {return m_maxProxyBid.get();}
const std::string & GetLocation() const {return m_location.get();}
bool IsSold() const {return m_sold.get();}
bool IsImmediate() const {return m_immediate.get();}
int GetItemNameLength() const {return m_itemNameLength.get();}
const Unicode::String & GetItemName() const {return m_itemName.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
bool GetSendSellerMail() const {return m_sendSellerMail.get();}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_ownerId;
Archive::AutoVariable<bool> m_sold;
Archive::AutoVariable<NetworkId> m_buyerId;
Archive::AutoVariable<int> m_bidAmount;
Archive::AutoVariable<NetworkId> m_itemId;
Archive::AutoVariable<int> m_maxProxyBid;
Archive::AutoVariable<std::string> m_location;
Archive::AutoVariable<bool> m_immediate;
Archive::AutoVariable<int> m_itemNameLength;
Archive::AutoVariable<Unicode::String> m_itemName;
Archive::AutoVariable<bool> m_sendSellerMail;
};
#endif
@@ -0,0 +1,58 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnCancelAuctionMessage.h"
OnCancelAuctionMessage::OnCancelAuctionMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnCancelAuctionMessage"),
m_responseId(),
m_trackId(),
m_itemId(),
m_playerId(),
m_highBidderId(),
m_highBidAmount(),
m_location(),
m_resultCode()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_highBidderId);
AutoByteStream::addVariable(m_highBidAmount);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_resultCode);
unpack(source);
}
OnCancelAuctionMessage::OnCancelAuctionMessage(
int responseId,
int resultCode,
const NetworkId & itemId,
const NetworkId & playerId,
const NetworkId & highBidderId,
int highBidAmount,
const std::string & location
) :
GameNetworkMessage("OnCancelAuctionMessage"),
m_responseId(responseId),
m_trackId(0),
m_itemId(itemId),
m_playerId(playerId),
m_highBidderId(highBidderId),
m_highBidAmount(highBidAmount),
m_location(location),
m_resultCode(resultCode)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_highBidderId);
AutoByteStream::addVariable(m_highBidAmount);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_resultCode);
}
OnCancelAuctionMessage::~OnCancelAuctionMessage()
{
}
@@ -0,0 +1,48 @@
#ifndef OnCancelAuctionMessage_h
#define OnCancelAuctionMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class OnCancelAuctionMessage : public GameNetworkMessage
{
public:
OnCancelAuctionMessage(
int responseId,
int resultCode,
const NetworkId & itemId,
const NetworkId & playerId,
const NetworkId & highBidderId,
int highBidAmount,
const std::string & location
);
OnCancelAuctionMessage(Archive::ReadIterator & source);
~OnCancelAuctionMessage();
const NetworkId & GetItemId() const {return m_itemId.get();}
const NetworkId & GetPlayerId() const {return m_playerId.get();}
const NetworkId & GetHighBidderId() const {return m_highBidderId.get();}
int GetHighBid() const {return m_highBidAmount.get();}
const std::string & GetLocation() const {return m_location.get();}
int GetResultCode() const {return m_resultCode.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_itemId;
Archive::AutoVariable<NetworkId> m_playerId;
Archive::AutoVariable<NetworkId> m_highBidderId;
Archive::AutoVariable<int> m_highBidAmount;
Archive::AutoVariable<std::string> m_location;
Archive::AutoVariable<int> m_resultCode;
};
#endif
@@ -0,0 +1,48 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnCleanupInvalidItemRetrievalMessage.h"
OnCleanupInvalidItemRetrievalMessage::OnCleanupInvalidItemRetrievalMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnCleanupInvalidItemRetrievalMessage"),
m_responseId(),
m_trackId(),
m_itemId(),
m_playerId(),
m_creatorId(),
m_reimburseAmt()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_creatorId);
AutoByteStream::addVariable(m_reimburseAmt);
unpack(source);
}
OnCleanupInvalidItemRetrievalMessage::OnCleanupInvalidItemRetrievalMessage(
int responseId,
const NetworkId & itemId,
const NetworkId & playerId,
const NetworkId & creatorId,
int reimburseAmt
) :
GameNetworkMessage("OnCleanupInvalidItemRetrievalMessage"),
m_responseId(responseId),
m_trackId(0),
m_itemId(itemId),
m_playerId(playerId),
m_creatorId(creatorId),
m_reimburseAmt(reimburseAmt)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_creatorId);
AutoByteStream::addVariable(m_reimburseAmt);
}
OnCleanupInvalidItemRetrievalMessage::~OnCleanupInvalidItemRetrievalMessage()
{
}
@@ -0,0 +1,41 @@
#ifndef OnCleanupInvalidItemRetrievalMessage_h
#define OnCleanupInvalidItemRetrievalMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class OnCleanupInvalidItemRetrievalMessage : public GameNetworkMessage
{
public:
OnCleanupInvalidItemRetrievalMessage(
int responseId,
const NetworkId & itemId,
const NetworkId & playerId,
const NetworkId & creatorId,
int reimburseAmt
);
OnCleanupInvalidItemRetrievalMessage(Archive::ReadIterator & source);
~OnCleanupInvalidItemRetrievalMessage();
const NetworkId & GetItemId() const {return m_itemId.get();}
const NetworkId & GetPlayerId() const {return m_playerId.get();}
const NetworkId & GetCreatorId() const {return m_creatorId.get();}
int GetReimburseAmt() const {return m_reimburseAmt.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_itemId;
Archive::AutoVariable<NetworkId> m_playerId;
Archive::AutoVariable<NetworkId> m_creatorId;
Archive::AutoVariable<int> m_reimburseAmt;
};
#endif
@@ -0,0 +1,42 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnCreateVendorMarketMessage.h"
OnCreateVendorMarketMessage::OnCreateVendorMarketMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnCreateVendorMarketMessage"),
m_responseId(),
m_trackId(),
m_ownerId(),
m_location(),
m_resultCode()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_resultCode);
unpack(source);
}
OnCreateVendorMarketMessage::OnCreateVendorMarketMessage(
int responseId,
int resultCode,
const NetworkId & ownerId,
const std::string & location
) :
GameNetworkMessage("OnCreateVendorMarketMessage"),
m_responseId(responseId),
m_trackId(0),
m_ownerId(ownerId),
m_location(location),
m_resultCode(resultCode)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_resultCode);
}
OnCreateVendorMarketMessage::~OnCreateVendorMarketMessage()
{
}
@@ -0,0 +1,34 @@
#ifndef OnCreateVendorMarketMessage_h
#define OnCreateVendorMarketMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class OnCreateVendorMarketMessage : public GameNetworkMessage
{
public:
OnCreateVendorMarketMessage(int responseId, int resultCode, const NetworkId & ownerId, const std::string & location );
OnCreateVendorMarketMessage(Archive::ReadIterator & source);
~OnCreateVendorMarketMessage();
const NetworkId & GetOwnerId() const {return m_ownerId.get();}
const std::string & GetLocation() const {return m_location.get();}
int GetResultCode() const {return m_resultCode.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_ownerId;
Archive::AutoVariable<std::string> m_location;
Archive::AutoVariable<int> m_resultCode;
};
#endif
@@ -0,0 +1,70 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnGetItemDetailsMessage.h"
OnGetItemDetailsMessage::OnGetItemDetailsMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnGetItemDetailsMessage"),
m_responseId(),
m_trackId(),
m_itemId(),
m_playerId(),
m_userDescriptionLength(),
m_userDescription(),
m_oobLength(),
m_oobData(),
m_attributes(),
m_resultCode()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_userDescriptionLength);
AutoByteStream::addVariable(m_userDescription);
AutoByteStream::addVariable(m_oobLength);
AutoByteStream::addVariable(m_oobData);
AutoByteStream::addVariable(m_attributes);
AutoByteStream::addVariable(m_resultCode);
unpack(source);
}
OnGetItemDetailsMessage::OnGetItemDetailsMessage(
int responseId,
int resultCode,
const NetworkId & itemId,
const NetworkId & playerId,
int userDescriptionLength,
const Unicode::String & userDescription,
int oobLength,
const Unicode::String & oobData,
std::vector<std::pair<std::string, Unicode::String> > const & attributes
) :
GameNetworkMessage("OnGetItemDetailsMessage"),
m_responseId(responseId),
m_trackId(0),
m_itemId(itemId),
m_playerId(playerId),
m_userDescriptionLength(userDescriptionLength),
m_userDescription(userDescription),
m_oobLength(oobLength),
m_oobData(oobData),
m_attributes(),
m_resultCode(resultCode)
{
m_attributes.set(attributes);
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_userDescriptionLength);
AutoByteStream::addVariable(m_userDescription);
AutoByteStream::addVariable(m_oobLength);
AutoByteStream::addVariable(m_oobData);
AutoByteStream::addVariable(m_attributes);
AutoByteStream::addVariable(m_resultCode);
}
OnGetItemDetailsMessage::~OnGetItemDetailsMessage()
{
}
@@ -0,0 +1,54 @@
#ifndef OnGetItemDetailsMessage_h
#define OnGetItemDetailsMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
#include "Unicode.h"
class OnGetItemDetailsMessage : public GameNetworkMessage
{
public:
OnGetItemDetailsMessage(
int responseId,
int resultCode,
const NetworkId & itemId,
const NetworkId & playerId,
int userDescriptionLength,
const Unicode::String & userDescription,
int oobLength,
const Unicode::String & oobData,
std::vector<std::pair<std::string, Unicode::String> > const & attributes
);
OnGetItemDetailsMessage(Archive::ReadIterator & source);
~OnGetItemDetailsMessage();
const NetworkId & GetItemId() const {return m_itemId.get();}
const NetworkId & GetPlayerId() const {return m_playerId.get();}
int GetUserDescriptionLength() const {return m_userDescriptionLength.get();}
const Unicode::String & GetUserDescription() const {return m_userDescription.get();}
int GetOobLength() const {return m_oobLength.get();}
const Unicode::String & GetOobData() const {return m_oobData.get();}
std::vector<std::pair<std::string, Unicode::String> > const & GetAttributes() const {return m_attributes.get();}
int GetResultCode() const {return m_resultCode.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_itemId;
Archive::AutoVariable<NetworkId> m_playerId;
Archive::AutoVariable<int> m_userDescriptionLength;
Archive::AutoVariable<Unicode::String> m_userDescription;
Archive::AutoVariable<int> m_oobLength;
Archive::AutoVariable<Unicode::String> m_oobData;
Archive::AutoArray<std::pair<std::string, Unicode::String> > m_attributes;
Archive::AutoVariable<int> m_resultCode;
};
#endif
@@ -0,0 +1,47 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnGetItemMessage.h"
OnGetItemMessage::OnGetItemMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnGetItemMessage"),
m_responseId(),
m_trackId(),
m_itemId(),
m_playerId(),
m_resultCode(),
m_location()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_resultCode);
AutoByteStream::addVariable(m_location);
unpack(source);
}
OnGetItemMessage::OnGetItemMessage(
int responseId,
int resultCode,
const NetworkId & itemId,
const NetworkId & playerId,
const std::string & location
) :
GameNetworkMessage("OnGetItemMessage"),
m_responseId(responseId),
m_trackId(0),
m_itemId(itemId),
m_playerId(playerId),
m_resultCode(resultCode),
m_location(location)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_resultCode);
AutoByteStream::addVariable(m_location);
}
OnGetItemMessage::~OnGetItemMessage()
{
}
@@ -0,0 +1,41 @@
#ifndef OnGetItemMessage_h
#define OnGetItemMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class OnGetItemMessage : public GameNetworkMessage
{
public:
OnGetItemMessage(
int responseId,
int resultCode,
const NetworkId & itemId,
const NetworkId & playerId,
const std::string & location
);
OnGetItemMessage(Archive::ReadIterator & source);
~OnGetItemMessage();
const NetworkId & GetItemId() const {return m_itemId.get();}
const NetworkId & GetPlayerId() const {return m_playerId.get();}
int GetResultCode() const {return m_resultCode.get();}
const std::string & GetLocation() const {return m_location.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_itemId;
Archive::AutoVariable<NetworkId> m_playerId;
Archive::AutoVariable<int> m_resultCode;
Archive::AutoVariable<std::string> m_location;
};
#endif
@@ -0,0 +1,43 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnGetPlayerVendorCountMessage.h"
OnGetPlayerVendorCountMessage::OnGetPlayerVendorCountMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnGetPlayerVendorCountMessage"),
m_responseId(),
m_trackId(),
m_playerId(),
m_vendorCount(),
m_vendorList()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_vendorCount);
AutoByteStream::addVariable(m_vendorList);
unpack(source);
}
OnGetPlayerVendorCountMessage::OnGetPlayerVendorCountMessage(
int responseId,
const NetworkId & playerId,
int vendorCount,
const std::vector<NetworkId> & vendorList
) :
GameNetworkMessage("OnGetPlayerVendorCountMessage"),
m_responseId(responseId),
m_trackId(0),
m_playerId(playerId),
m_vendorCount(vendorCount),
m_vendorList(vendorList)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_vendorCount);
AutoByteStream::addVariable(m_vendorList);
}
OnGetPlayerVendorCountMessage::~OnGetPlayerVendorCountMessage()
{
}
@@ -0,0 +1,37 @@
#ifndef OnGetPlayerVendorCountMessage_h
#define OnGetPlayerVendorCountMessage_h
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include <vector>
class OnGetPlayerVendorCountMessage : public GameNetworkMessage
{
public:
OnGetPlayerVendorCountMessage(
int responseId,
const NetworkId & playerId,
int vendorCount,
const std::vector<NetworkId> & vendorList);
OnGetPlayerVendorCountMessage(Archive::ReadIterator & source);
~OnGetPlayerVendorCountMessage();
const NetworkId & GetPlayerId() const {return m_playerId.get();}
int GetVendorCount() const {return m_vendorCount.get();}
const std::vector<NetworkId> & GetVendorList() const {return m_vendorList.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_playerId;
Archive::AutoVariable<int> m_vendorCount;
Archive::AutoVariable<std::vector<NetworkId> > m_vendorList;
};
#endif
@@ -0,0 +1,47 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnGetVendorOwnerMessage.h"
OnGetVendorOwnerMessage::OnGetVendorOwnerMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnGetVendorOwnerMessage"),
m_responseId(),
m_trackId(),
m_ownerId(),
m_location(),
m_requesterId(),
m_resultCode()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_requesterId);
AutoByteStream::addVariable(m_resultCode);
unpack(source);
}
OnGetVendorOwnerMessage::OnGetVendorOwnerMessage(
int responseId,
int resultCode,
const NetworkId & ownerId,
const NetworkId & requesterId,
const std::string & location
) :
GameNetworkMessage("OnGetVendorOwnerMessage"),
m_responseId(responseId),
m_trackId(0),
m_ownerId(ownerId),
m_location(location),
m_requesterId(requesterId),
m_resultCode(resultCode)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_requesterId);
AutoByteStream::addVariable(m_resultCode);
}
OnGetVendorOwnerMessage::~OnGetVendorOwnerMessage()
{
}
@@ -0,0 +1,42 @@
#ifndef OnGetVendorOwnerMessage_h
#define OnGetVendorOwnerMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class OnGetVendorOwnerMessage : public GameNetworkMessage
{
public:
OnGetVendorOwnerMessage(
int responseId,
int resultCode,
const NetworkId & ownerId,
const NetworkId & requesterId,
const std::string & location
);
OnGetVendorOwnerMessage(Archive::ReadIterator & source);
~OnGetVendorOwnerMessage();
const NetworkId & GetOwnerId() const {return m_ownerId.get();}
const std::string & GetLocation() const {return m_location.get();}
const NetworkId & GetRequesterId() const {return m_requesterId.get();}
int GetResultCode() const {return m_resultCode.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_ownerId;
Archive::AutoVariable<std::string> m_location;
Archive::AutoVariable<NetworkId> m_requesterId;
Archive::AutoVariable<int> m_resultCode;
};
#endif
@@ -0,0 +1,33 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnGetVendorValueMessage.h"
OnGetVendorValueMessage::OnGetVendorValueMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnGetVendorValueMessage"),
m_responseId(),
m_trackId(),
m_location(),
m_value()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_value);
unpack(source);
}
OnGetVendorValueMessage::OnGetVendorValueMessage(int responseId, const std::string & location, int value ) :
GameNetworkMessage("OnGetVendorValueMessage"),
m_responseId(responseId),
m_trackId(0),
m_location(location),
m_value(value)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_value);
}
OnGetVendorValueMessage::~OnGetVendorValueMessage()
{
}
@@ -0,0 +1,31 @@
#ifndef OnGetVendorValueMessage_h
#define OnGetVendorValueMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
class OnGetVendorValueMessage : public GameNetworkMessage
{
public:
OnGetVendorValueMessage(int responseId, const std::string & location, int value );
OnGetVendorValueMessage(Archive::ReadIterator & source);
~OnGetVendorValueMessage();
int GetValue() const {return m_value.get();}
const std::string & GetLocation() const {return m_location.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<std::string> m_location;
Archive::AutoVariable<int> m_value;
};
#endif
@@ -0,0 +1,56 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnItemExpiredMessage.h"
OnItemExpiredMessage::OnItemExpiredMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnItemExpiredMessage"),
m_responseId(),
m_trackId(),
m_ownerId(),
m_itemId(),
m_itemNameLength(),
m_itemName(),
m_locationName(),
m_locationId()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_itemNameLength);
AutoByteStream::addVariable(m_itemName);
AutoByteStream::addVariable(m_locationName);
AutoByteStream::addVariable(m_locationId);
unpack(source);
}
OnItemExpiredMessage::OnItemExpiredMessage(
const NetworkId & ownerId,
const NetworkId & itemId,
int itemNameLength,
const Unicode::String & itemName,
const std::string & locationName,
const NetworkId & locationId
) :
GameNetworkMessage("OnItemExpiredMessage"),
m_responseId(0),
m_trackId(0),
m_ownerId(ownerId),
m_itemId(itemId),
m_itemNameLength(itemNameLength),
m_itemName(itemName),
m_locationName(locationName),
m_locationId(locationId)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_itemNameLength);
AutoByteStream::addVariable(m_itemName);
AutoByteStream::addVariable(m_locationName);
AutoByteStream::addVariable(m_locationId);
}
OnItemExpiredMessage::~OnItemExpiredMessage()
{
}
@@ -0,0 +1,47 @@
#ifndef OnItemExpiredMessage_h
#define OnItemExpiredMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class OnItemExpiredMessage : public GameNetworkMessage
{
public:
OnItemExpiredMessage(
const NetworkId & ownerId,
const NetworkId & itemId,
int itemNameLength,
const Unicode::String & itemName,
const std::string & locationName,
const NetworkId & locationId
);
OnItemExpiredMessage(Archive::ReadIterator & source);
~OnItemExpiredMessage();
const NetworkId & GetItemId() const {return m_itemId.get();}
const NetworkId & GetOwnerId() const {return m_ownerId.get();}
int GetItemNameLength() const {return m_itemNameLength.get();}
const Unicode::String & GetItemName() const {return m_itemName.get();}
const std::string & GetLocationName() const {return m_locationName.get();}
const NetworkId & GetLocationId() const {return m_locationId.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_ownerId;
Archive::AutoVariable<NetworkId> m_itemId;
Archive::AutoVariable<int> m_itemNameLength;
Archive::AutoVariable<Unicode::String> m_itemName;
Archive::AutoVariable<std::string> m_locationName;
Archive::AutoVariable<NetworkId> m_locationId;
};
#endif
@@ -0,0 +1,68 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnPermanentAuctionPurchasedMessage.h"
OnPermanentAuctionPurchasedMessage::OnPermanentAuctionPurchasedMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnPermanentAuctionPurchasedMessage"),
m_responseId(),
m_trackId(),
m_ownerId(),
m_buyerId(),
m_price(),
m_itemId(),
m_location(),
m_itemNameLength(),
m_itemName(),
m_attributes()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_buyerId);
AutoByteStream::addVariable(m_price);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_itemNameLength);
AutoByteStream::addVariable(m_itemName);
AutoByteStream::addVariable(m_attributes);
unpack(source);
}
OnPermanentAuctionPurchasedMessage::OnPermanentAuctionPurchasedMessage(
const NetworkId & ownerId,
const NetworkId & buyerId,
int price,
const NetworkId & itemId,
const std::string & location,
int itemNameLength,
const Unicode::String & itemName,
std::vector<std::pair<std::string, Unicode::String> > const & attributes
) :
GameNetworkMessage("OnPermanentAuctionPurchasedMessage"),
m_responseId(0),
m_trackId(0),
m_ownerId(ownerId),
m_buyerId(buyerId),
m_price(price),
m_itemId(itemId),
m_location(location),
m_itemNameLength(itemNameLength),
m_itemName(itemName),
m_attributes()
{
m_attributes.set(attributes);
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_ownerId);
AutoByteStream::addVariable(m_buyerId);
AutoByteStream::addVariable(m_price);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_itemNameLength);
AutoByteStream::addVariable(m_itemName);
AutoByteStream::addVariable(m_attributes);
}
OnPermanentAuctionPurchasedMessage::~OnPermanentAuctionPurchasedMessage()
{
}
@@ -0,0 +1,53 @@
#ifndef OnPermanentAuctionPurchasedMessage_h
#define OnPermanentAuctionPurchasedMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class OnPermanentAuctionPurchasedMessage : public GameNetworkMessage
{
public:
OnPermanentAuctionPurchasedMessage(
const NetworkId & ownerId,
const NetworkId & buyerId,
int price,
const NetworkId & itemId,
const std::string & location,
int itemNameLength,
const Unicode::String & itemName,
std::vector<std::pair<std::string, Unicode::String> > const & attributes
);
OnPermanentAuctionPurchasedMessage(Archive::ReadIterator & source);
~OnPermanentAuctionPurchasedMessage();
const NetworkId & GetItemId() const {return m_itemId.get();}
const NetworkId & GetOwnerId() const {return m_ownerId.get();}
const NetworkId & GetBuyerId() const {return m_buyerId.get();}
int GetPrice() const {return m_price.get();}
const std::string & GetLocation() const {return m_location.get();}
int GetItemNameLength() const {return m_itemNameLength.get();}
const Unicode::String & GetItemName() const {return m_itemName.get();}
std::vector<std::pair<std::string, Unicode::String> > const & GetAttributes() {return m_attributes.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_ownerId;
Archive::AutoVariable<NetworkId> m_buyerId;
Archive::AutoVariable<int> m_price;
Archive::AutoVariable<NetworkId> m_itemId;
Archive::AutoVariable<std::string> m_location;
Archive::AutoVariable<int> m_itemNameLength;
Archive::AutoVariable<Unicode::String> m_itemName;
Archive::AutoArray<std::pair<std::string, Unicode::String> > m_attributes;
};
#endif
@@ -0,0 +1,71 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnQueryAuctionHeadersMessage.h"
// ----------------------------------------------------------------------
OnQueryAuctionHeadersMessage::OnQueryAuctionHeadersMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnQueryAuctionHeadersMessage"),
m_responseId(),
m_trackId(),
m_playerId(),
m_queryType(),
m_numAuctions(),
m_auctionData(),
m_resultCode(),
m_queryOffset(),
m_hasMorePages()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_queryType);
AutoByteStream::addVariable(m_numAuctions);
AutoByteStream::addVariable(m_auctionData);
AutoByteStream::addVariable(m_resultCode);
AutoByteStream::addVariable(m_queryOffset);
AutoByteStream::addVariable(m_hasMorePages);
unpack(source);
}
// ----------------------------------------------------------------------
OnQueryAuctionHeadersMessage::OnQueryAuctionHeadersMessage(
int responseId,
int resultCode,
const NetworkId & playerId,
int queryType,
const std::vector<AuctionDataHeader> & auctions,
unsigned int queryOffset,
bool hasMorePages
) :
GameNetworkMessage("OnQueryAuctionHeadersMessage"),
m_responseId(responseId),
m_trackId(0),
m_playerId(playerId),
m_queryType(queryType),
m_numAuctions(0),
m_auctionData(),
m_resultCode(resultCode),
m_queryOffset(queryOffset),
m_hasMorePages(hasMorePages)
{
m_auctionData.set(auctions);
m_numAuctions.set(auctions.size());
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_queryType);
AutoByteStream::addVariable(m_numAuctions);
AutoByteStream::addVariable(m_auctionData);
AutoByteStream::addVariable(m_resultCode);
AutoByteStream::addVariable(m_queryOffset);
AutoByteStream::addVariable(m_hasMorePages);
}
// ----------------------------------------------------------------------
OnQueryAuctionHeadersMessage::~OnQueryAuctionHeadersMessage()
{
}
@@ -0,0 +1,114 @@
#ifndef OnQueryAuctionHeadersMessage_h
#define OnQueryAuctionHeadersMessage_h
#include "AuctionData.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
#include "sharedFoundation/NetworkIdArchive.h"
#include "unicodeArchive/UnicodeArchive.h"
#include <string>
#include <vector>
// ----------------------------------------------------------------------
class OnQueryAuctionHeadersMessage : public GameNetworkMessage
{
public:
OnQueryAuctionHeadersMessage(
int responseId,
int resultCode,
const NetworkId & playerId,
int queryType,
const std::vector<AuctionDataHeader> & auctions,
unsigned int queryOffset,
bool hasMorePages
);
OnQueryAuctionHeadersMessage(Archive::ReadIterator & source);
~OnQueryAuctionHeadersMessage();
typedef std::vector<AuctionDataHeader> ADV;
const NetworkId & GetPlayerId() const {return m_playerId.get();}
int GetQueryType() const {return m_queryType.get();}
int GetNumAuctions() const {return m_numAuctions.get();}
const std::vector<AuctionDataHeader> & GetAuctionData() const {return m_auctionData.get();}
int GetResultCode() const {return m_resultCode.get();}
unsigned int GetQueryOffset() const {return m_queryOffset.get();}
bool HasMorePages() const {return m_hasMorePages.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_playerId;
Archive::AutoVariable<int> m_queryType;
Archive::AutoVariable<int> m_numAuctions;
Archive::AutoVariable<ADV> m_auctionData;
Archive::AutoVariable<int> m_resultCode;
Archive::AutoVariable<unsigned int> m_queryOffset;
Archive::AutoVariable<bool> m_hasMorePages;
};
// ----------------------------------------------------------------------
namespace Archive
{
inline void get(ReadIterator &source, AuctionDataHeader &target)
{
get(source, target.type);
get(source, target.auctionId);
get(source, target.itemId);
get(source, target.itemNameLength);
get(source, target.itemName);
get(source, target.minBid);
get(source, target.highBid);
get(source, target.timer);
get(source, target.buyNowPrice);
get(source, target.location);
get(source, target.ownerId);
get(source, target.highBidderId);
get(source, target.maxProxyBid);
get(source, target.myBid);
get(source, target.itemType);
get(source, target.resourceContainerClassCrc);
get(source, target.flags);
get(source, target.entranceCharge);
}
// ----------------------------------------------------------------------
inline void put(ByteStream &target, AuctionDataHeader const &source)
{
put(target, source.type);
put(target, source.auctionId);
put(target, source.itemId);
put(target, source.itemNameLength);
put(target, source.itemName);
put(target, source.minBid);
put(target, source.highBid);
put(target, source.timer);
put(target, source.buyNowPrice);
put(target, source.location);
put(target, source.ownerId);
put(target, source.highBidderId);
put(target, source.maxProxyBid);
put(target, source.myBid);
put(target, source.itemType);
put(target, source.resourceContainerClassCrc);
put(target, source.flags);
put(target, source.entranceCharge);
}
}
// ----------------------------------------------------------------------
#endif
@@ -0,0 +1,38 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnQueryVendorItemCountReplyMessage.h"
OnQueryVendorItemCountReplyMessage::OnQueryVendorItemCountReplyMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnQueryVendorItemCountReplyMessage"),
m_responseId(),
m_vendorId(),
m_vendorItemCount(),
m_searchEnabled()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_vendorId);
AutoByteStream::addVariable(m_vendorItemCount);
AutoByteStream::addVariable(m_searchEnabled);
unpack(source);
}
OnQueryVendorItemCountReplyMessage::OnQueryVendorItemCountReplyMessage(
const int responseId,
const NetworkId &vendorId,
const int vendorItemCount,
const bool searchEnabled
):
GameNetworkMessage("OnQueryVendorItemCountReplyMessage"),
m_responseId(responseId),
m_vendorId(vendorId),
m_vendorItemCount(vendorItemCount),
m_searchEnabled(searchEnabled)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_vendorId);
AutoByteStream::addVariable(m_vendorItemCount);
AutoByteStream::addVariable(m_searchEnabled);
}
OnQueryVendorItemCountReplyMessage::~OnQueryVendorItemCountReplyMessage()
{
}
@@ -0,0 +1,35 @@
#ifndef OnQueryVendorItemCountReplyMessage_H
#define OnQueryVendorItemCountReplyMessage_H
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class OnQueryVendorItemCountReplyMessage : public GameNetworkMessage
{
public:
explicit OnQueryVendorItemCountReplyMessage(
const int responseId,
const NetworkId &vendorId,
const int vendorItemCount,
const bool searchEnabled
);
OnQueryVendorItemCountReplyMessage(Archive::ReadIterator & source);
~OnQueryVendorItemCountReplyMessage();
const int getResponseId() const {return m_responseId.get();}
const NetworkId & getVendorId() const {return m_vendorId.get();}
const int getVendorItemCount() const {return m_vendorItemCount.get();}
const bool getSearchEnabled() const {return m_searchEnabled.get();}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<NetworkId> m_vendorId;
Archive::AutoVariable<int> m_vendorItemCount;
Archive::AutoVariable<bool> m_searchEnabled;
};
#endif
@@ -0,0 +1,28 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnUpdateVendorSearchOptionMessage.h"
OnUpdateVendorSearchOptionMessage::OnUpdateVendorSearchOptionMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnUpdateVendorSearchOptionMessage"),
m_playerId(),
m_enabled()
{
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_enabled);
unpack(source);
}
OnUpdateVendorSearchOptionMessage::OnUpdateVendorSearchOptionMessage(
const NetworkId & playerId,
const bool enabled
):
GameNetworkMessage("OnUpdateVendorSearchOptionMessage"),
m_playerId(playerId),
m_enabled(enabled)
{
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_enabled);
}
OnUpdateVendorSearchOptionMessage::~OnUpdateVendorSearchOptionMessage()
{
}
@@ -0,0 +1,30 @@
#ifndef OnUpdateVendorSearchOptionMessage_H
#define OnUpdateVendorSearchOptionMessage_H
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
#include "Unicode.h"
class OnUpdateVendorSearchOptionMessage : public GameNetworkMessage
{
public:
explicit OnUpdateVendorSearchOptionMessage(
const NetworkId & playerId,
const bool enabled
);
OnUpdateVendorSearchOptionMessage(Archive::ReadIterator & source);
~OnUpdateVendorSearchOptionMessage();
bool GetEnabled() const {return m_enabled.get();}
const NetworkId & GetPlayerId() const {return m_playerId.get();}
protected:
private:
Archive::AutoVariable<NetworkId> m_playerId;
Archive::AutoVariable<bool> m_enabled;
};
#endif
@@ -0,0 +1,48 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "OnVendorRefuseItemMessage.h"
OnVendorRefuseItemMessage::OnVendorRefuseItemMessage(Archive::ReadIterator & source) :
GameNetworkMessage("OnVendorRefuseItemMessage"),
m_responseId(),
m_trackId(),
m_itemId(),
m_vendorId(),
m_itemOwnerId(),
m_resultCode()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_vendorId);
AutoByteStream::addVariable(m_itemOwnerId);
AutoByteStream::addVariable(m_resultCode);
unpack(source);
}
OnVendorRefuseItemMessage::OnVendorRefuseItemMessage(
int responseId,
int resultCode,
const NetworkId & itemId,
const NetworkId & vendorId,
const NetworkId & itemOwnerId
) :
GameNetworkMessage("OnVendorRefuseItemMessage"),
m_responseId(responseId),
m_trackId(0),
m_itemId(itemId),
m_vendorId(vendorId),
m_itemOwnerId(itemOwnerId),
m_resultCode(resultCode)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_itemId);
AutoByteStream::addVariable(m_vendorId);
AutoByteStream::addVariable(m_itemOwnerId);
AutoByteStream::addVariable(m_resultCode);
}
OnVendorRefuseItemMessage::~OnVendorRefuseItemMessage()
{
}
@@ -0,0 +1,42 @@
#ifndef OnVendorRefuseItemMessage_h
#define OnVendorRefuseItemMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class OnVendorRefuseItemMessage : public GameNetworkMessage
{
public:
OnVendorRefuseItemMessage(
int responseId,
int resultCode,
const NetworkId & itemId,
const NetworkId & vendorId,
const NetworkId & itemOwnerId
);
OnVendorRefuseItemMessage(Archive::ReadIterator & source);
~OnVendorRefuseItemMessage();
const NetworkId & GetItemId() const {return m_itemId.get();}
const NetworkId & GetVendorId() const {return m_vendorId.get();}
const NetworkId & GetItemOwnerId() const {return m_itemOwnerId.get();}
int GetResultCode() const {return m_resultCode.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_itemId;
Archive::AutoVariable<NetworkId> m_vendorId;
Archive::AutoVariable<NetworkId> m_itemOwnerId;
Archive::AutoVariable<int> m_resultCode;
};
#endif
@@ -0,0 +1,124 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "QueryAuctionHeadersMessage.h"
QueryAuctionHeadersMessage::QueryAuctionHeadersMessage(Archive::ReadIterator & source) :
GameNetworkMessage("QueryAuctionHeadersMessage"),
m_responseId(),
m_trackId(),
m_playerId(),
m_vendorId(),
m_queryType(),
m_itemType(),
m_itemTypeExactMatch(),
m_itemTemplateId(),
m_textFilterAll(),
m_textFilterAny(),
m_priceFilterMin(),
m_priceFilterMax(),
m_priceFilterIncludesFee(),
m_advancedSearch(),
m_advancedSearchMatchAllAny(static_cast<int8>(AuctionQueryHeadersMessage::ASMAA_match_all)),
m_searchStringPlanet(),
m_searchStringRegion(),
m_searchAuctionLocationId(),
m_searchMyVendorsOnly(),
m_overrideVendorSearchFlag(),
m_queryOffset()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_vendorId);
AutoByteStream::addVariable(m_queryType);
AutoByteStream::addVariable(m_itemType);
AutoByteStream::addVariable(m_itemTypeExactMatch);
AutoByteStream::addVariable(m_itemTemplateId);
AutoByteStream::addVariable(m_textFilterAll);
AutoByteStream::addVariable(m_textFilterAny);
AutoByteStream::addVariable(m_priceFilterMin);
AutoByteStream::addVariable(m_priceFilterMax);
AutoByteStream::addVariable(m_priceFilterIncludesFee);
AutoByteStream::addVariable(m_advancedSearch);
AutoByteStream::addVariable(m_advancedSearchMatchAllAny);
AutoByteStream::addVariable(m_searchStringPlanet);
AutoByteStream::addVariable(m_searchStringRegion);
AutoByteStream::addVariable(m_searchAuctionLocationId);
AutoByteStream::addVariable(m_searchMyVendorsOnly);
AutoByteStream::addVariable(m_overrideVendorSearchFlag);
AutoByteStream::addVariable(m_queryOffset);
unpack(source);
}
QueryAuctionHeadersMessage::QueryAuctionHeadersMessage(
int requestId,
const NetworkId & playerId,
const NetworkId & vendorId,
int queryType,
int itemType,
bool itemTypeExactMatch,
int itemTemplateId,
const Unicode::String & textFilterAll,
const Unicode::String & textFilterAny,
int priceFilterMin,
int priceFilterMax,
bool priceFilterIncludesFee,
const std::list<AuctionQueryHeadersMessage::SearchCondition> & advancedSearch,
AuctionQueryHeadersMessage::AdvancedSearchMatchAllAny advancedSearchMatchAllAny,
const std::string & searchStringPlanet,
const std::string & searchStringRegion,
const NetworkId & searchAuctionLocationId,
bool searchMyVendorsOnly,
bool overrideVendorSearchFlag,
unsigned int queryOffset
) :
GameNetworkMessage("QueryAuctionHeadersMessage"),
m_responseId(requestId),
m_trackId(0),
m_playerId(playerId),
m_vendorId(vendorId),
m_queryType(queryType),
m_itemType(itemType),
m_itemTypeExactMatch(itemTypeExactMatch),
m_itemTemplateId(itemTemplateId),
m_textFilterAll(textFilterAll),
m_textFilterAny(textFilterAny),
m_priceFilterMin(priceFilterMin),
m_priceFilterMax(priceFilterMax),
m_priceFilterIncludesFee(priceFilterIncludesFee),
m_advancedSearch(),
m_advancedSearchMatchAllAny(static_cast<int8>(advancedSearchMatchAllAny)),
m_searchStringPlanet(searchStringPlanet),
m_searchStringRegion(searchStringRegion),
m_searchAuctionLocationId(searchAuctionLocationId),
m_searchMyVendorsOnly(searchMyVendorsOnly),
m_overrideVendorSearchFlag(overrideVendorSearchFlag),
m_queryOffset(queryOffset)
{
m_advancedSearch.set(advancedSearch);
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_playerId);
AutoByteStream::addVariable(m_vendorId);
AutoByteStream::addVariable(m_queryType);
AutoByteStream::addVariable(m_itemType);
AutoByteStream::addVariable(m_itemTypeExactMatch);
AutoByteStream::addVariable(m_itemTemplateId);
AutoByteStream::addVariable(m_textFilterAll);
AutoByteStream::addVariable(m_textFilterAny);
AutoByteStream::addVariable(m_priceFilterMin);
AutoByteStream::addVariable(m_priceFilterMax);
AutoByteStream::addVariable(m_priceFilterIncludesFee);
AutoByteStream::addVariable(m_advancedSearch);
AutoByteStream::addVariable(m_advancedSearchMatchAllAny);
AutoByteStream::addVariable(m_searchStringPlanet);
AutoByteStream::addVariable(m_searchStringRegion);
AutoByteStream::addVariable(m_searchAuctionLocationId);
AutoByteStream::addVariable(m_searchMyVendorsOnly);
AutoByteStream::addVariable(m_overrideVendorSearchFlag);
AutoByteStream::addVariable(m_queryOffset);
}
QueryAuctionHeadersMessage::~QueryAuctionHeadersMessage()
{
}
@@ -0,0 +1,90 @@
#ifndef QueryAuctionHeadersMessage_h
#define QueryAuctionHeadersMessage_h
#include "sharedFoundation/NetworkId.h"
#include "sharedNetworkMessages/AuctionQueryHeadersMessage.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
class QueryAuctionHeadersMessage : public GameNetworkMessage
{
public:
QueryAuctionHeadersMessage(
int requestId,
const NetworkId & playerId,
const NetworkId & vendorId,
int queryType,
int itemType,
bool itemTypeExactMatch,
int itemTemplateId,
const Unicode::String & textFilterAll,
const Unicode::String & textFilterAny,
int priceFilterMin,
int priceFilterMax,
bool priceFilterIncludesFee,
const std::list<AuctionQueryHeadersMessage::SearchCondition> & advancedSearch,
AuctionQueryHeadersMessage::AdvancedSearchMatchAllAny advancedSearchMatchAllAny,
const std::string & searchStringPlanet,
const std::string & searchStringRegion,
const NetworkId & searchAuctionLocationId,
bool searchMyVendorsOnly,
bool overrideVendorSearchFlag,
unsigned int queryOffset
);
QueryAuctionHeadersMessage(Archive::ReadIterator & source);
~QueryAuctionHeadersMessage();
const NetworkId & GetPlayerId() const {return m_playerId.get();}
const NetworkId & GetVendorId() const {return m_vendorId.get();}
int GetQueryType() const {return m_queryType.get();}
int GetItemType() const {return m_itemType.get();}
bool GetItemTypeExactMatch() const {return m_itemTypeExactMatch.get();}
int GetItemTemplateId() const {return m_itemTemplateId.get();}
const Unicode::String & GetTextFilterAll() const {return m_textFilterAll.get();}
const Unicode::String & GetTextFilterAny() const {return m_textFilterAny.get();}
int GetPriceFilterMin() const {return m_priceFilterMin.get();}
int GetPriceFilterMax() const {return m_priceFilterMax.get();}
bool GetPriceFilterIncludesFee() const {return m_priceFilterIncludesFee.get();}
const std::list<AuctionQueryHeadersMessage::SearchCondition> & getAdvancedSearch() const {return m_advancedSearch.get();}
AuctionQueryHeadersMessage::AdvancedSearchMatchAllAny getAdvancedSearchMatchAllAny() const {return static_cast<AuctionQueryHeadersMessage::AdvancedSearchMatchAllAny>(m_advancedSearchMatchAllAny.get());}
const std::string & GetSearchStringPlanet() const {return m_searchStringPlanet.get();}
const std::string & GetSearchStringRegion() const {return m_searchStringRegion.get();}
const NetworkId & GetSearchAuctionLocationId() const {return m_searchAuctionLocationId.get();}
bool GetSearchMyVendorsOnly() const {return m_searchMyVendorsOnly.get();}
bool GetOverrideVendorSearchFlag() const {return m_overrideVendorSearchFlag.get();}
unsigned int GetQueryOffset() const {return m_queryOffset.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_playerId;
Archive::AutoVariable<NetworkId> m_vendorId;
Archive::AutoVariable<int> m_queryType;
Archive::AutoVariable<int> m_itemType;
Archive::AutoVariable<bool> m_itemTypeExactMatch;
Archive::AutoVariable<int> m_itemTemplateId;
Archive::AutoVariable<Unicode::String> m_textFilterAll;
Archive::AutoVariable<Unicode::String> m_textFilterAny;
Archive::AutoVariable<int> m_priceFilterMin;
Archive::AutoVariable<int> m_priceFilterMax;
Archive::AutoVariable<bool> m_priceFilterIncludesFee;
Archive::AutoList<AuctionQueryHeadersMessage::SearchCondition> m_advancedSearch;
Archive::AutoVariable<int8> m_advancedSearchMatchAllAny;
Archive::AutoVariable<std::string> m_searchStringPlanet;
Archive::AutoVariable<std::string> m_searchStringRegion;
Archive::AutoVariable<NetworkId> m_searchAuctionLocationId;
Archive::AutoVariable<bool> m_searchMyVendorsOnly;
Archive::AutoVariable<bool> m_overrideVendorSearchFlag;
Archive::AutoVariable<unsigned int> m_queryOffset;
};
#endif
@@ -0,0 +1,33 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "QueryVendorItemCountMessage.h"
QueryVendorItemCountMessage::QueryVendorItemCountMessage(Archive::ReadIterator & source) :
GameNetworkMessage("QueryVendorItemCountMessage"),
m_responseId(),
m_trackId(),
m_vendorId()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_vendorId);
unpack(source);
}
QueryVendorItemCountMessage::QueryVendorItemCountMessage(
const int responseId,
const int trackId,
const NetworkId &vendorId
):
GameNetworkMessage("QueryVendorItemCountMessage"),
m_responseId(responseId),
m_trackId(trackId),
m_vendorId(vendorId)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_vendorId);
}
QueryVendorItemCountMessage::~QueryVendorItemCountMessage()
{
}
@@ -0,0 +1,34 @@
#ifndef QueryVendorItemCountMessage_H
#define QueryVendorItemCountMessage_H
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
#include "Unicode.h"
class QueryVendorItemCountMessage : public GameNetworkMessage
{
public:
explicit QueryVendorItemCountMessage(
const int responseId,
const int trackId,
const NetworkId &vendorId
);
QueryVendorItemCountMessage(Archive::ReadIterator & source);
~QueryVendorItemCountMessage();
const NetworkId & GetVendorId() const {return m_vendorId.get();}
int GetResponseId() const {return m_responseId.get();}
int GetTrackId() const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_vendorId;
};
#endif
@@ -0,0 +1,38 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "SetEntranceChargeMessage.h"
SetEntranceChargeMessage::SetEntranceChargeMessage(Archive::ReadIterator & source) :
GameNetworkMessage("SetEntranceChargeMessage"),
m_responseId(),
m_trackId(),
m_vendorId(),
m_entranceCharge()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_vendorId);
AutoByteStream::addVariable(m_entranceCharge);
unpack(source);
}
SetEntranceChargeMessage::SetEntranceChargeMessage(
const int responseId,
const int trackId,
const NetworkId &vendorId,
const int entranceCharge
):
GameNetworkMessage("SetEntranceChargeMessage"),
m_responseId(responseId),
m_trackId(trackId),
m_vendorId(vendorId),
m_entranceCharge(entranceCharge)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_vendorId);
AutoByteStream::addVariable(m_entranceCharge);
}
SetEntranceChargeMessage::~SetEntranceChargeMessage()
{
}
@@ -0,0 +1,37 @@
#ifndef SetEntranceChargeMessage_H
#define SetEntranceChargeMessage_H
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
#include "Unicode.h"
class SetEntranceChargeMessage : public GameNetworkMessage
{
public:
explicit SetEntranceChargeMessage(
const int responseId,
const int trackId,
const NetworkId &vendorId,
const int entranceCharge
);
SetEntranceChargeMessage(Archive::ReadIterator & source);
~SetEntranceChargeMessage();
const NetworkId & GetVendorId() const {return m_vendorId.get();}
int GetEntranceCharge() const {return m_entranceCharge.get();}
int GetResponseId() const {return m_responseId.get();}
int GetTrackId() const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_vendorId;
Archive::AutoVariable<int> m_entranceCharge;
};
#endif
@@ -0,0 +1,32 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "SetGameTimeMessage.h"
SetGameTimeMessage::SetGameTimeMessage(Archive::ReadIterator & source) :
GameNetworkMessage("SetGameTimeMessage"),
m_responseId(),
m_trackId(),
m_gameTime()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_gameTime);
unpack(source);
}
SetGameTimeMessage::SetGameTimeMessage(
int requestId,
int gameTime
) :
GameNetworkMessage("SetGameTimeMessage"),
m_responseId(requestId),
m_trackId(0),
m_gameTime(gameTime)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_gameTime);
}
SetGameTimeMessage::~SetGameTimeMessage()
{
}
@@ -0,0 +1,29 @@
#ifndef SetGameTimeMessage_h
#define SetGameTimeMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
class SetGameTimeMessage : public GameNetworkMessage
{
public:
SetGameTimeMessage(int requestId, int gameTime);
SetGameTimeMessage(Archive::ReadIterator & source);
~SetGameTimeMessage();
int GetGameTime() const {return m_gameTime.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<int> m_gameTime;
};
#endif
@@ -0,0 +1,42 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "SetSalesTaxMessage.h"
SetSalesTaxMessage::SetSalesTaxMessage(Archive::ReadIterator & source) :
GameNetworkMessage("SetSalesTaxMessage"),
m_responseId(),
m_trackId(),
m_salesTax(),
m_bankId(),
m_location()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_salesTax);
AutoByteStream::addVariable(m_bankId);
AutoByteStream::addVariable(m_location);
unpack(source);
}
SetSalesTaxMessage::SetSalesTaxMessage(
int requestId,
int salesTax,
const NetworkId & bankId,
const std::string & location
) :
GameNetworkMessage("SetSalesTaxMessage"),
m_responseId(requestId),
m_trackId(0),
m_salesTax(salesTax),
m_bankId(bankId),
m_location(location)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_salesTax);
AutoByteStream::addVariable(m_bankId);
AutoByteStream::addVariable(m_location);
}
SetSalesTaxMessage::~SetSalesTaxMessage()
{
}
@@ -0,0 +1,39 @@
#ifndef SetSalesTaxMessage_h
#define SetSalesTaxMessage_h
//#include "AuctionBase.h"
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class SetSalesTaxMessage : public GameNetworkMessage
{
public:
SetSalesTaxMessage(
int requestId,
int salesTax,
const NetworkId & bankId,
const std::string & location
);
SetSalesTaxMessage(Archive::ReadIterator & source);
~SetSalesTaxMessage();
int GetSalesTax() const {return m_salesTax.get();}
const NetworkId & GetBankId() const {return m_bankId.get();}
const std::string & GetLocation() const {return m_location.get();}
int GetResponseId () const {return m_responseId.get();}
int GetTrackId () const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<int> m_salesTax;
Archive::AutoVariable<NetworkId> m_bankId;
Archive::AutoVariable<std::string> m_location;
};
#endif
@@ -0,0 +1,43 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "UpdateVendorSearchOptionMessage.h"
UpdateVendorSearchOptionMessage::UpdateVendorSearchOptionMessage(Archive::ReadIterator & source) :
GameNetworkMessage("UpdateVendorSearchOptionMessage"),
m_responseId(),
m_trackId(),
m_vendorId(),
m_enabled(),
m_playerId()
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_vendorId);
AutoByteStream::addVariable(m_enabled);
AutoByteStream::addVariable(m_playerId);
unpack(source);
}
UpdateVendorSearchOptionMessage::UpdateVendorSearchOptionMessage(
const int responseId,
const int trackId,
const NetworkId &vendorId,
const bool enabled,
const NetworkId & playerId
):
GameNetworkMessage("UpdateVendorSearchOptionMessage"),
m_responseId(responseId),
m_trackId(trackId),
m_vendorId(vendorId),
m_enabled(enabled),
m_playerId(playerId)
{
AutoByteStream::addVariable(m_responseId);
AutoByteStream::addVariable(m_trackId);
AutoByteStream::addVariable(m_vendorId);
AutoByteStream::addVariable(m_enabled);
AutoByteStream::addVariable(m_playerId);
}
UpdateVendorSearchOptionMessage::~UpdateVendorSearchOptionMessage()
{
}
@@ -0,0 +1,40 @@
#ifndef UpdateVendorSearchOptionMessage_H
#define UpdateVendorSearchOptionMessage_H
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
#include "Unicode.h"
class UpdateVendorSearchOptionMessage : public GameNetworkMessage
{
public:
explicit UpdateVendorSearchOptionMessage(
const int responseId,
const int trackId,
const NetworkId &vendorId,
const bool enabled,
const NetworkId & playerId
);
UpdateVendorSearchOptionMessage(Archive::ReadIterator & source);
~UpdateVendorSearchOptionMessage();
const NetworkId & GetVendorId() const {return m_vendorId.get();}
bool GetEnabled() const {return m_enabled.get();}
int GetResponseId() const {return m_responseId.get();}
const NetworkId & GetPlayerId() const {return m_playerId.get();}
int GetTrackId() const {return m_trackId.get();}
void SetTrackId (int trackId) {m_trackId.set(trackId);}
protected:
private:
Archive::AutoVariable<int> m_responseId;
Archive::AutoVariable<int> m_trackId;
Archive::AutoVariable<NetworkId> m_vendorId;
Archive::AutoVariable<bool> m_enabled;
Archive::AutoVariable<NetworkId> m_playerId;
};
#endif
@@ -0,0 +1,33 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "UpdateVendorStatusMessage.h"
UpdateVendorStatusMessage::UpdateVendorStatusMessage(Archive::ReadIterator & source) :
GameNetworkMessage("UpdateVendorStatusMessage"),
m_vendorId(),
m_location(),
m_status()
{
AutoByteStream::addVariable(m_vendorId);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_status);
unpack(source);
}
UpdateVendorStatusMessage::UpdateVendorStatusMessage(
const NetworkId & vendorId,
const std::string & location,
int status
) :
GameNetworkMessage("UpdateVendorStatusMessage"),
m_vendorId(vendorId),
m_location(location),
m_status(status)
{
AutoByteStream::addVariable(m_vendorId);
AutoByteStream::addVariable(m_location);
AutoByteStream::addVariable(m_status);
}
UpdateVendorStatusMessage::~UpdateVendorStatusMessage()
{
}
@@ -0,0 +1,28 @@
#ifndef UpdateVendorStatusMessage_h
#define UpdateVendorStatusMessage_h
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
class UpdateVendorStatusMessage : public GameNetworkMessage
{
public:
UpdateVendorStatusMessage(
const NetworkId & vendorId,
const std::string & location,
int status);
UpdateVendorStatusMessage(Archive::ReadIterator & source);
~UpdateVendorStatusMessage();
const NetworkId & GetVendorId() const {return m_vendorId.get();}
const std::string & GetLocation() const {return m_location.get();}
int GetStatus() const {return m_status.get();}
private:
Archive::AutoVariable<NetworkId> m_vendorId;
Archive::AutoVariable<std::string> m_location;
Archive::AutoVariable<int> m_status;
};
#endif
@@ -0,0 +1,28 @@
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
#include "VendorStatusChangeMessage.h"
VendorStatusChangeMessage::VendorStatusChangeMessage(Archive::ReadIterator & source) :
GameNetworkMessage("VendorStatusChangeMessage"),
m_vendorId(),
m_status()
{
AutoByteStream::addVariable(m_vendorId);
AutoByteStream::addVariable(m_status);
unpack(source);
}
VendorStatusChangeMessage::VendorStatusChangeMessage(
const NetworkId &vendorId,
const int status
):
GameNetworkMessage("VendorStatusChangeMessage"),
m_vendorId(vendorId),
m_status(status)
{
AutoByteStream::addVariable(m_vendorId);
AutoByteStream::addVariable(m_status);
}
VendorStatusChangeMessage::~VendorStatusChangeMessage()
{
}
@@ -0,0 +1,30 @@
#ifndef VendorStatusChangeMessage_H
#define VendorStatusChangeMessage_H
#include "sharedNetworkMessages/GameNetworkMessage.h"
#include "sharedFoundation/NetworkId.h"
#include "serverNetworkMessages/AuctionBase.h"
class VendorStatusChangeMessage : public GameNetworkMessage
{
public:
explicit VendorStatusChangeMessage(
const NetworkId &vendorId,
const int status
);
VendorStatusChangeMessage(Archive::ReadIterator & source);
~VendorStatusChangeMessage();
const NetworkId & getVendorId() const {return m_vendorId.get();}
const int getStatus() const {return m_status.get();}
protected:
private:
Archive::AutoVariable<NetworkId> m_vendorId;
Archive::AutoVariable<int> m_status;
};
#endif