Exemplo n.º 1
0
        protected override IEnumerator Load()
        {
            m_modifications = new WeaponAndDeckModifications();
            m_modifications.Setup();
            this.LoadAssetBundle(AssetBundlesUtility.GetUIAnimatedCharacterResourcesBundleName());
            this.LoadAssetBundle("core/ui/characters/companions");
            string bundleName = AssetBundlesUtility.GetUICharacterResourcesBundleName();
            AssetBundleLoadRequest bundleLoadRequest = AssetManager.LoadAssetBundle(bundleName);

            while (!bundleLoadRequest.get_isDone())
            {
                yield return(null);
            }
            if (AssetManagerError.op_Implicit(bundleLoadRequest.get_error()) != 0)
            {
                Log.Error($"Error while loading bundle '{bundleName}' error={bundleLoadRequest.get_error()}", 48, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\PlayerUI\\DeckMainState.cs");
                yield break;
            }
            UILoader <DeckUIRoot> loader = new UILoader <DeckUIRoot>(this, "PlayerLayer_DeckCanvas", "core/scenes/ui/deck", disableOnLoad: true);

            yield return(loader.Load());

            m_ui = loader.ui;
            yield return(m_ui.LoadAssets());

            m_ui.get_gameObject().SetActive(true);
            m_ui.Initialise(m_modifications);
        }
Exemplo n.º 2
0
        private IEnumerator LoadFightMap()
        {
            string fightMapBundleName = AssetBundlesUtility.GetFightMapAssetBundleName(m_fightMapId);
            string fightMapSceneName  = ScenesUtility.GetFightMapSceneName(m_fightMapId);

            yield return(LoadSceneAndBundleRequest(fightMapSceneName, fightMapBundleName));

            Scene sceneByName = SceneManager.GetSceneByName(fightMapSceneName);

            if (!sceneByName.IsValid())
            {
                Log.Error("Could not load scene named '" + fightMapSceneName + "' from bundle named '" + fightMapBundleName + "'.", 217, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\FightState.cs");
                yield break;
            }
            m_fightMapScene = sceneByName;
            FightMap componentInRootGameObjects = ScenesUtility.GetComponentInRootGameObjects <FightMap>(sceneByName);

            if (null == componentInRootGameObjects)
            {
                Log.Error("Could not find a FightMap in scene named '" + fightMapSceneName + "'.", 226, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\FightState.cs");
                yield break;
            }
            FightMap.current = componentInRootGameObjects;
            MapRenderSettings.ApplyToScene(FightMap.current.ambience);
        }
Exemplo n.º 3
0
        protected virtual void OnDisable()
        {
            CameraHandler.RemoveMapRotationListener(OnMapRotationChanged);
            DestroyAttachedEffects();
            if (null != m_playableDirector)
            {
                TimelineContextUtility.ClearFightContext(m_playableDirector);
                m_playableDirector.Stop();
                m_playableDirector.set_playableAsset(null);
            }
            if (m_animationCallback != null)
            {
                m_animationCallback.Release();
                m_animationCallback = null;
            }
            ReleaseAnimator();
            AnimatedCharacterData animatedCharacterData = GetAnimatedCharacterData();

            if (null != animatedCharacterData)
            {
                animatedCharacterData.UnloadTimelineResources();
                ClearAnimatedCharacterData();
                AssetManager.UnloadAssetBundle(AssetBundlesUtility.GetAnimatedCharacterDataBundle(m_animatedCharacterDataBundleCategory));
                m_animatedCharacterDataBundleCategory = BundleCategory.None;
            }
            if (m_activeCharacterDataBundleCategory != 0)
            {
                AssetManager.UnloadAssetBundle(AssetBundlesUtility.GetAnimatedCharacterDataBundle(m_activeCharacterDataBundleCategory));
                m_activeCharacterDataBundleCategory = BundleCategory.None;
            }
        }
Exemplo n.º 4
0
        private IEnumerator DisplayWeaponEnumerator(WeaponDefinition definition)
        {
            if (!(m_currentWeapon == definition))
            {
                m_currentWeapon = definition;
                bool flag  = PlayerData.instance.weaponInventory.Contains(definition.get_id());
                bool flag2 = !IsCurrentWeapon(definition.get_id()) && flag;
                m_validateButton.set_interactable(flag2);
                m_validateButtonText.SetText(flag2 ? 40340 : 38149);
                PlayerData.instance.weaponInventory.TryGetLevel(m_currentWeapon.get_id(), out m_level);
                if (m_enterAnimationFinished)
                {
                    yield return(PlayFadeSequence(toOut: true));
                }
                yield return(LoadWeaponInfos(definition));

                BuildDeckList();
                m_backgroundShader.TweenColor(definition.deckBuildingBackgroundColor, definition.deckBuildingBackgroundColor2, 0.2f);
                AssetReference uIAnimatedCharacterReference = definition.GetUIAnimatedCharacterReference();
                CanvasGroup    characterGroup = m_characterloader.GetComponent <CanvasGroup>();
                characterGroup.set_alpha(0f);
                m_characterloader.Setup(uIAnimatedCharacterReference, AssetBundlesUtility.GetUIAnimatedCharacterResourcesBundleName());
                while (m_characterloader.loadState == UIResourceLoadState.Loading)
                {
                    yield return(null);
                }
                DOTweenModuleUI.DOFade(characterGroup, 1f, 0.3f);
                m_equippedFX.SetEquipped(IsCurrentWeapon(definition.get_id()));
                if (m_enterAnimationFinished)
                {
                    yield return(PlayFadeSequence(toOut: false));
                }
            }
        }
Exemplo n.º 5
0
        protected override IEnumerator Load()
        {
            string bundleName = AssetBundlesUtility.GetUICharacterResourcesBundleName();
            AssetBundleLoadRequest bundleLoadRequest = AssetManager.LoadAssetBundle(bundleName);

            while (!bundleLoadRequest.get_isDone())
            {
                yield return(null);
            }
            if (AssetManagerError.op_Implicit(bundleLoadRequest.get_error()) != 0)
            {
                Log.Error($"Error while loading bundle '{bundleName}' error={bundleLoadRequest.get_error()}", 26, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\PlayerUI\\PlayerUIMainState.cs");
                yield break;
            }
            UILoader <PlayerIconRoot> loader = new UILoader <PlayerIconRoot>(this, "PlayerLayerUI", "core/scenes/ui/player", disableOnLoad: true);

            yield return(loader.Load());

            m_ui = loader.ui;
            yield return(m_ui.LoadAssets());

            m_ui.get_gameObject().SetActive(true);
            m_ui.Initialise(this);
            m_ui.LoadVisual();
        }
Exemplo n.º 6
0
        public IEnumerator ChangeAnimatedCharacterData(int skinId, Gender gender)
        {
            if (!RuntimeData.characterSkinDefinitions.TryGetValue(skinId, out CharacterSkinDefinition characterSkinDefinition))
            {
                Log.Error($"Could not find character skin definition with id {skinId}.", 211, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Maps\\Objects\\CharacterObject.cs");
                yield break;
            }
            BundleCategory         bundleCategory    = characterSkinDefinition.bundleCategory;
            string                 bundleName        = AssetBundlesUtility.GetAnimatedCharacterDataBundle(bundleCategory);
            AssetBundleLoadRequest bundleLoadRequest = AssetManager.LoadAssetBundle(bundleName);

            m_activeCharacterDataBundleCategory = bundleCategory;
            while (!bundleLoadRequest.get_isDone())
            {
                yield return(null);
            }
            if (AssetManagerError.op_Implicit(bundleLoadRequest.get_error()) != 0)
            {
                Log.Error($"Failed to load asset bundle named '{bundleName}' for character skin {characterSkinDefinition.get_displayName()} ({characterSkinDefinition.get_id()}): {bundleLoadRequest.get_error()}", 230, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Maps\\Objects\\CharacterObject.cs");
                yield break;
            }
            AssetReference animatedCharacterDataReference = characterSkinDefinition.GetAnimatedCharacterDataReference(gender);
            AssetLoadRequest <AnimatedCharacterData> animatedCharacterDataLoadRequest = animatedCharacterDataReference.LoadFromAssetBundleAsync <AnimatedCharacterData>(bundleName);

            while (!animatedCharacterDataLoadRequest.get_isDone())
            {
                yield return(null);
            }
            if (AssetManagerError.op_Implicit(animatedCharacterDataLoadRequest.get_error()) != 0)
            {
                AssetManager.UnloadAssetBundle(bundleName);
                m_activeCharacterDataBundleCategory = BundleCategory.None;
                Log.Error(string.Format("Failed to load requested {0} asset from bundle '{1}' for character skin {2} ({3}): {4}", "AnimatedCharacterData", bundleName, characterSkinDefinition.get_displayName(), characterSkinDefinition.get_id(), animatedCharacterDataLoadRequest.get_error()), 247, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Maps\\Objects\\CharacterObject.cs");
                yield break;
            }
            AnimatedCharacterData newAnimatedCharacterData = animatedCharacterDataLoadRequest.get_asset();

            yield return(newAnimatedCharacterData.LoadTimelineResources());

            AnimatedCharacterData animatedCharacterData = GetAnimatedCharacterData();

            if (null != animatedCharacterData)
            {
                string animatedCharacterDataBundle = AssetBundlesUtility.GetAnimatedCharacterDataBundle(m_animatedCharacterDataBundleCategory);
                animatedCharacterData.UnloadTimelineResources();
                AssetManager.UnloadAssetBundle(animatedCharacterDataBundle);
                m_animatedCharacterDataBundleCategory = BundleCategory.None;
            }
            SetAnimatedCharacterData(newAnimatedCharacterData);
            m_animatedCharacterDataBundleCategory = m_activeCharacterDataBundleCategory;
            m_activeCharacterDataBundleCategory   = BundleCategory.None;
            IAnimator2D animator       = GetAnimator();
            int         animationFrame = animator.get_currentFrame();

            yield return(SetAnimatorDefinition());

            animator.set_currentFrame(animationFrame);
        }
        protected override IEnumerator LoadAssets()
        {
            AssetReference uIIconReference = m_definition.GetUIIconReference();

            m_visualLoader.Setup(uIIconReference, AssetBundlesUtility.GetUIGodsResourcesBundleName());
            while (m_visualLoader.loadState == UIResourceLoadState.Loading)
            {
                yield return(null);
            }
        }
Exemplo n.º 8
0
        private IEnumerator LoadPlayerVisual(WeaponDefinition definition)
        {
            AssetReference illustrationReference = definition.GetIllustrationReference();

            m_VisualLoader.Setup(illustrationReference, AssetBundlesUtility.GetUICharacterResourcesBundleName());
            while (m_VisualLoader.loadState == UIResourceLoadState.Loading)
            {
                yield return(null);
            }
        }
Exemplo n.º 9
0
        private IEnumerator LoadCharacterSkin()
        {
            if (!string.IsNullOrEmpty(m_lastLoadedCharacterBundle))
            {
                this.UnloadAssetBundle(m_lastLoadedCharacterBundle, true, true);
                m_lastLoadedCharacterBundle = null;
            }
            PlayerData instance = PlayerData.instance;
            Gender     gender   = instance.gender;
            Id <CharacterSkinDefinition> skin = instance.Skin;

            if (skin == null || !RuntimeData.characterSkinDefinitions.TryGetValue(skin.value, out CharacterSkinDefinition characterSkinDefinition))
            {
                yield break;
            }
            BundleCategory         bundleCategory    = characterSkinDefinition.bundleCategory;
            string                 bundleName        = m_lastLoadedCharacterBundle = AssetBundlesUtility.GetAnimatedCharacterDataBundle(bundleCategory);
            AssetBundleLoadRequest bundleLoadRequest = this.LoadAssetBundle(bundleName);

            while (!bundleLoadRequest.get_isDone())
            {
                yield return(null);
            }
            if (AssetManagerError.op_Implicit(bundleLoadRequest.get_error()) != 0)
            {
                Log.Error($"Failed to load asset bundle named '{bundleName}' for character skin {characterSkinDefinition.get_displayName()} ({characterSkinDefinition.get_id()}): {bundleLoadRequest.get_error()}", 253, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\HavreDimension\\HavreDimensionMainState.cs");
                yield break;
            }
            AssetReference animatedCharacterDataReference = characterSkinDefinition.GetAnimatedCharacterDataReference(gender);
            AssetLoadRequest <AnimatedCharacterData> animatedCharacterDataLoadRequest = animatedCharacterDataReference.LoadFromAssetBundleAsync <AnimatedCharacterData>(bundleName);

            while (!animatedCharacterDataLoadRequest.get_isDone())
            {
                yield return(null);
            }
            if (AssetManagerError.op_Implicit(animatedCharacterDataLoadRequest.get_error()) != 0)
            {
                this.UnloadAssetBundle(bundleName, true, true);
                Log.Error(string.Format("Failed to load {0} asset from bundle '{1}' for character skin {2} ({3}): {4}", "AnimatedCharacterData", bundleName, characterSkinDefinition.get_displayName(), characterSkinDefinition.get_id(), animatedCharacterDataLoadRequest.get_error()), 269, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\HavreDimension\\HavreDimensionMainState.cs");
                yield break;
            }
            AnimatedCharacterData animatedCharacterData = animatedCharacterDataLoadRequest.get_asset();

            yield return(animatedCharacterData.LoadTimelineResources());

            AnimatedFightCharacterData animatedFightCharacterData = animatedCharacterData as AnimatedFightCharacterData;
            AnimatedObjectDefinition   animatedObjectDefinition   = animatedFightCharacterData.animatedObjectDefinition;

            m_havreMap.character.SetCharacterData(animatedFightCharacterData, animatedObjectDefinition);
            m_loadCharacterCoroutine = null;
        }
Exemplo n.º 10
0
        private IEnumerator LoadGod()
        {
            if (!string.IsNullOrEmpty(m_lastLoadedGodBundle))
            {
                this.UnloadAssetBundle(m_lastLoadedGodBundle, true, true);
                m_lastLoadedGodBundle = null;
            }
            God god = PlayerData.instance.god;

            if (!RuntimeData.godDefinitions.TryGetValue(god, out GodDefinition value))
            {
                yield break;
            }
            AssetReference         statuePrefabReference = value.statuePrefabReference;
            string                 bundleName            = m_lastLoadedGodBundle = AssetBundlesUtility.GetUIGodsResourcesBundleName();
            AssetBundleLoadRequest bundleRequest         = this.LoadAssetBundle(bundleName);

            while (!bundleRequest.get_isDone())
            {
                yield return(null);
            }
            if (AssetManagerError.op_Implicit(bundleRequest.get_error()) != 0)
            {
                Log.Error($"Could not load bundle named '{bundleName}': {bundleRequest.get_error()}", 196, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\HavreDimension\\HavreDimensionMainState.cs");
                yield break;
            }
            AssetLoadRequest <GameObject> assetReferenceRequest = statuePrefabReference.LoadFromAssetBundleAsync <GameObject>(bundleName);

            while (!assetReferenceRequest.get_isDone())
            {
                yield return(null);
            }
            if (AssetManagerError.op_Implicit(assetReferenceRequest.get_error()) != 0)
            {
                Log.Error($"Could not load requested asset ({statuePrefabReference.get_value()}) from bundle named '{bundleName}': {assetReferenceRequest.get_error()}", 208, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\HavreDimension\\HavreDimensionMainState.cs");
                yield break;
            }
            GameObject asset = assetReferenceRequest.get_asset();

            m_havreMap.godZaap.SetStatue(asset);
            m_loadGodCoroutine = null;
        }
Exemplo n.º 11
0
        protected override IEnumerator Load()
        {
            AssetManager.LoadAssetBundle(AssetBundlesUtility.GetUIAnimatedCharacterResourcesBundleName());
            UILoader <UIZaapPVPLoading> loader = new UILoader <UIZaapPVPLoading>(this, "MatchmakingUI_1v1", "core/scenes/maps/havre_maps", disableOnLoad: true);

            yield return(loader.Load());

            m_ui = loader.ui;
            m_ui.onForceAiRequested       = OnForceAiRequested;
            m_ui.onCancelRequested        = OnCancelRequested;
            m_ui.onEnterAnimationFinished = OnPlayRequested;
            yield return(m_ui.LoadAssets());

            m_frame = new MatchMakingFrame
            {
                onGameCreated  = OnGameCreated,
                onGameCanceled = OnGameCancel,
                onGameError    = OnGameError
            };
        }
Exemplo n.º 12
0
        private unsafe IEnumerator AppearRoutine(GodDefinition definition)
        {
            m_statueLoader.color = new Color(1f, 1f, 1f, 0f);
            m_illuLoader.color   = new Color(1f, 1f, 1f, 0f);
            AssetReference uIStatueReference = definition.GetUIStatueReference();

            m_statueLoader.Setup(uIStatueReference, AssetBundlesUtility.GetUIGodsResourcesBundleName());
            AssetReference uIBGReference = definition.GetUIBGReference();

            m_illuLoader.Setup(uIBGReference, AssetBundlesUtility.GetUIGodsResourcesBundleName());
            while (m_statueLoader.loadState == UIResourceLoadState.Loading && m_illuLoader.loadState == UIResourceLoadState.Loading)
            {
                yield return(null);
            }
            DOTween.To(new DOGetter <Color>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), new DOSetter <Color>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), Color.get_white(), 0.25f);
            m_onGodChange.Invoke();
            yield return((object)new WaitForTime(0.1f));

            m_changeGodFX.Play();
            DOTween.To(new DOGetter <Color>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), new DOSetter <Color>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), Color.get_white(), 0.5f);
        }
Exemplo n.º 13
0
        private void UpdateIllustration()
        {
            //IL_003f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0044: Unknown result type (might be due to invalid IL or missing references)
            //IL_005e: Unknown result type (might be due to invalid IL or missing references)
            m_illustration.set_enabled(false);
            if (m_definition == null)
            {
                m_illustration.set_sprite(m_emptySprite);
                m_illustration.set_enabled(true);
                return;
            }
            AssetReference illustrationReference = m_definition.GetIllustrationReference();

            if (illustrationReference.get_hasValue())
            {
                Main.monoBehaviour.StartCoroutine(m_definition.LoadIllustrationAsync <Sprite>(AssetBundlesUtility.GetUICharacterResourcesBundleName(), illustrationReference, (Action <Sprite, string>)UpdateIllustrationCallback));
            }
        }
Exemplo n.º 14
0
        private void SetIllustration(WeaponData data)
        {
            //IL_0017: Unknown result type (might be due to invalid IL or missing references)
            //IL_001c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0031: Unknown result type (might be due to invalid IL or missing references)
            WeaponDefinition weaponDefinition = data?.definition;

            if (weaponDefinition != null)
            {
                AssetReference weaponIllustrationReference = weaponDefinition.GetWeaponIllustrationReference();
                if (weaponIllustrationReference.get_hasValue())
                {
                    Main.monoBehaviour.StartCoroutine(weaponDefinition.LoadIllustrationAsync <Sprite>(AssetBundlesUtility.GetUICharacterResourcesBundleName(), weaponIllustrationReference, (Action <Sprite, string>)SetIllustrationCallback));
                }
            }
            else if (m_weaponImage != null)
            {
                m_weaponImage.set_enabled(false);
            }
        }
Exemplo n.º 15
0
 private void UpdateSprite()
 {
     //IL_0058: Unknown result type (might be due to invalid IL or missing references)
     if (!this.get_isActiveAndEnabled())
     {
         return;
     }
     if (m_weaponDefinition == null)
     {
         m_illu.set_sprite(null);
         return;
     }
     if (m_loadingCoroutine != null)
     {
         this.StopCoroutine(m_loadingCoroutine);
         m_illu.set_sprite(null);
     }
     m_loadingCoroutine = this.StartCoroutine(m_weaponDefinition.LoadIllustrationAsync <Sprite>(AssetBundlesUtility.GetUICharacterResourcesBundleName(), m_weaponDefinition.GetIllustrationReference(), (Action <Sprite, string>)UpdateSpriteCallback));
 }
Exemplo n.º 16
0
 private IEnumerator LoadIllu(WeaponDefinition weaponDefinition)
 {
     m_illuImageLoader.Setup(weaponDefinition.GetIllustrationReference(), AssetBundlesUtility.GetUICharacterResourcesBundleName());
     yield break;
 }
Exemplo n.º 17
0
        protected override IEnumerator LoadAssets()
        {
            AssetReference            weaponIllustrationReference = m_definition.GetWeaponIllustrationReference();
            AssetLoadRequest <Sprite> assetReferenceRequest       = weaponIllustrationReference.LoadFromAssetBundleAsync <Sprite>(AssetBundlesUtility.GetUICharacterResourcesBundleName());

            while (!assetReferenceRequest.get_isDone())
            {
                yield return(null);
            }
            if (AssetManagerError.op_Implicit(assetReferenceRequest.get_error()) != 0)
            {
                Log.Error($"Error while loading illustration for {((object)m_definition).GetType().Name} {m_definition.get_name()} error={assetReferenceRequest.get_error()}", 47, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\UI\\Player\\DeckRoot\\WeaponRibbonItem.cs");
                yield break;
            }
            m_visual.set_sprite(assetReferenceRequest.get_asset());
            AssetReference uIWeaponButtonReference = m_definition.GetUIWeaponButtonReference();
            AssetLoadRequest <Material> matAssetReferenceRequest = uIWeaponButtonReference.LoadFromAssetBundleAsync <Material>("core/ui/characters/heroes");

            while (!matAssetReferenceRequest.get_isDone())
            {
                yield return(null);
            }
            if (AssetManagerError.op_Implicit(matAssetReferenceRequest.get_error()) != 0)
            {
                Log.Error(string.Format("Error while loading material {0} error={1}", "core/ui/characters/weaponbutton", assetReferenceRequest.get_error()), 63, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\UI\\Player\\DeckRoot\\WeaponRibbonItem.cs");
                yield break;
            }
            m_equipedMaterial = matAssetReferenceRequest.get_asset();
            m_shine.set_color(m_definition.deckBuildingWeaponShine);
        }
Exemplo n.º 18
0
        private IEnumerator LoadWeaponInfos(WeaponDefinition definition)
        {
            AssetReference weaponIllustrationReference = definition.GetWeaponIllustrationReference();

            m_weaponTextField.SetText(definition.i18nNameId);
            m_weaponLevelField.SetText(68066, new IndexedValueProvider(m_level.ToString()));
            AssetLoadRequest <Sprite> assetReferenceRequest = weaponIllustrationReference.LoadFromAssetBundleAsync <Sprite>(AssetBundlesUtility.GetUICharacterResourcesBundleName());

            while (!assetReferenceRequest.get_isDone())
            {
                yield return(null);
            }
            if (AssetManagerError.op_Implicit(assetReferenceRequest.get_error()) != 0)
            {
                Log.Error($"Error while loading illustration for {((object)definition).GetType().Name} {definition.get_name()} error={assetReferenceRequest.get_error()}", 305, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\UI\\Player\\DeckRoot\\DeckUIRoot.cs");
                yield break;
            }
            WeaponData value = new WeaponData(definition, m_level);

            m_weaponVisual.SetValue(value);
            m_weaponPassiveText.SetText(definition.i18nDescriptionId, new FightValueProvider(definition, m_level));
            m_pedestalWeaponCellRenderer.SetValue(value);
            if (definition != null)
            {
                List <Id <SpellDefinition> > list = definition.spells.ToList();
                if (list.Count != 0 && RuntimeData.spellDefinitions.TryGetValue(list[0].value, out SpellDefinition value2))
                {
                    SpellData spellData = new SpellData(value2, m_level);
                    m_pedestalSpellCellRenderer.SetValue(spellData);
                    m_equippedFX.SetElement(value2.element);
                    m_spellRenderer.SetValue(new SpellData(value2, m_level));
                    string text = RuntimeData.FormattedText(spellData.definition.i18nNameId);
                    m_spellName.SetText(33557, new IndexedValueProvider(text));
                    m_spellDescription.SetText(spellData.definition.i18nDescriptionId, new FightValueProvider(spellData.definition, m_level));
                    int valueWithLevel  = definition.movementPoints.GetValueWithLevel(m_level);
                    int valueWithLevel2 = definition.life.GetValueWithLevel(m_level);
                    int valueWithLevel3 = definition.actionValue.GetValueWithLevel(m_level);
                    m_strengthField.SetText(valueWithLevel3.ToString());
                    m_lifeField.SetText(valueWithLevel2.ToString());
                    m_moveField.SetText(valueWithLevel.ToString());
                }
            }
        }