Преглед изворни кода

修改成就任务达成条件结构

kevin пре 9 месеци
родитељ
комит
c52785a896

BIN
mhaya-config/Excel/LogicConfig/lua_成就任务表.xlsx


+ 8 - 8
mhaya-config/Excel/TestServer/Data/achieveTaskConfig.json

@@ -1,10 +1,10 @@
 [
-		{"ID":1,"Enable":1,"Type":1,"Condition":1,"Reward":[{"itemBaseType":2,"itemID":6,"amount":10},{"itemBaseType":1,"itemID":5,"amount":10000},{"itemBaseType":1,"itemID":7,"amount":2}],"Url":"https://x.com/Mhaya_Official"},
-		{"ID":2,"Enable":1,"Type":1,"Condition":1,"Reward":[{"itemBaseType":2,"itemID":6,"amount":10},{"itemBaseType":1,"itemID":5,"amount":10000},{"itemBaseType":1,"itemID":7,"amount":2}],"Url":"https://t.me/mhaya_monopoly"},
-		{"ID":3,"Enable":1,"Type":1,"Condition":1,"Reward":[{"itemBaseType":2,"itemID":6,"amount":10},{"itemBaseType":1,"itemID":5,"amount":10000},{"itemBaseType":1,"itemID":7,"amount":2}],"Url":"https://www.youtube.com/@mhayaPlaytoearn"},
-		{"ID":4,"Enable":1,"Type":1,"Condition":1,"Reward":[{"itemBaseType":2,"itemID":6,"amount":10},{"itemBaseType":1,"itemID":5,"amount":10000},{"itemBaseType":1,"itemID":7,"amount":2}],"Url":"https://discord.com/invite/mhaya"},
-		{"ID":5,"Enable":1,"Type":2,"Condition":1,"Reward":[{"itemBaseType":2,"itemID":6,"amount":10},{"itemBaseType":1,"itemID":7,"amount":2}],"Url":""},
-		{"ID":6,"Enable":1,"Type":2,"Condition":6,"Reward":[{"itemBaseType":2,"itemID":6,"amount":15},{"itemBaseType":1,"itemID":7,"amount":3}],"Url":""},
-		{"ID":7,"Enable":1,"Type":2,"Condition":11,"Reward":[{"itemBaseType":2,"itemID":6,"amount":20},{"itemBaseType":1,"itemID":7,"amount":4}],"Url":""},
-		{"ID":8,"Enable":1,"Type":2,"Condition":21,"Reward":[{"itemBaseType":2,"itemID":6,"amount":25},{"itemBaseType":1,"itemID":7,"amount":5}],"Url":""}	
+		{"ID":1,"Enable":1,"Type":1,"Condition":{"min":1,"max":1},"Reward":[{"itemBaseType":2,"itemID":6,"amount":10},{"itemBaseType":1,"itemID":5,"amount":10000},{"itemBaseType":1,"itemID":7,"amount":2}],"Url":"https://x.com/Mhaya_Official"},
+		{"ID":2,"Enable":1,"Type":1,"Condition":{"min":1,"max":1},"Reward":[{"itemBaseType":2,"itemID":6,"amount":10},{"itemBaseType":1,"itemID":5,"amount":10000},{"itemBaseType":1,"itemID":7,"amount":2}],"Url":"https://t.me/mhaya_monopoly"},
+		{"ID":3,"Enable":1,"Type":1,"Condition":{"min":1,"max":1},"Reward":[{"itemBaseType":2,"itemID":6,"amount":10},{"itemBaseType":1,"itemID":5,"amount":10000},{"itemBaseType":1,"itemID":7,"amount":2}],"Url":"https://www.youtube.com/@mhayaPlaytoearn"},
+		{"ID":4,"Enable":1,"Type":1,"Condition":{"min":1,"max":1},"Reward":[{"itemBaseType":2,"itemID":6,"amount":10},{"itemBaseType":1,"itemID":5,"amount":10000},{"itemBaseType":1,"itemID":7,"amount":2}],"Url":"https://discord.com/invite/mhaya"},
+		{"ID":5,"Enable":1,"Type":2,"Condition":{"min":1,"max":5},"Reward":[{"itemBaseType":2,"itemID":6,"amount":10},{"itemBaseType":1,"itemID":7,"amount":2}],"Url":""},
+		{"ID":6,"Enable":1,"Type":2,"Condition":{"min":6,"max":10},"Reward":[{"itemBaseType":2,"itemID":6,"amount":15},{"itemBaseType":1,"itemID":7,"amount":3}],"Url":""},
+		{"ID":7,"Enable":1,"Type":2,"Condition":{"min":11,"max":20},"Reward":[{"itemBaseType":2,"itemID":6,"amount":20},{"itemBaseType":1,"itemID":7,"amount":4}],"Url":""},
+		{"ID":8,"Enable":1,"Type":2,"Condition":{"min":21,"max":30},"Reward":[{"itemBaseType":2,"itemID":6,"amount":25},{"itemBaseType":1,"itemID":7,"amount":5}],"Url":""}	
 ]

+ 1 - 1
mhaya-config/Excel/TestServer/Parser/achieveTaskConfig.go

@@ -16,7 +16,7 @@ type achieveTaskConfigRow struct {
 	ID        int          // #任务ID
 	Enable    int          // 是否开启(0否1是)
 	Type      int          // 任务类型(1基本类型2邀请好友相关)
-	Condition int          // 完成条件
+	Condition RangeInt32   // 完成条件
 	Reward    []ItemReward // 奖励
 	Url       string       // 链接
 }