コード例 #1
0
ファイル: VideoLogic.cs プロジェクト: qiuhoude/mu_server
 public void TryTrackingOther(GameClient tClient, GameClient lostClient)
 {
     try
     {
         SceneUIClasses sceneType = Global.GetMapSceneType(lostClient.ClientData.MapCode);
         GuanZhanData   gzData    = new GuanZhanData();
         if (SceneUIClasses.BangHuiMatch == sceneType)
         {
             BangHuiMatchManager.getInstance().FillGuanZhanData(lostClient, gzData);
         }
         if (SceneUIClasses.EscapeBattle == sceneType)
         {
             EscapeBattleManager.getInstance().FillGuanZhanData(lostClient, gzData);
         }
         List <GuanZhanRoleMiniData> roleList = null;
         if (gzData.RoleMiniDataDict.TryGetValue(lostClient.ClientData.BattleWhichSide, out roleList))
         {
             foreach (GuanZhanRoleMiniData r in roleList)
             {
                 if (r.RoleID != lostClient.ClientData.RoleID)
                 {
                     GameClient beTrackingClient = GameManager.ClientMgr.FindClient(r.RoleID);
                     if (null != beTrackingClient)
                     {
                         this.Tracking(tClient, beTrackingClient);
                         return;
                     }
                 }
             }
         }
         gzData.RoleMiniDataDict.Remove(lostClient.ClientData.BattleWhichSide);
         foreach (List <GuanZhanRoleMiniData> rolelist in gzData.RoleMiniDataDict.Values)
         {
             foreach (GuanZhanRoleMiniData r in roleList)
             {
                 if (r.RoleID != lostClient.ClientData.RoleID)
                 {
                     GameClient beTrackingClient = GameManager.ClientMgr.FindClient(r.RoleID);
                     if (null != beTrackingClient)
                     {
                         this.Tracking(tClient, beTrackingClient);
                         return;
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         DataHelper.WriteFormatExceptionLog(ex, "", false, false);
     }
 }
コード例 #2
0
ファイル: VideoLogic.cs プロジェクト: qiuhoude/mu_server
 public bool ProcessGuanZhanRoleMiniDataCmd(GameClient client, int nID, byte[] bytes, string[] cmdParams)
 {
     try
     {
         int roleID = Convert.ToInt32(cmdParams[0]);
         if (KuaFuManager.getInstance().ClientCmdCheckFaild(nID, client, ref roleID))
         {
             return(true);
         }
         if (client.ClientData.HideGM == 0)
         {
             return(true);
         }
         int posX = 0;
         int posY = 0;
         if (!this.GetGuanZhanPos(client.ClientData.MapCode, ref posX, ref posY))
         {
             return(true);
         }
         SceneUIClasses sceneType = Global.GetMapSceneType(client.ClientData.MapCode);
         GuanZhanData   gzData    = new GuanZhanData();
         if (SceneUIClasses.BangHuiMatch == sceneType)
         {
             BangHuiMatchManager.getInstance().FillGuanZhanData(client, gzData);
         }
         if (SceneUIClasses.LangHunLingYu == sceneType)
         {
             LangHunLingYuManager.getInstance().FillGuanZhanData(client, gzData);
         }
         if (SceneUIClasses.EscapeBattle == sceneType)
         {
             EscapeBattleManager.getInstance().FillGuanZhanData(client, gzData);
         }
         client.sendCmd <GuanZhanData>(nID, gzData, false);
         return(true);
     }
     catch (Exception ex)
     {
         DataHelper.WriteFormatExceptionLog(ex, Global.GetDebugHelperInfo(client.ClientSocket), false, false);
     }
     return(false);
 }