	public:
		int roleid;
		int attach_obj_id;
		int attach_obj_num;
		int attach_obj_pos;
		Octets newname;
		Octets syncdata;
		enum { PROTOCOL_TYPE = PROTOCOL_PLAYERRENAME };
	public:
		PlayerRename() { type = PROTOCOL_PLAYERRENAME; }
		PlayerRename(void*) : Protocol(PROTOCOL_PLAYERRENAME) { }
		PlayerRename (int l_roleid,int l_attach_obj_id = -1,int l_attach_obj_num = 0,
			int l_attach_obj_pos = -1,const Octets& l_newname = Octets(),const Octets& l_syncdata = Octets())
			 : roleid(l_roleid),attach_obj_id(l_attach_obj_id),attach_obj_num(l_attach_obj_num)
			,attach_obj_pos(l_attach_obj_pos),newname(l_newname),syncdata(l_syncdata)
		{
			type = PROTOCOL_PLAYERRENAME;
		}

		PlayerRename(const PlayerRename &rhs)
			: Protocol(rhs),roleid(rhs.roleid),attach_obj_id(rhs.attach_obj_id),attach_obj_num(rhs.attach_obj_num)
			,attach_obj_pos(rhs.attach_obj_pos),newname(rhs.newname),syncdata(rhs.syncdata) { }

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

		OctetsStream& marshal(OctetsStream & os) const
		{
			os << roleid;
			os << attach_obj_id;
			os << attach_obj_num;
			os << attach_obj_pos;
			os << newname;
			os << syncdata;
			return os;
		}

		const OctetsStream& unmarshal(const OctetsStream &os)
		{
			os >> roleid;
			os >> attach_obj_id;
			os >> attach_obj_num;
			os >> attach_obj_pos;
			os >> newname;
			os >> syncdata;
			return os;
		}

		int PriorPolicy( ) const { return 1; }

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