public async Task <string> GetUnitParamRequest() { var url = Route.SERVER_PATH + Route.API_PATH + Route.URLDictionary["api.get_unit_param"]; var request = new Autin.Services.HttpRequest(); // [email protected], Mba287xd! var response = await request.PostRequest(url, new Dictionary <string, string>() { { "user_id", $"{SystemManager.Instance.CurrentUser.Id}" }, { "client_id", $"{SystemManager.Instance.CurrentUser.ClientId}" }, { "case_id", $"{SystemManager.Instance.CurrentCaseId}" }, { "client_token", $"{SystemManager.Instance.CurrentUser.ClientToken}" }, { "settlement_date", $"{SystemManager.Instance.CurrentSettlementDate}" } }); if (response.Contains("Error")) { return("fails"); } try { if (SystemManager.Instance.CurrentUnitList == null) { SystemManager.Instance.CurrentUnitList = new Unit(); } SystemManager.Instance.CurrentUnitList.UnitParam = UnitParam.FromJson(response); Console.WriteLine("get UnitParam list successfully!"); return("success"); } catch (Exception ex) { Console.WriteLine("get UnitParam list fails!"); return("fails"); } }
public IActionResult Get_Edit_Unit([FromQuery] UnitParam model) // done { UnitEditViewModel modelView = new UnitEditViewModel(); modelView = repository_unit.Get_Edit_Unit(model); return(Json(modelView)); }
private static CharacterDB.Job GetCharacterData(UnitParam unit, JobParam job, ArtifactParam skin) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type DownloadUtility.\u003CGetCharacterData\u003Ec__AnonStorey1F1 dataCAnonStorey1F1 = new DownloadUtility.\u003CGetCharacterData\u003Ec__AnonStorey1F1(); CharacterDB.Character character = CharacterDB.FindCharacter(unit.model); if (character == null) { DebugUtility.LogWarning("Unknown character '" + unit.model + "'"); return((CharacterDB.Job)null); } // ISSUE: reference to a compiler-generated field dataCAnonStorey1F1.jobResourceID = skin == null ? string.Empty : skin.asset; // ISSUE: reference to a compiler-generated field if (string.IsNullOrEmpty(dataCAnonStorey1F1.jobResourceID)) { // ISSUE: reference to a compiler-generated field dataCAnonStorey1F1.jobResourceID = job == null ? "none" : job.model; } // ISSUE: reference to a compiler-generated method int index = character.Jobs.FindIndex(new Predicate <CharacterDB.Job>(dataCAnonStorey1F1.\u003C\u003Em__1B7)); if (index < 0) { // ISSUE: reference to a compiler-generated field DebugUtility.LogWarning("Invalid Character " + unit.model + "@" + dataCAnonStorey1F1.jobResourceID); index = 0; } return(character.Jobs[index]); }
public IActionResult Delete_Unit([FromQuery] UnitParam model) // done { string status; status = repository_unit.Delete_Unit(model); return(Json(status)); }
public Data(SupportData _support) : this() { this.param = _support.UnitParam; this.unit = _support.Unit; this.support = _support; }
public string Delete_Unit(UnitParam model) { string status; using (var transaction = context.Database.BeginTransaction()) { try { var del = context.Unit.Where(o => o.IdUnit == model.IdUnit).SingleOrDefault(); if (del != null) { context.Unit.Remove(del); context.SaveChanges(); status = constant.SUCCEES; } else { status = constant.NULL; } transaction.Commit(); } catch (Exception ex) { transaction.Rollback(); status = constant.ERROR; } } return(status); }
void InitGame() { surface = Instantiate(surfacePrefab); (levelRooms, connectedRooms) = levelGenerator.GenerateLevel(); statManager.InitiateStats(levelRooms); gearManager.InitiateGears(levelRooms); currentRoomIndex = new RoomIndex { abs = 0, ord = 0 }; currentRoom = levelRooms[currentRoomIndex]; map = mapController.CreateMap(levelRooms, connectedRooms); map.SetActive(false); playerParam = new UnitParam { id = 0, unitNature = UnitNature.Player, stat = statManager.GenerateStat(UnitNature.Player), gear = new Gear { } }; roomGenerator.SetupRoom(currentRoom, playerSpawn); surface.BuildNavMesh(); }
public ChangeUnitParams(UnitParam _unitParam) { unitParam = _unitParam; DamageParam = new ParamUnit(ParamsType.Damage, unitParam.Damage); SpeedAttackParam = new ParamUnit(ParamsType.AttackSpeed, unitParam.SpeedAttack); MaxHpParam = new ParamUnit(ParamsType.MaxHP, unitParam.maxHP); }
private void SetEnemyUnitParam(ref UnitParam param) { param.maxHp = _maxHp; param.attackPoint = _attackPoint; param.defensePoint = _defensePoint; param.moveSpeed = _moveSpeed; param.attackSpeed = _attackSpeed; }
private static string GetUnitName(string unitid) { string str = string.Empty; if (!string.IsNullOrEmpty(unitid)) { UnitParam unitParam = MonoSingleton <GameManager> .Instance.GetUnitParam(unitid); str = unitParam == null ? "?" + unitid : unitParam.name; } return(str); }
public UnitEditViewModel Get_Edit_Unit(UnitParam model) { IQueryable <UnitEditViewModel> result = from a in context.Unit where a.IdUnit == model.IdUnit select new UnitEditViewModel { Name = a.NameUnit }; UnitEditViewModel data = result.SingleOrDefault(); return(data); }
public Data() { this.body = (string)null; this.param = (UnitParam)null; this.unit = (UnitData)null; this.interactable = true; this.partySelect = false; this.partyMainSlot = -1; this.partySubSlot = -1; this.tabMask = UnitListRootWindow.Tab.NONE; this.filterMask = UnitListFilterWindow.SelectType.NONE; this.sortPriority = 0L; this.subSortPriority = 0; }
public ConditionsResult_AwakeLv(UnitData unitData, UnitParam unitParam, int condsAwakeLv) : base(unitData, unitParam) { this.mCondsAwakeLv = condsAwakeLv; this.mTargetValue = condsAwakeLv; if (unitData != null) { this.mIsClear = unitData.AwakeLv >= condsAwakeLv; this.mCurrentValue = unitData.AwakeLv; } else { this.mIsClear = false; } }
public string Check_Unit(UnitParam model) { string status; var edit = context.Unit.Where(o => o.IdUnit == model.IdUnit).SingleOrDefault(); if (edit != null) { status = constant.SUCCEES; } else { status = constant.NULL; } return(status); }
private List <UnitParam> LayoutUnitAtRandom(List <Vector3Int> gridPositions, GameObject tile, int minimum, int maximum, UnitNature unitNature) { List <ObjectParam> list_objectParam = LayoutObjectAtRandom(gridPositions, tile, minimum, maximum); List <UnitParam> list_unitParam = new List <UnitParam>(); foreach (ObjectParam objectParam in list_objectParam) { UnitParam param = new UnitParam { id = unitIdIterator, objectParam = objectParam, unitNature = unitNature }; unitIdIterator++; list_unitParam.Add(param); } return(list_unitParam); }
public void SaveUnitGear(RoomParam currentRoom, UnitParam playerParam, int unitId, Gear gear) { if (unitId != 0) { foreach (UnitParam unitParam in currentRoom.unitsParam) { if (unitParam.id == unitId) { unitParam.gear = gear; } } } else { playerParam.gear = gear; } }
public void SaveUnitStats(RoomParam currentRoom, UnitParam playerParam, int unitId, FightingUnitStat unitStat) { if (unitId != 0) { foreach (UnitParam unitParam in currentRoom.unitsParam) { if (unitParam.id == unitId) { unitParam.stat = unitStat; } } } else { playerParam.stat = unitStat; } }
public static void DownloadUnit(UnitParam unit, JobData[] jobs = null) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1ED unitCAnonStorey1Ed = new DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1ED(); // ISSUE: reference to a compiler-generated field unitCAnonStorey1Ed.unit = unit; // ISSUE: reference to a compiler-generated field if (unitCAnonStorey1Ed.unit == null) { return; } // ISSUE: reference to a compiler-generated field CharacterDB.Character character = CharacterDB.FindCharacter(unitCAnonStorey1Ed.unit.model); if (character == null) { return; } GameManager instance = MonoSingleton <GameManager> .Instance; // ISSUE: reference to a compiler-generated field if (unitCAnonStorey1Ed.unit.jobsets != null) { // ISSUE: reference to a compiler-generated field for (int index = 0; index < unitCAnonStorey1Ed.unit.jobsets.Length; ++index) { // ISSUE: reference to a compiler-generated field for (JobSetParam jobSetParam = instance.GetJobSetParam((string)unitCAnonStorey1Ed.unit.jobsets[index]); jobSetParam != null; jobSetParam = string.IsNullOrEmpty(jobSetParam.jobchange) ? (JobSetParam)null : instance.GetJobSetParam(jobSetParam.jobchange)) { JobParam jobParam = instance.GetJobParam(jobSetParam.job); // ISSUE: reference to a compiler-generated field SkillParam skillParam = string.IsNullOrEmpty(jobParam.atkskill[0]) ? instance.MasterParam.GetSkillParam(jobParam.atkskill[(int)unitCAnonStorey1Ed.unit.element]) : instance.MasterParam.GetSkillParam(jobParam.atkskill[0]); if (skillParam != null) { SkillSequence sequence = SkillSequence.FindSequence(skillParam.motion); if (sequence != null && !string.IsNullOrEmpty(sequence.SkillAnimation.Name) && index < character.Jobs.Count) { DownloadUtility.PrepareUnitAnimation(character.Jobs[index], sequence.SkillAnimation.Name, false, (JobParam)null); } } DownloadUtility.DownloadJobEquipment(jobParam); ArtifactParam artifactParam = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.GetArtifactParam(jobParam.artifact); if (artifactParam != null) { DownloadUtility.DownloadArtifact(artifactParam); } int artifactSlotIndex = JobData.GetArtifactSlotIndex(ArtifactTypes.Arms); if (jobs != null) { foreach (JobData job in jobs) { if (job != null) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1EC unitCAnonStorey1Ec = new DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1EC(); List <ArtifactData> artifacts = MonoSingleton <GameManager> .GetInstanceDirect().Player.Artifacts; // ISSUE: reference to a compiler-generated field unitCAnonStorey1Ec.uniqId = job.Artifacts[artifactSlotIndex]; // ISSUE: reference to a compiler-generated method ArtifactData artifactData = artifacts.Find(new Predicate <ArtifactData>(unitCAnonStorey1Ec.\u003C\u003Em__1B4)); if (artifactData != null) { DownloadUtility.DownloadArtifact(artifactData.ArtifactParam); } } } } else { DownloadUtility.DownloadArtifact(instance.MasterParam.GetArtifactParam(jobParam.artifact)); } // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitImage(unitCAnonStorey1Ed.unit, jobSetParam.job)); // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitImage2(unitCAnonStorey1Ed.unit, jobSetParam.job)); // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitIconSmall(unitCAnonStorey1Ed.unit, jobSetParam.job)); // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitIconMedium(unitCAnonStorey1Ed.unit, jobSetParam.job)); // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitEyeImage(unitCAnonStorey1Ed.unit, jobSetParam.job)); } } // ISSUE: reference to a compiler-generated field JobSetParam[] changeJobSetParam = instance.GetClassChangeJobSetParam(unitCAnonStorey1Ed.unit.iname); if (changeJobSetParam != null && changeJobSetParam.Length > 0) { for (int index = 0; index < changeJobSetParam.Length; ++index) { JobSetParam jobSetParam = changeJobSetParam[index]; if (jobSetParam != null) { JobParam jobParam = instance.GetJobParam(jobSetParam.job); ArtifactParam artifactParam = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.GetArtifactParam(jobParam.artifact); if (artifactParam != null) { DownloadUtility.DownloadArtifact(artifactParam); } // ISSUE: reference to a compiler-generated field SkillParam skillParam = string.IsNullOrEmpty(jobParam.atkskill[0]) ? instance.MasterParam.GetSkillParam(jobParam.atkskill[(int)unitCAnonStorey1Ed.unit.element]) : instance.MasterParam.GetSkillParam(jobParam.atkskill[0]); if (skillParam != null) { SkillSequence sequence = SkillSequence.FindSequence(skillParam.motion); if (sequence != null && !string.IsNullOrEmpty(sequence.SkillAnimation.Name)) { DownloadUtility.PrepareUnitAnimation(character.Jobs[index], sequence.SkillAnimation.Name, false, (JobParam)null); } } } } } } for (int index = 0; index < character.Jobs.Count; ++index) { CharacterDB.Job job = character.Jobs[index]; DownloadUtility.PrepareUnitModels(job); DownloadUtility.PrepareUnitAnimation(job, "unit_info_idle0", true, (JobParam)null); DownloadUtility.PrepareUnitAnimation(job, "unit_info_act0", true, (JobParam)null); } // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets("CHM/Home_" + unitCAnonStorey1Ed.unit.model + "_walk0"); // ISSUE: reference to a compiler-generated field if (unitCAnonStorey1Ed.unit.skins != null) { List <ArtifactParam> artifacts = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.Artifacts; // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1EE unitCAnonStorey1Ee = new DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1EE(); // ISSUE: reference to a compiler-generated field unitCAnonStorey1Ee.\u003C\u003Ef__ref\u0024493 = unitCAnonStorey1Ed; // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field for (unitCAnonStorey1Ee.i = 0; unitCAnonStorey1Ee.i < unitCAnonStorey1Ed.unit.skins.Length; ++unitCAnonStorey1Ee.i) { // ISSUE: reference to a compiler-generated method ArtifactParam skin = artifacts.Find(new Predicate <ArtifactParam>(unitCAnonStorey1Ee.\u003C\u003Em__1B5)); if (skin != null) { // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitSkinImage(unitCAnonStorey1Ed.unit, skin, (string)null)); // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitSkinImage2(unitCAnonStorey1Ed.unit, skin, (string)null)); // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitSkinIconSmall(unitCAnonStorey1Ed.unit, skin, (string)null)); // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitSkinIconMedium(unitCAnonStorey1Ed.unit, skin, (string)null)); // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitSkinEyeImage(unitCAnonStorey1Ed.unit, skin, (string)null)); } } } // ISSUE: reference to a compiler-generated field DownloadUtility.PrepareUnitVoice(unitCAnonStorey1Ed.unit); }
public Data(UnitData _unit) : this() { this.param = _unit.UnitParam; this.unit = _unit; }
public Data(UnitParam _param) : this() { this.param = _param; }
private static void PrepareUnitVoice(UnitParam unitParam) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type DownloadUtility.\u003CPrepareUnitVoice\u003Ec__AnonStorey1EF voiceCAnonStorey1Ef = new DownloadUtility.\u003CPrepareUnitVoice\u003Ec__AnonStorey1EF(); // ISSUE: reference to a compiler-generated field voiceCAnonStorey1Ef.unitParam = unitParam; // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field if (voiceCAnonStorey1Ef.unitParam == null || string.IsNullOrEmpty(voiceCAnonStorey1Ef.unitParam.voice)) { return; } // ISSUE: reference to a compiler-generated field string[] strArray1 = MySound.VoiceCueSheetFileName(voiceCAnonStorey1Ef.unitParam.voice); if (strArray1 == null) { return; } for (int index = 0; index < strArray1.Length; ++index) { AssetManager.PrepareAssets("StreamingAssets/" + strArray1[index]); } string empty = string.Empty; // ISSUE: reference to a compiler-generated field if (voiceCAnonStorey1Ef.unitParam.skins != null) { List <ArtifactParam> artifacts = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.Artifacts; // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type DownloadUtility.\u003CPrepareUnitVoice\u003Ec__AnonStorey1F0 voiceCAnonStorey1F0 = new DownloadUtility.\u003CPrepareUnitVoice\u003Ec__AnonStorey1F0(); // ISSUE: reference to a compiler-generated field voiceCAnonStorey1F0.\u003C\u003Ef__ref\u0024495 = voiceCAnonStorey1Ef; // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field for (voiceCAnonStorey1F0.i = 0; voiceCAnonStorey1F0.i < voiceCAnonStorey1Ef.unitParam.skins.Length; ++voiceCAnonStorey1F0.i) { // ISSUE: reference to a compiler-generated method ArtifactParam artifact = artifacts.Find(new Predicate <ArtifactParam>(voiceCAnonStorey1F0.\u003C\u003Em__1B6)); if (artifact != null && !string.IsNullOrEmpty(artifact.voice)) { // ISSUE: reference to a compiler-generated field string charName = AssetPath.UnitVoiceFileName(voiceCAnonStorey1Ef.unitParam, artifact, string.Empty); if (!string.IsNullOrEmpty(charName)) { string[] strArray2 = MySound.VoiceCueSheetFileName(charName); if (strArray2 != null) { for (int index = 0; index < strArray2.Length; ++index) { AssetManager.PrepareAssets("StreamingAssets/" + strArray2[index]); } } } } } } // ISSUE: reference to a compiler-generated field if (voiceCAnonStorey1Ef.unitParam.job_voices == null) { return; } // ISSUE: reference to a compiler-generated field for (int index1 = 0; index1 < voiceCAnonStorey1Ef.unitParam.job_voices.Length; ++index1) { // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field string charName = AssetPath.UnitVoiceFileName(voiceCAnonStorey1Ef.unitParam, (ArtifactParam)null, (string)voiceCAnonStorey1Ef.unitParam.job_voices[index1]); if (!string.IsNullOrEmpty(charName)) { string[] strArray2 = MySound.VoiceCueSheetFileName(charName); if (strArray2 != null) { for (int index2 = 0; index2 < strArray2.Length; ++index2) { AssetManager.PrepareAssets("StreamingAssets/" + strArray2[index2]); } } } } }
public static void DownloadUnit(Unit unit, bool dlStatusEffects = false) { UnitParam unitParam = unit.UnitParam; JobParam job = unit.Job == null ? (JobParam)null : unit.Job.Param; ArtifactParam selectedSkin = unit.UnitData.GetSelectedSkin(-1); CharacterDB.Job characterData = DownloadUtility.GetCharacterData(unitParam, job, selectedSkin); if (characterData == null) { return; } DownloadUtility.PrepareUnitAssets(characterData, job); if (unit.Job != null) { DownloadUtility.PrepareJobAssets(unit.Job.Param); } string jobName = unit.UnitData.CurrentJob == null ? string.Empty : unit.UnitData.CurrentJob.JobID; AssetManager.PrepareAssets(AssetPath.UnitSkinIconSmall(unitParam, selectedSkin, jobName)); AssetManager.PrepareAssets(AssetPath.UnitSkinIconMedium(unitParam, selectedSkin, jobName)); AssetManager.PrepareAssets(AssetPath.UnitSkinEyeImage(unitParam, selectedSkin, jobName)); SkillData attackSkill = unit.GetAttackSkill(); if (attackSkill != null) { DownloadUtility.PrepareSkillAssets(characterData, attackSkill.SkillParam); } for (int index = unit.BattleSkills.Count - 1; index >= 0; --index) { DownloadUtility.PrepareSkillAssets(characterData, unit.BattleSkills[index].SkillParam); } for (int index = unit.BattleAbilitys.Count - 1; index >= 0; --index) { AbilityData battleAbility = unit.BattleAbilitys[index]; if (battleAbility != null && battleAbility.Param != null) { AssetManager.PrepareAssets(AssetPath.AbilityIcon(battleAbility.Param)); } } if (unit != null) { DownloadUtility.PrepareUnitVoice(unit.UnitParam); } if (dlStatusEffects) { for (int index = 0; index < BadStatusEffects.Effects.Count; ++index) { if (!string.IsNullOrEmpty(BadStatusEffects.Effects[index].AnimationName)) { DownloadUtility.PrepareUnitAnimation(characterData, BadStatusEffects.Effects[index].AnimationName, false, (JobParam)null); } } } JobData[] jobs = unit.UnitData.Jobs; int artifactSlotIndex = JobData.GetArtifactSlotIndex(ArtifactTypes.Arms); if (jobs != null) { List <ArtifactParam> artifacts = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.Artifacts; foreach (JobData jobData in jobs) { if (jobData != null) { // ISSUE: object of a compiler-generated type is created // ISSUE: reference to a compiler-generated method ArtifactParam artifalct = artifacts.Find(new Predicate <ArtifactParam>(new DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1F2() { uniqId = (string)null, uniqId = jobData.ArtifactDatas[artifactSlotIndex] == null ? jobData.Param.artifact : jobData.ArtifactDatas[artifactSlotIndex].ArtifactParam.iname }.\u003C\u003Em__1B8)); if (artifalct != null) { DownloadUtility.DownloadArtifact(artifalct); } } } } else { if (unit.Job == null) { return; } DownloadUtility.DownloadArtifact(MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.GetArtifactParam(unit.Job.Param.artifact)); } }
protected void SetParam(UnitParam param) { unitId = param.id; unitStat = param.stat; gear = param.gear; }
public ConditionsResult_Unit(UnitData unitData, UnitParam unitParam) { this.mUnitData = unitData; this.mUnitParam = unitParam; }
public ResultTurn Turn(string PlayerMail, string playerName, int UnitId, int X, int Y) { ResultTurn mes = new ResultTurn(); Unit Attacker = context.Units.Find(UnitId); if (PlayerMail != Attacker.PlayerMail) { mes.Message = "Данный юнит не принадлежит игроку" + playerName; mes.Correct = false; return(mes); } else { if ((Math.Abs(Attacker.X - X) > 1) || (Math.Abs(Attacker.Y - Y) > 1)) { mes.Message = "Данный юнит не может произвести перемещение в току, с координатами x: " + X + " y: " + Y + ", так как находится на расстоянии большем чем 1 от данной области."; mes.Correct = false; return(mes); } Unit Defence = context.Units.Where(a => a.X == X && a.Y == Y).OrderBy(s => s.HP).FirstOrDefault(); if (Defence == null) { Attacker.X = X; Attacker.Y = Y; Attacker.Turn = DateTime.Now; // context.SaveChanges(); mes.Message = Attacker.Land + " произвёл захват области с координатами x: " + X + " y: " + Y + ", захват произвёл игрок " + playerName; mes.Correct = true; mes.AtackerUnit = Attacker; //Реализовать запись в журнал событий context.Journals.Add(new Journal(PlayerMail, mes.Message, false)); context.SaveChanges(); return(mes); } if (Defence.Land == Attacker.Land) { Attacker.X = X; Attacker.Y = Y; Attacker.Turn = DateTime.Now; // context.SaveChanges(); mes.Message = Attacker.Land + " произвёл перемещение в область с координатами x: " + X + " y: " + Y + ", игрок " + playerName; mes.Correct = true; mes.AtackerUnit = Attacker; //Реализовать запись в журнал событий context.Journals.Add(new Journal(PlayerMail, mes.Message, false)); context.SaveChanges(); return(mes); } if (Defence.Land != Attacker.Land) { if (Attacker.Ammunition <= 0) { //Если у атакующего нет снарядов mes.Message = "Данный юнит не может произвести атаку, так как у нет боеприпасов!"; mes.Correct = false; return(mes); } //Происходит бой. Производим расчёт Unit Defencer = context.Units.Where(a => a.X == X && a.Y == Y).OrderBy(b => b.HP).FirstOrDefault(); Random rand = new Random(); UnitParam AtackParam = context.UnitParams.Where(a => a.Class == Attacker.Class).FirstOrDefault(); UnitParam DefenceParam; if (Attacker.Class == Defencer.Class) { DefenceParam = AtackParam; } else { DefenceParam = context.UnitParams.Where(a => a.Class == Defencer.Class).FirstOrDefault(); } mes.IsAttackMove = true; if (Attacker.Type == "Artillery") { //Расчёт артобстрела switch (Defencer.Type) { case "Infantry": mes.AtackerUron = AtackParam.InfantryAttack - AtackParam.InfantryAttack * (Defencer.Trench / 10) - DefenceParam.ArtilleryDefence; break; case "Artillery": mes.AtackerUron = AtackParam.ArtilleryAttack - AtackParam.ArtilleryAttack * (Defencer.Trench / 10) - DefenceParam.ArtilleryDefence; break; default: mes.AtackerUron = AtackParam.InfantryAttack; break; } mes.AtackerUron += (rand.Next(0, 11) - 5); //Небольшой разбег на удачу для разнообразия mes.AtackerUron = mes.AtackerUron * (Attacker.HP / 100); Attacker.Ammunition -= 1; Attacker.Turn = DateTime.Now; Defencer.HP -= mes.AtackerUron; mes.Message = Attacker.Land + " произвёл артобстрел местности, с координатами x: " + Defencer.X + " , y: " + Defencer.Y + " . В результате осбстрела юнит " + Defencer.Name + " ( " + Defencer.Type + " )" + ", принадлежащий игроку " + Defencer.PlayerMail + " , получил повреждения " + mes.AtackerUron + "."; if (Defencer.HP <= 0) { // Защищающийся юнит уничтожен context.Units.Remove(Defencer); mes.Message += " Юнит в результате артобстрела был полностью уничтожен!"; mes.DefencyIsRIP = true; } context.Entry(Attacker).State = System.Data.Entity.EntityState.Modified; context.Entry(Defencer).State = System.Data.Entity.EntityState.Modified; context.Journals.Add(new Journal(PlayerMail, mes.Message, false)); context.SaveChanges(); return(mes); } else { switch (Defencer.Type) { case "Infantry": mes.AtackerUron = AtackParam.InfantryAttack - AtackParam.InfantryAttack * (Defencer.Trench / 10); break; case "Artillery": mes.AtackerUron = AtackParam.ArtilleryAttack - AtackParam.ArtilleryAttack * (Defencer.Trench / 10); break; default: mes.AtackerUron = AtackParam.InfantryAttack; break; } switch (Attacker.Type) { case "Infantry": mes.AtackerUron -= DefenceParam.InfantryDefence; mes.DefenceUron = DefenceParam.InfantryAttack * (Defencer.HP / 100); break; default: mes.AtackerUron = AtackParam.InfantryAttack; mes.DefenceUron = DefenceParam.InfantryAttack; break; } mes.AtackerUron += (rand.Next(0, 11) - 5); //Небольшой разбег на удачу для разнообразия mes.AtackerUron = mes.AtackerUron * (Attacker.HP / 100); Attacker.Ammunition -= 1; Attacker.Turn = DateTime.Now; mes.Message = Attacker.Land + " произвёл атаку местности, с координатами x: " + Defencer.X + " , y: " + Defencer.Y + " . В результате атаки юнит " + Defencer.Name + " ( " + Defencer.Type + " )" + ", принадлежащий игроку " + Defencer.PlayerMail + " , получил повреждения " + mes.AtackerUron + "."; if (Defencer.Ammunition > 0) { mes.DefenceUron += (rand.Next(0, 11) - 5); mes.DefenceUron = mes.DefenceUron * (Defencer.HP / 100); Attacker.HP -= mes.DefenceUron; Defencer.Ammunition -= 1; mes.Message += " Атакующий юнит " + Attacker.Name + " ( " + Attacker.Type + " ) получил урон " + mes.DefenceUron; } Defencer.HP -= mes.AtackerUron; if (Defencer.HP <= 0) { // Защищающийся юнит уничтожен context.Units.Remove(Defencer); mes.Message += " Юнит в результате атаки был полностью уничтожен!"; Attacker.X = X; Attacker.Y = Y; mes.DefencyIsRIP = true; } if (Attacker.HP <= 0) { // Атакующий юнит уничтожен context.Units.Remove(Attacker); mes.Message += " Атакующий в ходе атаки был полностью уничтожен!"; mes.AtackerIsRIP = true; } context.Journals.Add(new Journal(PlayerMail, mes.Message, false)); context.Entry(Attacker).State = System.Data.Entity.EntityState.Modified; context.Entry(Defencer).State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); return(mes); } return(mes); } } return(mes); }
public void SearchUnitSkinVoiceName(ref string sheetName, ref string cueName) { UnitParam dataOfClass1 = DataSource.FindDataOfClass <UnitParam>(((Component)this).get_gameObject(), (UnitParam)null); if (dataOfClass1 != null) { sheetName = dataOfClass1.voice; cueName = dataOfClass1.voice; if (!string.IsNullOrEmpty(sheetName) && !string.IsNullOrEmpty(cueName)) { return; } } Unit dataOfClass2 = DataSource.FindDataOfClass <Unit>(((Component)this).get_gameObject(), (Unit)null); if (dataOfClass2 != null) { sheetName = dataOfClass2.GetUnitSkinVoiceSheetName(-1); cueName = dataOfClass2.GetUnitSkinVoiceCueName(-1); if (!string.IsNullOrEmpty(sheetName) && !string.IsNullOrEmpty(cueName)) { return; } } UnitData dataOfClass3 = DataSource.FindDataOfClass <UnitData>(((Component)this).get_gameObject(), (UnitData)null); if (dataOfClass3 != null) { sheetName = dataOfClass3.GetUnitSkinVoiceSheetName(-1); cueName = dataOfClass3.GetUnitSkinVoiceCueName(-1); if (!string.IsNullOrEmpty(sheetName) && !string.IsNullOrEmpty(cueName)) { return; } } SceneBattle instance = SceneBattle.Instance; BattleCore battleCore = !Object.op_Equality((Object)instance, (Object)null) ? instance.Battle : (BattleCore)null; Unit unit = battleCore != null ? battleCore.CurrentUnit : (Unit)null; if (unit != null) { sheetName = unit.GetUnitSkinVoiceSheetName(-1); cueName = unit.GetUnitSkinVoiceCueName(-1); if (!string.IsNullOrEmpty(sheetName) && !string.IsNullOrEmpty(cueName)) { return; } } if (GameUtility.GetCurrentScene() != GameUtility.EScene.HOME_MULTI) { UnitData unitDataByUniqueId = MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueID((long)GlobalVars.SelectedUnitUniqueID); if (unitDataByUniqueId == null) { return; } sheetName = unitDataByUniqueId.GetUnitSkinVoiceSheetName(-1); cueName = unitDataByUniqueId.GetUnitSkinVoiceCueName(-1); if (string.IsNullOrEmpty(sheetName) || string.IsNullOrEmpty(cueName)) { ; } } else { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type UnitVoice.\u003CSearchUnitSkinVoiceName\u003Ec__AnonStorey208 nameCAnonStorey208 = new UnitVoice.\u003CSearchUnitSkinVoiceName\u003Ec__AnonStorey208(); JSON_MyPhotonPlayerParam multiPlayerParam = GlobalVars.SelectedMultiPlayerParam; // ISSUE: reference to a compiler-generated field nameCAnonStorey208.slotID = !Object.op_Equality((Object)PartyUnitSlot.Active, (Object)null) ? PartyUnitSlot.Active.Index : -1; // ISSUE: reference to a compiler-generated field if (multiPlayerParam == null || multiPlayerParam.units == null || nameCAnonStorey208.slotID < 0) { return; } // ISSUE: reference to a compiler-generated method JSON_MyPhotonPlayerParam.UnitDataElem unitDataElem = Array.Find <JSON_MyPhotonPlayerParam.UnitDataElem>(multiPlayerParam.units, new Predicate <JSON_MyPhotonPlayerParam.UnitDataElem>(nameCAnonStorey208.\u003C\u003Em__1DF)); UnitData unitData = unitDataElem != null ? unitDataElem.unit : (UnitData)null; if (unitData == null) { return; } sheetName = unitData.GetUnitSkinVoiceSheetName(-1); cueName = unitData.GetUnitSkinVoiceCueName(-1); if (string.IsNullOrEmpty(sheetName) || string.IsNullOrEmpty(cueName)) { ; } } }
public static string GetDescription(this TrophyObjective self) { GameManager instance = MonoSingleton <GameManager> .Instance; string str1 = string.Empty; string str2 = string.Empty; char[] chArray = new char[1] { ',' }; if (!string.IsNullOrEmpty(self.Param.Expr)) { return(string.Format(LocalizedText.Get(self.Param.Expr), (object)self.ival)); } switch (self.type) { case TrophyConditionTypes.winquest: if (string.IsNullOrEmpty(self.sval)) { return(string.Format(LocalizedText.Get("sys.TROPHY_WINQUEST_NORMAL"), (object)self.ival)); } QuestParam quest1 = instance.FindQuest(self.sval); return(string.Format(LocalizedText.Get("sys.TROPHY_WINQUEST"), quest1 == null ? (object)("?" + self.sval) : (object)quest1.name, (object)self.ival)); case TrophyConditionTypes.killenemy: UnitParam unitParam1 = instance.GetUnitParam(self.sval); return(string.Format(LocalizedText.Get("sys.TROPHY_KILLENEMY"), unitParam1 == null ? (object)("?" + self.sval) : (object)unitParam1.name, (object)self.ival)); case TrophyConditionTypes.getitem: ItemParam itemParam = instance.GetItemParam(self.sval); return(string.Format(LocalizedText.Get("sys.TROPHY_GETITEM"), itemParam == null ? (object)("?" + self.sval) : (object)itemParam.name, (object)self.ival)); case TrophyConditionTypes.playerlv: return(string.Format(LocalizedText.Get("sys.TROPHY_PLAYERLV"), (object)self.ival)); case TrophyConditionTypes.winelite: return(string.Format(LocalizedText.Get("sys.TROPHY_WINQUEST_ELITE"), (object)self.ival)); case TrophyConditionTypes.winevent: return(string.Format(LocalizedText.Get("sys.TROPHY_WINQUEST_EVENT"), (object)self.ival)); case TrophyConditionTypes.gacha: return(string.Format(LocalizedText.Get("sys.TROPHY_GACHA"), (object)self.ival)); case TrophyConditionTypes.multiplay: return(string.Format(LocalizedText.Get("sys.TROPHY_MULTIPLAY"), (object)self.ival)); case TrophyConditionTypes.ability: return(string.Format(LocalizedText.Get("sys.TROPHY_ABILITY"), (object)self.ival)); case TrophyConditionTypes.soubi: return(string.Format(LocalizedText.Get("sys.TROPHY_SOUBI"), (object)self.ival)); case TrophyConditionTypes.buygold: return(string.Format(LocalizedText.Get("sys.TROPHY_BUYGOLD"), (object)self.ival)); case TrophyConditionTypes.vip: return(string.Format(LocalizedText.Get("sys.TROPHY_VIP"), (object)self.ival)); case TrophyConditionTypes.stamina: return(string.Format(LocalizedText.Get("sys.TROPHY_STAMINA"), (object)int.Parse(self.sval.Substring(0, 2)), (object)int.Parse(self.sval.Substring(3, 2)))); case TrophyConditionTypes.arena: return(string.Format(LocalizedText.Get("sys.TROPHY_ARENA"), (object)self.ival)); case TrophyConditionTypes.winarena: return(string.Format(LocalizedText.Get("sys.TROPHY_WINARENA"), (object)self.ival)); case TrophyConditionTypes.review: return(LocalizedText.Get("sys.TROPHY_REVIEW")); case TrophyConditionTypes.followtwitter: return(LocalizedText.Get("sys.TROPHY_FOLLOWTWITTER")); case TrophyConditionTypes.fggid: return(LocalizedText.Get("sys.TROPHY_FGGID")); case TrophyConditionTypes.unitlevel: UnitParam unitParam2 = instance.GetUnitParam(self.sval); return(string.Format(LocalizedText.Get("sys.TROPHY_UNITLV"), unitParam2 == null ? (object)("?" + self.sval) : (object)unitParam2.name, (object)self.ival)); case TrophyConditionTypes.evolutionnum: UnitParam unitParam3 = instance.GetUnitParam(self.sval); return(string.Format(LocalizedText.Get("sys.TROPHY_EVOLUTIONCNT"), unitParam3 == null ? (object)("?" + self.sval) : (object)unitParam3.name, (object)(self.ival + 1))); case TrophyConditionTypes.joblevel: string[] strArray1 = self.sval.Split(chArray); UnitParam unitParam4 = instance.GetUnitParam(strArray1[0]); JobParam jobParam1 = instance.GetJobParam(strArray1[1]); return(string.Format(LocalizedText.Get("sys.TROPHY_JOBLV"), unitParam4 == null ? (object)("?" + strArray1[0]) : (object)unitParam4.name, jobParam1 == null ? (object)("?" + strArray1[1]) : (object)jobParam1.name, (object)self.ival)); case TrophyConditionTypes.logincount: return(string.Format(LocalizedText.Get("sys.TROPHY_LOGINCNT"), (object)self.ival)); case TrophyConditionTypes.upunitlevel: return(string.Format(LocalizedText.Get("sys.TROPHY_UNITLVUP"), (object)SRPG_Extensions.GetUnitName(self.sval), (object)self.ival)); case TrophyConditionTypes.makeunitlevel: if (!string.IsNullOrEmpty(self.sval)) { return(string.Format(LocalizedText.Get("sys.TROPHY_UNITLVMAKE"), (object)SRPG_Extensions.GetUnitName(self.sval), (object)self.ival)); } return(string.Format(LocalizedText.Get("sys.TROPHY_UNITLVMAKE_DEFAULT"), (object)self.ival)); case TrophyConditionTypes.unitequip: return(string.Format(LocalizedText.Get("sys.TROPHY_EQUIP"), (object)SRPG_Extensions.GetUnitName(self.sval), (object)self.ival)); case TrophyConditionTypes.upjoblevel: if (!string.IsNullOrEmpty(self.sval)) { string[] strArray2 = self.sval.Split(chArray); UnitParam unitParam5 = instance.GetUnitParam(strArray2[0]); JobParam jobParam2 = instance.GetJobParam(strArray2[1]); str2 = unitParam5 == null ? "?" + strArray2[0] : unitParam5.name; str1 = jobParam2 == null ? "?" + strArray2[1] : jobParam2.name; } if (!string.IsNullOrEmpty(str2)) { if (!string.IsNullOrEmpty(str1)) { return(string.Format(LocalizedText.Get("sys.TROPHY_JOBLVUP"), (object)str2, (object)str1, (object)self.ival)); } return(string.Format(LocalizedText.Get("sys.TROPHY_JOBLVUP_ANYJOB"), (object)str2, (object)self.ival)); } if (!string.IsNullOrEmpty(str1)) { return(string.Format(LocalizedText.Get("sys.TROPHY_JOBLVUP_ANYJOB_ANYUNIT"), (object)self.ival)); } return(string.Format(LocalizedText.Get("sys.TROPHY_JOBLVUP"), (object)str2, (object)str1, (object)self.ival)); case TrophyConditionTypes.makejoblevel: if (!string.IsNullOrEmpty(self.sval)) { string[] strArray2 = self.sval.Split(chArray); UnitParam unitParam5 = instance.GetUnitParam(strArray2[0]); JobParam jobParam2 = instance.GetJobParam(strArray2[1]); string str3 = unitParam5 == null ? "?" + strArray2[0] : unitParam5.name; string str4 = jobParam2 == null ? "?" + strArray2[1] : jobParam2.name; if (!string.IsNullOrEmpty(str3)) { if (!string.IsNullOrEmpty(str4)) { return(string.Format(LocalizedText.Get("sys.TROPHY_JOBLVMAKE"), (object)str3, (object)str4, (object)self.ival)); } return(string.Format(LocalizedText.Get("sys.TROPHY_JOBLVMAKE_ANYJOB"), (object)str3, (object)self.ival)); } if (!string.IsNullOrEmpty(str4)) { return(string.Format(LocalizedText.Get("sys.TROPHY_JOBLVMAKE_ANYUNIT"), (object)str4, (object)self.ival)); } } return(string.Format(LocalizedText.Get("sys.TROPHY_JOBLVMAKE_DEFAULT"), (object)self.ival)); case TrophyConditionTypes.limitbreak: if (!string.IsNullOrEmpty(self.sval)) { return(string.Format(LocalizedText.Get("sys.TROPHY_LIMITBREAK"), (object)SRPG_Extensions.GetUnitName(self.sval), (object)self.ival)); } return(string.Format(LocalizedText.Get("sys.TROPHY_LIMITBREAK_DEFAULT"), (object)self.ival)); case TrophyConditionTypes.evoltiontimes: if (string.IsNullOrEmpty(self.sval) || string.IsNullOrEmpty(SRPG_Extensions.GetUnitName(self.sval))) { return(string.Format(LocalizedText.Get("sys.TROPHY_EVOLUTIONTIMES_ANY"), (object)self.ival)); } return(string.Format(LocalizedText.Get("sys.TROPHY_EVOLUTIONTIMES"), (object)SRPG_Extensions.GetUnitName(self.sval), (object)self.ival)); case TrophyConditionTypes.changejob: if (!string.IsNullOrEmpty(self.sval)) { return(string.Format(LocalizedText.Get("sys.TROPHY_CHANGEJOB"), (object)SRPG_Extensions.GetUnitName(self.sval), (object)self.ival)); } return(string.Format(LocalizedText.Get("sys.TROPHY_CHANGEJOB_DEFAULT"), (object)self.ival)); case TrophyConditionTypes.changeability: return(string.Format(LocalizedText.Get("sys.TROPHY_CHANGEABILITY"), (object)SRPG_Extensions.GetUnitName(self.sval), (object)self.ival)); case TrophyConditionTypes.makeabilitylevel: if (string.IsNullOrEmpty(self.sval)) { return(string.Format(LocalizedText.Get("sys.TROPHY_ABILITYLV_DEFAULT"), (object)self.ival)); } string[] strArray3 = self.sval.Split(chArray); string empty1 = string.Empty; if (string.IsNullOrEmpty(strArray3[1])) { return(string.Format(LocalizedText.Get("sys.TROPHY_ABILITYLV_ANYABILITY"), (object)SRPG_Extensions.GetUnitName(strArray3[0]), (object)self.ival)); } AbilityParam abilityParam = instance.GetAbilityParam(strArray3[1]); string str5 = abilityParam == null ? "?" + strArray3[1] : abilityParam.name; if (!string.IsNullOrEmpty(strArray3[0])) { return(string.Format(LocalizedText.Get("sys.TROPHY_ABILITYLV"), (object)SRPG_Extensions.GetUnitName(strArray3[0]), (object)str5, (object)self.ival)); } return(string.Format(LocalizedText.Get("sys.TROPHY_ABILITYLV_ANYUNIT"), (object)str5, (object)self.ival)); case TrophyConditionTypes.winquestsoldier: return(string.Format(LocalizedText.Get("sys.TROPHY_WINSOLIDER"), (object)self.ival)); case TrophyConditionTypes.winmulti: return(string.Format(LocalizedText.Get("sys.TROPHY_WINMULTI"), (object)SRPG_Extensions.GetQuestName(self.sval), (object)self.ival)); case TrophyConditionTypes.buyatshop: string empty2 = string.Empty; string empty3 = string.Empty; if (!string.IsNullOrEmpty(self.sval)) { string[] strArray2 = self.sval.Split(chArray); if (!string.IsNullOrEmpty(strArray2[0])) { int shopType = instance.MasterParam.GetShopType(strArray2[0]); string shopName = instance.Player.GetShopName((EShopType)shopType); if (!string.IsNullOrEmpty(strArray2[1])) { return(string.Format(LocalizedText.Get("sys.TROPHY_BUYATSHOP"), (object)shopName, (object)empty3, (object)self.ival)); } return(string.Format(LocalizedText.Get("sys.TROPHY_BUYATSHOP_ANYITEM"), (object)shopName, (object)self.ival)); } string itemName = SRPG_Extensions.GetItemName(strArray2[1]); if (!string.IsNullOrEmpty(strArray2[1])) { return(string.Format(LocalizedText.Get("sys.TROPHY_BUYATSHOP_ANYSHOP"), (object)itemName, (object)self.ival)); } } return(string.Format(LocalizedText.Get("sys.TROPHY_BUYATSHOP_DEFAULT"), (object)self.ival)); case TrophyConditionTypes.artifacttransmute: if (string.IsNullOrEmpty(self.sval) || string.IsNullOrEmpty(SRPG_Extensions.GetArtifactName(self.sval))) { return(string.Format(LocalizedText.Get("sys.TROPHY_AFORDRILL_ANY"), (object)self.ival)); } return(string.Format(LocalizedText.Get("sys.TROPHY_AFORDRILL"), (object)SRPG_Extensions.GetArtifactName(self.sval), (object)self.ival)); case TrophyConditionTypes.artifactstrength: if (string.IsNullOrEmpty(self.sval) || string.IsNullOrEmpty(SRPG_Extensions.GetArtifactName(self.sval))) { return(string.Format(LocalizedText.Get("sys.TROPHY_AFSTRENGTHEN_ANY"), (object)self.ival)); } return(string.Format(LocalizedText.Get("sys.TROPHY_AFSTRENGTHEN"), (object)SRPG_Extensions.GetArtifactName(self.sval), (object)self.ival)); case TrophyConditionTypes.artifactevolution: if (string.IsNullOrEmpty(self.sval) || string.IsNullOrEmpty(SRPG_Extensions.GetArtifactName(self.sval))) { return(string.Format(LocalizedText.Get("sys.TROPHY_AFVOLUTION_ANY"), (object)self.ival)); } return(string.Format(LocalizedText.Get("sys.TROPHY_AFVOLUTION"), (object)SRPG_Extensions.GetArtifactName(self.sval), (object)self.ival)); case TrophyConditionTypes.winmultimore: return(string.Format(LocalizedText.Get("sys.TROPHY_WINMULTIMORE"), (object)SRPG_Extensions.GetQuestName(self.sval), (object)self.ival)); case TrophyConditionTypes.winmultiless: return(string.Format(LocalizedText.Get("sys.TROPHY_WINMULTILESS"), (object)SRPG_Extensions.GetQuestName(self.sval), (object)self.ival)); case TrophyConditionTypes.collectunits: return(string.Format(LocalizedText.Get("sys.TROPHY_COLLECTUNITS"), (object)self.ival)); case TrophyConditionTypes.totaljoblv11: return(string.Format(LocalizedText.Get("sys.TROPHY_TOTALJOBLV11"), (object)self.ival)); case TrophyConditionTypes.totalunitlvs: return(string.Format(LocalizedText.Get("sys.TROPHY_TOTALUNITLVS"), (object)self.ival)); case TrophyConditionTypes.childrencomp: return(string.Format(LocalizedText.Get("sys.TROPHY_CHILDRENCOMP"), (object)self.ival)); case TrophyConditionTypes.wintower: if (string.IsNullOrEmpty(self.sval)) { return(string.Format(LocalizedText.Get("sys.TROPHY_WINTOWER_NORMAL"), (object)self.ival)); } QuestParam quest2 = instance.FindQuest(self.sval); if (quest2 != null) { return(string.Format(LocalizedText.Get("sys.TROPHY_WINTOWER"), (object)quest2.title, (object)quest2.name, (object)self.ival)); } DebugUtility.Log("「" + self.sval + "」quest_id is not found."); return(string.Empty); case TrophyConditionTypes.losequest: if (string.IsNullOrEmpty(self.sval)) { return(string.Format(LocalizedText.Get("sys.TROPHY_LOSEQUEST_NORMAL"), (object)self.ival)); } QuestParam quest3 = instance.FindQuest(self.sval); return(string.Format(LocalizedText.Get("sys.TROPHY_LOSEQUEST"), quest3 == null ? (object)("?" + self.sval) : (object)quest3.name, (object)self.ival)); case TrophyConditionTypes.loseelite: return(string.Format(LocalizedText.Get("sys.TROPHY_LOSEQUEST_ELITE"), (object)self.ival)); case TrophyConditionTypes.loseevent: return(string.Format(LocalizedText.Get("sys.TROPHY_LOSEQUEST_EVENT"), (object)self.ival)); case TrophyConditionTypes.losetower: if (string.IsNullOrEmpty(self.sval)) { return(string.Format(LocalizedText.Get("sys.TROPHY_LOSETOWER_NORMAL"), (object)self.ival)); } QuestParam quest4 = instance.FindQuest(self.sval); if (quest4 != null) { return(string.Format(LocalizedText.Get("sys.TROPHY_LOSETOWER"), (object)quest4.title, (object)quest4.name, (object)self.ival)); } DebugUtility.Log("「" + self.sval + "」quest_id is not found."); return(string.Empty); case TrophyConditionTypes.losearena: return(string.Format(LocalizedText.Get("sys.TROPHY_LOSEARENA"), (object)self.ival)); case TrophyConditionTypes.dailyall: return(string.Format(LocalizedText.Get("sys.TROPHY_DAILYALL"), (object)self.ival)); case TrophyConditionTypes.vs: return(string.Format(LocalizedText.Get("sys.TROPHY_VS"), (object)self.ival)); case TrophyConditionTypes.vswin: return(string.Format(LocalizedText.Get("sys.TROPHY_VSWIN"), (object)self.ival)); case TrophyConditionTypes.vslose: return(string.Format(LocalizedText.Get("sys.TROPHY_VSLOSE"), (object)self.ival)); case TrophyConditionTypes.fblogin: return(LocalizedText.Get("sys.TROPHY_FBLOGIN")); default: return(string.Empty); } }