Exemplo n.º 1
0
        public override void AddHideMark(COM_PLAYERCAMP targetCamp, HorizonConfig.HideMark hm, int count, bool bForbidFade = false)
        {
            if (hm == HorizonConfig.HideMark.Jungle || targetCamp == null)
            {
                return;
            }
            if (targetCamp == 3)
            {
                for (int i = 0; i < this._campMarkers.Length; i++)
                {
                    if (i != HorizonMarkerByFow.TranslateCampToIndex(this.actor.TheActorMeta.ActorCamp))
                    {
                        HorizonMarkerByFow.CampMarker campMarker = this._campMarkers[i];
                        campMarker.AddHideMark(hm, count);
                        Player hostPlayer = Singleton <GamePlayerCenter> .get_instance().GetHostPlayer();

                        if (hostPlayer != null && hostPlayer.PlayerCamp == HorizonMarkerByFow.TranslateIndexToCamp(i))
                        {
                            this.RefreshVisible();
                        }
                    }
                }
            }
            else
            {
                HorizonMarkerByFow.CampMarker campMarker2 = this._campMarkers[HorizonMarkerByFow.TranslateCampToIndex(targetCamp)];
                campMarker2.AddHideMark(hm, count);
                Player hostPlayer2 = Singleton <GamePlayerCenter> .get_instance().GetHostPlayer();

                if (hostPlayer2 != null && targetCamp == hostPlayer2.PlayerCamp)
                {
                    this.RefreshVisible();
                }
            }
        }
 public override int[] GetExposedCamps()
 {
     Array.Clear(this.m_exposeCampArr, 0, this.m_exposeCampArr.Length);
     if (this.actor.TheActorMeta.ActorCamp != COM_PLAYERCAMP.COM_PLAYERCAMP_MID)
     {
         this.m_exposeCampArr[HorizonMarkerByFow.TranslateCampToIndex(this.actor.TheActorMeta.ActorCamp)] = base.SightRange;
     }
     for (int i = 0; i < 2; i++)
     {
         if (this.m_exposeCampArr[i] == 0 && this.IsExposedFor(HorizonMarkerByFow.TranslateIndexToCamp(i)))
         {
             this.m_exposeCampArr[i] = this.ExposeRadiusCache;
         }
     }
     if (this.actor.TheActorMeta.ActorCamp != COM_PLAYERCAMP.COM_PLAYERCAMP_MID)
     {
         this.m_exposedPos[HorizonMarkerByFow.TranslateCampToIndex(this.actor.TheActorMeta.ActorCamp)] = new VInt3(this.actor.location.x, this.actor.location.z, 0);
     }
     return(this.m_exposeCampArr);
 }
        public override bool SetExposeMark(bool exposed, COM_PLAYERCAMP targetCamp, bool bIgnoreAlreadyLit)
        {
            if (targetCamp == this.actor.TheActorMeta.ActorCamp || targetCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_MID)
            {
                return(false);
            }
            if (targetCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_COUNT)
            {
                bool result = false;
                for (int i = 0; i < this.m_bExposed.Length; i++)
                {
                    if (!bIgnoreAlreadyLit || !exposed || !this.IsVisibleFor(HorizonMarkerByFow.TranslateIndexToCamp(i)))
                    {
                        this.m_bExposed[i] = exposed;
                        if (exposed && i != HorizonMarkerByFow.TranslateCampToIndex(this.actor.TheActorMeta.ActorCamp))
                        {
                            this.m_exposedPos[i] = new VInt3(this.actor.location.x, this.actor.location.z, 0);
                        }
                        result = true;
                    }
                }
                return(result);
            }
            if (bIgnoreAlreadyLit && exposed && this.IsVisibleFor(targetCamp))
            {
                return(false);
            }
            int num = HorizonMarkerByFow.TranslateCampToIndex(targetCamp);

            this.m_bExposed[num] = exposed;
            if (exposed)
            {
                this.m_exposedPos[num] = new VInt3(this.actor.location.x, this.actor.location.z, 0);
            }
            return(true);
        }