Quellcode durchsuchen

修改TriggerBattleFunction参数,支持在主播角色上投放各种BUFF效果

大爷 vor 1 Jahr
Ursprung
Commit
3a3de92e57

+ 7 - 3
Config/Proto/OuterMessage_C_10001.proto

@@ -275,9 +275,13 @@ message G2C_RemoveUnit // IActorLocationResponse
 message C2G_TriggrBattleFunction // IRequest
 {
 	int32 RpcId = 1;
-	int32 EffectID = 2;	// 效果id
-	int32 Value = 3;	// 属性数值
-	int32 Time = 4;	// 持续时间(秒)
+	int32 TriggerID = 2;// 效果id
+	int32 Value1 = 3;	// 属性数值
+	int32 Value2 = 4;	// 属性数值
+	int32 Value3 = 5;	// 属性数值
+	int32 Value4 = 6;	// 属性数值
+	int32 Value5 = 7;	// 属性数值
+	int32 Value6 = 8;	// 属性数值
 }
 
 message G2C_TriggrBattleFunction // IResponse

+ 1 - 9
DotNet/Hotfix/Scenes/Game/Handler/C2G_TriggrBattleFunctionHandler.cs

@@ -18,16 +18,8 @@ namespace ET.Server
                 reply();
                 return;
             }
-            // 参数判断
-            if (request.EffectID <= 0 || request.Value <= 0 || request.Time <= 0)
-            {
-                Log.Debug($"参数错误...EffectID={request.EffectID}, Value={request.Value}, Time={request.Time}");
-                response.Error = ErrorCode.ERR_ParameterError;
-                reply();
-                return;
-            }
 
-            player.GetXmdsManager().triggrBattleFunction(player.GetId().ToString().Trim(), request.EffectID, request.Value, request.Time, 0, 0, 0 ,0);
+            player.GetXmdsManager().triggrBattleFunction(player.GetId().ToString().Trim(), request.TriggerID, request.Value1, request.Value2, request.Value3, request.Value4, request.Value5, request.Value6);
 
             reply();
 

+ 12 - 0
Unity/Assets/Scripts/Codes/Hotfix/Client/battle/BattleMgr_Cmd.cs

@@ -59,6 +59,18 @@ namespace ET
                         }).Coroutine();
                     }
                     break;
+                case BattleFunc.Index.Func3:
+                    session.Call(new C2G_TriggrBattleFunction()
+                    {
+                        TriggerID = 10111,
+                        Value1 = 0,
+                        Value2 = 0,
+                        Value3 = 0,
+                        Value4 = 0,
+                        Value5 = 0,
+                        Value6 = 0,
+                    }).Coroutine();
+                    break;
                 default:
                     break;
             }

+ 15 - 3
Unity/Assets/Scripts/Codes/Model/Client/Generate/Message/OuterMessage_C_10001.cs

@@ -568,13 +568,25 @@ namespace ET
 		public int RpcId { get; set; }
 
 		[ProtoMember(2)]
-		public int EffectID { get; set; }
+		public int TriggerID { get; set; }
 
 		[ProtoMember(3)]
-		public int Value { get; set; }
+		public int Value1 { get; set; }
 
 		[ProtoMember(4)]
-		public int Time { get; set; }
+		public int Value2 { get; set; }
+
+		[ProtoMember(5)]
+		public int Value3 { get; set; }
+
+		[ProtoMember(6)]
+		public int Value4 { get; set; }
+
+		[ProtoMember(7)]
+		public int Value5 { get; set; }
+
+		[ProtoMember(8)]
+		public int Value6 { get; set; }
 
 	}