Browse Source

修复邀请超过三十人后奖励刷新问题

(cherry picked from commit afcbfe0be461ec801010be613e96e3c26329a9c3)
zhengtao 8 months ago
parent
commit
46657d6998

+ 9 - 9
game/config/data/achieveTaskConfig.json

@@ -1,11 +1,11 @@
 [
-		{"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","Order":2,"Icon":"https://mhaya-img.s3.ap-southeast-1.amazonaws.com/img/roll/xicon.png"},
-		{"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/mhayafree","Order":1,"Icon":"https://mhaya-img.s3.ap-southeast-1.amazonaws.com/img/roll/tgicon.png"},
-		{"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","Order":3,"Icon":"https://mhaya-img.s3.ap-southeast-1.amazonaws.com/img/roll/ytbicon1.png"},
-		{"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","Order":4,"Icon":"https://mhaya-img.s3.ap-southeast-1.amazonaws.com/img/roll/discord.png"},
-		{"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":"","Order":6,"Icon":"https://mhaya-img.s3.ap-southeast-1.amazonaws.com/img/roll/ytbicon.png"},
-		{"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":"","Order":7,"Icon":"https://mhaya-img.s3.ap-southeast-1.amazonaws.com/img/roll/ytbicon.png"},
-		{"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":"","Order":8,"Icon":"https://mhaya-img.s3.ap-southeast-1.amazonaws.com/img/roll/ytbicon.png"},
-		{"ID":8,"Enable":1,"Type":2,"Condition":{"min":21,"max":9999},"Reward":[{"itemBaseType":2,"itemID":6,"amount":25},{"itemBaseType":1,"itemID":7,"amount":5}],"Url":"","Order":9,"Icon":"https://mhaya-img.s3.ap-southeast-1.amazonaws.com/img/roll/ytbicon.png"},
-		{"ID":9,"Enable":1,"Type":3,"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/mhayafree","Order":5,"Icon":"https://mhaya-img.s3.ap-southeast-1.amazonaws.com/img/roll/xicon.png"}
+		{"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","Order":2},
+		{"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/mhayafree","Order":1},
+		{"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","Order":3},
+		{"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","Order":4},
+		{"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":"","Order":6},
+		{"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":"","Order":7},
+		{"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":"","Order":8},
+		{"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":"","Order":9},
+		{"ID":9,"Enable":1,"Type":3,"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/mhayafree","Order":5}
 ]

+ 1 - 2
game/game_cluster/internal/mdb/models/achieveTask.go

@@ -54,13 +54,12 @@ func (at AchieveTask) RefreshAchieveTask() {
 			at[d.ID] = &AchieveTaskBase{
 				ID:        d.ID,
 				Type:      d.Type,
-				Condition: d.Condition,
-				Reward:    d.Reward,
 				RewardNum: 0,
 				Num:       0,
 				Status:    0,
 			}
 		}
+		at[d.ID].Condition = d.Condition
 		at[d.ID].Order = d.Order
 		at[d.ID].Url = d.Url
 		at[d.ID].Icon = d.Icon