	public:
		int roleid;
		short id;
		unsigned int factionid;
		unsigned int deposit;
		int authentication;
		unsigned int localsid;
		unsigned int maxbonus;
		GMailSyncData syncdata;
		enum { PROTOCOL_TYPE = PROTOCOL_SENDBATTLECHALLENGE };
	public:
		SendBattleChallenge() { type = PROTOCOL_SENDBATTLECHALLENGE; }
		SendBattleChallenge(void*) : Protocol(PROTOCOL_SENDBATTLECHALLENGE) { }
		SendBattleChallenge (int l_roleid,short l_id,unsigned int l_factionid = 0,
			unsigned int l_deposit = 0,int l_authentication = 0,unsigned int l_localsid = 0,
			unsigned int l_maxbonus = 0,const GMailSyncData& l_syncdata = GMailSyncData())
			 : roleid(l_roleid),id(l_id),factionid(l_factionid)
			,deposit(l_deposit),authentication(l_authentication),localsid(l_localsid)
			,maxbonus(l_maxbonus),syncdata(l_syncdata)
		{
			type = PROTOCOL_SENDBATTLECHALLENGE;
		}

		SendBattleChallenge(const SendBattleChallenge &rhs)
			: Protocol(rhs),roleid(rhs.roleid),id(rhs.id),factionid(rhs.factionid)
			,deposit(rhs.deposit),authentication(rhs.authentication),localsid(rhs.localsid)
			,maxbonus(rhs.maxbonus),syncdata(rhs.syncdata) { }

		GNET::Protocol *Clone() const { return new SendBattleChallenge(*this); }

		OctetsStream& marshal(OctetsStream & os) const
		{
			os << roleid;
			os << id;
			os << factionid;
			os << deposit;
			os << authentication;
			os << localsid;
			os << maxbonus;
			os << syncdata;
			return os;
		}

		const OctetsStream& unmarshal(const OctetsStream &os)
		{
			os >> roleid;
			os >> id;
			os >> factionid;
			os >> deposit;
			os >> authentication;
			os >> localsid;
			os >> maxbonus;
			os >> syncdata;
			return os;
		}

		int PriorPolicy( ) const { return 1; }

		bool SizePolicy(size_t size) const { return size <= 131072; }
