[GI/Refactoring] Cleaned up the mail related packets

This commit is contained in:
hartie95 2024-08-19 19:37:26 +02:00
parent da182243c3
commit e781164458
19 changed files with 131 additions and 113 deletions

View File

@ -1,12 +1,12 @@
package org.anime_game_servers.multi_proto.gi.data.mail
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.annotations.proto.ProtoEnum
@AddedIn(Version.GI_CB1)
@AddedIn(GI_CB1)
@ProtoEnum
enum class AuthkeySignType {
internal enum class AuthkeySignType {
AUTHKEY_SIGN_TYPE_NONE,
AUTHKEY_SIGN_TYPE_DEFAULT,
AUTHKEY_SIGN_TYPE_RSA,

View File

@ -1,12 +1,13 @@
package org.anime_game_servers.multi_proto.gi.data.mail
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.Version.GI_1_5_0
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
import org.anime_game_servers.core.base.annotations.proto.CommandType.CLIENT
@AddedIn(Version.GI_1_5_0)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.CLIENT)
interface ChangeMailStarNotify {
@AddedIn(GI_1_5_0)
@ProtoCommand(CLIENT)
internal interface ChangeMailStarNotify {
var isStar: Boolean
var mailIdList: List<Int>
}

View File

@ -1,12 +1,13 @@
package org.anime_game_servers.multi_proto.gi.data.mail
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
import org.anime_game_servers.core.base.annotations.proto.CommandType.NOTIFY
@AddedIn(Version.GI_CB1)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.NOTIFY)
interface ClientNewMailNotify {
var notReadNum: Int
@AddedIn(GI_CB1)
@ProtoCommand(NOTIFY)
internal interface ClientNewMailNotify {
var notGotAttachmentNum: Int
var notReadNum: Int
}

View File

@ -1,11 +1,12 @@
package org.anime_game_servers.multi_proto.gi.data.mail
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
import org.anime_game_servers.core.base.annotations.proto.CommandType.REQUEST
@AddedIn(Version.GI_CB1)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.REQUEST)
interface DelMailReq {
@AddedIn(GI_CB1)
@ProtoCommand(REQUEST)
internal interface DelMailReq {
var mailIdList: List<Int>
}

View File

@ -1,12 +1,13 @@
package org.anime_game_servers.multi_proto.gi.data.mail
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
import org.anime_game_servers.core.base.annotations.proto.CommandType.RESPONSE
@AddedIn(Version.GI_CB1)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.RESPONSE)
interface DelMailRsp {
@AddedIn(GI_CB1)
@ProtoCommand(RESPONSE)
internal interface DelMailRsp {
var mailIdList: List<Int>
var retCode: Int
}

View File

@ -1,12 +1,13 @@
package org.anime_game_servers.multi_proto.gi.data.mail
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.Version.GI_3_0_0
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
import org.anime_game_servers.core.base.annotations.proto.CommandType.CLIENT
@AddedIn(Version.GI_3_0_0)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.CLIENT)
interface GetAllMailNotify {
@AddedIn(GI_3_0_0)
@ProtoCommand(CLIENT)
internal interface GetAllMailNotify {
var isCollected : Boolean
}

View File

@ -2,11 +2,13 @@ package org.anime_game_servers.multi_proto.gi.data.mail
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.Version.GI_2_4_0
import org.anime_game_servers.core.base.annotations.proto.CommandType.REQUEST
@AddedIn(Version.GI_CB1)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.REQUEST)
interface GetAllMailReq {
@AddedIn(Version.GI_2_4_0)
@AddedIn(GI_CB1)
@ProtoCommand(REQUEST)
internal interface GetAllMailReq {
@AddedIn(GI_2_4_0)
var isCollected : Boolean
}

View File

@ -1,16 +1,17 @@
package org.anime_game_servers.multi_proto.gi.data.mail
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.Version.GI_3_0_0
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
import org.anime_game_servers.core.base.annotations.proto.CommandType.NOTIFY
@AddedIn(Version.GI_3_0_0)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.NOTIFY)
interface GetAllMailResultNotify {
var mailList: List<MailData>
var transaction: String
var totalPageCount: Int
var pageIndex: Int
@AddedIn(GI_3_0_0)
@ProtoCommand(NOTIFY)
internal interface GetAllMailResultNotify {
var isCollected: Boolean
var mailList: List<MailData>
var pageIndex: Int
var totalPageCount: Int
var transaction: String
var retCode: Int
}

View File

@ -1,16 +1,19 @@
package org.anime_game_servers.multi_proto.gi.data.mail
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.Version.GI_1_5_0
import org.anime_game_servers.core.base.Version.GI_2_4_0
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
import org.anime_game_servers.core.base.annotations.proto.CommandType.RESPONSE
@AddedIn(Version.GI_CB1)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.RESPONSE)
interface GetAllMailRsp {
@AddedIn(GI_CB1)
@ProtoCommand(RESPONSE)
internal interface GetAllMailRsp {
var mailList: List<MailData>
var retCode: Int
@AddedIn(Version.GI_1_5_0)
@AddedIn(GI_1_5_0)
var isTruncated: Boolean
@AddedIn(Version.GI_2_4_0)
@AddedIn(GI_2_4_0)
var isCollected: Boolean
}

View File

@ -1,13 +1,14 @@
package org.anime_game_servers.multi_proto.gi.data.mail
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
import org.anime_game_servers.core.base.annotations.proto.CommandType.REQUEST
@AddedIn(Version.GI_CB1)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.REQUEST)
interface GetAuthkeyReq {
@AddedIn(GI_CB1)
@ProtoCommand(REQUEST)
internal interface GetAuthkeyReq {
var authAppid: String
var signType: Int
var authkeyVer: Int
var signType: Int
}

View File

@ -1,16 +1,17 @@
package org.anime_game_servers.multi_proto.gi.data.mail
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
import org.anime_game_servers.core.base.annotations.proto.CommandType.RESPONSE
@AddedIn(Version.GI_CB1)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.RESPONSE)
interface GetAuthkeyRsp {
var authKey: String
@AddedIn(GI_CB1)
@ProtoCommand(RESPONSE)
internal interface GetAuthkeyRsp {
var authAppid: String
var signType: Int
var authKey: String
var authkeyVer: Int
var gameBiz: String
var signType: Int
var retCode: Int
}

View File

@ -1,11 +1,12 @@
package org.anime_game_servers.multi_proto.gi.data.mail
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
import org.anime_game_servers.core.base.annotations.proto.CommandType.REQUEST
@AddedIn(Version.GI_CB1)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.REQUEST)
interface GetMailItemReq {
@AddedIn(GI_CB1)
@ProtoCommand(REQUEST)
internal interface GetMailItemReq {
var mailIdList: List<Int>
}

View File

@ -2,12 +2,13 @@ package org.anime_game_servers.multi_proto.gi.data.mail
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.multi_proto.gi.data.general.item.EquipParam
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
import org.anime_game_servers.core.base.annotations.proto.CommandType.RESPONSE
@AddedIn(Version.GI_CB1)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.RESPONSE)
interface GetMailItemRsp {
@AddedIn(GI_CB1)
@ProtoCommand(RESPONSE)
internal interface GetMailItemRsp {
var mailIdList: List<Int>
var itemList: List<EquipParam>
var retCode: Int

View File

@ -1,12 +1,13 @@
package org.anime_game_servers.multi_proto.gi.data.mail
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
import org.anime_game_servers.core.base.annotations.proto.CommandType.NOTIFY
@AddedIn(Version.GI_CB1)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.NOTIFY)
interface MailChangeNotify {
var mailList: List<MailData>
@AddedIn(GI_CB1)
@ProtoCommand(NOTIFY)
internal interface MailChangeNotify {
var delMailIdList: List<Int>
var mailList: List<MailData>
}

View File

@ -7,7 +7,7 @@ import org.anime_game_servers.core.base.annotations.proto.ProtoEnum
@AddedIn(Version.GI_2_4_0)
@ProtoEnum
enum class MailCollectState {
internal enum class MailCollectState {
@AltName("MAIL_COLLECTIBLE_UNKONW", "MAIL_COLLECT_STATE_COLLECTIBLE_UNKONW", "MAIL_COLLECT_STATE_COLLECTIBLE_UNKNOWN")
MAIL_COLLECTIBLE_UNKNOWN,
@AltName("MAIL_COLLECT_STATE_NOT_COLLECTIBLE")

View File

@ -1,34 +1,35 @@
package org.anime_game_servers.multi_proto.gi.data.mail
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.Version.GI_CB2
import org.anime_game_servers.core.base.Version.GI_0_9_0
import org.anime_game_servers.core.base.Version.GI_2_4_0
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.annotations.RemovedIn
import org.anime_game_servers.core.base.annotations.proto.ProtoModel
@AddedIn(Version.GI_CB1)
@AddedIn(GI_CB1)
@ProtoModel
interface MailData {
var mailId: Int
@RemovedIn(Version.GI_CB2)
var index: Int
@RemovedIn(Version.GI_CB2)
var textId: Int
var mailTextContent: MailTextContent
var itemList: List<MailItem>// before 0.9 it was EquipParam TODO handle this
var sendTime: Int
internal interface MailData {
var expireTime: Int
var importance: Int
var isRead: Boolean
var isAttachmentGot: Boolean
var itemList: List<MailItem>// before 0.9 it was EquipParam TODO handle this
var mailId: Int
var mailTextContent: MailTextContent
var sendTime: Int
@AddedIn(Version.GI_0_9_0)
@RemovedIn(GI_CB2)
var index: Int
@RemovedIn(GI_CB2)
var textId: Int
@AddedIn(GI_0_9_0)
var configId: Int
@AddedIn(Version.GI_0_9_0)
@AddedIn(GI_0_9_0)
var argumentList: List<String>
@AddedIn(Version.GI_2_4_0)
@AddedIn(GI_2_4_0)
var collectState: MailCollectState
}

View File

@ -3,12 +3,12 @@ package org.anime_game_servers.multi_proto.gi.data.mail
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.multi_proto.gi.data.general.item.EquipParam
import org.anime_game_servers.multi_proto.gi.data.general.item.MaterialDeleteInfo
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.Version.GI_0_9_0
import org.anime_game_servers.core.base.annotations.proto.ProtoModel
@AddedIn(Version.GI_0_9_0)
@AddedIn(GI_0_9_0)
@ProtoModel
interface MailItem {
var equipParam: EquipParam
internal interface MailItem {
var deleteInfo: MaterialDeleteInfo
var equipParam: EquipParam
}

View File

@ -6,7 +6,7 @@ import org.anime_game_servers.core.base.annotations.proto.ProtoModel
@AddedIn(Version.GI_CB1)
@ProtoModel
interface MailTextContent {
internal interface MailTextContent {
var title: String
var content: String
var sender: String

View File

@ -1,11 +1,12 @@
package org.anime_game_servers.multi_proto.gi.data.mail
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
import org.anime_game_servers.core.base.annotations.proto.CommandType.CLIENT
@AddedIn(Version.GI_CB1)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.CLIENT)
interface ReadMailNotify {
@AddedIn(GI_CB1)
@ProtoCommand(CLIENT)
internal interface ReadMailNotify {
var mailIdList: List<Int>
}