private static void AddMonsterGroupMaster(MonsterClientMaster monsterMaster, ref Dictionary <string, Dictionary <string, MonsterClientMaster> > destGroupMasterList) { Dictionary <string, MonsterClientMaster> dictionary = null; if (!destGroupMasterList.TryGetValue(monsterMaster.Simple.monsterGroupId, out dictionary)) { dictionary = new Dictionary <string, MonsterClientMaster>(); dictionary.Add(monsterMaster.Simple.rare, monsterMaster); destGroupMasterList.Add(monsterMaster.Simple.monsterGroupId, dictionary); } else if (!dictionary.ContainsKey(monsterMaster.Simple.rare)) { dictionary.Add(monsterMaster.Simple.rare, monsterMaster); } else { Debug.Assert(false, string.Concat(new string[] { "重複する モンスターID(", monsterMaster.Simple.monsterId, "), 覚醒値(", monsterMaster.Simple.rare, ")のため失敗しました。" })); } }
public static bool IsLevelMax(string monsterId, int level) { MonsterClientMaster monsterMasterByMonsterId = MonsterMaster.GetMonsterMasterByMonsterId(monsterId); int num = int.Parse(monsterMasterByMonsterId.Simple.maxLevel); return(num <= level); }
public static MonsterClientMaster GetMonsterMasterByMonsterId(string monsterId) { MonsterClientMaster monsterClientMaster = null; MonsterMaster.simpleMasterList.TryGetValue(monsterId, out monsterClientMaster); Debug.Assert(null != monsterClientMaster, "該当情報がありません。モンスターID(" + monsterId + ")"); return(monsterClientMaster); }
public void SetUniqueSkill(string monsterId, string defaultSkillGroupSubId) { MonsterClientMaster monsterMasterByMonsterId = MonsterMaster.GetMonsterMasterByMonsterId(monsterId); if (monsterMasterByMonsterId != null) { this.uniqueSkill = MonsterSkillData.GetSkillMasterBySkillGroupId(monsterMasterByMonsterId.Simple.skillGroupId, defaultSkillGroupSubId); } }
private static void AddMonsterSimpleMaster(MonsterClientMaster monsterMaster, ref Dictionary <string, MonsterClientMaster> destSimpleMasterList) { if (!destSimpleMasterList.ContainsKey(monsterMaster.Simple.monsterId)) { destSimpleMasterList.Add(monsterMaster.Simple.monsterId, monsterMaster); } else { Debug.Assert(false, "重複する モンスターID(" + monsterMaster.Simple.monsterId + ")のため失敗しました。"); } }
public static StatusValue GetStatusValue(string monsterId, string level) { StatusValue result = default(StatusValue); MonsterClientMaster monsterMasterByMonsterId = MonsterMaster.GetMonsterMasterByMonsterId(monsterId); result.hp = MonsterStatusData.CalcLevelStatusUpValue(monsterMasterByMonsterId.Simple.defaultHp, monsterMasterByMonsterId.Simple.maxHp, level, monsterMasterByMonsterId.Simple.maxLevel); result.attack = MonsterStatusData.CalcLevelStatusUpValue(monsterMasterByMonsterId.Simple.defaultAttack, monsterMasterByMonsterId.Simple.maxAttack, level, monsterMasterByMonsterId.Simple.maxLevel); result.defense = MonsterStatusData.CalcLevelStatusUpValue(monsterMasterByMonsterId.Simple.defaultDefense, monsterMasterByMonsterId.Simple.maxDefense, level, monsterMasterByMonsterId.Simple.maxLevel); result.magicAttack = MonsterStatusData.CalcLevelStatusUpValue(monsterMasterByMonsterId.Simple.defaultSpAttack, monsterMasterByMonsterId.Simple.maxSpAttack, level, monsterMasterByMonsterId.Simple.maxLevel); result.magicDefense = MonsterStatusData.CalcLevelStatusUpValue(monsterMasterByMonsterId.Simple.defaultSpDefense, monsterMasterByMonsterId.Simple.maxSpDefense, level, monsterMasterByMonsterId.Simple.maxLevel); result.speed = int.Parse(monsterMasterByMonsterId.Simple.speed); return(result); }
private void SetMonsterData() { this.monsterMaster = MonsterMaster.GetMonsterMasterByMonsterId(this.userMonster.monsterId); this.uniqueSkill = MonsterSkillData.GetSkillMasterBySkillGroupId(this.monsterMaster.Simple.skillGroupId, this.userMonster.defaultSkillGroupSubId); this.commonSkill = MonsterSkillData.GetSkillMasterBySkillId(this.userMonster.commonSkillId); if (!string.IsNullOrEmpty(this.userMonster.extraCommonSkillId)) { this.extraCommonSkill = MonsterSkillData.GetSkillMasterBySkillId(this.userMonster.extraCommonSkillId); } if ("0" != this.userMonster.leaderSkillId) { this.leaderSkill = MonsterSkillData.GetSkillMasterBySkillId(this.userMonster.leaderSkillId); } this.chipEquip.SetChipEquip(this.userMonster.userMonsterId); }
private static void CreateMonsterMasterClient(ref Dictionary <string, MonsterClientMaster> destSimpleMasterList, ref Dictionary <string, Dictionary <string, MonsterClientMaster> > destGroupMasterList) { GameWebAPI.RespDataMA_GetMonsterMS.MonsterM[] monsterM = MasterDataMng.Instance().RespDataMA_MonsterMS.monsterM; for (int i = 0; i < monsterM.Length; i++) { if (monsterM[i] != null) { GameWebAPI.RespDataMA_GetMonsterMG.MonsterM monsterGroupMaster = MonsterMaster.GetMonsterGroupMaster(monsterM[i].monsterGroupId); if (monsterGroupMaster != null) { MonsterClientMaster monsterMaster = new MonsterClientMaster(monsterM[i], monsterGroupMaster); MonsterMaster.AddMonsterSimpleMaster(monsterMaster, ref destSimpleMasterList); MonsterMaster.AddMonsterGroupMaster(monsterMaster, ref destGroupMasterList); } } } }
public static string GetEggModelId(string monsterEvolutionRouteId) { string result = string.Empty; foreach (GameWebAPI.RespDataMA_GetMonsterEvolutionRouteM.MonsterEvolutionRouteM monsterEvolutionRouteM2 in MasterDataMng.Instance().RespDataMA_MonsterEvolutionRouteM.monsterEvolutionRouteM) { if (monsterEvolutionRouteM2.monsterEvolutionRouteId == monsterEvolutionRouteId) { MonsterClientMaster monsterMasterByMonsterId = MonsterMaster.GetMonsterMasterByMonsterId(monsterEvolutionRouteM2.eggMonsterId); if (monsterMasterByMonsterId != null) { result = monsterMasterByMonsterId.Group.modelId; } break; } } return(result); }
public static MonsterClientMaster GetMonsterMasterByMonsterGroupId(string monsterGroupId, string arousal) { MonsterClientMaster monsterClientMaster = null; Dictionary <string, MonsterClientMaster> monsterMasterListByMonsterGroupId = MonsterMaster.GetMonsterMasterListByMonsterGroupId(monsterGroupId); if (monsterMasterListByMonsterGroupId != null) { monsterMasterListByMonsterGroupId.TryGetValue(arousal, out monsterClientMaster); Debug.Assert(null != monsterClientMaster, string.Concat(new string[] { "該当情報がありません。モンスターグループID(", monsterGroupId, "), 覚醒値(", arousal, ")" })); } return(monsterClientMaster); }
protected void SetMonsterMaster(string monsterId) { this.monsterMaster = MonsterMaster.GetMonsterMasterByMonsterId(monsterId); }