Beispiel #1
0
 public override void Destroy()
 {
     if (this.totalDamage > 0L)
     {
         MC2S_DoGuildBossDamage mC2S_DoGuildBossDamage = new MC2S_DoGuildBossDamage();
         mC2S_DoGuildBossDamage.ID = Globals.Instance.Player.GuildSystem.CurBossID;
         mC2S_DoGuildBossDamage.ResultKey = this.actorMgr.Key;
         mC2S_DoGuildBossDamage.Damage = this.totalDamage;
         mC2S_DoGuildBossDamage.Count = this.totalCount;
         mC2S_DoGuildBossDamage.RecvStartTime = this.actorMgr.RecvStartTime;
         mC2S_DoGuildBossDamage.SendResultTime = Globals.Instance.Player.GetTimeStamp();
         Globals.Instance.CliSession.SendPacket(938, mC2S_DoGuildBossDamage);
     }
     this.actorMgr.BuildCombatLog(this.isBossDead);
     MC2S_CombatLog mC2S_CombatLog = new MC2S_CombatLog();
     mC2S_CombatLog.Type = 1;
     mC2S_CombatLog.Log = this.actorMgr.GetCombatLog();
     Globals.Instance.CliSession.SendPacket(649, mC2S_CombatLog);
     this.actorMgr.ForceShowBossActor = false;
     Globals.Instance.CliSession.ShowReconnect(false);
     Globals.Instance.CliSession.Unregister(1502, new ClientSession.MsgHandler(this.HandleDisconnect));
     LocalPlayer expr_11D = Globals.Instance.Player;
     expr_11D.DataInitEvent = (LocalPlayer.DataInitCallback)Delegate.Remove(expr_11D.DataInitEvent, new LocalPlayer.DataInitCallback(this.OnDataInitEvent));
     GuildSubSystem expr_14D = Globals.Instance.Player.GuildSystem;
     expr_14D.DoDamageFailEvent = (GuildSubSystem.VoidCallback)Delegate.Remove(expr_14D.DoDamageFailEvent, new GuildSubSystem.VoidCallback(this.OnDoDamageFail));
     GuildSubSystem expr_17D = Globals.Instance.Player.GuildSystem;
     expr_17D.DoGuildBossDamageEvent = (GuildSubSystem.DoGuildBossDamageCallback)Delegate.Remove(expr_17D.DoGuildBossDamageEvent, new GuildSubSystem.DoGuildBossDamageCallback(this.OnGuildDoBossDamageEvent));
     GuildSubSystem expr_1AD = Globals.Instance.Player.GuildSystem;
     expr_1AD.GuildBossDeadEvent = (GuildSubSystem.GuildBossDeadCallback)Delegate.Remove(expr_1AD.GuildBossDeadEvent, new GuildSubSystem.GuildBossDeadCallback(this.OnGuildBossDeadEvent));
 }
Beispiel #2
0
 public override void Update(float elapse)
 {
     if (!this.hpFlag && this.bossActor != null && this.bossActor.MaxHP != 0L)
     {
         GuildBossData curGuildBossData = Globals.Instance.Player.GuildSystem.GetCurGuildBossData();
         if (curGuildBossData != null)
         {
             this.bossActor.ResetMaxHP(curGuildBossData.MaxHP);
             this.bossActor.CurHP = (long)((float)this.bossActor.MaxHP * curGuildBossData.HealthPct);
             this.bossActor.AiCtrler.Locked = true;
             this.hpFlag = true;
         }
     }
     switch (this.status)
     {
     case 2:
         if (this.isBossDead && Time.time >= this.timeStamp)
         {
             GameAnalytics.OnFinishScene(GameUIManager.mInstance.uiState.CurSceneInfo);
             Globals.Instance.SenceMgr.CloseScene();
             GameUIManager.mInstance.ChangeSession<GUIGuildSchoolVictoryScene>(null, false, false);
             this.status = 3;
             return;
         }
         if (this.combatTimer > 0f)
         {
             this.combatTimer -= elapse;
             if (this.combatTimer <= 0f)
             {
                 GameUIManager.mInstance.GameStateChange(GUIGameStateTip.EGAMEING_STATE.TimeUp, 0);
                 this.actorMgr.LockAllActorAI();
                 this.status = 3;
                 this.timeStamp = Time.time + 3f;
                 return;
             }
         }
         this.sendDamageTimer += elapse;
         if (this.sendDamageTimer >= 10f && Time.frameCount > this.sendDamageFrame)
         {
             if (this.totalDamage > 0L)
             {
                 MC2S_DoGuildBossDamage mC2S_DoGuildBossDamage = new MC2S_DoGuildBossDamage();
                 mC2S_DoGuildBossDamage.ID = Globals.Instance.Player.GuildSystem.CurBossID;
                 mC2S_DoGuildBossDamage.ResultKey = this.actorMgr.Key;
                 mC2S_DoGuildBossDamage.Damage = this.totalDamage;
                 mC2S_DoGuildBossDamage.Count = this.totalCount;
                 mC2S_DoGuildBossDamage.RecvStartTime = this.actorMgr.RecvStartTime;
                 mC2S_DoGuildBossDamage.SendResultTime = Globals.Instance.Player.GetTimeStamp();
                 if (Globals.Instance.CliSession.SendPacket(938, mC2S_DoGuildBossDamage))
                 {
                     this.sendDamageTimer = 0f;
                     this.sendDamageFrame = Time.frameCount + 150;
                     this.totalDamage = 0L;
                     this.totalCount = 0;
                 }
             }
             else
             {
                 this.sendDamageTimer = 0f;
                 this.sendDamageFrame = Time.frameCount + 150;
             }
         }
         break;
     case 3:
         if (this.timeStamp > 0f && Time.time >= this.timeStamp)
         {
             this.timeStamp = -1f;
             this.ChallengeFail(true);
         }
         break;
     case 4:
         if (this.timeStamp > 0f && Time.time >= this.timeStamp)
         {
             this.timeStamp = -1f;
             this.ChallengeFail(false);
         }
         break;
     }
 }