package extend.zp.player.state;

import com.game.state.StateBase;

import extend.zp.EXActionEvent;
import extend.zp.EXMainServer;
import extend.zp.EXPlayer;
import extend.zp.PlayerRuleManager;

public class EXPlayerWaitState extends StateBase<EXPlayer> {
	@Override
	public void execute(EXPlayer owner, String cmd, int gid, Object param) {
		// TODO Auto-generated method stub
		switch (cmd) {
		case EXActionEvent.EVENT_OTHER_DISCARD:
			EXMainServer.playerRuleMgr.conditionEx(PlayerRuleManager.DISCARD_RULE, owner);
			break;
		case EXActionEvent.EVENT_OTHER_DRAW:
			EXMainServer.playerRuleMgr.condition(PlayerRuleManager.OTHER_DRAW_RULE, owner);
			break;
		case EXActionEvent.EVENT_DEAL:
			EXMainServer.playerRuleMgr.condition(PlayerRuleManager.OTHER_HU_RULE, owner);
			break;
		case EXActionEvent.EVENT_OTHER_PAO:
			EXMainServer.playerRuleMgr.conditionEx(PlayerRuleManager.DRAW_PAO_RULE, owner);
			break;
		default:
			break;
		}
	}
}
