Beispiel #1
0
        private void StatHideMark(HorizonConfig.HideMark hm, int count)
        {
            if (hm == HorizonConfig.HideMark.Jungle)
            {
                int num = this._jungleHideMarkCount;
                this._jungleHideMarkCount += count;
                if ((num <= 0) && (this._jungleHideMarkCount > 0))
                {
                    base.actor.HudControl.ShowStatus(StatusHudType.InJungle);
                }
                else if ((num > 0) && (this._jungleHideMarkCount <= 0))
                {
                    base.actor.HudControl.HideStatus(StatusHudType.InJungle);
                }
            }
            int  num2 = 0;
            bool flag = false;

            for (int i = 0; i < this._campMarkers.Length; i++)
            {
                CampMarker marker = this._campMarkers[i];
                num2 += marker.HideMarkTotal;
                flag |= marker.Exposed;
            }
            bool flag2 = ((num2 > 0) && !flag) || (this._jungleHideMarkCount > 0);

            if (this._needTranslucent != flag2)
            {
                this._needTranslucent = flag2;
                base.actor.MatHurtEffect.SetTranslucent(this._needTranslucent);
            }
        }
Beispiel #2
0
        public void AddHideMark(COM_PLAYERCAMP targetCamp, HorizonConfig.HideMark hm, int count)
        {
            if (this._campMarkers != null)
            {
                if (targetCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_COUNT)
                {
                    for (int i = 0; i < this._campMarkers.Length; i++)
                    {
                        CampMarker marker      = this._campMarkers[i];
                        bool       ruleVisible = marker.RuleVisible;
                        marker.AddHideMark(hm, count);
                        if (count > 0)
                        {
                            marker.Exposed = false;
                        }
                        Player hostPlayer = Singleton <GamePlayerCenter> .instance.GetHostPlayer();

                        if (((hostPlayer != null) && (marker.RuleVisible != ruleVisible)) && (i == BattleLogic.MapOtherCampIndex(base.actor.TheActorMeta.ActorCamp, hostPlayer.PlayerCamp)))
                        {
                            this.RefreshVisible();
                        }
                        this.StatHideMark(hm, count);
                    }
                }
                else
                {
                    int index = BattleLogic.MapOtherCampIndex(base.actor.TheActorMeta.ActorCamp, targetCamp);
                    if ((index >= 0) && (index < this._campMarkers.Length))
                    {
                        CampMarker marker2 = this._campMarkers[index];
                        bool       flag2   = marker2.RuleVisible;
                        marker2.AddHideMark(hm, count);
                        if (count > 0)
                        {
                            marker2.Exposed = false;
                        }
                        Player player2 = Singleton <GamePlayerCenter> .instance.GetHostPlayer();

                        if (((player2 != null) && (marker2.RuleVisible != flag2)) && (targetCamp == player2.PlayerCamp))
                        {
                            this.RefreshVisible();
                        }
                        this.StatHideMark(hm, count);
                    }
                }
            }
        }