private void ShowAsAttacker(COM_PLAYERCAMP attackeeCamp, int inResetTime) { int num = HorizonMarkerByFow.TranslateCampToIndex(attackeeCamp); CTimerManager instance = Singleton <CTimerManager> .instance; if (this.IsDuringShowMark(attackeeCamp)) { if (inResetTime <= 0) { instance.ResetTimer(this.m_showmarkTimerSeq[num]); } else if (instance.GetLeftTime(this.m_showmarkTimerSeq[num]) < inResetTime) { instance.ResetTimerTotalTime(this.m_showmarkTimerSeq[num], inResetTime); } } else { if (num == 0) { this.m_showmarkTimerSeq[num] = instance.AddTimer(Horizon.QueryAttackShowMarkDuration(), 1, new CTimer.OnTimeUpHandler(this.OnShowMarkOverCampOne), true); } else { this.m_showmarkTimerSeq[num] = instance.AddTimer(Horizon.QueryAttackShowMarkDuration(), 1, new CTimer.OnTimeUpHandler(this.OnShowMarkOverCampTwo), true); } this.AddShowMark(attackeeCamp, HorizonConfig.ShowMark.Jungle, 1); } }
public override void ExposeAsAttacker(COM_PLAYERCAMP attackeeCamp, int inResetTime) { int num = HorizonMarkerByFow.TranslateCampToIndex(attackeeCamp); CTimerManager instance = Singleton <CTimerManager> .instance; if (this.SetExposeMark(true, attackeeCamp, this.actor.ActorControl.DoesIgnoreAlreadyLit())) { if (this.IsDuringExposing(attackeeCamp)) { if (inResetTime <= 0) { instance.ResetTimer(this.m_exposeTimerSeq[num]); } else if (instance.GetLeftTime(this.m_exposeTimerSeq[num]) < inResetTime) { instance.ResetTimerTotalTime(this.m_exposeTimerSeq[num], inResetTime); } } else if (num == 0) { this.m_exposeTimerSeq[num] = instance.AddTimer(this.actor.ActorControl.QueryExposeDuration(), 1, new CTimer.OnTimeUpHandler(this.OnExposeOverCampOne), true); } else { this.m_exposeTimerSeq[num] = instance.AddTimer(this.actor.ActorControl.QueryExposeDuration(), 1, new CTimer.OnTimeUpHandler(this.OnExposeOverCampTwo), true); } } }
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 bool IsVisibleFor(COM_PLAYERCAMP targetCamp) { if (targetCamp == this.actor.TheActorMeta.ActorCamp || targetCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_COUNT) { return(true); } if (targetCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_MID) { return(!this.HasHideMark(COM_PLAYERCAMP.COM_PLAYERCAMP_1, HorizonConfig.HideMark.Skill) && !this.HasHideMark(COM_PLAYERCAMP.COM_PLAYERCAMP_2, HorizonConfig.HideMark.Skill)); } return(this._campMarkers[HorizonMarkerByFow.TranslateCampToIndex(targetCamp)].Visible); }
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); }
public override void AddHideMark(COM_PLAYERCAMP targetCamp, HorizonConfig.HideMark hm, int count, bool bForbidFade = false) { if (hm == HorizonConfig.HideMark.Jungle || targetCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_MID) { return; } if (targetCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_COUNT) { 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); } } } else { HorizonMarkerByFow.CampMarker campMarker2 = this._campMarkers[HorizonMarkerByFow.TranslateCampToIndex(targetCamp)]; campMarker2.AddHideMark(hm, count); } this.RefreshVisible(); }
public override void SetHideMark(COM_PLAYERCAMP targetCamp, HorizonConfig.HideMark hm, bool bSet) { if (targetCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_MID) { return; } if (targetCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_COUNT) { for (int i = 0; i < this._campMarkers.Length; i++) { if (i != HorizonMarkerByFow.TranslateCampToIndex(this.actor.TheActorMeta.ActorCamp)) { HorizonMarkerByFow.CampMarker campMarker = this._campMarkers[i]; campMarker.SetHideMark(hm, bSet); } } } else { HorizonMarkerByFow.CampMarker campMarker2 = this._campMarkers[HorizonMarkerByFow.TranslateCampToIndex(targetCamp)]; campMarker2.SetHideMark(hm, bSet); } this.RefreshVisible(); }
public override bool HasHideMark(COM_PLAYERCAMP targetCamp, HorizonConfig.HideMark hm) { return(targetCamp != COM_PLAYERCAMP.COM_PLAYERCAMP_MID && this._campMarkers[HorizonMarkerByFow.TranslateCampToIndex(targetCamp)].HasHideMark(hm)); }
private bool IsExposedFor(COM_PLAYERCAMP targetCamp) { return(targetCamp != COM_PLAYERCAMP.COM_PLAYERCAMP_MID && this.m_bExposed[HorizonMarkerByFow.TranslateCampToIndex(targetCamp)]); }
private bool IsDuringShowMark(COM_PLAYERCAMP inAttackeeCamp) { int num = HorizonMarkerByFow.TranslateCampToIndex(inAttackeeCamp); return(this.m_showmarkTimerSeq[num] >= 0); }
private bool IsDuringExposing(COM_PLAYERCAMP inAttackeeCamp) { int num = HorizonMarkerByFow.TranslateCampToIndex(inAttackeeCamp); return(this.m_exposeTimerSeq[num] >= 0); }
public override bool HasShowMark(COM_PLAYERCAMP targetCamp, HorizonConfig.ShowMark sm) { return(targetCamp != null && this._campMarkers[HorizonMarkerByFow.TranslateCampToIndex(targetCamp)].HasShowMark(sm)); }