public static string ToSex(string _sentence, ESex _sex) { if (_sex == ESex.MALE) { return(_sentence); } var words = _sentence.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); var firstWord = words[0]; if (firstWord.EndsWith("ик")) { firstWord = firstWord.Substring(0, firstWord.Length - 1) + "ца"; } else if (firstWord.EndsWith("вец")) { firstWord = firstWord.Substring(0, firstWord.Length - 2) + "ка"; } else if (firstWord.EndsWith("ец")) { firstWord = firstWord.Substring(0, firstWord.Length - 2) + "ица"; } if (firstWord.EndsWith("нин")) { firstWord = firstWord.Substring(0, firstWord.Length - 2) + "ка"; } if (firstWord.EndsWith("ин")) { firstWord = firstWord.Substring(0, firstWord.Length - 2) + "йка"; } words[0] = firstWord; return(string.Join(" ", words)); }
public Noun GetNextCitizenName(ESex _sex) { List <string> list; switch (_sex) { case ESex.MALE: list = m_maleNames; break; case ESex.FEMALE: list = m_femaleNames; break; default: throw new ArgumentOutOfRangeException("_sex"); } var result = list[World.Rnd.Next(list.Count)]; if (list.Count > 1) { list.Remove(result); } return(result.AsNoun(_sex, true)); }
public bool Deserialize(JSON_ConceptCardConditionsParam json) { this.iname = json.iname; this.unit_group = json.un_group; this.units_conditions_type = (EUseConditionsType)json.units_cnds_type; this.job_group = json.job_group; this.jobs_conditions_type = (EUseConditionsType)json.jobs_cnds_type; this.sex = (ESex)json.sex; if (json.birth_id != null) { this.birth_id = new int[json.birth_id.Length]; for (int index = 0; index < this.birth_id.Length; ++index) { this.birth_id[index] = json.birth_id[index]; } } this.conditions_elements = new Dictionary <EElement, int>(); this.conditions_elements.Add(EElement.Fire, json.el_fire); this.conditions_elements.Add(EElement.Water, json.el_watr); this.conditions_elements.Add(EElement.Wind, json.el_wind); this.conditions_elements.Add(EElement.Thunder, json.el_thdr); this.conditions_elements.Add(EElement.Shine, json.el_lit); this.conditions_elements.Add(EElement.Dark, json.el_drk); this.element_sum = json.el_fire + json.el_watr + json.el_wind + json.el_thdr + json.el_lit + json.el_drk; return(true); }
public Crocodile(string name, float weight, ESex sex, int childrenInWomb, string sound) : base(name, weight, sex, sound) { Name = name; Weight = weight; Sound = sound; Sex = sex; }
public void Delete(ESex item) { if (item == _item.GetAll().FirstOrDefault(x => item.Sex == item.Sex)) { _item.Delete(item); Save(); } }
protected static IEnumerable<string> SklonTest(string _noun, ESex _sex, bool _isCreature = false) { if (string.IsNullOrEmpty(_noun)) yield break; foreach (EPadej padej in Enum.GetValues(typeof(EPadej))) { yield return Sklonenia.NounToPadej(padej, _noun, _isCreature, _sex); } }
public bool Deserialize(JSON_CustomTargetParam json) { this.iname = json.iname; if (json.units != null) { this.units = new string[json.units.Length]; for (int index = 0; index < json.units.Length; ++index) { this.units[index] = json.units[index]; } } if (json.jobs != null) { this.jobs = new string[json.jobs.Length]; for (int index = 0; index < json.jobs.Length; ++index) { this.jobs[index] = json.jobs[index]; } } if (json.unit_groups != null) { this.unit_groups = new string[json.unit_groups.Length]; for (int index = 0; index < json.unit_groups.Length; ++index) { this.unit_groups[index] = json.unit_groups[index]; } } if (json.job_groups != null) { this.job_groups = new string[json.job_groups.Length]; for (int index = 0; index < json.job_groups.Length; ++index) { this.job_groups[index] = json.job_groups[index]; } } this.first_job = json.first_job; this.second_job = json.second_job; this.third_job = json.third_job; this.sex = (ESex)json.sex; this.birth_id = json.birth_id; string[] strArray = new string[6] { json.dark.ToString(), json.shine.ToString(), json.thunder.ToString(), json.wind.ToString(), json.water.ToString(), json.fire.ToString() }; string empty = string.Empty; foreach (string str in strArray) { empty += str; } this.element = Convert.ToInt32(empty, 2); return(true); }
public Tuna(string name, float weight, ESex sex) : base(name, weight, sex) { Name = name; Weight = weight; Sex = sex; Sound = "Hi there! You probably didnt expect a tuna to speak English now did you"; }
public override object GetConvertValueValue(object value) { if (value != DBNull.Value && value != null && !string.IsNullOrEmpty(value.ToString())) { ESex esex = (ESex)Enum.Parse(typeof(ESex), value.ToString()); return(Enum.ToObject(typeof(ESex), esex)); } return(value); }
public void Setup(AbilityParam abil, MasterParam master) { this.m_AbilityParam = abil; this.m_CondsUnits = this.m_AbilityParam.FindConditionUnitParams(master); this.m_CondsJobs = this.m_AbilityParam.FindConditionJobParams(master); this.m_CondsBirth = this.m_AbilityParam.condition_birth; this.m_CondsSex = this.m_AbilityParam.condition_sex; this.m_CondsElem = this.m_AbilityParam.condition_element; }
public Bunny(string name, int numberOfLegs, float weight, ESex sex, int childrenInWomb) : base(name, numberOfLegs, weight, sex, childrenInWomb) { Name = name; Weight = weight; Sound = "meeep"; Sex = sex; ChildrenInWomb = childrenInWomb; }
public Zebra(string name, int numberOfLegs, float weight, ESex sex, int childrenInWomb) : base(name, numberOfLegs, weight, sex, childrenInWomb) { Name = name; Weight = weight; Sound = "HinnekDePinnek"; Sex = sex; ChildrenInWomb = childrenInWomb; }
public Catfish(string name, float weight, ESex sex) : base(name, weight, sex) { Name = name; Weight = weight; Sex = sex; Sound = "blub"; }
public override object GetAppointValue(object value) { if (value != DBNull.Value && value != null) { ESex esex = (ESex)Enum.Parse(typeof(ESex), value.ToString()); if (esex != null) { } } return(value); }
public Ape(string name, int numberOfLegs, float weight, ESex sex, int childrenInWomb) : base(name, numberOfLegs, weight, sex, childrenInWomb) { Name = name; Weight = weight; Sex = sex; ChildrenInWomb = childrenInWomb; Sound = "oeh haha ha oeh"; }
protected static IEnumerable <string> SklonTest(string _noun, ESex _sex, bool _isCreature = false) { if (string.IsNullOrEmpty(_noun)) { yield break; } foreach (EPadej padej in Enum.GetValues(typeof(EPadej))) { yield return(Sklonenia.NounToPadej(padej, _noun, _isCreature, _sex)); } }
public Elephant(string name, int numberOfLegs, float weight, ESex sex, int childrenInWomb) : base(name, numberOfLegs, weight, sex, childrenInWomb) { Name = name; NumberOfLegs = numberOfLegs; Weight = weight; Sound = "PAWAAAAAP"; Sex = sex; ChildrenInWomb = childrenInWomb; }
public override object GetAppointValue(object value) { if (!string.IsNullOrEmpty(value)) { ESex esex = (ESex)Enum.Parse(typeof(ESex), value.ToString()); if (esex != null) { return(Enum.ToObject(typeof(ESex), esex)); } } return(value); }
public bool Deserialize(JSON_CondEffectParam json) { if (json == null) { return(false); } this.iname = json.iname; this.job = json.job; this.buki = json.buki; this.birth = json.birth; this.sex = (ESex)json.sex; this.elem = (EElement)json.elem; this.cond = (ESkillCondition)json.cond; this.type = (ConditionEffectTypes)json.type; this.chk_target = (EffectCheckTargets)json.chktgt; this.chk_timing = (EffectCheckTimings)json.timing; this.value_ini = (OInt)json.vini; this.value_max = (OInt)json.vmax; this.rate_ini = (OInt)json.rini; this.rate_max = (OInt)json.rmax; this.turn_ini = (OInt)json.tini; this.turn_max = (OInt)json.tmax; this.curse = (OInt)json.curse; this.conditions = (EUnitCondition[])null; if (json.conds != null) { this.conditions = new EUnitCondition[json.conds.Length]; for (int index = 0; index < json.conds.Length; ++index) { if (json.conds[index] >= 0) { this.conditions[index] = (EUnitCondition)(1 << json.conds[index]); } } } this.v_poison_rate = (OInt)json.v_poi; this.v_poison_fix = (OInt)json.v_poifix; this.v_paralyse_rate = (OInt)json.v_par; this.v_blink_hit = (OInt)json.v_blihit; this.v_blink_avo = (OInt)json.v_bliavo; this.v_death_count = (OInt)json.v_dea; this.v_berserk_atk = (OInt)json.v_beratk; this.v_berserk_def = (OInt)json.v_berdef; this.v_fast = (OInt)json.v_fast; this.v_slow = (OInt)json.v_slow; this.v_donmov = (OInt)json.v_don; this.v_auto_hp_heal = (OInt)json.v_ahp; this.v_auto_mp_heal = (OInt)json.v_amp; this.v_auto_hp_heal_fix = (OInt)json.v_ahpfix; this.v_auto_mp_heal_fix = (OInt)json.v_ampfix; return(true); }
public Tiger(string name, int numberOfLegs, float weight, ESex sex, float stopEatingThreshold, int childrenInWomb) : base(name, numberOfLegs, weight, sex, childrenInWomb) { Name = name; Weight = weight; NumberOfLegs = numberOfLegs; StopEatingThreshold = stopEatingThreshold; Sound = "RwaawaR"; Sex = sex; ChildrenInWomb = childrenInWomb; }
public ESex Add(ESex item) { if (item != _item.GetAll().FirstOrDefault(x => item.Sex == item.Sex)) { ESex temp = _item.Add(item); Save(); return(temp); } else { throw new Exception("This Subject Alredy Added"); } }
public Player(int playerid, string name, int userid, ESex sex, EPlayerJob playerJob, ECharacter character, int gold, int level, int exp, int mapnum, Pos pos) { ID = playerid; Name = name; UserID = userid; Sex = sex; PlayerJob = playerJob; Character = character; Gold = gold; Level = level; Exp = exp; MapNum = mapnum; Pos = pos; }
public static string ThereIsWas(ESex _sex) { switch (_sex) { case ESex.MALE: return "там был "; case ESex.FEMALE: return "там была "; case ESex.IT: return "там было "; default: throw new ArgumentOutOfRangeException("_sex"); } }
void LoadAppearData(CustomCharactor.CustomData mCustomData) { if (mCustomData == null) { return; } Sex = (mCustomData.sex == CustomCharactor.ESex.Male) ? ESex.Male : ESex.Female; ChangeSex(); mCurrent.mAppearData = mCustomData.appearData; mCurrent.mNude = mCustomData.nudeAvatarData; ResetBuildUIValue(); RebuildModel(); }
public static string ThereIsWas(ESex _sex) { switch (_sex) { case ESex.MALE: return("там был "); case ESex.FEMALE: return("там была "); case ESex.IT: return("там было "); default: throw new ArgumentOutOfRangeException("_sex"); } }
private Player GetPlayerByReader(MySqlDataReader reader) { int playerid = reader.GetInt32("playerid"); int userid = reader.GetInt32("userid"); string name = reader.GetString("name"); ESex sex = (ESex)Enum.Parse(typeof(ESex), reader.GetString("sex")); EPlayerJob job = (EPlayerJob)Enum.Parse(typeof(EPlayerJob), reader.GetString("playerjob")); ECharacter character = (ECharacter)Enum.Parse(typeof(ECharacter), reader.GetString("playercharacter")); int gold = reader.GetInt32("gold"); int level = reader.GetInt32("level"); int exp = reader.GetInt32("exp"); int mapNum = reader.GetInt32("mapnum"); float posx = reader.GetFloat("posx"); float posy = reader.GetFloat("posy"); float posz = reader.GetFloat("posz"); Pos pos = new Pos(posx, posy, posz); Player player = new Player(playerid, name, userid, sex, job, character, gold, level, exp, mapNum, pos); return(player); }
private static int GetSklon(ref string _noun, bool _isCreature, ESex _sex, out bool _мягкий) { _мягкий = false; var lastChar = _noun[_noun.Length - 1]; var vow = lastChar; if (!"йуеыаоэяию".Contains(lastChar)) vow = ' '; var lastTwoChars = _noun.Substring(_noun.Length - 2); var sklon = 0; if (_isCreature) { switch (_sex) { case ESex.MALE: if ("но,фи,чи".Contains(lastTwoChars)) { return -1; } break; case ESex.FEMALE: if ("ли,".Contains(lastTwoChars)) { return -1; } break; } if ("ки,ко,ди,ги".Contains(lastTwoChars)) { return -1; } } char смягчитель = vow; switch (vow) { case 'а': case 'я': sklon = 1; _noun = _noun.Substring(0, _noun.Length - 1); break; case 'о': case 'е': sklon = 2; _noun = _noun.Substring(0, _noun.Length - 1); break; case ' ': switch (lastChar) { case 'ь': смягчитель = lastChar; sklon = _sex == ESex.MALE ? 2 : 3; if (_sex == ESex.MALE && _noun.EndsWith("ень")) { _noun = _noun.Substring(0, _noun.Length - 3) + "н"; } else { _noun = _noun.Substring(0, _noun.Length - 1); } break; default: if (_sex == ESex.MALE && _noun.EndsWith("ец")) { _noun = _noun.Substring(0, _noun.Length - 2) + "ц"; } sklon = _sex == ESex.MALE ? 2 : 3; break; } break; case 'й': if (_sex == ESex.MALE) { sklon = 2; _noun = _noun.Substring(0, _noun.Length - 1); } break; } if (sklon == 0) { switch (lastChar) { case 'ь': смягчитель = lastChar; sklon = _sex == ESex.MALE ? 2 : 3; if (_sex == ESex.MALE) _noun = _noun.Substring(0, _noun.Length - 1); break; } } if (sklon == 0) { if (_isCreature) { return -1; } throw new ApplicationException(); } _мягкий = "йеяью".Contains(смягчитель); return sklon; }
public static string GetString(this ERLVerbs _verb, ESex _sex, EVerbType _type) { return RusLanguageProcessor.GetString(_verb, _type, _sex); }
public static Noun AsNoun(this string _noun, ESex _sex, bool _isCreature) { return new Noun(_noun, _sex, _isCreature); }
public PersonLabel(string name, double[] faceLocation, string surname, ENationality nationality, EColor eyesColor, EColor hairColor, ESex sex, string birthDate, int serialNumber) : base(serialNumber) { this.Name = name; this.FaceLocation = faceLocation; this.Surname = surname; this.Nationality = nationality; this.EyesColor = eyesColor; this.HairColor = hairColor; this.Sex = sex; this.BirthDate = birthDate; this.labelType = "PersonLabel"; }
public static string GetString(ERLVerbs _verb, EVerbType _type, ESex _sex) { return m_rverbs[_verb].To(_sex, _type); }
public static string NounToPadej(EPadej _target, string _noun, bool _isCreature, ESex _sex) { if(_target==EPadej.IMEN) return _noun; Dictionary<EPadej, string> dictionary; if(m_iskluchenia.TryGetValue(_noun, out dictionary)) { return dictionary[_target]; } if (_sex == ESex.PLURAL || _sex == ESex.PLURAL_FEMALE) { return PluralNounToPadej(_target, _noun, _isCreature, _sex); } bool мягкий; var noun = _noun; var sklon = GetSklon(ref noun, _isCreature, _sex, out мягкий); if(sklon<0) { return _noun; } if (sklon == 1 && _sex == ESex.FEMALE && _noun.EndsWith("ка")) { мягкий = true; } var твердый = !мягкий; string value; if (m_padejDict[sklon][_sex][_target].TryGetValue(твердый, out value)) { noun += value; } else { switch (sklon) { case 1: throw new ApplicationException("не должно сюда попасть"); case 2: switch (_target) { case EPadej.ROD: noun += твердый ? "а" : "я"; break; case EPadej.DAT: noun += твердый ? "у" : "ю"; break; case EPadej.VIN: if (_sex == ESex.MALE) { if (_isCreature) { noun += твердый ? "а" : "я"; } else { noun = _noun; } } else { noun += _isCreature ? (твердый ? "а" : "я") : (твердый ? "о" : "е"); } break; case EPadej.TVOR: noun += твердый ? "ом" : "ем"; break; case EPadej.PREDL: noun += "е"; break; default: throw new ArgumentOutOfRangeException("_target"); } break; case 3: switch (_target) { case EPadej.ROD: noun += "и"; break; case EPadej.DAT: noun += "и"; break; case EPadej.VIN: noun += "ь"; break; case EPadej.TVOR: noun += "ью"; break; case EPadej.PREDL: noun += "и"; break; default: throw new ArgumentOutOfRangeException("_target"); } break; } } return noun; }
public PersonLabel(string name, double[] faceLocation, string surname, ENationality nationality, EColor eyesColor, EColor hairColor, ESex sex, string birthDate) : this(name, faceLocation, surname, nationality, eyesColor, hairColor, sex, birthDate, DEFAULT_SERIAL_NUMBER) { }
public static string GetString(this ERLVerbs _verb, ESex _sex, EVerbType _type) { return(RusLanguageProcessor.GetString(_verb, _type, _sex)); }
public Fish(string name, float weight, ESex sex) : base(name, weight, sex) { NumberOfLegs = 0; }
public static string To(this Verb _verb, ESex _sex, EVerbType _type) { var v = _verb.SameAs[m_rnd.Next(_verb.SameAs.Count)]; var text = _type==EVerbType.IN_PROCESS?v.InProcess : v.Done; if (string.IsNullOrEmpty(text)) return text; if(_sex==ESex.MALE) return text; if (_type == EVerbType.DONE) { if (text.EndsWith("ил") || text.EndsWith("ал") || text.EndsWith("ел")) { switch (_sex) { case ESex.FEMALE: return text + "а"; case ESex.IT: return text + "о"; case ESex.PLURAL: case ESex.PLURAL_FEMALE: return text + "и"; default: throw new ArgumentOutOfRangeException("_sex"); } } else if (text.EndsWith("ся")) { switch (_sex) { case ESex.FEMALE: return text.Substring(0, text.Length - 2) + "ась"; case ESex.IT: return text.Substring(0, text.Length - 2) + "ось"; case ESex.PLURAL: case ESex.PLURAL_FEMALE: return text.Substring(0, text.Length - 2) + "ись"; default: throw new ArgumentOutOfRangeException("_sex"); } } else if (text.EndsWith("ыл") || text.EndsWith("ял")) { switch (_sex) { case ESex.FEMALE: return text + "а"; case ESex.IT: return text + "о"; case ESex.PLURAL: case ESex.PLURAL_FEMALE: return text + "и"; default: throw new ArgumentOutOfRangeException("_sex"); } } else if (text.EndsWith("ог")) { switch (_sex) { case ESex.FEMALE: return text + "ла"; case ESex.IT: return text + "ло"; case ESex.PLURAL: case ESex.PLURAL_FEMALE: return text + "ли"; default: throw new ArgumentOutOfRangeException("_sex"); } } } else { switch (_sex) { case ESex.MALE: case ESex.FEMALE: case ESex.IT: return text; case ESex.PLURAL: case ESex.PLURAL_FEMALE: if (text.EndsWith("ит")) { return text.Substring(0, text.Length - 2) + "ят"; } if (text.EndsWith("ет")) { return text.Substring(0, text.Length - 2) + "ют"; } if (text.EndsWith("ется")) { return text.Substring(0, text.Length - 4) + "ются"; } if (text.EndsWith("ится")) { return text.Substring(0, text.Length - 4) + "атся"; } break; default: throw new ArgumentOutOfRangeException("_sex"); } } throw new NotImplementedException(text + " " + _sex + " " + _type); }
public static string ToSex(string _sentence, ESex _sex) { if(_sex==ESex.MALE) return _sentence; var words = _sentence.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); var firstWord = words[0]; if (firstWord.EndsWith("ик")) { firstWord = firstWord.Substring(0, firstWord.Length - 1) + "ца"; } else if (firstWord.EndsWith("вец")) { firstWord = firstWord.Substring(0, firstWord.Length - 2) + "ка"; } else if (firstWord.EndsWith("ец")) { firstWord = firstWord.Substring(0, firstWord.Length - 2) + "ица"; } if (firstWord.EndsWith("нин")) { firstWord = firstWord.Substring(0, firstWord.Length - 2) + "ка"; } if (firstWord.EndsWith("ин")) { firstWord = firstWord.Substring(0, firstWord.Length - 2) + "йка"; } words[0] = firstWord; return string.Join(" ", words); }
private static string CoNameToPadej(EPadej _padej, CoName _coName, bool _isCreature, ESex _sex) { if (_coName==null) { return ""; } return "-" + NounToPadej(_padej, _coName.Text, _isCreature, _sex); }
public static string To(this Adjective _adj, EPadej _padej, ESex _sex, bool _isCreature) { if (_adj == null) return ""; var text = _adj.Text; if (text == null) { return ""; } if (_padej == EPadej.VIN && !_isCreature) { _padej = EPadej.IMEN; } var padej = (int)_padej; if (text.EndsWith("ый")) { text = text.Substring(0, text.Length - 2); switch (_sex) { case ESex.MALE: text += new[] { "ый", "ого", "ому", "ого", "ым", "ом" }[padej]; break; case ESex.FEMALE: text += new[] { "ая", "ой", "ой", "ую", "ой", "ой" }[padej]; break; case ESex.IT: text += new[] { "ое", "ого", "ому", "ого", "ым", "ом" }[padej]; break; case ESex.PLURAL: text += new[] { "ые", "ых", "ым", "ых", "ыми", "ых" }[padej]; break; default: throw new ArgumentOutOfRangeException("_sex"); } } else if (text.EndsWith("ий")) { text = text.Substring(0, text.Length - 2); switch (_sex) { case ESex.MALE: text += new[] { "ий", "ого", "ому", "ого", "им", "ом" }[padej]; break; case ESex.FEMALE: text += new[] { "ая", "ой", "ой", "юю", "ой", "ой" }[padej]; break; case ESex.IT: text += new[] { "ое", "ого", "ому", "ого", "им", "ом" }[padej]; break; case ESex.PLURAL: text += new[] { "ие", "их", "им", "их", "ими", "их" }[padej]; break; default: throw new ArgumentOutOfRangeException("_sex"); } } else if (text.EndsWith("ой")) { text = text.Substring(0, text.Length - 2); switch (_sex) { case ESex.MALE: text += new[] { "ой", "ого", "ому", "ого", "ым", "ом" }[padej]; break; case ESex.FEMALE: text += new[] { "ая", "ой", "ой", "ую", "ой", "ой" }[padej]; break; case ESex.IT: text += new[] { "ое", "ого", "ому", "ого", "ым", "ом" }[padej]; break; case ESex.PLURAL: text += new[] { "ые", "ых", "ым", "ых", "ыми", "ых" }[padej]; break; default: throw new ArgumentOutOfRangeException("_sex"); } } else { throw new NotImplementedException(); } return text + " "; }
private static string PluralNounToPadej(EPadej _padej, string _noun, bool _isCreature, ESex _sex) { bool мягкий; var last = _noun[_noun.Length - 1]; string text; switch (last) { case 'ы': мягкий = false; text = _noun.Substring(0, _noun.Length - 1); break; case 'и': мягкий = true; text = _noun.Substring(0, _noun.Length - 1); break; default: throw new ArgumentOutOfRangeException("last"); } switch (_sex) { case ESex.PLURAL: if(мягкий) { text += new[] { "и", "ей", "ям", "ей", "ами", "ях" }[(int)_padej]; } else { text += new[] { "ы", "ов", "ам", "ов", "ами", "ах" }[(int)_padej]; } break; default: throw new ArgumentOutOfRangeException("_sex"); } return text; }
public bool Deserialize(JSON_AbilityParam json) { if (json == null) { return(false); } this.iname = json.iname; this.name = json.name; this.expr = json.expr; this.icon = json.icon; this.type = (EAbilityType)json.type; this.slot = (EAbilitySlot)json.slot; this.lvcap = (OInt)Math.Max(json.cap, 1); this.is_fixed = json.fix != 0; int length = 0; string[] strArray = new string[10] { json.skl1, json.skl2, json.skl3, json.skl4, json.skl5, json.skl6, json.skl7, json.skl8, json.skl9, json.skl10 }; for (int index = 0; index < strArray.Length && !string.IsNullOrEmpty(strArray[index]); ++index) { ++length; } if (length > 0) { int[] numArray = new int[10] { json.lv1, json.lv2, json.lv3, json.lv4, json.lv5, json.lv6, json.lv7, json.lv8, json.lv9, json.lv10 }; this.skills = new LearningSkill[length]; for (int index = 0; index < length; ++index) { this.skills[index] = new LearningSkill(); this.skills[index].iname = strArray[index]; this.skills[index].locklv = numArray[index]; } } this.condition_units = (string[])null; if (json.units != null && json.units.Length > 0) { this.condition_units = new string[json.units.Length]; for (int index = 0; index < json.units.Length; ++index) { this.condition_units[index] = json.units[index]; } } this.condition_jobs = (string[])null; if (json.jobs != null && json.jobs.Length > 0) { this.condition_jobs = new string[json.jobs.Length]; for (int index = 0; index < json.jobs.Length; ++index) { this.condition_jobs[index] = json.jobs[index]; } } this.condition_birth = json.birth; this.condition_sex = (ESex)json.sex; this.condition_element = (EElement)json.elem; this.condition_raremin = (OInt)json.rmin; this.condition_raremax = (OInt)json.rmax; return(true); }
public PersonLabel(string name, double[] faceLocation, string surname, ENationality nationality, EColor eyesColor, EColor hairColor, ESex sex) : this(name, faceLocation, surname, nationality, eyesColor, hairColor, sex, DEFAULT_BIRTHDATE) { }
public Noun(string _text, ESex _sex, bool _isCreature) { Sex = _sex; IsCreature = _isCreature; Text = _text; }
public Noun GetNextCitizenName(ESex _sex) { List<string> list; switch (_sex) { case ESex.MALE: list = m_maleNames; break; case ESex.FEMALE: list = m_femaleNames; break; default: throw new ArgumentOutOfRangeException("_sex"); } var result = list[World.Rnd.Next(list.Count)]; if (list.Count > 1) { list.Remove(result); } return result.AsNoun(_sex, true); }