葡萄牙语邮件
This commit is contained in:
parent
673a2d9b21
commit
881770275b
@ -21,6 +21,8 @@ func GetLanguage(lang msg.LANG_TYPE, key string) string {
|
||||
switch lang {
|
||||
case msg.LANG_TYPE_LANG_EN:
|
||||
return gamedata.GetStringValue(data, "English")
|
||||
case msg.LANG_TYPE_LANG_PTBR:
|
||||
return gamedata.GetStringValue(data, "pt_BR")
|
||||
default:
|
||||
return key
|
||||
}
|
||||
|
||||
@ -26,17 +26,22 @@ const (
|
||||
)
|
||||
|
||||
type MailInfo struct {
|
||||
Title string // 邮件标题
|
||||
SubTitle string // 邮件副标题
|
||||
Content string // 邮件内容
|
||||
TitleEn string // 邮件标题英文
|
||||
SubTitleEn string // 邮件副标题英文
|
||||
ContentEn string // 邮件内容英文
|
||||
Items []*item.Item // 邮件道具
|
||||
Type int //邮件类型
|
||||
Send int64 // 发送时间
|
||||
Del int64 // 删除时间
|
||||
Status int
|
||||
Title string // 邮件标题
|
||||
SubTitle string // 邮件副标题
|
||||
Content string // 邮件内容
|
||||
TitleEn string // 邮件标题英文
|
||||
SubTitleEn string // 邮件副标题英文
|
||||
ContentEn string // 邮件内容英文
|
||||
// 葡萄牙语 巴西
|
||||
TitlePtBr string
|
||||
SubTitlePtBr string
|
||||
ContentPtBr string
|
||||
|
||||
Items []*item.Item // 邮件道具
|
||||
Type int //邮件类型
|
||||
Send int64 // 发送时间
|
||||
Del int64 // 删除时间
|
||||
Status int
|
||||
}
|
||||
|
||||
func (m *MailMod) InitData() {
|
||||
@ -46,14 +51,20 @@ func (m *MailMod) InitData() {
|
||||
}
|
||||
|
||||
type MailStruct struct {
|
||||
Title string
|
||||
SubTitle string
|
||||
Content string
|
||||
Title string
|
||||
SubTitle string
|
||||
Content string
|
||||
// 英文
|
||||
TitleEn string
|
||||
SubTitleEn string
|
||||
ContentEn string
|
||||
Items []*item.Item
|
||||
Type int
|
||||
// 葡萄牙语 巴西
|
||||
TitlePtBr string
|
||||
SubTitlePtBr string
|
||||
ContentPtBr string
|
||||
|
||||
Items []*item.Item
|
||||
Type int
|
||||
}
|
||||
|
||||
func (m *MailMod) SendMail(mail *MailStruct) int {
|
||||
@ -141,17 +152,20 @@ func (m *MailMod) BackData() *msg.ResMailList {
|
||||
continue
|
||||
}
|
||||
res.MailList[int32(k)] = &msg.MailInfo{
|
||||
Id: int32(k),
|
||||
Title: v.Title,
|
||||
SubTitle: v.SubTitle,
|
||||
Content: v.Content,
|
||||
TitleEn: v.TitleEn,
|
||||
SubTitleEn: v.SubTitleEn,
|
||||
ContentEn: v.ContentEn,
|
||||
Items: item.ItemToMsg(v.Items),
|
||||
Status: int32(v.Status),
|
||||
Time: int32(v.Send),
|
||||
Type: int32(v.Type),
|
||||
Id: int32(k),
|
||||
Title: v.Title,
|
||||
SubTitle: v.SubTitle,
|
||||
Content: v.Content,
|
||||
TitleEn: v.TitleEn,
|
||||
SubTitleEn: v.SubTitleEn,
|
||||
ContentEn: v.ContentEn,
|
||||
TitlePtBr: v.TitlePtBr,
|
||||
SubTitlePtBr: v.SubTitlePtBr,
|
||||
ContentPtBr: v.ContentPtBr,
|
||||
Items: item.ItemToMsg(v.Items),
|
||||
Status: int32(v.Status),
|
||||
Time: int32(v.Send),
|
||||
Type: int32(v.Type),
|
||||
}
|
||||
}
|
||||
return res
|
||||
@ -168,10 +182,15 @@ func (m *MailMod) NotifyMail(Id int) *msg.MailNotify {
|
||||
SubTitle: mailInfo.SubTitle,
|
||||
SubTitleEn: mailInfo.SubTitleEn,
|
||||
TitleEn: mailInfo.TitleEn,
|
||||
Type: int32(mailInfo.Type),
|
||||
Items: item.ItemToMsg(mailInfo.Items),
|
||||
Status: int32(mailInfo.Status),
|
||||
Time: int32(mailInfo.Send),
|
||||
|
||||
TitlePtBr: mailInfo.TitlePtBr,
|
||||
SubTitlePtBr: mailInfo.SubTitlePtBr,
|
||||
ContentPtBr: mailInfo.ContentPtBr,
|
||||
|
||||
Type: int32(mailInfo.Type),
|
||||
Items: item.ItemToMsg(mailInfo.Items),
|
||||
Status: int32(mailInfo.Status),
|
||||
Time: int32(mailInfo.Send),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -867,8 +867,9 @@ func (CHESS_EX_TYPE) EnumDescriptor() ([]byte, []int) {
|
||||
type LANG_TYPE int32
|
||||
|
||||
const (
|
||||
LANG_TYPE_LANG_CN LANG_TYPE = 0 // 中文
|
||||
LANG_TYPE_LANG_EN LANG_TYPE = 1 // 英文
|
||||
LANG_TYPE_LANG_CN LANG_TYPE = 0 // 中文
|
||||
LANG_TYPE_LANG_EN LANG_TYPE = 1 // 英文
|
||||
LANG_TYPE_LANG_PTBR LANG_TYPE = 2 // 葡萄牙语
|
||||
)
|
||||
|
||||
// Enum value maps for LANG_TYPE.
|
||||
@ -876,10 +877,12 @@ var (
|
||||
LANG_TYPE_name = map[int32]string{
|
||||
0: "LANG_CN",
|
||||
1: "LANG_EN",
|
||||
2: "LANG_PTBR",
|
||||
}
|
||||
LANG_TYPE_value = map[string]int32{
|
||||
"LANG_CN": 0,
|
||||
"LANG_EN": 1,
|
||||
"LANG_CN": 0,
|
||||
"LANG_EN": 1,
|
||||
"LANG_PTBR": 2,
|
||||
}
|
||||
)
|
||||
|
||||
@ -16248,17 +16251,20 @@ func (x *ResMailList) GetMailList() map[int32]*MailInfo {
|
||||
|
||||
type MailInfo struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` // 邮件id
|
||||
Title string `protobuf:"bytes,2,opt,name=Title,proto3" json:"Title,omitempty"` // 标题
|
||||
Content string `protobuf:"bytes,3,opt,name=Content,proto3" json:"Content,omitempty"` // 内容
|
||||
Time int32 `protobuf:"varint,4,opt,name=Time,proto3" json:"Time,omitempty"` // 时间
|
||||
Status int32 `protobuf:"varint,5,opt,name=Status,proto3" json:"Status,omitempty"` // 0 未读 1 已读 2 已领取 3 已删除
|
||||
Items []*ItemInfo `protobuf:"bytes,6,rep,name=Items,proto3" json:"Items,omitempty"` // 奖励
|
||||
Type int32 `protobuf:"varint,7,opt,name=Type,proto3" json:"Type,omitempty"` //邮件类型 1普通邮件 2节日邮件 3 礼包邮件
|
||||
TitleEn string `protobuf:"bytes,8,opt,name=TitleEn,proto3" json:"TitleEn,omitempty"` // 英文标题
|
||||
ContentEn string `protobuf:"bytes,9,opt,name=ContentEn,proto3" json:"ContentEn,omitempty"` // 英文内容
|
||||
SubTitle string `protobuf:"bytes,10,opt,name=SubTitle,proto3" json:"SubTitle,omitempty"` // 子标题
|
||||
SubTitleEn string `protobuf:"bytes,11,opt,name=SubTitleEn,proto3" json:"SubTitleEn,omitempty"` // 英文子标题
|
||||
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` // 邮件id
|
||||
Title string `protobuf:"bytes,2,opt,name=Title,proto3" json:"Title,omitempty"` // 标题
|
||||
Content string `protobuf:"bytes,3,opt,name=Content,proto3" json:"Content,omitempty"` // 内容
|
||||
Time int32 `protobuf:"varint,4,opt,name=Time,proto3" json:"Time,omitempty"` // 时间
|
||||
Status int32 `protobuf:"varint,5,opt,name=Status,proto3" json:"Status,omitempty"` // 0 未读 1 已读 2 已领取 3 已删除
|
||||
Items []*ItemInfo `protobuf:"bytes,6,rep,name=Items,proto3" json:"Items,omitempty"` // 奖励
|
||||
Type int32 `protobuf:"varint,7,opt,name=Type,proto3" json:"Type,omitempty"` //邮件类型 1普通邮件 2节日邮件 3 礼包邮件
|
||||
TitleEn string `protobuf:"bytes,8,opt,name=TitleEn,proto3" json:"TitleEn,omitempty"` // 英文标题
|
||||
ContentEn string `protobuf:"bytes,9,opt,name=ContentEn,proto3" json:"ContentEn,omitempty"` // 英文内容
|
||||
SubTitle string `protobuf:"bytes,10,opt,name=SubTitle,proto3" json:"SubTitle,omitempty"` // 子标题
|
||||
SubTitleEn string `protobuf:"bytes,11,opt,name=SubTitleEn,proto3" json:"SubTitleEn,omitempty"` // 英文子标题
|
||||
TitlePtBr string `protobuf:"bytes,12,opt,name=TitlePtBr,proto3" json:"TitlePtBr,omitempty"` // 葡萄牙标题
|
||||
ContentPtBr string `protobuf:"bytes,13,opt,name=ContentPtBr,proto3" json:"ContentPtBr,omitempty"` // 葡萄牙内容
|
||||
SubTitlePtBr string `protobuf:"bytes,14,opt,name=SubTitlePtBr,proto3" json:"SubTitlePtBr,omitempty"` // 葡萄牙子标题
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@ -16370,6 +16376,27 @@ func (x *MailInfo) GetSubTitleEn() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MailInfo) GetTitlePtBr() string {
|
||||
if x != nil {
|
||||
return x.TitlePtBr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MailInfo) GetContentPtBr() string {
|
||||
if x != nil {
|
||||
return x.ContentPtBr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MailInfo) GetSubTitlePtBr() string {
|
||||
if x != nil {
|
||||
return x.SubTitlePtBr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type MailNotify struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Info *MailInfo `protobuf:"bytes,1,opt,name=Info,proto3" json:"Info,omitempty"`
|
||||
@ -28310,7 +28337,7 @@ const file_proto_Gameapi_proto_rawDesc = "" +
|
||||
"\bMailList\x18\x01 \x03(\v2#.tutorial.ResMailList.MailListEntryR\bMailList\x1aO\n" +
|
||||
"\rMailListEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\x05R\x03key\x12(\n" +
|
||||
"\x05value\x18\x02 \x01(\v2\x12.tutorial.MailInfoR\x05value:\x028\x01\"\xa8\x02\n" +
|
||||
"\x05value\x18\x02 \x01(\v2\x12.tutorial.MailInfoR\x05value:\x028\x01\"\x8c\x03\n" +
|
||||
"\bMailInfo\x12\x0e\n" +
|
||||
"\x02Id\x18\x01 \x01(\x05R\x02Id\x12\x14\n" +
|
||||
"\x05Title\x18\x02 \x01(\tR\x05Title\x12\x18\n" +
|
||||
@ -28325,7 +28352,10 @@ const file_proto_Gameapi_proto_rawDesc = "" +
|
||||
" \x01(\tR\bSubTitle\x12\x1e\n" +
|
||||
"\n" +
|
||||
"SubTitleEn\x18\v \x01(\tR\n" +
|
||||
"SubTitleEn\"4\n" +
|
||||
"SubTitleEn\x12\x1c\n" +
|
||||
"\tTitlePtBr\x18\f \x01(\tR\tTitlePtBr\x12 \n" +
|
||||
"\vContentPtBr\x18\r \x01(\tR\vContentPtBr\x12\"\n" +
|
||||
"\fSubTitlePtBr\x18\x0e \x01(\tR\fSubTitlePtBr\"4\n" +
|
||||
"\n" +
|
||||
"MailNotify\x12&\n" +
|
||||
"\x04Info\x18\x01 \x01(\v2\x12.tutorial.MailInfoR\x04Info\"\x1d\n" +
|
||||
@ -29311,10 +29341,11 @@ const file_proto_Gameapi_proto_rawDesc = "" +
|
||||
"\fCHESS_EX_BOX\x10\x02\x12\x16\n" +
|
||||
"\x12CHESS_EX_QUICK_BUY\x10\x03\x12\x12\n" +
|
||||
"\x0eCHESS_EX_EVENT\x10\x04\x12$\n" +
|
||||
" CHESS_EX_EVENT_LITTLE_APPRENTICE\x10\x05*%\n" +
|
||||
" CHESS_EX_EVENT_LITTLE_APPRENTICE\x10\x05*4\n" +
|
||||
"\tLANG_TYPE\x12\v\n" +
|
||||
"\aLANG_CN\x10\x00\x12\v\n" +
|
||||
"\aLANG_EN\x10\x01*x\n" +
|
||||
"\aLANG_EN\x10\x01\x12\r\n" +
|
||||
"\tLANG_PTBR\x10\x02*x\n" +
|
||||
"\x0fLimitEventParam\x12\f\n" +
|
||||
"\bLEP_NONE\x10\x00\x12\x14\n" +
|
||||
"\x10CAT_TRICK_ENERGY\x10\x01\x12\x12\n" +
|
||||
|
||||
Loading…
Reference in New Issue
Block a user