[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,13 +1,13 @@
package org.anime_game_servers.multi_proto.gi.data.mail 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.AddedIn
import org.anime_game_servers.core.base.annotations.proto.ProtoEnum import org.anime_game_servers.core.base.annotations.proto.ProtoEnum
@AddedIn(Version.GI_CB1) @AddedIn(GI_CB1)
@ProtoEnum @ProtoEnum
enum class AuthkeySignType { internal enum class AuthkeySignType {
AUTHKEY_SIGN_TYPE_NONE, AUTHKEY_SIGN_TYPE_NONE,
AUTHKEY_SIGN_TYPE_DEFAULT, AUTHKEY_SIGN_TYPE_DEFAULT,
AUTHKEY_SIGN_TYPE_RSA, AUTHKEY_SIGN_TYPE_RSA,
} }

View File

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

View File

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

View File

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

View File

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

View File

@ -1,12 +1,13 @@
package org.anime_game_servers.multi_proto.gi.data.mail 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.AddedIn
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand 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) @AddedIn(GI_3_0_0)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.CLIENT) @ProtoCommand(CLIENT)
interface GetAllMailNotify { internal interface GetAllMailNotify {
var isCollected : Boolean 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.AddedIn
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand 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) @AddedIn(GI_CB1)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.REQUEST) @ProtoCommand(REQUEST)
interface GetAllMailReq { internal interface GetAllMailReq {
@AddedIn(Version.GI_2_4_0) @AddedIn(GI_2_4_0)
var isCollected : Boolean var isCollected : Boolean
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,13 +2,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.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.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.ProtoCommand
import org.anime_game_servers.core.base.annotations.proto.CommandType.RESPONSE
@AddedIn(Version.GI_CB1) @AddedIn(GI_CB1)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.RESPONSE) @ProtoCommand(RESPONSE)
interface GetMailItemRsp { internal interface GetMailItemRsp {
var mailIdList: List<Int> var mailIdList: List<Int>
var itemList: List<EquipParam> var itemList: List<EquipParam>
var retCode: Int var retCode: Int
} }

View File

@ -1,12 +1,13 @@
package org.anime_game_servers.multi_proto.gi.data.mail 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.AddedIn
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand 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) @AddedIn(GI_CB1)
@ProtoCommand(org.anime_game_servers.core.base.annotations.proto.CommandType.NOTIFY) @ProtoCommand(NOTIFY)
interface MailChangeNotify { internal interface MailChangeNotify {
var mailList: List<MailData>
var delMailIdList: List<Int> 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) @AddedIn(Version.GI_2_4_0)
@ProtoEnum @ProtoEnum
enum class MailCollectState { internal enum class MailCollectState {
@AltName("MAIL_COLLECTIBLE_UNKONW", "MAIL_COLLECT_STATE_COLLECTIBLE_UNKONW", "MAIL_COLLECT_STATE_COLLECTIBLE_UNKNOWN") @AltName("MAIL_COLLECTIBLE_UNKONW", "MAIL_COLLECT_STATE_COLLECTIBLE_UNKONW", "MAIL_COLLECT_STATE_COLLECTIBLE_UNKNOWN")
MAIL_COLLECTIBLE_UNKNOWN, MAIL_COLLECTIBLE_UNKNOWN,
@AltName("MAIL_COLLECT_STATE_NOT_COLLECTIBLE") @AltName("MAIL_COLLECT_STATE_NOT_COLLECTIBLE")
@ -17,4 +17,4 @@ enum class MailCollectState {
@AltName("MAIL_COLLECT_STATE_COLLECTIBLE_COLLECTED") @AltName("MAIL_COLLECT_STATE_COLLECTIBLE_COLLECTED")
MAIL_COLLECTIBLE_COLLECTED, MAIL_COLLECTIBLE_COLLECTED,
} }

View File

@ -1,34 +1,35 @@
package org.anime_game_servers.multi_proto.gi.data.mail 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.AddedIn
import org.anime_game_servers.core.base.annotations.RemovedIn import org.anime_game_servers.core.base.annotations.RemovedIn
import org.anime_game_servers.core.base.annotations.proto.ProtoModel import org.anime_game_servers.core.base.annotations.proto.ProtoModel
@AddedIn(Version.GI_CB1) @AddedIn(GI_CB1)
@ProtoModel @ProtoModel
interface MailData { internal 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
var expireTime: Int var expireTime: Int
var importance: Int var importance: Int
var isRead: Boolean var isRead: Boolean
var isAttachmentGot: 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 var configId: Int
@AddedIn(GI_0_9_0)
@AddedIn(Version.GI_0_9_0)
var argumentList: List<String> var argumentList: List<String>
@AddedIn(Version.GI_2_4_0) @AddedIn(GI_2_4_0)
var collectState: MailCollectState 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.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.EquipParam
import org.anime_game_servers.multi_proto.gi.data.general.item.MaterialDeleteInfo 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 import org.anime_game_servers.core.base.annotations.proto.ProtoModel
@AddedIn(Version.GI_0_9_0) @AddedIn(GI_0_9_0)
@ProtoModel @ProtoModel
interface MailItem { internal interface MailItem {
var equipParam: EquipParam
var deleteInfo: MaterialDeleteInfo var deleteInfo: MaterialDeleteInfo
} var equipParam: EquipParam
}

View File

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

View File

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