	public:
		int roleid;
		int rewardtype;
		int localsid;
		enum { PROTOCOL_TYPE = PROTOCOL_EXCHANGECONSUMEPOINTS };
	public:
		ExchangeConsumePoints() { type = PROTOCOL_EXCHANGECONSUMEPOINTS; }
		ExchangeConsumePoints(void*) : Protocol(PROTOCOL_EXCHANGECONSUMEPOINTS) { }
		ExchangeConsumePoints (int l_roleid,int l_rewardtype = 0,int l_localsid = 0)
			 : roleid(l_roleid),rewardtype(l_rewardtype),localsid(l_localsid)
		{
			type = PROTOCOL_EXCHANGECONSUMEPOINTS;
		}

		ExchangeConsumePoints(const ExchangeConsumePoints &rhs)
			: Protocol(rhs),roleid(rhs.roleid),rewardtype(rhs.rewardtype),localsid(rhs.localsid) { }

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

		OctetsStream& marshal(OctetsStream & os) const
		{
			os << roleid;
			os << rewardtype;
			os << localsid;
			return os;
		}

		const OctetsStream& unmarshal(const OctetsStream &os)
		{
			os >> roleid;
			os >> rewardtype;
			os >> localsid;
			return os;
		}

		int PriorPolicy( ) const { return 1; }

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