node-cs2
Version:
Modern CS2/CS:GO Game Coordinator integration with latest GameTracking-CS2 protobuf definitions. Includes support for highlight_reel, variations, and all modern CS2 fields.
745 lines (718 loc) • 503 kB
JavaScript
/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
(function(global, factory) { /* global define, require, module */
/* AMD */ if (typeof define === 'function' && define.amd)
define(["protobufjs/minimal"], factory);
/* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports)
module.exports = factory(require("protobufjs/minimal"));
})(this, function($protobuf) {
"use strict";
// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
/**
* EGCItemMsg enum.
* @exports EGCItemMsg
* @enum {number}
* @property {number} k_EMsgGCBase=1000 k_EMsgGCBase value
* @property {number} k_EMsgGCSetItemPosition=1001 k_EMsgGCSetItemPosition value
* @property {number} k_EMsgGCCraft=1002 k_EMsgGCCraft value
* @property {number} k_EMsgGCCraftResponse=1003 k_EMsgGCCraftResponse value
* @property {number} k_EMsgGCDelete=1004 k_EMsgGCDelete value
* @property {number} k_EMsgGCVerifyCacheSubscription=1005 k_EMsgGCVerifyCacheSubscription value
* @property {number} k_EMsgGCNameItem=1006 k_EMsgGCNameItem value
* @property {number} k_EMsgGCUnlockCrate_DEPRECATED=1007 k_EMsgGCUnlockCrate_DEPRECATED value
* @property {number} k_EMsgGCUnlockCrateResponse=1008 k_EMsgGCUnlockCrateResponse value
* @property {number} k_EMsgGCPaintItem=1009 k_EMsgGCPaintItem value
* @property {number} k_EMsgGCPaintItemResponse=1010 k_EMsgGCPaintItemResponse value
* @property {number} k_EMsgGCGoldenWrenchBroadcast=1011 k_EMsgGCGoldenWrenchBroadcast value
* @property {number} k_EMsgGCMOTDRequest=1012 k_EMsgGCMOTDRequest value
* @property {number} k_EMsgGCMOTDRequestResponse=1013 k_EMsgGCMOTDRequestResponse value
* @property {number} k_EMsgGCAddItemToSocket_DEPRECATED=1014 k_EMsgGCAddItemToSocket_DEPRECATED value
* @property {number} k_EMsgGCAddItemToSocketResponse_DEPRECATED=1015 k_EMsgGCAddItemToSocketResponse_DEPRECATED value
* @property {number} k_EMsgGCAddSocketToBaseItem_DEPRECATED=1016 k_EMsgGCAddSocketToBaseItem_DEPRECATED value
* @property {number} k_EMsgGCAddSocketToItem_DEPRECATED=1017 k_EMsgGCAddSocketToItem_DEPRECATED value
* @property {number} k_EMsgGCAddSocketToItemResponse_DEPRECATED=1018 k_EMsgGCAddSocketToItemResponse_DEPRECATED value
* @property {number} k_EMsgGCNameBaseItem=1019 k_EMsgGCNameBaseItem value
* @property {number} k_EMsgGCNameBaseItemResponse=1020 k_EMsgGCNameBaseItemResponse value
* @property {number} k_EMsgGCRemoveSocketItem_DEPRECATED=1021 k_EMsgGCRemoveSocketItem_DEPRECATED value
* @property {number} k_EMsgGCRemoveSocketItemResponse_DEPRECATED=1022 k_EMsgGCRemoveSocketItemResponse_DEPRECATED value
* @property {number} k_EMsgGCCustomizeItemTexture=1023 k_EMsgGCCustomizeItemTexture value
* @property {number} k_EMsgGCCustomizeItemTextureResponse=1024 k_EMsgGCCustomizeItemTextureResponse value
* @property {number} k_EMsgGCUseItemRequest=1025 k_EMsgGCUseItemRequest value
* @property {number} k_EMsgGCUseItemResponse=1026 k_EMsgGCUseItemResponse value
* @property {number} k_EMsgGCGiftedItems_DEPRECATED=1027 k_EMsgGCGiftedItems_DEPRECATED value
* @property {number} k_EMsgGCRemoveItemName=1030 k_EMsgGCRemoveItemName value
* @property {number} k_EMsgGCRemoveItemPaint=1031 k_EMsgGCRemoveItemPaint value
* @property {number} k_EMsgGCGiftWrapItem=1032 k_EMsgGCGiftWrapItem value
* @property {number} k_EMsgGCGiftWrapItemResponse=1033 k_EMsgGCGiftWrapItemResponse value
* @property {number} k_EMsgGCDeliverGift=1034 k_EMsgGCDeliverGift value
* @property {number} k_EMsgGCDeliverGiftResponseGiver=1035 k_EMsgGCDeliverGiftResponseGiver value
* @property {number} k_EMsgGCDeliverGiftResponseReceiver=1036 k_EMsgGCDeliverGiftResponseReceiver value
* @property {number} k_EMsgGCUnwrapGiftRequest=1037 k_EMsgGCUnwrapGiftRequest value
* @property {number} k_EMsgGCUnwrapGiftResponse=1038 k_EMsgGCUnwrapGiftResponse value
* @property {number} k_EMsgGCSetItemStyle=1039 k_EMsgGCSetItemStyle value
* @property {number} k_EMsgGCUsedClaimCodeItem=1040 k_EMsgGCUsedClaimCodeItem value
* @property {number} k_EMsgGCSortItems=1041 k_EMsgGCSortItems value
* @property {number} k_EMsgGC_RevolvingLootList_DEPRECATED=1042 k_EMsgGC_RevolvingLootList_DEPRECATED value
* @property {number} k_EMsgGCLookupAccount=1043 k_EMsgGCLookupAccount value
* @property {number} k_EMsgGCLookupAccountResponse=1044 k_EMsgGCLookupAccountResponse value
* @property {number} k_EMsgGCLookupAccountName=1045 k_EMsgGCLookupAccountName value
* @property {number} k_EMsgGCLookupAccountNameResponse=1046 k_EMsgGCLookupAccountNameResponse value
* @property {number} k_EMsgGCUpdateItemSchema=1049 k_EMsgGCUpdateItemSchema value
* @property {number} k_EMsgGCRemoveCustomTexture=1051 k_EMsgGCRemoveCustomTexture value
* @property {number} k_EMsgGCRemoveCustomTextureResponse=1052 k_EMsgGCRemoveCustomTextureResponse value
* @property {number} k_EMsgGCRemoveMakersMark=1053 k_EMsgGCRemoveMakersMark value
* @property {number} k_EMsgGCRemoveMakersMarkResponse=1054 k_EMsgGCRemoveMakersMarkResponse value
* @property {number} k_EMsgGCRemoveUniqueCraftIndex=1055 k_EMsgGCRemoveUniqueCraftIndex value
* @property {number} k_EMsgGCRemoveUniqueCraftIndexResponse=1056 k_EMsgGCRemoveUniqueCraftIndexResponse value
* @property {number} k_EMsgGCSaxxyBroadcast=1057 k_EMsgGCSaxxyBroadcast value
* @property {number} k_EMsgGCBackpackSortFinished=1058 k_EMsgGCBackpackSortFinished value
* @property {number} k_EMsgGCCollectItem=1061 k_EMsgGCCollectItem value
* @property {number} k_EMsgGCItemAcknowledged__DEPRECATED=1062 k_EMsgGCItemAcknowledged__DEPRECATED value
* @property {number} k_EMsgGC_ReportAbuse=1065 k_EMsgGC_ReportAbuse value
* @property {number} k_EMsgGC_ReportAbuseResponse=1066 k_EMsgGC_ReportAbuseResponse value
* @property {number} k_EMsgGCNameItemNotification=1068 k_EMsgGCNameItemNotification value
* @property {number} k_EMsgGCApplyConsumableEffects=1069 k_EMsgGCApplyConsumableEffects value
* @property {number} k_EMsgGCConsumableExhausted=1070 k_EMsgGCConsumableExhausted value
* @property {number} k_EMsgGCShowItemsPickedUp=1071 k_EMsgGCShowItemsPickedUp value
* @property {number} k_EMsgGCClientDisplayNotification=1072 k_EMsgGCClientDisplayNotification value
* @property {number} k_EMsgGCApplyStrangePart=1073 k_EMsgGCApplyStrangePart value
* @property {number} k_EMsgGC_IncrementKillCountAttribute=1074 k_EMsgGC_IncrementKillCountAttribute value
* @property {number} k_EMsgGC_IncrementKillCountResponse=1075 k_EMsgGC_IncrementKillCountResponse value
* @property {number} k_EMsgGCApplyPennantUpgrade=1076 k_EMsgGCApplyPennantUpgrade value
* @property {number} k_EMsgGCSetItemPositions=1077 k_EMsgGCSetItemPositions value
* @property {number} k_EMsgGCApplyEggEssence=1078 k_EMsgGCApplyEggEssence value
* @property {number} k_EMsgGCNameEggEssenceResponse=1079 k_EMsgGCNameEggEssenceResponse value
* @property {number} k_EMsgGCPaintKitItem=1080 k_EMsgGCPaintKitItem value
* @property {number} k_EMsgGCPaintKitBaseItem=1081 k_EMsgGCPaintKitBaseItem value
* @property {number} k_EMsgGCPaintKitItemResponse=1082 k_EMsgGCPaintKitItemResponse value
* @property {number} k_EMsgGCGiftedItems=1083 k_EMsgGCGiftedItems value
* @property {number} k_EMsgGCUnlockItemStyle=1084 k_EMsgGCUnlockItemStyle value
* @property {number} k_EMsgGCUnlockItemStyleResponse=1085 k_EMsgGCUnlockItemStyleResponse value
* @property {number} k_EMsgGCApplySticker=1086 k_EMsgGCApplySticker value
* @property {number} k_EMsgGCItemAcknowledged=1087 k_EMsgGCItemAcknowledged value
* @property {number} k_EMsgGCStatTrakSwap=1088 k_EMsgGCStatTrakSwap value
* @property {number} k_EMsgGCUserTrackTimePlayedConsecutively=1089 k_EMsgGCUserTrackTimePlayedConsecutively value
* @property {number} k_EMsgGCItemCustomizationNotification=1090 k_EMsgGCItemCustomizationNotification value
* @property {number} k_EMsgGCModifyItemAttribute=1091 k_EMsgGCModifyItemAttribute value
* @property {number} k_EMsgGCCasketItemAdd=1092 k_EMsgGCCasketItemAdd value
* @property {number} k_EMsgGCCasketItemExtract=1093 k_EMsgGCCasketItemExtract value
* @property {number} k_EMsgGCCasketItemLoadContents=1094 k_EMsgGCCasketItemLoadContents value
* @property {number} k_EMsgGCTradingBase=1500 k_EMsgGCTradingBase value
* @property {number} k_EMsgGCTrading_InitiateTradeRequest=1501 k_EMsgGCTrading_InitiateTradeRequest value
* @property {number} k_EMsgGCTrading_InitiateTradeResponse=1502 k_EMsgGCTrading_InitiateTradeResponse value
* @property {number} k_EMsgGCTrading_StartSession=1503 k_EMsgGCTrading_StartSession value
* @property {number} k_EMsgGCTrading_SetItem=1504 k_EMsgGCTrading_SetItem value
* @property {number} k_EMsgGCTrading_RemoveItem=1505 k_EMsgGCTrading_RemoveItem value
* @property {number} k_EMsgGCTrading_UpdateTradeInfo=1506 k_EMsgGCTrading_UpdateTradeInfo value
* @property {number} k_EMsgGCTrading_SetReadiness=1507 k_EMsgGCTrading_SetReadiness value
* @property {number} k_EMsgGCTrading_ReadinessResponse=1508 k_EMsgGCTrading_ReadinessResponse value
* @property {number} k_EMsgGCTrading_SessionClosed=1509 k_EMsgGCTrading_SessionClosed value
* @property {number} k_EMsgGCTrading_CancelSession=1510 k_EMsgGCTrading_CancelSession value
* @property {number} k_EMsgGCTrading_TradeChatMsg=1511 k_EMsgGCTrading_TradeChatMsg value
* @property {number} k_EMsgGCTrading_ConfirmOffer=1512 k_EMsgGCTrading_ConfirmOffer value
* @property {number} k_EMsgGCTrading_TradeTypingChatMsg=1513 k_EMsgGCTrading_TradeTypingChatMsg value
* @property {number} k_EMsgGCServerBrowser_FavoriteServer=1601 k_EMsgGCServerBrowser_FavoriteServer value
* @property {number} k_EMsgGCServerBrowser_BlacklistServer=1602 k_EMsgGCServerBrowser_BlacklistServer value
* @property {number} k_EMsgGCServerRentalsBase=1700 k_EMsgGCServerRentalsBase value
* @property {number} k_EMsgGCItemPreviewCheckStatus=1701 k_EMsgGCItemPreviewCheckStatus value
* @property {number} k_EMsgGCItemPreviewStatusResponse=1702 k_EMsgGCItemPreviewStatusResponse value
* @property {number} k_EMsgGCItemPreviewRequest=1703 k_EMsgGCItemPreviewRequest value
* @property {number} k_EMsgGCItemPreviewRequestResponse=1704 k_EMsgGCItemPreviewRequestResponse value
* @property {number} k_EMsgGCItemPreviewExpire=1705 k_EMsgGCItemPreviewExpire value
* @property {number} k_EMsgGCItemPreviewExpireNotification=1706 k_EMsgGCItemPreviewExpireNotification value
* @property {number} k_EMsgGCItemPreviewItemBoughtNotification=1707 k_EMsgGCItemPreviewItemBoughtNotification value
* @property {number} k_EMsgGCDev_NewItemRequest=2001 k_EMsgGCDev_NewItemRequest value
* @property {number} k_EMsgGCDev_NewItemRequestResponse=2002 k_EMsgGCDev_NewItemRequestResponse value
* @property {number} k_EMsgGCDev_PaintKitDropItem=2003 k_EMsgGCDev_PaintKitDropItem value
* @property {number} k_EMsgGCDev_SchemaReservationRequest=2004 k_EMsgGCDev_SchemaReservationRequest value
* @property {number} k_EMsgGCStoreGetUserData=2500 k_EMsgGCStoreGetUserData value
* @property {number} k_EMsgGCStoreGetUserDataResponse=2501 k_EMsgGCStoreGetUserDataResponse value
* @property {number} k_EMsgGCStorePurchaseInit_DEPRECATED=2502 k_EMsgGCStorePurchaseInit_DEPRECATED value
* @property {number} k_EMsgGCStorePurchaseInitResponse_DEPRECATED=2503 k_EMsgGCStorePurchaseInitResponse_DEPRECATED value
* @property {number} k_EMsgGCStorePurchaseFinalize=2504 k_EMsgGCStorePurchaseFinalize value
* @property {number} k_EMsgGCStorePurchaseFinalizeResponse=2505 k_EMsgGCStorePurchaseFinalizeResponse value
* @property {number} k_EMsgGCStorePurchaseCancel=2506 k_EMsgGCStorePurchaseCancel value
* @property {number} k_EMsgGCStorePurchaseCancelResponse=2507 k_EMsgGCStorePurchaseCancelResponse value
* @property {number} k_EMsgGCStorePurchaseQueryTxn=2508 k_EMsgGCStorePurchaseQueryTxn value
* @property {number} k_EMsgGCStorePurchaseQueryTxnResponse=2509 k_EMsgGCStorePurchaseQueryTxnResponse value
* @property {number} k_EMsgGCStorePurchaseInit=2510 k_EMsgGCStorePurchaseInit value
* @property {number} k_EMsgGCStorePurchaseInitResponse=2511 k_EMsgGCStorePurchaseInitResponse value
* @property {number} k_EMsgGCBannedWordListRequest=2512 k_EMsgGCBannedWordListRequest value
* @property {number} k_EMsgGCBannedWordListResponse=2513 k_EMsgGCBannedWordListResponse value
* @property {number} k_EMsgGCToGCBannedWordListBroadcast=2514 k_EMsgGCToGCBannedWordListBroadcast value
* @property {number} k_EMsgGCToGCBannedWordListUpdated=2515 k_EMsgGCToGCBannedWordListUpdated value
* @property {number} k_EMsgGCToGCDirtySDOCache=2516 k_EMsgGCToGCDirtySDOCache value
* @property {number} k_EMsgGCToGCDirtyMultipleSDOCache=2517 k_EMsgGCToGCDirtyMultipleSDOCache value
* @property {number} k_EMsgGCToGCUpdateSQLKeyValue=2518 k_EMsgGCToGCUpdateSQLKeyValue value
* @property {number} k_EMsgGCToGCIsTrustedServer=2519 k_EMsgGCToGCIsTrustedServer value
* @property {number} k_EMsgGCToGCIsTrustedServerResponse=2520 k_EMsgGCToGCIsTrustedServerResponse value
* @property {number} k_EMsgGCToGCBroadcastConsoleCommand=2521 k_EMsgGCToGCBroadcastConsoleCommand value
* @property {number} k_EMsgGCServerVersionUpdated=2522 k_EMsgGCServerVersionUpdated value
* @property {number} k_EMsgGCToGCWebAPIAccountChanged=2524 k_EMsgGCToGCWebAPIAccountChanged value
* @property {number} k_EMsgGCRequestAnnouncements=2525 k_EMsgGCRequestAnnouncements value
* @property {number} k_EMsgGCRequestAnnouncementsResponse=2526 k_EMsgGCRequestAnnouncementsResponse value
* @property {number} k_EMsgGCRequestPassportItemGrant=2527 k_EMsgGCRequestPassportItemGrant value
* @property {number} k_EMsgGCClientVersionUpdated=2528 k_EMsgGCClientVersionUpdated value
* @property {number} k_EMsgGCRecurringSubscriptionStatus=2530 k_EMsgGCRecurringSubscriptionStatus value
* @property {number} k_EMsgGCAdjustEquipSlotsManual=2531 k_EMsgGCAdjustEquipSlotsManual value
* @property {number} k_EMsgGCAdjustEquipSlotsShuffle=2532 k_EMsgGCAdjustEquipSlotsShuffle value
* @property {number} k_EMsgGCOpenCrate=2534 k_EMsgGCOpenCrate value
* @property {number} k_EMsgGCAcknowledgeRentalExpiration=2535 k_EMsgGCAcknowledgeRentalExpiration value
* @property {number} k_EMsgGCVolatileItemLoadContents=2536 k_EMsgGCVolatileItemLoadContents value
*/
$root.EGCItemMsg = (function() {
var valuesById = {}, values = Object.create(valuesById);
values[valuesById[1000] = "k_EMsgGCBase"] = 1000;
values[valuesById[1001] = "k_EMsgGCSetItemPosition"] = 1001;
values[valuesById[1002] = "k_EMsgGCCraft"] = 1002;
values[valuesById[1003] = "k_EMsgGCCraftResponse"] = 1003;
values[valuesById[1004] = "k_EMsgGCDelete"] = 1004;
values[valuesById[1005] = "k_EMsgGCVerifyCacheSubscription"] = 1005;
values[valuesById[1006] = "k_EMsgGCNameItem"] = 1006;
values[valuesById[1007] = "k_EMsgGCUnlockCrate_DEPRECATED"] = 1007;
values[valuesById[1008] = "k_EMsgGCUnlockCrateResponse"] = 1008;
values[valuesById[1009] = "k_EMsgGCPaintItem"] = 1009;
values[valuesById[1010] = "k_EMsgGCPaintItemResponse"] = 1010;
values[valuesById[1011] = "k_EMsgGCGoldenWrenchBroadcast"] = 1011;
values[valuesById[1012] = "k_EMsgGCMOTDRequest"] = 1012;
values[valuesById[1013] = "k_EMsgGCMOTDRequestResponse"] = 1013;
values[valuesById[1014] = "k_EMsgGCAddItemToSocket_DEPRECATED"] = 1014;
values[valuesById[1015] = "k_EMsgGCAddItemToSocketResponse_DEPRECATED"] = 1015;
values[valuesById[1016] = "k_EMsgGCAddSocketToBaseItem_DEPRECATED"] = 1016;
values[valuesById[1017] = "k_EMsgGCAddSocketToItem_DEPRECATED"] = 1017;
values[valuesById[1018] = "k_EMsgGCAddSocketToItemResponse_DEPRECATED"] = 1018;
values[valuesById[1019] = "k_EMsgGCNameBaseItem"] = 1019;
values[valuesById[1020] = "k_EMsgGCNameBaseItemResponse"] = 1020;
values[valuesById[1021] = "k_EMsgGCRemoveSocketItem_DEPRECATED"] = 1021;
values[valuesById[1022] = "k_EMsgGCRemoveSocketItemResponse_DEPRECATED"] = 1022;
values[valuesById[1023] = "k_EMsgGCCustomizeItemTexture"] = 1023;
values[valuesById[1024] = "k_EMsgGCCustomizeItemTextureResponse"] = 1024;
values[valuesById[1025] = "k_EMsgGCUseItemRequest"] = 1025;
values[valuesById[1026] = "k_EMsgGCUseItemResponse"] = 1026;
values[valuesById[1027] = "k_EMsgGCGiftedItems_DEPRECATED"] = 1027;
values[valuesById[1030] = "k_EMsgGCRemoveItemName"] = 1030;
values[valuesById[1031] = "k_EMsgGCRemoveItemPaint"] = 1031;
values[valuesById[1032] = "k_EMsgGCGiftWrapItem"] = 1032;
values[valuesById[1033] = "k_EMsgGCGiftWrapItemResponse"] = 1033;
values[valuesById[1034] = "k_EMsgGCDeliverGift"] = 1034;
values[valuesById[1035] = "k_EMsgGCDeliverGiftResponseGiver"] = 1035;
values[valuesById[1036] = "k_EMsgGCDeliverGiftResponseReceiver"] = 1036;
values[valuesById[1037] = "k_EMsgGCUnwrapGiftRequest"] = 1037;
values[valuesById[1038] = "k_EMsgGCUnwrapGiftResponse"] = 1038;
values[valuesById[1039] = "k_EMsgGCSetItemStyle"] = 1039;
values[valuesById[1040] = "k_EMsgGCUsedClaimCodeItem"] = 1040;
values[valuesById[1041] = "k_EMsgGCSortItems"] = 1041;
values[valuesById[1042] = "k_EMsgGC_RevolvingLootList_DEPRECATED"] = 1042;
values[valuesById[1043] = "k_EMsgGCLookupAccount"] = 1043;
values[valuesById[1044] = "k_EMsgGCLookupAccountResponse"] = 1044;
values[valuesById[1045] = "k_EMsgGCLookupAccountName"] = 1045;
values[valuesById[1046] = "k_EMsgGCLookupAccountNameResponse"] = 1046;
values[valuesById[1049] = "k_EMsgGCUpdateItemSchema"] = 1049;
values[valuesById[1051] = "k_EMsgGCRemoveCustomTexture"] = 1051;
values[valuesById[1052] = "k_EMsgGCRemoveCustomTextureResponse"] = 1052;
values[valuesById[1053] = "k_EMsgGCRemoveMakersMark"] = 1053;
values[valuesById[1054] = "k_EMsgGCRemoveMakersMarkResponse"] = 1054;
values[valuesById[1055] = "k_EMsgGCRemoveUniqueCraftIndex"] = 1055;
values[valuesById[1056] = "k_EMsgGCRemoveUniqueCraftIndexResponse"] = 1056;
values[valuesById[1057] = "k_EMsgGCSaxxyBroadcast"] = 1057;
values[valuesById[1058] = "k_EMsgGCBackpackSortFinished"] = 1058;
values[valuesById[1061] = "k_EMsgGCCollectItem"] = 1061;
values[valuesById[1062] = "k_EMsgGCItemAcknowledged__DEPRECATED"] = 1062;
values[valuesById[1065] = "k_EMsgGC_ReportAbuse"] = 1065;
values[valuesById[1066] = "k_EMsgGC_ReportAbuseResponse"] = 1066;
values[valuesById[1068] = "k_EMsgGCNameItemNotification"] = 1068;
values[valuesById[1069] = "k_EMsgGCApplyConsumableEffects"] = 1069;
values[valuesById[1070] = "k_EMsgGCConsumableExhausted"] = 1070;
values[valuesById[1071] = "k_EMsgGCShowItemsPickedUp"] = 1071;
values[valuesById[1072] = "k_EMsgGCClientDisplayNotification"] = 1072;
values[valuesById[1073] = "k_EMsgGCApplyStrangePart"] = 1073;
values[valuesById[1074] = "k_EMsgGC_IncrementKillCountAttribute"] = 1074;
values[valuesById[1075] = "k_EMsgGC_IncrementKillCountResponse"] = 1075;
values[valuesById[1076] = "k_EMsgGCApplyPennantUpgrade"] = 1076;
values[valuesById[1077] = "k_EMsgGCSetItemPositions"] = 1077;
values[valuesById[1078] = "k_EMsgGCApplyEggEssence"] = 1078;
values[valuesById[1079] = "k_EMsgGCNameEggEssenceResponse"] = 1079;
values[valuesById[1080] = "k_EMsgGCPaintKitItem"] = 1080;
values[valuesById[1081] = "k_EMsgGCPaintKitBaseItem"] = 1081;
values[valuesById[1082] = "k_EMsgGCPaintKitItemResponse"] = 1082;
values[valuesById[1083] = "k_EMsgGCGiftedItems"] = 1083;
values[valuesById[1084] = "k_EMsgGCUnlockItemStyle"] = 1084;
values[valuesById[1085] = "k_EMsgGCUnlockItemStyleResponse"] = 1085;
values[valuesById[1086] = "k_EMsgGCApplySticker"] = 1086;
values[valuesById[1087] = "k_EMsgGCItemAcknowledged"] = 1087;
values[valuesById[1088] = "k_EMsgGCStatTrakSwap"] = 1088;
values[valuesById[1089] = "k_EMsgGCUserTrackTimePlayedConsecutively"] = 1089;
values[valuesById[1090] = "k_EMsgGCItemCustomizationNotification"] = 1090;
values[valuesById[1091] = "k_EMsgGCModifyItemAttribute"] = 1091;
values[valuesById[1092] = "k_EMsgGCCasketItemAdd"] = 1092;
values[valuesById[1093] = "k_EMsgGCCasketItemExtract"] = 1093;
values[valuesById[1094] = "k_EMsgGCCasketItemLoadContents"] = 1094;
values[valuesById[1500] = "k_EMsgGCTradingBase"] = 1500;
values[valuesById[1501] = "k_EMsgGCTrading_InitiateTradeRequest"] = 1501;
values[valuesById[1502] = "k_EMsgGCTrading_InitiateTradeResponse"] = 1502;
values[valuesById[1503] = "k_EMsgGCTrading_StartSession"] = 1503;
values[valuesById[1504] = "k_EMsgGCTrading_SetItem"] = 1504;
values[valuesById[1505] = "k_EMsgGCTrading_RemoveItem"] = 1505;
values[valuesById[1506] = "k_EMsgGCTrading_UpdateTradeInfo"] = 1506;
values[valuesById[1507] = "k_EMsgGCTrading_SetReadiness"] = 1507;
values[valuesById[1508] = "k_EMsgGCTrading_ReadinessResponse"] = 1508;
values[valuesById[1509] = "k_EMsgGCTrading_SessionClosed"] = 1509;
values[valuesById[1510] = "k_EMsgGCTrading_CancelSession"] = 1510;
values[valuesById[1511] = "k_EMsgGCTrading_TradeChatMsg"] = 1511;
values[valuesById[1512] = "k_EMsgGCTrading_ConfirmOffer"] = 1512;
values[valuesById[1513] = "k_EMsgGCTrading_TradeTypingChatMsg"] = 1513;
values[valuesById[1601] = "k_EMsgGCServerBrowser_FavoriteServer"] = 1601;
values[valuesById[1602] = "k_EMsgGCServerBrowser_BlacklistServer"] = 1602;
values[valuesById[1700] = "k_EMsgGCServerRentalsBase"] = 1700;
values[valuesById[1701] = "k_EMsgGCItemPreviewCheckStatus"] = 1701;
values[valuesById[1702] = "k_EMsgGCItemPreviewStatusResponse"] = 1702;
values[valuesById[1703] = "k_EMsgGCItemPreviewRequest"] = 1703;
values[valuesById[1704] = "k_EMsgGCItemPreviewRequestResponse"] = 1704;
values[valuesById[1705] = "k_EMsgGCItemPreviewExpire"] = 1705;
values[valuesById[1706] = "k_EMsgGCItemPreviewExpireNotification"] = 1706;
values[valuesById[1707] = "k_EMsgGCItemPreviewItemBoughtNotification"] = 1707;
values[valuesById[2001] = "k_EMsgGCDev_NewItemRequest"] = 2001;
values[valuesById[2002] = "k_EMsgGCDev_NewItemRequestResponse"] = 2002;
values[valuesById[2003] = "k_EMsgGCDev_PaintKitDropItem"] = 2003;
values[valuesById[2004] = "k_EMsgGCDev_SchemaReservationRequest"] = 2004;
values[valuesById[2500] = "k_EMsgGCStoreGetUserData"] = 2500;
values[valuesById[2501] = "k_EMsgGCStoreGetUserDataResponse"] = 2501;
values[valuesById[2502] = "k_EMsgGCStorePurchaseInit_DEPRECATED"] = 2502;
values[valuesById[2503] = "k_EMsgGCStorePurchaseInitResponse_DEPRECATED"] = 2503;
values[valuesById[2504] = "k_EMsgGCStorePurchaseFinalize"] = 2504;
values[valuesById[2505] = "k_EMsgGCStorePurchaseFinalizeResponse"] = 2505;
values[valuesById[2506] = "k_EMsgGCStorePurchaseCancel"] = 2506;
values[valuesById[2507] = "k_EMsgGCStorePurchaseCancelResponse"] = 2507;
values[valuesById[2508] = "k_EMsgGCStorePurchaseQueryTxn"] = 2508;
values[valuesById[2509] = "k_EMsgGCStorePurchaseQueryTxnResponse"] = 2509;
values[valuesById[2510] = "k_EMsgGCStorePurchaseInit"] = 2510;
values[valuesById[2511] = "k_EMsgGCStorePurchaseInitResponse"] = 2511;
values[valuesById[2512] = "k_EMsgGCBannedWordListRequest"] = 2512;
values[valuesById[2513] = "k_EMsgGCBannedWordListResponse"] = 2513;
values[valuesById[2514] = "k_EMsgGCToGCBannedWordListBroadcast"] = 2514;
values[valuesById[2515] = "k_EMsgGCToGCBannedWordListUpdated"] = 2515;
values[valuesById[2516] = "k_EMsgGCToGCDirtySDOCache"] = 2516;
values[valuesById[2517] = "k_EMsgGCToGCDirtyMultipleSDOCache"] = 2517;
values[valuesById[2518] = "k_EMsgGCToGCUpdateSQLKeyValue"] = 2518;
values[valuesById[2519] = "k_EMsgGCToGCIsTrustedServer"] = 2519;
values[valuesById[2520] = "k_EMsgGCToGCIsTrustedServerResponse"] = 2520;
values[valuesById[2521] = "k_EMsgGCToGCBroadcastConsoleCommand"] = 2521;
values[valuesById[2522] = "k_EMsgGCServerVersionUpdated"] = 2522;
values[valuesById[2524] = "k_EMsgGCToGCWebAPIAccountChanged"] = 2524;
values[valuesById[2525] = "k_EMsgGCRequestAnnouncements"] = 2525;
values[valuesById[2526] = "k_EMsgGCRequestAnnouncementsResponse"] = 2526;
values[valuesById[2527] = "k_EMsgGCRequestPassportItemGrant"] = 2527;
values[valuesById[2528] = "k_EMsgGCClientVersionUpdated"] = 2528;
values[valuesById[2530] = "k_EMsgGCRecurringSubscriptionStatus"] = 2530;
values[valuesById[2531] = "k_EMsgGCAdjustEquipSlotsManual"] = 2531;
values[valuesById[2532] = "k_EMsgGCAdjustEquipSlotsShuffle"] = 2532;
values[valuesById[2534] = "k_EMsgGCOpenCrate"] = 2534;
values[valuesById[2535] = "k_EMsgGCAcknowledgeRentalExpiration"] = 2535;
values[valuesById[2536] = "k_EMsgGCVolatileItemLoadContents"] = 2536;
return values;
})();
/**
* EGCMsgResponse enum.
* @exports EGCMsgResponse
* @enum {number}
* @property {number} k_EGCMsgResponseOK=0 k_EGCMsgResponseOK value
* @property {number} k_EGCMsgResponseDenied=1 k_EGCMsgResponseDenied value
* @property {number} k_EGCMsgResponseServerError=2 k_EGCMsgResponseServerError value
* @property {number} k_EGCMsgResponseTimeout=3 k_EGCMsgResponseTimeout value
* @property {number} k_EGCMsgResponseInvalid=4 k_EGCMsgResponseInvalid value
* @property {number} k_EGCMsgResponseNoMatch=5 k_EGCMsgResponseNoMatch value
* @property {number} k_EGCMsgResponseUnknownError=6 k_EGCMsgResponseUnknownError value
* @property {number} k_EGCMsgResponseNotLoggedOn=7 k_EGCMsgResponseNotLoggedOn value
* @property {number} k_EGCMsgFailedToCreate=8 k_EGCMsgFailedToCreate value
* @property {number} k_EGCMsgLimitExceeded=9 k_EGCMsgLimitExceeded value
* @property {number} k_EGCMsgCommitUnfinalized=10 k_EGCMsgCommitUnfinalized value
*/
$root.EGCMsgResponse = (function() {
var valuesById = {}, values = Object.create(valuesById);
values[valuesById[0] = "k_EGCMsgResponseOK"] = 0;
values[valuesById[1] = "k_EGCMsgResponseDenied"] = 1;
values[valuesById[2] = "k_EGCMsgResponseServerError"] = 2;
values[valuesById[3] = "k_EGCMsgResponseTimeout"] = 3;
values[valuesById[4] = "k_EGCMsgResponseInvalid"] = 4;
values[valuesById[5] = "k_EGCMsgResponseNoMatch"] = 5;
values[valuesById[6] = "k_EGCMsgResponseUnknownError"] = 6;
values[valuesById[7] = "k_EGCMsgResponseNotLoggedOn"] = 7;
values[valuesById[8] = "k_EGCMsgFailedToCreate"] = 8;
values[valuesById[9] = "k_EGCMsgLimitExceeded"] = 9;
values[valuesById[10] = "k_EGCMsgCommitUnfinalized"] = 10;
return values;
})();
/**
* EUnlockStyle enum.
* @exports EUnlockStyle
* @enum {number}
* @property {number} k_UnlockStyle_Succeeded=0 k_UnlockStyle_Succeeded value
* @property {number} k_UnlockStyle_Failed_PreReq=1 k_UnlockStyle_Failed_PreReq value
* @property {number} k_UnlockStyle_Failed_CantAfford=2 k_UnlockStyle_Failed_CantAfford value
* @property {number} k_UnlockStyle_Failed_CantCommit=3 k_UnlockStyle_Failed_CantCommit value
* @property {number} k_UnlockStyle_Failed_CantLockCache=4 k_UnlockStyle_Failed_CantLockCache value
* @property {number} k_UnlockStyle_Failed_CantAffordAttrib=5 k_UnlockStyle_Failed_CantAffordAttrib value
*/
$root.EUnlockStyle = (function() {
var valuesById = {}, values = Object.create(valuesById);
values[valuesById[0] = "k_UnlockStyle_Succeeded"] = 0;
values[valuesById[1] = "k_UnlockStyle_Failed_PreReq"] = 1;
values[valuesById[2] = "k_UnlockStyle_Failed_CantAfford"] = 2;
values[valuesById[3] = "k_UnlockStyle_Failed_CantCommit"] = 3;
values[valuesById[4] = "k_UnlockStyle_Failed_CantLockCache"] = 4;
values[valuesById[5] = "k_UnlockStyle_Failed_CantAffordAttrib"] = 5;
return values;
})();
/**
* EGCItemCustomizationNotification enum.
* @exports EGCItemCustomizationNotification
* @enum {number}
* @property {number} k_EGCItemCustomizationNotification_NameItem=1006 k_EGCItemCustomizationNotification_NameItem value
* @property {number} k_EGCItemCustomizationNotification_UnlockCrate=1007 k_EGCItemCustomizationNotification_UnlockCrate value
* @property {number} k_EGCItemCustomizationNotification_XRayItemReveal=1008 k_EGCItemCustomizationNotification_XRayItemReveal value
* @property {number} k_EGCItemCustomizationNotification_XRayItemClaim=1009 k_EGCItemCustomizationNotification_XRayItemClaim value
* @property {number} k_EGCItemCustomizationNotification_CasketTooFull=1011 k_EGCItemCustomizationNotification_CasketTooFull value
* @property {number} k_EGCItemCustomizationNotification_CasketContents=1012 k_EGCItemCustomizationNotification_CasketContents value
* @property {number} k_EGCItemCustomizationNotification_CasketAdded=1013 k_EGCItemCustomizationNotification_CasketAdded value
* @property {number} k_EGCItemCustomizationNotification_CasketRemoved=1014 k_EGCItemCustomizationNotification_CasketRemoved value
* @property {number} k_EGCItemCustomizationNotification_CasketInvFull=1015 k_EGCItemCustomizationNotification_CasketInvFull value
* @property {number} k_EGCItemCustomizationNotification_NameBaseItem=1019 k_EGCItemCustomizationNotification_NameBaseItem value
* @property {number} k_EGCItemCustomizationNotification_RemoveItemName=1030 k_EGCItemCustomizationNotification_RemoveItemName value
* @property {number} k_EGCItemCustomizationNotification_RemoveSticker=1053 k_EGCItemCustomizationNotification_RemoveSticker value
* @property {number} k_EGCItemCustomizationNotification_ApplySticker=1086 k_EGCItemCustomizationNotification_ApplySticker value
* @property {number} k_EGCItemCustomizationNotification_StatTrakSwap=1088 k_EGCItemCustomizationNotification_StatTrakSwap value
* @property {number} k_EGCItemCustomizationNotification_RemovePatch=1089 k_EGCItemCustomizationNotification_RemovePatch value
* @property {number} k_EGCItemCustomizationNotification_ApplyPatch=1090 k_EGCItemCustomizationNotification_ApplyPatch value
* @property {number} k_EGCItemCustomizationNotification_ApplyKeychain=1091 k_EGCItemCustomizationNotification_ApplyKeychain value
* @property {number} k_EGCItemCustomizationNotification_RemoveKeychain=1092 k_EGCItemCustomizationNotification_RemoveKeychain value
* @property {number} k_EGCItemCustomizationNotification_ActivateFanToken=9178 k_EGCItemCustomizationNotification_ActivateFanToken value
* @property {number} k_EGCItemCustomizationNotification_ActivateOperationCoin=9179 k_EGCItemCustomizationNotification_ActivateOperationCoin value
* @property {number} k_EGCItemCustomizationNotification_GraffitiUnseal=9185 k_EGCItemCustomizationNotification_GraffitiUnseal value
* @property {number} k_EGCItemCustomizationNotification_GenerateSouvenir=9204 k_EGCItemCustomizationNotification_GenerateSouvenir value
* @property {number} k_EGCItemCustomizationNotification_ClientRedeemMissionReward=9209 k_EGCItemCustomizationNotification_ClientRedeemMissionReward value
* @property {number} k_EGCItemCustomizationNotification_ClientRedeemFreeReward=9219 k_EGCItemCustomizationNotification_ClientRedeemFreeReward value
* @property {number} k_EGCItemCustomizationNotification_XpShopUseTicket=9221 k_EGCItemCustomizationNotification_XpShopUseTicket value
* @property {number} k_EGCItemCustomizationNotification_XpShopAckTracks=9222 k_EGCItemCustomizationNotification_XpShopAckTracks value
*/
$root.EGCItemCustomizationNotification = (function() {
var valuesById = {}, values = Object.create(valuesById);
values[valuesById[1006] = "k_EGCItemCustomizationNotification_NameItem"] = 1006;
values[valuesById[1007] = "k_EGCItemCustomizationNotification_UnlockCrate"] = 1007;
values[valuesById[1008] = "k_EGCItemCustomizationNotification_XRayItemReveal"] = 1008;
values[valuesById[1009] = "k_EGCItemCustomizationNotification_XRayItemClaim"] = 1009;
values[valuesById[1011] = "k_EGCItemCustomizationNotification_CasketTooFull"] = 1011;
values[valuesById[1012] = "k_EGCItemCustomizationNotification_CasketContents"] = 1012;
values[valuesById[1013] = "k_EGCItemCustomizationNotification_CasketAdded"] = 1013;
values[valuesById[1014] = "k_EGCItemCustomizationNotification_CasketRemoved"] = 1014;
values[valuesById[1015] = "k_EGCItemCustomizationNotification_CasketInvFull"] = 1015;
values[valuesById[1019] = "k_EGCItemCustomizationNotification_NameBaseItem"] = 1019;
values[valuesById[1030] = "k_EGCItemCustomizationNotification_RemoveItemName"] = 1030;
values[valuesById[1053] = "k_EGCItemCustomizationNotification_RemoveSticker"] = 1053;
values[valuesById[1086] = "k_EGCItemCustomizationNotification_ApplySticker"] = 1086;
values[valuesById[1088] = "k_EGCItemCustomizationNotification_StatTrakSwap"] = 1088;
values[valuesById[1089] = "k_EGCItemCustomizationNotification_RemovePatch"] = 1089;
values[valuesById[1090] = "k_EGCItemCustomizationNotification_ApplyPatch"] = 1090;
values[valuesById[1091] = "k_EGCItemCustomizationNotification_ApplyKeychain"] = 1091;
values[valuesById[1092] = "k_EGCItemCustomizationNotification_RemoveKeychain"] = 1092;
values[valuesById[9178] = "k_EGCItemCustomizationNotification_ActivateFanToken"] = 9178;
values[valuesById[9179] = "k_EGCItemCustomizationNotification_ActivateOperationCoin"] = 9179;
values[valuesById[9185] = "k_EGCItemCustomizationNotification_GraffitiUnseal"] = 9185;
values[valuesById[9204] = "k_EGCItemCustomizationNotification_GenerateSouvenir"] = 9204;
values[valuesById[9209] = "k_EGCItemCustomizationNotification_ClientRedeemMissionReward"] = 9209;
values[valuesById[9219] = "k_EGCItemCustomizationNotification_ClientRedeemFreeReward"] = 9219;
values[valuesById[9221] = "k_EGCItemCustomizationNotification_XpShopUseTicket"] = 9221;
values[valuesById[9222] = "k_EGCItemCustomizationNotification_XpShopAckTracks"] = 9222;
return values;
})();
$root.CMsgGCGiftedItems = (function() {
/**
* Properties of a CMsgGCGiftedItems.
* @exports ICMsgGCGiftedItems
* @interface ICMsgGCGiftedItems
* @property {number|null} [accountid] CMsgGCGiftedItems accountid
* @property {number|null} [giftdefindex] CMsgGCGiftedItems giftdefindex
* @property {number|null} [max_gifts_possible] CMsgGCGiftedItems max_gifts_possible
* @property {number|null} [num_eligible_recipients] CMsgGCGiftedItems num_eligible_recipients
* @property {Array.<number>|null} [recipients_accountids] CMsgGCGiftedItems recipients_accountids
*/
/**
* Constructs a new CMsgGCGiftedItems.
* @exports CMsgGCGiftedItems
* @classdesc Represents a CMsgGCGiftedItems.
* @implements ICMsgGCGiftedItems
* @constructor
* @param {ICMsgGCGiftedItems=} [properties] Properties to set
*/
function CMsgGCGiftedItems(properties) {
this.recipients_accountids = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCGiftedItems accountid.
* @member {number} accountid
* @memberof CMsgGCGiftedItems
* @instance
*/
CMsgGCGiftedItems.prototype.accountid = 0;
/**
* CMsgGCGiftedItems giftdefindex.
* @member {number} giftdefindex
* @memberof CMsgGCGiftedItems
* @instance
*/
CMsgGCGiftedItems.prototype.giftdefindex = 0;
/**
* CMsgGCGiftedItems max_gifts_possible.
* @member {number} max_gifts_possible
* @memberof CMsgGCGiftedItems
* @instance
*/
CMsgGCGiftedItems.prototype.max_gifts_possible = 0;
/**
* CMsgGCGiftedItems num_eligible_recipients.
* @member {number} num_eligible_recipients
* @memberof CMsgGCGiftedItems
* @instance
*/
CMsgGCGiftedItems.prototype.num_eligible_recipients = 0;
/**
* CMsgGCGiftedItems recipients_accountids.
* @member {Array.<number>} recipients_accountids
* @memberof CMsgGCGiftedItems
* @instance
*/
CMsgGCGiftedItems.prototype.recipients_accountids = $util.emptyArray;
/**
* Creates a new CMsgGCGiftedItems instance using the specified properties.
* @function create
* @memberof CMsgGCGiftedItems
* @static
* @param {ICMsgGCGiftedItems=} [properties] Properties to set
* @returns {CMsgGCGiftedItems} CMsgGCGiftedItems instance
*/
CMsgGCGiftedItems.create = function create(properties) {
return new CMsgGCGiftedItems(properties);
};
/**
* Encodes the specified CMsgGCGiftedItems message. Does not implicitly {@link CMsgGCGiftedItems.verify|verify} messages.
* @function encode
* @memberof CMsgGCGiftedItems
* @static
* @param {ICMsgGCGiftedItems} message CMsgGCGiftedItems message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CMsgGCGiftedItems.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.accountid != null && Object.hasOwnProperty.call(message, "accountid"))
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.accountid);
if (message.giftdefindex != null && Object.hasOwnProperty.call(message, "giftdefindex"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.giftdefindex);
if (message.max_gifts_possible != null && Object.hasOwnProperty.call(message, "max_gifts_possible"))
writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.max_gifts_possible);
if (message.num_eligible_recipients != null && Object.hasOwnProperty.call(message, "num_eligible_recipients"))
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.num_eligible_recipients);
if (message.recipients_accountids != null && message.recipients_accountids.length)
for (var i = 0; i < message.recipients_accountids.length; ++i)
writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.recipients_accountids[i]);
return writer;
};
/**
* Encodes the specified CMsgGCGiftedItems message, length delimited. Does not implicitly {@link CMsgGCGiftedItems.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCGiftedItems
* @static
* @param {ICMsgGCGiftedItems} message CMsgGCGiftedItems message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CMsgGCGiftedItems.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a CMsgGCGiftedItems message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCGiftedItems
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCGiftedItems} CMsgGCGiftedItems
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CMsgGCGiftedItems.decode = function decode(reader, length, error) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGiftedItems();
while (reader.pos < end) {
var tag = reader.uint32();
if (tag === error)
break;
switch (tag >>> 3) {
case 1: {
message.accountid = reader.uint32();
break;
}
case 2: {
message.giftdefindex = reader.uint32();
break;
}
case 3: {
message.max_gifts_possible = reader.uint32();
break;
}
case 4: {
message.num_eligible_recipients = reader.uint32();
break;
}
case 5: {
if (!(message.recipients_accountids && message.recipients_accountids.length))
message.recipients_accountids = [];
if ((tag & 7) === 2) {
var end2 = reader.uint32() + reader.pos;
while (reader.pos < end2)
message.recipients_accountids.push(reader.uint32());
} else
message.recipients_accountids.push(reader.uint32());
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCGiftedItems message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCGiftedItems
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCGiftedItems} CMsgGCGiftedItems
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CMsgGCGiftedItems.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCGiftedItems message.
* @function verify
* @memberof CMsgGCGiftedItems
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCGiftedItems.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.accountid != null && message.hasOwnProperty("accountid"))
if (!$util.isInteger(message.accountid))
return "accountid: integer expected";
if (message.giftdefindex != null && message.hasOwnProperty("giftdefindex"))
if (!$util.isInteger(message.giftdefindex))
return "giftdefindex: integer expected";
if (message.max_gifts_possible != null && message.hasOwnProperty("max_gifts_possible"))
if (!$util.isInteger(message.max_gifts_possible))
return "max_gifts_possible: integer expected";
if (message.num_eligible_recipients != null && message.hasOwnProperty("num_eligible_recipients"))
if (!$util.isInteger(message.num_eligible_recipients))
return "num_eligible_recipients: integer expected";
if (message.recipients_accountids != null && message.hasOwnProperty("recipients_accountids")) {
if (!Array.isArray(message.recipients_accountids))
return "recipients_accountids: array expected";
for (var i = 0; i < message.recipients_accountids.length; ++i)
if (!$util.isInteger(message.recipients_accountids[i]))
return "recipients_accountids: integer[] expected";
}
return null;
};
/**
* Creates a CMsgGCGiftedItems message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCGiftedItems
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCGiftedItems} CMsgGCGiftedItems
*/
CMsgGCGiftedItems.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCGiftedItems)
return object;
var message = new $root.CMsgGCGiftedItems();
if (object.accountid != null)
message.accountid = object.accountid >>> 0;
if (object.giftdefindex != null)
message.giftdefindex = object.giftdefindex >>> 0;
if (object.max_gifts_possible != null)
message.max_gifts_possible = object.max_gifts_possible >>> 0;
if (object.num_eligible_recipients != null)
message.num_eligible_recipients = object.num_eligible_recipients >>> 0;
if (object.recipients_accountids) {
if (!Array.isArray(object.recipients_accountids))
throw TypeError(".CMsgGCGiftedItems.recipients_accountids: array expected");
message.recipients_accountids = [];
for (var i = 0; i < object.recipients_accountids.length; ++i)
message.recipients_accountids[i] = object.recipients_accountids[i] >>> 0;
}
return message;
};
/**
* Creates a plain object from a CMsgGCGiftedItems message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCGiftedItems
* @static
* @param {CMsgGCGiftedItems} message CMsgGCGiftedItems
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCGiftedItems.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.recipients_accountids = [];
if (options.defaults) {
object.accountid = 0;
object.giftdefindex = 0;
object.max_gifts_possible = 0;
object.num_eligible_recipients = 0;
}
if (message.accountid != null && message.hasOwnProperty("accountid"))
object.accountid = message.accountid;
if (message.giftdefindex != null && message.hasOwnProperty("giftdefindex"))
object.giftdefindex = message.giftdefindex;
if (message.max_gifts_possible != null && message.hasOwnProperty("max_gifts_possible"))
object.max_gifts_possible = message.max_gifts_possible;
if (message.num_eligible_recipients != null && message.hasOwnProperty("num_eligible_recipients"))
object.num_eligible_recipients = message.num_eligible_recipients;
if (message.recipients_accountids && message.recipients_accountids.length) {
object.recipients_accountids = [];
for (var j = 0; j < message.recipients_accountids.length; ++j)
object.recipients_accountids[j] = message.recipients_accountids[j];
}
return object;
};
/**
* Converts this CMsgGCGiftedItems to JSON.
* @function toJSON
* @memberof CMsgGCGiftedItems
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCGiftedItems.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCGiftedItems
* @function getTypeUrl
* @memberof CMsgGCGiftedItems
* @