Beispiel #1
0
        private void setup(string iname, Unit modify_unit, int rank, int rankcap)
        {
            if (string.IsNullOrEmpty(iname))
            {
                return;
            }
            GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect();

            if (!UnityEngine.Object.op_Implicit((UnityEngine.Object)instanceDirect))
            {
                return;
            }
            this.mWeatherParam = instanceDirect.MasterParam.GetWeatherParam(iname);
            if (this.mWeatherParam == null)
            {
                return;
            }
            this.mRankCap = (OInt)Math.Max(rankcap, 1);
            this.mRank    = (OInt)Math.Min(rank, (int)this.mRankCap);
            this.mBuffEffectLists.Clear();
            using (List <string> .Enumerator enumerator = this.mWeatherParam.BuffIdLists.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    string     current    = enumerator.Current;
                    BuffEffect buffEffect = BuffEffect.CreateBuffEffect(instanceDirect.MasterParam.GetBuffEffectParam(current), rank, rankcap);
                    if (buffEffect != null)
                    {
                        this.mBuffEffectLists.Add(buffEffect);
                    }
                }
            }
            this.mCondEffectLists.Clear();
            using (List <string> .Enumerator enumerator = this.mWeatherParam.CondIdLists.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    string     current    = enumerator.Current;
                    CondEffect condEffect = CondEffect.CreateCondEffect(instanceDirect.MasterParam.GetCondEffectParam(current), rank, rankcap);
                    if (condEffect != null)
                    {
                        this.mCondEffectLists.Add(condEffect);
                    }
                }
            }
            this.mModifyUnit = modify_unit;
        }
Beispiel #2
0
        private void ShowTooltip(PointerEventData event_data)
        {
            if (!Object.op_Implicit((Object)this.PrefabTooltip) || Object.op_Implicit((Object)WeatherTooltip.mTooltip))
            {
                return;
            }
            RaycastResult pointerCurrentRaycast = event_data.get_pointerCurrentRaycast();

            // ISSUE: explicit reference operation
            if (Object.op_Equality((Object)((RaycastResult)@pointerCurrentRaycast).get_gameObject(), (Object)null))
            {
                return;
            }
            CanvasGroup[] parentCgs = this.ParentCgs;
            if (parentCgs != null)
            {
                foreach (CanvasGroup canvasGroup in parentCgs)
                {
                    if ((double)canvasGroup.get_alpha() <= 0.0)
                    {
                        return;
                    }
                }
            }
            if (Object.op_Equality((Object)WeatherTooltip.mTooltip, (Object)null))
            {
                WeatherTooltip.mTooltip = (Tooltip)Object.Instantiate <Tooltip>((M0)this.PrefabTooltip);
            }
            else
            {
                WeatherTooltip.mTooltip.ResetPosition();
            }
            WeatherParam dataOfClass = DataSource.FindDataOfClass <WeatherParam>(((Component)this).get_gameObject(), (WeatherParam)null);

            if (!Object.op_Inequality((Object)WeatherTooltip.mTooltip.TooltipText, (Object)null) || dataOfClass == null)
            {
                return;
            }
            WeatherTooltip.mTooltip.TooltipText.set_text(string.Format(LocalizedText.Get("quest.WEATHER_DESC"), (object)dataOfClass.Name, (object)dataOfClass.Expr));
            WeatherTooltip.mTooltip.EnableDisp = false;
            this.StartCoroutine(this.ResetPosiotion());
        }