public static BattleUnitDetail.eBudFluct ExchgBudFluct(int per, BattleUnitDetail.eFluctChk fluct_chk = BattleUnitDetail.eFluctChk.DEFAULT) { int[] mFluctValue = BattleUnitDetail.mFluctValues[(int)fluct_chk]; if (per > 0) { if (per > mFluctValue[2]) { return(BattleUnitDetail.eBudFluct.UP_L); } if (per > mFluctValue[1]) { return(BattleUnitDetail.eBudFluct.UP_M); } if (per > mFluctValue[0]) { return(BattleUnitDetail.eBudFluct.UP_S); } } else if (per < 0) { if (per < -mFluctValue[2]) { return(BattleUnitDetail.eBudFluct.DW_L); } if (per < -mFluctValue[1]) { return(BattleUnitDetail.eBudFluct.DW_M); } if (per < -mFluctValue[0]) { return(BattleUnitDetail.eBudFluct.DW_S); } } return(BattleUnitDetail.eBudFluct.NONE); }
public static BattleUnitDetail.eBudFluct ExchgBudFluct(int val, int max, BattleUnitDetail.eFluctChk fluct_chk = BattleUnitDetail.eFluctChk.DEFAULT) { if (max != 0) { return(BattleUnitDetail.ExchgBudFluct(val * 100 / max, fluct_chk)); } return(BattleUnitDetail.eBudFluct.NONE); }