public ChannelPhom(Electrotank.Electroserver5.Api.EsObject obj) { if (obj.variableExists("zoneId")) { zoneId = obj.getInteger("zoneId"); } if (obj.variableExists("roomId")) { roomId = obj.getInteger("roomId"); } if (obj.variableExists("zoneName")) { zoneName = obj.getString("zoneName"); } if (obj.variableExists("roomName")) { roomName = obj.getString("roomName"); switch (roomName) { case "phom_nghiepdu": this.type = ChannelType.Amateur; break; case "phom_chuyennghiep": this.type = ChannelType.Professional; break; case "phom_caothu": this.type = ChannelType.Experts; break; case "phom_daigia": this.type = ChannelType.Giants; break; default: break; } } if (obj.variableExists("description")) { description = obj.getString("description"); } if (obj.variableExists("maximumPlayers")) { maximumPlayers = obj.getInteger("maximumPlayers"); } if (obj.variableExists("numberUsers")) { numberUsers = obj.getInteger("numberUsers"); } if (obj.variableExists("bettingValues")) { bettingValues = obj.getIntegerArray("bettingValues"); } if (obj.variableExists("minimumMoney")) { minimumMoney = obj.getInteger("minimumMoney"); } if (obj.variableExists("moneyType")) { moneyType = obj.getString("moneyType"); } }
public ChannelChan(Electrotank.Electroserver5.Api.EsObject obj) { if (obj.variableExists("zoneId")) { zoneId = obj.getInteger("zoneId"); } if (obj.variableExists("roomId")) { roomId = obj.getInteger("roomId"); } if (obj.variableExists("zoneName")) { zoneName = obj.getString("zoneName"); } if (obj.variableExists("roomName")) { roomName = obj.getString("roomName"); switch (roomName) { case "chan_nendat": this.type = ChannelType.Amateur; break; case "chan_chieucoi": this.type = ChannelType.Professional; break; case "chan_phango": this.type = ChannelType.Experts; break; case "chan_sapgu": this.type = ChannelType.Giants; break; case "chan_giaidau": this.type = ChannelType.Tournament; break; default: break; } } if (obj.variableExists("description")) { description = obj.getString("description"); } if (obj.variableExists("maximumPlayers")) { maximumPlayers = obj.getInteger("maximumPlayers"); } if (obj.variableExists("numberUsers")) { numberUsers = obj.getInteger("numberUsers"); } if (obj.variableExists("bettingValues")) { bettingValues = obj.getIntegerArray("bettingValues"); } if (obj.variableExists("minimumMoney")) { minimumMoney = obj.getInteger("minimumMoney"); } if (obj.variableExists("playActionTime")) { timePlay = obj.getIntegerArray("playActionTime"); } if (obj.variableExists("moneyType")) { moneyType = obj.getString("moneyType"); } }