Skip to content

Commit

Permalink
[core] Improve error message of NormalMember.modifyAdmin(); #2370
Browse files Browse the repository at this point in the history
  • Loading branch information
Karlatemp committed Dec 3, 2022
1 parent b5fcbe9 commit e65f4e6
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,13 @@ internal class TroopManagement {
}

internal object ModifyAdmin : OutgoingPacketFactory<ModifyAdmin.Response>("OidbSvc.0x55c_1") {
data class Response(val success: Boolean, val msg: String) : Packet {
data class Response(
val code: Int,
val success: Boolean,
val msg: String,
) : Packet {
override fun toString(): String {
return "TroopManagement.ModifyAdmin.Response(success=${success}, msg=${msg})"
return "TroopManagement.ModifyAdmin.Response(code=${code}, success=${success}, msg=${msg})"
}
}

Expand Down Expand Up @@ -452,6 +456,7 @@ internal class TroopManagement {
val stupidPacket = readProtoBuf(OidbSso.OIDBSSOPkg.serializer())
return stupidPacket.run {
ModifyAdmin.Response(
this.result,
this.result == 0,
this.errorMsg
)
Expand Down

0 comments on commit e65f4e6

Please sign in to comment.