Explorar el Código

MessageHelper有两个,重名了,把map上得MessageHelper改成MapMessageHelper

tanghai hace 2 años
padre
commit
ba56521efe

+ 1 - 1
Unity/Assets/Resources/GlobalConfig.asset

@@ -12,6 +12,6 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 36527db572638af47b03c805671cba75, type: 3}
   m_Script: {fileID: 11500000, guid: 36527db572638af47b03c805671cba75, type: 3}
   m_Name: GlobalConfig
   m_Name: GlobalConfig
   m_EditorClassIdentifier: 
   m_EditorClassIdentifier: 
-  CodeMode: 1
+  CodeMode: 3
   BuildType: 1
   BuildType: 1
   AppType: 8
   AppType: 8

+ 3 - 3
Unity/Assets/Scripts/Hotfix/Server/Demo/MessageHelper.cs → Unity/Assets/Scripts/Hotfix/Server/Demo/Map/MapMessageHelper.cs

@@ -5,20 +5,20 @@ using System.IO;
 
 
 namespace ET.Server
 namespace ET.Server
 {
 {
-    public static partial class MessageHelper
+    public static partial class MapMessageHelper
     {
     {
         public static void NoticeUnitAdd(Unit unit, Unit sendUnit)
         public static void NoticeUnitAdd(Unit unit, Unit sendUnit)
         {
         {
             M2C_CreateUnits createUnits = M2C_CreateUnits.Create();
             M2C_CreateUnits createUnits = M2C_CreateUnits.Create();
             createUnits.Units.Add(UnitHelper.CreateUnitInfo(sendUnit));
             createUnits.Units.Add(UnitHelper.CreateUnitInfo(sendUnit));
-            MessageHelper.SendToClient(unit, createUnits);
+            MapMessageHelper.SendToClient(unit, createUnits);
         }
         }
         
         
         public static void NoticeUnitRemove(Unit unit, Unit sendUnit)
         public static void NoticeUnitRemove(Unit unit, Unit sendUnit)
         {
         {
             M2C_RemoveUnits removeUnits = M2C_RemoveUnits.Create();
             M2C_RemoveUnits removeUnits = M2C_RemoveUnits.Create();
             removeUnits.Units.Add(sendUnit.Id);
             removeUnits.Units.Add(sendUnit.Id);
-            MessageHelper.SendToClient(unit, removeUnits);
+            MapMessageHelper.SendToClient(unit, removeUnits);
         }
         }
         
         
         public static void Broadcast(Unit unit, IMessage message)
         public static void Broadcast(Unit unit, IMessage message)

+ 2 - 2
Unity/Assets/Scripts/Hotfix/Server/Demo/Map/Move/MoveHelper.cs

@@ -26,7 +26,7 @@ namespace ET.Server
                 
                 
             // 广播寻路路径
             // 广播寻路路径
             m2CPathfindingResult.Id = unit.Id;
             m2CPathfindingResult.Id = unit.Id;
-            MessageHelper.Broadcast(unit, m2CPathfindingResult);
+            MapMessageHelper.Broadcast(unit, m2CPathfindingResult);
 
 
             MoveComponent moveComponent = unit.GetComponent<MoveComponent>();
             MoveComponent moveComponent = unit.GetComponent<MoveComponent>();
             
             
@@ -46,7 +46,7 @@ namespace ET.Server
         // error: 0表示协程走完正常停止
         // error: 0表示协程走完正常停止
         public static void SendStop(this Unit unit, int error)
         public static void SendStop(this Unit unit, int error)
         {
         {
-            MessageHelper.Broadcast(unit, new M2C_Stop()
+            MapMessageHelper.Broadcast(unit, new M2C_Stop()
             {
             {
                 Error = error,
                 Error = error,
                 Id = unit.Id, 
                 Id = unit.Id, 

+ 2 - 2
Unity/Assets/Scripts/Hotfix/Server/Demo/Map/Transfer/M2M_UnitTransferRequestHandler.cs

@@ -28,12 +28,12 @@ namespace ET.Server
 
 
             // 通知客户端开始切场景
             // 通知客户端开始切场景
             M2C_StartSceneChange m2CStartSceneChange = new() { SceneInstanceId = scene.InstanceId, SceneName = scene.Name };
             M2C_StartSceneChange m2CStartSceneChange = new() { SceneInstanceId = scene.InstanceId, SceneName = scene.Name };
-            MessageHelper.SendToClient(unit, m2CStartSceneChange);
+            MapMessageHelper.SendToClient(unit, m2CStartSceneChange);
 
 
             // 通知客户端创建My Unit
             // 通知客户端创建My Unit
             M2C_CreateMyUnit m2CCreateUnits = new();
             M2C_CreateMyUnit m2CCreateUnits = new();
             m2CCreateUnits.Unit = UnitHelper.CreateUnitInfo(unit);
             m2CCreateUnits.Unit = UnitHelper.CreateUnitInfo(unit);
-            MessageHelper.SendToClient(unit, m2CCreateUnits);
+            MapMessageHelper.SendToClient(unit, m2CCreateUnits);
 
 
             // 加入aoi
             // 加入aoi
             unit.AddComponent<AOIEntity, int, float3>(9 * 1000, unit.Position);
             unit.AddComponent<AOIEntity, int, float3>(9 * 1000, unit.Position);

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Server/Demo/Map/Unit/UnitEnterSightRange_NotifyClient.cs

@@ -21,7 +21,7 @@
 
 
             Unit ub = b.GetParent<Unit>();
             Unit ub = b.GetParent<Unit>();
 
 
-            MessageHelper.NoticeUnitAdd(ua, ub);
+            MapMessageHelper.NoticeUnitAdd(ua, ub);
             
             
             await ETTask.CompletedTask;
             await ETTask.CompletedTask;
         }
         }

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Server/Demo/Map/Unit/UnitLeaveSightRange_NotifyClient.cs

@@ -14,7 +14,7 @@
                 return;
                 return;
             }
             }
 
 
-            MessageHelper.NoticeUnitRemove(a.GetParent<Unit>(), b.GetParent<Unit>());
+            MapMessageHelper.NoticeUnitRemove(a.GetParent<Unit>(), b.GetParent<Unit>());
         }
         }
     }
     }
 }
 }

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Server/Module/ActorLocation/MessageLocationSenderComponentSystem.cs

@@ -198,7 +198,7 @@ namespace ET.Server
                 // 队列中没处理的消息返回跟上个消息一样的报错
                 // 队列中没处理的消息返回跟上个消息一样的报错
                 if (messageLocationSender.Error == ErrorCore.ERR_NotFoundActor)
                 if (messageLocationSender.Error == ErrorCore.ERR_NotFoundActor)
                 {
                 {
-                    return ET.MessageHelper.CreateResponse(iRequest, messageLocationSender.Error);
+                    return MessageHelper.CreateResponse(iRequest, messageLocationSender.Error);
                 }
                 }
                 
                 
                 try
                 try

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Kcp/Pool.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 10b61be855536d44abc52353ab94a453
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: