refactoring. Rewriting hex strings to human-readable objects.
This commit is contained in:
parent
5a1ac47828
commit
c2c17f1f24
File diff suppressed because one or more lines are too long
@ -25,10 +25,10 @@ public abstract class Processor {
|
|||||||
|
|
||||||
public static Protocol.Header generateResponse(Integer size, Integer token, Integer status, Integer object_id) {
|
public static Protocol.Header generateResponse(Integer size, Integer token, Integer status, Integer object_id) {
|
||||||
Protocol.Header.Builder b = Protocol.Header.newBuilder().setServiceId(254);
|
Protocol.Header.Builder b = Protocol.Header.newBuilder().setServiceId(254);
|
||||||
if(size != null) b = b.setSize(size);
|
if(size != null) b.setSize(size);
|
||||||
if(token != null) b = b.setToken(token);
|
if(token != null) b.setToken(token);
|
||||||
if(status != null) b = b.setStatus(status);
|
if(status != null) b.setStatus(status);
|
||||||
if(object_id != null) b = b.setObjectId(object_id);
|
if(object_id != null) b.setObjectId(object_id);
|
||||||
return b.build();
|
return b.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2092,6 +2092,28 @@ message Subscribe {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ref: PegasusUtil.SubscribeResponse
|
||||||
|
message UtilSubscribeResponse {
|
||||||
|
// ref: PegasusUtil.SubscribeResponse/PacketID
|
||||||
|
enum PacketID {
|
||||||
|
ID = 315;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusUtil.SubscribeResponse/ResponseResult
|
||||||
|
enum ResponseResult {
|
||||||
|
SUCCESS = 1;
|
||||||
|
FAILED_UNAVAILABLE = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
optional uint64 route = 1;
|
||||||
|
optional uint64 keep_alive_secs = 3;
|
||||||
|
optional uint64 max_resubscribe_attempts = 4 [default = 0];
|
||||||
|
optional uint64 pending_response_timeout = 5 [default = 0];
|
||||||
|
optional uint64 pending_subscribe_timeout = 6 [default = 0];
|
||||||
|
optional ResponseResult result = 7 [default = SUCCESS];
|
||||||
|
optional uint64 request_max_wait_secs = 8;
|
||||||
|
}
|
||||||
|
|
||||||
// ref: PegasusUtil.GenericData
|
// ref: PegasusUtil.GenericData
|
||||||
message GenericData {
|
message GenericData {
|
||||||
required uint32 type_id = 1;
|
required uint32 type_id = 1;
|
||||||
@ -2240,3 +2262,355 @@ message ClientOption {
|
|||||||
optional float as_float = 5;
|
optional float as_float = 5;
|
||||||
optional uint64 as_uint64 = 6;
|
optional uint64 as_uint64 = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ref: PegasusUtil.GuardianVars
|
||||||
|
message GuardianVars {
|
||||||
|
// ref: PegasusUtil.GuardianVars/PacketID
|
||||||
|
enum PacketID {
|
||||||
|
ID = 264;
|
||||||
|
}
|
||||||
|
|
||||||
|
optional bool tourney = 1;
|
||||||
|
optional bool practice = 2;
|
||||||
|
optional bool casual = 3;
|
||||||
|
optional bool forge = 4;
|
||||||
|
optional bool friendly = 5;
|
||||||
|
optional bool manager = 6;
|
||||||
|
optional bool crafting = 7;
|
||||||
|
optional bool hunter = 8;
|
||||||
|
optional bool mage = 9;
|
||||||
|
optional bool paladin = 10;
|
||||||
|
optional bool priest = 11;
|
||||||
|
optional bool rogue = 12;
|
||||||
|
optional bool shaman = 13;
|
||||||
|
optional bool warlock = 14;
|
||||||
|
optional bool warrior = 15;
|
||||||
|
optional int32 show_user_ui = 16;
|
||||||
|
optional bool store = 17;
|
||||||
|
optional bool battle_pay = 18;
|
||||||
|
optional bool buy_with_gold = 19;
|
||||||
|
optional bool tavern_brawl = 20;
|
||||||
|
optional int32 client_options_update_interval_seconds = 21;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusUtil.AssetsVersionResponse
|
||||||
|
message AssetsVersionResponse {
|
||||||
|
// ref: PegasusUtil.AssetsVersionResponse/PacketID
|
||||||
|
enum PacketID {
|
||||||
|
ID = 304;
|
||||||
|
}
|
||||||
|
|
||||||
|
required int32 version = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusUtil.GenericResponse
|
||||||
|
message GenericResponse {
|
||||||
|
// ref: PegasusUtil.GenericResponse/PacketID
|
||||||
|
enum PacketID {
|
||||||
|
ID = 326;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusUtil.GenericResponse/Result
|
||||||
|
enum Result {
|
||||||
|
RESULT_OK = 0;
|
||||||
|
RESULT_REQUEST_IN_PROCESS = 1;
|
||||||
|
RESULT_REQUEST_COMPLETE = 2;
|
||||||
|
RESULT_UNKNOWN_ERROR = 100;
|
||||||
|
RESULT_INTERNAL_ERROR = 101;
|
||||||
|
RESULT_DB_ERROR = 102;
|
||||||
|
RESULT_INVALID_REQUEST = 103;
|
||||||
|
RESULT_LOGIN_LOAD = 104;
|
||||||
|
RESULT_DATA_MIGRATION_ERROR = 105;
|
||||||
|
}
|
||||||
|
|
||||||
|
required Result result_code = 1;
|
||||||
|
required int32 request_id = 2;
|
||||||
|
optional int32 request_sub_id = 3;
|
||||||
|
optional GenericData generic_data = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusUtil.UpdateLoginComplete
|
||||||
|
message UpdateLoginComplete {
|
||||||
|
// ref: PegasusUtil.UpdateLoginComplete/PacketID
|
||||||
|
enum PacketID {
|
||||||
|
ID = 307;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusUtil.ProfileProgress
|
||||||
|
message ProfileProgress {
|
||||||
|
// ref: PegasusUtil.ProfileProgress/PacketID
|
||||||
|
enum PacketID {
|
||||||
|
ID = 233;
|
||||||
|
}
|
||||||
|
|
||||||
|
required int64 progress = 1;
|
||||||
|
required int32 best_forge = 2;
|
||||||
|
optional Date last_forge = 3;
|
||||||
|
optional int32 display_banner = 4 [default = 0];
|
||||||
|
repeated AdventureOptions adventure_options = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusUtil.AdventureOptions
|
||||||
|
message AdventureOptions {
|
||||||
|
required int32 adventure_id = 1;
|
||||||
|
required uint64 options = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusShared.Date
|
||||||
|
message Date {
|
||||||
|
required int32 year = 1;
|
||||||
|
required int32 month = 2;
|
||||||
|
required int32 day = 3;
|
||||||
|
required int32 hours = 4;
|
||||||
|
required int32 min = 5;
|
||||||
|
required int32 sec = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusUtil.DeckList
|
||||||
|
message DeckList {
|
||||||
|
// ref: PegasusUtil.DeckList/PacketID
|
||||||
|
enum PacketID {
|
||||||
|
ID = 202;
|
||||||
|
}
|
||||||
|
|
||||||
|
repeated DeckInfo decks = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusShared.DeckInfo
|
||||||
|
message DeckInfo {
|
||||||
|
// ref: PegasusShared.DeckInfo/ValidityFlags
|
||||||
|
enum ValidityFlags {
|
||||||
|
UNLOCKED_HERO_CLASS = 1;
|
||||||
|
OWNS_CARDS = 2;
|
||||||
|
HAS_30_CARDS = 4;
|
||||||
|
OBEYS_MAXES = 8;
|
||||||
|
CLASS_MATCHES = 16;
|
||||||
|
OWNS_CARD_BACK = 32;
|
||||||
|
OWNS_HERO = 64;
|
||||||
|
TAGGED_STANDARD = 128;
|
||||||
|
NEEDS_VALIDATION = 256;
|
||||||
|
NEEDS_NAME = 512;
|
||||||
|
}
|
||||||
|
|
||||||
|
required int64 id = 1;
|
||||||
|
required string name = 2;
|
||||||
|
required int32 card_back = 3;
|
||||||
|
required int32 hero = 4;
|
||||||
|
required DeckType deck_type = 5;
|
||||||
|
required uint64 validity = 6;
|
||||||
|
required int32 hero_premium = 7;
|
||||||
|
required bool card_back_override = 8;
|
||||||
|
required bool hero_override = 9;
|
||||||
|
optional int64 last_modified = 10;
|
||||||
|
optional int32 season_id = 11;
|
||||||
|
optional int64 sort_order = 12;
|
||||||
|
optional int64 create_date = 13;
|
||||||
|
optional DeckSourceType source_type = 14 [default = DECK_SOURCE_TYPE_UNKNOWN];
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusShared.DeckSourceType
|
||||||
|
enum DeckSourceType {
|
||||||
|
DECK_SOURCE_TYPE_UNKNOWN = 0;
|
||||||
|
DECK_SOURCE_TYPE_NORMAL = 1;
|
||||||
|
DECK_SOURCE_TYPE_TEMPLATE = 2;
|
||||||
|
DECK_SOURCE_TYPE_BASIC_DECK = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusShared.DeckType
|
||||||
|
enum DeckType {
|
||||||
|
NORMAL_DECK = 1;
|
||||||
|
AI_DECK = 2;
|
||||||
|
DRAFT_DECK = 4;
|
||||||
|
PRECON_DECK = 5;
|
||||||
|
TAVERN_BRAWL_DECK = 6;
|
||||||
|
HIDDEN_DECK = 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusUtil.BoosterList
|
||||||
|
message BoosterList {
|
||||||
|
// ref: PegasusUtil.BoosterList/PacketID
|
||||||
|
enum PacketID {
|
||||||
|
ID = 224;
|
||||||
|
}
|
||||||
|
|
||||||
|
repeated BoosterInfo list = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusShared.BoosterInfo
|
||||||
|
message BoosterInfo {
|
||||||
|
required int32 type = 2;
|
||||||
|
required int32 count = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ref: PegasusUtil.Collection
|
||||||
|
message Collection {
|
||||||
|
// ref: PegasusUtil.Collection/PacketID
|
||||||
|
enum PacketID {
|
||||||
|
ID = 207;
|
||||||
|
}
|
||||||
|
|
||||||
|
repeated CardStack stacks = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusShared.CardDef
|
||||||
|
message CardDef {
|
||||||
|
required int32 asset = 1;
|
||||||
|
optional int32 premium = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusShared.CardStack
|
||||||
|
message CardStack {
|
||||||
|
required CardDef card_def = 1;
|
||||||
|
required Date latest_insert_date = 2;
|
||||||
|
required int32 count = 3;
|
||||||
|
required int32 num_seen = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ref: PegasusUtil.MedalInfo
|
||||||
|
message MedalInfo {
|
||||||
|
// ref: PegasusUtil.MedalInfo/PacketID
|
||||||
|
enum PacketID {
|
||||||
|
ID = 232;
|
||||||
|
}
|
||||||
|
|
||||||
|
required MedalInfoData standard = 1;
|
||||||
|
required MedalInfoData wild = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusUtil.MedalInfoData
|
||||||
|
message MedalInfoData {
|
||||||
|
required int32 season_wins = 3;
|
||||||
|
required int32 stars = 6;
|
||||||
|
required int32 streak = 7;
|
||||||
|
required int32 star_level = 8;
|
||||||
|
required int32 level_start = 9;
|
||||||
|
required int32 level_end = 10;
|
||||||
|
required bool can_lose_level = 11;
|
||||||
|
optional int32 legend_rank = 13;
|
||||||
|
optional int32 best_star_level = 14;
|
||||||
|
optional bool can_lose_stars = 15;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusUtil.SpecialEventTiming
|
||||||
|
message SpecialEventTiming {
|
||||||
|
required string event = 1;
|
||||||
|
optional uint64 start = 2;
|
||||||
|
optional uint64 end = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusUtil.NotSoMassiveLoginReply
|
||||||
|
message NotSoMassiveLoginReply {
|
||||||
|
// ref: PegasusUtil.NotSoMassiveLoginReply/PacketID
|
||||||
|
enum PacketID {
|
||||||
|
ID = 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
repeated SpecialEventTiming special_event_timing = 10;
|
||||||
|
optional TavernBrawlInfo tavern_brawls = 11;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusUtil.TavernBrawlInfo
|
||||||
|
message TavernBrawlInfo {
|
||||||
|
// ref: PegasusUtil.TavernBrawlInfo/PacketID
|
||||||
|
enum PacketID {
|
||||||
|
ID = 316;
|
||||||
|
}
|
||||||
|
|
||||||
|
optional TavernBrawlSpec current_tavern_brawl = 1;
|
||||||
|
optional uint64 next_start_seconds_from_now = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusShared.TavernBrawlSpec
|
||||||
|
message TavernBrawlSpec {
|
||||||
|
optional uint64 end_seconds_from_now = 1;
|
||||||
|
required int32 scenario_id = 2;
|
||||||
|
required uint32 scenario_record_byte_size = 3;
|
||||||
|
required bytes scenario_record_hash = 4;
|
||||||
|
required RewardType reward_type = 5;
|
||||||
|
required int64 reward_data1 = 6;
|
||||||
|
required int64 reward_data2 = 7;
|
||||||
|
optional RewardTrigger reward_trigger = 8 [default = REWARD_TRIGGER_UNKNOWN];
|
||||||
|
required int32 season_id = 11;
|
||||||
|
repeated AssetRecordInfo additional_assets = 100;
|
||||||
|
required TavernBrawlPlayerRecord my_record = 105;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusShared.RewardType
|
||||||
|
enum RewardType {
|
||||||
|
REWARD_UNKNOWN = 0;
|
||||||
|
REWARD_NONE = 1;
|
||||||
|
REWARD_ADVENTURE_PROGRESS = 2;
|
||||||
|
REWARD_ARCANE_DUST = 3;
|
||||||
|
REWARD_BASIC_CARD = 4;
|
||||||
|
REWARD_BOOSTER_PACKS = 5;
|
||||||
|
REWARD_CARD_BACK = 6;
|
||||||
|
REWARD_CARD_ID = 7;
|
||||||
|
REWARD_CARD_ID_2X = 8;
|
||||||
|
REWARD_CARD_SET = 9;
|
||||||
|
DEPRECATED_REWARD_CRAFTABLE_GOLDEN = 10;
|
||||||
|
REWARD_GOLD = 11;
|
||||||
|
REWARD_GOLD_HERO = 12;
|
||||||
|
REWARD_FORGE_TICKETS = 13;
|
||||||
|
REWARD_HERO = 14;
|
||||||
|
REWARD_EXTERNAL_GAME_MOUNT = 15;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusShared.RewardTrigger
|
||||||
|
enum RewardTrigger {
|
||||||
|
REWARD_TRIGGER_UNKNOWN = 0;
|
||||||
|
REWARD_TRIGGER_NONE = 1;
|
||||||
|
REWARD_TRIGGER_WIN_GAME = 2;
|
||||||
|
REWARD_TRIGGER_FINISH_GAME = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusShared.AssetRecordInfo
|
||||||
|
message AssetRecordInfo {
|
||||||
|
required AssetKey asset = 1;
|
||||||
|
required uint32 record_byte_size = 2;
|
||||||
|
required bytes record_hash = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusShared.TavernBrawlPlayerRecord
|
||||||
|
message TavernBrawlPlayerRecord {
|
||||||
|
required int32 reward_progress = 1;
|
||||||
|
optional int32 games_played = 2;
|
||||||
|
required int32 games_won = 3;
|
||||||
|
optional int32 win_streak = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusShared.AssetKey
|
||||||
|
message AssetKey {
|
||||||
|
required AssetType type = 1;
|
||||||
|
optional int32 asset_id = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusShared.AssetType
|
||||||
|
enum AssetType {
|
||||||
|
ASSET_TYPE_SCENARIO = 1;
|
||||||
|
ASSET_TYPE_SUBSET_CARD = 2;
|
||||||
|
ASSET_TYPE_DECK_RULESET = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ref: PegasusUtil.CardValue
|
||||||
|
message CardValue {
|
||||||
|
required CardDef card = 1;
|
||||||
|
required int32 buy = 2;
|
||||||
|
required int32 sell = 3;
|
||||||
|
required bool nerfed = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ref: PegasusUtil.CardValues
|
||||||
|
message CardValues {
|
||||||
|
// ref: PegasusUtil.CardValues/PacketID
|
||||||
|
enum PacketID {
|
||||||
|
ID = 260;
|
||||||
|
}
|
||||||
|
|
||||||
|
repeated CardValue cards = 1;
|
||||||
|
required int32 card_nerf_index = 2;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user