package com.mgr.group.data;

import com.taurus.core.entity.ITObject;

public class CommandData {
	public static final int ADD_ROOM = 1;
	public static final int UPDATE_ROOM = 2;
	public static final int DEL_ROOM = 3;
	
	private static final String TYPE_KEY = "$ct";
	public ITObject param;
	/**1添加 2更新  3删除*/
	public int type = ADD_ROOM;
	
	public void setData(int type,ITObject param) {
		if(type>=this.type) {
			this.type = type;
			this.param = param;
			this.param.putInt(TYPE_KEY, type);
		}
	}
	
//	public void send(Group group,List<Session> list) {
//		this.param.putInt(TYPE_KEY, type);
//		if(type==1) {
//			MainServer.instance.sendEvent(Router.FGMGR_EVT_UPDATE_ROOM, param, list);
//		}else {
//			MainServer.instance.sendEvent(Router.FGMGR_EVT_DEL_ROOM, param, list);
//		}
//	}
			
		
		

	
}
