// Token: 0x06001158 RID: 4440 RVA: 0x001E82B4 File Offset: 0x001E64B4 public static byte SetStack(MotionEffect e) { MotionEffect.SpriteStack[(int)MotionEffect.Index] = e; byte index = MotionEffect.Index; MotionEffect.Index += 1; if ((int)MotionEffect.Index >= MotionEffect.SpriteStack.Length) { MotionEffect.Index = 0; } return(index); }
// Token: 0x06001162 RID: 4450 RVA: 0x001E84D0 File Offset: 0x001E66D0 public void SetSpriteRender(SpriteRenderer render) { this.Render = render; if (this.Render == null) { this.bMove = false; } else { this.bMove = true; MotionEffect.SetStack(this); } }
// Token: 0x06001BC3 RID: 7107 RVA: 0x003158A0 File Offset: 0x00313AA0 private void ShowLegionHint(ref Skill skill) { DataManager instance = DataManager.Instance; this.LegionTrans.gameObject.SetActive(true); this.Kind.text = instance.mStringTable.GetStringByID(485u + (uint)(skill.SkillType % 10)); this.Prop.text = instance.mStringTable.GetStringByID(488u); this.BadgeTransform[(int)(this.HeroEnhance - 1)].GetChild(0).gameObject.SetActive(true); if (this.BadgeIndex < 0) { this.BadgeIndex = (int)MotionEffect.SetStack(this.BadgeMotion); } this.GetLegionHintStr(this.HeroEnhance, ref skill, ref this.m_tmpStrlong, 0); this.Content.text = this.m_tmpStrlong.ToString(); this.Content.SetAllDirty(); this.Content.cachedTextGenerator.Invalidate(); this.Content.cachedTextGeneratorForLayout.Invalidate(); }
// Token: 0x06001190 RID: 4496 RVA: 0x001EC44C File Offset: 0x001EA64C public void UpdateMapSprite(ushort ID, byte State) { if (ID == 0) { return; } int num = (int)ID; if (this.Type == WorldMode.Wild) { switch (State) { case 5: if (this.HeroBuild != null) { this.HeroBuild.Update(State); } if (this.ArenaBuild != null) { this.ArenaBuild.Update(State); } if (this.DugoutBuild != null) { this.DugoutBuild.Update(State); } if (this.Fortress != null) { this.Fortress.Update(State); } if (this.BlackMarket != null) { this.BlackMarket.Update(State); } if (this.Laboratory != null) { this.Laboratory.Update(State); } if (this.Carsino != null) { this.Carsino.Update(State); } this.UpdateDiamon(); for (int i = this.Builds.Length; i > 0; i--) { this.Builds[i - 1].Update(State); } return; case 6: this.Initial(); return; case 7: if (this.EffectBuildComplete != null) { ParticleManager.Instance.DeSpawn(this.EffectBuildComplete); this.EffectBuildComplete = null; } return; case 8: case 9: for (int j = this.Builds.Length; j > 0; j--) { this.Builds[j - 1].Update(State); } return; case 10: if (this.GuildPoint != null) { this.GuildPoint.enabled = false; } return; case 11: if (this.JailNoticeIcon != null) { this.JailNoticeIcon.UpdateData(); } return; default: { if (GUIManager.Instance.BuildingData.AllBuildsData.Length <= (int)ID) { return; } for (int k = 0; k < this.Builds.Length; k++) { if (this.Builds[k].Index == ID) { num = k; } } this.UpdateIndex = (ushort)num; BuildsData buildingData = GUIManager.Instance.BuildingData; byte level = buildingData.AllBuildsData[(int)ID].Level; if (this.MotionTransform != null) { Vector3 source = this.Source; if (this.Change < 0f) { source.y = this.Source.y; } else { source.y = this.Source.y + this.Change; } this.MotionTransform.position = source; this.Builds[this.MotionIndex].Update(3); this.MotionTransform = null; this.MotionIndex = -1; MotionEffect.RemoveStack(this.EasingIndex); } if (buildingData.AllBuildsData[(int)ID].BuildID == 16 && buildingData.BuildingManorID != this.Builds[num].Index && State == 3 && (level == 1 || level == 3 || level == 6 || level == 9)) { this.Builds[num].Update(0); this.MotionTransform = this.SpriteGameObject[num].transform; this.Source = this.MotionTransform.position; this.Change = -32f; this.DeltaTime = 0f; this.TotalTime = 2f; this.WaitTime = 1f; this.DownUp = 1; this.MotionIndex = num; this.EasingIndex = MotionEffect.SetStack(this.BuildMotion); } else if (buildingData.BuildingManorID != this.Builds[num].Index && State == 3 && (level == 1 || level == 9 || level == 17 || level == 25)) { this.Builds[num].Update(0); this.MotionTransform = this.SpriteGameObject[num].transform; this.Source = this.MotionTransform.position; this.Change = -32f; this.DeltaTime = 0f; this.TotalTime = 2f; this.WaitTime = 1f; this.DownUp = 1; this.MotionIndex = num; this.EasingIndex = MotionEffect.SetStack(this.BuildMotion); } else { if (State == 3 && buildingData.BuildingManorID != this.Builds[num].Index) { this.ShowBuildCompleteEffect(); } this.Builds[num].Update(State); this.GuideManorID = 0; this.GuideBuildID = 0; this.UpdateMapSprite(255, 9); } this.HideNoticeIcon(); break; } } } else { num--; this.Builds[num].Update(State); if (State == 1) { this.MotionTransform = this.SpriteGameObject[num].transform; this.Source.Set(1f, 1f, 1f); this.Change = 4.2f; this.DeltaTime = 0f; this.TotalTime = 0.25f; this.SpriteEffectIdx = 2; } } }
// Token: 0x06001173 RID: 4467 RVA: 0x001E8F74 File Offset: 0x001E7174 public override void Update(byte meg) { DataManager instance = DataManager.Instance; BuildsData buildingData = GUIManager.Instance.BuildingData; switch (meg) { case 0: this.PromptRender.enabled = false; this.LevelRender.enabled = false; this.UpgradeRender.gameObject.SetActive(false); return; case 1: this.UpdateTime = 0f; MotionEffect.SetStack(this.OpenUIMotion); GUIManager.Instance.ShowUILock(EUILock.Normal); break; case 2: if (this.EffectBuilding == null) { Vector3 localPosition = this.spriteRender.transform.localPosition; if (buildingData.AllBuildsData[(int)this.Index].BuildID == 8) { localPosition.y = 20.5f; this.EffectBuilding = ParticleManager.Instance.Spawn(345, null, localPosition, 0.8f, true, false, true); } else { localPosition.y += 8.9f; this.EffectBuilding = ParticleManager.Instance.Spawn(293, null, localPosition, 0.8f, true, false, true); } Quaternion localRotation = this.EffectBuilding.transform.localRotation; localRotation.eulerAngles = new Vector3(0f, 180f, 0f); this.EffectBuilding.transform.localRotation = localRotation; } this.markspriteRender.enabled = false; buildingData.GetBuildSprite(this.Index, this.spriteRender, this.LevelRender); this.Update(5); this.markspriteRender.enabled = true; buildingData.GetBuildSprite(this.Index, this.spriteRender, this.LevelRender); break; case 3: case 4: if (this.EffectBuilding != null) { ParticleManager.Instance.DeSpawn(this.EffectBuilding); this.EffectBuilding = null; } this.markspriteRender.enabled = false; buildingData.GetBuildSprite(this.Index, this.spriteRender, this.LevelRender); if (buildingData.AllBuildsData[(int)this.Index].BuildID == 11) { buildingData.ManorGride[6] = this.spriteRender.transform; buildingData.GuideParm = this.Index; NewbieManager.CheckTroopMemory(false); } this.Update(5); this.Update(9); if (!this.UpgradeRender.gameObject.activeSelf) { this.UpgradeRender.gameObject.gameObject.SetActive(true); } break; case 5: { this.PromptRender.transform.localScale = Vector3.one; this.PromptRender.sprite = null; Vector3 localPosition2 = new Vector3(0f, this.spriteRender.renderer.bounds.size.y * 0.0703125f, 0f); if (buildingData.AllBuildsData.Length > (int)this.Index) { if (!instance.MySysSetting.bShowTrainingIdle) { ushort buildID = buildingData.AllBuildsData[(int)this.Index].BuildID; switch (buildID) { case 12: this.PromptRender.transform.localScale *= 0.8f; if (instance.TrapHospitalTotal > 0u) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_01"); } break; default: if (buildID == 7) { if (instance.HospitalTotal > 0u) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_01"); } } break; case 14: if (instance.TotalSoldier_Embassy > 0u) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_11"); } break; case 16: if (GUIManager.Instance.BuildingData.GetBuildData(8, 0).Level < 17) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_07"); } else if (instance.m_CryptData.money > 0 && instance.m_CryptData.startTime + (long)((ulong)GameConstants.CryptSecends[(int)instance.m_CryptData.kind]) - instance.ServerTime <= 0L) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_06"); } break; case 18: if (instance.PrisonerNum > 0) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("imprisoned_lords"); localPosition2.Set(-0.33f, 1.38f, 0f); } break; case 20: if (PetManager.Instance.CheckPetListBuildMark()) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_09"); } break; case 23: if (PetManager.Instance.m_AllPetTrainState == PetManager.EPetTrainDataState.CanReceive) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_09"); } break; } } else { switch (buildingData.AllBuildsData[(int)this.Index].BuildID) { case 6: if (!instance.queueBarData[10].bActive && buildingData.AllBuildsData[(int)this.Index].Level > 0) { uint num = instance.AttribVal.TotalOuterSoldier + (uint)instance.SoldierTotal; for (int i = 0; i < 16; i++) { num += instance.mSoldier_Hospital[i]; } if (num < 4200000000u) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_02"); } } break; case 7: if (instance.HospitalTotal > 0u) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_01"); } break; case 10: if (!instance.queueBarData[1].bActive && buildingData.AllBuildsData[(int)this.Index].Level > 0) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_04"); } break; case 12: this.PromptRender.transform.localScale *= 0.8f; if (instance.TrapHospitalTotal > 0u) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_01"); } else if (!instance.queueBarData[14].bActive && (instance.GetTechLevel(11) > 0 || instance.GetTechLevel(12) > 0 || instance.GetTechLevel(13) > 0) && instance.AttribVal.GetEffectBaseVal(GATTR_ENUM.EGA_TRAP_CAPACITY) > instance.TrapTotal) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_03"); } break; case 14: if (instance.TotalSoldier_Embassy > 0u) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_11"); } break; case 16: if (GUIManager.Instance.BuildingData.GetBuildData(8, 0).Level < 17) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_07"); } else if (instance.m_CryptData.money == 0) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_05"); } else if (instance.m_CryptData.startTime + (long)((ulong)GameConstants.CryptSecends[(int)instance.m_CryptData.kind]) - instance.ServerTime <= 0L) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_06"); } break; case 18: if (instance.PrisonerNum > 0) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("imprisoned_lords"); localPosition2.Set(-0.33f, 1.38f, 0f); } break; case 20: if (PetManager.Instance.CheckPetListBuildMark()) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_09"); } break; case 22: if (!instance.queueBarData[34].bActive && buildingData.AllBuildsData[(int)this.Index].Level > 0) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_10"); } break; case 23: if (PetManager.Instance.m_AllPetTrainState == PetManager.EPetTrainDataState.CanReceive) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_09"); } else if (PetManager.Instance.m_AllPetTrainState == PetManager.EPetTrainDataState.Empty && buildingData.AllBuildsData[(int)this.Index].Level > 0) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_10"); } break; } } if (instance.MySysSetting.bShowEquipUp && !instance.queueBarData[18].bActive && buildingData.AllBuildsData[(int)this.Index].BuildID == 15) { if (LordEquipData.Instance().isEquipEvoReady) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_09"); } } else if (buildingData.AllBuildsData[(int)this.Index].BuildID == 8 && buildingData.castleSkin.CheckShowCastleSkin() && buildingData.castleSkin.CheckShowExclamation(true)) { this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_09"); localPosition2.Set(0.64f, 2.51f, 0f); } } else { this.UpdateExtendBuildPrompt(this.Index, ref localPosition2); } if (this.PromptRender.sprite != null) { this.PromptRender.transform.localPosition = localPosition2; this.PromptRender.enabled = this.spriteRender.enabled; } else { this.PromptRender.enabled = false; } break; } case 8: if (instance.MySysSetting.bShowBuildUp && this.CheckUpdateRes <= 1 && buildingData.BuildingManorID == 0 && (int)this.Index < buildingData.AllBuildsData.Length && buildingData.AllBuildsData[(int)this.Index].BuildID > 0 && buildingData.AllBuildsData[(int)this.Index].Level < buildingData.BuildlevelupCheck[(int)buildingData.AllBuildsData[(int)this.Index].BuildID]) { this.UpgradeRender.enabled = true; } else { this.UpgradeRender.enabled = false; } break; case 9: if (!instance.MySysSetting.bShowBuildUp || buildingData.AllBuildsData[(int)this.Index].BuildID == 0 || buildingData.BuildingManorID > 0 || ((int)this.Index < buildingData.AllBuildsData.Length && buildingData.AllBuildsData[(int)this.Index].BuildID == 16 && buildingData.AllBuildsData[(int)this.Index].Level == 9)) { this.UpgradeRender.enabled = false; } else { if (buildingData.AllBuildsData[(int)this.Index].Level < 25) { this.CheckUpdateRes = buildingData.CheckLevelupRule(buildingData.AllBuildsData[(int)this.Index].BuildID, buildingData.AllBuildsData[(int)this.Index].Level + 1); } else { this.CheckUpdateRes = 2; } if (this.CheckUpdateRes == 0) { this.UpgradeRender.enabled = true; } else { this.UpgradeRender.enabled = false; } } break; case 12: this.SetSprite(this.Index, 0); break; } if ((int)this.Index < buildingData.AllBuildsData.Length && buildingData.AllBuildsData[(int)this.Index].BuildID > 0) { this.LevelRender.enabled = !this.markspriteRender.enabled; } }