package extend.mj.player.state;


import com.game.Global;
import com.game.state.StateBase;

import com.taurus.core.entity.ITObject;
import extend.mj.EXActionEvent;
import extend.mj.EXMainServer;
import extend.mj.EXPlayer;
import extend.mj.PlayerRuleManager;

/**
 * ��ҵȴ�״̬
 * 
 *
 * 2017��8��30��
 * EXPlayerWaitState.java
 */
public class EXPlayerWaitState extends StateBase<EXPlayer> {


	@Override
	public void execute(EXPlayer owner, String cmd, int gid, Object param) {
		// TODO Auto-generated method stub
		Global.logger.info("EXPlayerWaitState cmd:"+cmd);
		switch (cmd) {
		case EXActionEvent.EVENT_OTHER_DISCARD:
			EXMainServer.playerRuleMgr.condition( PlayerRuleManager.OTHER_DISCARD_RULE , owner);
			break;
		case EXActionEvent.EVENT_KONG_WIN:
			owner.forceCheckWin = true;
			EXMainServer.playerRuleMgr.condition( PlayerRuleManager.KONG_HU_RULE , owner);
			owner.forceCheckWin = false;
			break;
		case EXActionEvent.EVENT_DOGANG:
			ITObject netParam2 = (ITObject) param;
			int discard2 = netParam2.getInt("card");
			Global.logger.info("EVENT_DOGANG:"+discard2);
			break;
		default:
			break;
		}
		
	}

}
