Compare commits
4 Commits
8c9b279196
...
3ee3f677ce
Author | SHA1 | Date |
---|---|---|
|
3ee3f677ce | |
|
d63043d3fc | |
|
231cff3c4a | |
|
521b6e935e |
|
@ -722,6 +722,7 @@ const (
|
|||
TaskActivityTypePermit = 7 // 赛季通行证任务
|
||||
TaskActivityTypeNianEveryDay = 8 // 年兽每日任务
|
||||
TaskActivityTypeNian = 9 // 活动期间年兽任务
|
||||
TaskActivityTypeConsume = 10 // 累计消耗活动任务
|
||||
)
|
||||
|
||||
const HeadRange = 3 // 机器人头像id范围
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
"¡<>"¢<>d"¹ê
|
||||
"¡<>"¢<>d"¸ê
|
||||
"¢<EFBFBD>d"¸ê"¡<>
|
||||
"¸ê"¡<>"¢<>d
|
||||
"¡<>"¢<>d
|
||||
"¢<EFBFBD>c"¡<>
|
||||
"¡<EFBFBD>"¢<>c
|
||||
"¡<>"¢<>b
|
||||
"¡<>"¢<>a
|
||||
"¡<>"¢<>`
|
||||
|
@ -18,7 +18,7 @@
|
|||
"¡<>"¢<>Y
|
||||
"¡<>"¢<>X
|
||||
"¢<>W"¡<>
|
||||
"¢<EFBFBD>V"¡<>
|
||||
"¡<EFBFBD>"¢<>V
|
||||
"¡<>"¢<>U
|
||||
"¡<>"¢<>T
|
||||
"¡<>"¢<>S
|
||||
|
@ -28,52 +28,52 @@
|
|||
"¡<>"¢<>O
|
||||
"¡<>"¢<>N
|
||||
"¡<>"¢<>M
|
||||
"¡<EFBFBD>"¢<>L
|
||||
"¢<EFBFBD>L"¡<>
|
||||
"¡<>"¢<>K
|
||||
"¡<EFBFBD>"¢<>J
|
||||
"¡<EFBFBD>"¢<>I
|
||||
"¢<EFBFBD>H"¡<>
|
||||
"¢<EFBFBD>J"¡<>
|
||||
"¢<EFBFBD>I"¡<>
|
||||
"¡<EFBFBD>"¢<>H
|
||||
!!"¡<>"¢<>G
|
||||
"""¡<>"¢<>F
|
||||
##"¡<EFBFBD>"¢<>E
|
||||
##"¢<EFBFBD>E"¡<>
|
||||
$$"¡<>"¢<>D
|
||||
%%"¡<>"¢<>C
|
||||
&&"¡<>"¢<>B
|
||||
''"¡<>"¢<>A
|
||||
(("¡<>"¢<>@
|
||||
)"¡<>"¢<>d"¹ê
|
||||
*"¢<>d"¸ê"¡<>
|
||||
*"¡<EFBFBD>"¢<EFBFBD>d"¸ê
|
||||
+"¡<>"¢<>d"¸ê
|
||||
,"¢<EFBFBD>d"¡<>
|
||||
-"¢<EFBFBD>c"¡<>
|
||||
,"¡<EFBFBD>"¢<>d
|
||||
-"¡<EFBFBD>"¢<>c
|
||||
."¡<>"¢<>b
|
||||
/"¡<>"¢<>a
|
||||
0"¢<EFBFBD>`"¡<>
|
||||
0"¡<EFBFBD>"¢<>`
|
||||
1 "¡<>"¢<>_
|
||||
2
|
||||
"¡<>"¢<>^
|
||||
3"¡<>"¢<>]
|
||||
4"¡<>"¢<>\
|
||||
5
"¢<EFBFBD>["¡<>
|
||||
5
"¡<EFBFBD>"¢<>[
|
||||
6"¡<>"¢<>Z
|
||||
7"¡<>"¢<>Y
|
||||
8"¡<>"¢<>X
|
||||
9"¡<>"¢<>W
|
||||
:"¡<EFBFBD>"¢<>V
|
||||
:"¢<EFBFBD>V"¡<>
|
||||
;"¡<>"¢<>U
|
||||
<"¡<>"¢<>T
|
||||
="¡<>"¢<>S
|
||||
>"¡<>"¢<>R
|
||||
?"¢<EFBFBD>Q"¡<>
|
||||
?"¡<EFBFBD>"¢<>Q
|
||||
@"¡<>"¢<>P
|
||||
A"¡<EFBFBD>"¢<>O
|
||||
A"¢<EFBFBD>O"¡<>
|
||||
B"¡<>"¢<>N
|
||||
C"¡<>"¢<>M
|
||||
D"¢<EFBFBD>L"¡<>
|
||||
D"¡<EFBFBD>"¢<>L
|
||||
E"¡<>"¢<>K
|
||||
F"¡<>"¢<>J
|
||||
G"¡<>"¢<>I
|
||||
H "¢<EFBFBD>H"¡<>
|
||||
H "¡<EFBFBD>"¢<>H
|
||||
I!"¡<>"¢<>G
|
||||
J""¡<>"¢<>F
|
||||
K#"¡<>"¢<>E
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
(€β8–@΅θ;PdX–`c
|
||||
< ((€β2ΕΈ2συ8¬@Άθ;JΖΈJσυPdX¬`Η
|
||||
?<18>ΑΧ/ 2(€β2ΕΈ2συ8ξ@£θ;JΖΈJσυPdXξ`σ
|
||||
?<18>ΑΧ/ 2(€β2συ2ΕΈ8ξ@£θ;JΖΈJσυPdXξ`σ
|
Binary file not shown.
BIN
data/DB_Task.dat
BIN
data/DB_Task.dat
Binary file not shown.
|
@ -53,6 +53,6 @@ const (
|
|||
ETCDKEY_PigBankProp = "/game/pigbank_prop" //存钱罐属性
|
||||
ETCDKEY_NianConfig = "/game/activity_nian" //年兽活动配置
|
||||
ETCDKEY_NianRankConfig = "/game/activity_nian_rank" //年兽排行榜配置
|
||||
ETCDKEY_REDPACKET = "/game/act_redpacket" //红包配置
|
||||
|
||||
KeyRedPacket = "/game/act_redpacket" //红包配置
|
||||
KeyActConsume = "/game/act_consume" //累计消耗活动配置
|
||||
)
|
||||
|
|
|
@ -173,6 +173,8 @@ type AllConfig struct {
|
|||
*webapi.NianRankReward
|
||||
// 红包配置
|
||||
*webapi.RedPacketConfig
|
||||
// 累计消耗活动配置
|
||||
*webapi.ConsumeConfig
|
||||
}
|
||||
|
||||
type GlobalConfig struct {
|
||||
|
|
|
@ -227,7 +227,7 @@ type CSTaskList struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Tp int32 `protobuf:"varint,1,opt,name=Tp,proto3" json:"Tp,omitempty"` // 任务类型 1:日常任务 2:周活跃任务 3:新手任务 4:邀请任务 5:成就系统
|
||||
Tp int32 `protobuf:"varint,1,opt,name=Tp,proto3" json:"Tp,omitempty"` // 任务类型 1:日常任务 2:周活跃任务 3:新手任务 4:邀请任务 5:成就系统 6:赛季通行证任务 8:年兽每日任务 9:年兽活动任务 10:累计消耗任务
|
||||
}
|
||||
|
||||
func (x *CSTaskList) Reset() {
|
||||
|
@ -275,8 +275,11 @@ type SCTaskList struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Tp int32 `protobuf:"varint,1,opt,name=Tp,proto3" json:"Tp,omitempty"` // 任务类型 1:日常任务 2:周活跃任务 3:新手任务 4:邀请任务 5:成就系统
|
||||
Tp int32 `protobuf:"varint,1,opt,name=Tp,proto3" json:"Tp,omitempty"` // 任务类型
|
||||
List []*TaskData `protobuf:"bytes,2,rep,name=List,proto3" json:"List,omitempty"` // 任务列表
|
||||
StartTs int64 `protobuf:"varint,3,opt,name=StartTs,proto3" json:"StartTs,omitempty"` // 开始时间
|
||||
EndTs int64 `protobuf:"varint,4,opt,name=EndTs,proto3" json:"EndTs,omitempty"` // 结束时间
|
||||
On bool `protobuf:"varint,5,opt,name=On,proto3" json:"On,omitempty"` // 活动开关
|
||||
}
|
||||
|
||||
func (x *SCTaskList) Reset() {
|
||||
|
@ -325,6 +328,27 @@ func (x *SCTaskList) GetList() []*TaskData {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (x *SCTaskList) GetStartTs() int64 {
|
||||
if x != nil {
|
||||
return x.StartTs
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCTaskList) GetEndTs() int64 {
|
||||
if x != nil {
|
||||
return x.EndTs
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCTaskList) GetOn() bool {
|
||||
if x != nil {
|
||||
return x.On
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 领取任务奖励
|
||||
// PACKET_CSTaskReward
|
||||
type CSTaskReward struct {
|
||||
|
@ -332,7 +356,7 @@ type CSTaskReward struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Tp int32 `protobuf:"varint,1,opt,name=Tp,proto3" json:"Tp,omitempty"` // 任务类型 1:日常任务 2:周活跃任务 3:新手任务 4:邀请任务 5:成就系统 6:赛季通行证任务 8: 年兽每日任务 9:年兽活动任务
|
||||
Tp int32 `protobuf:"varint,1,opt,name=Tp,proto3" json:"Tp,omitempty"` // 任务类型
|
||||
Id int32 `protobuf:"varint,2,opt,name=Id,proto3" json:"Id,omitempty"` // 任务id; 0 表示一键领取
|
||||
}
|
||||
|
||||
|
@ -461,7 +485,7 @@ type SCTaskChange struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Tp int32 `protobuf:"varint,1,opt,name=Tp,proto3" json:"Tp,omitempty"` // 任务类型 1:日常任务 2:周活跃任务 3:新手任务 4:邀请任务 5:成就系统
|
||||
Tp int32 `protobuf:"varint,1,opt,name=Tp,proto3" json:"Tp,omitempty"` // 任务类型
|
||||
List []*TaskData `protobuf:"bytes,2,rep,name=List,proto3" json:"List,omitempty"` // 任务列表
|
||||
}
|
||||
|
||||
|
@ -516,7 +540,7 @@ type CSTaskDebugInc struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Tp int32 `protobuf:"varint,1,opt,name=Tp,proto3" json:"Tp,omitempty"` // 任务类型 1:日常任务 2:周活跃任务 3:新手任务 4:邀请任务 5:成就系统
|
||||
Tp int32 `protobuf:"varint,1,opt,name=Tp,proto3" json:"Tp,omitempty"` // 任务类型
|
||||
Id int32 `protobuf:"varint,2,opt,name=Id,proto3" json:"Id,omitempty"` // 任务id
|
||||
AddNum int32 `protobuf:"varint,3,opt,name=AddNum,proto3" json:"AddNum,omitempty"` // 直接增加次数
|
||||
}
|
||||
|
@ -642,59 +666,63 @@ var file_protocol_task_task_proto_rawDesc = []byte{
|
|||
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1c, 0x0a, 0x0a, 0x43, 0x53, 0x54, 0x61,
|
||||
0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x70, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x02, 0x54, 0x70, 0x22, 0x40, 0x0a, 0x0a, 0x53, 0x43, 0x54, 0x61, 0x73, 0x6b,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x02, 0x54, 0x70, 0x12, 0x22, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x61,
|
||||
0x74, 0x61, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x2e, 0x0a, 0x0c, 0x43, 0x53, 0x54, 0x61,
|
||||
0x73, 0x6b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x70, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x54, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x22, 0xcd, 0x01, 0x0a, 0x0c, 0x53, 0x43, 0x54,
|
||||
0x61, 0x73, 0x6b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x4f, 0x70, 0x43,
|
||||
0x28, 0x05, 0x52, 0x02, 0x54, 0x70, 0x22, 0x80, 0x01, 0x0a, 0x0a, 0x53, 0x43, 0x54, 0x61, 0x73,
|
||||
0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x02, 0x54, 0x70, 0x12, 0x22, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x44,
|
||||
0x61, 0x74, 0x61, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x74, 0x61,
|
||||
0x72, 0x74, 0x54, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x53, 0x74, 0x61, 0x72,
|
||||
0x74, 0x54, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x6e, 0x64, 0x54, 0x73, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x05, 0x45, 0x6e, 0x64, 0x54, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x6e, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x4f, 0x6e, 0x22, 0x2e, 0x0a, 0x0c, 0x43, 0x53, 0x54,
|
||||
0x61, 0x73, 0x6b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x70, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x54, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x22, 0xcd, 0x01, 0x0a, 0x0c, 0x53, 0x43,
|
||||
0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x4f, 0x70,
|
||||
0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x74, 0x61, 0x73,
|
||||
0x6b, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06,
|
||||
0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x70, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x02, 0x54, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x06, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64,
|
||||
0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x53, 0x43,
|
||||
0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72,
|
||||
0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x1a, 0x39,
|
||||
0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
|
||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x42, 0x0a, 0x0c, 0x53, 0x43, 0x54,
|
||||
0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x70, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x54, 0x70, 0x12, 0x22, 0x0a, 0x04, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x54,
|
||||
0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x48, 0x0a,
|
||||
0x0e, 0x43, 0x53, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x63, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x54, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x54, 0x70, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x41, 0x64, 0x64, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x06, 0x41, 0x64, 0x64, 0x4e, 0x75, 0x6d, 0x22, 0x3c, 0x0a, 0x0e, 0x53, 0x43, 0x54, 0x61, 0x73,
|
||||
0x6b, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x63, 0x12, 0x2a, 0x0a, 0x06, 0x4f, 0x70, 0x43,
|
||||
0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x74, 0x61, 0x73, 0x6b,
|
||||
0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x4f,
|
||||
0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x02, 0x54, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x06, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18,
|
||||
0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x53, 0x43, 0x54,
|
||||
0x61, 0x73, 0x6b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64,
|
||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x1a, 0x39, 0x0a,
|
||||
0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x42, 0x0a, 0x0c, 0x53, 0x43, 0x54, 0x61,
|
||||
0x73, 0x6b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x70, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x54, 0x70, 0x12, 0x22, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x54, 0x61,
|
||||
0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x0e,
|
||||
0x43, 0x53, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x63, 0x12, 0x0e,
|
||||
0x0a, 0x02, 0x54, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x54, 0x70, 0x12, 0x0e,
|
||||
0x0a, 0x02, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x41, 0x64, 0x64, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||
0x41, 0x64, 0x64, 0x4e, 0x75, 0x6d, 0x22, 0x3c, 0x0a, 0x0e, 0x53, 0x43, 0x54, 0x61, 0x73, 0x6b,
|
||||
0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x63, 0x12, 0x2a, 0x0a, 0x06, 0x4f, 0x70, 0x43, 0x6f,
|
||||
0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x2e,
|
||||
0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x4f, 0x70,
|
||||
0x43, 0x6f, 0x64, 0x65, 0x2a, 0x30, 0x0a, 0x0c, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
|
||||
0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x75, 0x63,
|
||||
0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45,
|
||||
0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x2a, 0xd2, 0x01, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x50,
|
||||
0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x54, 0x61, 0x73, 0x6b, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x16, 0x0a,
|
||||
0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x10, 0xe0, 0x12, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
||||
0x53, 0x43, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x10, 0xe1, 0x12, 0x12, 0x18, 0x0a,
|
||||
0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65,
|
||||
0x77, 0x61, 0x72, 0x64, 0x10, 0xe2, 0x12, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x53, 0x43, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe3,
|
||||
0x12, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x61,
|
||||
0x73, 0x6b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x10, 0xe4, 0x12, 0x12, 0x16, 0x0a, 0x11, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x63,
|
||||
0x10, 0xe5, 0x12, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43,
|
||||
0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x63, 0x10, 0xe6, 0x12, 0x42, 0x24, 0x5a, 0x22, 0x6d,
|
||||
0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67,
|
||||
0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x74, 0x61, 0x73,
|
||||
0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x70, 0x43, 0x6f, 0x64, 0x65, 0x2a, 0x30, 0x0a, 0x0c, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c,
|
||||
0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x75,
|
||||
0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x2a, 0xd2, 0x01, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b,
|
||||
0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x54, 0x61, 0x73, 0x6b, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x16,
|
||||
0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x54, 0x61, 0x73, 0x6b, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x10, 0xe0, 0x12, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
||||
0x5f, 0x53, 0x43, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x10, 0xe1, 0x12, 0x12, 0x18,
|
||||
0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x54, 0x61, 0x73, 0x6b, 0x52,
|
||||
0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe2, 0x12, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10,
|
||||
0xe3, 0x12, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54,
|
||||
0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x10, 0xe4, 0x12, 0x12, 0x16, 0x0a, 0x11,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e,
|
||||
0x63, 0x10, 0xe5, 0x12, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
|
||||
0x43, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x63, 0x10, 0xe6, 0x12, 0x42, 0x24, 0x5a, 0x22,
|
||||
0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x74, 0x61,
|
||||
0x73, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
|
@ -33,18 +33,21 @@ message TaskData{
|
|||
// 任务列表
|
||||
// PACKET_CSTaskList
|
||||
message CSTaskList{
|
||||
int32 Tp = 1; // 任务类型 1:日常任务 2:周活跃任务 3:新手任务 4:邀请任务 5:成就系统
|
||||
int32 Tp = 1; // 任务类型 1:日常任务 2:周活跃任务 3:新手任务 4:邀请任务 5:成就系统 6:赛季通行证任务 8:年兽每日任务 9:年兽活动任务 10:累计消耗任务
|
||||
}
|
||||
// PACKET_SCTaskList
|
||||
message SCTaskList{
|
||||
int32 Tp = 1; // 任务类型 1:日常任务 2:周活跃任务 3:新手任务 4:邀请任务 5:成就系统
|
||||
int32 Tp = 1; // 任务类型
|
||||
repeated TaskData List = 2; // 任务列表
|
||||
int64 StartTs = 3; // 开始时间
|
||||
int64 EndTs = 4; // 结束时间
|
||||
bool On = 5; // 活动开关
|
||||
}
|
||||
|
||||
// 领取任务奖励
|
||||
// PACKET_CSTaskReward
|
||||
message CSTaskReward{
|
||||
int32 Tp = 1; // 任务类型 1:日常任务 2:周活跃任务 3:新手任务 4:邀请任务 5:成就系统 6:赛季通行证任务 8: 年兽每日任务 9:年兽活动任务
|
||||
int32 Tp = 1; // 任务类型
|
||||
int32 Id = 2; // 任务id; 0 表示一键领取
|
||||
}
|
||||
// PACKET_SCTaskReward
|
||||
|
@ -58,12 +61,12 @@ message SCTaskReward{
|
|||
// 任务变更通知
|
||||
// PACKET_SCTaskChange
|
||||
message SCTaskChange{
|
||||
int32 Tp = 1; // 任务类型 1:日常任务 2:周活跃任务 3:新手任务 4:邀请任务 5:成就系统
|
||||
int32 Tp = 1; // 任务类型
|
||||
repeated TaskData List = 2; // 任务列表
|
||||
}
|
||||
|
||||
message CSTaskDebugInc{
|
||||
int32 Tp = 1; // 任务类型 1:日常任务 2:周活跃任务 3:新手任务 4:邀请任务 5:成就系统
|
||||
int32 Tp = 1; // 任务类型
|
||||
int32 Id = 2; // 任务id
|
||||
int32 AddNum = 3; // 直接增加次数
|
||||
}
|
||||
|
|
|
@ -10503,6 +10503,78 @@ func (x *RedInfo) GetRate() int64 {
|
|||
return 0
|
||||
}
|
||||
|
||||
// etcd /game/act_consume
|
||||
type ConsumeConfig struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台
|
||||
On int32 `protobuf:"varint,2,opt,name=On,proto3" json:"On,omitempty"` // 活动开关 1.开启 2.关闭
|
||||
StartTime string `protobuf:"bytes,3,opt,name=StartTime,proto3" json:"StartTime,omitempty"` // 活动开始时间
|
||||
EndTime string `protobuf:"bytes,4,opt,name=EndTime,proto3" json:"EndTime,omitempty"` // 活动结束时间
|
||||
}
|
||||
|
||||
func (x *ConsumeConfig) Reset() {
|
||||
*x = ConsumeConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protocol_webapi_common_proto_msgTypes[113]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ConsumeConfig) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ConsumeConfig) ProtoMessage() {}
|
||||
|
||||
func (x *ConsumeConfig) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_protocol_webapi_common_proto_msgTypes[113]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ConsumeConfig.ProtoReflect.Descriptor instead.
|
||||
func (*ConsumeConfig) Descriptor() ([]byte, []int) {
|
||||
return file_protocol_webapi_common_proto_rawDescGZIP(), []int{113}
|
||||
}
|
||||
|
||||
func (x *ConsumeConfig) GetPlatform() string {
|
||||
if x != nil {
|
||||
return x.Platform
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ConsumeConfig) GetOn() int32 {
|
||||
if x != nil {
|
||||
return x.On
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ConsumeConfig) GetStartTime() string {
|
||||
if x != nil {
|
||||
return x.StartTime
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ConsumeConfig) GetEndTime() string {
|
||||
if x != nil {
|
||||
return x.EndTime
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_protocol_webapi_common_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protocol_webapi_common_proto_rawDesc = []byte{
|
||||
|
@ -12112,10 +12184,17 @@ var file_protocol_webapi_common_proto_rawDesc = []byte{
|
|||
0x73, 0x74, 0x22, 0x2f, 0x0a, 0x07, 0x52, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x52, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x52,
|
||||
0x61, 0x74, 0x65, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d,
|
||||
0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
0x61, 0x74, 0x65, 0x22, 0x73, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x43, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4f, 0x6e,
|
||||
0x12, 0x1c, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x07, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67,
|
||||
0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65,
|
||||
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -12130,7 +12209,7 @@ func file_protocol_webapi_common_proto_rawDescGZIP() []byte {
|
|||
return file_protocol_webapi_common_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protocol_webapi_common_proto_msgTypes = make([]protoimpl.MessageInfo, 123)
|
||||
var file_protocol_webapi_common_proto_msgTypes = make([]protoimpl.MessageInfo, 124)
|
||||
var file_protocol_webapi_common_proto_goTypes = []interface{}{
|
||||
(*MysqlDbSetting)(nil), // 0: webapi.MysqlDbSetting
|
||||
(*MongoDbSetting)(nil), // 1: webapi.MongoDbSetting
|
||||
|
@ -12245,32 +12324,33 @@ var file_protocol_webapi_common_proto_goTypes = []interface{}{
|
|||
(*RedPacketConfig)(nil), // 110: webapi.RedPacketConfig
|
||||
(*RedPacketInfo)(nil), // 111: webapi.RedPacketInfo
|
||||
(*RedInfo)(nil), // 112: webapi.RedInfo
|
||||
nil, // 113: webapi.Platform.BindTelRewardEntry
|
||||
nil, // 114: webapi.PlayerData.RankScoreEntry
|
||||
nil, // 115: webapi.ItemShop.AwardEntry
|
||||
nil, // 116: webapi.VIPcfg.AwardEntry
|
||||
nil, // 117: webapi.VIPcfg.Privilege1Entry
|
||||
nil, // 118: webapi.VIPcfg.Privilege7Entry
|
||||
nil, // 119: webapi.VIPcfg.Privilege9Entry
|
||||
nil, // 120: webapi.ActInviteConfig.PayScoreEntry
|
||||
nil, // 121: webapi.SkinLevel.UpItemEntry
|
||||
nil, // 122: webapi.SkinItem.UnlockParamEntry
|
||||
(*server.DB_GameFree)(nil), // 123: server.DB_GameFree
|
||||
(*server.DB_GameItem)(nil), // 124: server.DB_GameItem
|
||||
(*ConsumeConfig)(nil), // 113: webapi.ConsumeConfig
|
||||
nil, // 114: webapi.Platform.BindTelRewardEntry
|
||||
nil, // 115: webapi.PlayerData.RankScoreEntry
|
||||
nil, // 116: webapi.ItemShop.AwardEntry
|
||||
nil, // 117: webapi.VIPcfg.AwardEntry
|
||||
nil, // 118: webapi.VIPcfg.Privilege1Entry
|
||||
nil, // 119: webapi.VIPcfg.Privilege7Entry
|
||||
nil, // 120: webapi.VIPcfg.Privilege9Entry
|
||||
nil, // 121: webapi.ActInviteConfig.PayScoreEntry
|
||||
nil, // 122: webapi.SkinLevel.UpItemEntry
|
||||
nil, // 123: webapi.SkinItem.UnlockParamEntry
|
||||
(*server.DB_GameFree)(nil), // 124: server.DB_GameFree
|
||||
(*server.DB_GameItem)(nil), // 125: server.DB_GameItem
|
||||
}
|
||||
var file_protocol_webapi_common_proto_depIdxs = []int32{
|
||||
2, // 0: webapi.Platform.Leaderboard:type_name -> webapi.RankSwitch
|
||||
3, // 1: webapi.Platform.ClubConfig:type_name -> webapi.ClubConfig
|
||||
4, // 2: webapi.Platform.ThirdGameMerchant:type_name -> webapi.ThirdGame
|
||||
113, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry
|
||||
114, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry
|
||||
6, // 4: webapi.GameConfigGlobal.GameStatus:type_name -> webapi.GameStatus
|
||||
123, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree
|
||||
124, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree
|
||||
8, // 6: webapi.PlatformGameConfig.DbGameFrees:type_name -> webapi.GameFree
|
||||
0, // 7: webapi.PlatformDbConfig.Mysql:type_name -> webapi.MysqlDbSetting
|
||||
1, // 8: webapi.PlatformDbConfig.MongoDb:type_name -> webapi.MongoDbSetting
|
||||
1, // 9: webapi.PlatformDbConfig.MongoDbLog:type_name -> webapi.MongoDbSetting
|
||||
123, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree
|
||||
114, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry
|
||||
124, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree
|
||||
115, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry
|
||||
32, // 12: webapi.PlayerData.Items:type_name -> webapi.ItemInfo
|
||||
14, // 13: webapi.PlayerData.RoleUnlockList:type_name -> webapi.ModInfo
|
||||
14, // 14: webapi.PlayerData.PetUnlockList:type_name -> webapi.ModInfo
|
||||
|
@ -12283,7 +12363,7 @@ var file_protocol_webapi_common_proto_depIdxs = []int32{
|
|||
32, // 21: webapi.ExchangeShop.Items:type_name -> webapi.ItemInfo
|
||||
25, // 22: webapi.ExchangeShopList.List:type_name -> webapi.ExchangeShop
|
||||
29, // 23: webapi.ExchangeShopList.Weight:type_name -> webapi.ShopWeight
|
||||
115, // 24: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry
|
||||
116, // 24: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry
|
||||
30, // 25: webapi.ItemShopList.List:type_name -> webapi.ItemShop
|
||||
32, // 26: webapi.MatchInfoAward.ItemId:type_name -> webapi.ItemInfo
|
||||
33, // 27: webapi.GameMatchDate.Award:type_name -> webapi.MatchInfoAward
|
||||
|
@ -12304,14 +12384,14 @@ var file_protocol_webapi_common_proto_depIdxs = []int32{
|
|||
38, // 42: webapi.WelfareSpree.Item:type_name -> webapi.WelfareDate
|
||||
48, // 43: webapi.WelfareFirstPayDataList.List:type_name -> webapi.WelfareSpree
|
||||
48, // 44: webapi.WelfareContinuousPayDataList.List:type_name -> webapi.WelfareSpree
|
||||
116, // 45: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry
|
||||
117, // 46: webapi.VIPcfg.Privilege1:type_name -> webapi.VIPcfg.Privilege1Entry
|
||||
118, // 47: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry
|
||||
119, // 48: webapi.VIPcfg.Privilege9:type_name -> webapi.VIPcfg.Privilege9Entry
|
||||
117, // 45: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry
|
||||
118, // 46: webapi.VIPcfg.Privilege1:type_name -> webapi.VIPcfg.Privilege1Entry
|
||||
119, // 47: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry
|
||||
120, // 48: webapi.VIPcfg.Privilege9:type_name -> webapi.VIPcfg.Privilege9Entry
|
||||
51, // 49: webapi.VIPcfgDataList.List:type_name -> webapi.VIPcfg
|
||||
38, // 50: webapi.ChessRankConfig.Item:type_name -> webapi.WelfareDate
|
||||
55, // 51: webapi.ChessRankcfgData.Datas:type_name -> webapi.ChessRankConfig
|
||||
120, // 52: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry
|
||||
121, // 52: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry
|
||||
62, // 53: webapi.ActInviteConfig.Awards1:type_name -> webapi.RankAward
|
||||
62, // 54: webapi.ActInviteConfig.Awards2:type_name -> webapi.RankAward
|
||||
62, // 55: webapi.ActInviteConfig.Awards3:type_name -> webapi.RankAward
|
||||
|
@ -12328,12 +12408,12 @@ var file_protocol_webapi_common_proto_depIdxs = []int32{
|
|||
69, // 66: webapi.DiamondLotteryData.Info:type_name -> webapi.DiamondLotteryInfo
|
||||
70, // 67: webapi.DiamondLotteryData.Players:type_name -> webapi.DiamondLotteryPlayers
|
||||
72, // 68: webapi.DiamondLotteryConfig.LotteryData:type_name -> webapi.DiamondLotteryData
|
||||
124, // 69: webapi.ItemConfig.Items:type_name -> server.DB_GameItem
|
||||
125, // 69: webapi.ItemConfig.Items:type_name -> server.DB_GameItem
|
||||
32, // 70: webapi.RankAwardInfo.Item:type_name -> webapi.ItemInfo
|
||||
75, // 71: webapi.RankTypeInfo.Award:type_name -> webapi.RankAwardInfo
|
||||
76, // 72: webapi.RankTypeConfig.Info:type_name -> webapi.RankTypeInfo
|
||||
121, // 73: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry
|
||||
122, // 74: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry
|
||||
122, // 73: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry
|
||||
123, // 74: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry
|
||||
78, // 75: webapi.SkinItem.Levels:type_name -> webapi.SkinLevel
|
||||
79, // 76: webapi.SkinConfig.Items:type_name -> webapi.SkinItem
|
||||
82, // 77: webapi.AwardLogConfig.AwardLog:type_name -> webapi.AwardLogData
|
||||
|
@ -13730,6 +13810,18 @@ func file_protocol_webapi_common_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_protocol_webapi_common_proto_msgTypes[113].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ConsumeConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
@ -13737,7 +13829,7 @@ func file_protocol_webapi_common_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protocol_webapi_common_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 123,
|
||||
NumMessages: 124,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
@ -1159,3 +1159,11 @@ message RedInfo{
|
|||
int64 Num = 1; // 数量
|
||||
int64 Rate = 2; // 概率,百分比
|
||||
}
|
||||
|
||||
// etcd /game/act_consume
|
||||
message ConsumeConfig{
|
||||
string Platform = 1; // 平台
|
||||
int32 On = 2; // 活动开关 1.开启 2.关闭
|
||||
string StartTime = 3; // 活动开始时间
|
||||
string EndTime = 4; // 活动结束时间
|
||||
}
|
|
@ -27,143 +27,6 @@ func init() {
|
|||
common.Register(int(taskproto.TaskPacketID_PACKET_CSDebugInc), taskproto.CSTaskDebugInc{}, CSTaskDebugInc)
|
||||
}
|
||||
|
||||
// GetTaskTimes 获取任务完成进度
|
||||
func GetTaskTimes(p *Player, id int32) int64 {
|
||||
if p.WelfData != nil && p.WelfData.Task[id] != nil {
|
||||
return p.WelfData.Task[id].N
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// IsTaskFinish 是否任务完成
|
||||
func IsTaskFinish(p *Player, id int32) bool {
|
||||
data := srvdata.PBDB_TaskMgr.GetData(id)
|
||||
if data == nil {
|
||||
return false
|
||||
}
|
||||
if p.WelfData != nil && p.WelfData.Task[id] != nil {
|
||||
return p.WelfData.Task[id].N >= data.GetTargetTimes()
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// IsTaskReward 是否任务奖励已领取
|
||||
func IsTaskReward(p *Player, id int32) bool {
|
||||
if p.WelfData != nil && p.WelfData.Task != nil {
|
||||
if data := p.WelfData.Task[id]; data != nil && data.Ts > 0 {
|
||||
t := srvdata.PBDB_TaskMgr.GetData(id)
|
||||
switch t.ActivityType {
|
||||
case common.TaskActivityTypeEveryDay, common.TaskActivityTypePermitEveryDay, common.TaskActivityTypeNianEveryDay:
|
||||
if common.TsInSameDay(time.Now().Unix(), data.Ts) {
|
||||
return true
|
||||
}
|
||||
|
||||
case common.TaskActivityTypeWeek:
|
||||
if common.TsInSameWeek(time.Now().Unix(), data.Ts) {
|
||||
return true
|
||||
}
|
||||
|
||||
case common.TaskActivityTypeNovice, common.TaskActivityTypeInvite, common.TaskActivityTypeAchieve:
|
||||
if data.Ts > 0 {
|
||||
return true
|
||||
}
|
||||
case common.TaskActivityTypePermit:
|
||||
startTs := PlatformMgrSingleton.GetConfig(p.Platform).PermitStartTs
|
||||
endTs := PlatformMgrSingleton.GetConfig(p.Platform).PermitEndTs
|
||||
if startTs > 0 {
|
||||
return data.Ts >= startTs && data.Ts < endTs
|
||||
}
|
||||
return true
|
||||
case common.TaskActivityTypeNian:
|
||||
pool := PlatformMgrSingleton.GetConfig(p.Platform).ActivityNianConfig
|
||||
if pool == nil || pool.List == nil {
|
||||
return false
|
||||
}
|
||||
if pool.Switch == model.WelfareClose {
|
||||
return false
|
||||
}
|
||||
startTime := pool.List[0].ActivityStart
|
||||
endTime := pool.List[0].ActivityEnd
|
||||
start, _ := time.Parse(time.DateTime, startTime)
|
||||
timestamp := start.Unix()
|
||||
end, _ := time.Parse(time.DateTime, endTime)
|
||||
endTimestamp := end.Unix()
|
||||
if timestamp > 0 {
|
||||
return data.Ts >= timestamp && data.Ts < endTimestamp
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func SendReward(p *Player, m map[int64]int64, tp int32) {
|
||||
isPermit := p.GetIsPermit()
|
||||
add := p.GetSkillAdd(common.SkillIdTask)
|
||||
var items []*model.Item
|
||||
for k, v := range m {
|
||||
if k == common.ItemIDPermit && isPermit {
|
||||
v += int64(float64(v) * common.PermitAdd)
|
||||
}
|
||||
// 皮肤技能每日任务金币加成
|
||||
if tp == common.TaskActivityTypeEveryDay && add > 0 && k == common.ItemIDCoin {
|
||||
v += int64((float64(v) * float64(add)) / 100.0)
|
||||
}
|
||||
items = append(items, &model.Item{
|
||||
ItemId: int32(k),
|
||||
ItemNum: v,
|
||||
})
|
||||
}
|
||||
gain := int32(0)
|
||||
giveType := int32(-1)
|
||||
switch tp {
|
||||
case 1:
|
||||
gain = common.GainWayItemTaskEveryDay
|
||||
giveType = model.SystemFreeGive_GiveType_TaskEveryDay
|
||||
case 2:
|
||||
gain = common.GainWayItemWeekActive
|
||||
giveType = model.SystemFreeGive_GiveType_TaskWeekActive
|
||||
case 3:
|
||||
gain = common.GainWayItemTaskNewPlayer
|
||||
giveType = model.SystemFreeGive_GiveType_TaskNewPlayer
|
||||
case 4:
|
||||
gain = common.GainWayItemTaskInvite
|
||||
giveType = model.SystemFreeGive_GiveType_TaskInvite
|
||||
case 5:
|
||||
gain = common.GainWayItemTaskAchievement
|
||||
giveType = model.SystemFreeGive_GiveType_TaskAchievement
|
||||
case 6:
|
||||
gain = common.GainWayItemTaskPermit
|
||||
giveType = model.SystemFreeGive_GiveType_TaskPermit
|
||||
}
|
||||
BagMgrSingleton.AddItems(&model.AddItemParam{
|
||||
Platform: p.Platform,
|
||||
SnId: p.SnId,
|
||||
Change: items,
|
||||
Add: 0,
|
||||
GainWay: gain,
|
||||
Operator: "system",
|
||||
Remark: "任务奖励",
|
||||
GameId: 0,
|
||||
GameFreeId: 0,
|
||||
})
|
||||
for _, v := range items {
|
||||
tp := int32(-1)
|
||||
if v.ItemId == common.ItemIDCoin {
|
||||
tp = model.SystemFreeGive_CoinType_Coin
|
||||
} else if v.ItemId == common.ItemIDDiamond {
|
||||
tp = model.SystemFreeGive_CoinType_Diamond
|
||||
}
|
||||
if !p.IsRob && tp >= 0 && giveType >= 0 {
|
||||
mq.Write(model.GenerateSystemFreeGive(p.SnId, p.Name, p.Platform, p.Channel, giveType, tp, v.ItemNum))
|
||||
}
|
||||
}
|
||||
if giveType == model.SystemFreeGive_GiveType_TaskPermit {
|
||||
mq.Write(model.GenerateActivityLog(p.SnId, p.Platform, model.ActivityLog_Permit, 1))
|
||||
}
|
||||
}
|
||||
|
||||
func CSTaskList(s *netlib.Session, packetId int, data interface{}, sid int64) error {
|
||||
logger.Logger.Tracef("CSTaskList %v", data)
|
||||
msg, ok := data.(*taskproto.CSTaskList)
|
||||
|
@ -179,6 +42,14 @@ func CSTaskList(s *netlib.Session, packetId int, data interface{}, sid int64) er
|
|||
ret := &taskproto.SCTaskList{
|
||||
Tp: msg.GetTp(),
|
||||
}
|
||||
if msg.GetTp() == common.TaskActivityTypeConsume {
|
||||
conf := WelfareMgrSington.GetConfig(p.Platform).ConsumeConfig
|
||||
if conf != nil {
|
||||
ret.StartTs = common.StrTimeToTs(conf.StartTime)
|
||||
ret.EndTs = common.StrTimeToTs(conf.EndTime)
|
||||
ret.On = conf.GetOn() == common.On
|
||||
}
|
||||
}
|
||||
|
||||
for _, v := range srvdata.TaskMgr.GetActivityType(msg.GetTp()) {
|
||||
item := &taskproto.TaskData{
|
||||
|
@ -245,7 +116,7 @@ func CSTaskReward(s *netlib.Session, packetId int, data interface{}, sid int64)
|
|||
}
|
||||
data := srvdata.PBDB_TaskMgr.GetData(id)
|
||||
if data != nil {
|
||||
SendReward(p, data.Award, msg.Tp)
|
||||
SendTaskReward(p, data.Award, msg.Tp)
|
||||
for k, vv := range data.GetAward() {
|
||||
if k == common.ItemIDPermit && isPermit {
|
||||
vv += int64(float64(vv) * common.PermitAdd)
|
||||
|
@ -271,6 +142,15 @@ func CSTaskReward(s *netlib.Session, packetId int, data interface{}, sid int64)
|
|||
}
|
||||
}
|
||||
|
||||
if msg.GetTp() == common.TaskActivityTypeConsume {
|
||||
conf := WelfareMgrSington.GetConfig(p.Platform).ConsumeConfig
|
||||
if conf == nil || conf.GetOn() != common.On || now.Unix() < common.StrTimeToTs(conf.StartTime) || now.Unix() >= common.StrTimeToTs(conf.EndTime) {
|
||||
p.SendToClient(int(taskproto.TaskPacketID_PACKET_SCTaskReward), ret)
|
||||
logger.Logger.Tracef("SCTaskReward %v", ret)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
if msg.Tp > 0 && msg.Id == 0 {
|
||||
// 一键领取
|
||||
for _, v := range srvdata.TaskMgr.GetActivityType(msg.GetTp()) {
|
||||
|
|
|
@ -114,7 +114,9 @@ func init() {
|
|||
etcd.Register(etcd.ETCDKEY_NianConfig, webapi.ActivityNianConfig{}, platformConfigEvent)
|
||||
etcd.Register(etcd.ETCDKEY_NianRankConfig, webapi.NianRankReward{}, platformConfigEvent)
|
||||
// 红包配置
|
||||
etcd.Register(etcd.ETCDKEY_REDPACKET, webapi.RedPacketConfig{}, platformConfigEvent)
|
||||
etcd.Register(etcd.KeyRedPacket, webapi.RedPacketConfig{}, platformConfigEvent)
|
||||
// 累计消耗活动配置
|
||||
etcd.Register(etcd.KeyActConsume, webapi.ConsumeConfig{}, platformConfigEvent)
|
||||
|
||||
WelfareMgrSington.UpdateRedPacket(&webapi.RedPacketConfig{
|
||||
Platform: "1",
|
||||
|
@ -517,6 +519,9 @@ func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, e
|
|||
PlatformMgrSingleton.GetConfig(config.Platform).NianRankReward = config
|
||||
case *webapi.RedPacketConfig:
|
||||
WelfareMgrSington.UpdateRedPacket(config, isInit)
|
||||
case *webapi.ConsumeConfig:
|
||||
WelfareMgrSington.UpdateConsumeConfig(config)
|
||||
|
||||
default:
|
||||
logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey)
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ type PlayerListener[Player, Scene any] interface {
|
|||
OnPlayerDropLine(p Player) // 玩家掉线时触发
|
||||
OnPlayerRehold(p Player) // 玩家重新连接时触发
|
||||
OnPlayerDayChanged(p Player, isLogin, isContinue bool) // 玩家跨天时触发
|
||||
OnPlayerWeekChanged(p Player, isLogin, isContinue bool) // 玩家跨周时触发
|
||||
// 业务相关
|
||||
OnPlayerEnterSceneBefore(p Player, s Scene) // 玩家进入场景前触发
|
||||
OnPlayerEnterSceneAfter(p Player, s Scene) // 玩家进入场景后触发
|
||||
|
@ -70,6 +71,14 @@ func FirePlayerDayChanged[Player, Scene any](p Player, isLogin, isContinue bool)
|
|||
}
|
||||
}
|
||||
|
||||
func FirePlayerWeekChanged[Player, Scene any](p Player, isLogin, isContinue bool) {
|
||||
for _, l := range _playerListeners {
|
||||
if l != nil {
|
||||
l.(PlayerListener[Player, Scene]).OnPlayerWeekChanged(p, isLogin, isContinue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func FirePlayerEnterSceneBefore[Player, Scene any](p Player, s Scene) {
|
||||
for _, l := range _playerListeners {
|
||||
if l != nil {
|
||||
|
@ -127,6 +136,7 @@ func (l *BasePlayerListener[Player, Scene]) OnPlayerLogouted(p Player)
|
|||
func (l *BasePlayerListener[Player, Scene]) OnPlayerDropLine(p Player) {}
|
||||
func (l *BasePlayerListener[Player, Scene]) OnPlayerRehold(p Player) {}
|
||||
func (l *BasePlayerListener[Player, Scene]) OnPlayerDayChanged(p Player, isLogin, isContinue bool) {}
|
||||
func (l *BasePlayerListener[Player, Scene]) OnPlayerWeekChanged(p Player, isLogin, isContinue bool) {}
|
||||
func (l *BasePlayerListener[Player, Scene]) OnPlayerEnterSceneBefore(p Player, s Scene) {}
|
||||
func (l *BasePlayerListener[Player, Scene]) OnPlayerEnterSceneAfter(p Player, s Scene) {}
|
||||
func (l *BasePlayerListener[Player, Scene]) OnPlayerLeaveSceneBefore(p Player, s Scene) {}
|
||||
|
@ -141,6 +151,7 @@ type PlayerListenerFunc[Player, Scene any] struct {
|
|||
OnPlayerDropLineFunc func(p Player)
|
||||
OnPlayerReholdFunc func(p Player)
|
||||
OnPlayerDayChangedFunc func(p Player, isLogin, isContinue bool)
|
||||
OnPlayerWeekChangedFunc func(p Player, isLogin, isContinue bool)
|
||||
OnPlayerEnterSceneBeforeFunc func(p Player, s Scene)
|
||||
OnPlayerEnterSceneAfterFunc func(p Player, s Scene)
|
||||
OnPlayerLeaveSceneBeforeFunc func(p Player, s Scene)
|
||||
|
@ -179,6 +190,12 @@ func (l *PlayerListenerFunc[Player, Scene]) OnPlayerDayChanged(p Player, isLogin
|
|||
}
|
||||
}
|
||||
|
||||
func (l *PlayerListenerFunc[Player, Scene]) OnPlayerWeekChanged(p Player, isLogin, isContinue bool) {
|
||||
if l.OnPlayerWeekChangedFunc != nil {
|
||||
l.OnPlayerWeekChangedFunc(p, isLogin, isContinue)
|
||||
}
|
||||
}
|
||||
|
||||
func (l *PlayerListenerFunc[Player, Scene]) OnPlayerEnterSceneBefore(p Player, s Scene) {
|
||||
if l.OnPlayerEnterSceneBeforeFunc != nil {
|
||||
l.OnPlayerEnterSceneBeforeFunc(p, s)
|
||||
|
|
|
@ -1666,20 +1666,6 @@ func (this *Player) OnDayTimer(login, continuous bool, t int) {
|
|||
this.VipMatchTimes = 0
|
||||
//VIP商城数据更新
|
||||
this.UpdateVipShopData()
|
||||
// 重置每日任务
|
||||
if this.WelfData != nil {
|
||||
if this.WelfData.Task != nil {
|
||||
for _, v := range srvdata.TaskMgr.GetActivityType(common.TaskActivityTypeEveryDay) {
|
||||
this.WelfData.Task[v.GetId()] = &model.TaskData{}
|
||||
}
|
||||
for _, v := range srvdata.TaskMgr.GetActivityType(common.TaskActivityTypePermitEveryDay) {
|
||||
this.WelfData.Task[v.GetId()] = &model.TaskData{}
|
||||
}
|
||||
for _, v := range srvdata.TaskMgr.GetActivityType(common.TaskActivityTypeNianEveryDay) {
|
||||
this.WelfData.Task[v.GetId()] = &model.TaskData{}
|
||||
}
|
||||
}
|
||||
}
|
||||
//周卡数据更新
|
||||
this.WeekCardAward = make(map[int32]bool)
|
||||
//周卡领取奖励
|
||||
|
@ -1793,13 +1779,15 @@ func (this *Player) OnMonthTimer() {
|
|||
}
|
||||
|
||||
func (this *Player) OnWeekTimer() {
|
||||
logger.Logger.Tracef("OnWeekTimer %v", time.Now())
|
||||
//判断是否一天即可过滤0点多次切换
|
||||
if common.InSameDayNoZero(time.Now().Local(), this.lastOnWeekChange) {
|
||||
return
|
||||
}
|
||||
this.lastOnWeekChange = time.Now().Local()
|
||||
|
||||
logger.Logger.Tracef("OnWeekTimer %v", time.Now())
|
||||
internal.FirePlayerWeekChanged[*Player, *Scene](this, false, false)
|
||||
|
||||
//清理比赛券
|
||||
ticket := this.Ticket
|
||||
if ticket > 0 {
|
||||
|
@ -1824,14 +1812,6 @@ func (this *Player) OnWeekTimer() {
|
|||
}
|
||||
}
|
||||
|
||||
// 重置周任务
|
||||
if this.WelfData != nil {
|
||||
if this.WelfData.Task != nil {
|
||||
for _, v := range srvdata.TaskMgr.GetActivityType(common.TaskActivityTypeWeek) {
|
||||
this.WelfData.Task[v.GetId()] = &model.TaskData{}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 重置周任务
|
||||
// 重置邀请积分
|
||||
CheckNewWeek(this.Platform, this.SnId)
|
||||
|
|
|
@ -3,13 +3,16 @@ package main
|
|||
import (
|
||||
"container/list"
|
||||
"math"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"time"
|
||||
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/mq"
|
||||
taskproto "mongo.games.com/game/protocol/task"
|
||||
"mongo.games.com/game/srvdata"
|
||||
"mongo.games.com/game/worldsrv/internal"
|
||||
)
|
||||
|
||||
/*
|
||||
|
@ -160,6 +163,7 @@ func (t *TaskHandle) AllTask(id int, data any) {
|
|||
|
||||
logger.Logger.Tracef("AllTask taskID:%v %v", id, p.WelfData.Task[int32(id)])
|
||||
|
||||
now := time.Now()
|
||||
change := map[int32][]*taskproto.TaskData{}
|
||||
for _, v := range srvdata.TaskMgr.GetTaskType(int32(id)) {
|
||||
if !info.Debug {
|
||||
|
@ -192,7 +196,9 @@ func (t *TaskHandle) AllTask(id int, data any) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if v.ActivityType == common.TaskActivityTypeNianEveryDay || v.ActivityType == common.TaskActivityTypeNian {
|
||||
|
||||
switch v.GetActivityType() {
|
||||
case common.TaskActivityTypeNianEveryDay, common.TaskActivityTypeNian:
|
||||
//判断是否在开启时间段内
|
||||
pool := PlatformMgrSingleton.GetConfig(p.Platform).ActivityNianConfig
|
||||
if pool == nil || pool.List == nil {
|
||||
|
@ -207,7 +213,13 @@ func (t *TaskHandle) AllTask(id int, data any) {
|
|||
timestamp := start.Unix()
|
||||
end, _ := time.Parse(time.DateTime, endTime)
|
||||
endTimestamp := end.Unix()
|
||||
if time.Now().Unix() < timestamp || time.Now().Unix() > endTimestamp {
|
||||
if now.Unix() < timestamp || now.Unix() > endTimestamp {
|
||||
continue
|
||||
}
|
||||
|
||||
case common.TaskActivityTypeConsume:
|
||||
cfg := WelfareMgrSington.GetConfig(p.Platform).ConsumeConfig
|
||||
if cfg == nil || cfg.GetOn() != common.On || now.Unix() < common.StrTimeToTs(cfg.StartTime) || now.Unix() >= common.StrTimeToTs(cfg.EndTime) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
@ -280,6 +292,144 @@ func OnNotifyChange(p *Player, activityType int32) {
|
|||
logger.Logger.Tracef("SCTaskChange %v", pack)
|
||||
}
|
||||
|
||||
// GetTaskTimes 获取任务完成进度
|
||||
func GetTaskTimes(p *Player, id int32) int64 {
|
||||
if p.WelfData != nil && p.WelfData.Task[id] != nil {
|
||||
return p.WelfData.Task[id].N
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// IsTaskFinish 是否任务完成
|
||||
func IsTaskFinish(p *Player, id int32) bool {
|
||||
data := srvdata.PBDB_TaskMgr.GetData(id)
|
||||
if data == nil {
|
||||
return false
|
||||
}
|
||||
if p.WelfData != nil && p.WelfData.Task[id] != nil {
|
||||
return p.WelfData.Task[id].N >= data.GetTargetTimes()
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// IsTaskReward 是否任务奖励已领取
|
||||
func IsTaskReward(p *Player, id int32) bool {
|
||||
if p.WelfData != nil && p.WelfData.Task != nil {
|
||||
if data := p.WelfData.Task[id]; data != nil && data.Ts > 0 {
|
||||
t := srvdata.PBDB_TaskMgr.GetData(id)
|
||||
switch t.ActivityType {
|
||||
case common.TaskActivityTypeEveryDay, common.TaskActivityTypePermitEveryDay, common.TaskActivityTypeNianEveryDay, common.TaskActivityTypeConsume:
|
||||
if common.TsInSameDay(time.Now().Unix(), data.Ts) {
|
||||
return true
|
||||
}
|
||||
|
||||
case common.TaskActivityTypeWeek:
|
||||
if common.TsInSameWeek(time.Now().Unix(), data.Ts) {
|
||||
return true
|
||||
}
|
||||
|
||||
case common.TaskActivityTypeNovice, common.TaskActivityTypeInvite, common.TaskActivityTypeAchieve:
|
||||
if data.Ts > 0 {
|
||||
return true
|
||||
}
|
||||
case common.TaskActivityTypePermit:
|
||||
startTs := PlatformMgrSingleton.GetConfig(p.Platform).PermitStartTs
|
||||
endTs := PlatformMgrSingleton.GetConfig(p.Platform).PermitEndTs
|
||||
if startTs > 0 {
|
||||
return data.Ts >= startTs && data.Ts < endTs
|
||||
}
|
||||
return true
|
||||
case common.TaskActivityTypeNian:
|
||||
pool := PlatformMgrSingleton.GetConfig(p.Platform).ActivityNianConfig
|
||||
if pool == nil || pool.List == nil {
|
||||
return false
|
||||
}
|
||||
if pool.Switch == model.WelfareClose {
|
||||
return false
|
||||
}
|
||||
startTime := pool.List[0].ActivityStart
|
||||
endTime := pool.List[0].ActivityEnd
|
||||
start, _ := time.Parse(time.DateTime, startTime)
|
||||
timestamp := start.Unix()
|
||||
end, _ := time.Parse(time.DateTime, endTime)
|
||||
endTimestamp := end.Unix()
|
||||
if timestamp > 0 {
|
||||
return data.Ts >= timestamp && data.Ts < endTimestamp
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// SendTaskReward 发送任务奖励
|
||||
func SendTaskReward(p *Player, m map[int64]int64, tp int32) {
|
||||
isPermit := p.GetIsPermit()
|
||||
add := p.GetSkillAdd(common.SkillIdTask)
|
||||
var items []*model.Item
|
||||
for k, v := range m {
|
||||
if k == common.ItemIDPermit && isPermit {
|
||||
v += int64(float64(v) * common.PermitAdd)
|
||||
}
|
||||
// 皮肤技能每日任务金币加成
|
||||
if tp == common.TaskActivityTypeEveryDay && add > 0 && k == common.ItemIDCoin {
|
||||
v += int64((float64(v) * float64(add)) / 100.0)
|
||||
}
|
||||
items = append(items, &model.Item{
|
||||
ItemId: int32(k),
|
||||
ItemNum: v,
|
||||
})
|
||||
}
|
||||
gain := int32(0)
|
||||
giveType := int32(-1)
|
||||
switch tp {
|
||||
case 1:
|
||||
gain = common.GainWayItemTaskEveryDay
|
||||
giveType = model.SystemFreeGive_GiveType_TaskEveryDay
|
||||
case 2:
|
||||
gain = common.GainWayItemWeekActive
|
||||
giveType = model.SystemFreeGive_GiveType_TaskWeekActive
|
||||
case 3:
|
||||
gain = common.GainWayItemTaskNewPlayer
|
||||
giveType = model.SystemFreeGive_GiveType_TaskNewPlayer
|
||||
case 4:
|
||||
gain = common.GainWayItemTaskInvite
|
||||
giveType = model.SystemFreeGive_GiveType_TaskInvite
|
||||
case 5:
|
||||
gain = common.GainWayItemTaskAchievement
|
||||
giveType = model.SystemFreeGive_GiveType_TaskAchievement
|
||||
case 6:
|
||||
gain = common.GainWayItemTaskPermit
|
||||
giveType = model.SystemFreeGive_GiveType_TaskPermit
|
||||
}
|
||||
BagMgrSingleton.AddItems(&model.AddItemParam{
|
||||
Platform: p.Platform,
|
||||
SnId: p.SnId,
|
||||
Change: items,
|
||||
Add: 0,
|
||||
GainWay: gain,
|
||||
Operator: "system",
|
||||
Remark: "任务奖励",
|
||||
GameId: 0,
|
||||
GameFreeId: 0,
|
||||
})
|
||||
for _, v := range items {
|
||||
tp := int32(-1)
|
||||
if v.ItemId == common.ItemIDCoin {
|
||||
tp = model.SystemFreeGive_CoinType_Coin
|
||||
} else if v.ItemId == common.ItemIDDiamond {
|
||||
tp = model.SystemFreeGive_CoinType_Diamond
|
||||
}
|
||||
if !p.IsRob && tp >= 0 && giveType >= 0 {
|
||||
mq.Write(model.GenerateSystemFreeGive(p.SnId, p.Name, p.Platform, p.Channel, giveType, tp, v.ItemNum))
|
||||
}
|
||||
}
|
||||
if giveType == model.SystemFreeGive_GiveType_TaskPermit {
|
||||
mq.Write(model.GenerateActivityLog(p.SnId, p.Platform, model.ActivityLog_Permit, 1))
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
taskHandle := new(TaskHandle)
|
||||
TaskSubjectSingleton.Attach(common.TaskTypeAdv, taskHandle)
|
||||
|
@ -316,4 +466,32 @@ func init() {
|
|||
TaskSubjectSingleton.Attach(common.TaskTypeNianBossKill, taskHandle)
|
||||
TaskSubjectSingleton.Attach(common.TaskTypeNianBossDamage, taskHandle)
|
||||
TaskSubjectSingleton.Attach(common.TaskTypeNianSign, taskHandle)
|
||||
|
||||
internal.RegisterPlayerListenerFunc(&internal.PlayerListenerFunc[*Player, *Scene]{
|
||||
OnPlayerDayChangedFunc: func(p *Player, isLogin, isContinue bool) {
|
||||
if p.WelfData != nil && p.WelfData.Task != nil {
|
||||
for _, v := range []int32{
|
||||
// todo 每日重置的任务列表
|
||||
common.TaskActivityTypeEveryDay,
|
||||
common.TaskActivityTypePermitEveryDay,
|
||||
common.TaskActivityTypeNianEveryDay,
|
||||
common.TaskActivityTypeConsume} {
|
||||
for _, vv := range srvdata.TaskMgr.GetActivityType(v) {
|
||||
p.WelfData.Task[vv.GetId()] = &model.TaskData{}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
OnPlayerWeekChangedFunc: func(p *Player, isLogin, isContinue bool) {
|
||||
if p.WelfData != nil && p.WelfData.Task != nil {
|
||||
for _, v := range []int32{
|
||||
// todo 每周重置的任务列表
|
||||
common.TaskActivityTypeWeek} {
|
||||
for _, vv := range srvdata.TaskMgr.GetActivityType(v) {
|
||||
p.WelfData.Task[vv.GetId()] = &model.TaskData{}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
|
@ -2292,7 +2292,7 @@ func (this *WelfareMgr) SendRedPacketInfo(p *Player) *welfare.SCRedPacketInfo {
|
|||
}
|
||||
if p.WelfData != nil && p.WelfData.RedPacket != nil {
|
||||
if p.WelfData.RedPacket[v.GetId()] != nil {
|
||||
info.IsJoin = p.WelfData.RedPacket[v.GetId()].JN > 0
|
||||
info.IsJoin = p.WelfData.RedPacket[v.GetId()].JN > 0 || p.WelfData.RedPacket[v.GetId()].N > 0
|
||||
}
|
||||
}
|
||||
_, info.RemainCount = RedPacketMgrInst.GetRemainTimesByConfig(p, v)
|
||||
|
@ -2333,7 +2333,7 @@ func (this *WelfareMgr) GetRedPacket(p *Player, id int64) *welfare.SCRedPacketDr
|
|||
// 记录参与次数
|
||||
if id == 0 {
|
||||
for _, v := range this.GetConfig(p.Platform).RedPacketConfig.GetList() {
|
||||
if now >= common.IntToTime(int(v.GetStartHMS())).Unix() || now < common.IntToTime(int(v.GetEndHMS())).Unix() {
|
||||
if v.GetOn() == common.On && now >= common.IntToTime(int(v.GetStartHMS())).Unix() || now < common.IntToTime(int(v.GetEndHMS())).Unix() {
|
||||
if p.WelfData.RedPacket[v.GetId()] == nil {
|
||||
p.WelfData.RedPacket[v.GetId()] = &model.RedPacketData{}
|
||||
}
|
||||
|
@ -2442,6 +2442,10 @@ func (this *WelfareMgr) GetRedPacket(p *Player, id int64) *welfare.SCRedPacketDr
|
|||
return pack
|
||||
}
|
||||
|
||||
func (this *WelfareMgr) UpdateConsumeConfig(conf *webapi_proto.ConsumeConfig) {
|
||||
this.GetConfig(conf.Platform).ConsumeConfig = conf
|
||||
}
|
||||
|
||||
func (this *WelfareMgr) Update() {
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue