diff --git a/config.lua.dist b/config.lua.dist index 71b326b72..ffa2233b9 100644 --- a/config.lua.dist +++ b/config.lua.dist @@ -224,9 +224,6 @@ tibiadromeConcoctionTickType = "online" -- "online" | "experience" onlyPremiumAccount = false -- Customs --- NOTE: weatherRain = true, activates weather raining effects --- NOTE: thunderEffect = true, activates thunder effects --- NOTE: allConsoleLog = true, show all message logs -- NOTE: stashMoving = true, stow an container inside your stash -- NOTE: depotChest, the non-stackable items will be moved to the selected depot chest(I - XVIII). -- NOTE: autoBank = true, the dropped coins from monsters will be automatically deposited to your bank account. @@ -239,9 +236,8 @@ onlyPremiumAccount = false -- NOTE: teleportPlayerToVocationRoom will enable oressa to teleport player to his/her room vocation -- NOTE: toggleReceiveReward = true, will enable players to choose one of reward exercise weapon by command !reward -- NOTE: randomMonsterSpawn = true, will enable monsters from the same spawn to be randomized between them, thus making a variable hunt -weatherRain = false -thunderEffect = false -allConsoleLog = false +-- NOTE: enablePlayerPutItemInAmmoSlot = true, will enable players to put any items on ammo slot, more used in custom shopping system +-- NOTE: startStreakLevel will make a reward streak level for new players who never logged in stashMoving = false depotChest = 4 autoLoot = false @@ -257,6 +253,8 @@ toggleReceiveReward = false randomMonsterSpawn = false lootPouchMaxLimit = 2000 storeInboxMaxLimit = 2000 +enablePlayerPutItemInAmmoSlot = false +startStreakLevel = 0 -- Teleport summon -- Set to true will never remove the summon @@ -281,9 +279,11 @@ maxAllowedOnADummy = 1 -- Save interval per time -- NOTE: toggleSaveInterval: true = enable the save interval, false = disable the save interval +-- NOTE: toggleSaveAsync = true, will enable save async (experimental), not recommended for use in production -- NOTE: saveIntervalType: "minute", "second" or "hour" -- NOTE: toggleSaveIntervalCleanMap: true = enable the clean map, false = disable the clean map -- NOTE: saveIntervalTime: time based on what was set in "saveIntervalType" +toggleSaveAsync = false toggleSaveInterval = true saveIntervalType = "minute" toggleSaveIntervalCleanMap = true @@ -419,11 +419,15 @@ multiplierSpeedOnFist = 5 maxSpeedOnFist = 500 disableLegacyRaids = false disableMonsterArmor = false -combatChainDelay = 50 minElementalResistance = -200 maxElementalResistance = 200 maxDamageReflection = 200 +-- Chain system +toggleChainSystem = true +combatChainDelay = 50 +combatChainTargets = 5 + -- Global server Save -- NOTE: globalServerSaveNotifyDuration in minutes globalServerSaveNotifyMessage = true diff --git a/schema.sql b/schema.sql index 756339fd9..58e6ea216 100644 --- a/schema.sql +++ b/schema.sql @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `server_config` ( CONSTRAINT `server_config_pk` PRIMARY KEY (`config`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -INSERT INTO `server_config` (`config`, `value`) VALUES ('db_version', '43'), ('motd_hash', ''), ('motd_num', '0'), ('players_record', '0'); +INSERT INTO `server_config` (`config`, `value`) VALUES ('db_version', '44'), ('motd_hash', ''), ('motd_num', '0'), ('players_record', '0'); -- Table structure `accounts` CREATE TABLE IF NOT EXISTS `accounts` ( @@ -312,9 +312,12 @@ CREATE TABLE IF NOT EXISTS `guild_wars` ( `guild2` int(11) NOT NULL DEFAULT '0', `name1` varchar(255) NOT NULL, `name2` varchar(255) NOT NULL, - `status` tinyint(2) NOT NULL DEFAULT '0', + `status` tinyint(2) UNSIGNED NOT NULL DEFAULT '0', `started` bigint(15) NOT NULL DEFAULT '0', `ended` bigint(15) NOT NULL DEFAULT '0', + `frags_limit` smallint(4) UNSIGNED NOT NULL DEFAULT '0', + `payment` bigint(13) UNSIGNED NOT NULL DEFAULT '0', + `duration_days` tinyint(3) UNSIGNED NOT NULL DEFAULT '0', INDEX `guild1` (`guild1`), INDEX `guild2` (`guild2`), CONSTRAINT `guild_wars_pk` PRIMARY KEY (`id`) @@ -640,12 +643,6 @@ CREATE TABLE IF NOT EXISTS `player_kills` ( `unavenged` tinyint(1) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- Table structure `player_misc` -CREATE TABLE IF NOT EXISTS `player_misc` ( - `player_id` int(11) NOT NULL, - `info` blob NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -- Table structure `player_namelocks` CREATE TABLE IF NOT EXISTS `player_namelocks` ( `player_id` int(11) NOT NULL, diff --git a/src/account/account.cpp b/src/account/account.cpp index 700ec44a6..2e5f58dd8 100644 --- a/src/account/account.cpp +++ b/src/account/account.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/account/account.hpp b/src/account/account.hpp index 6ce50e1e0..d968ba8dd 100644 --- a/src/account/account.hpp +++ b/src/account/account.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/account/account_info.hpp b/src/account/account_info.hpp index 1488c7e26..698c3b96c 100644 --- a/src/account/account_info.hpp +++ b/src/account/account_info.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/account/account_repository.cpp b/src/account/account_repository.cpp index b7ff20e93..babca8470 100644 --- a/src/account/account_repository.cpp +++ b/src/account/account_repository.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/account/account_repository.hpp b/src/account/account_repository.hpp index 8625e8b58..0d4dcc7ab 100644 --- a/src/account/account_repository.hpp +++ b/src/account/account_repository.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/account/account_repository_db.cpp b/src/account/account_repository_db.cpp index 7e39c2e8e..b150a636a 100644 --- a/src/account/account_repository_db.cpp +++ b/src/account/account_repository_db.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -20,9 +20,7 @@ #include "account/account_info.hpp" AccountRepositoryDB::AccountRepositoryDB() : - coinTypeToColumn({ { enumToValue(CoinType::Normal), "coins" }, - { enumToValue(CoinType::Tournament), "tournament_coins" }, - { enumToValue(CoinType::Transferable), "coins_transferable" } }) { } + coinTypeToColumn({ { enumToValue(CoinType::Normal), "coins" }, { enumToValue(CoinType::Tournament), "tournament_coins" }, { enumToValue(CoinType::Transferable), "coins_transferable" } }) { } bool AccountRepositoryDB::loadByID(const uint32_t &id, AccountInfo &acc) { auto query = fmt::format("SELECT `id`, `type`, `premdays`, `lastday`, `creation`, `premdays_purchased`, 0 AS `expires` FROM `accounts` WHERE `id` = {}", id); diff --git a/src/account/account_repository_db.hpp b/src/account/account_repository_db.hpp index 6de39506b..651600e3b 100644 --- a/src/account/account_repository_db.hpp +++ b/src/account/account_repository_db.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/canary_server.cpp b/src/canary_server.cpp index fc4036315..2a38d0e14 100644 --- a/src/canary_server.cpp +++ b/src/canary_server.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -342,8 +342,17 @@ void CanaryServer::loadModules() { } auto coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__); - // Load items dependencies + // Load appearances.dat first modulesLoadHelper((g_game().loadAppearanceProtobuf(coreFolder + "/items/appearances.dat") == ERROR_NONE), "appearances.dat"); + + // Load XML folder dependencies (order matters) + modulesLoadHelper(g_vocations().loadFromXml(), "XML/vocations.xml"); + modulesLoadHelper(g_eventsScheduler().loadScheduleEventFromXml(), "XML/events.xml"); + modulesLoadHelper(Outfits::getInstance().loadFromXml(), "XML/outfits.xml"); + modulesLoadHelper(Familiars::getInstance().loadFromXml(), "XML/familiars.xml"); + modulesLoadHelper(g_imbuements().loadFromXml(), "XML/imbuements.xml"); + modulesLoadHelper(g_storages().loadFromXML(), "XML/storages.xml"); + modulesLoadHelper(Item::items.loadFromXml(), "items.xml"); const auto datapackFolder = g_configManager().getString(DATA_DIRECTORY, __FUNCTION__); @@ -352,17 +361,10 @@ void CanaryServer::loadModules() { modulesLoadHelper((g_luaEnvironment().loadFile(coreFolder + "/core.lua", "core.lua") == 0), "core.lua"); modulesLoadHelper(g_scripts().loadScripts(coreFolder + "/scripts/lib", true, false), coreFolder + "/scripts/libs"); modulesLoadHelper(g_scripts().loadScripts(coreFolder + "/scripts", false, false), coreFolder + "/scripts"); + modulesLoadHelper((g_npcs().load(true, false)), "npclib"); - // Second XML scripts - modulesLoadHelper(g_vocations().loadFromXml(), "XML/vocations.xml"); - modulesLoadHelper(g_eventsScheduler().loadScheduleEventFromXml(), "XML/events.xml"); - modulesLoadHelper(Outfits::getInstance().loadFromXml(), "XML/outfits.xml"); - modulesLoadHelper(Familiars::getInstance().loadFromXml(), "XML/familiars.xml"); - modulesLoadHelper(g_imbuements().loadFromXml(), "XML/imbuements.xml"); - modulesLoadHelper(g_storages().loadFromXML(), "XML/storages.xml"); - modulesLoadHelper(g_modules().loadFromXml(), "modules/modules.xml"); modulesLoadHelper(g_events().loadFromXml(), "events/events.xml"); - modulesLoadHelper((g_npcs().load(true, false)), "npclib"); + modulesLoadHelper(g_modules().loadFromXml(), "modules/modules.xml"); logger.debug("Loading datapack scripts on folder: {}/", datapackName); // Load scripts diff --git a/src/canary_server.hpp b/src/canary_server.hpp index d9374309c..bb22232b8 100644 --- a/src/canary_server.hpp +++ b/src/canary_server.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/config/config_enums.hpp b/src/config/config_enums.hpp index 7432f955f..ee8b531dd 100644 --- a/src/config/config_enums.hpp +++ b/src/config/config_enums.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -17,7 +17,6 @@ enum ConfigKey_t : uint16_t { ALLOW_BLOCK_SPAWN, ALLOW_CHANGEOUTFIT, ALLOW_RELOAD, - ALL_CONSOLE_LOG, AUTH_TYPE, AUTOBANK, AUTOLOOT, @@ -28,15 +27,16 @@ enum ConfigKey_t : uint16_t { BOOSTED_BOSS_KILL_BONUS, BOOSTED_BOSS_LOOT_BONUS, BOOSTED_BOSS_SLOT, - BOSSTIARY_KILL_MULTIPLIER, BOSS_DEFAULT_TIME_TO_DEFEAT, BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, + BOSSTIARY_KILL_MULTIPLIER, BUY_AOL_COMMAND_FEE, BUY_BLESS_COMMAND_FEE, CHECK_EXPIRED_MARKET_OFFERS_EACH_MINUTES, CLASSIC_ATTACK_SPEED, CLEAN_PROTECTION_ZONES, COMBAT_CHAIN_DELAY, + COMBAT_CHAIN_TARGETS, COMPRESSION_LEVEL, CONVERT_UNSAFE_SCRIPTS, CORE_DIRECTORY, @@ -47,31 +47,31 @@ enum ConfigKey_t : uint16_t { DEFAULT_DESPAWNRADIUS, DEFAULT_DESPAWNRANGE, DEFAULT_PRIORITY, - DEPOTCHEST, DEPOT_BOXES, + DEPOTCHEST, DISABLE_LEGACY_RAIDS, DISABLE_MONSTER_ARMOR, DISCORD_SEND_FOOTER, DISCORD_WEBHOOK_DELAY_MS, DISCORD_WEBHOOK_URL, EMOTE_SPELLS, - EXPERIENCE_FROM_PLAYERS, - EXP_FROM_PLAYERS_LEVEL_RANGE, + ENABLE_PLAYER_PUT_ITEM_IN_AMMO_SLOT, EX_ACTIONS_DELAY_INTERVAL, + EXP_FROM_PLAYERS_LEVEL_RANGE, + EXPERIENCE_FROM_PLAYERS, FAMILIAR_TIME, FORCE_MONSTERTYPE_LOAD, FORGE_AMOUNT_MULTIPLIER, FORGE_BASE_SUCCESS_RATE, FORGE_BONUS_SUCCESS_RATE, - FORGE_FUSION_DUST_COST, FORGE_CONVERGENCE_FUSION_DUST_COST, - FORGE_TRANSFER_DUST_COST, FORGE_CONVERGENCE_TRANSFER_DUST_COST, FORGE_CORE_COST, FORGE_COST_ONE_SLIVER, FORGE_FIENDISH_CREATURES_LIMIT, FORGE_FIENDISH_INTERVAL_TIME, FORGE_FIENDISH_INTERVAL_TYPE, + FORGE_FUSION_DUST_COST, FORGE_INFLUENCED_CREATURES_LIMIT, FORGE_MAX_DUST, FORGE_MAX_ITEM_TIER, @@ -79,6 +79,7 @@ enum ConfigKey_t : uint16_t { FORGE_MIN_SLIVERS, FORGE_SLIVER_AMOUNT, FORGE_TIER_LOSS_REDUCTION, + FORGE_TRANSFER_DUST_COST, FRAG_TIME, FREE_DEPOT_LIMIT, FREE_PREMIUM, @@ -117,12 +118,14 @@ enum ConfigKey_t : uint16_t { LOCATION, LOGIN_PORT, LOGLEVEL, + LOOTPOUCH_MAXLIMIT, LOW_LEVEL_BONUS_EXP, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, LOYALTY_ENABLED, LOYALTY_POINTS_PER_CREATION_DAY, LOYALTY_POINTS_PER_PREMIUM_DAY_PURCHASED, LOYALTY_POINTS_PER_PREMIUM_DAY_SPENT, + M_CONST, MAINTAIN_MODE_MESSAGE, MAP_AUTHOR, MAP_CUSTOM_AUTHOR, @@ -132,16 +135,16 @@ enum ConfigKey_t : uint16_t { MARKET_OFFER_DURATION, MARKET_PREMIUM, MAX_ALLOWED_ON_A_DUMMY, - MAX_CONTAINER, MAX_CONTAINER_ITEM, + MAX_CONTAINER, MAX_DAMAGE_REFLECTION, MAX_ELEMENTAL_RESISTANCE, MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, MAX_MESSAGEBUFFER, MAX_PACKETS_PER_SECOND, - MAX_PLAYERS, MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, MAX_PLAYERS_PER_ACCOUNT, + MAX_PLAYERS, MAX_SPEED_ATTACKONFIST, METRICS_ENABLE_OSTREAM, METRICS_ENABLE_PROMETHEUS, @@ -159,7 +162,6 @@ enum ConfigKey_t : uint16_t { MYSQL_PASS, MYSQL_SOCK, MYSQL_USER, - M_CONST, OLD_PROTOCOL, ONE_PLAYER_ON_ACCOUNT, ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, @@ -174,8 +176,8 @@ enum ConfigKey_t : uint16_t { PARALLELISM, PARTY_AUTO_SHARE_EXPERIENCE, PARTY_LIST_MAX_DISTANCE, - PARTY_SHARE_LOOT_BOOSTS, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, + PARTY_SHARE_LOOT_BOOSTS, PREMIUM_DEPOT_LIMIT, PREY_BONUS_REROLL_PRICE, PREY_BONUS_TIME, @@ -199,13 +201,13 @@ enum ConfigKey_t : uint16_t { RATE_BOSS_HEALTH, RATE_EXERCISE_TRAINING_SPEED, RATE_EXPERIENCE, - RATE_HEALTH_REGEN, RATE_HEALTH_REGEN_SPEED, + RATE_HEALTH_REGEN, RATE_KILLING_IN_THE_NAME_OF_POINTS, RATE_LOOT, RATE_MAGIC, - RATE_MANA_REGEN, RATE_MANA_REGEN_SPEED, + RATE_MANA_REGEN, RATE_MONSTER_ATTACK, RATE_MONSTER_DEFENSE, RATE_MONSTER_HEALTH, @@ -214,8 +216,8 @@ enum ConfigKey_t : uint16_t { RATE_NPC_HEALTH, RATE_OFFLINE_TRAINING_SPEED, RATE_SKILL, - RATE_SOUL_REGEN, RATE_SOUL_REGEN_SPEED, + RATE_SOUL_REGEN, RATE_SPAWN, RATE_SPELL_COOLDOWN, RATE_USE_STAGES, @@ -244,18 +246,21 @@ enum ConfigKey_t : uint16_t { STAIRHOP_DELAY, STAMINA_GREEN_DELAY, STAMINA_ORANGE_DELAY, - STAMINA_PZ, STAMINA_PZ_GAIN, + STAMINA_PZ, STAMINA_SYSTEM, - STAMINA_TRAINER, STAMINA_TRAINER_DELAY, STAMINA_TRAINER_GAIN, + STAMINA_TRAINER, + START_STREAK_LEVEL, STASH_ITEMS, STASH_MOVING, - STATUSQUERY_TIMEOUT, STATUS_PORT, + STATUSQUERY_TIMEOUT, STORE_COIN_PACKET, STORE_IMAGES_URL, + STOREINBOX_MAXLIMIT, + T_CONST, TASK_HUNTING_BONUS_REROLL_PRICE, TASK_HUNTING_ENABLED, TASK_HUNTING_FREE_REROLL_TIME, @@ -269,6 +274,7 @@ enum ConfigKey_t : uint16_t { TIBIADROME_CONCOCTION_DURATION, TIBIADROME_CONCOCTION_TICK_TYPE, TOGGLE_ATTACK_SPEED_ONFIST, + TOGGLE_CHAIN_SYSTEM, TOGGLE_DOWNLOAD_MAP, TOGGLE_FREE_QUEST, TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, @@ -281,8 +287,9 @@ enum ConfigKey_t : uint16_t { TOGGLE_MAP_CUSTOM, TOGGLE_MOUNT_IN_PZ, TOGGLE_RECEIVE_REWARD, - TOGGLE_SAVE_INTERVAL, + TOGGLE_SAVE_ASYNC, TOGGLE_SAVE_INTERVAL_CLEAN_MAP, + TOGGLE_SAVE_INTERVAL, TOGGLE_SERVER_IS_RETRO, TOGGLE_TRAVELS_FREE, TOGGLE_WHEELSYSTEM, @@ -290,7 +297,6 @@ enum ConfigKey_t : uint16_t { TRANSCENDANCE_CHANCE_FORMULA_A, TRANSCENDANCE_CHANCE_FORMULA_B, TRANSCENDANCE_CHANCE_FORMULA_C, - T_CONST, URL, USE_ANY_DATAPACK_FOLDER, VIP_AUTOLOOT_VIP_ONLY, @@ -302,8 +308,6 @@ enum ConfigKey_t : uint16_t { VIP_STAY_ONLINE, VIP_SYSTEM_ENABLED, WARN_UNSAFE_SCRIPTS, - WEATHER_RAIN, - WEATHER_THUNDER, WEEK_KILLS_TO_RED, WHEEL_ATELIER_REVEAL_GREATER_COST, WHEEL_ATELIER_REVEAL_LESSER_COST, @@ -315,6 +319,4 @@ enum ConfigKey_t : uint16_t { WHITE_SKULL_TIME, WORLD_TYPE, XP_DISPLAY_MODE, - STOREINBOX_MAXLIMIT, - LOOTPOUCH_MAXLIMIT, }; diff --git a/src/config/configmanager.cpp b/src/config/configmanager.cpp index 7842d7b4d..7069ca10f 100644 --- a/src/config/configmanager.cpp +++ b/src/config/configmanager.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -46,364 +46,319 @@ bool ConfigManager::load() { // Info that must be loaded one time (unless we reset the modules involved) if (!loaded) { loadBoolConfig(L, BIND_ONLY_GLOBAL_ADDRESS, "bindOnlyGlobalAddress", false); + loadBoolConfig(L, DISABLE_LEGACY_RAIDS, "disableLegacyRaids", false); + loadBoolConfig(L, OLD_PROTOCOL, "allowOldProtocol", true); loadBoolConfig(L, OPTIMIZE_DATABASE, "startupDatabaseOptimization", true); - loadBoolConfig(L, TOGGLE_MAP_CUSTOM, "toggleMapCustom", true); - loadBoolConfig(L, TOGGLE_MAINTAIN_MODE, "toggleMaintainMode", false); loadBoolConfig(L, RANDOM_MONSTER_SPAWN, "randomMonsterSpawn", false); - loadStringConfig(L, MAINTAIN_MODE_MESSAGE, "maintainModeMessage", ""); - - loadStringConfig(L, IP, "ip", "127.0.0.1"); - loadStringConfig(L, MAP_NAME, "mapName", "canary"); - loadStringConfig(L, MAP_DOWNLOAD_URL, "mapDownloadUrl", ""); - loadStringConfig(L, MAP_AUTHOR, "mapAuthor", "Eduardo Dantas"); - - loadStringConfig(L, MAP_CUSTOM_NAME, "mapCustomName", ""); - loadStringConfig(L, MAP_CUSTOM_AUTHOR, "mapCustomAuthor", "OTServBR"); + loadBoolConfig(L, RESET_SESSIONS_ON_STARTUP, "resetSessionsOnStartup", false); + loadBoolConfig(L, TOGGLE_MAINTAIN_MODE, "toggleMaintainMode", false); + loadBoolConfig(L, TOGGLE_MAP_CUSTOM, "toggleMapCustom", true); - loadStringConfig(L, HOUSE_RENT_PERIOD, "houseRentPeriod", "never"); loadFloatConfig(L, HOUSE_PRICE_RENT_MULTIPLIER, "housePriceRentMultiplier", 1.0); loadFloatConfig(L, HOUSE_RENT_RATE, "houseRentRate", 1.0); - loadStringConfig(L, MYSQL_HOST, "mysqlHost", "127.0.0.1"); - loadStringConfig(L, MYSQL_USER, "mysqlUser", "root"); - loadStringConfig(L, MYSQL_PASS, "mysqlPass", ""); - loadStringConfig(L, MYSQL_DB, "mysqlDatabase", "canary"); - loadStringConfig(L, MYSQL_SOCK, "mysqlSock", ""); - loadStringConfig(L, AUTH_TYPE, "authType", "password"); - loadBoolConfig(L, RESET_SESSIONS_ON_STARTUP, "resetSessionsOnStartup", false); - - loadIntConfig(L, SQL_PORT, "mysqlPort", 3306); + loadIntConfig(L, DEPOT_BOXES, "depotBoxes", 20); + loadIntConfig(L, FREE_DEPOT_LIMIT, "freeDepotLimit", 2000); loadIntConfig(L, GAME_PORT, "gameProtocolPort", 7172); loadIntConfig(L, LOGIN_PORT, "loginProtocolPort", 7171); - loadIntConfig(L, STATUS_PORT, "statusProtocolPort", 7171); - loadIntConfig(L, MARKET_OFFER_DURATION, "marketOfferDuration", 30 * 24 * 60 * 60); - - loadIntConfig(L, FREE_DEPOT_LIMIT, "freeDepotLimit", 2000); loadIntConfig(L, PREMIUM_DEPOT_LIMIT, "premiumDepotLimit", 8000); - loadIntConfig(L, DEPOT_BOXES, "depotBoxes", 20); + loadIntConfig(L, SQL_PORT, "mysqlPort", 3306); loadIntConfig(L, STASH_ITEMS, "stashItemCount", 5000); + loadIntConfig(L, STATUS_PORT, "statusProtocolPort", 7171); - loadBoolConfig(L, OLD_PROTOCOL, "allowOldProtocol", true); - loadBoolConfig(L, DISABLE_LEGACY_RAIDS, "disableLegacyRaids", false); + loadStringConfig(L, AUTH_TYPE, "authType", "password"); + loadStringConfig(L, HOUSE_RENT_PERIOD, "houseRentPeriod", "never"); + loadStringConfig(L, IP, "ip", "127.0.0.1"); + loadStringConfig(L, MAINTAIN_MODE_MESSAGE, "maintainModeMessage", ""); + loadStringConfig(L, MAP_AUTHOR, "mapAuthor", "Eduardo Dantas"); + loadStringConfig(L, MAP_CUSTOM_AUTHOR, "mapCustomAuthor", "OTServBR"); + loadStringConfig(L, MAP_CUSTOM_NAME, "mapCustomName", ""); + loadStringConfig(L, MAP_DOWNLOAD_URL, "mapDownloadUrl", ""); + loadStringConfig(L, MAP_NAME, "mapName", "canary"); + loadStringConfig(L, MYSQL_DB, "mysqlDatabase", "canary"); + loadStringConfig(L, MYSQL_HOST, "mysqlHost", "127.0.0.1"); + loadStringConfig(L, MYSQL_PASS, "mysqlPass", ""); + loadStringConfig(L, MYSQL_SOCK, "mysqlSock", ""); + loadStringConfig(L, MYSQL_USER, "mysqlUser", "root"); } - loadBoolConfig(L, ALLOW_CHANGEOUTFIT, "allowChangeOutfit", true); - loadIntConfig(L, MAX_PLAYERS_PER_ACCOUNT, "maxPlayersOnlinePerAccount", 1); - loadIntConfig(L, MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, "maxPlayersOutsidePZPerAccount", 1); loadBoolConfig(L, AIMBOT_HOTKEY_ENABLED, "hotkeyAimbotEnabled", true); - loadBoolConfig(L, REMOVE_RUNE_CHARGES, "removeChargesFromRunes", true); - loadBoolConfig(L, EXPERIENCE_FROM_PLAYERS, "experienceByKillingPlayers", false); - loadBoolConfig(L, FREE_PREMIUM, "freePremium", false); - loadBoolConfig(L, REPLACE_KICK_ON_LOGIN, "replaceKickOnLogin", true); - loadBoolConfig(L, MARKET_PREMIUM, "premiumToCreateMarketOffer", true); - loadBoolConfig(L, EMOTE_SPELLS, "emoteSpells", false); - loadBoolConfig(L, STAMINA_SYSTEM, "staminaSystem", true); - loadBoolConfig(L, WARN_UNSAFE_SCRIPTS, "warnUnsafeScripts", true); - loadBoolConfig(L, CONVERT_UNSAFE_SCRIPTS, "convertUnsafeScripts", true); + loadBoolConfig(L, ALLOW_BLOCK_SPAWN, "allowBlockSpawn", true); + loadBoolConfig(L, ALLOW_CHANGEOUTFIT, "allowChangeOutfit", true); + loadBoolConfig(L, ALLOW_RELOAD, "allowReload", false); + loadBoolConfig(L, AUTOBANK, "autoBank", false); + loadBoolConfig(L, AUTOLOOT, "autoLoot", false); + loadBoolConfig(L, BOOSTED_BOSS_SLOT, "boostedBossSlot", true); loadBoolConfig(L, CLASSIC_ATTACK_SPEED, "classicAttackSpeed", false); - loadBoolConfig(L, TOGGLE_ATTACK_SPEED_ONFIST, "toggleAttackSpeedOnFist", false); + loadBoolConfig(L, CLEAN_PROTECTION_ZONES, "cleanProtectionZones", false); + loadBoolConfig(L, CONVERT_UNSAFE_SCRIPTS, "convertUnsafeScripts", true); loadBoolConfig(L, DISABLE_MONSTER_ARMOR, "disableMonsterArmor", false); - loadIntConfig(L, MULTIPLIER_ATTACKONFIST, "multiplierSpeedOnFist", 5); - loadIntConfig(L, MAX_SPEED_ATTACKONFIST, "maxSpeedOnFist", 500); - loadBoolConfig(L, SCRIPTS_CONSOLE_LOGS, "showScriptsLogInConsole", true); - loadBoolConfig(L, STASH_MOVING, "stashMoving", false); - loadBoolConfig(L, ALLOW_BLOCK_SPAWN, "allowBlockSpawn", true); - loadBoolConfig(L, REMOVE_WEAPON_AMMO, "removeWeaponAmmunition", true); - loadBoolConfig(L, REMOVE_WEAPON_CHARGES, "removeWeaponCharges", true); - loadBoolConfig(L, REMOVE_BEGINNING_WEAPON_AMMO, "removeBeginningWeaponAmmunition", true); - loadBoolConfig(L, REFUND_BEGINNING_WEAPON_MANA, "refundBeginningWeaponMana", false); - loadBoolConfig(L, REMOVE_POTION_CHARGES, "removeChargesFromPotions", true); - loadBoolConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_MESSAGE, "globalServerSaveNotifyMessage", true); + loadBoolConfig(L, DISCORD_SEND_FOOTER, "discordSendFooter", true); + loadBoolConfig(L, EMOTE_SPELLS, "emoteSpells", false); + loadBoolConfig(L, ENABLE_PLAYER_PUT_ITEM_IN_AMMO_SLOT, "enablePlayerPutItemInAmmoSlot", false); + loadBoolConfig(L, EXPERIENCE_FROM_PLAYERS, "experienceByKillingPlayers", false); + loadBoolConfig(L, FORCE_MONSTERTYPE_LOAD, "forceMonsterTypesOnLoad", true); + loadBoolConfig(L, FREE_PREMIUM, "freePremium", false); loadBoolConfig(L, GLOBAL_SERVER_SAVE_CLEAN_MAP, "globalServerSaveCleanMap", false); loadBoolConfig(L, GLOBAL_SERVER_SAVE_CLOSE, "globalServerSaveClose", false); - loadBoolConfig(L, FORCE_MONSTERTYPE_LOAD, "forceMonsterTypesOnLoad", true); - loadBoolConfig(L, HOUSE_OWNED_BY_ACCOUNT, "houseOwnedByAccount", false); - loadBoolConfig(L, CLEAN_PROTECTION_ZONES, "cleanProtectionZones", false); + loadBoolConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_MESSAGE, "globalServerSaveNotifyMessage", true); loadBoolConfig(L, GLOBAL_SERVER_SAVE_SHUTDOWN, "globalServerSaveShutdown", true); + loadBoolConfig(L, HOUSE_OWNED_BY_ACCOUNT, "houseOwnedByAccount", false); + loadBoolConfig(L, HOUSE_PURSHASED_SHOW_PRICE, "housePurchasedShowPrice", false); + loadBoolConfig(L, INVENTORY_GLOW, "inventoryGlowOnFiveBless", false); + loadBoolConfig(L, LOYALTY_ENABLED, "loyaltyEnabled", true); + loadBoolConfig(L, MARKET_PREMIUM, "premiumToCreateMarketOffer", true); + loadBoolConfig(L, METRICS_ENABLE_OSTREAM, "metricsEnableOstream", false); + loadBoolConfig(L, METRICS_ENABLE_PROMETHEUS, "metricsEnablePrometheus", false); + loadBoolConfig(L, ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, "onlyInvitedCanMoveHouseItems", true); + loadBoolConfig(L, ONLY_PREMIUM_ACCOUNT, "onlyPremiumAccount", false); + loadBoolConfig(L, PARTY_AUTO_SHARE_EXPERIENCE, "partyAutoShareExperience", true); + loadBoolConfig(L, PARTY_SHARE_LOOT_BOOSTS, "partyShareLootBoosts", true); + loadBoolConfig(L, PREY_ENABLED, "preySystemEnabled", true); + loadBoolConfig(L, PREY_FREE_THIRD_SLOT, "preyFreeThirdSlot", false); loadBoolConfig(L, PUSH_WHEN_ATTACKING, "pushWhenAttacking", false); - loadIntConfig(L, MIN_DELAY_BETWEEN_CONDITIONS, "minDelayBetweenConditions", 0); - - loadBoolConfig(L, WEATHER_RAIN, "weatherRain", false); - loadBoolConfig(L, WEATHER_THUNDER, "thunderEffect", false); - loadBoolConfig(L, ALL_CONSOLE_LOG, "allConsoleLog", false); - loadBoolConfig(L, TOGGLE_FREE_QUEST, "toggleFreeQuest", true); - loadBoolConfig(L, AUTOLOOT, "autoLoot", false); - loadBoolConfig(L, AUTOBANK, "autoBank", false); - loadBoolConfig(L, STAMINA_TRAINER, "staminaTrainer", false); - loadBoolConfig(L, STAMINA_PZ, "staminaPz", false); + loadBoolConfig(L, RATE_USE_STAGES, "rateUseStages", false); + loadBoolConfig(L, REFUND_BEGINNING_WEAPON_MANA, "refundBeginningWeaponMana", false); + loadBoolConfig(L, REMOVE_BEGINNING_WEAPON_AMMO, "removeBeginningWeaponAmmunition", true); + loadBoolConfig(L, REMOVE_POTION_CHARGES, "removeChargesFromPotions", true); + loadBoolConfig(L, REMOVE_RUNE_CHARGES, "removeChargesFromRunes", true); + loadBoolConfig(L, REMOVE_WEAPON_AMMO, "removeWeaponAmmunition", true); + loadBoolConfig(L, REMOVE_WEAPON_CHARGES, "removeWeaponCharges", true); + loadBoolConfig(L, REPLACE_KICK_ON_LOGIN, "replaceKickOnLogin", true); + loadBoolConfig(L, REWARD_CHEST_COLLECT_ENABLED, "rewardChestCollectEnabled", true); + loadBoolConfig(L, SCRIPTS_CONSOLE_LOGS, "showScriptsLogInConsole", true); + loadBoolConfig(L, SKULLED_DEATH_LOSE_STORE_ITEM, "skulledDeathLoseStoreItem", false); loadBoolConfig(L, SORT_LOOT_BY_CHANCE, "sortLootByChance", false); - loadBoolConfig(L, TOGGLE_SAVE_INTERVAL, "toggleSaveInterval", false); - loadBoolConfig(L, TOGGLE_SAVE_INTERVAL_CLEAN_MAP, "toggleSaveIntervalCleanMap", false); + loadBoolConfig(L, STAMINA_PZ, "staminaPz", false); + loadBoolConfig(L, STAMINA_SYSTEM, "staminaSystem", true); + loadBoolConfig(L, STAMINA_TRAINER, "staminaTrainer", false); + loadBoolConfig(L, STASH_MOVING, "stashMoving", false); + loadBoolConfig(L, TASK_HUNTING_ENABLED, "taskHuntingSystemEnabled", true); + loadBoolConfig(L, TASK_HUNTING_FREE_THIRD_SLOT, "taskHuntingFreeThirdSlot", false); + loadBoolConfig(L, TELEPORT_PLAYER_TO_VOCATION_ROOM, "teleportPlayerToVocationRoom", true); loadBoolConfig(L, TELEPORT_SUMMONS, "teleportSummons", false); - loadBoolConfig(L, ALLOW_RELOAD, "allowReload", false); - - loadBoolConfig(L, ONLY_PREMIUM_ACCOUNT, "onlyPremiumAccount", false); - loadBoolConfig(L, RATE_USE_STAGES, "rateUseStages", false); - loadBoolConfig(L, TOGGLE_IMBUEMENT_SHRINE_STORAGE, "toggleImbuementShrineStorage", true); - loadBoolConfig(L, TOGGLE_IMBUEMENT_NON_AGGRESSIVE_FIGHT_ONLY, "toggleImbuementNonAggressiveFightOnly", false); - + loadBoolConfig(L, TOGGLE_ATTACK_SPEED_ONFIST, "toggleAttackSpeedOnFist", false); + loadBoolConfig(L, TOGGLE_CHAIN_SYSTEM, "toggleChainSystem", true); loadBoolConfig(L, TOGGLE_DOWNLOAD_MAP, "toggleDownloadMap", false); + loadBoolConfig(L, TOGGLE_FREE_QUEST, "toggleFreeQuest", true); + loadBoolConfig(L, TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, "toggleGoldPouchAllowAnything", false); + loadBoolConfig(L, TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY, "toggleGoldPouchQuickLootOnly", false); + loadBoolConfig(L, TOGGLE_HAZARDSYSTEM, "toogleHazardSystem", true); + loadBoolConfig(L, TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, "togglehouseTransferOnRestart", false); + loadBoolConfig(L, TOGGLE_IMBUEMENT_NON_AGGRESSIVE_FIGHT_ONLY, "toggleImbuementNonAggressiveFightOnly", false); + loadBoolConfig(L, TOGGLE_IMBUEMENT_SHRINE_STORAGE, "toggleImbuementShrineStorage", true); + loadBoolConfig(L, TOGGLE_MOUNT_IN_PZ, "toggleMountInProtectionZone", false); + loadBoolConfig(L, TOGGLE_RECEIVE_REWARD, "toggleReceiveReward", false); + loadBoolConfig(L, TOGGLE_SAVE_ASYNC, "toggleSaveAsync", false); + loadBoolConfig(L, TOGGLE_SAVE_INTERVAL_CLEAN_MAP, "toggleSaveIntervalCleanMap", false); + loadBoolConfig(L, TOGGLE_SAVE_INTERVAL, "toggleSaveInterval", false); + loadBoolConfig(L, TOGGLE_SERVER_IS_RETRO, "toggleServerIsRetroPVP", false); + loadBoolConfig(L, TOGGLE_TRAVELS_FREE, "toggleTravelsFree", false); + loadBoolConfig(L, TOGGLE_WHEELSYSTEM, "wheelSystemEnabled", true); loadBoolConfig(L, USE_ANY_DATAPACK_FOLDER, "useAnyDatapackFolder", false); - loadBoolConfig(L, INVENTORY_GLOW, "inventoryGlowOnFiveBless", false); + loadBoolConfig(L, VIP_AUTOLOOT_VIP_ONLY, "vipAutoLootVipOnly", false); + loadBoolConfig(L, VIP_KEEP_HOUSE, "vipKeepHouse", false); + loadBoolConfig(L, VIP_STAY_ONLINE, "vipStayOnline", false); + loadBoolConfig(L, VIP_SYSTEM_ENABLED, "vipSystemEnabled", false); + loadBoolConfig(L, WARN_UNSAFE_SCRIPTS, "warnUnsafeScripts", true); loadBoolConfig(L, XP_DISPLAY_MODE, "experienceDisplayRates", true); - loadStringConfig(L, DEFAULT_PRIORITY, "defaultPriority", "high"); - loadStringConfig(L, SERVER_NAME, "serverName", ""); - loadStringConfig(L, SERVER_MOTD, "serverMotd", ""); - loadStringConfig(L, OWNER_NAME, "ownerName", ""); - loadStringConfig(L, OWNER_EMAIL, "ownerEmail", ""); - loadStringConfig(L, URL, "url", ""); - loadStringConfig(L, LOCATION, "location", ""); - loadStringConfig(L, WORLD_TYPE, "worldType", "pvp"); - loadStringConfig(L, STORE_IMAGES_URL, "coinImagesURL", ""); - loadStringConfig(L, DISCORD_WEBHOOK_URL, "discordWebhookURL", ""); - loadBoolConfig(L, DISCORD_SEND_FOOTER, "discordSendFooter", true); - loadStringConfig(L, SAVE_INTERVAL_TYPE, "saveIntervalType", ""); - loadStringConfig(L, GLOBAL_SERVER_SAVE_TIME, "globalServerSaveTime", "06:00"); - loadStringConfig(L, DATA_DIRECTORY, "dataPackDirectory", "data-otservbr-global"); - loadStringConfig(L, CORE_DIRECTORY, "coreDirectory", "data"); - - loadStringConfig(L, FORGE_FIENDISH_INTERVAL_TYPE, "forgeFiendishIntervalType", "hour"); - loadStringConfig(L, FORGE_FIENDISH_INTERVAL_TIME, "forgeFiendishIntervalTime", "1"); - - loadIntConfig(L, MAX_PLAYERS, "maxPlayers", 0); - loadIntConfig(L, PZ_LOCKED, "pzLocked", 60000); - loadIntConfig(L, DEFAULT_DESPAWNRANGE, "deSpawnRange", 2); - loadIntConfig(L, DEFAULT_DESPAWNRADIUS, "deSpawnRadius", 50); - loadIntConfig(L, RATE_EXPERIENCE, "rateExp", 1); - loadIntConfig(L, RATE_SKILL, "rateSkill", 1); - loadIntConfig(L, RATE_LOOT, "rateLoot", 1); - loadIntConfig(L, RATE_MAGIC, "rateMagic", 1); - loadIntConfig(L, RATE_SPAWN, "rateSpawn", 1); - loadIntConfig(L, RATE_KILLING_IN_THE_NAME_OF_POINTS, "rateKillingInTheNameOfPoints", 1); - - loadIntConfig(L, HOUSE_PRICE_PER_SQM, "housePriceEachSQM", 1000); - loadIntConfig(L, HOUSE_BUY_LEVEL, "houseBuyLevel", 0); - loadIntConfig(L, HOUSE_LOSE_AFTER_INACTIVITY, "houseLoseAfterInactivity", 0); - loadBoolConfig(L, HOUSE_PURSHASED_SHOW_PRICE, "housePurchasedShowPrice", false); - loadBoolConfig(L, ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, "onlyInvitedCanMoveHouseItems", true); - - loadIntConfig(L, ACTIONS_DELAY_INTERVAL, "timeBetweenActions", 200); - loadIntConfig(L, EX_ACTIONS_DELAY_INTERVAL, "timeBetweenExActions", 1000); - loadIntConfig(L, MAX_MESSAGEBUFFER, "maxMessageBuffer", 4); - loadIntConfig(L, KICK_AFTER_MINUTES, "kickIdlePlayerAfterMinutes", 15); - loadIntConfig(L, PROTECTION_LEVEL, "protectionLevel", 1); - loadIntConfig(L, DEATH_LOSE_PERCENT, "deathLosePercent", -1); - loadIntConfig(L, STATUSQUERY_TIMEOUT, "statusTimeout", 5000); - loadIntConfig(L, FRAG_TIME, "timeToDecreaseFrags", 24 * 60 * 60 * 1000); - loadIntConfig(L, WHITE_SKULL_TIME, "whiteSkullTime", 15 * 60 * 1000); - loadIntConfig(L, STAIRHOP_DELAY, "stairJumpExhaustion", 2000); - loadIntConfig(L, MAX_CONTAINER, "maxContainer", 500); - loadIntConfig(L, MAX_CONTAINER_ITEM, "maxItem", 5000); - loadIntConfig(L, EXP_FROM_PLAYERS_LEVEL_RANGE, "expFromPlayersLevelRange", 75); - loadIntConfig(L, CHECK_EXPIRED_MARKET_OFFERS_EACH_MINUTES, "checkExpiredMarketOffersEachMinutes", 60); - loadIntConfig(L, MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, "maxMarketOffersAtATimePerPlayer", 100); - loadIntConfig(L, MAX_PACKETS_PER_SECOND, "maxPacketsPerSecond", 25); - loadIntConfig(L, COMPRESSION_LEVEL, "packetCompressionLevel", 6); - loadIntConfig(L, STORE_COIN_PACKET, "coinPacketSize", 25); - loadIntConfig(L, DAY_KILLS_TO_RED, "dayKillsToRedSkull", 3); - loadIntConfig(L, WEEK_KILLS_TO_RED, "weekKillsToRedSkull", 5); - loadIntConfig(L, MONTH_KILLS_TO_RED, "monthKillsToRedSkull", 10); - loadIntConfig(L, RED_SKULL_DURATION, "redSkullDuration", 30); - loadIntConfig(L, BLACK_SKULL_DURATION, "blackSkullDuration", 45); - loadIntConfig(L, ORANGE_SKULL_DURATION, "orangeSkullDuration", 7); - loadIntConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_DURATION, "globalServerSaveNotifyDuration", 5); - - loadIntConfig(L, PARTY_LIST_MAX_DISTANCE, "partyListMaxDistance", 0); - - loadIntConfig(L, PUSH_DELAY, "pushDelay", 1000); - loadIntConfig(L, PUSH_DISTANCE_DELAY, "pushDistanceDelay", 1500); - - loadIntConfig(L, STAMINA_ORANGE_DELAY, "staminaOrangeDelay", 1); - loadIntConfig(L, STAMINA_GREEN_DELAY, "staminaGreenDelay", 5); - loadIntConfig(L, STAMINA_PZ_GAIN, "staminaPzGain", 1); - loadIntConfig(L, STAMINA_TRAINER_DELAY, "staminaTrainerDelay", 5); - loadIntConfig(L, STAMINA_TRAINER_GAIN, "staminaTrainerGain", 1); - loadIntConfig(L, SAVE_INTERVAL_TIME, "saveIntervalTime", 1); - loadIntConfig(L, MAX_ALLOWED_ON_A_DUMMY, "maxAllowedOnADummy", 1); - loadIntConfig(L, FREE_QUEST_STAGE, "freeQuestStage", 1); - loadIntConfig(L, DEPOTCHEST, "depotChest", 4); - loadIntConfig(L, CRITICALCHANCE, "criticalChance", 10); - - loadIntConfig(L, ADVENTURERSBLESSING_LEVEL, "adventurersBlessingLevel", 21); - loadBoolConfig(L, SKULLED_DEATH_LOSE_STORE_ITEM, "skulledDeathLoseStoreItem", false); - loadIntConfig(L, FORGE_MAX_ITEM_TIER, "forgeMaxItemTier", 10); - loadIntConfig(L, FORGE_COST_ONE_SLIVER, "forgeCostOneSliver", 20); - loadIntConfig(L, FORGE_SLIVER_AMOUNT, "forgeSliverAmount", 3); - loadIntConfig(L, FORGE_CORE_COST, "forgeCoreCost", 50); - loadIntConfig(L, FORGE_MAX_DUST, "forgeMaxDust", 225); - loadIntConfig(L, FORGE_FUSION_DUST_COST, "forgeFusionDustCost", 100); - loadIntConfig(L, FORGE_CONVERGENCE_FUSION_DUST_COST, "forgeConvergenceFusionCost", 130); - loadIntConfig(L, FORGE_TRANSFER_DUST_COST, "forgeTransferDustCost", 100); - loadIntConfig(L, FORGE_CONVERGENCE_TRANSFER_DUST_COST, "forgeConvergenceTransferCost", 160); - loadIntConfig(L, FORGE_BASE_SUCCESS_RATE, "forgeBaseSuccessRate", 50); - loadIntConfig(L, FORGE_BONUS_SUCCESS_RATE, "forgeBonusSuccessRate", 15); - loadIntConfig(L, FORGE_TIER_LOSS_REDUCTION, "forgeTierLossReduction", 50); - loadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, "forgeAmountMultiplier", 3.0); - loadIntConfig(L, FORGE_MIN_SLIVERS, "forgeMinSlivers", 3); - loadIntConfig(L, FORGE_MAX_SLIVERS, "forgeMaxSlivers", 7); - loadIntConfig(L, FORGE_INFLUENCED_CREATURES_LIMIT, "forgeInfluencedLimit", 300); - loadIntConfig(L, FORGE_FIENDISH_CREATURES_LIMIT, "forgeFiendishLimit", 3); - - loadFloatConfig(L, RUSE_CHANCE_FORMULA_A, "ruseChanceFormulaA", 0.0307576); - loadFloatConfig(L, RUSE_CHANCE_FORMULA_B, "ruseChanceFormulaB", 0.440697); - loadFloatConfig(L, RUSE_CHANCE_FORMULA_C, "ruseChanceFormulaC", 0.026); - - loadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, "onslaughtChanceFormulaA", 0.05); - loadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, "onslaughtChanceFormulaB", 0.4); - loadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, "onslaughtChanceFormulaC", 0.05); - - loadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, "momentumChanceFormulaA", 0.05); - loadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, "momentumChanceFormulaB", 1.9); - loadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, "momentumChanceFormulaC", 0.05); - - loadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, "transcendanceChanceFormulaA", 0.0127); - loadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_B, "transcendanceChanceFormulaB", 0.1070); - loadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_C, "transcendanceChanceFormulaC", 0.0073); - - loadIntConfig(L, TRANSCENDANCE_AVATAR_DURATION, "transcendanceAvatarDuration", 7000); - - loadIntConfig(L, DISCORD_WEBHOOK_DELAY_MS, "discordWebhookDelayMs", Webhook::DEFAULT_DELAY_MS); - loadFloatConfig(L, BESTIARY_RATE_CHARM_SHOP_PRICE, "bestiaryRateCharmShopPrice", 1.0); - loadFloatConfig(L, RATE_HEALTH_REGEN, "rateHealthRegen", 1.0); - loadFloatConfig(L, RATE_HEALTH_REGEN_SPEED, "rateHealthRegenSpeed", 1.0); - loadFloatConfig(L, RATE_MANA_REGEN, "rateManaRegen", 1.0); - loadFloatConfig(L, RATE_MANA_REGEN_SPEED, "rateManaRegenSpeed", 1.0); - loadFloatConfig(L, RATE_SOUL_REGEN, "rateSoulRegen", 1.0); - loadFloatConfig(L, RATE_SOUL_REGEN_SPEED, "rateSoulRegenSpeed", 1.0); - loadFloatConfig(L, RATE_SPELL_COOLDOWN, "rateSpellCooldown", 1.0); + loadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, "forgeAmountMultiplier", 3.0); + loadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, "hazardExpBonusMultiplier", 2.0); + loadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, "loyaltyBonusPercentageMultiplier", 1.0); + loadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, "momentumChanceFormulaA", 0.05); + loadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, "momentumChanceFormulaB", 1.9); + loadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, "momentumChanceFormulaC", 0.05); + loadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, "onslaughtChanceFormulaA", 0.05); + loadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, "onslaughtChanceFormulaB", 0.4); + loadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, "onslaughtChanceFormulaC", 0.05); + loadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, "partyShareLootBoostsDimishingFactor", 0.7f); + loadFloatConfig(L, PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, "pvpRateDamageReductionPerLevel", 0.0); + loadFloatConfig(L, PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, "pvpRateDamageTakenPerLevel", 0.0); loadFloatConfig(L, RATE_ATTACK_SPEED, "rateAttackSpeed", 1.0); - loadFloatConfig(L, RATE_OFFLINE_TRAINING_SPEED, "rateOfflineTrainingSpeed", 1.0); + loadFloatConfig(L, RATE_BOSS_ATTACK, "rateBossAttack", 1.0); + loadFloatConfig(L, RATE_BOSS_DEFENSE, "rateBossDefense", 1.0); + loadFloatConfig(L, RATE_BOSS_HEALTH, "rateBossHealth", 1.0); loadFloatConfig(L, RATE_EXERCISE_TRAINING_SPEED, "rateExerciseTrainingSpeed", 1.0); - loadIntConfig(L, COMBAT_CHAIN_DELAY, "combatChainDelay", 50); - - loadFloatConfig(L, RATE_MONSTER_HEALTH, "rateMonsterHealth", 1.0); + loadFloatConfig(L, RATE_HEALTH_REGEN_SPEED, "rateHealthRegenSpeed", 1.0); + loadFloatConfig(L, RATE_HEALTH_REGEN, "rateHealthRegen", 1.0); + loadFloatConfig(L, RATE_MANA_REGEN_SPEED, "rateManaRegenSpeed", 1.0); + loadFloatConfig(L, RATE_MANA_REGEN, "rateManaRegen", 1.0); loadFloatConfig(L, RATE_MONSTER_ATTACK, "rateMonsterAttack", 1.0); loadFloatConfig(L, RATE_MONSTER_DEFENSE, "rateMonsterDefense", 1.0); - loadFloatConfig(L, RATE_BOSS_HEALTH, "rateBossHealth", 1.0); - loadFloatConfig(L, RATE_BOSS_ATTACK, "rateBossAttack", 1.0); - loadFloatConfig(L, RATE_BOSS_DEFENSE, "rateBossDefense", 1.0); - loadIntConfig(L, BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, "bossDefaultTimeToFightAgain", 20 * 60 * 60); - loadIntConfig(L, BOSS_DEFAULT_TIME_TO_DEFEAT, "bossDefaultTimeToDefeat", 20 * 60); - - loadIntConfig(L, MIN_ELEMENTAL_RESISTANCE, "minElementalResistance", -200); - loadIntConfig(L, MAX_ELEMENTAL_RESISTANCE, "maxElementalResistance", 200); - loadIntConfig(L, MAX_DAMAGE_REFLECTION, "maxDamageReflection", 200); - - loadFloatConfig(L, RATE_NPC_HEALTH, "rateNpcHealth", 1.0); + loadFloatConfig(L, RATE_MONSTER_HEALTH, "rateMonsterHealth", 1.0); loadFloatConfig(L, RATE_NPC_ATTACK, "rateNpcAttack", 1.0); loadFloatConfig(L, RATE_NPC_DEFENSE, "rateNpcDefense", 1.0); + loadFloatConfig(L, RATE_NPC_HEALTH, "rateNpcHealth", 1.0); + loadFloatConfig(L, RATE_OFFLINE_TRAINING_SPEED, "rateOfflineTrainingSpeed", 1.0); + loadFloatConfig(L, RATE_SOUL_REGEN_SPEED, "rateSoulRegenSpeed", 1.0); + loadFloatConfig(L, RATE_SOUL_REGEN, "rateSoulRegen", 1.0); + loadFloatConfig(L, RATE_SPELL_COOLDOWN, "rateSpellCooldown", 1.0); + loadFloatConfig(L, RUSE_CHANCE_FORMULA_A, "ruseChanceFormulaA", 0.0307576); + loadFloatConfig(L, RUSE_CHANCE_FORMULA_B, "ruseChanceFormulaB", 0.440697); + loadFloatConfig(L, RUSE_CHANCE_FORMULA_C, "ruseChanceFormulaC", 0.026); + loadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, "transcendanceChanceFormulaA", 0.0127); + loadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_B, "transcendanceChanceFormulaB", 0.1070); + loadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_C, "transcendanceChanceFormulaC", 0.0073); - loadBoolConfig(L, PREY_ENABLED, "preySystemEnabled", true); - loadBoolConfig(L, PREY_FREE_THIRD_SLOT, "preyFreeThirdSlot", false); - loadIntConfig(L, PREY_REROLL_PRICE_LEVEL, "preyRerollPricePerLevel", 200); - loadIntConfig(L, PREY_SELECTION_LIST_PRICE, "preySelectListPrice", 5); - loadIntConfig(L, PREY_BONUS_TIME, "preyBonusTime", 7200); - loadIntConfig(L, PREY_BONUS_REROLL_PRICE, "preyBonusRerollPrice", 1); - loadIntConfig(L, PREY_FREE_REROLL_TIME, "preyFreeRerollTime", 72000); - - loadBoolConfig(L, TASK_HUNTING_ENABLED, "taskHuntingSystemEnabled", true); - loadBoolConfig(L, TASK_HUNTING_FREE_THIRD_SLOT, "taskHuntingFreeThirdSlot", false); - loadIntConfig(L, TASK_HUNTING_LIMIT_EXHAUST, "taskHuntingLimitedTasksExhaust", 72000); - loadIntConfig(L, TASK_HUNTING_REROLL_PRICE_LEVEL, "taskHuntingRerollPricePerLevel", 200); - loadIntConfig(L, TASK_HUNTING_SELECTION_LIST_PRICE, "taskHuntingSelectListPrice", 5); - loadIntConfig(L, TASK_HUNTING_BONUS_REROLL_PRICE, "taskHuntingBonusRerollPrice", 1); - loadIntConfig(L, TASK_HUNTING_FREE_REROLL_TIME, "taskHuntingFreeRerollTime", 72000); - + loadIntConfig(L, ACTIONS_DELAY_INTERVAL, "timeBetweenActions", 200); + loadIntConfig(L, ADVENTURERSBLESSING_LEVEL, "adventurersBlessingLevel", 21); loadIntConfig(L, BESTIARY_KILL_MULTIPLIER, "bestiaryKillMultiplier", 1); - loadIntConfig(L, BOSSTIARY_KILL_MULTIPLIER, "bosstiaryKillMultiplier", 1); - loadBoolConfig(L, BOOSTED_BOSS_SLOT, "boostedBossSlot", true); - loadIntConfig(L, BOOSTED_BOSS_LOOT_BONUS, "boostedBossLootBonus", 250); + loadIntConfig(L, BLACK_SKULL_DURATION, "blackSkullDuration", 45); loadIntConfig(L, BOOSTED_BOSS_KILL_BONUS, "boostedBossKillBonus", 3); - - loadIntConfig(L, FAMILIAR_TIME, "familiarTime", 30); - - loadBoolConfig(L, TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, "toggleGoldPouchAllowAnything", false); - loadBoolConfig(L, TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY, "toggleGoldPouchQuickLootOnly", false); - loadBoolConfig(L, TOGGLE_SERVER_IS_RETRO, "toggleServerIsRetroPVP", false); - loadBoolConfig(L, TOGGLE_TRAVELS_FREE, "toggleTravelsFree", false); + loadIntConfig(L, BOOSTED_BOSS_LOOT_BONUS, "boostedBossLootBonus", 250); + loadIntConfig(L, BOSS_DEFAULT_TIME_TO_DEFEAT, "bossDefaultTimeToDefeat", 20 * 60); + loadIntConfig(L, BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, "bossDefaultTimeToFightAgain", 20 * 60 * 60); + loadIntConfig(L, BOSSTIARY_KILL_MULTIPLIER, "bosstiaryKillMultiplier", 1); loadIntConfig(L, BUY_AOL_COMMAND_FEE, "buyAolCommandFee", 0); loadIntConfig(L, BUY_BLESS_COMMAND_FEE, "buyBlessCommandFee", 0); - loadBoolConfig(L, TELEPORT_PLAYER_TO_VOCATION_ROOM, "teleportPlayerToVocationRoom", true); - - loadBoolConfig(L, TOGGLE_HAZARDSYSTEM, "toogleHazardSystem", true); - loadIntConfig(L, HAZARD_CRITICAL_INTERVAL, "hazardCriticalInterval", 2000); + loadIntConfig(L, CHECK_EXPIRED_MARKET_OFFERS_EACH_MINUTES, "checkExpiredMarketOffersEachMinutes", 60); + loadIntConfig(L, COMBAT_CHAIN_DELAY, "combatChainDelay", 50); + loadIntConfig(L, COMBAT_CHAIN_TARGETS, "combatChainTargets", 5); + loadIntConfig(L, COMPRESSION_LEVEL, "packetCompressionLevel", 6); + loadIntConfig(L, CRITICALCHANCE, "criticalChance", 10); + loadIntConfig(L, DAY_KILLS_TO_RED, "dayKillsToRedSkull", 3); + loadIntConfig(L, DEATH_LOSE_PERCENT, "deathLosePercent", -1); + loadIntConfig(L, DEFAULT_DESPAWNRADIUS, "deSpawnRadius", 50); + loadIntConfig(L, DEFAULT_DESPAWNRANGE, "deSpawnRange", 2); + loadIntConfig(L, DEPOTCHEST, "depotChest", 4); + loadIntConfig(L, DISCORD_WEBHOOK_DELAY_MS, "discordWebhookDelayMs", Webhook::DEFAULT_DELAY_MS); + loadIntConfig(L, EX_ACTIONS_DELAY_INTERVAL, "timeBetweenExActions", 1000); + loadIntConfig(L, EXP_FROM_PLAYERS_LEVEL_RANGE, "expFromPlayersLevelRange", 75); + loadIntConfig(L, FAMILIAR_TIME, "familiarTime", 30); + loadIntConfig(L, FORGE_BASE_SUCCESS_RATE, "forgeBaseSuccessRate", 50); + loadIntConfig(L, FORGE_BONUS_SUCCESS_RATE, "forgeBonusSuccessRate", 15); + loadIntConfig(L, FORGE_CONVERGENCE_FUSION_DUST_COST, "forgeConvergenceFusionCost", 130); + loadIntConfig(L, FORGE_CONVERGENCE_TRANSFER_DUST_COST, "forgeConvergenceTransferCost", 160); + loadIntConfig(L, FORGE_CORE_COST, "forgeCoreCost", 50); + loadIntConfig(L, FORGE_COST_ONE_SLIVER, "forgeCostOneSliver", 20); + loadIntConfig(L, FORGE_FIENDISH_CREATURES_LIMIT, "forgeFiendishLimit", 3); + loadIntConfig(L, FORGE_FUSION_DUST_COST, "forgeFusionDustCost", 100); + loadIntConfig(L, FORGE_INFLUENCED_CREATURES_LIMIT, "forgeInfluencedLimit", 300); + loadIntConfig(L, FORGE_MAX_DUST, "forgeMaxDust", 225); + loadIntConfig(L, FORGE_MAX_ITEM_TIER, "forgeMaxItemTier", 10); + loadIntConfig(L, FORGE_MAX_SLIVERS, "forgeMaxSlivers", 7); + loadIntConfig(L, FORGE_MIN_SLIVERS, "forgeMinSlivers", 3); + loadIntConfig(L, FORGE_SLIVER_AMOUNT, "forgeSliverAmount", 3); + loadIntConfig(L, FORGE_TIER_LOSS_REDUCTION, "forgeTierLossReduction", 50); + loadIntConfig(L, FORGE_TRANSFER_DUST_COST, "forgeTransferDustCost", 100); + loadIntConfig(L, FRAG_TIME, "timeToDecreaseFrags", 24 * 60 * 60 * 1000); + loadIntConfig(L, FREE_QUEST_STAGE, "freeQuestStage", 1); + loadIntConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_DURATION, "globalServerSaveNotifyDuration", 5); loadIntConfig(L, HAZARD_CRITICAL_CHANCE, "hazardCriticalChance", 750); + loadIntConfig(L, HAZARD_CRITICAL_INTERVAL, "hazardCriticalInterval", 2000); loadIntConfig(L, HAZARD_CRITICAL_MULTIPLIER, "hazardCriticalMultiplier", 25); loadIntConfig(L, HAZARD_DAMAGE_MULTIPLIER, "hazardDamageMultiplier", 200); loadIntConfig(L, HAZARD_DEFENSE_MULTIPLIER, "hazardDefenseMultiplier", 0); loadIntConfig(L, HAZARD_DODGE_MULTIPLIER, "hazardDodgeMultiplier", 85); + loadIntConfig(L, HAZARD_LOOT_BONUS_MULTIPLIER, "hazardLootBonusMultiplier", 2); + loadIntConfig(L, HAZARD_PODS_DAMAGE, "hazardPodsDamage", 5); loadIntConfig(L, HAZARD_PODS_DROP_MULTIPLIER, "hazardPodsDropMultiplier", 87); loadIntConfig(L, HAZARD_PODS_TIME_TO_DAMAGE, "hazardPodsTimeToDamage", 2000); loadIntConfig(L, HAZARD_PODS_TIME_TO_SPAWN, "hazardPodsTimeToSpawn", 4000); - loadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, "hazardExpBonusMultiplier", 2.0); - loadIntConfig(L, HAZARD_LOOT_BONUS_MULTIPLIER, "hazardLootBonusMultiplier", 2); - loadIntConfig(L, HAZARD_PODS_DAMAGE, "hazardPodsDamage", 5); loadIntConfig(L, HAZARD_SPAWN_PLUNDER_MULTIPLIER, "hazardSpawnPlunderMultiplier", 25); + loadIntConfig(L, HOUSE_BUY_LEVEL, "houseBuyLevel", 0); + loadIntConfig(L, HOUSE_LOSE_AFTER_INACTIVITY, "houseLoseAfterInactivity", 0); + loadIntConfig(L, HOUSE_PRICE_PER_SQM, "housePriceEachSQM", 1000); + loadIntConfig(L, KICK_AFTER_MINUTES, "kickIdlePlayerAfterMinutes", 15); + loadIntConfig(L, LOOTPOUCH_MAXLIMIT, "lootPouchMaxLimit", 2000); loadIntConfig(L, LOW_LEVEL_BONUS_EXP, "lowLevelBonusExp", 50); - - loadBoolConfig(L, LOYALTY_ENABLED, "loyaltyEnabled", true); loadIntConfig(L, LOYALTY_POINTS_PER_CREATION_DAY, "loyaltyPointsPerCreationDay", 1); - loadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_SPENT, "loyaltyPointsPerPremiumDaySpent", 0); loadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_PURCHASED, "loyaltyPointsPerPremiumDayPurchased", 0); - loadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, "loyaltyBonusPercentageMultiplier", 1.0); - - loadBoolConfig(L, TOGGLE_WHEELSYSTEM, "wheelSystemEnabled", true); - loadIntConfig(L, WHEEL_POINTS_PER_LEVEL, "wheelPointsPerLevel", 1); - - loadIntConfig(L, WHEEL_ATELIER_ROTATE_LESSER_COST, "wheelAtelierRotateLesserCost", 125000); - loadIntConfig(L, WHEEL_ATELIER_ROTATE_REGULAR_COST, "wheelAtelierRotateRegularCost", 250000); - loadIntConfig(L, WHEEL_ATELIER_ROTATE_GREATER_COST, "wheelAtelierRotateGreaterCost", 500000); - - loadIntConfig(L, WHEEL_ATELIER_REVEAL_LESSER_COST, "wheelAtelierRevealLesserCost", 125000); - loadIntConfig(L, WHEEL_ATELIER_REVEAL_REGULAR_COST, "wheelAtelierRevealRegularCost", 1000000); - loadIntConfig(L, WHEEL_ATELIER_REVEAL_GREATER_COST, "wheelAtelierRevealGreaterCost", 6000000); - - loadBoolConfig(L, PARTY_AUTO_SHARE_EXPERIENCE, "partyAutoShareExperience", true); - loadBoolConfig(L, PARTY_SHARE_LOOT_BOOSTS, "partyShareLootBoosts", true); - loadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, "partyShareLootBoostsDimishingFactor", 0.7f); + loadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_SPENT, "loyaltyPointsPerPremiumDaySpent", 0); + loadIntConfig(L, MAX_ALLOWED_ON_A_DUMMY, "maxAllowedOnADummy", 1); + loadIntConfig(L, MAX_CONTAINER_ITEM, "maxItem", 5000); + loadIntConfig(L, MAX_CONTAINER, "maxContainer", 500); + loadIntConfig(L, MAX_DAMAGE_REFLECTION, "maxDamageReflection", 200); + loadIntConfig(L, MAX_ELEMENTAL_RESISTANCE, "maxElementalResistance", 200); + loadIntConfig(L, MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, "maxMarketOffersAtATimePerPlayer", 100); + loadIntConfig(L, MAX_MESSAGEBUFFER, "maxMessageBuffer", 4); + loadIntConfig(L, MAX_PACKETS_PER_SECOND, "maxPacketsPerSecond", 25); + loadIntConfig(L, MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, "maxPlayersOutsidePZPerAccount", 1); + loadIntConfig(L, MAX_PLAYERS_PER_ACCOUNT, "maxPlayersOnlinePerAccount", 1); + loadIntConfig(L, MAX_PLAYERS, "maxPlayers", 0); + loadIntConfig(L, MAX_SPEED_ATTACKONFIST, "maxSpeedOnFist", 500); + loadIntConfig(L, METRICS_OSTREAM_INTERVAL, "metricsOstreamInterval", 1000); + loadIntConfig(L, MIN_DELAY_BETWEEN_CONDITIONS, "minDelayBetweenConditions", 0); + loadIntConfig(L, MIN_ELEMENTAL_RESISTANCE, "minElementalResistance", -200); + loadIntConfig(L, MONTH_KILLS_TO_RED, "monthKillsToRedSkull", 10); + loadIntConfig(L, MULTIPLIER_ATTACKONFIST, "multiplierSpeedOnFist", 5); + loadIntConfig(L, ORANGE_SKULL_DURATION, "orangeSkullDuration", 7); + loadIntConfig(L, PARALLELISM, "parallelism", 2); + loadIntConfig(L, PARTY_LIST_MAX_DISTANCE, "partyListMaxDistance", 0); + loadIntConfig(L, PREY_BONUS_REROLL_PRICE, "preyBonusRerollPrice", 1); + loadIntConfig(L, PREY_BONUS_TIME, "preyBonusTime", 7200); + loadIntConfig(L, PREY_FREE_REROLL_TIME, "preyFreeRerollTime", 72000); + loadIntConfig(L, PREY_REROLL_PRICE_LEVEL, "preyRerollPricePerLevel", 200); + loadIntConfig(L, PREY_SELECTION_LIST_PRICE, "preySelectListPrice", 5); + loadIntConfig(L, PROTECTION_LEVEL, "protectionLevel", 1); + loadIntConfig(L, PUSH_DELAY, "pushDelay", 1000); + loadIntConfig(L, PUSH_DISTANCE_DELAY, "pushDistanceDelay", 1500); + loadIntConfig(L, PVP_MAX_LEVEL_DIFFERENCE, "pvpMaxLevelDifference", 0); + loadIntConfig(L, PZ_LOCKED, "pzLocked", 60000); + loadIntConfig(L, RATE_EXPERIENCE, "rateExp", 1); + loadIntConfig(L, RATE_KILLING_IN_THE_NAME_OF_POINTS, "rateKillingInTheNameOfPoints", 1); + loadIntConfig(L, RATE_LOOT, "rateLoot", 1); + loadIntConfig(L, RATE_MAGIC, "rateMagic", 1); + loadIntConfig(L, RATE_SKILL, "rateSkill", 1); + loadIntConfig(L, RATE_SPAWN, "rateSpawn", 1); + loadIntConfig(L, RED_SKULL_DURATION, "redSkullDuration", 30); + loadIntConfig(L, REWARD_CHEST_MAX_COLLECT_ITEMS, "rewardChestMaxCollectItems", 200); + loadIntConfig(L, SAVE_INTERVAL_TIME, "saveIntervalTime", 1); + loadIntConfig(L, STAIRHOP_DELAY, "stairJumpExhaustion", 2000); + loadIntConfig(L, STAMINA_GREEN_DELAY, "staminaGreenDelay", 5); + loadIntConfig(L, STAMINA_ORANGE_DELAY, "staminaOrangeDelay", 1); + loadIntConfig(L, STAMINA_PZ_GAIN, "staminaPzGain", 1); + loadIntConfig(L, STAMINA_TRAINER_DELAY, "staminaTrainerDelay", 5); + loadIntConfig(L, STAMINA_TRAINER_GAIN, "staminaTrainerGain", 1); + loadIntConfig(L, START_STREAK_LEVEL, "startStreakLevel", 0); + loadIntConfig(L, STATUSQUERY_TIMEOUT, "statusTimeout", 5000); + loadIntConfig(L, STORE_COIN_PACKET, "coinPacketSize", 25); + loadIntConfig(L, STOREINBOX_MAXLIMIT, "storeInboxMaxLimit", 2000); + loadIntConfig(L, T_CONST, "temporaryConst", 2); + loadIntConfig(L, TASK_HUNTING_BONUS_REROLL_PRICE, "taskHuntingBonusRerollPrice", 1); + loadIntConfig(L, TASK_HUNTING_FREE_REROLL_TIME, "taskHuntingFreeRerollTime", 72000); + loadIntConfig(L, TASK_HUNTING_LIMIT_EXHAUST, "taskHuntingLimitedTasksExhaust", 72000); + loadIntConfig(L, TASK_HUNTING_REROLL_PRICE_LEVEL, "taskHuntingRerollPricePerLevel", 200); + loadIntConfig(L, TASK_HUNTING_SELECTION_LIST_PRICE, "taskHuntingSelectListPrice", 5); loadIntConfig(L, TIBIADROME_CONCOCTION_COOLDOWN, "tibiadromeConcoctionCooldown", 24 * 60 * 60); loadIntConfig(L, TIBIADROME_CONCOCTION_DURATION, "tibiadromeConcoctionDuration", 1 * 60 * 60); - loadStringConfig(L, TIBIADROME_CONCOCTION_TICK_TYPE, "tibiadromeConcoctionTickType", "online"); - - loadStringConfig(L, M_CONST, "memoryConst", "1<<16"); - loadIntConfig(L, T_CONST, "temporaryConst", 2); - loadIntConfig(L, PARALLELISM, "parallelism", 2); - - // Vip System - loadBoolConfig(L, VIP_SYSTEM_ENABLED, "vipSystemEnabled", false); + loadIntConfig(L, TRANSCENDANCE_AVATAR_DURATION, "transcendanceAvatarDuration", 7000); loadIntConfig(L, VIP_BONUS_EXP, "vipBonusExp", 0); loadIntConfig(L, VIP_BONUS_LOOT, "vipBonusLoot", 0); loadIntConfig(L, VIP_BONUS_SKILL, "vipBonusSkill", 0); - loadBoolConfig(L, VIP_AUTOLOOT_VIP_ONLY, "vipAutoLootVipOnly", false); - loadBoolConfig(L, VIP_KEEP_HOUSE, "vipKeepHouse", false); - loadBoolConfig(L, VIP_STAY_ONLINE, "vipStayOnline", false); loadIntConfig(L, VIP_FAMILIAR_TIME_COOLDOWN_REDUCTION, "vipFamiliarTimeCooldownReduction", 0); + loadIntConfig(L, WEEK_KILLS_TO_RED, "weekKillsToRedSkull", 5); + loadIntConfig(L, WHEEL_ATELIER_REVEAL_GREATER_COST, "wheelAtelierRevealGreaterCost", 6000000); + loadIntConfig(L, WHEEL_ATELIER_REVEAL_LESSER_COST, "wheelAtelierRevealLesserCost", 125000); + loadIntConfig(L, WHEEL_ATELIER_REVEAL_REGULAR_COST, "wheelAtelierRevealRegularCost", 1000000); + loadIntConfig(L, WHEEL_ATELIER_ROTATE_GREATER_COST, "wheelAtelierRotateGreaterCost", 500000); + loadIntConfig(L, WHEEL_ATELIER_ROTATE_LESSER_COST, "wheelAtelierRotateLesserCost", 125000); + loadIntConfig(L, WHEEL_ATELIER_ROTATE_REGULAR_COST, "wheelAtelierRotateRegularCost", 250000); + loadIntConfig(L, WHEEL_POINTS_PER_LEVEL, "wheelPointsPerLevel", 1); + loadIntConfig(L, WHITE_SKULL_TIME, "whiteSkullTime", 15 * 60 * 1000); - loadBoolConfig(L, REWARD_CHEST_COLLECT_ENABLED, "rewardChestCollectEnabled", true); - loadIntConfig(L, REWARD_CHEST_MAX_COLLECT_ITEMS, "rewardChestMaxCollectItems", 200); - - // PVP System - loadFloatConfig(L, PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, "pvpRateDamageTakenPerLevel", 0.0); - loadFloatConfig(L, PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, "pvpRateDamageReductionPerLevel", 0.0); - loadIntConfig(L, PVP_MAX_LEVEL_DIFFERENCE, "pvpMaxLevelDifference", 0); - - loadBoolConfig(L, TOGGLE_MOUNT_IN_PZ, "toggleMountInProtectionZone", false); - - loadBoolConfig(L, TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, "togglehouseTransferOnRestart", false); - - loadBoolConfig(L, TOGGLE_RECEIVE_REWARD, "toggleReceiveReward", false); - - loadBoolConfig(L, METRICS_ENABLE_PROMETHEUS, "metricsEnablePrometheus", false); + loadStringConfig(L, CORE_DIRECTORY, "coreDirectory", "data"); + loadStringConfig(L, DATA_DIRECTORY, "dataPackDirectory", "data-otservbr-global"); + loadStringConfig(L, DEFAULT_PRIORITY, "defaultPriority", "high"); + loadStringConfig(L, DISCORD_WEBHOOK_URL, "discordWebhookURL", ""); + loadStringConfig(L, FORGE_FIENDISH_INTERVAL_TIME, "forgeFiendishIntervalTime", "1"); + loadStringConfig(L, FORGE_FIENDISH_INTERVAL_TYPE, "forgeFiendishIntervalType", "hour"); + loadStringConfig(L, GLOBAL_SERVER_SAVE_TIME, "globalServerSaveTime", "06:00"); + loadStringConfig(L, LOCATION, "location", ""); + loadStringConfig(L, M_CONST, "memoryConst", "1<<16"); loadStringConfig(L, METRICS_PROMETHEUS_ADDRESS, "metricsPrometheusAddress", "localhost:9464"); - - loadBoolConfig(L, METRICS_ENABLE_OSTREAM, "metricsEnableOstream", false); - loadIntConfig(L, METRICS_OSTREAM_INTERVAL, "metricsOstreamInterval", 1000); - - loadIntConfig(L, STOREINBOX_MAXLIMIT, "storeInboxMaxLimit", 2000); - loadIntConfig(L, LOOTPOUCH_MAXLIMIT, "lootPouchMaxLimit", 2000); + loadStringConfig(L, OWNER_EMAIL, "ownerEmail", ""); + loadStringConfig(L, OWNER_NAME, "ownerName", ""); + loadStringConfig(L, SAVE_INTERVAL_TYPE, "saveIntervalType", ""); + loadStringConfig(L, SERVER_MOTD, "serverMotd", ""); + loadStringConfig(L, SERVER_NAME, "serverName", ""); + loadStringConfig(L, STORE_IMAGES_URL, "coinImagesURL", ""); + loadStringConfig(L, TIBIADROME_CONCOCTION_TICK_TYPE, "tibiadromeConcoctionTickType", "online"); + loadStringConfig(L, URL, "url", ""); + loadStringConfig(L, WORLD_TYPE, "worldType", "pvp"); loaded = true; lua_close(L); diff --git a/src/config/configmanager.hpp b/src/config/configmanager.hpp index f57e2de84..406ff6989 100644 --- a/src/config/configmanager.hpp +++ b/src/config/configmanager.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/core.hpp b/src/core.hpp index 9fed9149a..ad64df776 100644 --- a/src/core.hpp +++ b/src/core.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -14,7 +14,7 @@ static constexpr auto AUTHENTICATOR_PERIOD = 30U; // SERVER_MAJOR_VERSION is the actual full version of the server, including minor and patch numbers. // This is intended for internal use to identify the exact state of the server (release) software. -static constexpr auto SERVER_RELEASE_VERSION = "6.2.0"; +static constexpr auto SERVER_RELEASE_VERSION = "3.1.2"; static constexpr auto CLIENT_VERSION = 1332; #define CLIENT_VERSION_UPPER (CLIENT_VERSION / 100) diff --git a/src/creatures/CMakeLists.txt b/src/creatures/CMakeLists.txt index d5884fdc8..f3dedf3a8 100644 --- a/src/creatures/CMakeLists.txt +++ b/src/creatures/CMakeLists.txt @@ -21,6 +21,7 @@ target_sources(${PROJECT_NAME}_lib PRIVATE players/management/waitlist.cpp players/storages/storages.cpp players/player.cpp + players/achievement/player_achievement.cpp players/wheel/player_wheel.cpp players/wheel/wheel_gems.cpp players/vocations/vocation.cpp diff --git a/src/creatures/appearance/mounts/mounts.cpp b/src/creatures/appearance/mounts/mounts.cpp index e28b34ea7..dff0f02a4 100644 --- a/src/creatures/appearance/mounts/mounts.cpp +++ b/src/creatures/appearance/mounts/mounts.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/appearance/mounts/mounts.hpp b/src/creatures/appearance/mounts/mounts.hpp index fea303203..05bd330a6 100644 --- a/src/creatures/appearance/mounts/mounts.hpp +++ b/src/creatures/appearance/mounts/mounts.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/appearance/outfit/outfit.cpp b/src/creatures/appearance/outfit/outfit.cpp index 5425f7fed..6f0490339 100644 --- a/src/creatures/appearance/outfit/outfit.cpp +++ b/src/creatures/appearance/outfit/outfit.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/appearance/outfit/outfit.hpp b/src/creatures/appearance/outfit/outfit.hpp index ff27e4448..e1a5143c6 100644 --- a/src/creatures/appearance/outfit/outfit.hpp +++ b/src/creatures/appearance/outfit/outfit.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/combat/combat.cpp b/src/creatures/combat/combat.cpp index c8edeedf0..7456f5729 100644 --- a/src/creatures/combat/combat.cpp +++ b/src/creatures/combat/combat.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -510,6 +510,7 @@ bool Combat::setCallback(CallBackParam_t key) { case CALLBACK_PARAM_CHAINVALUE: { params.chainCallback = std::make_unique(); + params.chainCallback->setFromLua(true); return true; } @@ -521,6 +522,11 @@ bool Combat::setCallback(CallBackParam_t key) { return false; } +void Combat::setChainCallback(uint8_t chainTargets, uint8_t chainDistance, bool backtracking) { + params.chainCallback = std::make_unique(chainTargets, chainDistance, backtracking); + g_logger().debug("ChainCallback created: {}, with targets: {}, distance: {}, backtracking: {}", params.chainCallback != nullptr, chainTargets, chainDistance, backtracking); +} + CallBack* Combat::getCallback(CallBackParam_t key) { switch (key) { case CALLBACK_PARAM_LEVELMAGICVALUE: @@ -930,6 +936,76 @@ void Combat::doChainEffect(const Position &origin, const Position &dest, uint8_t } } +void Combat::setupChain(const std::shared_ptr &weapon) { + if (!weapon) { + return; + } + + // clang-format off + static std::list areaList = { + 0, 0, 0, 1, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 0, + 0, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 3, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 0, + 0, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 1, 0, 0, 0, + }; + // clang-format on + auto area = std::make_unique(); + area->setupArea(areaList, 7); + setArea(area); + g_logger().trace("Weapon: {}, element type: {}", Item::items[weapon->getID()].name, weapon->params.combatType); + setParam(COMBAT_PARAM_TYPE, weapon->params.combatType); + const auto &weaponType = weapon->getWeaponType(); + if (weaponType != WEAPON_WAND) { + setParam(COMBAT_PARAM_BLOCKARMOR, true); + } + + weapon->params.chainCallback = std::make_unique(); + + auto setCommonValues = [this, weapon](double formula, SoundEffect_t impactSound, uint32_t effect) { + double weaponSkillFormula = weapon->getChainSkillValue(); + setPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, weaponSkillFormula ? weaponSkillFormula : formula, 0); + setParam(COMBAT_PARAM_IMPACTSOUND, impactSound); + setParam(COMBAT_PARAM_EFFECT, effect); + setParam(COMBAT_PARAM_BLOCKARMOR, true); + }; + + setChainCallback(g_configManager().getNumber(COMBAT_CHAIN_TARGETS, __FUNCTION__), 1, true); + + switch (weaponType) { + case WEAPON_SWORD: + setCommonValues(1.1, MELEE_ATK_SWORD, CONST_ME_SLASH); + break; + + case WEAPON_CLUB: + setCommonValues(0.7, MELEE_ATK_CLUB, CONST_ME_BLACK_BLOOD); + break; + + case WEAPON_AXE: + setCommonValues(0.9, MELEE_ATK_AXE, CONST_ANI_WHIRLWINDAXE); + break; + } + + if (weaponType == WEAPON_WAND) { + static const std::map> elementEffects = { + { COMBAT_DEATHDAMAGE, { CONST_ME_MORTAREA, CONST_ME_BLACK_BLOOD } }, + { COMBAT_ENERGYDAMAGE, { CONST_ME_ENERGYAREA, CONST_ME_PINK_ENERGY_SPARK } }, + { COMBAT_FIREDAMAGE, { CONST_ME_FIREATTACK, CONST_ME_FIREATTACK } }, + { COMBAT_ICEDAMAGE, { CONST_ME_ICEATTACK, CONST_ME_ICEATTACK } }, + { COMBAT_EARTHDAMAGE, { CONST_ME_STONES, CONST_ME_POISONAREA } }, + }; + + auto it = elementEffects.find(weapon->getElementType()); + if (it != elementEffects.end()) { + setPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0); + setParam(COMBAT_PARAM_EFFECT, it->second.first); + setParam(COMBAT_PARAM_CHAIN_EFFECT, it->second.second); + } + } +} + bool Combat::doCombatChain(std::shared_ptr caster, std::shared_ptr target, bool aggressive) const { metrics::method_latency measure(__METHOD_NAME__); if (!params.chainCallback) { @@ -939,7 +1015,7 @@ bool Combat::doCombatChain(std::shared_ptr caster, std::shared_ptronChainCombat(caster, maxTargets, chainDistance, backtracking); + params.chainCallback->getChainValues(caster, maxTargets, chainDistance, backtracking); auto targets = pickChainTargets(caster, params, chainDistance, maxTargets, backtracking, aggressive, target); g_logger().debug("[{}] Chain targets: {}", __FUNCTION__, targets.size()); @@ -1476,42 +1552,16 @@ void ValueCallback::getMinMaxValues(std::shared_ptr player, CombatDamage case COMBAT_FORMULA_SKILL: { // onGetPlayerMinMaxValues(player, attackSkill, attackValue, attackFactor) std::shared_ptr tool = player->getWeapon(); - const WeaponShared_ptr weapon = g_weapons().getWeapon(tool); - std::shared_ptr item = nullptr; - + const auto &weapon = g_weapons().getWeapon(tool); + int32_t attackSkill = 0; + float attackFactor = 0; if (weapon) { - attackValue = tool->getAttack(); - if (tool->getWeaponType() == WEAPON_AMMO) { - item = player->getWeapon(true); - if (item) { - attackValue += item->getAttack(); - } - } - - CombatType_t elementType = weapon->getElementType(); - damage.secondary.type = elementType; - - if (elementType != COMBAT_NONE) { - if (weapon) { - elementAttack = weapon->getElementDamageValue(); - shouldCalculateSecondaryDamage = true; - attackValue += elementAttack; - } - } else { - shouldCalculateSecondaryDamage = false; - } - - if (useCharges) { - auto charges = tool->getAttribute(ItemAttribute_t::CHARGES); - if (charges != 0) { - g_game().transformItem(tool, tool->getID(), charges - 1); - } - } + shouldCalculateSecondaryDamage = weapon->calculateSkillFormula(player, attackSkill, attackValue, attackFactor, elementAttack, damage, useCharges); } - lua_pushnumber(L, player->getWeaponSkill(item ? item : tool)); + lua_pushnumber(L, attackSkill); lua_pushnumber(L, attackValue); - lua_pushnumber(L, player->getAttackFactor()); + lua_pushnumber(L, attackFactor); parameters += 3; break; } @@ -1635,7 +1685,19 @@ void TargetCallback::onTargetCombat(std::shared_ptr creature, std::sha //**********************************************************// -void ChainCallback::onChainCombat(std::shared_ptr creature, uint8_t &maxTargets, uint8_t &chainDistance, bool &backtracking) const { +void ChainCallback::getChainValues(const std::shared_ptr &creature, uint8_t &maxTargets, uint8_t &chainDistance, bool &backtracking) { + if (m_fromLua) { + onChainCombat(creature, maxTargets, chainDistance, backtracking); + return; + } + + if (m_chainTargets && m_chainDistance) { + maxTargets = m_chainTargets; + chainDistance = m_chainDistance; + backtracking = m_backtracking; + } +} +void ChainCallback::onChainCombat(std::shared_ptr creature, uint8_t &maxTargets, uint8_t &chainDistance, bool &backtracking) { // onChainCombat(creature) if (!scriptInterface->reserveScriptEnv()) { g_logger().error("[ChainCallback::onTargetCombat - Creature {}] " diff --git a/src/creatures/combat/combat.hpp b/src/creatures/combat/combat.hpp index 71554b376..6a79455c7 100644 --- a/src/creatures/combat/combat.hpp +++ b/src/creatures/combat/combat.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -20,6 +20,7 @@ class Item; class Spell; class Player; class MatrixArea; +class Weapon; // for luascript callback class ValueCallback final : public CallBack { @@ -59,7 +60,22 @@ class TargetCallback final : public CallBack { class ChainCallback final : public CallBack { public: - void onChainCombat(std::shared_ptr creature, uint8_t &chainTargets, uint8_t &chainDistance, bool &backtracking) const; + ChainCallback() = default; + ChainCallback(uint8_t &chainTargets, uint8_t &chainDistance, bool &backtracking) : + m_chainDistance(chainDistance), m_chainTargets(chainTargets), m_backtracking(backtracking) { } + + void getChainValues(const std::shared_ptr &creature, uint8_t &maxTargets, uint8_t &chainDistance, bool &backtracking); + void setFromLua(bool fromLua) { + m_fromLua = fromLua; + } + +private: + void onChainCombat(std::shared_ptr creature, uint8_t &chainTargets, uint8_t &chainDistance, bool &backtracking); + + uint8_t m_chainTargets = 0; + uint8_t m_chainDistance = 0; + bool m_backtracking = false; + bool m_fromLua = false; }; class ChainPickerCallback final : public CallBack { @@ -293,6 +309,7 @@ class Combat { bool doCombat(std::shared_ptr caster, const Position &pos) const; bool setCallback(CallBackParam_t key); + void setChainCallback(uint8_t chainTargets, uint8_t chainDistance, bool backtracking); CallBack* getCallback(CallBackParam_t key); bool setParam(CombatParam_t param, uint32_t value); @@ -328,6 +345,9 @@ class Combat { */ void setRuneSpellName(const std::string &value); + void setupChain(const std::shared_ptr &weapon); + bool doCombatChain(std::shared_ptr caster, std::shared_ptr target, bool aggressive) const; + private: static void doChainEffect(const Position &origin, const Position &pos, uint8_t effect); static std::vector>> pickChainTargets(std::shared_ptr caster, const CombatParams ¶ms, uint8_t chainDistance, uint8_t maxTargets, bool aggressive, bool backtracking, std::shared_ptr initialTarget = nullptr); @@ -376,8 +396,6 @@ class Combat { int32_t getLevelFormula(std::shared_ptr player, const std::shared_ptr wheelSpell, const CombatDamage &damage) const; CombatDamage getCombatDamage(std::shared_ptr creature, std::shared_ptr target) const; - bool doCombatChain(std::shared_ptr caster, std::shared_ptr target, bool aggressive) const; - // configureable CombatParams params; diff --git a/src/creatures/combat/condition.cpp b/src/creatures/combat/condition.cpp index 9549abd40..d54a3deb1 100644 --- a/src/creatures/combat/condition.cpp +++ b/src/creatures/combat/condition.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/combat/condition.hpp b/src/creatures/combat/condition.hpp index 28d637b8b..1cffba99b 100644 --- a/src/creatures/combat/condition.hpp +++ b/src/creatures/combat/condition.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/combat/spells.cpp b/src/creatures/combat/spells.cpp index e41c1cf51..60cc5e7d2 100644 --- a/src/creatures/combat/spells.cpp +++ b/src/creatures/combat/spells.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/combat/spells.hpp b/src/creatures/combat/spells.hpp index 804ec62f9..cd1a7aaa6 100644 --- a/src/creatures/combat/spells.hpp +++ b/src/creatures/combat/spells.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -191,8 +191,14 @@ class Spell : public BaseSpell { [[nodiscard]] const VocSpellMap &getVocMap() const { return vocSpellMap; } - void addVocMap(uint16_t n, bool b) { - vocSpellMap[n] = b; + void addVocMap(uint16_t vocationId, bool b) { + if (vocationId == 0XFFFF) { + g_logger().error("Vocation overflow for spell: {}", getName()); + return; + } + + g_logger().trace("Adding spell: {} to voc id: {}", getName(), vocationId); + vocSpellMap[vocationId] = b; } SpellGroup_t getGroup() { diff --git a/src/creatures/creature.cpp b/src/creatures/creature.cpp index b917a23d6..d17ee4544 100644 --- a/src/creatures/creature.cpp +++ b/src/creatures/creature.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/creature.hpp b/src/creatures/creature.hpp index a21403edc..4acbacb57 100644 --- a/src/creatures/creature.hpp +++ b/src/creatures/creature.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/creatures_definitions.hpp b/src/creatures/creatures_definitions.hpp index 674f0b677..46fb5fe59 100644 --- a/src/creatures/creatures_definitions.hpp +++ b/src/creatures/creatures_definitions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/interactions/chat.cpp b/src/creatures/interactions/chat.cpp index ec3472d7b..f30c3f219 100644 --- a/src/creatures/interactions/chat.cpp +++ b/src/creatures/interactions/chat.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/interactions/chat.hpp b/src/creatures/interactions/chat.hpp index 36768fa4f..022b3f540 100644 --- a/src/creatures/interactions/chat.hpp +++ b/src/creatures/interactions/chat.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/monsters/monster.cpp b/src/creatures/monsters/monster.cpp index 6fbed2252..5f31c67aa 100644 --- a/src/creatures/monsters/monster.cpp +++ b/src/creatures/monsters/monster.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/monsters/monster.hpp b/src/creatures/monsters/monster.hpp index be95bb80d..edf387416 100644 --- a/src/creatures/monsters/monster.hpp +++ b/src/creatures/monsters/monster.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/monsters/monsters.cpp b/src/creatures/monsters/monsters.cpp index 463238e91..190c14c76 100644 --- a/src/creatures/monsters/monsters.cpp +++ b/src/creatures/monsters/monsters.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/monsters/monsters.hpp b/src/creatures/monsters/monsters.hpp index ab18ca6c9..0fa2a3d88 100644 --- a/src/creatures/monsters/monsters.hpp +++ b/src/creatures/monsters/monsters.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/monsters/spawns/spawn_monster.cpp b/src/creatures/monsters/spawns/spawn_monster.cpp index c0f2fb382..aec222d72 100644 --- a/src/creatures/monsters/spawns/spawn_monster.cpp +++ b/src/creatures/monsters/spawns/spawn_monster.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/monsters/spawns/spawn_monster.hpp b/src/creatures/monsters/spawns/spawn_monster.hpp index bf83e5dec..800b36fda 100644 --- a/src/creatures/monsters/spawns/spawn_monster.hpp +++ b/src/creatures/monsters/spawns/spawn_monster.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/npcs/npc.cpp b/src/creatures/npcs/npc.cpp index 7fe61491e..0f9f60cec 100644 --- a/src/creatures/npcs/npc.cpp +++ b/src/creatures/npcs/npc.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/npcs/npc.hpp b/src/creatures/npcs/npc.hpp index 393b24867..2d4e87ac7 100644 --- a/src/creatures/npcs/npc.hpp +++ b/src/creatures/npcs/npc.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/npcs/npcs.cpp b/src/creatures/npcs/npcs.cpp index 50fff3aa7..ecfd2750a 100644 --- a/src/creatures/npcs/npcs.cpp +++ b/src/creatures/npcs/npcs.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/npcs/npcs.hpp b/src/creatures/npcs/npcs.hpp index 48170a94f..1a984abf2 100644 --- a/src/creatures/npcs/npcs.hpp +++ b/src/creatures/npcs/npcs.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/npcs/spawns/spawn_npc.cpp b/src/creatures/npcs/spawns/spawn_npc.cpp index 68fa0c240..7fd99d6c3 100644 --- a/src/creatures/npcs/spawns/spawn_npc.cpp +++ b/src/creatures/npcs/spawns/spawn_npc.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/npcs/spawns/spawn_npc.hpp b/src/creatures/npcs/spawns/spawn_npc.hpp index dccc1a75e..d02a83e80 100644 --- a/src/creatures/npcs/spawns/spawn_npc.hpp +++ b/src/creatures/npcs/spawns/spawn_npc.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/achievement/player_achievement.cpp b/src/creatures/players/achievement/player_achievement.cpp new file mode 100644 index 000000000..18e2db3d3 --- /dev/null +++ b/src/creatures/players/achievement/player_achievement.cpp @@ -0,0 +1,136 @@ +/** + * Canary - A free and open-source MMORPG server emulator + * Copyright (©) 2019-2024 OpenTibiaBR + * Repository: https://github.com/opentibiabr/canary + * License: https://github.com/opentibiabr/canary/blob/main/LICENSE + * Contributors: https://github.com/opentibiabr/canary/graphs/contributors + * Website: https://docs.opentibiabr.com/ + */ + +#include "pch.hpp" + +#include "player_achievement.hpp" + +#include "creatures/players/player.hpp" +#include "game/game.hpp" +#include "kv/kv.hpp" + +PlayerAchievement::PlayerAchievement(Player &player) : + m_player(player) { + auto unlockedAchievements = getUnlockedKV()->keys(); + for (const auto &achievementName : unlockedAchievements) { + const Achievement &achievement = g_game().getAchievementByName(achievementName); + if (achievement.id == 0) { + g_logger().error("[{}] - Achievement {} not found.", __FUNCTION__, achievementName); + continue; + } + + m_achievementsUnlocked.push_back({ achievement.id, getUnlockedKV()->get(achievementName)->getNumber() }); + } +} + +bool PlayerAchievement::add(uint16_t id, bool message /* = true*/, uint32_t timestamp /* = 0*/) { + if (isUnlocked(id)) { + return false; + } + + const Achievement &achievement = g_game().getAchievementById(id); + if (achievement.id == 0) { + return false; + } + + if (message) { + m_player.sendTextMessage(MESSAGE_EVENT_ADVANCE, fmt::format("Congratulations! You earned the achievement {}.", achievement.name)); + } + + addPoints(achievement.points); + int toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000); + getUnlockedKV()->set(achievement.name, toSaveTimeStamp); + m_achievementsUnlocked.push_back({ achievement.id, toSaveTimeStamp }); + m_achievementsUnlocked.shrink_to_fit(); + return true; +} + +bool PlayerAchievement::remove(uint16_t id) { + if (!isUnlocked(id)) { + return false; + } + + Achievement achievement = g_game().getAchievementById(id); + if (achievement.id == 0) { + return false; + } + + if (auto it = std::find_if(m_achievementsUnlocked.begin(), m_achievementsUnlocked.end(), [id](auto achievement_it) { + return achievement_it.first == id; + }); + it != m_achievementsUnlocked.end()) { + getUnlockedKV()->remove(achievement.name); + m_achievementsUnlocked.erase(it); + removePoints(achievement.points); + m_achievementsUnlocked.shrink_to_fit(); + return true; + } + + return false; +} + +bool PlayerAchievement::isUnlocked(uint16_t id) const { + if (id == 0) { + return false; + } + + if (auto it = std::find_if(m_achievementsUnlocked.begin(), m_achievementsUnlocked.end(), [id](auto achievement_it) { + return achievement_it.first == id; + }); + it != m_achievementsUnlocked.end()) { + return true; + } + + return false; +} + +uint16_t PlayerAchievement::getPoints() const { + return m_player.kv()->scoped("achievements")->get("points")->getNumber(); +} + +void PlayerAchievement::addPoints(uint16_t toAddPoints) { + auto oldPoints = getPoints(); + m_player.kv()->scoped("achievements")->set("points", oldPoints + toAddPoints); +} + +void PlayerAchievement::removePoints(uint16_t points) { + auto oldPoints = getPoints(); + m_player.kv()->scoped("achievements")->set("points", oldPoints - std::min(oldPoints, points)); +} + +std::vector> PlayerAchievement::getUnlockedAchievements() const { + return m_achievementsUnlocked; +} + +void PlayerAchievement::sendUnlockedSecretAchievements() { + std::vector> m_achievementsUnlocked; + uint16_t unlockedSecret = 0; + for (const auto &[achievId, achievCreatedTime] : getUnlockedAchievements()) { + Achievement achievement = g_game().getAchievementById(achievId); + if (achievement.id == 0) { + continue; + } + + if (achievement.secret) { + unlockedSecret++; + } + + m_achievementsUnlocked.push_back({ achievement, achievCreatedTime }); + } + + m_player.sendCyclopediaCharacterAchievements(unlockedSecret, m_achievementsUnlocked); +} + +const std::shared_ptr &PlayerAchievement::getUnlockedKV() { + if (m_unlockedKV == nullptr) { + m_unlockedKV = m_player.kv()->scoped("achievements")->scoped("unlocked"); + } + + return m_unlockedKV; +} diff --git a/src/creatures/players/achievement/player_achievement.hpp b/src/creatures/players/achievement/player_achievement.hpp new file mode 100644 index 000000000..8959ce429 --- /dev/null +++ b/src/creatures/players/achievement/player_achievement.hpp @@ -0,0 +1,47 @@ +/** + * Canary - A free and open-source MMORPG server emulator + * Copyright (©) 2019-2024 OpenTibiaBR + * Repository: https://github.com/opentibiabr/canary + * License: https://github.com/opentibiabr/canary/blob/main/LICENSE + * Contributors: https://github.com/opentibiabr/canary/graphs/contributors + * Website: https://docs.opentibiabr.com/ + */ + +#pragma once + +class Player; +class KV; + +struct Achievement { + Achievement() { } + + std::string name; + std::string description; + + bool secret = false; + + uint8_t grade = 0; + uint8_t points = 0; + + uint16_t id = 0; +}; + +class PlayerAchievement { +public: + explicit PlayerAchievement(Player &player); + bool add(uint16_t id, bool message = true, uint32_t timestamp = 0); + bool remove(uint16_t id); + bool isUnlocked(uint16_t id) const; + uint16_t getPoints() const; + void addPoints(uint16_t toAddPoints); + void removePoints(uint16_t toRemovePoints); + std::vector> getUnlockedAchievements() const; + void sendUnlockedSecretAchievements(); + const std::shared_ptr &getUnlockedKV(); + +private: + // {achievement ID, time when it was unlocked} + std::shared_ptr m_unlockedKV; + std::vector> m_achievementsUnlocked; + Player &m_player; +}; diff --git a/src/creatures/players/grouping/familiars.cpp b/src/creatures/players/grouping/familiars.cpp index 58b0116fb..538519685 100644 --- a/src/creatures/players/grouping/familiars.cpp +++ b/src/creatures/players/grouping/familiars.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/grouping/familiars.hpp b/src/creatures/players/grouping/familiars.hpp index 012cca1e9..aae9b34e2 100644 --- a/src/creatures/players/grouping/familiars.hpp +++ b/src/creatures/players/grouping/familiars.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/grouping/groups.cpp b/src/creatures/players/grouping/groups.cpp index 639837dab..40dd13bc3 100644 --- a/src/creatures/players/grouping/groups.cpp +++ b/src/creatures/players/grouping/groups.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/grouping/groups.hpp b/src/creatures/players/grouping/groups.hpp index f27ca61ad..3d7456417 100644 --- a/src/creatures/players/grouping/groups.hpp +++ b/src/creatures/players/grouping/groups.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/grouping/guild.cpp b/src/creatures/players/grouping/guild.cpp index 14b59b8e9..aca512f28 100644 --- a/src/creatures/players/grouping/guild.cpp +++ b/src/creatures/players/grouping/guild.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/grouping/guild.hpp b/src/creatures/players/grouping/guild.hpp index ee16c469c..834eb0325 100644 --- a/src/creatures/players/grouping/guild.hpp +++ b/src/creatures/players/grouping/guild.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/grouping/party.cpp b/src/creatures/players/grouping/party.cpp index e78e4eddd..880fc7759 100644 --- a/src/creatures/players/grouping/party.cpp +++ b/src/creatures/players/grouping/party.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/grouping/party.hpp b/src/creatures/players/grouping/party.hpp index d4c0cea0b..a356d1a03 100644 --- a/src/creatures/players/grouping/party.hpp +++ b/src/creatures/players/grouping/party.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/grouping/team_finder.hpp b/src/creatures/players/grouping/team_finder.hpp index 609ce0f67..123ce7c07 100644 --- a/src/creatures/players/grouping/team_finder.hpp +++ b/src/creatures/players/grouping/team_finder.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/highscore_category.hpp b/src/creatures/players/highscore_category.hpp new file mode 100644 index 000000000..b387199f3 --- /dev/null +++ b/src/creatures/players/highscore_category.hpp @@ -0,0 +1,19 @@ +/** + * Canary - A free and open-source MMORPG server emulator + * Copyright (©) 2019-2024 OpenTibiaBR + * Repository: https://github.com/opentibiabr/canary + * License: https://github.com/opentibiabr/canary/blob/main/LICENSE + * Contributors: https://github.com/opentibiabr/canary/graphs/contributors + * Website: https://docs.opentibiabr.com/ + */ + +#pragma once + +struct HighscoreCategory { + HighscoreCategory(const std::string &name, uint8_t id) : + m_name(name), + m_id(id) { } + + std::string m_name; + uint8_t m_id; +}; diff --git a/src/creatures/players/imbuements/imbuements.cpp b/src/creatures/players/imbuements/imbuements.cpp index 093eae3c9..ed312dbf8 100644 --- a/src/creatures/players/imbuements/imbuements.cpp +++ b/src/creatures/players/imbuements/imbuements.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/imbuements/imbuements.hpp b/src/creatures/players/imbuements/imbuements.hpp index 69c5219a0..265e813aa 100644 --- a/src/creatures/players/imbuements/imbuements.hpp +++ b/src/creatures/players/imbuements/imbuements.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/management/ban.cpp b/src/creatures/players/management/ban.cpp index 3315836eb..d81045c53 100644 --- a/src/creatures/players/management/ban.cpp +++ b/src/creatures/players/management/ban.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/management/ban.hpp b/src/creatures/players/management/ban.hpp index 576f2f16a..6fdb94296 100644 --- a/src/creatures/players/management/ban.hpp +++ b/src/creatures/players/management/ban.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/management/waitlist.cpp b/src/creatures/players/management/waitlist.cpp index f2bfa8e42..345c20f26 100644 --- a/src/creatures/players/management/waitlist.cpp +++ b/src/creatures/players/management/waitlist.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/management/waitlist.hpp b/src/creatures/players/management/waitlist.hpp index 28b65c7ca..24752f264 100644 --- a/src/creatures/players/management/waitlist.hpp +++ b/src/creatures/players/management/waitlist.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index d89656502..289862920 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -15,6 +15,7 @@ #include "creatures/monsters/monsters.hpp" #include "creatures/players/player.hpp" #include "creatures/players/wheel/player_wheel.hpp" +#include "creatures/players/achievement/player_achievement.hpp" #include "creatures/players/storages/storages.hpp" #include "game/game.hpp" #include "game/modal_window/modal_window.hpp" @@ -47,6 +48,7 @@ Player::Player(ProtocolGame_ptr p) : inbox(std::make_shared(ITEM_INBOX)), client(std::move(p)) { m_wheelPlayer = std::make_unique(*this); + m_playerAchievement = std::make_unique(*this); } Player::~Player() { @@ -2188,7 +2190,7 @@ void Player::onThink(uint32_t interval) { } else if (client && idleTime == 60000 * kickAfterMinutes) { std::ostringstream ss; ss << "There was no variation in your behaviour for " << kickAfterMinutes << " minutes. You will be disconnected in one minute if there is no change in your actions until then."; - client->sendTextMessage(TextMessage(MESSAGE_ADMINISTRADOR, ss.str())); + client->sendTextMessage(TextMessage(MESSAGE_ADMINISTRATOR, ss.str())); } } @@ -2667,6 +2669,11 @@ BlockType_t Player::blockHit(std::shared_ptr attacker, CombatType_t co } void Player::death(std::shared_ptr lastHitCreature) { + if (!g_configManager().getBoolean(TOGGLE_MOUNT_IN_PZ, __FUNCTION__) && isMounted()) { + dismount(); + g_game().internalCreatureChangeOutfit(getPlayer(), defaultOutfit); + } + loginPosition = town->getTemplePosition(); g_game().sendSingleSoundEffect(static_self_cast()->getPosition(), sex == PLAYERSEX_FEMALE ? SoundEffect_t::HUMAN_FEMALE_DEATH : SoundEffect_t::HUMAN_MALE_DEATH, getPlayer()); @@ -3175,12 +3182,18 @@ ReturnValue Player::queryAdd(int32_t index, const std::shared_ptr &thing, ReturnValue ret = RETURNVALUE_NOERROR; const int32_t &slotPosition = item->getSlotPosition(); - if ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) { - ret = RETURNVALUE_CANNOTBEDRESSED; - } else if (slotPosition & SLOTP_TWO_HAND) { - ret = RETURNVALUE_PUTTHISOBJECTINBOTHHANDS; - } else if ((slotPosition & SLOTP_RIGHT) || (slotPosition & SLOTP_LEFT)) { - ret = RETURNVALUE_CANNOTBEDRESSED; + + bool allowPutItemsOnAmmoSlot = g_configManager().getBoolean(ENABLE_PLAYER_PUT_ITEM_IN_AMMO_SLOT, __FUNCTION__); + if (allowPutItemsOnAmmoSlot && index == CONST_SLOT_AMMO) { + ret = RETURNVALUE_NOERROR; + } else { + if ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) { + ret = RETURNVALUE_CANNOTBEDRESSED; + } else if (slotPosition & SLOTP_TWO_HAND) { + ret = RETURNVALUE_PUTTHISOBJECTINBOTHHANDS; + } else if ((slotPosition & SLOTP_RIGHT) || (slotPosition & SLOTP_LEFT)) { + ret = RETURNVALUE_CANNOTBEDRESSED; + } } switch (index) { @@ -3322,8 +3335,12 @@ ReturnValue Player::queryAdd(int32_t index, const std::shared_ptr &thing, } case CONST_SLOT_AMMO: { - if ((slotPosition & SLOTP_AMMO)) { + if (allowPutItemsOnAmmoSlot) { ret = RETURNVALUE_NOERROR; + } else { + if ((slotPosition & SLOTP_AMMO)) { + ret = RETURNVALUE_NOERROR; + } } break; } @@ -6107,6 +6124,12 @@ void Player::sendClosePrivate(uint16_t channelId) { } } +void Player::sendCyclopediaCharacterAchievements(uint16_t secretsUnlocked, std::vector> achievementsUnlocked) { + if (client) { + client->sendCyclopediaCharacterAchievements(secretsUnlocked, achievementsUnlocked); + } +} + uint64_t Player::getMoney() const { std::vector> containers; uint64_t moneyCount = 0; @@ -7933,6 +7956,15 @@ const std::unique_ptr &Player::wheel() const { return m_wheelPlayer; } +// Achievement interface +std::unique_ptr &Player::achiev() { + return m_playerAchievement; +} + +const std::unique_ptr &Player::achiev() const { + return m_playerAchievement; +} + void Player::sendLootMessage(const std::string &message) const { auto party = getParty(); if (!party) { diff --git a/src/creatures/players/player.hpp b/src/creatures/players/player.hpp index 78ec3b9ec..d37214911 100644 --- a/src/creatures/players/player.hpp +++ b/src/creatures/players/player.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -48,10 +48,12 @@ class PreySlot; class TaskHuntingSlot; class Spell; class PlayerWheel; +class PlayerAchievement; class Spectators; class Account; struct ModalWindow; +struct Achievement; struct ForgeHistory { ForgeAction_t actionType = ForgeAction_t::FUSION; @@ -1623,11 +1625,7 @@ class Player final : public Creature, public Cylinder, public Bankable { client->sendCyclopediaCharacterRecentPvPKills(page, pages, entries); } } - void sendCyclopediaCharacterAchievements() { - if (client) { - client->sendCyclopediaCharacterAchievements(); - } - } + void sendCyclopediaCharacterAchievements(uint16_t secretsUnlocked, std::vector> achievementsUnlocked); void sendCyclopediaCharacterItemSummary() { if (client) { client->sendCyclopediaCharacterItemSummary(); @@ -2581,10 +2579,14 @@ class Player final : public Creature, public Cylinder, public Bankable { */ std::vector> getEquippedItems() const; - // Player wheel methods interface + // Player wheel interface std::unique_ptr &wheel(); const std::unique_ptr &wheel() const; + // Player achievement interface + std::unique_ptr &achiev(); + const std::unique_ptr &achiev() const; + void sendLootMessage(const std::string &message) const; std::shared_ptr getLootPouch(); @@ -2974,8 +2976,10 @@ class Player final : public Creature, public Cylinder, public Bankable { friend class PlayerWheel; friend class IOLoginDataLoad; friend class IOLoginDataSave; + friend class PlayerAchievement; std::unique_ptr m_wheelPlayer; + std::unique_ptr m_playerAchievement; std::mutex quickLootMutex; diff --git a/src/creatures/players/storages/storages.cpp b/src/creatures/players/storages/storages.cpp index 8476fa978..7fe925ce9 100644 --- a/src/creatures/players/storages/storages.cpp +++ b/src/creatures/players/storages/storages.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/storages/storages.hpp b/src/creatures/players/storages/storages.hpp index afe79a8ad..afc9fe14f 100644 --- a/src/creatures/players/storages/storages.hpp +++ b/src/creatures/players/storages/storages.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/vocations/vocation.cpp b/src/creatures/players/vocations/vocation.cpp index fc07cea98..c9a276a64 100644 --- a/src/creatures/players/vocations/vocation.cpp +++ b/src/creatures/players/vocations/vocation.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/vocations/vocation.hpp b/src/creatures/players/vocations/vocation.hpp index 8f81e3805..a658e21ec 100644 --- a/src/creatures/players/vocations/vocation.hpp +++ b/src/creatures/players/vocations/vocation.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/wheel/player_wheel.cpp b/src/creatures/players/wheel/player_wheel.cpp index 9151896cb..b2fa39960 100644 --- a/src/creatures/players/wheel/player_wheel.cpp +++ b/src/creatures/players/wheel/player_wheel.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/wheel/player_wheel.hpp b/src/creatures/players/wheel/player_wheel.hpp index 13a65144c..3ede17c33 100644 --- a/src/creatures/players/wheel/player_wheel.hpp +++ b/src/creatures/players/wheel/player_wheel.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/wheel/wheel_definitions.hpp b/src/creatures/players/wheel/wheel_definitions.hpp index 0f40d32bf..8432e9dca 100644 --- a/src/creatures/players/wheel/wheel_definitions.hpp +++ b/src/creatures/players/wheel/wheel_definitions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/wheel/wheel_gems.cpp b/src/creatures/players/wheel/wheel_gems.cpp index d7957a9bb..c3653298c 100644 --- a/src/creatures/players/wheel/wheel_gems.cpp +++ b/src/creatures/players/wheel/wheel_gems.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/creatures/players/wheel/wheel_gems.hpp b/src/creatures/players/wheel/wheel_gems.hpp index fa47fe12a..762684cb3 100644 --- a/src/creatures/players/wheel/wheel_gems.hpp +++ b/src/creatures/players/wheel/wheel_gems.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/database/database.cpp b/src/database/database.cpp index c548b1361..f226587c5 100644 --- a/src/database/database.cpp +++ b/src/database/database.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/database/database.hpp b/src/database/database.hpp index 9554b2f0b..2a27c3015 100644 --- a/src/database/database.hpp +++ b/src/database/database.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/database/database_definitions.hpp b/src/database/database_definitions.hpp index 4e46313fe..8fe184951 100644 --- a/src/database/database_definitions.hpp +++ b/src/database/database_definitions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/database/databasemanager.cpp b/src/database/databasemanager.cpp index 373a91fa2..cbcc116dd 100644 --- a/src/database/databasemanager.cpp +++ b/src/database/databasemanager.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/database/databasemanager.hpp b/src/database/databasemanager.hpp index 5b66d054d..9be5bb0eb 100644 --- a/src/database/databasemanager.hpp +++ b/src/database/databasemanager.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/database/databasetasks.cpp b/src/database/databasetasks.cpp index 43370593b..6d43992ac 100644 --- a/src/database/databasetasks.cpp +++ b/src/database/databasetasks.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/database/databasetasks.hpp b/src/database/databasetasks.hpp index 90a29d151..6922dfc56 100644 --- a/src/database/databasetasks.hpp +++ b/src/database/databasetasks.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/declarations.hpp b/src/declarations.hpp index 0e6980224..294d9a813 100644 --- a/src/declarations.hpp +++ b/src/declarations.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/enums/account_coins.hpp b/src/enums/account_coins.hpp index 65fccac4e..0980500aa 100644 --- a/src/enums/account_coins.hpp +++ b/src/enums/account_coins.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/enums/account_errors.hpp b/src/enums/account_errors.hpp index 8a9bc6ee3..d56866181 100644 --- a/src/enums/account_errors.hpp +++ b/src/enums/account_errors.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/enums/account_group_type.hpp b/src/enums/account_group_type.hpp index 6f9e9390a..778e706a2 100644 --- a/src/enums/account_group_type.hpp +++ b/src/enums/account_group_type.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/enums/account_type.hpp b/src/enums/account_type.hpp index 5b4286a83..df76c4a28 100644 --- a/src/enums/account_type.hpp +++ b/src/enums/account_type.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/enums/forge_conversion.hpp b/src/enums/forge_conversion.hpp index 8f84a453b..8d990081d 100644 --- a/src/enums/forge_conversion.hpp +++ b/src/enums/forge_conversion.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/enums/item_attribute.hpp b/src/enums/item_attribute.hpp index 1f6bccf16..adc49c11a 100644 --- a/src/enums/item_attribute.hpp +++ b/src/enums/item_attribute.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/enums/lua_variant_type.hpp b/src/enums/lua_variant_type.hpp index 7f7ac216d..32dac39dc 100644 --- a/src/enums/lua_variant_type.hpp +++ b/src/enums/lua_variant_type.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/enums/object_category.hpp b/src/enums/object_category.hpp index fe3e4422a..74191bf9b 100644 --- a/src/enums/object_category.hpp +++ b/src/enums/object_category.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/game/bank/bank.cpp b/src/game/bank/bank.cpp index 713ee6457..5f8db90fd 100644 --- a/src/game/bank/bank.cpp +++ b/src/game/bank/bank.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/game/bank/bank.hpp b/src/game/bank/bank.hpp index f4ebbb7be..9e65a55ae 100644 --- a/src/game/bank/bank.hpp +++ b/src/game/bank/bank.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/game/functions/game_reload.cpp b/src/game/functions/game_reload.cpp index f40e9cf90..887877bb1 100644 --- a/src/game/functions/game_reload.cpp +++ b/src/game/functions/game_reload.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -61,6 +61,15 @@ uint8_t GameReload::getReloadNumber(Reload_t reloadTypes) const { return magic_enum::enum_integer(reloadTypes); } +// Helper function for logging reload status +void logReloadStatus(const std::string &name, bool result) { + if (result) { + g_logger().info("Reloaded: {}", name); + } else { + g_logger().error("Failed to reload: {}", name); + } +} + /* * From here down have the private members functions * These should only be used within the class itself @@ -72,98 +81,123 @@ bool GameReload::reloadAll() const { reloadResults.reserve(magic_enum::enum_count()); for (auto value : magic_enum::enum_values()) { - g_logger().info("Reloading: {}", magic_enum::enum_name(value)); - if (value == Reload_t::RELOAD_TYPE_ALL) { - continue; + const auto name = magic_enum::enum_name(value); + g_logger().info("Reloading: {}", name); + if (value != Reload_t::RELOAD_TYPE_ALL) { + reloadResults.push_back(init(value)); } - - reloadResults.push_back(init(value)); } return std::ranges::any_of(reloadResults, [](bool result) { return result; }); } bool GameReload::reloadChat() const { - return g_chat().load(); + const bool result = g_chat().load(); + logReloadStatus("Chat", result); + return result; } bool GameReload::reloadConfig() const { - return g_configManager().reload(); + const bool result = g_configManager().reload(); + logReloadStatus("Config", result); + return result; } bool GameReload::reloadEvents() const { - return g_events().loadFromXml(); + const bool result = g_events().loadFromXml(); + logReloadStatus("Events", result); + return result; } bool GameReload::reloadCore() const { - if (auto coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__); - g_luaEnvironment().loadFile(coreFolder + "/core.lua", "core.lua") == 0) { - // Reload scripts lib - auto datapackFolder = g_configManager().getString(DATA_DIRECTORY, __FUNCTION__); - if (!g_scripts().loadScripts(datapackFolder + "/scripts/lib", true, false)) { - return false; + const auto &coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__); + const bool coreLoaded = g_luaEnvironment().loadFile(coreFolder + "/core.lua", "core.lua") == 0; + + if (coreLoaded) { + const auto &datapackFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__); + const bool scriptsLoaded = g_scripts().loadScripts(coreFolder + "/scripts/lib", true, false); + if (scriptsLoaded) { + return true; } - - return true; } + + logReloadStatus("Core", false); return false; } bool GameReload::reloadImbuements() const { - return g_imbuements().reload(); + const bool result = g_imbuements().reload(); + logReloadStatus("Imbuements", result); + return result; } bool GameReload::reloadItems() const { - return Item::items.reload(); + const bool result = Item::items.reload(); + logReloadStatus("Items", result); + return result; } bool GameReload::reloadModules() const { - return g_modules().reload(); + const bool result = g_modules().reload(); + logReloadStatus("Modules", result); + return result; } bool GameReload::reloadMonsters() const { - // Clear registered MonsterType vector g_monsters().clear(); - // Resets monster spells to prevent the spell from being incorrectly cleared from memory - auto datapackFolder = g_configManager().getString(DATA_DIRECTORY, __FUNCTION__); - if (!g_scripts().loadScripts(datapackFolder + "/scripts/lib", true, false)) { - return false; - } + const auto &datapackFolder = g_configManager().getString(DATA_DIRECTORY, __FUNCTION__); + const auto &coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__); - if (g_scripts().loadScripts(datapackFolder + "/monster", false, true) && g_scripts().loadScripts(datapackFolder + "/scripts/lib", true, true)) { + const bool scriptsLoaded = g_scripts().loadScripts(coreFolder + "/scripts/lib", true, false); + const bool monsterScriptsLoaded = g_scripts().loadScripts(datapackFolder + "/monster", false, true); + + if (scriptsLoaded && monsterScriptsLoaded) { + logReloadStatus("Monsters", true); return true; + } else { + logReloadStatus("Monsters", false); + return false; } - return false; } bool GameReload::reloadMounts() const { - return g_game().mounts.reload(); + const bool result = g_game().mounts.reload(); + logReloadStatus("Mounts", result); + return result; } bool GameReload::reloadNpcs() const { - return g_npcs().reload(); + const bool result = g_npcs().reload(); + logReloadStatus("NPCs", result); + return result; } bool GameReload::reloadRaids() const { - return g_game().raids.reload() && g_game().raids.startup(); + const bool result = g_game().raids.reload() && g_game().raids.startup(); + logReloadStatus("Raids", result); + return result; } bool GameReload::reloadScripts() const { g_scripts().clearAllScripts(); Zone::clearZones(); - // Reset scripts lib to prevent the objects from being incorrectly cleared from memory - auto datapackFolder = g_configManager().getString(DATA_DIRECTORY, __FUNCTION__); - g_scripts().loadScripts(datapackFolder + "/scripts/lib", true, false); - auto coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__); + + const auto &datapackFolder = g_configManager().getString(DATA_DIRECTORY, __FUNCTION__); + const auto &coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__); + + g_scripts().loadScripts(coreFolder + "/scripts/lib", true, false); g_scripts().loadScripts(datapackFolder + "/scripts", false, true); g_scripts().loadScripts(coreFolder + "/scripts", false, true); // It should come last, after everything else has been cleaned up. reloadMonsters(); reloadNpcs(); + logReloadStatus("Scripts", true); return true; } bool GameReload::reloadGroups() const { - return g_game().groups.reload(); + const bool result = g_game().groups.reload(); + logReloadStatus("Groups", result); + return result; } diff --git a/src/game/functions/game_reload.hpp b/src/game/functions/game_reload.hpp index 29cbac4b8..e2f3789cf 100644 --- a/src/game/functions/game_reload.hpp +++ b/src/game/functions/game_reload.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -64,7 +64,6 @@ class GameReload : public Game { bool reloadNpcs() const; bool reloadRaids() const; bool reloadScripts() const; - bool reloadTalkaction() const; bool reloadGroups() const; }; diff --git a/src/game/game.cpp b/src/game/game.cpp index b2186f6a6..c17f16b1a 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -9,6 +9,8 @@ #include "pch.hpp" +#include "game/game.hpp" + #include "lua/creature/actions.hpp" #include "items/bed.hpp" #include "creatures/creature.hpp" @@ -16,7 +18,7 @@ #include "lua/creature/events.hpp" #include "lua/callbacks/event_callback.hpp" #include "lua/callbacks/events_callbacks.hpp" -#include "game/game.hpp" +#include "creatures/players/highscore_category.hpp" #include "game/zones/zone.hpp" #include "lua/global/globalevent.hpp" #include "io/iologindata.hpp" @@ -34,6 +36,7 @@ #include "items/weapons/weapons.hpp" #include "creatures/players/imbuements/imbuements.hpp" #include "creatures/players/wheel/player_wheel.hpp" +#include "creatures/players/achievement/player_achievement.hpp" #include "creatures/npcs/npc.hpp" #include "server/network/webhook/webhook.hpp" #include "server/network/protocol/protocollogin.hpp" @@ -50,6 +53,23 @@ #include +enum class HighscoreCategories_t : uint8_t { + EXPERIENCE = 0, + FIST_FIGHTING = 1, + CLUB_FIGHTING = 2, + SWORD_FIGHTING = 3, + AXE_FIGHTING = 4, + DISTANCE_FIGHTING = 5, + SHIELDING = 6, + FISHING = 7, + MAGIC_LEVEL = 8, + LOYALTY = 9, + ACHIEVEMENTS = 10, + CHARMS = 11, + DROME = 12, + GOSHNAR = 13, +}; + namespace InternalGame { void sendBlockEffect(BlockType_t blockType, CombatType_t combatType, const Position &targetPos, std::shared_ptr source) { if (blockType == BLOCK_DEFENSE) { @@ -186,6 +206,35 @@ Game::Game() { // Create instance of IOWheel to Game class m_IOWheel = std::make_unique(); + + m_highscoreCategoriesNames = { + { static_cast(HighscoreCategories_t::ACHIEVEMENTS), "Achievement Points" }, + { static_cast(HighscoreCategories_t::AXE_FIGHTING), "Axe Fighting" }, + { static_cast(HighscoreCategories_t::CHARMS), "Charm Points" }, + { static_cast(HighscoreCategories_t::CLUB_FIGHTING), "Club Fighting" }, + { static_cast(HighscoreCategories_t::EXPERIENCE), "Experience Points" }, + { static_cast(HighscoreCategories_t::DISTANCE_FIGHTING), "Distance Fighting" }, + { static_cast(HighscoreCategories_t::DROME), "Drome Score" }, + { static_cast(HighscoreCategories_t::FISHING), "Fishing" }, + { static_cast(HighscoreCategories_t::FIST_FIGHTING), "Fist Fighting" }, + { static_cast(HighscoreCategories_t::GOSHNAR), "Goshnar's Taint" }, + { static_cast(HighscoreCategories_t::LOYALTY), "Loyalty Points" }, + { static_cast(HighscoreCategories_t::MAGIC_LEVEL), "Magic Level" }, + { static_cast(HighscoreCategories_t::SHIELDING), "Shielding" }, + { static_cast(HighscoreCategories_t::SWORD_FIGHTING), "Sword Fighting" }, + }; + + m_highscoreCategories = { + HighscoreCategory("Experience Points", static_cast(HighscoreCategories_t::EXPERIENCE)), + HighscoreCategory("Fist Fighting", static_cast(HighscoreCategories_t::FIST_FIGHTING)), + HighscoreCategory("Club Fighting", static_cast(HighscoreCategories_t::CLUB_FIGHTING)), + HighscoreCategory("Sword Fighting", static_cast(HighscoreCategories_t::SWORD_FIGHTING)), + HighscoreCategory("Axe Fighting", static_cast(HighscoreCategories_t::AXE_FIGHTING)), + HighscoreCategory("Distance Fighting", static_cast(HighscoreCategories_t::DISTANCE_FIGHTING)), + HighscoreCategory("Shielding", static_cast(HighscoreCategories_t::SHIELDING)), + HighscoreCategory("Fishing", static_cast(HighscoreCategories_t::FISHING)), + HighscoreCategory("Magic Level", static_cast(HighscoreCategories_t::MAGIC_LEVEL)) + }; } Game::~Game() = default; @@ -1570,7 +1619,7 @@ void Game::playerMoveItem(std::shared_ptr player, const Position &fromPo auto toHouseTile = map.getTile(mapToPos)->dynamic_self_cast(); auto fromHouseTile = map.getTile(mapFromPos)->dynamic_self_cast(); if (fromHouseTile && (!toHouseTile || toHouseTile->getHouse()->getId() != fromHouseTile->getHouse()->getId())) { - player->sendCancelMessage("You can't move this item outside a house."); + player->sendCancelMessage("You cannot move this item out of this house."); return; } } @@ -1617,12 +1666,12 @@ ReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::s bool allowAnything = g_configManager().getBoolean(TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, __FUNCTION__); if (!allowAnything && item->getID() != ITEM_GOLD_COIN && item->getID() != ITEM_PLATINUM_COIN && item->getID() != ITEM_CRYSTAL_COIN) { - return RETURNVALUE_CONTAINERNOTENOUGHROOM; + return RETURNVALUE_ITEMCANNOTBEMOVEDPOUCH; } - // prevent move up + // prevent move up from ponch to store inbox. if (!item->canBeMovedToStore() && fromCylinder->getContainer() && fromCylinder->getContainer()->getID() == ITEM_GOLD_POUCH) { - return RETURNVALUE_CONTAINERNOTENOUGHROOM; + return RETURNVALUE_NOTBOUGHTINSTORE; } return RETURNVALUE_NOERROR; @@ -1632,7 +1681,7 @@ ReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::s const auto parentContainer = topParentContainer->getParent() ? topParentContainer->getParent()->getContainer() : nullptr; auto isStoreInbox = parentContainer && parentContainer->isStoreInbox(); if (!item->canBeMovedToStore() && (containerID == ITEM_STORE_INBOX || isStoreInbox)) { - return RETURNVALUE_CONTAINERNOTENOUGHROOM; + return RETURNVALUE_NOTBOUGHTINSTORE; } if (item->isStoreItem()) { @@ -1656,7 +1705,7 @@ ReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::s } if (!isValidMoveItem) { - return RETURNVALUE_NOTPOSSIBLE; + return RETURNVALUE_ITEMCANNOTBEMOVEDTHERE; } if (item->hasOwner() && !item->isOwner(player)) { @@ -1689,7 +1738,7 @@ ReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::s } if (item->isStoreItem() && !house) { - return RETURNVALUE_NOTPOSSIBLE; + return RETURNVALUE_ITEMCANNOTBEMOVEDTHERE; } } } @@ -5236,7 +5285,8 @@ void Game::playerSetManagedContainer(uint32_t playerId, ObjectCategory_t categor } std::shared_ptr container = thing->getContainer(); - if (!container || (container->getID() == ITEM_GOLD_POUCH && category != OBJECTCATEGORY_GOLD && !g_configManager().getBoolean(TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, __FUNCTION__))) { + auto allowConfig = !g_configManager().getBoolean(TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, __FUNCTION__) || !g_configManager().getBoolean(TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY, __FUNCTION__); + if (!container || (container->getID() == ITEM_GOLD_POUCH && category != OBJECTCATEGORY_GOLD) && !allowConfig) { player->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE); return; } @@ -8109,7 +8159,7 @@ void Game::playerCyclopediaCharacterInfo(std::shared_ptr player, uint32_ break; } case CYCLOPEDIA_CHARACTERINFO_ACHIEVEMENTS: - player->sendCyclopediaCharacterAchievements(); + player->achiev()->sendUnlockedSecretAchievements(); break; case CYCLOPEDIA_CHARACTERINFO_ITEMSUMMARY: player->sendCyclopediaCharacterItemSummary(); @@ -8289,33 +8339,34 @@ void Game::playerHighscores(std::shared_ptr player, HighscoreType_t type } std::string categoryName; - switch (category) { - case HIGHSCORE_CATEGORY_FIST_FIGHTING: + const auto &categoryType = static_cast(category); + switch (categoryType) { + case HighscoreCategories_t::FIST_FIGHTING: categoryName = "skill_fist"; break; - case HIGHSCORE_CATEGORY_CLUB_FIGHTING: + case HighscoreCategories_t::CLUB_FIGHTING: categoryName = "skill_club"; break; - case HIGHSCORE_CATEGORY_SWORD_FIGHTING: + case HighscoreCategories_t::SWORD_FIGHTING: categoryName = "skill_sword"; break; - case HIGHSCORE_CATEGORY_AXE_FIGHTING: + case HighscoreCategories_t::AXE_FIGHTING: categoryName = "skill_axe"; break; - case HIGHSCORE_CATEGORY_DISTANCE_FIGHTING: + case HighscoreCategories_t::DISTANCE_FIGHTING: categoryName = "skill_dist"; break; - case HIGHSCORE_CATEGORY_SHIELDING: + case HighscoreCategories_t::SHIELDING: categoryName = "skill_shielding"; break; - case HIGHSCORE_CATEGORY_FISHING: + case HighscoreCategories_t::FISHING: categoryName = "skill_fishing"; break; - case HIGHSCORE_CATEGORY_MAGIC_LEVEL: + case HighscoreCategories_t::MAGIC_LEVEL: categoryName = "maglevel"; break; default: { - category = HIGHSCORE_CATEGORY_EXPERIENCE; + category = static_cast(HighscoreCategories_t::EXPERIENCE); categoryName = "experience"; break; } @@ -10280,3 +10331,61 @@ void Game::afterCreatureZoneChange(std::shared_ptr creature, const std g_callbacks().executeCallback(EventCallback_t::zoneAfterCreatureEnter, &EventCallback::zoneAfterCreatureEnter, zone, creature); } } + +const std::unordered_map &Game::getHighscoreCategoriesName() const { + return m_highscoreCategoriesNames; +} + +const std::vector &Game::getHighscoreCategories() const { + return m_highscoreCategories; +} + +void Game::registerAchievement(uint16_t id, std::string name, std::string description, bool secret, uint8_t grade, uint8_t points) { + m_achievements[id] = Achievement(); + m_achievements[id].id = id; + m_achievements[id].name = name; + m_achievements[id].description = description; + m_achievements[id].secret = secret; + m_achievements[id].grade = grade; + m_achievements[id].points = points; + + m_achievementsNameToId.emplace(name, id); +} + +Achievement Game::getAchievementById(uint16_t id) { + return m_achievements[id]; +} + +Achievement Game::getAchievementByName(std::string name) { + auto it = m_achievementsNameToId.find(name); + if (it != m_achievementsNameToId.end()) { + return getAchievementById(it->second); + } + return {}; +} + +std::vector Game::getSecretAchievements() { + std::vector secrets; + for (const auto &achievement : m_achievements) { + if (achievement.second.secret) { + secrets.emplace_back(achievement.second); + } + } + + return secrets; +} + +std::vector Game::getPublicAchievements() { + std::vector publics; + for (const auto &achievement : m_achievements) { + if (!achievement.second.secret) { + publics.emplace_back(achievement.second); + } + } + + return publics; +} + +std::map Game::getAchievements() { + return m_achievements; +} diff --git a/src/game/game.hpp b/src/game/game.hpp index 56e28fe04..d70263c17 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -48,6 +48,9 @@ class Guild; class Mounts; class Spectators; +struct Achievement; +struct HighscoreCategory; + static constexpr uint16_t SERVER_BEAT = 0x32; static constexpr int32_t EVENT_MS = 10000; static constexpr int32_t EVENT_LIGHTINTERVAL_MS = 10000; @@ -703,7 +706,24 @@ class Game { void setTransferPlayerHouseItems(uint32_t houseId, uint32_t playerId); void transferHouseItemsToDepot(); + const std::unordered_map &getHighscoreCategoriesName() const; + + const std::vector &getHighscoreCategories() const; + + void registerAchievement(uint16_t id, std::string name, std::string description, bool secret, uint8_t grade, uint8_t points); + Achievement getAchievementById(uint16_t id); + Achievement getAchievementByName(std::string name); + std::vector getSecretAchievements(); + std::vector getPublicAchievements(); + std::map getAchievements(); + private: + std::map m_achievements; + std::map m_achievementsNameToId; + + std::vector m_highscoreCategories; + std::unordered_map m_highscoreCategoriesNames; + std::map forgeMonsterEventIds; std::unordered_set fiendishMonsters; std::unordered_set influencedMonsters; diff --git a/src/game/game_definitions.hpp b/src/game/game_definitions.hpp index f529f93d1..2dadcbbd8 100644 --- a/src/game/game_definitions.hpp +++ b/src/game/game_definitions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -84,18 +84,6 @@ enum CyclopediaCharacterInfo_RecentKillStatus_t : uint8_t { CYCLOPEDIA_CHARACTERINFO_RECENTKILLSTATUS_ARENA = 4 }; -enum HighscoreCategories_t : uint8_t { - HIGHSCORE_CATEGORY_EXPERIENCE = 0, - HIGHSCORE_CATEGORY_FIST_FIGHTING, - HIGHSCORE_CATEGORY_CLUB_FIGHTING, - HIGHSCORE_CATEGORY_SWORD_FIGHTING, - HIGHSCORE_CATEGORY_AXE_FIGHTING, - HIGHSCORE_CATEGORY_DISTANCE_FIGHTING, - HIGHSCORE_CATEGORY_SHIELDING, - HIGHSCORE_CATEGORY_FISHING, - HIGHSCORE_CATEGORY_MAGIC_LEVEL -}; - enum HighscoreType_t : uint8_t { HIGHSCORE_GETENTRIES = 0, HIGHSCORE_OURRANK = 1 diff --git a/src/game/modal_window/modal_window.hpp b/src/game/modal_window/modal_window.hpp index f79ab41cf..f31a6d6ae 100644 --- a/src/game/modal_window/modal_window.hpp +++ b/src/game/modal_window/modal_window.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/game/movement/position.cpp b/src/game/movement/position.cpp index 0dccd9c9b..807a65ad4 100644 --- a/src/game/movement/position.cpp +++ b/src/game/movement/position.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/game/movement/position.hpp b/src/game/movement/position.hpp index 7ec621547..87e74ee3e 100644 --- a/src/game/movement/position.hpp +++ b/src/game/movement/position.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/game/movement/teleport.cpp b/src/game/movement/teleport.cpp index 5fdb984e1..d5a3a73da 100644 --- a/src/game/movement/teleport.cpp +++ b/src/game/movement/teleport.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/game/movement/teleport.hpp b/src/game/movement/teleport.hpp index 998e844b2..9e26e1864 100644 --- a/src/game/movement/teleport.hpp +++ b/src/game/movement/teleport.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/game/scheduling/dispatcher.cpp b/src/game/scheduling/dispatcher.cpp index fff897def..ec999848a 100644 --- a/src/game/scheduling/dispatcher.cpp +++ b/src/game/scheduling/dispatcher.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/game/scheduling/dispatcher.hpp b/src/game/scheduling/dispatcher.hpp index 1c5f72658..d9e26a0b5 100644 --- a/src/game/scheduling/dispatcher.hpp +++ b/src/game/scheduling/dispatcher.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/game/scheduling/events_scheduler.cpp b/src/game/scheduling/events_scheduler.cpp index 5eaebba70..c57f84b66 100644 --- a/src/game/scheduling/events_scheduler.cpp +++ b/src/game/scheduling/events_scheduler.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -74,6 +74,12 @@ bool EventsScheduler::loadScheduleEventFromXml() { g_eventsScheduler().setLootSchedule(lootrate); } + if (ingameNode.attribute("bosslootrate")) { + uint16_t bosslootrate = static_cast(ingameNode.attribute("bosslootrate").as_uint()); + currentEventRates.bosslootrate = bosslootrate; + g_eventsScheduler().setBossLootSchedule(bosslootrate); + } + if (ingameNode.attribute("spawnrate")) { uint16_t spawnrate = static_cast(ingameNode.attribute("spawnrate").as_uint()); currentEventRates.spawnrate = spawnrate; @@ -96,6 +102,9 @@ bool EventsScheduler::loadScheduleEventFromXml() { if (rates.lootrate != 100 && currentEventRates.lootrate != 100 && rates.lootrate == currentEventRates.lootrate) { modifiedRates.emplace_back("lootrate"); } + if (rates.bosslootrate != 100 && currentEventRates.bosslootrate != 100 && rates.bosslootrate == currentEventRates.bosslootrate) { + modifiedRates.emplace_back("bosslootrate"); + } if (rates.spawnrate != 100 && currentEventRates.spawnrate != 100 && rates.spawnrate == currentEventRates.spawnrate) { modifiedRates.emplace_back("spawnrate"); } diff --git a/src/game/scheduling/events_scheduler.hpp b/src/game/scheduling/events_scheduler.hpp index ea20a26f9..6c8233d8b 100644 --- a/src/game/scheduling/events_scheduler.hpp +++ b/src/game/scheduling/events_scheduler.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -21,6 +21,7 @@ struct EventScheduler { struct EventRates { uint16_t exprate = 100; uint32_t lootrate = 100; + uint32_t bosslootrate = 100; uint32_t spawnrate = 100; uint16_t skillrate = 100; }; @@ -55,6 +56,13 @@ class EventsScheduler { lootSchedule = (lootSchedule * lootrate) / 100; } + uint32_t getBossLootSchedule() const { + return bossLootSchedule; + } + void setBossLootSchedule(uint32_t bosslootrate) { + bossLootSchedule = (bossLootSchedule * bosslootrate) / 100; + } + uint32_t getSpawnMonsterSchedule() const { return spawnMonsterSchedule; } @@ -73,6 +81,7 @@ class EventsScheduler { // Event schedule uint16_t expSchedule = 100; uint32_t lootSchedule = 100; + uint32_t bossLootSchedule = 100; uint16_t skillSchedule = 100; uint32_t spawnMonsterSchedule = 100; diff --git a/src/game/scheduling/save_manager.cpp b/src/game/scheduling/save_manager.cpp index dfbcd04a0..2c1eff665 100644 --- a/src/game/scheduling/save_manager.cpp +++ b/src/game/scheduling/save_manager.cpp @@ -35,6 +35,12 @@ void SaveManager::scheduleAll() { auto scheduledAt = std::chrono::steady_clock::now(); m_scheduledAt = scheduledAt; + // Disable save async if the config is set to false + if (!g_configManager().getBoolean(TOGGLE_SAVE_ASYNC, __FUNCTION__)) { + saveAll(); + return; + } + threadPool.addLoad([this, scheduledAt]() { if (m_scheduledAt.load() != scheduledAt) { logger.warn("Skipping save for server because another save has been scheduled."); @@ -50,6 +56,16 @@ void SaveManager::schedulePlayer(std::weak_ptr playerPtr) { logger.debug("Skipping save for player because player is no longer online."); return; } + + // Disable save async if the config is set to false + if (!g_configManager().getBoolean(TOGGLE_SAVE_ASYNC, __FUNCTION__)) { + if (g_game().getGameState() == GAME_STATE_NORMAL) { + logger.debug("Saving player {}.", playerToSave->getName()); + } + doSavePlayer(playerToSave); + return; + } + logger.debug("Scheduling player {} for saving.", playerToSave->getName()); auto scheduledAt = std::chrono::steady_clock::now(); m_playerMap[playerToSave->getGUID()] = scheduledAt; @@ -76,7 +92,9 @@ bool SaveManager::doSavePlayer(std::shared_ptr player) { Benchmark bm_savePlayer; Player::PlayerLock lock(player); m_playerMap.erase(player->getGUID()); - logger.debug("Saving player {}...", player->getName()); + if (g_game().getGameState() == GAME_STATE_NORMAL) { + logger.debug("Saving player {}.", player->getName()); + } bool saveSuccess = IOLoginData::savePlayer(player); if (!saveSuccess) { diff --git a/src/game/scheduling/save_manager.hpp b/src/game/scheduling/save_manager.hpp index a809dd73f..745231c00 100644 --- a/src/game/scheduling/save_manager.hpp +++ b/src/game/scheduling/save_manager.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/game/scheduling/task.cpp b/src/game/scheduling/task.cpp index 9cfe215bb..96355968b 100644 --- a/src/game/scheduling/task.cpp +++ b/src/game/scheduling/task.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/game/scheduling/task.hpp b/src/game/scheduling/task.hpp index 2360deeed..c6591887c 100644 --- a/src/game/scheduling/task.hpp +++ b/src/game/scheduling/task.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/game/zones/zone.cpp b/src/game/zones/zone.cpp index 97ef72cf2..b6c1191aa 100644 --- a/src/game/zones/zone.cpp +++ b/src/game/zones/zone.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/game/zones/zone.hpp b/src/game/zones/zone.hpp index 99adf9d98..82969a257 100644 --- a/src/game/zones/zone.hpp +++ b/src/game/zones/zone.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/fileloader.cpp b/src/io/fileloader.cpp index ab80267a5..38bf2be19 100644 --- a/src/io/fileloader.cpp +++ b/src/io/fileloader.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/fileloader.hpp b/src/io/fileloader.hpp index 15756909f..206948720 100644 --- a/src/io/fileloader.hpp +++ b/src/io/fileloader.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/filestream.cpp b/src/io/filestream.cpp index be370719d..fc8ae6116 100644 --- a/src/io/filestream.cpp +++ b/src/io/filestream.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/filestream.hpp b/src/io/filestream.hpp index 89b048084..1478fa836 100644 --- a/src/io/filestream.hpp +++ b/src/io/filestream.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/functions/iologindata_load_player.cpp b/src/io/functions/iologindata_load_player.cpp index 021d4b7c9..bd61b2456 100644 --- a/src/io/functions/iologindata_load_player.cpp +++ b/src/io/functions/iologindata_load_player.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/functions/iologindata_load_player.hpp b/src/io/functions/iologindata_load_player.hpp index e8b0b4094..07a478d2d 100644 --- a/src/io/functions/iologindata_load_player.hpp +++ b/src/io/functions/iologindata_load_player.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/functions/iologindata_save_player.cpp b/src/io/functions/iologindata_save_player.cpp index e6adeb2f4..7bc1b34c8 100644 --- a/src/io/functions/iologindata_save_player.cpp +++ b/src/io/functions/iologindata_save_player.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -327,16 +327,19 @@ bool IOLoginDataSave::savePlayerStash(std::shared_ptr player) { return false; } + query.str(""); + + DBInsert stashQuery("INSERT INTO `player_stash` (`player_id`,`item_id`,`item_count`) VALUES "); for (const auto &[itemId, itemCount] : player->getStashItems()) { - query.str(""); - query << "INSERT INTO `player_stash` (`player_id`,`item_id`,`item_count`) VALUES ("; - query << player->getGUID() << ", "; - query << itemId << ", "; - query << itemCount << ")"; - if (!db.executeQuery(query.str())) { + query << player->getGUID() << ',' << itemId << ',' << itemCount; + if (!stashQuery.addRow(query)) { return false; } } + + if (!stashQuery.execute()) { + return false; + } return true; } diff --git a/src/io/functions/iologindata_save_player.hpp b/src/io/functions/iologindata_save_player.hpp index 1c3cf89cb..5bc2ea9ce 100644 --- a/src/io/functions/iologindata_save_player.hpp +++ b/src/io/functions/iologindata_save_player.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/io_bosstiary.cpp b/src/io/io_bosstiary.cpp index eea2c7f35..0090c0b3e 100644 --- a/src/io/io_bosstiary.cpp +++ b/src/io/io_bosstiary.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/io_bosstiary.hpp b/src/io/io_bosstiary.hpp index b491247b2..84d9f0955 100644 --- a/src/io/io_bosstiary.hpp +++ b/src/io/io_bosstiary.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/io_definitions.hpp b/src/io/io_definitions.hpp index 22d61883a..ed5461148 100644 --- a/src/io/io_definitions.hpp +++ b/src/io/io_definitions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/io_wheel.cpp b/src/io/io_wheel.cpp index d0f3c5c1e..6e7c2b02b 100644 --- a/src/io/io_wheel.cpp +++ b/src/io/io_wheel.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/io_wheel.hpp b/src/io/io_wheel.hpp index 1bc56428b..e354f9aee 100644 --- a/src/io/io_wheel.hpp +++ b/src/io/io_wheel.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/iobestiary.cpp b/src/io/iobestiary.cpp index a16c6164a..f7305d850 100644 --- a/src/io/iobestiary.cpp +++ b/src/io/iobestiary.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/iobestiary.hpp b/src/io/iobestiary.hpp index 896e00434..9cb2ef2fe 100644 --- a/src/io/iobestiary.hpp +++ b/src/io/iobestiary.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/ioguild.cpp b/src/io/ioguild.cpp index 7555c5c0e..99e1e7506 100644 --- a/src/io/ioguild.cpp +++ b/src/io/ioguild.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -60,7 +60,7 @@ uint32_t IOGuild::getGuildIdByName(const std::string &name) { void IOGuild::getWarList(uint32_t guildId, GuildWarVector &guildWarVector) { std::ostringstream query; - query << "SELECT `guild1`, `guild2` FROM `guild_wars` WHERE (`guild1` = " << guildId << " OR `guild2` = " << guildId << ") AND `ended` = 0 AND `status` = 1"; + query << "SELECT `guild1`, `guild2` FROM `guild_wars` WHERE (`guild1` = " << guildId << " OR `guild2` = " << guildId << ") AND `status` = 1"; DBResult_ptr result = Database::getInstance().storeQuery(query.str()); if (!result) { diff --git a/src/io/ioguild.hpp b/src/io/ioguild.hpp index d56a451a4..cc450841b 100644 --- a/src/io/ioguild.hpp +++ b/src/io/ioguild.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/iologindata.cpp b/src/io/iologindata.cpp index f65d76f7a..7e113ef90 100644 --- a/src/io/iologindata.cpp +++ b/src/io/iologindata.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/iologindata.hpp b/src/io/iologindata.hpp index c7902dd4e..b9fcc124e 100644 --- a/src/io/iologindata.hpp +++ b/src/io/iologindata.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/iomap.cpp b/src/io/iomap.cpp index a84365bed..4edfefa66 100644 --- a/src/io/iomap.cpp +++ b/src/io/iomap.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/iomap.hpp b/src/io/iomap.hpp index e74f1ce3b..78fcc2319 100644 --- a/src/io/iomap.hpp +++ b/src/io/iomap.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/iomapserialize.cpp b/src/io/iomapserialize.cpp index 7d40bb54b..475a210a7 100644 --- a/src/io/iomapserialize.cpp +++ b/src/io/iomapserialize.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -47,8 +47,9 @@ void IOMapSerialize::loadHouseItems(Map* map) { while (item_count--) { if (auto houseTile = std::dynamic_pointer_cast(tile)) { - const auto house = houseTile->getHouse(); - if (house->getOwner() == 0) { + const auto &house = houseTile->getHouse(); + auto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, __FUNCTION__); + if (!isTransferOnRestart && house->getOwner() == 0) { g_logger().trace("Skipping load item from house id: {}, position: {}, house does not have owner", house->getId(), house->getEntryPosition().toString()); house->clearHouseInfo(false); continue; diff --git a/src/io/iomapserialize.hpp b/src/io/iomapserialize.hpp index 017dd9705..08cbac011 100644 --- a/src/io/iomapserialize.hpp +++ b/src/io/iomapserialize.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/iomarket.cpp b/src/io/iomarket.cpp index f308e10e6..ac79ef4c5 100644 --- a/src/io/iomarket.cpp +++ b/src/io/iomarket.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/iomarket.hpp b/src/io/iomarket.hpp index b02fba0ce..331800535 100644 --- a/src/io/iomarket.hpp +++ b/src/io/iomarket.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/ioprey.cpp b/src/io/ioprey.cpp index 2a1c0eebd..642423c2a 100644 --- a/src/io/ioprey.cpp +++ b/src/io/ioprey.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/io/ioprey.hpp b/src/io/ioprey.hpp index 2219e630b..221f2ce55 100644 --- a/src/io/ioprey.hpp +++ b/src/io/ioprey.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/bed.cpp b/src/items/bed.cpp index a1af00b23..4ce4a1e0e 100644 --- a/src/items/bed.cpp +++ b/src/items/bed.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/bed.hpp b/src/items/bed.hpp index 6fafe858a..59c0c66f6 100644 --- a/src/items/bed.hpp +++ b/src/items/bed.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/containers/container.cpp b/src/items/containers/container.cpp index c4f6e0498..7bd7dcef2 100644 --- a/src/items/containers/container.cpp +++ b/src/items/containers/container.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/containers/container.hpp b/src/items/containers/container.hpp index 9bcd23892..6bfb509b8 100644 --- a/src/items/containers/container.hpp +++ b/src/items/containers/container.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/containers/depot/depotchest.cpp b/src/items/containers/depot/depotchest.cpp index 198ec3e14..15488267f 100644 --- a/src/items/containers/depot/depotchest.cpp +++ b/src/items/containers/depot/depotchest.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/containers/depot/depotchest.hpp b/src/items/containers/depot/depotchest.hpp index 069bad382..6b64ca2b8 100644 --- a/src/items/containers/depot/depotchest.hpp +++ b/src/items/containers/depot/depotchest.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/containers/depot/depotlocker.cpp b/src/items/containers/depot/depotlocker.cpp index c431e8bd5..0be000794 100644 --- a/src/items/containers/depot/depotlocker.cpp +++ b/src/items/containers/depot/depotlocker.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/containers/depot/depotlocker.hpp b/src/items/containers/depot/depotlocker.hpp index b8f33c15c..09d794c44 100644 --- a/src/items/containers/depot/depotlocker.hpp +++ b/src/items/containers/depot/depotlocker.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/containers/inbox/inbox.cpp b/src/items/containers/inbox/inbox.cpp index 7859cd3be..9b22c5374 100644 --- a/src/items/containers/inbox/inbox.cpp +++ b/src/items/containers/inbox/inbox.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/containers/inbox/inbox.hpp b/src/items/containers/inbox/inbox.hpp index 058f96e02..79eb126ed 100644 --- a/src/items/containers/inbox/inbox.hpp +++ b/src/items/containers/inbox/inbox.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/containers/mailbox/mailbox.cpp b/src/items/containers/mailbox/mailbox.cpp index 19b3db536..c2c9b2f61 100644 --- a/src/items/containers/mailbox/mailbox.cpp +++ b/src/items/containers/mailbox/mailbox.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/containers/mailbox/mailbox.hpp b/src/items/containers/mailbox/mailbox.hpp index 5f47b61b2..116cd0ee1 100644 --- a/src/items/containers/mailbox/mailbox.hpp +++ b/src/items/containers/mailbox/mailbox.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/containers/rewards/reward.cpp b/src/items/containers/rewards/reward.cpp index 62ef98b0c..4b1757bd6 100644 --- a/src/items/containers/rewards/reward.cpp +++ b/src/items/containers/rewards/reward.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/containers/rewards/reward.hpp b/src/items/containers/rewards/reward.hpp index f372fbfb7..1ab3c8f9b 100644 --- a/src/items/containers/rewards/reward.hpp +++ b/src/items/containers/rewards/reward.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/containers/rewards/rewardchest.cpp b/src/items/containers/rewards/rewardchest.cpp index 007294911..c9bb8112f 100644 --- a/src/items/containers/rewards/rewardchest.cpp +++ b/src/items/containers/rewards/rewardchest.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/containers/rewards/rewardchest.hpp b/src/items/containers/rewards/rewardchest.hpp index 295eafc06..2960128eb 100644 --- a/src/items/containers/rewards/rewardchest.hpp +++ b/src/items/containers/rewards/rewardchest.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/cylinder.cpp b/src/items/cylinder.cpp index c328b1fbd..0636e5ff3 100644 --- a/src/items/cylinder.cpp +++ b/src/items/cylinder.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/cylinder.hpp b/src/items/cylinder.hpp index bab34b5ce..f6c149dd5 100644 --- a/src/items/cylinder.hpp +++ b/src/items/cylinder.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/decay/decay.cpp b/src/items/decay/decay.cpp index 4afc2e828..27ae7b6b4 100644 --- a/src/items/decay/decay.cpp +++ b/src/items/decay/decay.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/decay/decay.hpp b/src/items/decay/decay.hpp index 5d103f45d..e2916f613 100644 --- a/src/items/decay/decay.hpp +++ b/src/items/decay/decay.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/functions/item/attribute.cpp b/src/items/functions/item/attribute.cpp index fcc2ad501..c67c6ce38 100644 --- a/src/items/functions/item/attribute.cpp +++ b/src/items/functions/item/attribute.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/functions/item/attribute.hpp b/src/items/functions/item/attribute.hpp index 8ffbcc880..a2d3ba128 100644 --- a/src/items/functions/item/attribute.hpp +++ b/src/items/functions/item/attribute.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/functions/item/custom_attribute.cpp b/src/items/functions/item/custom_attribute.cpp index f7cfa925e..202c57c09 100644 --- a/src/items/functions/item/custom_attribute.cpp +++ b/src/items/functions/item/custom_attribute.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/functions/item/custom_attribute.hpp b/src/items/functions/item/custom_attribute.hpp index 2d609e8cd..e91832c6b 100644 --- a/src/items/functions/item/custom_attribute.hpp +++ b/src/items/functions/item/custom_attribute.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/functions/item/item_parse.cpp b/src/items/functions/item/item_parse.cpp index e5f6a45a5..365cda202 100644 --- a/src/items/functions/item/item_parse.cpp +++ b/src/items/functions/item/item_parse.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -10,7 +10,10 @@ #include "pch.hpp" #include "items/functions/item/item_parse.hpp" +#include "items/weapons/weapons.hpp" +#include "lua/creature/movement.hpp" #include "utils/pugicast.hpp" +#include "creatures/combat/combat.hpp" void ItemParse::initParse(const std::string &tmpStrValue, pugi::xml_node attributeNode, pugi::xml_attribute valueAttribute, ItemType &itemType) { // Parse all item attributes @@ -74,6 +77,7 @@ void ItemParse::initParse(const std::string &tmpStrValue, pugi::xml_node attribu ItemParse::parseTransformOnUse(tmpStrValue, valueAttribute, itemType); ItemParse::parsePrimaryType(tmpStrValue, valueAttribute, itemType); ItemParse::parseHouseRelated(tmpStrValue, valueAttribute, itemType); + ItemParse::parseUnscriptedItems(tmpStrValue, attributeNode, valueAttribute, itemType); } void ItemParse::parseDummyRate(pugi::xml_node attributeNode, ItemType &itemType) { @@ -967,3 +971,294 @@ void ItemParse::parseHouseRelated(const std::string_view &tmpStrValue, pugi::xml itemType.m_canBeUsedByGuests = valueAttribute.as_bool(); } } + +void ItemParse::createAndRegisterScript(ItemType &itemType, pugi::xml_node attributeNode, MoveEvent_t eventType /*= MOVE_EVENT_NONE*/, WeaponType_t weaponType /*= WEAPON_NONE*/) { + std::shared_ptr moveevent; + if (eventType != MOVE_EVENT_NONE) { + moveevent = std::make_shared(&g_moveEvents().getScriptInterface()); + moveevent->setItemId(itemType.id); + moveevent->setEventType(eventType); + moveevent->setFromXML(true); + + if (eventType == MOVE_EVENT_EQUIP) { + moveevent->equipFunction = moveevent->EquipItem; + } else if (eventType == MOVE_EVENT_DEEQUIP) { + moveevent->equipFunction = moveevent->DeEquipItem; + } else if (eventType == MOVE_EVENT_STEP_IN) { + moveevent->stepFunction = moveevent->StepInField; + } else if (eventType == MOVE_EVENT_STEP_OUT) { + moveevent->stepFunction = moveevent->StepOutField; + } else if (eventType == MOVE_EVENT_ADD_ITEM_ITEMTILE) { + moveevent->moveFunction = moveevent->AddItemField; + } else if (eventType == MOVE_EVENT_REMOVE_ITEM) { + moveevent->moveFunction = moveevent->RemoveItemField; + } + } + + std::shared_ptr weapon = nullptr; + if (weaponType != WEAPON_NONE) { + if (weaponType == WEAPON_DISTANCE || weaponType == WEAPON_AMMO || weaponType == WEAPON_MISSILE) { + weapon = std::make_shared(&g_weapons().getScriptInterface()); + } else if (weaponType == WEAPON_WAND) { + weapon = std::make_shared(&g_weapons().getScriptInterface()); + } else { + weapon = std::make_shared(&g_weapons().getScriptInterface()); + } + + weapon->weaponType = weaponType; + itemType.weaponType = weapon->weaponType; + weapon->configureWeapon(itemType); + g_logger().trace("Created weapon with type '{}'", getWeaponName(weaponType)); + } + uint32_t fromDamage = 0; + uint32_t toDamage = 0; + for (auto subAttributeNode : attributeNode.children()) { + pugi::xml_attribute subKeyAttribute = subAttributeNode.attribute("key"); + if (!subKeyAttribute) { + continue; + } + + pugi::xml_attribute subValueAttribute = subAttributeNode.attribute("value"); + if (!subValueAttribute) { + continue; + } + + auto stringKey = asLowerCaseString(subKeyAttribute.as_string()); + if (stringKey == "slot") { + if (moveevent && (moveevent->getEventType() == MOVE_EVENT_EQUIP || moveevent->getEventType() == MOVE_EVENT_DEEQUIP)) { + auto slotName = asLowerCaseString(subValueAttribute.as_string()); + if (slotName == "head") { + moveevent->setSlot(SLOTP_HEAD); + } else if (slotName == "necklace") { + moveevent->setSlot(SLOTP_NECKLACE); + } else if (slotName == "backpack") { + moveevent->setSlot(SLOTP_BACKPACK); + } else if (slotName == "armor" || slotName == "body") { + moveevent->setSlot(SLOTP_ARMOR); + } else if (slotName == "right-hand") { + moveevent->setSlot(SLOTP_RIGHT); + } else if (slotName == "left-hand") { + moveevent->setSlot(SLOTP_LEFT); + } else if (slotName == "hand" || slotName == "shield") { + moveevent->setSlot(SLOTP_RIGHT | SLOTP_LEFT); + } else if (slotName == "legs") { + moveevent->setSlot(SLOTP_LEGS); + } else if (slotName == "feet") { + moveevent->setSlot(SLOTP_FEET); + } else if (slotName == "ring") { + moveevent->setSlot(SLOTP_RING); + } else if (slotName == "ammo") { + moveevent->setSlot(SLOTP_AMMO); + } else { + g_logger().warn("[{}] unknown slot type '{}'", __FUNCTION__, slotName); + } + } else if (weapon) { + uint16_t id = weapon->getID(); + ItemType &it = Item::items.getItemType(id); + auto slotName = asLowerCaseString(subValueAttribute.as_string()); + if (slotName == "two-handed") { + it.slotPosition = SLOTP_TWO_HAND; + } else { + it.slotPosition = SLOTP_HAND; + } + } + } else if (stringKey == "level") { + auto numberValue = subValueAttribute.as_uint(); + if (moveevent) { + g_logger().trace("Added required moveevent level '{}'", numberValue); + moveevent->setRequiredLevel(numberValue); + moveevent->setWieldInfo(WIELDINFO_LEVEL); + } else if (weapon) { + g_logger().trace("Added required weapon level '{}'", numberValue); + weapon->setRequiredLevel(numberValue); + weapon->setWieldInfo(WIELDINFO_LEVEL); + } + } else if (stringKey == "vocation") { + auto vocations = subValueAttribute.as_string(); + std::string tmp; + std::stringstream ss(vocations); + std::string token; + + while (std::getline(ss, token, ',')) { + token.erase(token.begin(), std::find_if(token.begin(), token.end(), [](unsigned char ch) { + return !std::isspace(ch); + })); + token.erase(std::find_if(token.rbegin(), token.rend(), [](unsigned char ch) { + return !std::isspace(ch); + }).base(), + token.end()); + + std::string v1; + bool showInDescription = false; + + std::stringstream inner_ss(token); + std::getline(inner_ss, v1, ';'); + std::string showInDescriptionStr; + std::getline(inner_ss, showInDescriptionStr, ';'); + showInDescription = showInDescriptionStr == "true"; + + if (moveevent) { + moveevent->addVocEquipMap(v1); + moveevent->setWieldInfo(WIELDINFO_VOCREQ); + } + + if (showInDescription) { + if (moveevent && moveevent->getVocationString().empty()) { + tmp = asLowerCaseString(v1); + tmp += "s"; + moveevent->setVocationString(tmp); + } else if (weapon && weapon->getVocationString().empty()) { + tmp = asLowerCaseString(v1); + tmp += "s"; + weapon->setVocationString(tmp); + } else { + tmp += ", "; + tmp += asLowerCaseString(v1); + tmp += "s"; + } + } + } + + size_t lastComma = tmp.rfind(','); + if (lastComma != std::string::npos) { + tmp.replace(lastComma, 1, " and"); + if (moveevent) { + moveevent->setVocationString(tmp); + } else if (weapon) { + weapon->setVocationString(tmp); + } + } + } else if (stringKey == "action" && weapon) { + auto action = asLowerCaseString(subValueAttribute.as_string()); + if (action == "removecharge") { + weapon->action = WEAPONACTION_REMOVECHARGE; + } else if (action == "removecount") { + weapon->action = WEAPONACTION_REMOVECOUNT; + } else if (action == "move") { + weapon->action = WEAPONACTION_MOVE; + } + } else if (stringKey == "breakchance" && weapon) { + weapon->setBreakChance(subValueAttribute.as_uint()); + } else if (stringKey == "mana" && weapon) { + weapon->setMana(subValueAttribute.as_uint()); + } else if (stringKey == "unproperly" && weapon) { + weapon->setWieldUnproperly(subValueAttribute.as_bool()); + } else if (stringKey == "fromdamage" && weapon) { + fromDamage = subValueAttribute.as_uint(); + } else if (stringKey == "todamage" && weapon) { + toDamage = subValueAttribute.as_uint(); + } else if (stringKey == "wandtype" && weapon) { + std::string elementName = asLowerCaseString(subValueAttribute.as_string()); + if (elementName == "earth") { + weapon->params.combatType = COMBAT_EARTHDAMAGE; + } else if (elementName == "ice") { + weapon->params.combatType = COMBAT_ICEDAMAGE; + } else if (elementName == "energy") { + weapon->params.combatType = COMBAT_ENERGYDAMAGE; + } else if (elementName == "fire") { + weapon->params.combatType = COMBAT_FIREDAMAGE; + } else if (elementName == "death") { + weapon->params.combatType = COMBAT_DEATHDAMAGE; + } else if (elementName == "holy") { + weapon->params.combatType = COMBAT_HOLYDAMAGE; + } else { + g_logger().warn("[{}] - wandtype '{}' does not exist", __FUNCTION__, elementName); + } + } else if (stringKey == "chain" && weapon) { + auto value = subValueAttribute.as_double(); + weapon->setChainSkillValue(value); + g_logger().trace("Found chain skill value '{}' for weapon: {}", value, itemType.name); + } + } + + if (weapon) { + if (auto weaponWand = dynamic_pointer_cast(weapon)) { + g_logger().trace("Added weapon damage from '{}', to '{}'", fromDamage, toDamage); + weaponWand->setMinChange(fromDamage); + weaponWand->setMaxChange(toDamage); + } + + auto combat = weapon->getCombat(); + if (combat) { + combat->setupChain(weapon); + } + + if (weapon->getWieldInfo() != 0) { + itemType.wieldInfo = weapon->getWieldInfo(); + itemType.vocationString = weapon->getVocationString(); + itemType.minReqLevel = weapon->getReqLevel(); + itemType.minReqMagicLevel = weapon->getReqMagLv(); + } + + if (!g_weapons().registerLuaEvent(weapon, true)) { + g_logger().error("[{}] failed to register weapon from item name {}", __FUNCTION__, itemType.name); + } + } + + if (moveevent && !g_moveEvents().registerLuaItemEvent(moveevent)) { + g_logger().error("[{}] failed to register moveevent from item name {}", __FUNCTION__, itemType.name); + } +} + +void ItemParse::parseUnscriptedItems(const std::string_view &tmpStrValue, pugi::xml_node attributeNode, pugi::xml_attribute valueAttribute, ItemType &itemType) { + if (tmpStrValue == "script") { + std::string scriptName = valueAttribute.as_string(); + auto tokens = split(scriptName.data(), ';'); + for (const auto &token : tokens) { + if (token == "moveevent") { + g_logger().trace("Registering moveevent for item id '{}', name '{}'", itemType.id, itemType.name); + MoveEvent_t eventType = MOVE_EVENT_NONE; + for (auto subAttributeNode : attributeNode.children()) { + pugi::xml_attribute subKeyAttribute = subAttributeNode.attribute("key"); + if (!subKeyAttribute) { + continue; + } + + pugi::xml_attribute subValueAttribute = subAttributeNode.attribute("value"); + if (!subValueAttribute) { + continue; + } + + auto stringKey = asLowerCaseString(subKeyAttribute.as_string()); + if (stringKey == "eventtype") { + const auto &eventTypeName = asLowerCaseString(subValueAttribute.as_string()); + eventType = getMoveEventType(eventTypeName); + g_logger().trace("Found event type '{}'", eventTypeName); + break; + } + } + + // Event type stepin/out need to be registered both at same time + if (eventType == MOVE_EVENT_NONE) { + createAndRegisterScript(itemType, attributeNode, MOVE_EVENT_EQUIP); + createAndRegisterScript(itemType, attributeNode, MOVE_EVENT_DEEQUIP); + } else { + createAndRegisterScript(itemType, attributeNode, eventType); + } + } else if (token == "weapon") { + WeaponType_t weaponType; + g_logger().trace("Registering weapon for item id '{}', name '{}'", itemType.id, itemType.name); + for (auto subAttributeNode : attributeNode.children()) { + pugi::xml_attribute subKeyAttribute = subAttributeNode.attribute("key"); + if (!subKeyAttribute) { + continue; + } + + pugi::xml_attribute subValueAttribute = subAttributeNode.attribute("value"); + if (!subValueAttribute) { + continue; + } + + auto stringKey = asLowerCaseString(subKeyAttribute.as_string()); + if (stringKey == "weapontype") { + weaponType = getWeaponType(subValueAttribute.as_string()); + g_logger().trace("Found weapon type '{}''", subValueAttribute.as_string()); + break; + } + } + + createAndRegisterScript(itemType, attributeNode, MOVE_EVENT_NONE, weaponType); + } + } + } +} diff --git a/src/items/functions/item/item_parse.hpp b/src/items/functions/item/item_parse.hpp index f60277ad5..7859a77fe 100644 --- a/src/items/functions/item/item_parse.hpp +++ b/src/items/functions/item/item_parse.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -157,6 +157,7 @@ const phmap::flat_hash_map ItemParseAttribut { "reflectpercentall", ITEM_PARSE_REFLECTPERCENTALL }, { "primarytype", ITEM_PARSE_PRIMARYTYPE }, { "usedbyhouseguests", ITEM_PARSE_USEDBYGUESTS }, + { "script", ITEM_PARSE_SCRIPT }, }; const phmap::flat_hash_map ItemTypesMap = { @@ -312,10 +313,12 @@ class ItemParse : public Items { static void parseTransformOnUse(const std::string_view &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType); static void parsePrimaryType(const std::string_view &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType); static void parseHouseRelated(const std::string_view &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType); + static void parseUnscriptedItems(const std::string_view &tmpStrValue, pugi::xml_node attributeNode, pugi::xml_attribute valueAttribute, ItemType &itemType); private: // Parent of the function: static void parseField static std::tuple parseFieldConditions(std::string lowerStringValue, pugi::xml_attribute valueAttribute); static CombatType_t parseFieldCombatType(std::string string, pugi::xml_attribute valueAttribute); static void parseFieldCombatDamage(std::shared_ptr conditionDamage, std::string stringValue, pugi::xml_node attributeNode); + static void createAndRegisterScript(ItemType &itemType, pugi::xml_node attributeNode, MoveEvent_t eventType = MOVE_EVENT_NONE, WeaponType_t weaponType = WEAPON_NONE); }; diff --git a/src/items/item.cpp b/src/items/item.cpp index 2c0569711..b51c076d8 100644 --- a/src/items/item.cpp +++ b/src/items/item.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -831,7 +831,7 @@ Attr_ReadValue Item::readAttr(AttrTypes_t attr, PropStream &propStream) { return ATTR_READ_ERROR; } - g_logger().debug("Setting flag {} flags, to item id {}", flags, getID()); + g_logger().trace("Setting obtain flag {} flags, to item id {}", flags, getID()); setAttribute(ItemAttribute_t::OBTAINCONTAINER, flags); break; } diff --git a/src/items/item.hpp b/src/items/item.hpp index c720cf969..9ff0d3d15 100644 --- a/src/items/item.hpp +++ b/src/items/item.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/items.cpp b/src/items/items.cpp index b26c980cc..9e31f5f10 100644 --- a/src/items/items.cpp +++ b/src/items/items.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -11,6 +11,8 @@ #include "items/functions/item/item_parse.hpp" #include "items/items.hpp" +#include "items/weapons/weapons.hpp" +#include "lua/creature/movement.hpp" #include "game/game.hpp" #include "utils/pugicast.hpp" @@ -23,6 +25,8 @@ void Items::clear() { ladders.clear(); dummys.clear(); nameToItems.clear(); + g_moveEvents().clear(true); + g_weapons().clear(true); } using LootTypeNames = phmap::flat_hash_map; @@ -184,8 +188,7 @@ void Items::loadFromProtobuf() { iType.isWrapKit = object.flags().wrapkit(); if (!iType.name.empty()) { - nameToItems.insert({ asLowerCaseString(iType.name), - iType.id }); + nameToItems.insert({ asLowerCaseString(iType.name), iType.id }); } } @@ -269,8 +272,7 @@ void Items::parseItemNode(const pugi::xml_node &itemNode, uint16_t id) { } itemType.name = xmlName; - nameToItems.insert({ asLowerCaseString(itemType.name), - id }); + nameToItems.insert({ asLowerCaseString(itemType.name), id }); } itemType.loaded = true; diff --git a/src/items/items.hpp b/src/items/items.hpp index 1d4f014c1..f9e48ae10 100644 --- a/src/items/items.hpp +++ b/src/items/items.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/items_classification.hpp b/src/items/items_classification.hpp index bd8b61f80..601abd328 100644 --- a/src/items/items_classification.hpp +++ b/src/items/items_classification.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/items_definitions.hpp b/src/items/items_definitions.hpp index 3c200daa3..f044d4b52 100644 --- a/src/items/items_definitions.hpp +++ b/src/items/items_definitions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -35,6 +35,9 @@ enum Attr_ReadValue { enum ReturnValue { RETURNVALUE_NOERROR, + RETURNVALUE_NOTBOUGHTINSTORE, + RETURNVALUE_ITEMCANNOTBEMOVEDTHERE, + RETURNVALUE_ITEMCANNOTBEMOVEDPOUCH, RETURNVALUE_NOTPOSSIBLE, RETURNVALUE_NOTENOUGHROOM, RETURNVALUE_PLAYERISPZLOCKED, @@ -602,6 +605,7 @@ enum ItemParseAttributes_t { ITEM_PARSE_REFLECTDAMAGE, ITEM_PARSE_PRIMARYTYPE, ITEM_PARSE_USEDBYGUESTS, + ITEM_PARSE_SCRIPT, }; struct ImbuementInfo { diff --git a/src/items/thing.cpp b/src/items/thing.cpp index 0665f15a6..6eec7994d 100644 --- a/src/items/thing.cpp +++ b/src/items/thing.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/thing.hpp b/src/items/thing.hpp index bc7d7f3af..9e8662d5f 100644 --- a/src/items/thing.hpp +++ b/src/items/thing.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/tile.cpp b/src/items/tile.cpp index 2f3d24ce2..ca354700f 100644 --- a/src/items/tile.cpp +++ b/src/items/tile.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/tile.hpp b/src/items/tile.hpp index f3a4cc7c6..71f9d4ae0 100644 --- a/src/items/tile.hpp +++ b/src/items/tile.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/trashholder.cpp b/src/items/trashholder.cpp index 40c1f0e49..65676a75a 100644 --- a/src/items/trashholder.cpp +++ b/src/items/trashholder.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/trashholder.hpp b/src/items/trashholder.hpp index 0aa52ed7b..771c8687f 100644 --- a/src/items/trashholder.hpp +++ b/src/items/trashholder.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/items/weapons/weapons.cpp b/src/items/weapons/weapons.cpp index 0c6853ec8..25287ca9f 100644 --- a/src/items/weapons/weapons.cpp +++ b/src/items/weapons/weapons.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -31,12 +31,34 @@ const WeaponShared_ptr Weapons::getWeapon(std::shared_ptr item) const { return it->second; } -void Weapons::clear() { +void Weapons::clear(bool isFromXML /*= false*/) { + if (isFromXML) { + int numRemoved = 0; + for (auto it = weapons.begin(); it != weapons.end();) { + if (it->second && it->second->isFromXML()) { + g_logger().debug("Weapon with id '{}' is from XML and will be removed.", it->first); + it = weapons.erase(it); + ++numRemoved; + } else { + ++it; + } + } + + if (numRemoved > 0) { + g_logger().debug("Removed '{}' Weapon from XML.", numRemoved); + } + + return; + } + weapons.clear(); } -bool Weapons::registerLuaEvent(WeaponShared_ptr event) { +bool Weapons::registerLuaEvent(WeaponShared_ptr event, bool fromXML /*= false*/) { weapons[event->getID()] = event; + if (fromXML) { + event->setFromXML(fromXML); + } return true; } @@ -190,6 +212,7 @@ void Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptrgetID(); executeUseWeapon(player, var); + g_logger().debug("Weapon::internalUseWeapon - Lua callback executed."); } else { CombatDamage damage; WeaponType_t weaponType = item->getWeaponType(); @@ -200,6 +223,7 @@ void Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr player, std::shared_ptrdoCombatChain(player, target, params.aggressive); + } else { + Combat::doCombatHealth(player, target, damage, params); + } + g_logger().debug("Weapon::internalUseWeapon - cpp callback executed."); } onUsedWeapon(player, item, target->getTile()); @@ -356,6 +385,43 @@ void Weapon::decrementItemCount(std::shared_ptr item) { } } +bool Weapon::calculateSkillFormula(const std::shared_ptr &player, int32_t &attackSkill, int32_t &attackValue, float &attackFactor, int16_t &elementAttack, CombatDamage &damage, bool useCharges /* = false*/) const { + std::shared_ptr tool = player->getWeapon(); + if (!tool) { + return false; + } + + std::shared_ptr item = nullptr; + attackValue = tool->getAttack(); + if (tool->getWeaponType() == WEAPON_AMMO) { + item = player->getWeapon(true); + if (item) { + attackValue += item->getAttack(); + } + } + + CombatType_t elementType = getElementType(); + damage.secondary.type = elementType; + + bool shouldCalculateSecondaryDamage = false; + if (elementType != COMBAT_NONE) { + elementAttack = getElementDamageValue(); + shouldCalculateSecondaryDamage = true; + attackValue += elementAttack; + } + + if (useCharges) { + auto charges = tool->getAttribute(ItemAttribute_t::CHARGES); + if (charges != 0) { + g_game().transformItem(tool, tool->getID(), charges - 1); + } + } + + attackSkill = player->getWeaponSkill(item ? item : tool); + attackFactor = player->getAttackFactor(); + return shouldCalculateSecondaryDamage; +} + WeaponMelee::WeaponMelee(LuaScriptInterface* interface) : Weapon(interface) { // Add combat type and blocked attributes to the weapon @@ -813,11 +879,27 @@ void WeaponWand::configureWeapon(const ItemType &it) { Weapon::configureWeapon(it); } -int32_t WeaponWand::getWeaponDamage(std::shared_ptr, std::shared_ptr, std::shared_ptr, bool maxDamage /*= false*/) const { - if (maxDamage) { - return -maxChange; +int32_t WeaponWand::getWeaponDamage(std::shared_ptr player, std::shared_ptr, std::shared_ptr, bool maxDamage /* = false*/) const { + if (!g_configManager().getBoolean(TOGGLE_CHAIN_SYSTEM, __FUNCTION__)) { + // Returns maximum damage or a random value between minChange and maxChange + return maxDamage ? -maxChange : -normal_random(minChange, maxChange); } - return -normal_random(minChange, maxChange); + + // If chain system is enabled, calculates magic-based damage + int32_t attackSkill; + int32_t attackValue; + float attackFactor; + [[maybe_unused]] int16_t elementAttack; + [[maybe_unused]] CombatDamage combatDamage; + calculateSkillFormula(player, attackSkill, attackValue, attackFactor, elementAttack, combatDamage); + + auto magLevel = player->getMagicLevel(); + auto level = player->getLevel(); + double min = (level / 5.0) + (magLevel + attackValue) / 3.0; + double max = (level / 5.0) + (magLevel + attackValue); + + // Returns the calculated maximum damage or a random value between the calculated minimum and maximum + return maxDamage ? -max : -normal_random(min, max); } int16_t WeaponWand::getElementDamageValue() const { diff --git a/src/items/weapons/weapons.hpp b/src/items/weapons/weapons.hpp index b6ab050d8..2cf97568a 100644 --- a/src/items/weapons/weapons.hpp +++ b/src/items/weapons/weapons.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -44,8 +44,8 @@ class Weapons final : public Scripts { static int32_t getMaxMeleeDamage(int32_t attackSkill, int32_t attackValue); static int32_t getMaxWeaponDamage(uint32_t level, int32_t attackSkill, int32_t attackValue, float attackFactor, bool isMelee); - bool registerLuaEvent(WeaponShared_ptr event); - void clear(); + bool registerLuaEvent(WeaponShared_ptr event, bool fromXML = false); + void clear(bool isFromXML = false); private: std::map weapons; @@ -176,6 +176,45 @@ class Weapon : public Script { vocationString = str; } + void setFromXML(bool newFromXML) { + m_fromXML = newFromXML; + } + + bool isFromXML() const { + return m_fromXML; + } + + void setChainSkillValue(double value) { + m_chainSkillValue = value; + } + + double getChainSkillValue() const { + return m_chainSkillValue; + } + + const WeaponType_t getWeaponType() const { + return weaponType; + } + + const std::shared_ptr getCombat() const { + if (!m_combat) { + g_logger().error("Weapon::getCombat() - m_combat is nullptr"); + return nullptr; + } + + return m_combat; + } + + std::shared_ptr getCombat() { + if (!m_combat) { + m_combat = std::make_shared(); + } + + return m_combat; + } + + bool calculateSkillFormula(const std::shared_ptr &player, int32_t &attackSkill, int32_t &attackValue, float &attackFactor, int16_t &elementAttack, CombatDamage &damage, bool useCharges = false) const; + protected: void internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target, int32_t damageModifier, int32_t cleavePercent = 0) const; void internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr tile) const; @@ -199,6 +238,7 @@ class Weapon : public Script { uint32_t healthPercent = 0; uint32_t soul = 0; uint32_t wieldInfo = WIELDINFO_NONE; + double m_chainSkillValue = 0.0; uint8_t breakChance = 0; bool enabled = true; bool premium = false; @@ -213,12 +253,16 @@ class Weapon : public Script { CombatParams params; WeaponType_t weaponType; std::map vocWeaponMap; + std::shared_ptr m_combat; + + bool m_fromXML = false; friend class Combat; friend class WeaponWand; friend class WeaponMelee; friend class WeaponDistance; friend class WeaponFunctions; + friend class ItemParse; }; class WeaponMelee final : public Weapon { @@ -290,7 +334,7 @@ class WeaponWand final : public Weapon { return 0; } CombatType_t getElementType() const override { - return COMBAT_NONE; + return params.combatType; } virtual int16_t getElementDamageValue() const override; void setMinChange(int32_t change) { diff --git a/src/kv/kv.cpp b/src/kv/kv.cpp index 6f516c784..29a9787f7 100644 --- a/src/kv/kv.cpp +++ b/src/kv/kv.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/kv/kv.hpp b/src/kv/kv.hpp index 07b277d51..fa32461b2 100644 --- a/src/kv/kv.hpp +++ b/src/kv/kv.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/kv/kv_sql.cpp b/src/kv/kv_sql.cpp index e5a3fc2ba..57d2cc57a 100644 --- a/src/kv/kv_sql.cpp +++ b/src/kv/kv_sql.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/kv/kv_sql.hpp b/src/kv/kv_sql.hpp index fd181b1ce..1d7a6387d 100644 --- a/src/kv/kv_sql.hpp +++ b/src/kv/kv_sql.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/kv/value_wrapper.cpp b/src/kv/value_wrapper.cpp index c8ee3be50..78f828248 100644 --- a/src/kv/value_wrapper.cpp +++ b/src/kv/value_wrapper.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/kv/value_wrapper.hpp b/src/kv/value_wrapper.hpp index 1503575c5..0b388187d 100644 --- a/src/kv/value_wrapper.hpp +++ b/src/kv/value_wrapper.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/kv/value_wrapper_proto.cpp b/src/kv/value_wrapper_proto.cpp index 9e60296c6..436210195 100644 --- a/src/kv/value_wrapper_proto.cpp +++ b/src/kv/value_wrapper_proto.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/kv/value_wrapper_proto.hpp b/src/kv/value_wrapper_proto.hpp index 5c3478804..382b91a04 100644 --- a/src/kv/value_wrapper_proto.hpp +++ b/src/kv/value_wrapper_proto.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lib/di/container.hpp b/src/lib/di/container.hpp index ee9868908..3c15e30b3 100644 --- a/src/lib/di/container.hpp +++ b/src/lib/di/container.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lib/logging/log_with_spd_log.cpp b/src/lib/logging/log_with_spd_log.cpp index ca56f1469..f8cfe1694 100644 --- a/src/lib/logging/log_with_spd_log.cpp +++ b/src/lib/logging/log_with_spd_log.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lib/logging/log_with_spd_log.hpp b/src/lib/logging/log_with_spd_log.hpp index 6e2fd075e..983ee716c 100644 --- a/src/lib/logging/log_with_spd_log.hpp +++ b/src/lib/logging/log_with_spd_log.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lib/logging/logger.hpp b/src/lib/logging/logger.hpp index e8474b748..bc6c455fb 100644 --- a/src/lib/logging/logger.hpp +++ b/src/lib/logging/logger.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lib/messaging/command.hpp b/src/lib/messaging/command.hpp index d37003bfe..83af9a9bd 100644 --- a/src/lib/messaging/command.hpp +++ b/src/lib/messaging/command.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lib/messaging/event.hpp b/src/lib/messaging/event.hpp index 573c41b30..df966b81c 100644 --- a/src/lib/messaging/event.hpp +++ b/src/lib/messaging/event.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lib/messaging/message.hpp b/src/lib/messaging/message.hpp index 2d08cadaf..4707a5f04 100644 --- a/src/lib/messaging/message.hpp +++ b/src/lib/messaging/message.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lib/metrics/metrics.cpp b/src/lib/metrics/metrics.cpp index ffdfda919..2a65e9a7d 100644 --- a/src/lib/metrics/metrics.cpp +++ b/src/lib/metrics/metrics.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lib/metrics/metrics.hpp b/src/lib/metrics/metrics.hpp index 4ea34ef9e..0d8c291df 100644 --- a/src/lib/metrics/metrics.hpp +++ b/src/lib/metrics/metrics.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lib/thread/thread_pool.cpp b/src/lib/thread/thread_pool.cpp index b36c13790..e01028810 100644 --- a/src/lib/thread/thread_pool.cpp +++ b/src/lib/thread/thread_pool.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lib/thread/thread_pool.hpp b/src/lib/thread/thread_pool.hpp index 8ad60f146..e36d8beca 100644 --- a/src/lib/thread/thread_pool.hpp +++ b/src/lib/thread/thread_pool.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/callbacks/callbacks_definitions.hpp b/src/lua/callbacks/callbacks_definitions.hpp index a5716053a..521a2c4cd 100644 --- a/src/lua/callbacks/callbacks_definitions.hpp +++ b/src/lua/callbacks/callbacks_definitions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/callbacks/creaturecallback.cpp b/src/lua/callbacks/creaturecallback.cpp index df5845f46..11e33a9b1 100644 --- a/src/lua/callbacks/creaturecallback.cpp +++ b/src/lua/callbacks/creaturecallback.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/callbacks/creaturecallback.hpp b/src/lua/callbacks/creaturecallback.hpp index f59cef024..f76657204 100644 --- a/src/lua/callbacks/creaturecallback.hpp +++ b/src/lua/callbacks/creaturecallback.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/callbacks/event_callback.cpp b/src/lua/callbacks/event_callback.cpp index 8510502b2..51c03131f 100644 --- a/src/lua/callbacks/event_callback.cpp +++ b/src/lua/callbacks/event_callback.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/callbacks/event_callback.hpp b/src/lua/callbacks/event_callback.hpp index 152c86b8e..d9dc4a9b1 100644 --- a/src/lua/callbacks/event_callback.hpp +++ b/src/lua/callbacks/event_callback.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/callbacks/events_callbacks.cpp b/src/lua/callbacks/events_callbacks.cpp index 2c0ca056d..4a1830f80 100644 --- a/src/lua/callbacks/events_callbacks.cpp +++ b/src/lua/callbacks/events_callbacks.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/callbacks/events_callbacks.hpp b/src/lua/callbacks/events_callbacks.hpp index 7eb471430..53b119f64 100644 --- a/src/lua/callbacks/events_callbacks.hpp +++ b/src/lua/callbacks/events_callbacks.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/creature/actions.cpp b/src/lua/creature/actions.cpp index 25653ab0f..42f3e12c8 100644 --- a/src/lua/creature/actions.cpp +++ b/src/lua/creature/actions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/creature/actions.hpp b/src/lua/creature/actions.hpp index c0fb1a277..80fd2ea54 100644 --- a/src/lua/creature/actions.hpp +++ b/src/lua/creature/actions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/creature/creatureevent.cpp b/src/lua/creature/creatureevent.cpp index 29feb6520..e3ac95490 100644 --- a/src/lua/creature/creatureevent.cpp +++ b/src/lua/creature/creatureevent.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/creature/creatureevent.hpp b/src/lua/creature/creatureevent.hpp index 24052aa84..8a208343e 100644 --- a/src/lua/creature/creatureevent.hpp +++ b/src/lua/creature/creatureevent.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/creature/events.cpp b/src/lua/creature/events.cpp index 3ce3f88bd..2917d128b 100644 --- a/src/lua/creature/events.cpp +++ b/src/lua/creature/events.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/creature/events.hpp b/src/lua/creature/events.hpp index 08260c8ae..1ec6d4ba8 100644 --- a/src/lua/creature/events.hpp +++ b/src/lua/creature/events.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/creature/movement.cpp b/src/lua/creature/movement.cpp index b3901ea1f..076d2b902 100644 --- a/src/lua/creature/movement.cpp +++ b/src/lua/creature/movement.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -15,7 +15,34 @@ #include "lua/callbacks/events_callbacks.hpp" #include "lua/creature/movement.hpp" -void MoveEvents::clear() { +void MoveEvents::clear(bool isFromXML /*= false*/) { + if (isFromXML) { + int numRemoved = 0; + for (auto &pair : itemIdMap) { + MoveEventList &moveEventList = pair.second; + + for (int moveEventType = 0; moveEventType < MOVE_EVENT_LAST; ++moveEventType) { + auto &eventList = moveEventList.moveEvent[moveEventType]; + + int originalSize = eventList.size(); + + eventList.remove_if([&](const std::shared_ptr &moveEvent) { + bool removed = moveEvent && moveEvent->isFromXML(); + if (removed) { + g_logger().debug("MoveEvent with id '{}' is from XML and will be removed.", pair.first); + ++numRemoved; + } + return removed; + }); + } + } + + if (numRemoved > 0) { + g_logger().debug("Removed '{}' MoveEvent from XML.", numRemoved); + } + return; + } + uniqueIdMap.clear(); actionIdMap.clear(); itemIdMap.clear(); diff --git a/src/lua/creature/movement.hpp b/src/lua/creature/movement.hpp index d410cf2a0..485454a05 100644 --- a/src/lua/creature/movement.hpp +++ b/src/lua/creature/movement.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -112,7 +112,7 @@ class MoveEvents final : public Scripts { bool registerLuaUniqueEvent(const std::shared_ptr moveEvent); bool registerLuaPositionEvent(const std::shared_ptr moveEvent); bool registerLuaEvent(const std::shared_ptr event); - void clear(); + void clear(bool isFromXML = false); private: void clearMap(std::map &map) const; @@ -179,7 +179,7 @@ class MoveEvent final : public Script, public SharedObject { return vocEquipMap; } void addVocEquipMap(std::string vocName) { - int32_t vocationId = g_vocations().getVocationId(vocName); + uint16_t vocationId = g_vocations().getVocationId(vocName); if (vocationId != -1) { vocEquipMap[vocationId] = true; } @@ -251,6 +251,14 @@ class MoveEvent final : public Script, public SharedObject { static uint32_t EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool boolean); static uint32_t DeEquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool boolean); + void setFromXML(bool newFromXML) { + m_fromXML = newFromXML; + } + + bool isFromXML() const { + return m_fromXML; + } + private: std::string getScriptTypeName() const override; @@ -290,10 +298,13 @@ class MoveEvent final : public Script, public SharedObject { std::map vocEquipMap; bool tileItem = false; + bool m_fromXML = false; + std::vector itemIdVector; std::vector actionIdVector; std::vector uniqueIdVector; std::vector positionVector; friend class MoveEventFunctions; + friend class ItemParse; }; diff --git a/src/lua/creature/raids.cpp b/src/lua/creature/raids.cpp index f30155578..f0d7cecf4 100644 --- a/src/lua/creature/raids.cpp +++ b/src/lua/creature/raids.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/creature/raids.hpp b/src/lua/creature/raids.hpp index d78f79bf8..0266641ed 100644 --- a/src/lua/creature/raids.hpp +++ b/src/lua/creature/raids.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/creature/talkaction.cpp b/src/lua/creature/talkaction.cpp index 72c2f098f..3586bdbce 100644 --- a/src/lua/creature/talkaction.cpp +++ b/src/lua/creature/talkaction.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/creature/talkaction.hpp b/src/lua/creature/talkaction.hpp index a6b34d04a..ec6853985 100644 --- a/src/lua/creature/talkaction.hpp +++ b/src/lua/creature/talkaction.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/core_functions.hpp b/src/lua/functions/core/core_functions.hpp index b1aa32713..c6c14121b 100644 --- a/src/lua/functions/core/core_functions.hpp +++ b/src/lua/functions/core/core_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/game/bank_functions.hpp b/src/lua/functions/core/game/bank_functions.hpp index a49bf7ed7..db450f494 100644 --- a/src/lua/functions/core/game/bank_functions.hpp +++ b/src/lua/functions/core/game/bank_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/game/config_functions.cpp b/src/lua/functions/core/game/config_functions.cpp index 1a646fe79..a84c500b9 100644 --- a/src/lua/functions/core/game/config_functions.cpp +++ b/src/lua/functions/core/game/config_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/game/config_functions.hpp b/src/lua/functions/core/game/config_functions.hpp index 4c5d57e87..ae4952e96 100644 --- a/src/lua/functions/core/game/config_functions.hpp +++ b/src/lua/functions/core/game/config_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/game/core_game_functions.hpp b/src/lua/functions/core/game/core_game_functions.hpp index c330f15eb..03bcc236d 100644 --- a/src/lua/functions/core/game/core_game_functions.hpp +++ b/src/lua/functions/core/game/core_game_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/game/game_functions.cpp b/src/lua/functions/core/game/game_functions.cpp index 5221d2c9e..ea418dede 100644 --- a/src/lua/functions/core/game/game_functions.cpp +++ b/src/lua/functions/core/game/game_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -26,6 +26,7 @@ #include "lua/creature/events.hpp" #include "lua/callbacks/event_callback.hpp" #include "lua/callbacks/events_callbacks.hpp" +#include "creatures/players/achievement/player_achievement.hpp" #include "map/spectators.hpp" // Game @@ -793,3 +794,113 @@ int GameFunctions::luaGameGetEventCallbacks(lua_State* L) { lua_pop(L, 1); return 1; } + +int GameFunctions::luaGameRegisterAchievement(lua_State* L) { + // Game.registerAchievement(id, name, description, secret, grade, points) + if (lua_gettop(L) < 6) { + reportErrorFunc("Achievement can only be registered with all params."); + return 1; + } + + uint16_t id = getNumber(L, 1); + std::string name = getString(L, 2); + std::string description = getString(L, 3); + bool secret = getBoolean(L, 4); + uint8_t grade = getNumber(L, 5); + uint8_t points = getNumber(L, 6); + g_game().registerAchievement(id, name, description, secret, grade, points); + pushBoolean(L, true); + return 1; +} + +int GameFunctions::luaGameGetAchievementInfoById(lua_State* L) { + // Game.getAchievementInfoById(id) + uint16_t id = getNumber(L, 1); + Achievement achievement = g_game().getAchievementById(id); + if (achievement.id == 0) { + reportErrorFunc("Achievement id is wrong"); + return 1; + } + + lua_createtable(L, 0, 6); + setField(L, "id", achievement.id); + setField(L, "name", achievement.name); + setField(L, "description", achievement.description); + setField(L, "points", achievement.points); + setField(L, "grade", achievement.grade); + setField(L, "secret", achievement.secret); + return 1; +} + +int GameFunctions::luaGameGetAchievementInfoByName(lua_State* L) { + // Game.getAchievementInfoByName(name) + std::string name = getString(L, 1); + Achievement achievement = g_game().getAchievementByName(name); + if (achievement.id == 0) { + reportErrorFunc("Achievement name is wrong"); + return 1; + } + + lua_createtable(L, 0, 6); + setField(L, "id", achievement.id); + setField(L, "name", achievement.name); + setField(L, "description", achievement.description); + setField(L, "points", achievement.points); + setField(L, "grade", achievement.grade); + setField(L, "secret", achievement.secret); + return 1; +} + +int GameFunctions::luaGameGetSecretAchievements(lua_State* L) { + // Game.getSecretAchievements() + const std::vector &achievements = g_game().getSecretAchievements(); + int index = 0; + lua_createtable(L, achievements.size(), 0); + for (const auto &achievement : achievements) { + lua_createtable(L, 0, 6); + setField(L, "id", achievement.id); + setField(L, "name", achievement.name); + setField(L, "description", achievement.description); + setField(L, "points", achievement.points); + setField(L, "grade", achievement.grade); + setField(L, "secret", achievement.secret); + lua_rawseti(L, -2, ++index); + } + return 1; +} + +int GameFunctions::luaGameGetPublicAchievements(lua_State* L) { + // Game.getPublicAchievements() + const std::vector &achievements = g_game().getPublicAchievements(); + int index = 0; + lua_createtable(L, achievements.size(), 0); + for (const auto &achievement : achievements) { + lua_createtable(L, 0, 6); + setField(L, "id", achievement.id); + setField(L, "name", achievement.name); + setField(L, "description", achievement.description); + setField(L, "points", achievement.points); + setField(L, "grade", achievement.grade); + setField(L, "secret", achievement.secret); + lua_rawseti(L, -2, ++index); + } + return 1; +} + +int GameFunctions::luaGameGetAchievements(lua_State* L) { + // Game.getAchievements() + const std::map &achievements = g_game().getAchievements(); + int index = 0; + lua_createtable(L, achievements.size(), 0); + for (const auto &achievement_it : achievements) { + lua_createtable(L, 0, 6); + setField(L, "id", achievement_it.first); + setField(L, "name", achievement_it.second.name); + setField(L, "description", achievement_it.second.description); + setField(L, "points", achievement_it.second.points); + setField(L, "grade", achievement_it.second.grade); + setField(L, "secret", achievement_it.second.secret); + lua_rawseti(L, -2, ++index); + } + return 1; +} diff --git a/src/lua/functions/core/game/game_functions.hpp b/src/lua/functions/core/game/game_functions.hpp index 95febd76e..7f3b642e9 100644 --- a/src/lua/functions/core/game/game_functions.hpp +++ b/src/lua/functions/core/game/game_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -81,6 +81,13 @@ class GameFunctions final : LuaScriptInterface { registerMethod(L, "Game", "getTalkActions", GameFunctions::luaGameGetTalkActions); registerMethod(L, "Game", "getEventCallbacks", GameFunctions::luaGameGetEventCallbacks); + + registerMethod(L, "Game", "registerAchievement", GameFunctions::luaGameRegisterAchievement); + registerMethod(L, "Game", "getAchievementInfoById", GameFunctions::luaGameGetAchievementInfoById); + registerMethod(L, "Game", "getAchievementInfoByName", GameFunctions::luaGameGetAchievementInfoByName); + registerMethod(L, "Game", "getSecretAchievements", GameFunctions::luaGameGetSecretAchievements); + registerMethod(L, "Game", "getPublicAchievements", GameFunctions::luaGameGetPublicAchievements); + registerMethod(L, "Game", "getAchievements", GameFunctions::luaGameGetAchievements); } private: @@ -150,4 +157,11 @@ class GameFunctions final : LuaScriptInterface { static int luaGameGetTalkActions(lua_State* L); static int luaGameGetEventCallbacks(lua_State* L); + + static int luaGameRegisterAchievement(lua_State* L); + static int luaGameGetAchievementInfoById(lua_State* L); + static int luaGameGetAchievementInfoByName(lua_State* L); + static int luaGameGetSecretAchievements(lua_State* L); + static int luaGameGetPublicAchievements(lua_State* L); + static int luaGameGetAchievements(lua_State* L); }; diff --git a/src/lua/functions/core/game/global_functions.cpp b/src/lua/functions/core/game/global_functions.cpp index bd40793f3..cbb133211 100644 --- a/src/lua/functions/core/game/global_functions.cpp +++ b/src/lua/functions/core/game/global_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -94,24 +94,6 @@ int GlobalFunctions::luaDoPlayerAddItem(lua_State* L) { return 1; } -int GlobalFunctions::luaDoSetCreatureLight(lua_State* L) { - // doSetCreatureLight(cid, lightLevel, lightColor, time) - std::shared_ptr creature = getCreature(L, 1); - if (!creature) { - reportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND)); - pushBoolean(L, false); - return 1; - } - - uint16_t level = getNumber(L, 2); - uint16_t color = getNumber(L, 3); - uint32_t time = getNumber(L, 4); - std::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_LIGHT, time, level | (color << 8)); - creature->addCondition(condition); - pushBoolean(L, true); - return 1; -} - int GlobalFunctions::luaIsValidUID(lua_State* L) { // isValidUID(uid) pushBoolean(L, getScriptEnv()->getThingByUID(getNumber(L, -1)) != nullptr); diff --git a/src/lua/functions/core/game/global_functions.hpp b/src/lua/functions/core/game/global_functions.hpp index 6ccb6c45d..cef752c66 100644 --- a/src/lua/functions/core/game/global_functions.hpp +++ b/src/lua/functions/core/game/global_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -25,7 +25,6 @@ class GlobalFunctions final : LuaScriptInterface { lua_register(L, "doAreaCombatMana", GlobalFunctions::luaDoAreaCombatMana); lua_register(L, "doChallengeCreature", GlobalFunctions::luaDoChallengeCreature); lua_register(L, "doPlayerAddItem", GlobalFunctions::luaDoPlayerAddItem); - lua_register(L, "doSetCreatureLight", GlobalFunctions::luaDoSetCreatureLight); lua_register(L, "doTargetCombatCondition", GlobalFunctions::luaDoTargetCombatCondition); lua_register(L, "doTargetCombatDispel", GlobalFunctions::luaDoTargetCombatDispel); lua_register(L, "doTargetCombatHealth", GlobalFunctions::luaDoTargetCombatHealth); @@ -66,7 +65,6 @@ class GlobalFunctions final : LuaScriptInterface { static int luaDoAreaCombatMana(lua_State* L); static int luaDoChallengeCreature(lua_State* L); static int luaDoPlayerAddItem(lua_State* L); - static int luaDoSetCreatureLight(lua_State* L); static int luaDoTargetCombatCondition(lua_State* L); static int luaDoTargetCombatDispel(lua_State* L); static int luaDoTargetCombatHealth(lua_State* L); diff --git a/src/lua/functions/core/game/lua_enums.cpp b/src/lua/functions/core/game/lua_enums.cpp index 22ef44339..2e3813e07 100644 --- a/src/lua/functions/core/game/lua_enums.cpp +++ b/src/lua/functions/core/game/lua_enums.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -742,7 +742,7 @@ void LuaEnums::initGameStateEnums(lua_State* L) { void LuaEnums::initMessageEnums(lua_State* L) { registerEnum(L, MESSAGE_GAMEMASTER_CONSOLE); registerEnum(L, MESSAGE_LOGIN); - registerEnum(L, MESSAGE_ADMINISTRADOR); + registerEnum(L, MESSAGE_ADMINISTRATOR); registerEnum(L, MESSAGE_EVENT_ADVANCE); registerEnum(L, MESSAGE_GAME_HIGHLIGHT); registerEnum(L, MESSAGE_FAILURE); @@ -866,6 +866,7 @@ void LuaEnums::initItemIdEnums(lua_State* L) { registerEnum(L, ITEM_REWARD_CONTAINER); registerEnum(L, ITEM_AMULETOFLOSS); registerEnum(L, ITEM_PARCEL); + registerEnum(L, ITEM_PARCEL_STAMPED); registerEnum(L, ITEM_LABEL); registerEnum(L, ITEM_FIREFIELD_PVP_FULL); registerEnum(L, ITEM_FIREFIELD_PVP_MEDIUM); @@ -1124,6 +1125,9 @@ void LuaEnums::initMapMarkEnums(lua_State* L) { // Use with Game.getReturnMessage void LuaEnums::initReturnValueEnums(lua_State* L) { registerEnum(L, RETURNVALUE_NOERROR); + registerEnum(L, RETURNVALUE_NOTBOUGHTINSTORE); + registerEnum(L, RETURNVALUE_ITEMCANNOTBEMOVEDTHERE); + registerEnum(L, RETURNVALUE_ITEMCANNOTBEMOVEDPOUCH); registerEnum(L, RETURNVALUE_NOTPOSSIBLE); registerEnum(L, RETURNVALUE_NOTENOUGHROOM); registerEnum(L, RETURNVALUE_PLAYERISPZLOCKED); diff --git a/src/lua/functions/core/game/lua_enums.hpp b/src/lua/functions/core/game/lua_enums.hpp index 654b46059..8beabbbac 100644 --- a/src/lua/functions/core/game/lua_enums.hpp +++ b/src/lua/functions/core/game/lua_enums.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/game/modal_window_functions.cpp b/src/lua/functions/core/game/modal_window_functions.cpp index 754d36d43..0221a9e9a 100644 --- a/src/lua/functions/core/game/modal_window_functions.cpp +++ b/src/lua/functions/core/game/modal_window_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/game/modal_window_functions.hpp b/src/lua/functions/core/game/modal_window_functions.hpp index 78e935314..9d6b91920 100644 --- a/src/lua/functions/core/game/modal_window_functions.hpp +++ b/src/lua/functions/core/game/modal_window_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/libs/bit_functions.cpp b/src/lua/functions/core/libs/bit_functions.cpp index ea1bb3db8..86f76a77a 100644 --- a/src/lua/functions/core/libs/bit_functions.cpp +++ b/src/lua/functions/core/libs/bit_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/libs/bit_functions.hpp b/src/lua/functions/core/libs/bit_functions.hpp index 2c514276f..c2143fde1 100644 --- a/src/lua/functions/core/libs/bit_functions.hpp +++ b/src/lua/functions/core/libs/bit_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/libs/core_libs_functions.hpp b/src/lua/functions/core/libs/core_libs_functions.hpp index 4badabe26..614c59e6e 100644 --- a/src/lua/functions/core/libs/core_libs_functions.hpp +++ b/src/lua/functions/core/libs/core_libs_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/libs/db_functions.cpp b/src/lua/functions/core/libs/db_functions.cpp index 72aee912c..d5f5a62e0 100644 --- a/src/lua/functions/core/libs/db_functions.cpp +++ b/src/lua/functions/core/libs/db_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/libs/db_functions.hpp b/src/lua/functions/core/libs/db_functions.hpp index 8e7f31479..99b69f1f7 100644 --- a/src/lua/functions/core/libs/db_functions.hpp +++ b/src/lua/functions/core/libs/db_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/libs/kv_functions.cpp b/src/lua/functions/core/libs/kv_functions.cpp index dbef91636..5ed9c9cfe 100644 --- a/src/lua/functions/core/libs/kv_functions.cpp +++ b/src/lua/functions/core/libs/kv_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/libs/kv_functions.hpp b/src/lua/functions/core/libs/kv_functions.hpp index f6775f9e2..919901df7 100644 --- a/src/lua/functions/core/libs/kv_functions.hpp +++ b/src/lua/functions/core/libs/kv_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/libs/logger_functions.cpp b/src/lua/functions/core/libs/logger_functions.cpp index 7b7f21b82..dc039a9ed 100644 --- a/src/lua/functions/core/libs/logger_functions.cpp +++ b/src/lua/functions/core/libs/logger_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/libs/logger_functions.hpp b/src/lua/functions/core/libs/logger_functions.hpp index d1db895d6..5e83f1461 100644 --- a/src/lua/functions/core/libs/logger_functions.hpp +++ b/src/lua/functions/core/libs/logger_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/libs/metrics_functions.cpp b/src/lua/functions/core/libs/metrics_functions.cpp index 4c0b916c9..9dc9fa528 100644 --- a/src/lua/functions/core/libs/metrics_functions.cpp +++ b/src/lua/functions/core/libs/metrics_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/libs/metrics_functions.hpp b/src/lua/functions/core/libs/metrics_functions.hpp index 47d492c3d..e71f005aa 100644 --- a/src/lua/functions/core/libs/metrics_functions.hpp +++ b/src/lua/functions/core/libs/metrics_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/libs/result_functions.cpp b/src/lua/functions/core/libs/result_functions.cpp index 1c2115e96..512f90f7d 100644 --- a/src/lua/functions/core/libs/result_functions.cpp +++ b/src/lua/functions/core/libs/result_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/libs/result_functions.hpp b/src/lua/functions/core/libs/result_functions.hpp index 47eacc513..4aa25173e 100644 --- a/src/lua/functions/core/libs/result_functions.hpp +++ b/src/lua/functions/core/libs/result_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/network/core_network_functions.hpp b/src/lua/functions/core/network/core_network_functions.hpp index a43553e76..c1e65ec15 100644 --- a/src/lua/functions/core/network/core_network_functions.hpp +++ b/src/lua/functions/core/network/core_network_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/network/network_message_functions.cpp b/src/lua/functions/core/network/network_message_functions.cpp index 630cd185d..a1b66264f 100644 --- a/src/lua/functions/core/network/network_message_functions.cpp +++ b/src/lua/functions/core/network/network_message_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/network/network_message_functions.hpp b/src/lua/functions/core/network/network_message_functions.hpp index df27dbd19..5a2982c0d 100644 --- a/src/lua/functions/core/network/network_message_functions.hpp +++ b/src/lua/functions/core/network/network_message_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/network/webhook_functions.cpp b/src/lua/functions/core/network/webhook_functions.cpp index 43e1935d9..37372f8b2 100644 --- a/src/lua/functions/core/network/webhook_functions.cpp +++ b/src/lua/functions/core/network/webhook_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/core/network/webhook_functions.hpp b/src/lua/functions/core/network/webhook_functions.hpp index ac79e40ec..7d5f53ba4 100644 --- a/src/lua/functions/core/network/webhook_functions.hpp +++ b/src/lua/functions/core/network/webhook_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/combat/combat_functions.cpp b/src/lua/functions/creatures/combat/combat_functions.cpp index 0d55cae90..3bba21d17 100644 --- a/src/lua/functions/creatures/combat/combat_functions.cpp +++ b/src/lua/functions/creatures/combat/combat_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/combat/combat_functions.hpp b/src/lua/functions/creatures/combat/combat_functions.hpp index 652255d7a..e031713e9 100644 --- a/src/lua/functions/creatures/combat/combat_functions.hpp +++ b/src/lua/functions/creatures/combat/combat_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/combat/condition_functions.cpp b/src/lua/functions/creatures/combat/condition_functions.cpp index efd468ac3..7bc2535bd 100644 --- a/src/lua/functions/creatures/combat/condition_functions.cpp +++ b/src/lua/functions/creatures/combat/condition_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/combat/condition_functions.hpp b/src/lua/functions/creatures/combat/condition_functions.hpp index 7357cf9a9..938c51705 100644 --- a/src/lua/functions/creatures/combat/condition_functions.hpp +++ b/src/lua/functions/creatures/combat/condition_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/combat/spell_functions.cpp b/src/lua/functions/creatures/combat/spell_functions.cpp index c76df1163..0bcf7c9c1 100644 --- a/src/lua/functions/creatures/combat/spell_functions.cpp +++ b/src/lua/functions/creatures/combat/spell_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/combat/spell_functions.hpp b/src/lua/functions/creatures/combat/spell_functions.hpp index 9a4acb6fa..7f2487ba1 100644 --- a/src/lua/functions/creatures/combat/spell_functions.hpp +++ b/src/lua/functions/creatures/combat/spell_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/combat/variant_functions.cpp b/src/lua/functions/creatures/combat/variant_functions.cpp index 602dbfa18..3b0299983 100644 --- a/src/lua/functions/creatures/combat/variant_functions.cpp +++ b/src/lua/functions/creatures/combat/variant_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/combat/variant_functions.hpp b/src/lua/functions/creatures/combat/variant_functions.hpp index 3f91600de..c62bbc114 100644 --- a/src/lua/functions/creatures/combat/variant_functions.hpp +++ b/src/lua/functions/creatures/combat/variant_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/creature_functions.cpp b/src/lua/functions/creatures/creature_functions.cpp index 8315a690f..a633afe97 100644 --- a/src/lua/functions/creatures/creature_functions.cpp +++ b/src/lua/functions/creatures/creature_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/creature_functions.hpp b/src/lua/functions/creatures/creature_functions.hpp index 48c374936..0876bb729 100644 --- a/src/lua/functions/creatures/creature_functions.hpp +++ b/src/lua/functions/creatures/creature_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/monster/charm_functions.cpp b/src/lua/functions/creatures/monster/charm_functions.cpp index 2e6234d61..48f7ff5ae 100644 --- a/src/lua/functions/creatures/monster/charm_functions.cpp +++ b/src/lua/functions/creatures/monster/charm_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/monster/charm_functions.hpp b/src/lua/functions/creatures/monster/charm_functions.hpp index 4a7665865..7be1c8de6 100644 --- a/src/lua/functions/creatures/monster/charm_functions.hpp +++ b/src/lua/functions/creatures/monster/charm_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/monster/loot_functions.cpp b/src/lua/functions/creatures/monster/loot_functions.cpp index b23508033..3fe3a1883 100644 --- a/src/lua/functions/creatures/monster/loot_functions.cpp +++ b/src/lua/functions/creatures/monster/loot_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/monster/loot_functions.hpp b/src/lua/functions/creatures/monster/loot_functions.hpp index 919588ee3..77059307a 100644 --- a/src/lua/functions/creatures/monster/loot_functions.hpp +++ b/src/lua/functions/creatures/monster/loot_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/monster/monster_functions.cpp b/src/lua/functions/creatures/monster/monster_functions.cpp index 0c6bcf8c5..1591053c3 100644 --- a/src/lua/functions/creatures/monster/monster_functions.cpp +++ b/src/lua/functions/creatures/monster/monster_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/monster/monster_functions.hpp b/src/lua/functions/creatures/monster/monster_functions.hpp index a74253a19..bf2785ae4 100644 --- a/src/lua/functions/creatures/monster/monster_functions.hpp +++ b/src/lua/functions/creatures/monster/monster_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/monster/monster_spell_functions.cpp b/src/lua/functions/creatures/monster/monster_spell_functions.cpp index 00e0c7c89..ee00fd43a 100644 --- a/src/lua/functions/creatures/monster/monster_spell_functions.cpp +++ b/src/lua/functions/creatures/monster/monster_spell_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/monster/monster_spell_functions.hpp b/src/lua/functions/creatures/monster/monster_spell_functions.hpp index 4a1a4871c..ad737ea93 100644 --- a/src/lua/functions/creatures/monster/monster_spell_functions.hpp +++ b/src/lua/functions/creatures/monster/monster_spell_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/monster/monster_type_functions.cpp b/src/lua/functions/creatures/monster/monster_type_functions.cpp index 269ff6aa3..b937083fd 100644 --- a/src/lua/functions/creatures/monster/monster_type_functions.cpp +++ b/src/lua/functions/creatures/monster/monster_type_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/monster/monster_type_functions.hpp b/src/lua/functions/creatures/monster/monster_type_functions.hpp index f1b2a98bf..9a72f53b1 100644 --- a/src/lua/functions/creatures/monster/monster_type_functions.hpp +++ b/src/lua/functions/creatures/monster/monster_type_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/npc/npc_functions.cpp b/src/lua/functions/creatures/npc/npc_functions.cpp index c4f447c88..43c2950a8 100644 --- a/src/lua/functions/creatures/npc/npc_functions.cpp +++ b/src/lua/functions/creatures/npc/npc_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/npc/npc_functions.hpp b/src/lua/functions/creatures/npc/npc_functions.hpp index ef3371a54..1622a15c0 100644 --- a/src/lua/functions/creatures/npc/npc_functions.hpp +++ b/src/lua/functions/creatures/npc/npc_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/npc/npc_type_functions.cpp b/src/lua/functions/creatures/npc/npc_type_functions.cpp index 35bbebbe8..ef79b671a 100644 --- a/src/lua/functions/creatures/npc/npc_type_functions.cpp +++ b/src/lua/functions/creatures/npc/npc_type_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/npc/npc_type_functions.hpp b/src/lua/functions/creatures/npc/npc_type_functions.hpp index a6646b7b2..ce799c71f 100644 --- a/src/lua/functions/creatures/npc/npc_type_functions.hpp +++ b/src/lua/functions/creatures/npc/npc_type_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/npc/shop_functions.cpp b/src/lua/functions/creatures/npc/shop_functions.cpp index 66de7afd9..ee848e0bf 100644 --- a/src/lua/functions/creatures/npc/shop_functions.cpp +++ b/src/lua/functions/creatures/npc/shop_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/npc/shop_functions.hpp b/src/lua/functions/creatures/npc/shop_functions.hpp index 1ffb53c92..e5a6c9943 100644 --- a/src/lua/functions/creatures/npc/shop_functions.hpp +++ b/src/lua/functions/creatures/npc/shop_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/player/group_functions.cpp b/src/lua/functions/creatures/player/group_functions.cpp index 13b270125..0ea195fe7 100644 --- a/src/lua/functions/creatures/player/group_functions.cpp +++ b/src/lua/functions/creatures/player/group_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/player/group_functions.hpp b/src/lua/functions/creatures/player/group_functions.hpp index 68ce41ade..ecc3ac072 100644 --- a/src/lua/functions/creatures/player/group_functions.hpp +++ b/src/lua/functions/creatures/player/group_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/player/guild_functions.cpp b/src/lua/functions/creatures/player/guild_functions.cpp index 81464483f..196f0f9d3 100644 --- a/src/lua/functions/creatures/player/guild_functions.cpp +++ b/src/lua/functions/creatures/player/guild_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/player/guild_functions.hpp b/src/lua/functions/creatures/player/guild_functions.hpp index f29770383..e5c482444 100644 --- a/src/lua/functions/creatures/player/guild_functions.hpp +++ b/src/lua/functions/creatures/player/guild_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/player/mount_functions.cpp b/src/lua/functions/creatures/player/mount_functions.cpp index 719c75ad7..49b16db6c 100644 --- a/src/lua/functions/creatures/player/mount_functions.cpp +++ b/src/lua/functions/creatures/player/mount_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/player/mount_functions.hpp b/src/lua/functions/creatures/player/mount_functions.hpp index 61222e912..3a4db6d6f 100644 --- a/src/lua/functions/creatures/player/mount_functions.hpp +++ b/src/lua/functions/creatures/player/mount_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/player/party_functions.cpp b/src/lua/functions/creatures/player/party_functions.cpp index e16499870..d739cde3c 100644 --- a/src/lua/functions/creatures/player/party_functions.cpp +++ b/src/lua/functions/creatures/player/party_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/player/party_functions.hpp b/src/lua/functions/creatures/player/party_functions.hpp index 30ff51720..312a39952 100644 --- a/src/lua/functions/creatures/player/party_functions.hpp +++ b/src/lua/functions/creatures/player/party_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/player/player_functions.cpp b/src/lua/functions/creatures/player/player_functions.cpp index 757a43474..3ba2c4384 100644 --- a/src/lua/functions/creatures/player/player_functions.cpp +++ b/src/lua/functions/creatures/player/player_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -14,6 +14,7 @@ #include "creatures/interactions/chat.hpp" #include "creatures/players/player.hpp" #include "creatures/players/wheel/player_wheel.hpp" +#include "creatures/players/achievement/player_achievement.hpp" #include "game/game.hpp" #include "io/iologindata.hpp" #include "io/ioprey.hpp" @@ -4177,3 +4178,104 @@ int PlayerFunctions::luaPlayerGetStoreInbox(lua_State* L) { } return 1; } + +int PlayerFunctions::luaPlayerHasAchievement(lua_State* L) { + // player:hasAchievement(id or name) + const auto &player = getUserdataShared(L, 1); + if (!player) { + reportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND)); + return 1; + } + + uint16_t achievementId = 0; + if (isNumber(L, 2)) { + achievementId = getNumber(L, 2); + } else { + achievementId = g_game().getAchievementByName(getString(L, 2)).id; + } + + pushBoolean(L, player->achiev()->isUnlocked(achievementId)); + return 1; +} + +int PlayerFunctions::luaPlayerAddAchievement(lua_State* L) { + // player:addAchievement(id or name[, sendMessage = true]) + const auto &player = getUserdataShared(L, 1); + if (!player) { + reportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND)); + return 1; + } + + uint16_t achievementId = 0; + if (isNumber(L, 2)) { + achievementId = getNumber(L, 2); + } else { + achievementId = g_game().getAchievementByName(getString(L, 2)).id; + } + + pushBoolean(L, player->achiev()->add(achievementId, getBoolean(L, 3, true))); + return 1; +} + +int PlayerFunctions::luaPlayerRemoveAchievement(lua_State* L) { + // player:removeAchievement(id or name) + const auto &player = getUserdataShared(L, 1); + if (!player) { + reportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND)); + return 1; + } + + uint16_t achievementId = 0; + if (isNumber(L, 2)) { + achievementId = getNumber(L, 2); + } else { + achievementId = g_game().getAchievementByName(getString(L, 2)).id; + } + + pushBoolean(L, player->achiev()->remove(achievementId)); + return 1; +} + +int PlayerFunctions::luaPlayerGetAchievementPoints(lua_State* L) { + // player:getAchievementPoints() + const auto &player = getUserdataShared(L, 1); + if (!player) { + reportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND)); + return 1; + } + + lua_pushnumber(L, player->achiev()->getPoints()); + return 1; +} + +int PlayerFunctions::luaPlayerAddAchievementPoints(lua_State* L) { + // player:addAchievementPoints(amount) + const auto &player = getUserdataShared(L, 1); + if (!player) { + reportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND)); + return 1; + } + + auto points = getNumber(L, 2); + if (points > 0) { + player->achiev()->addPoints(points); + } + pushBoolean(L, true); + return 1; +} + +int PlayerFunctions::luaPlayerRemoveAchievementPoints(lua_State* L) { + // player:removeAchievementPoints(amount) + const auto &player = getUserdataShared(L, 1); + if (!player) { + reportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND)); + return 1; + } + + auto points = getNumber(L, 2); + if (points > 0) { + player->achiev()->removePoints(points); + } + pushBoolean(L, true); + return 1; +} diff --git a/src/lua/functions/creatures/player/player_functions.hpp b/src/lua/functions/creatures/player/player_functions.hpp index 47b9f4b3a..fafc99ff9 100644 --- a/src/lua/functions/creatures/player/player_functions.hpp +++ b/src/lua/functions/creatures/player/player_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -357,6 +357,13 @@ class PlayerFunctions final : LuaScriptInterface { registerMethod(L, "Player", "kv", PlayerFunctions::luaPlayerKV); registerMethod(L, "Player", "getStoreInbox", PlayerFunctions::luaPlayerGetStoreInbox); + registerMethod(L, "Player", "hasAchievement", PlayerFunctions::luaPlayerHasAchievement); + registerMethod(L, "Player", "addAchievement", PlayerFunctions::luaPlayerAddAchievement); + registerMethod(L, "Player", "removeAchievement", PlayerFunctions::luaPlayerRemoveAchievement); + registerMethod(L, "Player", "getAchievementPoints", PlayerFunctions::luaPlayerGetAchievementPoints); + registerMethod(L, "Player", "addAchievementPoints", PlayerFunctions::luaPlayerAddAchievementPoints); + registerMethod(L, "Player", "removeAchievementPoints", PlayerFunctions::luaPlayerRemoveAchievementPoints); + GroupFunctions::init(L); GuildFunctions::init(L); MountFunctions::init(L); @@ -704,5 +711,12 @@ class PlayerFunctions final : LuaScriptInterface { static int luaPlayerKV(lua_State* L); static int luaPlayerGetStoreInbox(lua_State* L); + static int luaPlayerHasAchievement(lua_State* L); + static int luaPlayerAddAchievement(lua_State* L); + static int luaPlayerRemoveAchievement(lua_State* L); + static int luaPlayerGetAchievementPoints(lua_State* L); + static int luaPlayerAddAchievementPoints(lua_State* L); + static int luaPlayerRemoveAchievementPoints(lua_State* L); + friend class CreatureFunctions; }; diff --git a/src/lua/functions/creatures/player/vocation_functions.cpp b/src/lua/functions/creatures/player/vocation_functions.cpp index 4d6a99cc1..5e95a827f 100644 --- a/src/lua/functions/creatures/player/vocation_functions.cpp +++ b/src/lua/functions/creatures/player/vocation_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/creatures/player/vocation_functions.hpp b/src/lua/functions/creatures/player/vocation_functions.hpp index 67868ae1e..7205580f9 100644 --- a/src/lua/functions/creatures/player/vocation_functions.hpp +++ b/src/lua/functions/creatures/player/vocation_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/events/action_functions.cpp b/src/lua/functions/events/action_functions.cpp index e0e746d41..c1fd581f8 100644 --- a/src/lua/functions/events/action_functions.cpp +++ b/src/lua/functions/events/action_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/events/action_functions.hpp b/src/lua/functions/events/action_functions.hpp index 759d5275f..952ee746a 100644 --- a/src/lua/functions/events/action_functions.hpp +++ b/src/lua/functions/events/action_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/events/creature_event_functions.cpp b/src/lua/functions/events/creature_event_functions.cpp index 2c5da7661..7b5e25a12 100644 --- a/src/lua/functions/events/creature_event_functions.cpp +++ b/src/lua/functions/events/creature_event_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/events/creature_event_functions.hpp b/src/lua/functions/events/creature_event_functions.hpp index 8c1d5a871..64b9e6e4e 100644 --- a/src/lua/functions/events/creature_event_functions.hpp +++ b/src/lua/functions/events/creature_event_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/events/event_callback_functions.cpp b/src/lua/functions/events/event_callback_functions.cpp index 3be4adf25..54457f436 100644 --- a/src/lua/functions/events/event_callback_functions.cpp +++ b/src/lua/functions/events/event_callback_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/events/event_callback_functions.hpp b/src/lua/functions/events/event_callback_functions.hpp index 9cdc21729..a5fa9e890 100644 --- a/src/lua/functions/events/event_callback_functions.hpp +++ b/src/lua/functions/events/event_callback_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/events/events_functions.hpp b/src/lua/functions/events/events_functions.hpp index d9be1e080..6830b7c1a 100644 --- a/src/lua/functions/events/events_functions.hpp +++ b/src/lua/functions/events/events_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/events/events_scheduler_functions.cpp b/src/lua/functions/events/events_scheduler_functions.cpp index d07482dd2..e26794e21 100644 --- a/src/lua/functions/events/events_scheduler_functions.cpp +++ b/src/lua/functions/events/events_scheduler_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -18,6 +18,12 @@ int EventsSchedulerFunctions::luaEventsSchedulergetEventSLoot(lua_State* L) { return 1; } +int EventsSchedulerFunctions::luaEventsSchedulergetEventSBossLoot(lua_State* L) { + // EventsScheduler.getEventSLoot + lua_pushnumber(L, g_eventsScheduler().getBossLootSchedule()); + return 1; +} + int EventsSchedulerFunctions::luaEventsSchedulergetEventSSkill(lua_State* L) { // EventsScheduler.getEventSSkill lua_pushnumber(L, g_eventsScheduler().getSkillSchedule()); diff --git a/src/lua/functions/events/events_scheduler_functions.hpp b/src/lua/functions/events/events_scheduler_functions.hpp index ab7978043..bedbf16b4 100644 --- a/src/lua/functions/events/events_scheduler_functions.hpp +++ b/src/lua/functions/events/events_scheduler_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -17,6 +17,7 @@ class EventsSchedulerFunctions final : private LuaScriptInterface { registerTable(L, "EventsScheduler"); registerMethod(L, "EventsScheduler", "getEventSLoot", EventsSchedulerFunctions::luaEventsSchedulergetEventSLoot); + registerMethod(L, "EventsScheduler", "getEventSBossLoot", EventsSchedulerFunctions::luaEventsSchedulergetEventSBossLoot); registerMethod(L, "EventsScheduler", "getEventSSkill", EventsSchedulerFunctions::luaEventsSchedulergetEventSSkill); registerMethod(L, "EventsScheduler", "getEventSExp", EventsSchedulerFunctions::luaEventsSchedulergetEventSExp); registerMethod(L, "EventsScheduler", "getSpawnMonsterSchedule", EventsSchedulerFunctions::luaEventsSchedulergetSpawnMonsterSchedule); @@ -24,6 +25,7 @@ class EventsSchedulerFunctions final : private LuaScriptInterface { private: static int luaEventsSchedulergetEventSLoot(lua_State* L); + static int luaEventsSchedulergetEventSBossLoot(lua_State* L); static int luaEventsSchedulergetEventSSkill(lua_State* L); static int luaEventsSchedulergetEventSExp(lua_State* L); static int luaEventsSchedulergetSpawnMonsterSchedule(lua_State* L); diff --git a/src/lua/functions/events/global_event_functions.cpp b/src/lua/functions/events/global_event_functions.cpp index 955f477bc..8f54e5b03 100644 --- a/src/lua/functions/events/global_event_functions.cpp +++ b/src/lua/functions/events/global_event_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/events/global_event_functions.hpp b/src/lua/functions/events/global_event_functions.hpp index dd9491928..6c988a61c 100644 --- a/src/lua/functions/events/global_event_functions.hpp +++ b/src/lua/functions/events/global_event_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/events/move_event_functions.cpp b/src/lua/functions/events/move_event_functions.cpp index 07bf82d4c..5de49c26f 100644 --- a/src/lua/functions/events/move_event_functions.cpp +++ b/src/lua/functions/events/move_event_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/events/move_event_functions.hpp b/src/lua/functions/events/move_event_functions.hpp index 23187553e..6e6412bec 100644 --- a/src/lua/functions/events/move_event_functions.hpp +++ b/src/lua/functions/events/move_event_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/events/talk_action_functions.cpp b/src/lua/functions/events/talk_action_functions.cpp index d6d772877..8618cc3c4 100644 --- a/src/lua/functions/events/talk_action_functions.cpp +++ b/src/lua/functions/events/talk_action_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/events/talk_action_functions.hpp b/src/lua/functions/events/talk_action_functions.hpp index a8c003828..6b2bc9b7a 100644 --- a/src/lua/functions/events/talk_action_functions.hpp +++ b/src/lua/functions/events/talk_action_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/items/container_functions.cpp b/src/lua/functions/items/container_functions.cpp index 132acbdc5..a2251de64 100644 --- a/src/lua/functions/items/container_functions.cpp +++ b/src/lua/functions/items/container_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/items/container_functions.hpp b/src/lua/functions/items/container_functions.hpp index 186f6b681..568018b45 100644 --- a/src/lua/functions/items/container_functions.hpp +++ b/src/lua/functions/items/container_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/items/imbuement_functions.cpp b/src/lua/functions/items/imbuement_functions.cpp index 2a4e85d7d..f24a3f564 100644 --- a/src/lua/functions/items/imbuement_functions.cpp +++ b/src/lua/functions/items/imbuement_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/items/imbuement_functions.hpp b/src/lua/functions/items/imbuement_functions.hpp index 018c7faad..516fe91a3 100644 --- a/src/lua/functions/items/imbuement_functions.hpp +++ b/src/lua/functions/items/imbuement_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/items/item_classification_functions.cpp b/src/lua/functions/items/item_classification_functions.cpp index 5120f8391..aa8cf19d5 100644 --- a/src/lua/functions/items/item_classification_functions.cpp +++ b/src/lua/functions/items/item_classification_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/items/item_classification_functions.hpp b/src/lua/functions/items/item_classification_functions.hpp index 95f778705..ebbd9fddd 100644 --- a/src/lua/functions/items/item_classification_functions.hpp +++ b/src/lua/functions/items/item_classification_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/items/item_functions.cpp b/src/lua/functions/items/item_functions.cpp index 3e9190055..71ab040f4 100644 --- a/src/lua/functions/items/item_functions.cpp +++ b/src/lua/functions/items/item_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/items/item_functions.hpp b/src/lua/functions/items/item_functions.hpp index 5e8c81187..44e111479 100644 --- a/src/lua/functions/items/item_functions.hpp +++ b/src/lua/functions/items/item_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/items/item_type_functions.cpp b/src/lua/functions/items/item_type_functions.cpp index 4ff757b3d..b528795a0 100644 --- a/src/lua/functions/items/item_type_functions.cpp +++ b/src/lua/functions/items/item_type_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/items/item_type_functions.hpp b/src/lua/functions/items/item_type_functions.hpp index 46eaa6462..ce53d4298 100644 --- a/src/lua/functions/items/item_type_functions.hpp +++ b/src/lua/functions/items/item_type_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/items/weapon_functions.cpp b/src/lua/functions/items/weapon_functions.cpp index 3a41d0ac7..962c1181f 100644 --- a/src/lua/functions/items/weapon_functions.cpp +++ b/src/lua/functions/items/weapon_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/items/weapon_functions.hpp b/src/lua/functions/items/weapon_functions.hpp index 01ba69663..b7ac6fe6a 100644 --- a/src/lua/functions/items/weapon_functions.hpp +++ b/src/lua/functions/items/weapon_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/lua_functions_loader.cpp b/src/lua/functions/lua_functions_loader.cpp index 77f360ce0..69ee85dd8 100644 --- a/src/lua/functions/lua_functions_loader.cpp +++ b/src/lua/functions/lua_functions_loader.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/lua_functions_loader.hpp b/src/lua/functions/lua_functions_loader.hpp index 26ae6219f..e5251e3a1 100644 --- a/src/lua/functions/lua_functions_loader.hpp +++ b/src/lua/functions/lua_functions_loader.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/map/house_functions.cpp b/src/lua/functions/map/house_functions.cpp index 834382ae4..ffba0d0b5 100644 --- a/src/lua/functions/map/house_functions.cpp +++ b/src/lua/functions/map/house_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/map/house_functions.hpp b/src/lua/functions/map/house_functions.hpp index b5419ad5e..ede7e1f09 100644 --- a/src/lua/functions/map/house_functions.hpp +++ b/src/lua/functions/map/house_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/map/map_functions.hpp b/src/lua/functions/map/map_functions.hpp index 526705dcc..43b025c91 100644 --- a/src/lua/functions/map/map_functions.hpp +++ b/src/lua/functions/map/map_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/map/position_functions.cpp b/src/lua/functions/map/position_functions.cpp index b68d85015..579304266 100644 --- a/src/lua/functions/map/position_functions.cpp +++ b/src/lua/functions/map/position_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/map/position_functions.hpp b/src/lua/functions/map/position_functions.hpp index b7a6de50d..095ec0667 100644 --- a/src/lua/functions/map/position_functions.hpp +++ b/src/lua/functions/map/position_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/map/teleport_functions.cpp b/src/lua/functions/map/teleport_functions.cpp index 05a4b408f..32fce5830 100644 --- a/src/lua/functions/map/teleport_functions.cpp +++ b/src/lua/functions/map/teleport_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/map/teleport_functions.hpp b/src/lua/functions/map/teleport_functions.hpp index 6c02c1620..152cf8f0d 100644 --- a/src/lua/functions/map/teleport_functions.hpp +++ b/src/lua/functions/map/teleport_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/map/tile_functions.cpp b/src/lua/functions/map/tile_functions.cpp index 448671c3b..cdd82abda 100644 --- a/src/lua/functions/map/tile_functions.cpp +++ b/src/lua/functions/map/tile_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/map/tile_functions.hpp b/src/lua/functions/map/tile_functions.hpp index a1956171c..78e8c44b3 100644 --- a/src/lua/functions/map/tile_functions.hpp +++ b/src/lua/functions/map/tile_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/map/town_functions.cpp b/src/lua/functions/map/town_functions.cpp index f50042c15..053aca36b 100644 --- a/src/lua/functions/map/town_functions.cpp +++ b/src/lua/functions/map/town_functions.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/functions/map/town_functions.hpp b/src/lua/functions/map/town_functions.hpp index 4f60eeab2..65ff991c2 100644 --- a/src/lua/functions/map/town_functions.hpp +++ b/src/lua/functions/map/town_functions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/global/baseevents.cpp b/src/lua/global/baseevents.cpp index 7347c898c..9728342f7 100644 --- a/src/lua/global/baseevents.cpp +++ b/src/lua/global/baseevents.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/global/baseevents.hpp b/src/lua/global/baseevents.hpp index 84b16ca6e..48e2d104a 100644 --- a/src/lua/global/baseevents.hpp +++ b/src/lua/global/baseevents.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/global/globalevent.cpp b/src/lua/global/globalevent.cpp index c50eba9b8..62650b429 100644 --- a/src/lua/global/globalevent.cpp +++ b/src/lua/global/globalevent.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/global/globalevent.hpp b/src/lua/global/globalevent.hpp index 683da7126..004c6cb5f 100644 --- a/src/lua/global/globalevent.hpp +++ b/src/lua/global/globalevent.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/global/lua_timer_event_descr.hpp b/src/lua/global/lua_timer_event_descr.hpp index da9bdc9b4..a8f756365 100644 --- a/src/lua/global/lua_timer_event_descr.hpp +++ b/src/lua/global/lua_timer_event_descr.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/global/lua_variant.hpp b/src/lua/global/lua_variant.hpp index 13250cc62..6ec24d4f8 100644 --- a/src/lua/global/lua_variant.hpp +++ b/src/lua/global/lua_variant.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/global/shared_object.hpp b/src/lua/global/shared_object.hpp index 3370bb022..4a6fc3c98 100644 --- a/src/lua/global/shared_object.hpp +++ b/src/lua/global/shared_object.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/lua_definitions.hpp b/src/lua/lua_definitions.hpp index e0ff4028c..083871e23 100644 --- a/src/lua/lua_definitions.hpp +++ b/src/lua/lua_definitions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/modules/modules.cpp b/src/lua/modules/modules.cpp index 5e1565251..8b79524ec 100644 --- a/src/lua/modules/modules.cpp +++ b/src/lua/modules/modules.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/modules/modules.hpp b/src/lua/modules/modules.hpp index f72baf94f..6543138d5 100644 --- a/src/lua/modules/modules.hpp +++ b/src/lua/modules/modules.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/scripts/lua_environment.cpp b/src/lua/scripts/lua_environment.cpp index f5552d108..f3d2273df 100644 --- a/src/lua/scripts/lua_environment.cpp +++ b/src/lua/scripts/lua_environment.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/scripts/lua_environment.hpp b/src/lua/scripts/lua_environment.hpp index 8a7e7db66..b467599ca 100644 --- a/src/lua/scripts/lua_environment.hpp +++ b/src/lua/scripts/lua_environment.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/scripts/luajit_sync.hpp b/src/lua/scripts/luajit_sync.hpp index f32f82efc..62f5720bd 100644 --- a/src/lua/scripts/luajit_sync.hpp +++ b/src/lua/scripts/luajit_sync.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/scripts/luascript.cpp b/src/lua/scripts/luascript.cpp index adefef958..d67b90e9d 100644 --- a/src/lua/scripts/luascript.cpp +++ b/src/lua/scripts/luascript.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/scripts/luascript.hpp b/src/lua/scripts/luascript.hpp index b7845c845..06654c35a 100644 --- a/src/lua/scripts/luascript.hpp +++ b/src/lua/scripts/luascript.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/scripts/script_environment.cpp b/src/lua/scripts/script_environment.cpp index ccebdb1a8..4a7ad7acd 100644 --- a/src/lua/scripts/script_environment.cpp +++ b/src/lua/scripts/script_environment.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/scripts/script_environment.hpp b/src/lua/scripts/script_environment.hpp index 285e5d771..fe89d3f1e 100644 --- a/src/lua/scripts/script_environment.hpp +++ b/src/lua/scripts/script_environment.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/scripts/scripts.cpp b/src/lua/scripts/scripts.cpp index 14c9b8c26..1d395cdd0 100644 --- a/src/lua/scripts/scripts.cpp +++ b/src/lua/scripts/scripts.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/lua/scripts/scripts.hpp b/src/lua/scripts/scripts.hpp index a0344a33b..7cefaaaf8 100644 --- a/src/lua/scripts/scripts.hpp +++ b/src/lua/scripts/scripts.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/main.cpp b/src/main.cpp index ae80f752c..be289d397 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/map/house/house.cpp b/src/map/house/house.cpp index 5090ff86b..7967e21c3 100644 --- a/src/map/house/house.cpp +++ b/src/map/house/house.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/map/house/house.hpp b/src/map/house/house.hpp index 9b70f4445..aa4b746cc 100644 --- a/src/map/house/house.hpp +++ b/src/map/house/house.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/map/house/housetile.cpp b/src/map/house/housetile.cpp index 3ed661a1c..6b301f0e8 100644 --- a/src/map/house/housetile.cpp +++ b/src/map/house/housetile.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/map/house/housetile.hpp b/src/map/house/housetile.hpp index 04da8a4e7..b661251db 100644 --- a/src/map/house/housetile.hpp +++ b/src/map/house/housetile.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/map/map.cpp b/src/map/map.cpp index 662e85f18..395e6d7d2 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/map/map.hpp b/src/map/map.hpp index d5ca9b2af..0894853e3 100644 --- a/src/map/map.hpp +++ b/src/map/map.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/map/map_definitions.hpp b/src/map/map_definitions.hpp index 3c61e7a20..67c9878b9 100644 --- a/src/map/map_definitions.hpp +++ b/src/map/map_definitions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/map/mapcache.cpp b/src/map/mapcache.cpp index e0e58e5f0..ede4d3fd8 100644 --- a/src/map/mapcache.cpp +++ b/src/map/mapcache.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/map/spectators.cpp b/src/map/spectators.cpp index 8ae8514bb..18ce13871 100644 --- a/src/map/spectators.cpp +++ b/src/map/spectators.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/map/spectators.hpp b/src/map/spectators.hpp index 6b9a04455..93526e05c 100644 --- a/src/map/spectators.hpp +++ b/src/map/spectators.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/map/town.hpp b/src/map/town.hpp index f6ab241b5..d6529fa30 100644 --- a/src/map/town.hpp +++ b/src/map/town.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/pch.hpp b/src/pch.hpp index 60f059fa4..522411b56 100644 --- a/src/pch.hpp +++ b/src/pch.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/protobuf/appearances.pb.cc b/src/protobuf/appearances.pb.cc deleted file mode 100644 index ced2a6173..000000000 --- a/src/protobuf/appearances.pb.cc +++ /dev/null @@ -1,10027 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: appearances.proto - -#include "appearances.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG - -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; - -namespace Canary { -namespace protobuf { -namespace appearances { -PROTOBUF_CONSTEXPR Coordinate::Coordinate( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.x_)*/0u - , /*decltype(_impl_.y_)*/0u - , /*decltype(_impl_.z_)*/0u} {} -struct CoordinateDefaultTypeInternal { - PROTOBUF_CONSTEXPR CoordinateDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~CoordinateDefaultTypeInternal() {} - union { - Coordinate _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CoordinateDefaultTypeInternal _Coordinate_default_instance_; -PROTOBUF_CONSTEXPR Appearances::Appearances( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.object_)*/{} - , /*decltype(_impl_.outfit_)*/{} - , /*decltype(_impl_.effect_)*/{} - , /*decltype(_impl_.missile_)*/{} - , /*decltype(_impl_.special_meaning_appearance_ids_)*/nullptr} {} -struct AppearancesDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearancesDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearancesDefaultTypeInternal() {} - union { - Appearances _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearancesDefaultTypeInternal _Appearances_default_instance_; -PROTOBUF_CONSTEXPR SpritePhase::SpritePhase( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.duration_min_)*/0u - , /*decltype(_impl_.duration_max_)*/0u} {} -struct SpritePhaseDefaultTypeInternal { - PROTOBUF_CONSTEXPR SpritePhaseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~SpritePhaseDefaultTypeInternal() {} - union { - SpritePhase _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SpritePhaseDefaultTypeInternal _SpritePhase_default_instance_; -PROTOBUF_CONSTEXPR SpriteAnimation::SpriteAnimation( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.sprite_phase_)*/{} - , /*decltype(_impl_.default_start_phase_)*/0u - , /*decltype(_impl_.synchronized_)*/false - , /*decltype(_impl_.random_start_phase_)*/false - , /*decltype(_impl_.loop_count_)*/0u - , /*decltype(_impl_.loop_type_)*/-1} {} -struct SpriteAnimationDefaultTypeInternal { - PROTOBUF_CONSTEXPR SpriteAnimationDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~SpriteAnimationDefaultTypeInternal() {} - union { - SpriteAnimation _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SpriteAnimationDefaultTypeInternal _SpriteAnimation_default_instance_; -PROTOBUF_CONSTEXPR Box::Box( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.x_)*/0u - , /*decltype(_impl_.y_)*/0u - , /*decltype(_impl_.width_)*/0u - , /*decltype(_impl_.height_)*/0u} {} -struct BoxDefaultTypeInternal { - PROTOBUF_CONSTEXPR BoxDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~BoxDefaultTypeInternal() {} - union { - Box _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BoxDefaultTypeInternal _Box_default_instance_; -PROTOBUF_CONSTEXPR SpriteInfo::SpriteInfo( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.sprite_id_)*/{} - , /*decltype(_impl_.bounding_box_per_direction_)*/{} - , /*decltype(_impl_.animation_)*/nullptr - , /*decltype(_impl_.pattern_width_)*/0u - , /*decltype(_impl_.pattern_height_)*/0u - , /*decltype(_impl_.pattern_depth_)*/0u - , /*decltype(_impl_.layers_)*/0u - , /*decltype(_impl_.bounding_square_)*/0u - , /*decltype(_impl_.is_opaque_)*/false} {} -struct SpriteInfoDefaultTypeInternal { - PROTOBUF_CONSTEXPR SpriteInfoDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~SpriteInfoDefaultTypeInternal() {} - union { - SpriteInfo _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SpriteInfoDefaultTypeInternal _SpriteInfo_default_instance_; -PROTOBUF_CONSTEXPR FrameGroup::FrameGroup( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.sprite_info_)*/nullptr - , /*decltype(_impl_.fixed_frame_group_)*/0 - , /*decltype(_impl_.id_)*/0u} {} -struct FrameGroupDefaultTypeInternal { - PROTOBUF_CONSTEXPR FrameGroupDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~FrameGroupDefaultTypeInternal() {} - union { - FrameGroup _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FrameGroupDefaultTypeInternal _FrameGroup_default_instance_; -PROTOBUF_CONSTEXPR Appearance::Appearance( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.frame_group_)*/{} - , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.description_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.flags_)*/nullptr - , /*decltype(_impl_.id_)*/0u} {} -struct AppearanceDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceDefaultTypeInternal() {} - union { - Appearance _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceDefaultTypeInternal _Appearance_default_instance_; -PROTOBUF_CONSTEXPR AppearanceFlags::AppearanceFlags( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.npcsaledata_)*/{} - , /*decltype(_impl_.bank_)*/nullptr - , /*decltype(_impl_.write_)*/nullptr - , /*decltype(_impl_.write_once_)*/nullptr - , /*decltype(_impl_.hook_)*/nullptr - , /*decltype(_impl_.light_)*/nullptr - , /*decltype(_impl_.shift_)*/nullptr - , /*decltype(_impl_.height_)*/nullptr - , /*decltype(_impl_.automap_)*/nullptr - , /*decltype(_impl_.lenshelp_)*/nullptr - , /*decltype(_impl_.clothes_)*/nullptr - , /*decltype(_impl_.default_action_)*/nullptr - , /*decltype(_impl_.market_)*/nullptr - , /*decltype(_impl_.changedtoexpire_)*/nullptr - , /*decltype(_impl_.cyclopediaitem_)*/nullptr - , /*decltype(_impl_.upgradeclassification_)*/nullptr - , /*decltype(_impl_.clip_)*/false - , /*decltype(_impl_.bottom_)*/false - , /*decltype(_impl_.top_)*/false - , /*decltype(_impl_.container_)*/false - , /*decltype(_impl_.cumulative_)*/false - , /*decltype(_impl_.usable_)*/false - , /*decltype(_impl_.forceuse_)*/false - , /*decltype(_impl_.multiuse_)*/false - , /*decltype(_impl_.liquidpool_)*/false - , /*decltype(_impl_.unpass_)*/false - , /*decltype(_impl_.unmove_)*/false - , /*decltype(_impl_.unsight_)*/false - , /*decltype(_impl_.avoid_)*/false - , /*decltype(_impl_.no_movement_animation_)*/false - , /*decltype(_impl_.take_)*/false - , /*decltype(_impl_.liquidcontainer_)*/false - , /*decltype(_impl_.hang_)*/false - , /*decltype(_impl_.rotate_)*/false - , /*decltype(_impl_.dont_hide_)*/false - , /*decltype(_impl_.translucent_)*/false - , /*decltype(_impl_.lying_object_)*/false - , /*decltype(_impl_.animate_always_)*/false - , /*decltype(_impl_.fullbank_)*/false - , /*decltype(_impl_.ignore_look_)*/false - , /*decltype(_impl_.wrap_)*/false - , /*decltype(_impl_.unwrap_)*/false - , /*decltype(_impl_.topeffect_)*/false - , /*decltype(_impl_.corpse_)*/false - , /*decltype(_impl_.player_corpse_)*/false - , /*decltype(_impl_.ammo_)*/false - , /*decltype(_impl_.show_off_socket_)*/false - , /*decltype(_impl_.reportable_)*/false - , /*decltype(_impl_.reverse_addons_east_)*/false - , /*decltype(_impl_.reverse_addons_west_)*/false - , /*decltype(_impl_.reverse_addons_south_)*/false - , /*decltype(_impl_.reverse_addons_north_)*/false - , /*decltype(_impl_.wearout_)*/false - , /*decltype(_impl_.clockexpire_)*/false - , /*decltype(_impl_.expire_)*/false - , /*decltype(_impl_.expirestop_)*/false - , /*decltype(_impl_.wrapkit_)*/false} {} -struct AppearanceFlagsDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceFlagsDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceFlagsDefaultTypeInternal() {} - union { - AppearanceFlags _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceFlagsDefaultTypeInternal _AppearanceFlags_default_instance_; -PROTOBUF_CONSTEXPR AppearanceFlagUpgradeClassification::AppearanceFlagUpgradeClassification( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.upgrade_classification_)*/0u} {} -struct AppearanceFlagUpgradeClassificationDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceFlagUpgradeClassificationDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceFlagUpgradeClassificationDefaultTypeInternal() {} - union { - AppearanceFlagUpgradeClassification _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceFlagUpgradeClassificationDefaultTypeInternal _AppearanceFlagUpgradeClassification_default_instance_; -PROTOBUF_CONSTEXPR AppearanceFlagBank::AppearanceFlagBank( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.waypoints_)*/0u} {} -struct AppearanceFlagBankDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceFlagBankDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceFlagBankDefaultTypeInternal() {} - union { - AppearanceFlagBank _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceFlagBankDefaultTypeInternal _AppearanceFlagBank_default_instance_; -PROTOBUF_CONSTEXPR AppearanceFlagWrite::AppearanceFlagWrite( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.max_text_length_)*/0u} {} -struct AppearanceFlagWriteDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceFlagWriteDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceFlagWriteDefaultTypeInternal() {} - union { - AppearanceFlagWrite _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceFlagWriteDefaultTypeInternal _AppearanceFlagWrite_default_instance_; -PROTOBUF_CONSTEXPR AppearanceFlagWriteOnce::AppearanceFlagWriteOnce( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.max_text_length_once_)*/0u} {} -struct AppearanceFlagWriteOnceDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceFlagWriteOnceDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceFlagWriteOnceDefaultTypeInternal() {} - union { - AppearanceFlagWriteOnce _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceFlagWriteOnceDefaultTypeInternal _AppearanceFlagWriteOnce_default_instance_; -PROTOBUF_CONSTEXPR AppearanceFlagLight::AppearanceFlagLight( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.brightness_)*/0u - , /*decltype(_impl_.color_)*/0u} {} -struct AppearanceFlagLightDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceFlagLightDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceFlagLightDefaultTypeInternal() {} - union { - AppearanceFlagLight _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceFlagLightDefaultTypeInternal _AppearanceFlagLight_default_instance_; -PROTOBUF_CONSTEXPR AppearanceFlagHeight::AppearanceFlagHeight( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.elevation_)*/0u} {} -struct AppearanceFlagHeightDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceFlagHeightDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceFlagHeightDefaultTypeInternal() {} - union { - AppearanceFlagHeight _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceFlagHeightDefaultTypeInternal _AppearanceFlagHeight_default_instance_; -PROTOBUF_CONSTEXPR AppearanceFlagShift::AppearanceFlagShift( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.x_)*/0u - , /*decltype(_impl_.y_)*/0u} {} -struct AppearanceFlagShiftDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceFlagShiftDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceFlagShiftDefaultTypeInternal() {} - union { - AppearanceFlagShift _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceFlagShiftDefaultTypeInternal _AppearanceFlagShift_default_instance_; -PROTOBUF_CONSTEXPR AppearanceFlagClothes::AppearanceFlagClothes( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.slot_)*/0u} {} -struct AppearanceFlagClothesDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceFlagClothesDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceFlagClothesDefaultTypeInternal() {} - union { - AppearanceFlagClothes _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceFlagClothesDefaultTypeInternal _AppearanceFlagClothes_default_instance_; -PROTOBUF_CONSTEXPR AppearanceFlagDefaultAction::AppearanceFlagDefaultAction( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.action_)*/0} {} -struct AppearanceFlagDefaultActionDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceFlagDefaultActionDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceFlagDefaultActionDefaultTypeInternal() {} - union { - AppearanceFlagDefaultAction _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceFlagDefaultActionDefaultTypeInternal _AppearanceFlagDefaultAction_default_instance_; -PROTOBUF_CONSTEXPR AppearanceFlagMarket::AppearanceFlagMarket( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.restrict_to_profession_)*/{} - , /*decltype(_impl_.trade_as_object_id_)*/0u - , /*decltype(_impl_.show_as_object_id_)*/0u - , /*decltype(_impl_.minimum_level_)*/0u - , /*decltype(_impl_.category_)*/1} {} -struct AppearanceFlagMarketDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceFlagMarketDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceFlagMarketDefaultTypeInternal() {} - union { - AppearanceFlagMarket _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceFlagMarketDefaultTypeInternal _AppearanceFlagMarket_default_instance_; -PROTOBUF_CONSTEXPR AppearanceFlagNPC::AppearanceFlagNPC( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.location_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.currency_quest_flag_display_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.sale_price_)*/0u - , /*decltype(_impl_.buy_price_)*/0u - , /*decltype(_impl_.currency_object_type_id_)*/0u} {} -struct AppearanceFlagNPCDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceFlagNPCDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceFlagNPCDefaultTypeInternal() {} - union { - AppearanceFlagNPC _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceFlagNPCDefaultTypeInternal _AppearanceFlagNPC_default_instance_; -PROTOBUF_CONSTEXPR AppearanceFlagAutomap::AppearanceFlagAutomap( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.color_)*/0u} {} -struct AppearanceFlagAutomapDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceFlagAutomapDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceFlagAutomapDefaultTypeInternal() {} - union { - AppearanceFlagAutomap _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceFlagAutomapDefaultTypeInternal _AppearanceFlagAutomap_default_instance_; -PROTOBUF_CONSTEXPR AppearanceFlagHook::AppearanceFlagHook( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.direction_)*/1} {} -struct AppearanceFlagHookDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceFlagHookDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceFlagHookDefaultTypeInternal() {} - union { - AppearanceFlagHook _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceFlagHookDefaultTypeInternal _AppearanceFlagHook_default_instance_; -PROTOBUF_CONSTEXPR AppearanceFlagLenshelp::AppearanceFlagLenshelp( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.id_)*/0u} {} -struct AppearanceFlagLenshelpDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceFlagLenshelpDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceFlagLenshelpDefaultTypeInternal() {} - union { - AppearanceFlagLenshelp _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceFlagLenshelpDefaultTypeInternal _AppearanceFlagLenshelp_default_instance_; -PROTOBUF_CONSTEXPR AppearanceFlagChangedToExpire::AppearanceFlagChangedToExpire( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.former_object_typeid_)*/0u} {} -struct AppearanceFlagChangedToExpireDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceFlagChangedToExpireDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceFlagChangedToExpireDefaultTypeInternal() {} - union { - AppearanceFlagChangedToExpire _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceFlagChangedToExpireDefaultTypeInternal _AppearanceFlagChangedToExpire_default_instance_; -PROTOBUF_CONSTEXPR AppearanceFlagCyclopedia::AppearanceFlagCyclopedia( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.cyclopedia_type_)*/0u} {} -struct AppearanceFlagCyclopediaDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppearanceFlagCyclopediaDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppearanceFlagCyclopediaDefaultTypeInternal() {} - union { - AppearanceFlagCyclopedia _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppearanceFlagCyclopediaDefaultTypeInternal _AppearanceFlagCyclopedia_default_instance_; -PROTOBUF_CONSTEXPR SpecialMeaningAppearanceIds::SpecialMeaningAppearanceIds( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.gold_coin_id_)*/0u - , /*decltype(_impl_.platinum_coin_id_)*/0u - , /*decltype(_impl_.crystal_coin_id_)*/0u - , /*decltype(_impl_.tibia_coin_id_)*/0u - , /*decltype(_impl_.stamped_letter_id_)*/0u - , /*decltype(_impl_.supply_stash_id_)*/0u - , /*decltype(_impl_.reward_chest_id_)*/0u} {} -struct SpecialMeaningAppearanceIdsDefaultTypeInternal { - PROTOBUF_CONSTEXPR SpecialMeaningAppearanceIdsDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~SpecialMeaningAppearanceIdsDefaultTypeInternal() {} - union { - SpecialMeaningAppearanceIds _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SpecialMeaningAppearanceIdsDefaultTypeInternal _SpecialMeaningAppearanceIds_default_instance_; -} // namespace appearances -} // namespace protobuf -} // namespace Canary -static ::_pb::Metadata file_level_metadata_appearances_2eproto[26]; -static const ::_pb::EnumDescriptor* file_level_enum_descriptors_appearances_2eproto[6]; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_appearances_2eproto = nullptr; - -const uint32_t TableStruct_appearances_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Coordinate, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Coordinate, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Coordinate, _impl_.x_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Coordinate, _impl_.y_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Coordinate, _impl_.z_), - 0, - 1, - 2, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Appearances, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Appearances, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Appearances, _impl_.object_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Appearances, _impl_.outfit_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Appearances, _impl_.effect_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Appearances, _impl_.missile_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Appearances, _impl_.special_meaning_appearance_ids_), - ~0u, - ~0u, - ~0u, - ~0u, - 0, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpritePhase, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpritePhase, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpritePhase, _impl_.duration_min_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpritePhase, _impl_.duration_max_), - 0, - 1, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteAnimation, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteAnimation, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteAnimation, _impl_.default_start_phase_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteAnimation, _impl_.synchronized_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteAnimation, _impl_.random_start_phase_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteAnimation, _impl_.loop_type_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteAnimation, _impl_.loop_count_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteAnimation, _impl_.sprite_phase_), - 0, - 1, - 2, - 4, - 3, - ~0u, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Box, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Box, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Box, _impl_.x_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Box, _impl_.y_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Box, _impl_.width_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Box, _impl_.height_), - 0, - 1, - 2, - 3, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteInfo, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteInfo, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteInfo, _impl_.pattern_width_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteInfo, _impl_.pattern_height_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteInfo, _impl_.pattern_depth_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteInfo, _impl_.layers_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteInfo, _impl_.sprite_id_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteInfo, _impl_.bounding_square_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteInfo, _impl_.animation_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteInfo, _impl_.is_opaque_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpriteInfo, _impl_.bounding_box_per_direction_), - 1, - 2, - 3, - 4, - ~0u, - 5, - 0, - 6, - ~0u, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::FrameGroup, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::FrameGroup, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::FrameGroup, _impl_.fixed_frame_group_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::FrameGroup, _impl_.id_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::FrameGroup, _impl_.sprite_info_), - 1, - 2, - 0, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Appearance, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Appearance, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Appearance, _impl_.id_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Appearance, _impl_.frame_group_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Appearance, _impl_.flags_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Appearance, _impl_.name_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::Appearance, _impl_.description_), - 3, - ~0u, - 2, - 0, - 1, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.bank_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.clip_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.bottom_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.top_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.container_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.cumulative_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.usable_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.forceuse_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.multiuse_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.write_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.write_once_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.liquidpool_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.unpass_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.unmove_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.unsight_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.avoid_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.no_movement_animation_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.take_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.liquidcontainer_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.hang_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.hook_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.rotate_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.light_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.dont_hide_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.translucent_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.shift_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.height_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.lying_object_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.animate_always_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.automap_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.lenshelp_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.fullbank_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.ignore_look_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.clothes_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.default_action_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.market_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.wrap_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.unwrap_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.topeffect_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.npcsaledata_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.changedtoexpire_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.corpse_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.player_corpse_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.cyclopediaitem_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.ammo_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.show_off_socket_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.reportable_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.upgradeclassification_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.reverse_addons_east_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.reverse_addons_west_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.reverse_addons_south_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.reverse_addons_north_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.wearout_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.clockexpire_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.expire_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.expirestop_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlags, _impl_.wrapkit_), - 0, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 1, - 2, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 3, - 32, - 4, - 33, - 34, - 5, - 6, - 35, - 36, - 7, - 8, - 37, - 38, - 9, - 10, - 11, - 39, - 40, - 41, - ~0u, - 12, - 42, - 43, - 13, - 44, - 45, - 46, - 14, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification, _impl_.upgrade_classification_), - 0, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagBank, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagBank, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagBank, _impl_.waypoints_), - 0, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagWrite, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagWrite, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagWrite, _impl_.max_text_length_), - 0, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagWriteOnce, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagWriteOnce, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagWriteOnce, _impl_.max_text_length_once_), - 0, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagLight, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagLight, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagLight, _impl_.brightness_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagLight, _impl_.color_), - 0, - 1, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagHeight, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagHeight, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagHeight, _impl_.elevation_), - 0, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagShift, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagShift, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagShift, _impl_.x_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagShift, _impl_.y_), - 0, - 1, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagClothes, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagClothes, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagClothes, _impl_.slot_), - 0, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagDefaultAction, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagDefaultAction, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagDefaultAction, _impl_.action_), - 0, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagMarket, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagMarket, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagMarket, _impl_.category_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagMarket, _impl_.trade_as_object_id_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagMarket, _impl_.show_as_object_id_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagMarket, _impl_.restrict_to_profession_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagMarket, _impl_.minimum_level_), - 3, - 0, - 1, - ~0u, - 2, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagNPC, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagNPC, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagNPC, _impl_.name_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagNPC, _impl_.location_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagNPC, _impl_.sale_price_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagNPC, _impl_.buy_price_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagNPC, _impl_.currency_object_type_id_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagNPC, _impl_.currency_quest_flag_display_name_), - 0, - 1, - 3, - 4, - 5, - 2, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagAutomap, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagAutomap, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagAutomap, _impl_.color_), - 0, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagHook, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagHook, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagHook, _impl_.direction_), - 0, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagLenshelp, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagLenshelp, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagLenshelp, _impl_.id_), - 0, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagChangedToExpire, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagChangedToExpire, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagChangedToExpire, _impl_.former_object_typeid_), - 0, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagCyclopedia, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagCyclopedia, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::AppearanceFlagCyclopedia, _impl_.cyclopedia_type_), - 0, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpecialMeaningAppearanceIds, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpecialMeaningAppearanceIds, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpecialMeaningAppearanceIds, _impl_.gold_coin_id_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpecialMeaningAppearanceIds, _impl_.platinum_coin_id_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpecialMeaningAppearanceIds, _impl_.crystal_coin_id_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpecialMeaningAppearanceIds, _impl_.tibia_coin_id_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpecialMeaningAppearanceIds, _impl_.stamped_letter_id_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpecialMeaningAppearanceIds, _impl_.supply_stash_id_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::appearances::SpecialMeaningAppearanceIds, _impl_.reward_chest_id_), - 0, - 1, - 2, - 3, - 4, - 5, - 6, -}; -static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 9, -1, sizeof(::Canary::protobuf::appearances::Coordinate)}, - { 12, 23, -1, sizeof(::Canary::protobuf::appearances::Appearances)}, - { 28, 36, -1, sizeof(::Canary::protobuf::appearances::SpritePhase)}, - { 38, 50, -1, sizeof(::Canary::protobuf::appearances::SpriteAnimation)}, - { 56, 66, -1, sizeof(::Canary::protobuf::appearances::Box)}, - { 70, 85, -1, sizeof(::Canary::protobuf::appearances::SpriteInfo)}, - { 94, 103, -1, sizeof(::Canary::protobuf::appearances::FrameGroup)}, - { 106, 117, -1, sizeof(::Canary::protobuf::appearances::Appearance)}, - { 122, 185, -1, sizeof(::Canary::protobuf::appearances::AppearanceFlags)}, - { 242, 249, -1, sizeof(::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification)}, - { 250, 257, -1, sizeof(::Canary::protobuf::appearances::AppearanceFlagBank)}, - { 258, 265, -1, sizeof(::Canary::protobuf::appearances::AppearanceFlagWrite)}, - { 266, 273, -1, sizeof(::Canary::protobuf::appearances::AppearanceFlagWriteOnce)}, - { 274, 282, -1, sizeof(::Canary::protobuf::appearances::AppearanceFlagLight)}, - { 284, 291, -1, sizeof(::Canary::protobuf::appearances::AppearanceFlagHeight)}, - { 292, 300, -1, sizeof(::Canary::protobuf::appearances::AppearanceFlagShift)}, - { 302, 309, -1, sizeof(::Canary::protobuf::appearances::AppearanceFlagClothes)}, - { 310, 317, -1, sizeof(::Canary::protobuf::appearances::AppearanceFlagDefaultAction)}, - { 318, 329, -1, sizeof(::Canary::protobuf::appearances::AppearanceFlagMarket)}, - { 334, 346, -1, sizeof(::Canary::protobuf::appearances::AppearanceFlagNPC)}, - { 352, 359, -1, sizeof(::Canary::protobuf::appearances::AppearanceFlagAutomap)}, - { 360, 367, -1, sizeof(::Canary::protobuf::appearances::AppearanceFlagHook)}, - { 368, 375, -1, sizeof(::Canary::protobuf::appearances::AppearanceFlagLenshelp)}, - { 376, 383, -1, sizeof(::Canary::protobuf::appearances::AppearanceFlagChangedToExpire)}, - { 384, 391, -1, sizeof(::Canary::protobuf::appearances::AppearanceFlagCyclopedia)}, - { 392, 405, -1, sizeof(::Canary::protobuf::appearances::SpecialMeaningAppearanceIds)}, -}; - -static const ::_pb::Message* const file_default_instances[] = { - &::Canary::protobuf::appearances::_Coordinate_default_instance_._instance, - &::Canary::protobuf::appearances::_Appearances_default_instance_._instance, - &::Canary::protobuf::appearances::_SpritePhase_default_instance_._instance, - &::Canary::protobuf::appearances::_SpriteAnimation_default_instance_._instance, - &::Canary::protobuf::appearances::_Box_default_instance_._instance, - &::Canary::protobuf::appearances::_SpriteInfo_default_instance_._instance, - &::Canary::protobuf::appearances::_FrameGroup_default_instance_._instance, - &::Canary::protobuf::appearances::_Appearance_default_instance_._instance, - &::Canary::protobuf::appearances::_AppearanceFlags_default_instance_._instance, - &::Canary::protobuf::appearances::_AppearanceFlagUpgradeClassification_default_instance_._instance, - &::Canary::protobuf::appearances::_AppearanceFlagBank_default_instance_._instance, - &::Canary::protobuf::appearances::_AppearanceFlagWrite_default_instance_._instance, - &::Canary::protobuf::appearances::_AppearanceFlagWriteOnce_default_instance_._instance, - &::Canary::protobuf::appearances::_AppearanceFlagLight_default_instance_._instance, - &::Canary::protobuf::appearances::_AppearanceFlagHeight_default_instance_._instance, - &::Canary::protobuf::appearances::_AppearanceFlagShift_default_instance_._instance, - &::Canary::protobuf::appearances::_AppearanceFlagClothes_default_instance_._instance, - &::Canary::protobuf::appearances::_AppearanceFlagDefaultAction_default_instance_._instance, - &::Canary::protobuf::appearances::_AppearanceFlagMarket_default_instance_._instance, - &::Canary::protobuf::appearances::_AppearanceFlagNPC_default_instance_._instance, - &::Canary::protobuf::appearances::_AppearanceFlagAutomap_default_instance_._instance, - &::Canary::protobuf::appearances::_AppearanceFlagHook_default_instance_._instance, - &::Canary::protobuf::appearances::_AppearanceFlagLenshelp_default_instance_._instance, - &::Canary::protobuf::appearances::_AppearanceFlagChangedToExpire_default_instance_._instance, - &::Canary::protobuf::appearances::_AppearanceFlagCyclopedia_default_instance_._instance, - &::Canary::protobuf::appearances::_SpecialMeaningAppearanceIds_default_instance_._instance, -}; - -const char descriptor_table_protodef_appearances_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\021appearances.proto\022\033Canary.protobuf.app" - "earances\"-\n\nCoordinate\022\t\n\001x\030\001 \001(\r\022\t\n\001y\030\002" - " \001(\r\022\t\n\001z\030\003 \001(\r\"\324\002\n\013Appearances\0227\n\006objec" - "t\030\001 \003(\0132\'.Canary.protobuf.appearances.Ap" - "pearance\0227\n\006outfit\030\002 \003(\0132\'.Canary.protob" - "uf.appearances.Appearance\0227\n\006effect\030\003 \003(" - "\0132\'.Canary.protobuf.appearances.Appearan" - "ce\0228\n\007missile\030\004 \003(\0132\'.Canary.protobuf.ap" - "pearances.Appearance\022`\n\036special_meaning_" - "appearance_ids\030\005 \001(\01328.Canary.protobuf.a" - "ppearances.SpecialMeaningAppearanceIds\"9" - "\n\013SpritePhase\022\024\n\014duration_min\030\001 \001(\r\022\024\n\014d" - "uration_max\030\002 \001(\r\"\371\001\n\017SpriteAnimation\022\033\n" - "\023default_start_phase\030\001 \001(\r\022\024\n\014synchroniz" - "ed\030\002 \001(\010\022\032\n\022random_start_phase\030\003 \001(\010\022C\n\t" - "loop_type\030\004 \001(\01620.Canary.protobuf.appear" - "ances.ANIMATION_LOOP_TYPE\022\022\n\nloop_count\030" - "\005 \001(\r\022>\n\014sprite_phase\030\006 \003(\0132(.Canary.pro" - "tobuf.appearances.SpritePhase\":\n\003Box\022\t\n\001" - "x\030\001 \001(\r\022\t\n\001y\030\002 \001(\r\022\r\n\005width\030\003 \001(\r\022\016\n\006hei" - "ght\030\004 \001(\r\"\250\002\n\nSpriteInfo\022\025\n\rpattern_widt" - "h\030\001 \001(\r\022\026\n\016pattern_height\030\002 \001(\r\022\025\n\rpatte" - "rn_depth\030\003 \001(\r\022\016\n\006layers\030\004 \001(\r\022\021\n\tsprite" - "_id\030\005 \003(\r\022\027\n\017bounding_square\030\007 \001(\r\022\?\n\tan" - "imation\030\006 \001(\0132,.Canary.protobuf.appearan" - "ces.SpriteAnimation\022\021\n\tis_opaque\030\010 \001(\010\022D" - "\n\032bounding_box_per_direction\030\t \003(\0132 .Can" - "ary.protobuf.appearances.Box\"\241\001\n\nFrameGr" - "oup\022I\n\021fixed_frame_group\030\001 \001(\0162..Canary." - "protobuf.appearances.FIXED_FRAME_GROUP\022\n" - "\n\002id\030\002 \001(\r\022<\n\013sprite_info\030\003 \001(\0132\'.Canary" - ".protobuf.appearances.SpriteInfo\"\266\001\n\nApp" - "earance\022\n\n\002id\030\001 \001(\r\022<\n\013frame_group\030\002 \003(\013" - "2\'.Canary.protobuf.appearances.FrameGrou" - "p\022;\n\005flags\030\003 \001(\0132,.Canary.protobuf.appea" - "rances.AppearanceFlags\022\014\n\004name\030\004 \001(\014\022\023\n\013" - "description\030\005 \001(\014\"\256\017\n\017AppearanceFlags\022=\n" - "\004bank\030\001 \001(\0132/.Canary.protobuf.appearance" - "s.AppearanceFlagBank\022\014\n\004clip\030\002 \001(\010\022\016\n\006bo" - "ttom\030\003 \001(\010\022\013\n\003top\030\004 \001(\010\022\021\n\tcontainer\030\005 \001" - "(\010\022\022\n\ncumulative\030\006 \001(\010\022\016\n\006usable\030\007 \001(\010\022\020" - "\n\010forceuse\030\010 \001(\010\022\020\n\010multiuse\030\t \001(\010\022\?\n\005wr" - "ite\030\n \001(\01320.Canary.protobuf.appearances." - "AppearanceFlagWrite\022H\n\nwrite_once\030\013 \001(\0132" - "4.Canary.protobuf.appearances.Appearance" - "FlagWriteOnce\022\022\n\nliquidpool\030\014 \001(\010\022\016\n\006unp" - "ass\030\r \001(\010\022\016\n\006unmove\030\016 \001(\010\022\017\n\007unsight\030\017 \001" - "(\010\022\r\n\005avoid\030\020 \001(\010\022\035\n\025no_movement_animati" - "on\030\021 \001(\010\022\014\n\004take\030\022 \001(\010\022\027\n\017liquidcontaine" - "r\030\023 \001(\010\022\014\n\004hang\030\024 \001(\010\022=\n\004hook\030\025 \001(\0132/.Ca" - "nary.protobuf.appearances.AppearanceFlag" - "Hook\022\016\n\006rotate\030\026 \001(\010\022\?\n\005light\030\027 \001(\01320.Ca" - "nary.protobuf.appearances.AppearanceFlag" - "Light\022\021\n\tdont_hide\030\030 \001(\010\022\023\n\013translucent\030" - "\031 \001(\010\022\?\n\005shift\030\032 \001(\01320.Canary.protobuf.a" - "ppearances.AppearanceFlagShift\022A\n\006height" - "\030\033 \001(\01321.Canary.protobuf.appearances.App" - "earanceFlagHeight\022\024\n\014lying_object\030\034 \001(\010\022" - "\026\n\016animate_always\030\035 \001(\010\022C\n\007automap\030\036 \001(\013" - "22.Canary.protobuf.appearances.Appearanc" - "eFlagAutomap\022E\n\010lenshelp\030\037 \001(\01323.Canary." - "protobuf.appearances.AppearanceFlagLensh" - "elp\022\020\n\010fullbank\030 \001(\010\022\023\n\013ignore_look\030! \001" - "(\010\022C\n\007clothes\030\" \001(\01322.Canary.protobuf.ap" - "pearances.AppearanceFlagClothes\022P\n\016defau" - "lt_action\030# \001(\01328.Canary.protobuf.appear" - "ances.AppearanceFlagDefaultAction\022A\n\006mar" - "ket\030$ \001(\01321.Canary.protobuf.appearances." - "AppearanceFlagMarket\022\014\n\004wrap\030% \001(\010\022\016\n\006un" - "wrap\030& \001(\010\022\021\n\ttopeffect\030\' \001(\010\022C\n\013npcsale" - "data\030( \003(\0132..Canary.protobuf.appearances" - ".AppearanceFlagNPC\022S\n\017changedtoexpire\030) " - "\001(\0132:.Canary.protobuf.appearances.Appear" - "anceFlagChangedToExpire\022\016\n\006corpse\030* \001(\010\022" - "\025\n\rplayer_corpse\030+ \001(\010\022M\n\016cyclopediaitem" - "\030, \001(\01325.Canary.protobuf.appearances.App" - "earanceFlagCyclopedia\022\014\n\004ammo\030- \001(\010\022\027\n\017s" - "how_off_socket\030. \001(\010\022\022\n\nreportable\030/ \001(\010" - "\022_\n\025upgradeclassification\0300 \001(\0132@.Canary" - ".protobuf.appearances.AppearanceFlagUpgr" - "adeClassification\022\033\n\023reverse_addons_east" - "\0301 \001(\010\022\033\n\023reverse_addons_west\0302 \001(\010\022\034\n\024r" - "everse_addons_south\0303 \001(\010\022\034\n\024reverse_add" - "ons_north\0304 \001(\010\022\017\n\007wearout\0305 \001(\010\022\023\n\013cloc" - "kexpire\0306 \001(\010\022\016\n\006expire\0307 \001(\010\022\022\n\nexpires" - "top\0308 \001(\010\022\017\n\007wrapkit\0309 \001(\010\"E\n#Appearance" - "FlagUpgradeClassification\022\036\n\026upgrade_cla" - "ssification\030\001 \001(\r\"\'\n\022AppearanceFlagBank\022" - "\021\n\twaypoints\030\001 \001(\r\".\n\023AppearanceFlagWrit" - "e\022\027\n\017max_text_length\030\001 \001(\r\"7\n\027Appearance" - "FlagWriteOnce\022\034\n\024max_text_length_once\030\001 " - "\001(\r\"8\n\023AppearanceFlagLight\022\022\n\nbrightness" - "\030\001 \001(\r\022\r\n\005color\030\002 \001(\r\")\n\024AppearanceFlagH" - "eight\022\021\n\televation\030\001 \001(\r\"+\n\023AppearanceFl" - "agShift\022\t\n\001x\030\001 \001(\r\022\t\n\001y\030\002 \001(\r\"%\n\025Appeara" - "nceFlagClothes\022\014\n\004slot\030\001 \001(\r\"Y\n\033Appearan" - "ceFlagDefaultAction\022:\n\006action\030\001 \001(\0162*.Ca" - "nary.protobuf.appearances.PLAYER_ACTION\"" - "\362\001\n\024AppearanceFlagMarket\022<\n\010category\030\001 \001" - "(\0162*.Canary.protobuf.appearances.ITEM_CA" - "TEGORY\022\032\n\022trade_as_object_id\030\002 \001(\r\022\031\n\021sh" - "ow_as_object_id\030\003 \001(\r\022N\n\026restrict_to_pro" - "fession\030\005 \003(\0162..Canary.protobuf.appearan" - "ces.PLAYER_PROFESSION\022\025\n\rminimum_level\030\006" - " \001(\r\"\245\001\n\021AppearanceFlagNPC\022\014\n\004name\030\001 \001(\014" - "\022\020\n\010location\030\002 \001(\014\022\022\n\nsale_price\030\003 \001(\r\022\021" - "\n\tbuy_price\030\004 \001(\r\022\037\n\027currency_object_typ" - "e_id\030\005 \001(\r\022(\n currency_quest_flag_displa" - "y_name\030\006 \001(\014\"&\n\025AppearanceFlagAutomap\022\r\n" - "\005color\030\001 \001(\r\"O\n\022AppearanceFlagHook\0229\n\tdi" - "rection\030\001 \001(\0162&.Canary.protobuf.appearan" - "ces.HOOK_TYPE\"$\n\026AppearanceFlagLenshelp\022" - "\n\n\002id\030\001 \001(\r\"=\n\035AppearanceFlagChangedToEx" - "pire\022\034\n\024former_object_typeid\030\001 \001(\r\"3\n\030Ap" - "pearanceFlagCyclopedia\022\027\n\017cyclopedia_typ" - "e\030\001 \001(\r\"\312\001\n\033SpecialMeaningAppearanceIds\022" - "\024\n\014gold_coin_id\030\001 \001(\r\022\030\n\020platinum_coin_i" - "d\030\002 \001(\r\022\027\n\017crystal_coin_id\030\003 \001(\r\022\025\n\rtibi" - "a_coin_id\030\004 \001(\r\022\031\n\021stamped_letter_id\030\005 \001" - "(\r\022\027\n\017supply_stash_id\030\006 \001(\r\022\027\n\017reward_ch" - "est_id\030\007 \001(\r*\224\001\n\rPLAYER_ACTION\022\026\n\022PLAYER" - "_ACTION_NONE\020\000\022\026\n\022PLAYER_ACTION_LOOK\020\001\022\025" - "\n\021PLAYER_ACTION_USE\020\002\022\026\n\022PLAYER_ACTION_O" - "PEN\020\003\022$\n PLAYER_ACTION_AUTOWALK_HIGHLIGH" - "T\020\004*\315\005\n\rITEM_CATEGORY\022\030\n\024ITEM_CATEGORY_A" - "RMORS\020\001\022\031\n\025ITEM_CATEGORY_AMULETS\020\002\022\027\n\023IT" - "EM_CATEGORY_BOOTS\020\003\022\034\n\030ITEM_CATEGORY_CON" - "TAINERS\020\004\022\034\n\030ITEM_CATEGORY_DECORATION\020\005\022" - "\026\n\022ITEM_CATEGORY_FOOD\020\006\022\036\n\032ITEM_CATEGORY" - "_HELMETS_HATS\020\007\022\026\n\022ITEM_CATEGORY_LEGS\020\010\022" - "\030\n\024ITEM_CATEGORY_OTHERS\020\t\022\031\n\025ITEM_CATEGO" - "RY_POTIONS\020\n\022\027\n\023ITEM_CATEGORY_RINGS\020\013\022\027\n" - "\023ITEM_CATEGORY_RUNES\020\014\022\031\n\025ITEM_CATEGORY_" - "SHIELDS\020\r\022\027\n\023ITEM_CATEGORY_TOOLS\020\016\022\033\n\027IT" - "EM_CATEGORY_VALUABLES\020\017\022\034\n\030ITEM_CATEGORY" - "_AMMUNITION\020\020\022\026\n\022ITEM_CATEGORY_AXES\020\021\022\027\n" - "\023ITEM_CATEGORY_CLUBS\020\022\022\"\n\036ITEM_CATEGORY_" - "DISTANCE_WEAPONS\020\023\022\030\n\024ITEM_CATEGORY_SWOR" - "DS\020\024\022\034\n\030ITEM_CATEGORY_WANDS_RODS\020\025\022!\n\035IT" - "EM_CATEGORY_PREMIUM_SCROLLS\020\026\022\035\n\031ITEM_CA" - "TEGORY_TIBIA_COINS\020\027\022#\n\037ITEM_CATEGORY_CR" - "EATURE_PRODUCTS\020\030\022\030\n\024ITEM_CATEGORY_QUIVE" - "R\020\031*\355\001\n\021PLAYER_PROFESSION\022\"\n\025PLAYER_PROF" - "ESSION_ANY\020\377\377\377\377\377\377\377\377\377\001\022\032\n\026PLAYER_PROFESSI" - "ON_NONE\020\000\022\034\n\030PLAYER_PROFESSION_KNIGHT\020\001\022" - "\035\n\031PLAYER_PROFESSION_PALADIN\020\002\022\036\n\032PLAYER" - "_PROFESSION_SORCERER\020\003\022\033\n\027PLAYER_PROFESS" - "ION_DRUID\020\004\022\036\n\032PLAYER_PROFESSION_PROMOTE" - "D\020\n*\203\001\n\023ANIMATION_LOOP_TYPE\022)\n\034ANIMATION" - "_LOOP_TYPE_PINGPONG\020\377\377\377\377\377\377\377\377\377\001\022 \n\034ANIMAT" - "ION_LOOP_TYPE_INFINITE\020\000\022\037\n\033ANIMATION_LO" - "OP_TYPE_COUNTED\020\001*4\n\tHOOK_TYPE\022\023\n\017HOOK_T" - "YPE_SOUTH\020\001\022\022\n\016HOOK_TYPE_EAST\020\002*\201\001\n\021FIXE" - "D_FRAME_GROUP\022!\n\035FIXED_FRAME_GROUP_OUTFI" - "T_IDLE\020\000\022#\n\037FIXED_FRAME_GROUP_OUTFIT_MOV" - "ING\020\001\022$\n FIXED_FRAME_GROUP_OBJECT_INITIA" - "L\020\002" - ; -static ::_pbi::once_flag descriptor_table_appearances_2eproto_once; -const ::_pbi::DescriptorTable descriptor_table_appearances_2eproto = { - false, false, 6243, descriptor_table_protodef_appearances_2eproto, - "appearances.proto", - &descriptor_table_appearances_2eproto_once, nullptr, 0, 26, - schemas, file_default_instances, TableStruct_appearances_2eproto::offsets, - file_level_metadata_appearances_2eproto, file_level_enum_descriptors_appearances_2eproto, - file_level_service_descriptors_appearances_2eproto, -}; -PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_appearances_2eproto_getter() { - return &descriptor_table_appearances_2eproto; -} - -// Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_appearances_2eproto(&descriptor_table_appearances_2eproto); -namespace Canary { -namespace protobuf { -namespace appearances { -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PLAYER_ACTION_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_appearances_2eproto); - return file_level_enum_descriptors_appearances_2eproto[0]; -} -bool PLAYER_ACTION_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - case 3: - case 4: - return true; - default: - return false; - } -} - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ITEM_CATEGORY_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_appearances_2eproto); - return file_level_enum_descriptors_appearances_2eproto[1]; -} -bool ITEM_CATEGORY_IsValid(int value) { - switch (value) { - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - case 21: - case 22: - case 23: - case 24: - case 25: - return true; - default: - return false; - } -} - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PLAYER_PROFESSION_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_appearances_2eproto); - return file_level_enum_descriptors_appearances_2eproto[2]; -} -bool PLAYER_PROFESSION_IsValid(int value) { - switch (value) { - case -1: - case 0: - case 1: - case 2: - case 3: - case 4: - case 10: - return true; - default: - return false; - } -} - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ANIMATION_LOOP_TYPE_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_appearances_2eproto); - return file_level_enum_descriptors_appearances_2eproto[3]; -} -bool ANIMATION_LOOP_TYPE_IsValid(int value) { - switch (value) { - case -1: - case 0: - case 1: - return true; - default: - return false; - } -} - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* HOOK_TYPE_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_appearances_2eproto); - return file_level_enum_descriptors_appearances_2eproto[4]; -} -bool HOOK_TYPE_IsValid(int value) { - switch (value) { - case 1: - case 2: - return true; - default: - return false; - } -} - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FIXED_FRAME_GROUP_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_appearances_2eproto); - return file_level_enum_descriptors_appearances_2eproto[5]; -} -bool FIXED_FRAME_GROUP_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - return true; - default: - return false; - } -} - - -// =================================================================== - -class Coordinate::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_x(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_y(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } - static void set_has_z(HasBits* has_bits) { - (*has_bits)[0] |= 4u; - } -}; - -Coordinate::Coordinate(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.Coordinate) -} -Coordinate::Coordinate(const Coordinate& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - Coordinate* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.x_){} - , decltype(_impl_.y_){} - , decltype(_impl_.z_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.x_, &from._impl_.x_, - static_cast(reinterpret_cast(&_impl_.z_) - - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.z_)); - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.Coordinate) -} - -inline void Coordinate::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.x_){0u} - , decltype(_impl_.y_){0u} - , decltype(_impl_.z_){0u} - }; -} - -Coordinate::~Coordinate() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.Coordinate) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void Coordinate::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void Coordinate::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void Coordinate::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.Coordinate) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000007u) { - ::memset(&_impl_.x_, 0, static_cast( - reinterpret_cast(&_impl_.z_) - - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.z_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Coordinate::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 x = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_x(&has_bits); - _impl_.x_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 y = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _Internal::set_has_y(&has_bits); - _impl_.y_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 z = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _Internal::set_has_z(&has_bits); - _impl_.z_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* Coordinate::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.Coordinate) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 x = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_x(), target); - } - - // optional uint32 y = 2; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_y(), target); - } - - // optional uint32 z = 3; - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_z(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.Coordinate) - return target; -} - -size_t Coordinate::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.Coordinate) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000007u) { - // optional uint32 x = 1; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_x()); - } - - // optional uint32 y = 2; - if (cached_has_bits & 0x00000002u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_y()); - } - - // optional uint32 z = 3; - if (cached_has_bits & 0x00000004u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_z()); - } - - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Coordinate::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - Coordinate::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Coordinate::GetClassData() const { return &_class_data_; } - - -void Coordinate::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.Coordinate) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000007u) { - if (cached_has_bits & 0x00000001u) { - _this->_impl_.x_ = from._impl_.x_; - } - if (cached_has_bits & 0x00000002u) { - _this->_impl_.y_ = from._impl_.y_; - } - if (cached_has_bits & 0x00000004u) { - _this->_impl_.z_ = from._impl_.z_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void Coordinate::CopyFrom(const Coordinate& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.Coordinate) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Coordinate::IsInitialized() const { - return true; -} - -void Coordinate::InternalSwap(Coordinate* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Coordinate, _impl_.z_) - + sizeof(Coordinate::_impl_.z_) - - PROTOBUF_FIELD_OFFSET(Coordinate, _impl_.x_)>( - reinterpret_cast(&_impl_.x_), - reinterpret_cast(&other->_impl_.x_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Coordinate::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[0]); -} - -// =================================================================== - -class Appearances::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static const ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds& special_meaning_appearance_ids(const Appearances* msg); - static void set_has_special_meaning_appearance_ids(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } -}; - -const ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds& -Appearances::_Internal::special_meaning_appearance_ids(const Appearances* msg) { - return *msg->_impl_.special_meaning_appearance_ids_; -} -Appearances::Appearances(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.Appearances) -} -Appearances::Appearances(const Appearances& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - Appearances* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.object_){from._impl_.object_} - , decltype(_impl_.outfit_){from._impl_.outfit_} - , decltype(_impl_.effect_){from._impl_.effect_} - , decltype(_impl_.missile_){from._impl_.missile_} - , decltype(_impl_.special_meaning_appearance_ids_){nullptr}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_special_meaning_appearance_ids()) { - _this->_impl_.special_meaning_appearance_ids_ = new ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds(*from._impl_.special_meaning_appearance_ids_); - } - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.Appearances) -} - -inline void Appearances::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.object_){arena} - , decltype(_impl_.outfit_){arena} - , decltype(_impl_.effect_){arena} - , decltype(_impl_.missile_){arena} - , decltype(_impl_.special_meaning_appearance_ids_){nullptr} - }; -} - -Appearances::~Appearances() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.Appearances) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void Appearances::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.object_.~RepeatedPtrField(); - _impl_.outfit_.~RepeatedPtrField(); - _impl_.effect_.~RepeatedPtrField(); - _impl_.missile_.~RepeatedPtrField(); - if (this != internal_default_instance()) delete _impl_.special_meaning_appearance_ids_; -} - -void Appearances::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void Appearances::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.Appearances) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.object_.Clear(); - _impl_.outfit_.Clear(); - _impl_.effect_.Clear(); - _impl_.missile_.Clear(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - GOOGLE_DCHECK(_impl_.special_meaning_appearance_ids_ != nullptr); - _impl_.special_meaning_appearance_ids_->Clear(); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Appearances::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // repeated .Canary.protobuf.appearances.Appearance object = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_object(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); - } else - goto handle_unusual; - continue; - // repeated .Canary.protobuf.appearances.Appearance outfit = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_outfit(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); - } else - goto handle_unusual; - continue; - // repeated .Canary.protobuf.appearances.Appearance effect = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_effect(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); - } else - goto handle_unusual; - continue; - // repeated .Canary.protobuf.appearances.Appearance missile = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_missile(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.SpecialMeaningAppearanceIds special_meaning_appearance_ids = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { - ptr = ctx->ParseMessage(_internal_mutable_special_meaning_appearance_ids(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* Appearances::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.Appearances) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .Canary.protobuf.appearances.Appearance object = 1; - for (unsigned i = 0, - n = static_cast(this->_internal_object_size()); i < n; i++) { - const auto& repfield = this->_internal_object(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); - } - - // repeated .Canary.protobuf.appearances.Appearance outfit = 2; - for (unsigned i = 0, - n = static_cast(this->_internal_outfit_size()); i < n; i++) { - const auto& repfield = this->_internal_outfit(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); - } - - // repeated .Canary.protobuf.appearances.Appearance effect = 3; - for (unsigned i = 0, - n = static_cast(this->_internal_effect_size()); i < n; i++) { - const auto& repfield = this->_internal_effect(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream); - } - - // repeated .Canary.protobuf.appearances.Appearance missile = 4; - for (unsigned i = 0, - n = static_cast(this->_internal_missile_size()); i < n; i++) { - const auto& repfield = this->_internal_missile(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream); - } - - cached_has_bits = _impl_._has_bits_[0]; - // optional .Canary.protobuf.appearances.SpecialMeaningAppearanceIds special_meaning_appearance_ids = 5; - if (cached_has_bits & 0x00000001u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(5, _Internal::special_meaning_appearance_ids(this), - _Internal::special_meaning_appearance_ids(this).GetCachedSize(), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.Appearances) - return target; -} - -size_t Appearances::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.Appearances) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .Canary.protobuf.appearances.Appearance object = 1; - total_size += 1UL * this->_internal_object_size(); - for (const auto& msg : this->_impl_.object_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - // repeated .Canary.protobuf.appearances.Appearance outfit = 2; - total_size += 1UL * this->_internal_outfit_size(); - for (const auto& msg : this->_impl_.outfit_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - // repeated .Canary.protobuf.appearances.Appearance effect = 3; - total_size += 1UL * this->_internal_effect_size(); - for (const auto& msg : this->_impl_.effect_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - // repeated .Canary.protobuf.appearances.Appearance missile = 4; - total_size += 1UL * this->_internal_missile_size(); - for (const auto& msg : this->_impl_.missile_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - // optional .Canary.protobuf.appearances.SpecialMeaningAppearanceIds special_meaning_appearance_ids = 5; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.special_meaning_appearance_ids_); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Appearances::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - Appearances::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Appearances::GetClassData() const { return &_class_data_; } - - -void Appearances::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.Appearances) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_impl_.object_.MergeFrom(from._impl_.object_); - _this->_impl_.outfit_.MergeFrom(from._impl_.outfit_); - _this->_impl_.effect_.MergeFrom(from._impl_.effect_); - _this->_impl_.missile_.MergeFrom(from._impl_.missile_); - if (from._internal_has_special_meaning_appearance_ids()) { - _this->_internal_mutable_special_meaning_appearance_ids()->::Canary::protobuf::appearances::SpecialMeaningAppearanceIds::MergeFrom( - from._internal_special_meaning_appearance_ids()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void Appearances::CopyFrom(const Appearances& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.Appearances) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Appearances::IsInitialized() const { - return true; -} - -void Appearances::InternalSwap(Appearances* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.object_.InternalSwap(&other->_impl_.object_); - _impl_.outfit_.InternalSwap(&other->_impl_.outfit_); - _impl_.effect_.InternalSwap(&other->_impl_.effect_); - _impl_.missile_.InternalSwap(&other->_impl_.missile_); - swap(_impl_.special_meaning_appearance_ids_, other->_impl_.special_meaning_appearance_ids_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Appearances::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[1]); -} - -// =================================================================== - -class SpritePhase::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_duration_min(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_duration_max(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } -}; - -SpritePhase::SpritePhase(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.SpritePhase) -} -SpritePhase::SpritePhase(const SpritePhase& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - SpritePhase* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.duration_min_){} - , decltype(_impl_.duration_max_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.duration_min_, &from._impl_.duration_min_, - static_cast(reinterpret_cast(&_impl_.duration_max_) - - reinterpret_cast(&_impl_.duration_min_)) + sizeof(_impl_.duration_max_)); - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.SpritePhase) -} - -inline void SpritePhase::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.duration_min_){0u} - , decltype(_impl_.duration_max_){0u} - }; -} - -SpritePhase::~SpritePhase() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.SpritePhase) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void SpritePhase::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void SpritePhase::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void SpritePhase::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.SpritePhase) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - ::memset(&_impl_.duration_min_, 0, static_cast( - reinterpret_cast(&_impl_.duration_max_) - - reinterpret_cast(&_impl_.duration_min_)) + sizeof(_impl_.duration_max_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* SpritePhase::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 duration_min = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_duration_min(&has_bits); - _impl_.duration_min_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 duration_max = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _Internal::set_has_duration_max(&has_bits); - _impl_.duration_max_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* SpritePhase::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.SpritePhase) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 duration_min = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_duration_min(), target); - } - - // optional uint32 duration_max = 2; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_duration_max(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.SpritePhase) - return target; -} - -size_t SpritePhase::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.SpritePhase) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional uint32 duration_min = 1; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_duration_min()); - } - - // optional uint32 duration_max = 2; - if (cached_has_bits & 0x00000002u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_duration_max()); - } - - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SpritePhase::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - SpritePhase::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SpritePhase::GetClassData() const { return &_class_data_; } - - -void SpritePhase::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.SpritePhase) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - if (cached_has_bits & 0x00000001u) { - _this->_impl_.duration_min_ = from._impl_.duration_min_; - } - if (cached_has_bits & 0x00000002u) { - _this->_impl_.duration_max_ = from._impl_.duration_max_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void SpritePhase::CopyFrom(const SpritePhase& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.SpritePhase) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool SpritePhase::IsInitialized() const { - return true; -} - -void SpritePhase::InternalSwap(SpritePhase* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(SpritePhase, _impl_.duration_max_) - + sizeof(SpritePhase::_impl_.duration_max_) - - PROTOBUF_FIELD_OFFSET(SpritePhase, _impl_.duration_min_)>( - reinterpret_cast(&_impl_.duration_min_), - reinterpret_cast(&other->_impl_.duration_min_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata SpritePhase::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[2]); -} - -// =================================================================== - -class SpriteAnimation::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_default_start_phase(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_synchronized(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } - static void set_has_random_start_phase(HasBits* has_bits) { - (*has_bits)[0] |= 4u; - } - static void set_has_loop_type(HasBits* has_bits) { - (*has_bits)[0] |= 16u; - } - static void set_has_loop_count(HasBits* has_bits) { - (*has_bits)[0] |= 8u; - } -}; - -SpriteAnimation::SpriteAnimation(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.SpriteAnimation) -} -SpriteAnimation::SpriteAnimation(const SpriteAnimation& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - SpriteAnimation* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.sprite_phase_){from._impl_.sprite_phase_} - , decltype(_impl_.default_start_phase_){} - , decltype(_impl_.synchronized_){} - , decltype(_impl_.random_start_phase_){} - , decltype(_impl_.loop_count_){} - , decltype(_impl_.loop_type_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.default_start_phase_, &from._impl_.default_start_phase_, - static_cast(reinterpret_cast(&_impl_.loop_type_) - - reinterpret_cast(&_impl_.default_start_phase_)) + sizeof(_impl_.loop_type_)); - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.SpriteAnimation) -} - -inline void SpriteAnimation::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.sprite_phase_){arena} - , decltype(_impl_.default_start_phase_){0u} - , decltype(_impl_.synchronized_){false} - , decltype(_impl_.random_start_phase_){false} - , decltype(_impl_.loop_count_){0u} - , decltype(_impl_.loop_type_){-1} - }; -} - -SpriteAnimation::~SpriteAnimation() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.SpriteAnimation) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void SpriteAnimation::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.sprite_phase_.~RepeatedPtrField(); -} - -void SpriteAnimation::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void SpriteAnimation::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.SpriteAnimation) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.sprite_phase_.Clear(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000001fu) { - ::memset(&_impl_.default_start_phase_, 0, static_cast( - reinterpret_cast(&_impl_.loop_count_) - - reinterpret_cast(&_impl_.default_start_phase_)) + sizeof(_impl_.loop_count_)); - _impl_.loop_type_ = -1; - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* SpriteAnimation::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 default_start_phase = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_default_start_phase(&has_bits); - _impl_.default_start_phase_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool synchronized = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _Internal::set_has_synchronized(&has_bits); - _impl_.synchronized_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool random_start_phase = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _Internal::set_has_random_start_phase(&has_bits); - _impl_.random_start_phase_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.ANIMATION_LOOP_TYPE loop_type = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - if (PROTOBUF_PREDICT_TRUE(::Canary::protobuf::appearances::ANIMATION_LOOP_TYPE_IsValid(val))) { - _internal_set_loop_type(static_cast<::Canary::protobuf::appearances::ANIMATION_LOOP_TYPE>(val)); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields()); - } - } else - goto handle_unusual; - continue; - // optional uint32 loop_count = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _Internal::set_has_loop_count(&has_bits); - _impl_.loop_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated .Canary.protobuf.appearances.SpritePhase sprite_phase = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_sprite_phase(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* SpriteAnimation::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.SpriteAnimation) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 default_start_phase = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_default_start_phase(), target); - } - - // optional bool synchronized = 2; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_synchronized(), target); - } - - // optional bool random_start_phase = 3; - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_random_start_phase(), target); - } - - // optional .Canary.protobuf.appearances.ANIMATION_LOOP_TYPE loop_type = 4; - if (cached_has_bits & 0x00000010u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 4, this->_internal_loop_type(), target); - } - - // optional uint32 loop_count = 5; - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_loop_count(), target); - } - - // repeated .Canary.protobuf.appearances.SpritePhase sprite_phase = 6; - for (unsigned i = 0, - n = static_cast(this->_internal_sprite_phase_size()); i < n; i++) { - const auto& repfield = this->_internal_sprite_phase(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(6, repfield, repfield.GetCachedSize(), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.SpriteAnimation) - return target; -} - -size_t SpriteAnimation::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.SpriteAnimation) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .Canary.protobuf.appearances.SpritePhase sprite_phase = 6; - total_size += 1UL * this->_internal_sprite_phase_size(); - for (const auto& msg : this->_impl_.sprite_phase_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000001fu) { - // optional uint32 default_start_phase = 1; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_default_start_phase()); - } - - // optional bool synchronized = 2; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + 1; - } - - // optional bool random_start_phase = 3; - if (cached_has_bits & 0x00000004u) { - total_size += 1 + 1; - } - - // optional uint32 loop_count = 5; - if (cached_has_bits & 0x00000008u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_loop_count()); - } - - // optional .Canary.protobuf.appearances.ANIMATION_LOOP_TYPE loop_type = 4; - if (cached_has_bits & 0x00000010u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_loop_type()); - } - - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SpriteAnimation::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - SpriteAnimation::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SpriteAnimation::GetClassData() const { return &_class_data_; } - - -void SpriteAnimation::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.SpriteAnimation) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_impl_.sprite_phase_.MergeFrom(from._impl_.sprite_phase_); - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x0000001fu) { - if (cached_has_bits & 0x00000001u) { - _this->_impl_.default_start_phase_ = from._impl_.default_start_phase_; - } - if (cached_has_bits & 0x00000002u) { - _this->_impl_.synchronized_ = from._impl_.synchronized_; - } - if (cached_has_bits & 0x00000004u) { - _this->_impl_.random_start_phase_ = from._impl_.random_start_phase_; - } - if (cached_has_bits & 0x00000008u) { - _this->_impl_.loop_count_ = from._impl_.loop_count_; - } - if (cached_has_bits & 0x00000010u) { - _this->_impl_.loop_type_ = from._impl_.loop_type_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void SpriteAnimation::CopyFrom(const SpriteAnimation& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.SpriteAnimation) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool SpriteAnimation::IsInitialized() const { - return true; -} - -void SpriteAnimation::InternalSwap(SpriteAnimation* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.sprite_phase_.InternalSwap(&other->_impl_.sprite_phase_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(SpriteAnimation, _impl_.loop_count_) - + sizeof(SpriteAnimation::_impl_.loop_count_) - - PROTOBUF_FIELD_OFFSET(SpriteAnimation, _impl_.default_start_phase_)>( - reinterpret_cast(&_impl_.default_start_phase_), - reinterpret_cast(&other->_impl_.default_start_phase_)); - swap(_impl_.loop_type_, other->_impl_.loop_type_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata SpriteAnimation::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[3]); -} - -// =================================================================== - -class Box::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_x(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_y(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } - static void set_has_width(HasBits* has_bits) { - (*has_bits)[0] |= 4u; - } - static void set_has_height(HasBits* has_bits) { - (*has_bits)[0] |= 8u; - } -}; - -Box::Box(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.Box) -} -Box::Box(const Box& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - Box* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.x_){} - , decltype(_impl_.y_){} - , decltype(_impl_.width_){} - , decltype(_impl_.height_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.x_, &from._impl_.x_, - static_cast(reinterpret_cast(&_impl_.height_) - - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.height_)); - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.Box) -} - -inline void Box::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.x_){0u} - , decltype(_impl_.y_){0u} - , decltype(_impl_.width_){0u} - , decltype(_impl_.height_){0u} - }; -} - -Box::~Box() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.Box) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void Box::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void Box::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void Box::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.Box) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - ::memset(&_impl_.x_, 0, static_cast( - reinterpret_cast(&_impl_.height_) - - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.height_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Box::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 x = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_x(&has_bits); - _impl_.x_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 y = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _Internal::set_has_y(&has_bits); - _impl_.y_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 width = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _Internal::set_has_width(&has_bits); - _impl_.width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 height = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _Internal::set_has_height(&has_bits); - _impl_.height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* Box::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.Box) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 x = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_x(), target); - } - - // optional uint32 y = 2; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_y(), target); - } - - // optional uint32 width = 3; - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_width(), target); - } - - // optional uint32 height = 4; - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_height(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.Box) - return target; -} - -size_t Box::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.Box) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - // optional uint32 x = 1; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_x()); - } - - // optional uint32 y = 2; - if (cached_has_bits & 0x00000002u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_y()); - } - - // optional uint32 width = 3; - if (cached_has_bits & 0x00000004u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_width()); - } - - // optional uint32 height = 4; - if (cached_has_bits & 0x00000008u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_height()); - } - - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Box::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - Box::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Box::GetClassData() const { return &_class_data_; } - - -void Box::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.Box) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - if (cached_has_bits & 0x00000001u) { - _this->_impl_.x_ = from._impl_.x_; - } - if (cached_has_bits & 0x00000002u) { - _this->_impl_.y_ = from._impl_.y_; - } - if (cached_has_bits & 0x00000004u) { - _this->_impl_.width_ = from._impl_.width_; - } - if (cached_has_bits & 0x00000008u) { - _this->_impl_.height_ = from._impl_.height_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void Box::CopyFrom(const Box& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.Box) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Box::IsInitialized() const { - return true; -} - -void Box::InternalSwap(Box* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Box, _impl_.height_) - + sizeof(Box::_impl_.height_) - - PROTOBUF_FIELD_OFFSET(Box, _impl_.x_)>( - reinterpret_cast(&_impl_.x_), - reinterpret_cast(&other->_impl_.x_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Box::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[4]); -} - -// =================================================================== - -class SpriteInfo::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_pattern_width(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } - static void set_has_pattern_height(HasBits* has_bits) { - (*has_bits)[0] |= 4u; - } - static void set_has_pattern_depth(HasBits* has_bits) { - (*has_bits)[0] |= 8u; - } - static void set_has_layers(HasBits* has_bits) { - (*has_bits)[0] |= 16u; - } - static void set_has_bounding_square(HasBits* has_bits) { - (*has_bits)[0] |= 32u; - } - static const ::Canary::protobuf::appearances::SpriteAnimation& animation(const SpriteInfo* msg); - static void set_has_animation(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_is_opaque(HasBits* has_bits) { - (*has_bits)[0] |= 64u; - } -}; - -const ::Canary::protobuf::appearances::SpriteAnimation& -SpriteInfo::_Internal::animation(const SpriteInfo* msg) { - return *msg->_impl_.animation_; -} -SpriteInfo::SpriteInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.SpriteInfo) -} -SpriteInfo::SpriteInfo(const SpriteInfo& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - SpriteInfo* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.sprite_id_){from._impl_.sprite_id_} - , decltype(_impl_.bounding_box_per_direction_){from._impl_.bounding_box_per_direction_} - , decltype(_impl_.animation_){nullptr} - , decltype(_impl_.pattern_width_){} - , decltype(_impl_.pattern_height_){} - , decltype(_impl_.pattern_depth_){} - , decltype(_impl_.layers_){} - , decltype(_impl_.bounding_square_){} - , decltype(_impl_.is_opaque_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_animation()) { - _this->_impl_.animation_ = new ::Canary::protobuf::appearances::SpriteAnimation(*from._impl_.animation_); - } - ::memcpy(&_impl_.pattern_width_, &from._impl_.pattern_width_, - static_cast(reinterpret_cast(&_impl_.is_opaque_) - - reinterpret_cast(&_impl_.pattern_width_)) + sizeof(_impl_.is_opaque_)); - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.SpriteInfo) -} - -inline void SpriteInfo::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.sprite_id_){arena} - , decltype(_impl_.bounding_box_per_direction_){arena} - , decltype(_impl_.animation_){nullptr} - , decltype(_impl_.pattern_width_){0u} - , decltype(_impl_.pattern_height_){0u} - , decltype(_impl_.pattern_depth_){0u} - , decltype(_impl_.layers_){0u} - , decltype(_impl_.bounding_square_){0u} - , decltype(_impl_.is_opaque_){false} - }; -} - -SpriteInfo::~SpriteInfo() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.SpriteInfo) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void SpriteInfo::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.sprite_id_.~RepeatedField(); - _impl_.bounding_box_per_direction_.~RepeatedPtrField(); - if (this != internal_default_instance()) delete _impl_.animation_; -} - -void SpriteInfo::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void SpriteInfo::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.SpriteInfo) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.sprite_id_.Clear(); - _impl_.bounding_box_per_direction_.Clear(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - GOOGLE_DCHECK(_impl_.animation_ != nullptr); - _impl_.animation_->Clear(); - } - if (cached_has_bits & 0x0000007eu) { - ::memset(&_impl_.pattern_width_, 0, static_cast( - reinterpret_cast(&_impl_.is_opaque_) - - reinterpret_cast(&_impl_.pattern_width_)) + sizeof(_impl_.is_opaque_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* SpriteInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 pattern_width = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_pattern_width(&has_bits); - _impl_.pattern_width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 pattern_height = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _Internal::set_has_pattern_height(&has_bits); - _impl_.pattern_height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 pattern_depth = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _Internal::set_has_pattern_depth(&has_bits); - _impl_.pattern_depth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 layers = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _Internal::set_has_layers(&has_bits); - _impl_.layers_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated uint32 sprite_id = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - ptr -= 1; - do { - ptr += 1; - _internal_add_sprite_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<40>(ptr)); - } else if (static_cast(tag) == 42) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_sprite_id(), ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.SpriteAnimation animation = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { - ptr = ctx->ParseMessage(_internal_mutable_animation(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 bounding_square = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { - _Internal::set_has_bounding_square(&has_bits); - _impl_.bounding_square_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool is_opaque = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { - _Internal::set_has_is_opaque(&has_bits); - _impl_.is_opaque_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated .Canary.protobuf.appearances.Box bounding_box_per_direction = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_bounding_box_per_direction(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* SpriteInfo::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.SpriteInfo) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 pattern_width = 1; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_pattern_width(), target); - } - - // optional uint32 pattern_height = 2; - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_pattern_height(), target); - } - - // optional uint32 pattern_depth = 3; - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_pattern_depth(), target); - } - - // optional uint32 layers = 4; - if (cached_has_bits & 0x00000010u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_layers(), target); - } - - // repeated uint32 sprite_id = 5; - for (int i = 0, n = this->_internal_sprite_id_size(); i < n; i++) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_sprite_id(i), target); - } - - // optional .Canary.protobuf.appearances.SpriteAnimation animation = 6; - if (cached_has_bits & 0x00000001u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(6, _Internal::animation(this), - _Internal::animation(this).GetCachedSize(), target, stream); - } - - // optional uint32 bounding_square = 7; - if (cached_has_bits & 0x00000020u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_bounding_square(), target); - } - - // optional bool is_opaque = 8; - if (cached_has_bits & 0x00000040u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_is_opaque(), target); - } - - // repeated .Canary.protobuf.appearances.Box bounding_box_per_direction = 9; - for (unsigned i = 0, - n = static_cast(this->_internal_bounding_box_per_direction_size()); i < n; i++) { - const auto& repfield = this->_internal_bounding_box_per_direction(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(9, repfield, repfield.GetCachedSize(), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.SpriteInfo) - return target; -} - -size_t SpriteInfo::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.SpriteInfo) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated uint32 sprite_id = 5; - { - size_t data_size = ::_pbi::WireFormatLite:: - UInt32Size(this->_impl_.sprite_id_); - total_size += 1 * - ::_pbi::FromIntSize(this->_internal_sprite_id_size()); - total_size += data_size; - } - - // repeated .Canary.protobuf.appearances.Box bounding_box_per_direction = 9; - total_size += 1UL * this->_internal_bounding_box_per_direction_size(); - for (const auto& msg : this->_impl_.bounding_box_per_direction_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000007fu) { - // optional .Canary.protobuf.appearances.SpriteAnimation animation = 6; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.animation_); - } - - // optional uint32 pattern_width = 1; - if (cached_has_bits & 0x00000002u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_pattern_width()); - } - - // optional uint32 pattern_height = 2; - if (cached_has_bits & 0x00000004u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_pattern_height()); - } - - // optional uint32 pattern_depth = 3; - if (cached_has_bits & 0x00000008u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_pattern_depth()); - } - - // optional uint32 layers = 4; - if (cached_has_bits & 0x00000010u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_layers()); - } - - // optional uint32 bounding_square = 7; - if (cached_has_bits & 0x00000020u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_bounding_square()); - } - - // optional bool is_opaque = 8; - if (cached_has_bits & 0x00000040u) { - total_size += 1 + 1; - } - - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SpriteInfo::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - SpriteInfo::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SpriteInfo::GetClassData() const { return &_class_data_; } - - -void SpriteInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.SpriteInfo) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_impl_.sprite_id_.MergeFrom(from._impl_.sprite_id_); - _this->_impl_.bounding_box_per_direction_.MergeFrom(from._impl_.bounding_box_per_direction_); - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x0000007fu) { - if (cached_has_bits & 0x00000001u) { - _this->_internal_mutable_animation()->::Canary::protobuf::appearances::SpriteAnimation::MergeFrom( - from._internal_animation()); - } - if (cached_has_bits & 0x00000002u) { - _this->_impl_.pattern_width_ = from._impl_.pattern_width_; - } - if (cached_has_bits & 0x00000004u) { - _this->_impl_.pattern_height_ = from._impl_.pattern_height_; - } - if (cached_has_bits & 0x00000008u) { - _this->_impl_.pattern_depth_ = from._impl_.pattern_depth_; - } - if (cached_has_bits & 0x00000010u) { - _this->_impl_.layers_ = from._impl_.layers_; - } - if (cached_has_bits & 0x00000020u) { - _this->_impl_.bounding_square_ = from._impl_.bounding_square_; - } - if (cached_has_bits & 0x00000040u) { - _this->_impl_.is_opaque_ = from._impl_.is_opaque_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void SpriteInfo::CopyFrom(const SpriteInfo& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.SpriteInfo) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool SpriteInfo::IsInitialized() const { - return true; -} - -void SpriteInfo::InternalSwap(SpriteInfo* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.sprite_id_.InternalSwap(&other->_impl_.sprite_id_); - _impl_.bounding_box_per_direction_.InternalSwap(&other->_impl_.bounding_box_per_direction_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(SpriteInfo, _impl_.is_opaque_) - + sizeof(SpriteInfo::_impl_.is_opaque_) - - PROTOBUF_FIELD_OFFSET(SpriteInfo, _impl_.animation_)>( - reinterpret_cast(&_impl_.animation_), - reinterpret_cast(&other->_impl_.animation_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata SpriteInfo::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[5]); -} - -// =================================================================== - -class FrameGroup::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_fixed_frame_group(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } - static void set_has_id(HasBits* has_bits) { - (*has_bits)[0] |= 4u; - } - static const ::Canary::protobuf::appearances::SpriteInfo& sprite_info(const FrameGroup* msg); - static void set_has_sprite_info(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } -}; - -const ::Canary::protobuf::appearances::SpriteInfo& -FrameGroup::_Internal::sprite_info(const FrameGroup* msg) { - return *msg->_impl_.sprite_info_; -} -FrameGroup::FrameGroup(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.FrameGroup) -} -FrameGroup::FrameGroup(const FrameGroup& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - FrameGroup* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.sprite_info_){nullptr} - , decltype(_impl_.fixed_frame_group_){} - , decltype(_impl_.id_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_sprite_info()) { - _this->_impl_.sprite_info_ = new ::Canary::protobuf::appearances::SpriteInfo(*from._impl_.sprite_info_); - } - ::memcpy(&_impl_.fixed_frame_group_, &from._impl_.fixed_frame_group_, - static_cast(reinterpret_cast(&_impl_.id_) - - reinterpret_cast(&_impl_.fixed_frame_group_)) + sizeof(_impl_.id_)); - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.FrameGroup) -} - -inline void FrameGroup::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.sprite_info_){nullptr} - , decltype(_impl_.fixed_frame_group_){0} - , decltype(_impl_.id_){0u} - }; -} - -FrameGroup::~FrameGroup() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.FrameGroup) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void FrameGroup::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.sprite_info_; -} - -void FrameGroup::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void FrameGroup::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.FrameGroup) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - GOOGLE_DCHECK(_impl_.sprite_info_ != nullptr); - _impl_.sprite_info_->Clear(); - } - if (cached_has_bits & 0x00000006u) { - ::memset(&_impl_.fixed_frame_group_, 0, static_cast( - reinterpret_cast(&_impl_.id_) - - reinterpret_cast(&_impl_.fixed_frame_group_)) + sizeof(_impl_.id_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* FrameGroup::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional .Canary.protobuf.appearances.FIXED_FRAME_GROUP fixed_frame_group = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - if (PROTOBUF_PREDICT_TRUE(::Canary::protobuf::appearances::FIXED_FRAME_GROUP_IsValid(val))) { - _internal_set_fixed_frame_group(static_cast<::Canary::protobuf::appearances::FIXED_FRAME_GROUP>(val)); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); - } - } else - goto handle_unusual; - continue; - // optional uint32 id = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _Internal::set_has_id(&has_bits); - _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.SpriteInfo sprite_info = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_sprite_info(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* FrameGroup::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.FrameGroup) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional .Canary.protobuf.appearances.FIXED_FRAME_GROUP fixed_frame_group = 1; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this->_internal_fixed_frame_group(), target); - } - - // optional uint32 id = 2; - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_id(), target); - } - - // optional .Canary.protobuf.appearances.SpriteInfo sprite_info = 3; - if (cached_has_bits & 0x00000001u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, _Internal::sprite_info(this), - _Internal::sprite_info(this).GetCachedSize(), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.FrameGroup) - return target; -} - -size_t FrameGroup::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.FrameGroup) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000007u) { - // optional .Canary.protobuf.appearances.SpriteInfo sprite_info = 3; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.sprite_info_); - } - - // optional .Canary.protobuf.appearances.FIXED_FRAME_GROUP fixed_frame_group = 1; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_fixed_frame_group()); - } - - // optional uint32 id = 2; - if (cached_has_bits & 0x00000004u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_id()); - } - - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FrameGroup::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - FrameGroup::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FrameGroup::GetClassData() const { return &_class_data_; } - - -void FrameGroup::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.FrameGroup) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000007u) { - if (cached_has_bits & 0x00000001u) { - _this->_internal_mutable_sprite_info()->::Canary::protobuf::appearances::SpriteInfo::MergeFrom( - from._internal_sprite_info()); - } - if (cached_has_bits & 0x00000002u) { - _this->_impl_.fixed_frame_group_ = from._impl_.fixed_frame_group_; - } - if (cached_has_bits & 0x00000004u) { - _this->_impl_.id_ = from._impl_.id_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void FrameGroup::CopyFrom(const FrameGroup& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.FrameGroup) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool FrameGroup::IsInitialized() const { - return true; -} - -void FrameGroup::InternalSwap(FrameGroup* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(FrameGroup, _impl_.id_) - + sizeof(FrameGroup::_impl_.id_) - - PROTOBUF_FIELD_OFFSET(FrameGroup, _impl_.sprite_info_)>( - reinterpret_cast(&_impl_.sprite_info_), - reinterpret_cast(&other->_impl_.sprite_info_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata FrameGroup::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[6]); -} - -// =================================================================== - -class Appearance::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_id(HasBits* has_bits) { - (*has_bits)[0] |= 8u; - } - static const ::Canary::protobuf::appearances::AppearanceFlags& flags(const Appearance* msg); - static void set_has_flags(HasBits* has_bits) { - (*has_bits)[0] |= 4u; - } - static void set_has_name(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_description(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } -}; - -const ::Canary::protobuf::appearances::AppearanceFlags& -Appearance::_Internal::flags(const Appearance* msg) { - return *msg->_impl_.flags_; -} -Appearance::Appearance(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.Appearance) -} -Appearance::Appearance(const Appearance& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - Appearance* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.frame_group_){from._impl_.frame_group_} - , decltype(_impl_.name_){} - , decltype(_impl_.description_){} - , decltype(_impl_.flags_){nullptr} - , decltype(_impl_.id_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_name()) { - _this->_impl_.name_.Set(from._internal_name(), - _this->GetArenaForAllocation()); - } - _impl_.description_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.description_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_description()) { - _this->_impl_.description_.Set(from._internal_description(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_flags()) { - _this->_impl_.flags_ = new ::Canary::protobuf::appearances::AppearanceFlags(*from._impl_.flags_); - } - _this->_impl_.id_ = from._impl_.id_; - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.Appearance) -} - -inline void Appearance::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.frame_group_){arena} - , decltype(_impl_.name_){} - , decltype(_impl_.description_){} - , decltype(_impl_.flags_){nullptr} - , decltype(_impl_.id_){0u} - }; - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.description_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.description_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -Appearance::~Appearance() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.Appearance) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void Appearance::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.frame_group_.~RepeatedPtrField(); - _impl_.name_.Destroy(); - _impl_.description_.Destroy(); - if (this != internal_default_instance()) delete _impl_.flags_; -} - -void Appearance::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void Appearance::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.Appearance) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.frame_group_.Clear(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000007u) { - if (cached_has_bits & 0x00000001u) { - _impl_.name_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000002u) { - _impl_.description_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000004u) { - GOOGLE_DCHECK(_impl_.flags_ != nullptr); - _impl_.flags_->Clear(); - } - } - _impl_.id_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Appearance::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_id(&has_bits); - _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated .Canary.protobuf.appearances.FrameGroup frame_group = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_frame_group(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.AppearanceFlags flags = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_flags(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bytes name = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - auto str = _internal_mutable_name(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bytes description = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { - auto str = _internal_mutable_description(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* Appearance::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.Appearance) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 id = 1; - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_id(), target); - } - - // repeated .Canary.protobuf.appearances.FrameGroup frame_group = 2; - for (unsigned i = 0, - n = static_cast(this->_internal_frame_group_size()); i < n; i++) { - const auto& repfield = this->_internal_frame_group(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); - } - - // optional .Canary.protobuf.appearances.AppearanceFlags flags = 3; - if (cached_has_bits & 0x00000004u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, _Internal::flags(this), - _Internal::flags(this).GetCachedSize(), target, stream); - } - - // optional bytes name = 4; - if (cached_has_bits & 0x00000001u) { - target = stream->WriteBytesMaybeAliased( - 4, this->_internal_name(), target); - } - - // optional bytes description = 5; - if (cached_has_bits & 0x00000002u) { - target = stream->WriteBytesMaybeAliased( - 5, this->_internal_description(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.Appearance) - return target; -} - -size_t Appearance::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.Appearance) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .Canary.protobuf.appearances.FrameGroup frame_group = 2; - total_size += 1UL * this->_internal_frame_group_size(); - for (const auto& msg : this->_impl_.frame_group_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - // optional bytes name = 4; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_name()); - } - - // optional bytes description = 5; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_description()); - } - - // optional .Canary.protobuf.appearances.AppearanceFlags flags = 3; - if (cached_has_bits & 0x00000004u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.flags_); - } - - // optional uint32 id = 1; - if (cached_has_bits & 0x00000008u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_id()); - } - - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Appearance::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - Appearance::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Appearance::GetClassData() const { return &_class_data_; } - - -void Appearance::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.Appearance) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_impl_.frame_group_.MergeFrom(from._impl_.frame_group_); - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - if (cached_has_bits & 0x00000001u) { - _this->_internal_set_name(from._internal_name()); - } - if (cached_has_bits & 0x00000002u) { - _this->_internal_set_description(from._internal_description()); - } - if (cached_has_bits & 0x00000004u) { - _this->_internal_mutable_flags()->::Canary::protobuf::appearances::AppearanceFlags::MergeFrom( - from._internal_flags()); - } - if (cached_has_bits & 0x00000008u) { - _this->_impl_.id_ = from._impl_.id_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void Appearance::CopyFrom(const Appearance& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.Appearance) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Appearance::IsInitialized() const { - return true; -} - -void Appearance::InternalSwap(Appearance* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.frame_group_.InternalSwap(&other->_impl_.frame_group_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.name_, lhs_arena, - &other->_impl_.name_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.description_, lhs_arena, - &other->_impl_.description_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Appearance, _impl_.id_) - + sizeof(Appearance::_impl_.id_) - - PROTOBUF_FIELD_OFFSET(Appearance, _impl_.flags_)>( - reinterpret_cast(&_impl_.flags_), - reinterpret_cast(&other->_impl_.flags_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Appearance::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[7]); -} - -// =================================================================== - -class AppearanceFlags::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static const ::Canary::protobuf::appearances::AppearanceFlagBank& bank(const AppearanceFlags* msg); - static void set_has_bank(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_clip(HasBits* has_bits) { - (*has_bits)[0] |= 32768u; - } - static void set_has_bottom(HasBits* has_bits) { - (*has_bits)[0] |= 65536u; - } - static void set_has_top(HasBits* has_bits) { - (*has_bits)[0] |= 131072u; - } - static void set_has_container(HasBits* has_bits) { - (*has_bits)[0] |= 262144u; - } - static void set_has_cumulative(HasBits* has_bits) { - (*has_bits)[0] |= 524288u; - } - static void set_has_usable(HasBits* has_bits) { - (*has_bits)[0] |= 1048576u; - } - static void set_has_forceuse(HasBits* has_bits) { - (*has_bits)[0] |= 2097152u; - } - static void set_has_multiuse(HasBits* has_bits) { - (*has_bits)[0] |= 4194304u; - } - static const ::Canary::protobuf::appearances::AppearanceFlagWrite& write(const AppearanceFlags* msg); - static void set_has_write(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } - static const ::Canary::protobuf::appearances::AppearanceFlagWriteOnce& write_once(const AppearanceFlags* msg); - static void set_has_write_once(HasBits* has_bits) { - (*has_bits)[0] |= 4u; - } - static void set_has_liquidpool(HasBits* has_bits) { - (*has_bits)[0] |= 8388608u; - } - static void set_has_unpass(HasBits* has_bits) { - (*has_bits)[0] |= 16777216u; - } - static void set_has_unmove(HasBits* has_bits) { - (*has_bits)[0] |= 33554432u; - } - static void set_has_unsight(HasBits* has_bits) { - (*has_bits)[0] |= 67108864u; - } - static void set_has_avoid(HasBits* has_bits) { - (*has_bits)[0] |= 134217728u; - } - static void set_has_no_movement_animation(HasBits* has_bits) { - (*has_bits)[0] |= 268435456u; - } - static void set_has_take(HasBits* has_bits) { - (*has_bits)[0] |= 536870912u; - } - static void set_has_liquidcontainer(HasBits* has_bits) { - (*has_bits)[0] |= 1073741824u; - } - static void set_has_hang(HasBits* has_bits) { - (*has_bits)[0] |= 2147483648u; - } - static const ::Canary::protobuf::appearances::AppearanceFlagHook& hook(const AppearanceFlags* msg); - static void set_has_hook(HasBits* has_bits) { - (*has_bits)[0] |= 8u; - } - static void set_has_rotate(HasBits* has_bits) { - (*has_bits)[1] |= 1u; - } - static const ::Canary::protobuf::appearances::AppearanceFlagLight& light(const AppearanceFlags* msg); - static void set_has_light(HasBits* has_bits) { - (*has_bits)[0] |= 16u; - } - static void set_has_dont_hide(HasBits* has_bits) { - (*has_bits)[1] |= 2u; - } - static void set_has_translucent(HasBits* has_bits) { - (*has_bits)[1] |= 4u; - } - static const ::Canary::protobuf::appearances::AppearanceFlagShift& shift(const AppearanceFlags* msg); - static void set_has_shift(HasBits* has_bits) { - (*has_bits)[0] |= 32u; - } - static const ::Canary::protobuf::appearances::AppearanceFlagHeight& height(const AppearanceFlags* msg); - static void set_has_height(HasBits* has_bits) { - (*has_bits)[0] |= 64u; - } - static void set_has_lying_object(HasBits* has_bits) { - (*has_bits)[1] |= 8u; - } - static void set_has_animate_always(HasBits* has_bits) { - (*has_bits)[1] |= 16u; - } - static const ::Canary::protobuf::appearances::AppearanceFlagAutomap& automap(const AppearanceFlags* msg); - static void set_has_automap(HasBits* has_bits) { - (*has_bits)[0] |= 128u; - } - static const ::Canary::protobuf::appearances::AppearanceFlagLenshelp& lenshelp(const AppearanceFlags* msg); - static void set_has_lenshelp(HasBits* has_bits) { - (*has_bits)[0] |= 256u; - } - static void set_has_fullbank(HasBits* has_bits) { - (*has_bits)[1] |= 32u; - } - static void set_has_ignore_look(HasBits* has_bits) { - (*has_bits)[1] |= 64u; - } - static const ::Canary::protobuf::appearances::AppearanceFlagClothes& clothes(const AppearanceFlags* msg); - static void set_has_clothes(HasBits* has_bits) { - (*has_bits)[0] |= 512u; - } - static const ::Canary::protobuf::appearances::AppearanceFlagDefaultAction& default_action(const AppearanceFlags* msg); - static void set_has_default_action(HasBits* has_bits) { - (*has_bits)[0] |= 1024u; - } - static const ::Canary::protobuf::appearances::AppearanceFlagMarket& market(const AppearanceFlags* msg); - static void set_has_market(HasBits* has_bits) { - (*has_bits)[0] |= 2048u; - } - static void set_has_wrap(HasBits* has_bits) { - (*has_bits)[1] |= 128u; - } - static void set_has_unwrap(HasBits* has_bits) { - (*has_bits)[1] |= 256u; - } - static void set_has_topeffect(HasBits* has_bits) { - (*has_bits)[1] |= 512u; - } - static const ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire& changedtoexpire(const AppearanceFlags* msg); - static void set_has_changedtoexpire(HasBits* has_bits) { - (*has_bits)[0] |= 4096u; - } - static void set_has_corpse(HasBits* has_bits) { - (*has_bits)[1] |= 1024u; - } - static void set_has_player_corpse(HasBits* has_bits) { - (*has_bits)[1] |= 2048u; - } - static const ::Canary::protobuf::appearances::AppearanceFlagCyclopedia& cyclopediaitem(const AppearanceFlags* msg); - static void set_has_cyclopediaitem(HasBits* has_bits) { - (*has_bits)[0] |= 8192u; - } - static void set_has_ammo(HasBits* has_bits) { - (*has_bits)[1] |= 4096u; - } - static void set_has_show_off_socket(HasBits* has_bits) { - (*has_bits)[1] |= 8192u; - } - static void set_has_reportable(HasBits* has_bits) { - (*has_bits)[1] |= 16384u; - } - static const ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification& upgradeclassification(const AppearanceFlags* msg); - static void set_has_upgradeclassification(HasBits* has_bits) { - (*has_bits)[0] |= 16384u; - } - static void set_has_reverse_addons_east(HasBits* has_bits) { - (*has_bits)[1] |= 32768u; - } - static void set_has_reverse_addons_west(HasBits* has_bits) { - (*has_bits)[1] |= 65536u; - } - static void set_has_reverse_addons_south(HasBits* has_bits) { - (*has_bits)[1] |= 131072u; - } - static void set_has_reverse_addons_north(HasBits* has_bits) { - (*has_bits)[1] |= 262144u; - } - static void set_has_wearout(HasBits* has_bits) { - (*has_bits)[1] |= 524288u; - } - static void set_has_clockexpire(HasBits* has_bits) { - (*has_bits)[1] |= 1048576u; - } - static void set_has_expire(HasBits* has_bits) { - (*has_bits)[1] |= 2097152u; - } - static void set_has_expirestop(HasBits* has_bits) { - (*has_bits)[1] |= 4194304u; - } - static void set_has_wrapkit(HasBits* has_bits) { - (*has_bits)[1] |= 8388608u; - } -}; - -const ::Canary::protobuf::appearances::AppearanceFlagBank& -AppearanceFlags::_Internal::bank(const AppearanceFlags* msg) { - return *msg->_impl_.bank_; -} -const ::Canary::protobuf::appearances::AppearanceFlagWrite& -AppearanceFlags::_Internal::write(const AppearanceFlags* msg) { - return *msg->_impl_.write_; -} -const ::Canary::protobuf::appearances::AppearanceFlagWriteOnce& -AppearanceFlags::_Internal::write_once(const AppearanceFlags* msg) { - return *msg->_impl_.write_once_; -} -const ::Canary::protobuf::appearances::AppearanceFlagHook& -AppearanceFlags::_Internal::hook(const AppearanceFlags* msg) { - return *msg->_impl_.hook_; -} -const ::Canary::protobuf::appearances::AppearanceFlagLight& -AppearanceFlags::_Internal::light(const AppearanceFlags* msg) { - return *msg->_impl_.light_; -} -const ::Canary::protobuf::appearances::AppearanceFlagShift& -AppearanceFlags::_Internal::shift(const AppearanceFlags* msg) { - return *msg->_impl_.shift_; -} -const ::Canary::protobuf::appearances::AppearanceFlagHeight& -AppearanceFlags::_Internal::height(const AppearanceFlags* msg) { - return *msg->_impl_.height_; -} -const ::Canary::protobuf::appearances::AppearanceFlagAutomap& -AppearanceFlags::_Internal::automap(const AppearanceFlags* msg) { - return *msg->_impl_.automap_; -} -const ::Canary::protobuf::appearances::AppearanceFlagLenshelp& -AppearanceFlags::_Internal::lenshelp(const AppearanceFlags* msg) { - return *msg->_impl_.lenshelp_; -} -const ::Canary::protobuf::appearances::AppearanceFlagClothes& -AppearanceFlags::_Internal::clothes(const AppearanceFlags* msg) { - return *msg->_impl_.clothes_; -} -const ::Canary::protobuf::appearances::AppearanceFlagDefaultAction& -AppearanceFlags::_Internal::default_action(const AppearanceFlags* msg) { - return *msg->_impl_.default_action_; -} -const ::Canary::protobuf::appearances::AppearanceFlagMarket& -AppearanceFlags::_Internal::market(const AppearanceFlags* msg) { - return *msg->_impl_.market_; -} -const ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire& -AppearanceFlags::_Internal::changedtoexpire(const AppearanceFlags* msg) { - return *msg->_impl_.changedtoexpire_; -} -const ::Canary::protobuf::appearances::AppearanceFlagCyclopedia& -AppearanceFlags::_Internal::cyclopediaitem(const AppearanceFlags* msg) { - return *msg->_impl_.cyclopediaitem_; -} -const ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification& -AppearanceFlags::_Internal::upgradeclassification(const AppearanceFlags* msg) { - return *msg->_impl_.upgradeclassification_; -} -AppearanceFlags::AppearanceFlags(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.AppearanceFlags) -} -AppearanceFlags::AppearanceFlags(const AppearanceFlags& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppearanceFlags* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.npcsaledata_){from._impl_.npcsaledata_} - , decltype(_impl_.bank_){nullptr} - , decltype(_impl_.write_){nullptr} - , decltype(_impl_.write_once_){nullptr} - , decltype(_impl_.hook_){nullptr} - , decltype(_impl_.light_){nullptr} - , decltype(_impl_.shift_){nullptr} - , decltype(_impl_.height_){nullptr} - , decltype(_impl_.automap_){nullptr} - , decltype(_impl_.lenshelp_){nullptr} - , decltype(_impl_.clothes_){nullptr} - , decltype(_impl_.default_action_){nullptr} - , decltype(_impl_.market_){nullptr} - , decltype(_impl_.changedtoexpire_){nullptr} - , decltype(_impl_.cyclopediaitem_){nullptr} - , decltype(_impl_.upgradeclassification_){nullptr} - , decltype(_impl_.clip_){} - , decltype(_impl_.bottom_){} - , decltype(_impl_.top_){} - , decltype(_impl_.container_){} - , decltype(_impl_.cumulative_){} - , decltype(_impl_.usable_){} - , decltype(_impl_.forceuse_){} - , decltype(_impl_.multiuse_){} - , decltype(_impl_.liquidpool_){} - , decltype(_impl_.unpass_){} - , decltype(_impl_.unmove_){} - , decltype(_impl_.unsight_){} - , decltype(_impl_.avoid_){} - , decltype(_impl_.no_movement_animation_){} - , decltype(_impl_.take_){} - , decltype(_impl_.liquidcontainer_){} - , decltype(_impl_.hang_){} - , decltype(_impl_.rotate_){} - , decltype(_impl_.dont_hide_){} - , decltype(_impl_.translucent_){} - , decltype(_impl_.lying_object_){} - , decltype(_impl_.animate_always_){} - , decltype(_impl_.fullbank_){} - , decltype(_impl_.ignore_look_){} - , decltype(_impl_.wrap_){} - , decltype(_impl_.unwrap_){} - , decltype(_impl_.topeffect_){} - , decltype(_impl_.corpse_){} - , decltype(_impl_.player_corpse_){} - , decltype(_impl_.ammo_){} - , decltype(_impl_.show_off_socket_){} - , decltype(_impl_.reportable_){} - , decltype(_impl_.reverse_addons_east_){} - , decltype(_impl_.reverse_addons_west_){} - , decltype(_impl_.reverse_addons_south_){} - , decltype(_impl_.reverse_addons_north_){} - , decltype(_impl_.wearout_){} - , decltype(_impl_.clockexpire_){} - , decltype(_impl_.expire_){} - , decltype(_impl_.expirestop_){} - , decltype(_impl_.wrapkit_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_bank()) { - _this->_impl_.bank_ = new ::Canary::protobuf::appearances::AppearanceFlagBank(*from._impl_.bank_); - } - if (from._internal_has_write()) { - _this->_impl_.write_ = new ::Canary::protobuf::appearances::AppearanceFlagWrite(*from._impl_.write_); - } - if (from._internal_has_write_once()) { - _this->_impl_.write_once_ = new ::Canary::protobuf::appearances::AppearanceFlagWriteOnce(*from._impl_.write_once_); - } - if (from._internal_has_hook()) { - _this->_impl_.hook_ = new ::Canary::protobuf::appearances::AppearanceFlagHook(*from._impl_.hook_); - } - if (from._internal_has_light()) { - _this->_impl_.light_ = new ::Canary::protobuf::appearances::AppearanceFlagLight(*from._impl_.light_); - } - if (from._internal_has_shift()) { - _this->_impl_.shift_ = new ::Canary::protobuf::appearances::AppearanceFlagShift(*from._impl_.shift_); - } - if (from._internal_has_height()) { - _this->_impl_.height_ = new ::Canary::protobuf::appearances::AppearanceFlagHeight(*from._impl_.height_); - } - if (from._internal_has_automap()) { - _this->_impl_.automap_ = new ::Canary::protobuf::appearances::AppearanceFlagAutomap(*from._impl_.automap_); - } - if (from._internal_has_lenshelp()) { - _this->_impl_.lenshelp_ = new ::Canary::protobuf::appearances::AppearanceFlagLenshelp(*from._impl_.lenshelp_); - } - if (from._internal_has_clothes()) { - _this->_impl_.clothes_ = new ::Canary::protobuf::appearances::AppearanceFlagClothes(*from._impl_.clothes_); - } - if (from._internal_has_default_action()) { - _this->_impl_.default_action_ = new ::Canary::protobuf::appearances::AppearanceFlagDefaultAction(*from._impl_.default_action_); - } - if (from._internal_has_market()) { - _this->_impl_.market_ = new ::Canary::protobuf::appearances::AppearanceFlagMarket(*from._impl_.market_); - } - if (from._internal_has_changedtoexpire()) { - _this->_impl_.changedtoexpire_ = new ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire(*from._impl_.changedtoexpire_); - } - if (from._internal_has_cyclopediaitem()) { - _this->_impl_.cyclopediaitem_ = new ::Canary::protobuf::appearances::AppearanceFlagCyclopedia(*from._impl_.cyclopediaitem_); - } - if (from._internal_has_upgradeclassification()) { - _this->_impl_.upgradeclassification_ = new ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification(*from._impl_.upgradeclassification_); - } - ::memcpy(&_impl_.clip_, &from._impl_.clip_, - static_cast(reinterpret_cast(&_impl_.wrapkit_) - - reinterpret_cast(&_impl_.clip_)) + sizeof(_impl_.wrapkit_)); - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.AppearanceFlags) -} - -inline void AppearanceFlags::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.npcsaledata_){arena} - , decltype(_impl_.bank_){nullptr} - , decltype(_impl_.write_){nullptr} - , decltype(_impl_.write_once_){nullptr} - , decltype(_impl_.hook_){nullptr} - , decltype(_impl_.light_){nullptr} - , decltype(_impl_.shift_){nullptr} - , decltype(_impl_.height_){nullptr} - , decltype(_impl_.automap_){nullptr} - , decltype(_impl_.lenshelp_){nullptr} - , decltype(_impl_.clothes_){nullptr} - , decltype(_impl_.default_action_){nullptr} - , decltype(_impl_.market_){nullptr} - , decltype(_impl_.changedtoexpire_){nullptr} - , decltype(_impl_.cyclopediaitem_){nullptr} - , decltype(_impl_.upgradeclassification_){nullptr} - , decltype(_impl_.clip_){false} - , decltype(_impl_.bottom_){false} - , decltype(_impl_.top_){false} - , decltype(_impl_.container_){false} - , decltype(_impl_.cumulative_){false} - , decltype(_impl_.usable_){false} - , decltype(_impl_.forceuse_){false} - , decltype(_impl_.multiuse_){false} - , decltype(_impl_.liquidpool_){false} - , decltype(_impl_.unpass_){false} - , decltype(_impl_.unmove_){false} - , decltype(_impl_.unsight_){false} - , decltype(_impl_.avoid_){false} - , decltype(_impl_.no_movement_animation_){false} - , decltype(_impl_.take_){false} - , decltype(_impl_.liquidcontainer_){false} - , decltype(_impl_.hang_){false} - , decltype(_impl_.rotate_){false} - , decltype(_impl_.dont_hide_){false} - , decltype(_impl_.translucent_){false} - , decltype(_impl_.lying_object_){false} - , decltype(_impl_.animate_always_){false} - , decltype(_impl_.fullbank_){false} - , decltype(_impl_.ignore_look_){false} - , decltype(_impl_.wrap_){false} - , decltype(_impl_.unwrap_){false} - , decltype(_impl_.topeffect_){false} - , decltype(_impl_.corpse_){false} - , decltype(_impl_.player_corpse_){false} - , decltype(_impl_.ammo_){false} - , decltype(_impl_.show_off_socket_){false} - , decltype(_impl_.reportable_){false} - , decltype(_impl_.reverse_addons_east_){false} - , decltype(_impl_.reverse_addons_west_){false} - , decltype(_impl_.reverse_addons_south_){false} - , decltype(_impl_.reverse_addons_north_){false} - , decltype(_impl_.wearout_){false} - , decltype(_impl_.clockexpire_){false} - , decltype(_impl_.expire_){false} - , decltype(_impl_.expirestop_){false} - , decltype(_impl_.wrapkit_){false} - }; -} - -AppearanceFlags::~AppearanceFlags() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.AppearanceFlags) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppearanceFlags::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.npcsaledata_.~RepeatedPtrField(); - if (this != internal_default_instance()) delete _impl_.bank_; - if (this != internal_default_instance()) delete _impl_.write_; - if (this != internal_default_instance()) delete _impl_.write_once_; - if (this != internal_default_instance()) delete _impl_.hook_; - if (this != internal_default_instance()) delete _impl_.light_; - if (this != internal_default_instance()) delete _impl_.shift_; - if (this != internal_default_instance()) delete _impl_.height_; - if (this != internal_default_instance()) delete _impl_.automap_; - if (this != internal_default_instance()) delete _impl_.lenshelp_; - if (this != internal_default_instance()) delete _impl_.clothes_; - if (this != internal_default_instance()) delete _impl_.default_action_; - if (this != internal_default_instance()) delete _impl_.market_; - if (this != internal_default_instance()) delete _impl_.changedtoexpire_; - if (this != internal_default_instance()) delete _impl_.cyclopediaitem_; - if (this != internal_default_instance()) delete _impl_.upgradeclassification_; -} - -void AppearanceFlags::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppearanceFlags::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.AppearanceFlags) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.npcsaledata_.Clear(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x000000ffu) { - if (cached_has_bits & 0x00000001u) { - GOOGLE_DCHECK(_impl_.bank_ != nullptr); - _impl_.bank_->Clear(); - } - if (cached_has_bits & 0x00000002u) { - GOOGLE_DCHECK(_impl_.write_ != nullptr); - _impl_.write_->Clear(); - } - if (cached_has_bits & 0x00000004u) { - GOOGLE_DCHECK(_impl_.write_once_ != nullptr); - _impl_.write_once_->Clear(); - } - if (cached_has_bits & 0x00000008u) { - GOOGLE_DCHECK(_impl_.hook_ != nullptr); - _impl_.hook_->Clear(); - } - if (cached_has_bits & 0x00000010u) { - GOOGLE_DCHECK(_impl_.light_ != nullptr); - _impl_.light_->Clear(); - } - if (cached_has_bits & 0x00000020u) { - GOOGLE_DCHECK(_impl_.shift_ != nullptr); - _impl_.shift_->Clear(); - } - if (cached_has_bits & 0x00000040u) { - GOOGLE_DCHECK(_impl_.height_ != nullptr); - _impl_.height_->Clear(); - } - if (cached_has_bits & 0x00000080u) { - GOOGLE_DCHECK(_impl_.automap_ != nullptr); - _impl_.automap_->Clear(); - } - } - if (cached_has_bits & 0x00007f00u) { - if (cached_has_bits & 0x00000100u) { - GOOGLE_DCHECK(_impl_.lenshelp_ != nullptr); - _impl_.lenshelp_->Clear(); - } - if (cached_has_bits & 0x00000200u) { - GOOGLE_DCHECK(_impl_.clothes_ != nullptr); - _impl_.clothes_->Clear(); - } - if (cached_has_bits & 0x00000400u) { - GOOGLE_DCHECK(_impl_.default_action_ != nullptr); - _impl_.default_action_->Clear(); - } - if (cached_has_bits & 0x00000800u) { - GOOGLE_DCHECK(_impl_.market_ != nullptr); - _impl_.market_->Clear(); - } - if (cached_has_bits & 0x00001000u) { - GOOGLE_DCHECK(_impl_.changedtoexpire_ != nullptr); - _impl_.changedtoexpire_->Clear(); - } - if (cached_has_bits & 0x00002000u) { - GOOGLE_DCHECK(_impl_.cyclopediaitem_ != nullptr); - _impl_.cyclopediaitem_->Clear(); - } - if (cached_has_bits & 0x00004000u) { - GOOGLE_DCHECK(_impl_.upgradeclassification_ != nullptr); - _impl_.upgradeclassification_->Clear(); - } - } - _impl_.clip_ = false; - if (cached_has_bits & 0x00ff0000u) { - ::memset(&_impl_.bottom_, 0, static_cast( - reinterpret_cast(&_impl_.liquidpool_) - - reinterpret_cast(&_impl_.bottom_)) + sizeof(_impl_.liquidpool_)); - } - if (cached_has_bits & 0xff000000u) { - ::memset(&_impl_.unpass_, 0, static_cast( - reinterpret_cast(&_impl_.hang_) - - reinterpret_cast(&_impl_.unpass_)) + sizeof(_impl_.hang_)); - } - cached_has_bits = _impl_._has_bits_[1]; - if (cached_has_bits & 0x000000ffu) { - ::memset(&_impl_.rotate_, 0, static_cast( - reinterpret_cast(&_impl_.wrap_) - - reinterpret_cast(&_impl_.rotate_)) + sizeof(_impl_.wrap_)); - } - if (cached_has_bits & 0x0000ff00u) { - ::memset(&_impl_.unwrap_, 0, static_cast( - reinterpret_cast(&_impl_.reverse_addons_east_) - - reinterpret_cast(&_impl_.unwrap_)) + sizeof(_impl_.reverse_addons_east_)); - } - if (cached_has_bits & 0x00ff0000u) { - ::memset(&_impl_.reverse_addons_west_, 0, static_cast( - reinterpret_cast(&_impl_.wrapkit_) - - reinterpret_cast(&_impl_.reverse_addons_west_)) + sizeof(_impl_.wrapkit_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppearanceFlags::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional .Canary.protobuf.appearances.AppearanceFlagBank bank = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_bank(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool clip = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _Internal::set_has_clip(&_impl_._has_bits_); - _impl_.clip_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool bottom = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _Internal::set_has_bottom(&_impl_._has_bits_); - _impl_.bottom_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool top = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _Internal::set_has_top(&_impl_._has_bits_); - _impl_.top_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool container = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _Internal::set_has_container(&_impl_._has_bits_); - _impl_.container_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool cumulative = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { - _Internal::set_has_cumulative(&_impl_._has_bits_); - _impl_.cumulative_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool usable = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { - _Internal::set_has_usable(&_impl_._has_bits_); - _impl_.usable_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool forceuse = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { - _Internal::set_has_forceuse(&_impl_._has_bits_); - _impl_.forceuse_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool multiuse = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { - _Internal::set_has_multiuse(&_impl_._has_bits_); - _impl_.multiuse_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.AppearanceFlagWrite write = 10; - case 10: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { - ptr = ctx->ParseMessage(_internal_mutable_write(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.AppearanceFlagWriteOnce write_once = 11; - case 11: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 90)) { - ptr = ctx->ParseMessage(_internal_mutable_write_once(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool liquidpool = 12; - case 12: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 96)) { - _Internal::set_has_liquidpool(&_impl_._has_bits_); - _impl_.liquidpool_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool unpass = 13; - case 13: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 104)) { - _Internal::set_has_unpass(&_impl_._has_bits_); - _impl_.unpass_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool unmove = 14; - case 14: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 112)) { - _Internal::set_has_unmove(&_impl_._has_bits_); - _impl_.unmove_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool unsight = 15; - case 15: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 120)) { - _Internal::set_has_unsight(&_impl_._has_bits_); - _impl_.unsight_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool avoid = 16; - case 16: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 128)) { - _Internal::set_has_avoid(&_impl_._has_bits_); - _impl_.avoid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool no_movement_animation = 17; - case 17: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 136)) { - _Internal::set_has_no_movement_animation(&_impl_._has_bits_); - _impl_.no_movement_animation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool take = 18; - case 18: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 144)) { - _Internal::set_has_take(&_impl_._has_bits_); - _impl_.take_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool liquidcontainer = 19; - case 19: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 152)) { - _Internal::set_has_liquidcontainer(&_impl_._has_bits_); - _impl_.liquidcontainer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool hang = 20; - case 20: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 160)) { - _Internal::set_has_hang(&_impl_._has_bits_); - _impl_.hang_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.AppearanceFlagHook hook = 21; - case 21: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 170)) { - ptr = ctx->ParseMessage(_internal_mutable_hook(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool rotate = 22; - case 22: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 176)) { - _Internal::set_has_rotate(&_impl_._has_bits_); - _impl_.rotate_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.AppearanceFlagLight light = 23; - case 23: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 186)) { - ptr = ctx->ParseMessage(_internal_mutable_light(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool dont_hide = 24; - case 24: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 192)) { - _Internal::set_has_dont_hide(&_impl_._has_bits_); - _impl_.dont_hide_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool translucent = 25; - case 25: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 200)) { - _Internal::set_has_translucent(&_impl_._has_bits_); - _impl_.translucent_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.AppearanceFlagShift shift = 26; - case 26: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 210)) { - ptr = ctx->ParseMessage(_internal_mutable_shift(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.AppearanceFlagHeight height = 27; - case 27: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 218)) { - ptr = ctx->ParseMessage(_internal_mutable_height(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool lying_object = 28; - case 28: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 224)) { - _Internal::set_has_lying_object(&_impl_._has_bits_); - _impl_.lying_object_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool animate_always = 29; - case 29: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 232)) { - _Internal::set_has_animate_always(&_impl_._has_bits_); - _impl_.animate_always_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.AppearanceFlagAutomap automap = 30; - case 30: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 242)) { - ptr = ctx->ParseMessage(_internal_mutable_automap(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.AppearanceFlagLenshelp lenshelp = 31; - case 31: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 250)) { - ptr = ctx->ParseMessage(_internal_mutable_lenshelp(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool fullbank = 32; - case 32: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 0)) { - _Internal::set_has_fullbank(&_impl_._has_bits_); - _impl_.fullbank_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool ignore_look = 33; - case 33: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_ignore_look(&_impl_._has_bits_); - _impl_.ignore_look_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.AppearanceFlagClothes clothes = 34; - case 34: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_clothes(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.AppearanceFlagDefaultAction default_action = 35; - case 35: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_default_action(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.AppearanceFlagMarket market = 36; - case 36: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr = ctx->ParseMessage(_internal_mutable_market(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool wrap = 37; - case 37: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _Internal::set_has_wrap(&_impl_._has_bits_); - _impl_.wrap_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool unwrap = 38; - case 38: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { - _Internal::set_has_unwrap(&_impl_._has_bits_); - _impl_.unwrap_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool topeffect = 39; - case 39: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { - _Internal::set_has_topeffect(&_impl_._has_bits_); - _impl_.topeffect_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated .Canary.protobuf.appearances.AppearanceFlagNPC npcsaledata = 40; - case 40: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { - ptr -= 2; - do { - ptr += 2; - ptr = ctx->ParseMessage(_internal_add_npcsaledata(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<322>(ptr)); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.AppearanceFlagChangedToExpire changedtoexpire = 41; - case 41: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { - ptr = ctx->ParseMessage(_internal_mutable_changedtoexpire(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool corpse = 42; - case 42: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 80)) { - _Internal::set_has_corpse(&_impl_._has_bits_); - _impl_.corpse_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool player_corpse = 43; - case 43: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 88)) { - _Internal::set_has_player_corpse(&_impl_._has_bits_); - _impl_.player_corpse_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.AppearanceFlagCyclopedia cyclopediaitem = 44; - case 44: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 98)) { - ptr = ctx->ParseMessage(_internal_mutable_cyclopediaitem(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool ammo = 45; - case 45: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 104)) { - _Internal::set_has_ammo(&_impl_._has_bits_); - _impl_.ammo_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool show_off_socket = 46; - case 46: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 112)) { - _Internal::set_has_show_off_socket(&_impl_._has_bits_); - _impl_.show_off_socket_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool reportable = 47; - case 47: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 120)) { - _Internal::set_has_reportable(&_impl_._has_bits_); - _impl_.reportable_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .Canary.protobuf.appearances.AppearanceFlagUpgradeClassification upgradeclassification = 48; - case 48: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 130)) { - ptr = ctx->ParseMessage(_internal_mutable_upgradeclassification(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool reverse_addons_east = 49; - case 49: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 136)) { - _Internal::set_has_reverse_addons_east(&_impl_._has_bits_); - _impl_.reverse_addons_east_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool reverse_addons_west = 50; - case 50: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 144)) { - _Internal::set_has_reverse_addons_west(&_impl_._has_bits_); - _impl_.reverse_addons_west_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool reverse_addons_south = 51; - case 51: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 152)) { - _Internal::set_has_reverse_addons_south(&_impl_._has_bits_); - _impl_.reverse_addons_south_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool reverse_addons_north = 52; - case 52: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 160)) { - _Internal::set_has_reverse_addons_north(&_impl_._has_bits_); - _impl_.reverse_addons_north_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool wearout = 53; - case 53: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 168)) { - _Internal::set_has_wearout(&_impl_._has_bits_); - _impl_.wearout_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool clockexpire = 54; - case 54: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 176)) { - _Internal::set_has_clockexpire(&_impl_._has_bits_); - _impl_.clockexpire_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool expire = 55; - case 55: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 184)) { - _Internal::set_has_expire(&_impl_._has_bits_); - _impl_.expire_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool expirestop = 56; - case 56: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 192)) { - _Internal::set_has_expirestop(&_impl_._has_bits_); - _impl_.expirestop_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool wrapkit = 57; - case 57: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 200)) { - _Internal::set_has_wrapkit(&_impl_._has_bits_); - _impl_.wrapkit_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppearanceFlags::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.AppearanceFlags) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional .Canary.protobuf.appearances.AppearanceFlagBank bank = 1; - if (cached_has_bits & 0x00000001u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::bank(this), - _Internal::bank(this).GetCachedSize(), target, stream); - } - - // optional bool clip = 2; - if (cached_has_bits & 0x00008000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_clip(), target); - } - - // optional bool bottom = 3; - if (cached_has_bits & 0x00010000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_bottom(), target); - } - - // optional bool top = 4; - if (cached_has_bits & 0x00020000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_top(), target); - } - - // optional bool container = 5; - if (cached_has_bits & 0x00040000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_container(), target); - } - - // optional bool cumulative = 6; - if (cached_has_bits & 0x00080000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_cumulative(), target); - } - - // optional bool usable = 7; - if (cached_has_bits & 0x00100000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_usable(), target); - } - - // optional bool forceuse = 8; - if (cached_has_bits & 0x00200000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_forceuse(), target); - } - - // optional bool multiuse = 9; - if (cached_has_bits & 0x00400000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_multiuse(), target); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagWrite write = 10; - if (cached_has_bits & 0x00000002u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(10, _Internal::write(this), - _Internal::write(this).GetCachedSize(), target, stream); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagWriteOnce write_once = 11; - if (cached_has_bits & 0x00000004u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(11, _Internal::write_once(this), - _Internal::write_once(this).GetCachedSize(), target, stream); - } - - // optional bool liquidpool = 12; - if (cached_has_bits & 0x00800000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(12, this->_internal_liquidpool(), target); - } - - // optional bool unpass = 13; - if (cached_has_bits & 0x01000000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(13, this->_internal_unpass(), target); - } - - // optional bool unmove = 14; - if (cached_has_bits & 0x02000000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(14, this->_internal_unmove(), target); - } - - // optional bool unsight = 15; - if (cached_has_bits & 0x04000000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(15, this->_internal_unsight(), target); - } - - // optional bool avoid = 16; - if (cached_has_bits & 0x08000000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(16, this->_internal_avoid(), target); - } - - // optional bool no_movement_animation = 17; - if (cached_has_bits & 0x10000000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(17, this->_internal_no_movement_animation(), target); - } - - // optional bool take = 18; - if (cached_has_bits & 0x20000000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(18, this->_internal_take(), target); - } - - // optional bool liquidcontainer = 19; - if (cached_has_bits & 0x40000000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(19, this->_internal_liquidcontainer(), target); - } - - // optional bool hang = 20; - if (cached_has_bits & 0x80000000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(20, this->_internal_hang(), target); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagHook hook = 21; - if (cached_has_bits & 0x00000008u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(21, _Internal::hook(this), - _Internal::hook(this).GetCachedSize(), target, stream); - } - - cached_has_bits = _impl_._has_bits_[1]; - // optional bool rotate = 22; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(22, this->_internal_rotate(), target); - } - - cached_has_bits = _impl_._has_bits_[0]; - // optional .Canary.protobuf.appearances.AppearanceFlagLight light = 23; - if (cached_has_bits & 0x00000010u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(23, _Internal::light(this), - _Internal::light(this).GetCachedSize(), target, stream); - } - - cached_has_bits = _impl_._has_bits_[1]; - // optional bool dont_hide = 24; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(24, this->_internal_dont_hide(), target); - } - - // optional bool translucent = 25; - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(25, this->_internal_translucent(), target); - } - - cached_has_bits = _impl_._has_bits_[0]; - // optional .Canary.protobuf.appearances.AppearanceFlagShift shift = 26; - if (cached_has_bits & 0x00000020u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(26, _Internal::shift(this), - _Internal::shift(this).GetCachedSize(), target, stream); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagHeight height = 27; - if (cached_has_bits & 0x00000040u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(27, _Internal::height(this), - _Internal::height(this).GetCachedSize(), target, stream); - } - - cached_has_bits = _impl_._has_bits_[1]; - // optional bool lying_object = 28; - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(28, this->_internal_lying_object(), target); - } - - // optional bool animate_always = 29; - if (cached_has_bits & 0x00000010u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(29, this->_internal_animate_always(), target); - } - - cached_has_bits = _impl_._has_bits_[0]; - // optional .Canary.protobuf.appearances.AppearanceFlagAutomap automap = 30; - if (cached_has_bits & 0x00000080u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(30, _Internal::automap(this), - _Internal::automap(this).GetCachedSize(), target, stream); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagLenshelp lenshelp = 31; - if (cached_has_bits & 0x00000100u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(31, _Internal::lenshelp(this), - _Internal::lenshelp(this).GetCachedSize(), target, stream); - } - - cached_has_bits = _impl_._has_bits_[1]; - // optional bool fullbank = 32; - if (cached_has_bits & 0x00000020u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(32, this->_internal_fullbank(), target); - } - - // optional bool ignore_look = 33; - if (cached_has_bits & 0x00000040u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(33, this->_internal_ignore_look(), target); - } - - cached_has_bits = _impl_._has_bits_[0]; - // optional .Canary.protobuf.appearances.AppearanceFlagClothes clothes = 34; - if (cached_has_bits & 0x00000200u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(34, _Internal::clothes(this), - _Internal::clothes(this).GetCachedSize(), target, stream); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagDefaultAction default_action = 35; - if (cached_has_bits & 0x00000400u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(35, _Internal::default_action(this), - _Internal::default_action(this).GetCachedSize(), target, stream); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagMarket market = 36; - if (cached_has_bits & 0x00000800u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(36, _Internal::market(this), - _Internal::market(this).GetCachedSize(), target, stream); - } - - cached_has_bits = _impl_._has_bits_[1]; - // optional bool wrap = 37; - if (cached_has_bits & 0x00000080u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(37, this->_internal_wrap(), target); - } - - // optional bool unwrap = 38; - if (cached_has_bits & 0x00000100u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(38, this->_internal_unwrap(), target); - } - - // optional bool topeffect = 39; - if (cached_has_bits & 0x00000200u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(39, this->_internal_topeffect(), target); - } - - // repeated .Canary.protobuf.appearances.AppearanceFlagNPC npcsaledata = 40; - for (unsigned i = 0, - n = static_cast(this->_internal_npcsaledata_size()); i < n; i++) { - const auto& repfield = this->_internal_npcsaledata(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(40, repfield, repfield.GetCachedSize(), target, stream); - } - - cached_has_bits = _impl_._has_bits_[0]; - // optional .Canary.protobuf.appearances.AppearanceFlagChangedToExpire changedtoexpire = 41; - if (cached_has_bits & 0x00001000u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(41, _Internal::changedtoexpire(this), - _Internal::changedtoexpire(this).GetCachedSize(), target, stream); - } - - cached_has_bits = _impl_._has_bits_[1]; - // optional bool corpse = 42; - if (cached_has_bits & 0x00000400u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(42, this->_internal_corpse(), target); - } - - // optional bool player_corpse = 43; - if (cached_has_bits & 0x00000800u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(43, this->_internal_player_corpse(), target); - } - - cached_has_bits = _impl_._has_bits_[0]; - // optional .Canary.protobuf.appearances.AppearanceFlagCyclopedia cyclopediaitem = 44; - if (cached_has_bits & 0x00002000u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(44, _Internal::cyclopediaitem(this), - _Internal::cyclopediaitem(this).GetCachedSize(), target, stream); - } - - cached_has_bits = _impl_._has_bits_[1]; - // optional bool ammo = 45; - if (cached_has_bits & 0x00001000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(45, this->_internal_ammo(), target); - } - - // optional bool show_off_socket = 46; - if (cached_has_bits & 0x00002000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(46, this->_internal_show_off_socket(), target); - } - - // optional bool reportable = 47; - if (cached_has_bits & 0x00004000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(47, this->_internal_reportable(), target); - } - - cached_has_bits = _impl_._has_bits_[0]; - // optional .Canary.protobuf.appearances.AppearanceFlagUpgradeClassification upgradeclassification = 48; - if (cached_has_bits & 0x00004000u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(48, _Internal::upgradeclassification(this), - _Internal::upgradeclassification(this).GetCachedSize(), target, stream); - } - - cached_has_bits = _impl_._has_bits_[1]; - // optional bool reverse_addons_east = 49; - if (cached_has_bits & 0x00008000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(49, this->_internal_reverse_addons_east(), target); - } - - // optional bool reverse_addons_west = 50; - if (cached_has_bits & 0x00010000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(50, this->_internal_reverse_addons_west(), target); - } - - // optional bool reverse_addons_south = 51; - if (cached_has_bits & 0x00020000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(51, this->_internal_reverse_addons_south(), target); - } - - // optional bool reverse_addons_north = 52; - if (cached_has_bits & 0x00040000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(52, this->_internal_reverse_addons_north(), target); - } - - // optional bool wearout = 53; - if (cached_has_bits & 0x00080000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(53, this->_internal_wearout(), target); - } - - // optional bool clockexpire = 54; - if (cached_has_bits & 0x00100000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(54, this->_internal_clockexpire(), target); - } - - // optional bool expire = 55; - if (cached_has_bits & 0x00200000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(55, this->_internal_expire(), target); - } - - // optional bool expirestop = 56; - if (cached_has_bits & 0x00400000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(56, this->_internal_expirestop(), target); - } - - // optional bool wrapkit = 57; - if (cached_has_bits & 0x00800000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(57, this->_internal_wrapkit(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.AppearanceFlags) - return target; -} - -size_t AppearanceFlags::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.AppearanceFlags) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .Canary.protobuf.appearances.AppearanceFlagNPC npcsaledata = 40; - total_size += 2UL * this->_internal_npcsaledata_size(); - for (const auto& msg : this->_impl_.npcsaledata_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x000000ffu) { - // optional .Canary.protobuf.appearances.AppearanceFlagBank bank = 1; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.bank_); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagWrite write = 10; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.write_); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagWriteOnce write_once = 11; - if (cached_has_bits & 0x00000004u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.write_once_); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagHook hook = 21; - if (cached_has_bits & 0x00000008u) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.hook_); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagLight light = 23; - if (cached_has_bits & 0x00000010u) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.light_); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagShift shift = 26; - if (cached_has_bits & 0x00000020u) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.shift_); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagHeight height = 27; - if (cached_has_bits & 0x00000040u) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.height_); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagAutomap automap = 30; - if (cached_has_bits & 0x00000080u) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.automap_); - } - - } - if (cached_has_bits & 0x0000ff00u) { - // optional .Canary.protobuf.appearances.AppearanceFlagLenshelp lenshelp = 31; - if (cached_has_bits & 0x00000100u) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.lenshelp_); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagClothes clothes = 34; - if (cached_has_bits & 0x00000200u) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.clothes_); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagDefaultAction default_action = 35; - if (cached_has_bits & 0x00000400u) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.default_action_); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagMarket market = 36; - if (cached_has_bits & 0x00000800u) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.market_); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagChangedToExpire changedtoexpire = 41; - if (cached_has_bits & 0x00001000u) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.changedtoexpire_); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagCyclopedia cyclopediaitem = 44; - if (cached_has_bits & 0x00002000u) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.cyclopediaitem_); - } - - // optional .Canary.protobuf.appearances.AppearanceFlagUpgradeClassification upgradeclassification = 48; - if (cached_has_bits & 0x00004000u) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.upgradeclassification_); - } - - // optional bool clip = 2; - if (cached_has_bits & 0x00008000u) { - total_size += 1 + 1; - } - - } - if (cached_has_bits & 0x00ff0000u) { - // optional bool bottom = 3; - if (cached_has_bits & 0x00010000u) { - total_size += 1 + 1; - } - - // optional bool top = 4; - if (cached_has_bits & 0x00020000u) { - total_size += 1 + 1; - } - - // optional bool container = 5; - if (cached_has_bits & 0x00040000u) { - total_size += 1 + 1; - } - - // optional bool cumulative = 6; - if (cached_has_bits & 0x00080000u) { - total_size += 1 + 1; - } - - // optional bool usable = 7; - if (cached_has_bits & 0x00100000u) { - total_size += 1 + 1; - } - - // optional bool forceuse = 8; - if (cached_has_bits & 0x00200000u) { - total_size += 1 + 1; - } - - // optional bool multiuse = 9; - if (cached_has_bits & 0x00400000u) { - total_size += 1 + 1; - } - - // optional bool liquidpool = 12; - if (cached_has_bits & 0x00800000u) { - total_size += 1 + 1; - } - - } - if (cached_has_bits & 0xff000000u) { - // optional bool unpass = 13; - if (cached_has_bits & 0x01000000u) { - total_size += 1 + 1; - } - - // optional bool unmove = 14; - if (cached_has_bits & 0x02000000u) { - total_size += 1 + 1; - } - - // optional bool unsight = 15; - if (cached_has_bits & 0x04000000u) { - total_size += 1 + 1; - } - - // optional bool avoid = 16; - if (cached_has_bits & 0x08000000u) { - total_size += 2 + 1; - } - - // optional bool no_movement_animation = 17; - if (cached_has_bits & 0x10000000u) { - total_size += 2 + 1; - } - - // optional bool take = 18; - if (cached_has_bits & 0x20000000u) { - total_size += 2 + 1; - } - - // optional bool liquidcontainer = 19; - if (cached_has_bits & 0x40000000u) { - total_size += 2 + 1; - } - - // optional bool hang = 20; - if (cached_has_bits & 0x80000000u) { - total_size += 2 + 1; - } - - } - cached_has_bits = _impl_._has_bits_[1]; - if (cached_has_bits & 0x000000ffu) { - // optional bool rotate = 22; - if (cached_has_bits & 0x00000001u) { - total_size += 2 + 1; - } - - // optional bool dont_hide = 24; - if (cached_has_bits & 0x00000002u) { - total_size += 2 + 1; - } - - // optional bool translucent = 25; - if (cached_has_bits & 0x00000004u) { - total_size += 2 + 1; - } - - // optional bool lying_object = 28; - if (cached_has_bits & 0x00000008u) { - total_size += 2 + 1; - } - - // optional bool animate_always = 29; - if (cached_has_bits & 0x00000010u) { - total_size += 2 + 1; - } - - // optional bool fullbank = 32; - if (cached_has_bits & 0x00000020u) { - total_size += 2 + 1; - } - - // optional bool ignore_look = 33; - if (cached_has_bits & 0x00000040u) { - total_size += 2 + 1; - } - - // optional bool wrap = 37; - if (cached_has_bits & 0x00000080u) { - total_size += 2 + 1; - } - - } - if (cached_has_bits & 0x0000ff00u) { - // optional bool unwrap = 38; - if (cached_has_bits & 0x00000100u) { - total_size += 2 + 1; - } - - // optional bool topeffect = 39; - if (cached_has_bits & 0x00000200u) { - total_size += 2 + 1; - } - - // optional bool corpse = 42; - if (cached_has_bits & 0x00000400u) { - total_size += 2 + 1; - } - - // optional bool player_corpse = 43; - if (cached_has_bits & 0x00000800u) { - total_size += 2 + 1; - } - - // optional bool ammo = 45; - if (cached_has_bits & 0x00001000u) { - total_size += 2 + 1; - } - - // optional bool show_off_socket = 46; - if (cached_has_bits & 0x00002000u) { - total_size += 2 + 1; - } - - // optional bool reportable = 47; - if (cached_has_bits & 0x00004000u) { - total_size += 2 + 1; - } - - // optional bool reverse_addons_east = 49; - if (cached_has_bits & 0x00008000u) { - total_size += 2 + 1; - } - - } - if (cached_has_bits & 0x00ff0000u) { - // optional bool reverse_addons_west = 50; - if (cached_has_bits & 0x00010000u) { - total_size += 2 + 1; - } - - // optional bool reverse_addons_south = 51; - if (cached_has_bits & 0x00020000u) { - total_size += 2 + 1; - } - - // optional bool reverse_addons_north = 52; - if (cached_has_bits & 0x00040000u) { - total_size += 2 + 1; - } - - // optional bool wearout = 53; - if (cached_has_bits & 0x00080000u) { - total_size += 2 + 1; - } - - // optional bool clockexpire = 54; - if (cached_has_bits & 0x00100000u) { - total_size += 2 + 1; - } - - // optional bool expire = 55; - if (cached_has_bits & 0x00200000u) { - total_size += 2 + 1; - } - - // optional bool expirestop = 56; - if (cached_has_bits & 0x00400000u) { - total_size += 2 + 1; - } - - // optional bool wrapkit = 57; - if (cached_has_bits & 0x00800000u) { - total_size += 2 + 1; - } - - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppearanceFlags::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppearanceFlags::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppearanceFlags::GetClassData() const { return &_class_data_; } - - -void AppearanceFlags::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.AppearanceFlags) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_impl_.npcsaledata_.MergeFrom(from._impl_.npcsaledata_); - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x000000ffu) { - if (cached_has_bits & 0x00000001u) { - _this->_internal_mutable_bank()->::Canary::protobuf::appearances::AppearanceFlagBank::MergeFrom( - from._internal_bank()); - } - if (cached_has_bits & 0x00000002u) { - _this->_internal_mutable_write()->::Canary::protobuf::appearances::AppearanceFlagWrite::MergeFrom( - from._internal_write()); - } - if (cached_has_bits & 0x00000004u) { - _this->_internal_mutable_write_once()->::Canary::protobuf::appearances::AppearanceFlagWriteOnce::MergeFrom( - from._internal_write_once()); - } - if (cached_has_bits & 0x00000008u) { - _this->_internal_mutable_hook()->::Canary::protobuf::appearances::AppearanceFlagHook::MergeFrom( - from._internal_hook()); - } - if (cached_has_bits & 0x00000010u) { - _this->_internal_mutable_light()->::Canary::protobuf::appearances::AppearanceFlagLight::MergeFrom( - from._internal_light()); - } - if (cached_has_bits & 0x00000020u) { - _this->_internal_mutable_shift()->::Canary::protobuf::appearances::AppearanceFlagShift::MergeFrom( - from._internal_shift()); - } - if (cached_has_bits & 0x00000040u) { - _this->_internal_mutable_height()->::Canary::protobuf::appearances::AppearanceFlagHeight::MergeFrom( - from._internal_height()); - } - if (cached_has_bits & 0x00000080u) { - _this->_internal_mutable_automap()->::Canary::protobuf::appearances::AppearanceFlagAutomap::MergeFrom( - from._internal_automap()); - } - } - if (cached_has_bits & 0x0000ff00u) { - if (cached_has_bits & 0x00000100u) { - _this->_internal_mutable_lenshelp()->::Canary::protobuf::appearances::AppearanceFlagLenshelp::MergeFrom( - from._internal_lenshelp()); - } - if (cached_has_bits & 0x00000200u) { - _this->_internal_mutable_clothes()->::Canary::protobuf::appearances::AppearanceFlagClothes::MergeFrom( - from._internal_clothes()); - } - if (cached_has_bits & 0x00000400u) { - _this->_internal_mutable_default_action()->::Canary::protobuf::appearances::AppearanceFlagDefaultAction::MergeFrom( - from._internal_default_action()); - } - if (cached_has_bits & 0x00000800u) { - _this->_internal_mutable_market()->::Canary::protobuf::appearances::AppearanceFlagMarket::MergeFrom( - from._internal_market()); - } - if (cached_has_bits & 0x00001000u) { - _this->_internal_mutable_changedtoexpire()->::Canary::protobuf::appearances::AppearanceFlagChangedToExpire::MergeFrom( - from._internal_changedtoexpire()); - } - if (cached_has_bits & 0x00002000u) { - _this->_internal_mutable_cyclopediaitem()->::Canary::protobuf::appearances::AppearanceFlagCyclopedia::MergeFrom( - from._internal_cyclopediaitem()); - } - if (cached_has_bits & 0x00004000u) { - _this->_internal_mutable_upgradeclassification()->::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification::MergeFrom( - from._internal_upgradeclassification()); - } - if (cached_has_bits & 0x00008000u) { - _this->_impl_.clip_ = from._impl_.clip_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - if (cached_has_bits & 0x00ff0000u) { - if (cached_has_bits & 0x00010000u) { - _this->_impl_.bottom_ = from._impl_.bottom_; - } - if (cached_has_bits & 0x00020000u) { - _this->_impl_.top_ = from._impl_.top_; - } - if (cached_has_bits & 0x00040000u) { - _this->_impl_.container_ = from._impl_.container_; - } - if (cached_has_bits & 0x00080000u) { - _this->_impl_.cumulative_ = from._impl_.cumulative_; - } - if (cached_has_bits & 0x00100000u) { - _this->_impl_.usable_ = from._impl_.usable_; - } - if (cached_has_bits & 0x00200000u) { - _this->_impl_.forceuse_ = from._impl_.forceuse_; - } - if (cached_has_bits & 0x00400000u) { - _this->_impl_.multiuse_ = from._impl_.multiuse_; - } - if (cached_has_bits & 0x00800000u) { - _this->_impl_.liquidpool_ = from._impl_.liquidpool_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - if (cached_has_bits & 0xff000000u) { - if (cached_has_bits & 0x01000000u) { - _this->_impl_.unpass_ = from._impl_.unpass_; - } - if (cached_has_bits & 0x02000000u) { - _this->_impl_.unmove_ = from._impl_.unmove_; - } - if (cached_has_bits & 0x04000000u) { - _this->_impl_.unsight_ = from._impl_.unsight_; - } - if (cached_has_bits & 0x08000000u) { - _this->_impl_.avoid_ = from._impl_.avoid_; - } - if (cached_has_bits & 0x10000000u) { - _this->_impl_.no_movement_animation_ = from._impl_.no_movement_animation_; - } - if (cached_has_bits & 0x20000000u) { - _this->_impl_.take_ = from._impl_.take_; - } - if (cached_has_bits & 0x40000000u) { - _this->_impl_.liquidcontainer_ = from._impl_.liquidcontainer_; - } - if (cached_has_bits & 0x80000000u) { - _this->_impl_.hang_ = from._impl_.hang_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - cached_has_bits = from._impl_._has_bits_[1]; - if (cached_has_bits & 0x000000ffu) { - if (cached_has_bits & 0x00000001u) { - _this->_impl_.rotate_ = from._impl_.rotate_; - } - if (cached_has_bits & 0x00000002u) { - _this->_impl_.dont_hide_ = from._impl_.dont_hide_; - } - if (cached_has_bits & 0x00000004u) { - _this->_impl_.translucent_ = from._impl_.translucent_; - } - if (cached_has_bits & 0x00000008u) { - _this->_impl_.lying_object_ = from._impl_.lying_object_; - } - if (cached_has_bits & 0x00000010u) { - _this->_impl_.animate_always_ = from._impl_.animate_always_; - } - if (cached_has_bits & 0x00000020u) { - _this->_impl_.fullbank_ = from._impl_.fullbank_; - } - if (cached_has_bits & 0x00000040u) { - _this->_impl_.ignore_look_ = from._impl_.ignore_look_; - } - if (cached_has_bits & 0x00000080u) { - _this->_impl_.wrap_ = from._impl_.wrap_; - } - _this->_impl_._has_bits_[1] |= cached_has_bits; - } - if (cached_has_bits & 0x0000ff00u) { - if (cached_has_bits & 0x00000100u) { - _this->_impl_.unwrap_ = from._impl_.unwrap_; - } - if (cached_has_bits & 0x00000200u) { - _this->_impl_.topeffect_ = from._impl_.topeffect_; - } - if (cached_has_bits & 0x00000400u) { - _this->_impl_.corpse_ = from._impl_.corpse_; - } - if (cached_has_bits & 0x00000800u) { - _this->_impl_.player_corpse_ = from._impl_.player_corpse_; - } - if (cached_has_bits & 0x00001000u) { - _this->_impl_.ammo_ = from._impl_.ammo_; - } - if (cached_has_bits & 0x00002000u) { - _this->_impl_.show_off_socket_ = from._impl_.show_off_socket_; - } - if (cached_has_bits & 0x00004000u) { - _this->_impl_.reportable_ = from._impl_.reportable_; - } - if (cached_has_bits & 0x00008000u) { - _this->_impl_.reverse_addons_east_ = from._impl_.reverse_addons_east_; - } - _this->_impl_._has_bits_[1] |= cached_has_bits; - } - if (cached_has_bits & 0x00ff0000u) { - if (cached_has_bits & 0x00010000u) { - _this->_impl_.reverse_addons_west_ = from._impl_.reverse_addons_west_; - } - if (cached_has_bits & 0x00020000u) { - _this->_impl_.reverse_addons_south_ = from._impl_.reverse_addons_south_; - } - if (cached_has_bits & 0x00040000u) { - _this->_impl_.reverse_addons_north_ = from._impl_.reverse_addons_north_; - } - if (cached_has_bits & 0x00080000u) { - _this->_impl_.wearout_ = from._impl_.wearout_; - } - if (cached_has_bits & 0x00100000u) { - _this->_impl_.clockexpire_ = from._impl_.clockexpire_; - } - if (cached_has_bits & 0x00200000u) { - _this->_impl_.expire_ = from._impl_.expire_; - } - if (cached_has_bits & 0x00400000u) { - _this->_impl_.expirestop_ = from._impl_.expirestop_; - } - if (cached_has_bits & 0x00800000u) { - _this->_impl_.wrapkit_ = from._impl_.wrapkit_; - } - _this->_impl_._has_bits_[1] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppearanceFlags::CopyFrom(const AppearanceFlags& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.AppearanceFlags) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppearanceFlags::IsInitialized() const { - return true; -} - -void AppearanceFlags::InternalSwap(AppearanceFlags* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_._has_bits_[1], other->_impl_._has_bits_[1]); - _impl_.npcsaledata_.InternalSwap(&other->_impl_.npcsaledata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(AppearanceFlags, _impl_.wrapkit_) - + sizeof(AppearanceFlags::_impl_.wrapkit_) - - PROTOBUF_FIELD_OFFSET(AppearanceFlags, _impl_.bank_)>( - reinterpret_cast(&_impl_.bank_), - reinterpret_cast(&other->_impl_.bank_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppearanceFlags::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[8]); -} - -// =================================================================== - -class AppearanceFlagUpgradeClassification::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_upgrade_classification(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } -}; - -AppearanceFlagUpgradeClassification::AppearanceFlagUpgradeClassification(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.AppearanceFlagUpgradeClassification) -} -AppearanceFlagUpgradeClassification::AppearanceFlagUpgradeClassification(const AppearanceFlagUpgradeClassification& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppearanceFlagUpgradeClassification* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.upgrade_classification_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.upgrade_classification_ = from._impl_.upgrade_classification_; - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.AppearanceFlagUpgradeClassification) -} - -inline void AppearanceFlagUpgradeClassification::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.upgrade_classification_){0u} - }; -} - -AppearanceFlagUpgradeClassification::~AppearanceFlagUpgradeClassification() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.AppearanceFlagUpgradeClassification) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppearanceFlagUpgradeClassification::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void AppearanceFlagUpgradeClassification::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppearanceFlagUpgradeClassification::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.AppearanceFlagUpgradeClassification) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.upgrade_classification_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppearanceFlagUpgradeClassification::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 upgrade_classification = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_upgrade_classification(&has_bits); - _impl_.upgrade_classification_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppearanceFlagUpgradeClassification::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.AppearanceFlagUpgradeClassification) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 upgrade_classification = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_upgrade_classification(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.AppearanceFlagUpgradeClassification) - return target; -} - -size_t AppearanceFlagUpgradeClassification::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.AppearanceFlagUpgradeClassification) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // optional uint32 upgrade_classification = 1; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_upgrade_classification()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppearanceFlagUpgradeClassification::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppearanceFlagUpgradeClassification::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppearanceFlagUpgradeClassification::GetClassData() const { return &_class_data_; } - - -void AppearanceFlagUpgradeClassification::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.AppearanceFlagUpgradeClassification) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_upgrade_classification()) { - _this->_internal_set_upgrade_classification(from._internal_upgrade_classification()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppearanceFlagUpgradeClassification::CopyFrom(const AppearanceFlagUpgradeClassification& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.AppearanceFlagUpgradeClassification) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppearanceFlagUpgradeClassification::IsInitialized() const { - return true; -} - -void AppearanceFlagUpgradeClassification::InternalSwap(AppearanceFlagUpgradeClassification* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.upgrade_classification_, other->_impl_.upgrade_classification_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppearanceFlagUpgradeClassification::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[9]); -} - -// =================================================================== - -class AppearanceFlagBank::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_waypoints(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } -}; - -AppearanceFlagBank::AppearanceFlagBank(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.AppearanceFlagBank) -} -AppearanceFlagBank::AppearanceFlagBank(const AppearanceFlagBank& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppearanceFlagBank* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.waypoints_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.waypoints_ = from._impl_.waypoints_; - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.AppearanceFlagBank) -} - -inline void AppearanceFlagBank::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.waypoints_){0u} - }; -} - -AppearanceFlagBank::~AppearanceFlagBank() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.AppearanceFlagBank) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppearanceFlagBank::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void AppearanceFlagBank::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppearanceFlagBank::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.AppearanceFlagBank) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.waypoints_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppearanceFlagBank::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 waypoints = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_waypoints(&has_bits); - _impl_.waypoints_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppearanceFlagBank::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.AppearanceFlagBank) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 waypoints = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_waypoints(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.AppearanceFlagBank) - return target; -} - -size_t AppearanceFlagBank::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.AppearanceFlagBank) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // optional uint32 waypoints = 1; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_waypoints()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppearanceFlagBank::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppearanceFlagBank::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppearanceFlagBank::GetClassData() const { return &_class_data_; } - - -void AppearanceFlagBank::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.AppearanceFlagBank) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_waypoints()) { - _this->_internal_set_waypoints(from._internal_waypoints()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppearanceFlagBank::CopyFrom(const AppearanceFlagBank& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.AppearanceFlagBank) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppearanceFlagBank::IsInitialized() const { - return true; -} - -void AppearanceFlagBank::InternalSwap(AppearanceFlagBank* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.waypoints_, other->_impl_.waypoints_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppearanceFlagBank::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[10]); -} - -// =================================================================== - -class AppearanceFlagWrite::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_max_text_length(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } -}; - -AppearanceFlagWrite::AppearanceFlagWrite(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.AppearanceFlagWrite) -} -AppearanceFlagWrite::AppearanceFlagWrite(const AppearanceFlagWrite& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppearanceFlagWrite* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.max_text_length_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.max_text_length_ = from._impl_.max_text_length_; - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.AppearanceFlagWrite) -} - -inline void AppearanceFlagWrite::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.max_text_length_){0u} - }; -} - -AppearanceFlagWrite::~AppearanceFlagWrite() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.AppearanceFlagWrite) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppearanceFlagWrite::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void AppearanceFlagWrite::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppearanceFlagWrite::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.AppearanceFlagWrite) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.max_text_length_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppearanceFlagWrite::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 max_text_length = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_max_text_length(&has_bits); - _impl_.max_text_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppearanceFlagWrite::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.AppearanceFlagWrite) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 max_text_length = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_max_text_length(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.AppearanceFlagWrite) - return target; -} - -size_t AppearanceFlagWrite::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.AppearanceFlagWrite) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // optional uint32 max_text_length = 1; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_max_text_length()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppearanceFlagWrite::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppearanceFlagWrite::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppearanceFlagWrite::GetClassData() const { return &_class_data_; } - - -void AppearanceFlagWrite::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.AppearanceFlagWrite) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_max_text_length()) { - _this->_internal_set_max_text_length(from._internal_max_text_length()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppearanceFlagWrite::CopyFrom(const AppearanceFlagWrite& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.AppearanceFlagWrite) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppearanceFlagWrite::IsInitialized() const { - return true; -} - -void AppearanceFlagWrite::InternalSwap(AppearanceFlagWrite* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.max_text_length_, other->_impl_.max_text_length_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppearanceFlagWrite::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[11]); -} - -// =================================================================== - -class AppearanceFlagWriteOnce::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_max_text_length_once(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } -}; - -AppearanceFlagWriteOnce::AppearanceFlagWriteOnce(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.AppearanceFlagWriteOnce) -} -AppearanceFlagWriteOnce::AppearanceFlagWriteOnce(const AppearanceFlagWriteOnce& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppearanceFlagWriteOnce* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.max_text_length_once_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.max_text_length_once_ = from._impl_.max_text_length_once_; - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.AppearanceFlagWriteOnce) -} - -inline void AppearanceFlagWriteOnce::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.max_text_length_once_){0u} - }; -} - -AppearanceFlagWriteOnce::~AppearanceFlagWriteOnce() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.AppearanceFlagWriteOnce) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppearanceFlagWriteOnce::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void AppearanceFlagWriteOnce::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppearanceFlagWriteOnce::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.AppearanceFlagWriteOnce) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.max_text_length_once_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppearanceFlagWriteOnce::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 max_text_length_once = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_max_text_length_once(&has_bits); - _impl_.max_text_length_once_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppearanceFlagWriteOnce::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.AppearanceFlagWriteOnce) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 max_text_length_once = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_max_text_length_once(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.AppearanceFlagWriteOnce) - return target; -} - -size_t AppearanceFlagWriteOnce::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.AppearanceFlagWriteOnce) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // optional uint32 max_text_length_once = 1; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_max_text_length_once()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppearanceFlagWriteOnce::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppearanceFlagWriteOnce::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppearanceFlagWriteOnce::GetClassData() const { return &_class_data_; } - - -void AppearanceFlagWriteOnce::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.AppearanceFlagWriteOnce) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_max_text_length_once()) { - _this->_internal_set_max_text_length_once(from._internal_max_text_length_once()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppearanceFlagWriteOnce::CopyFrom(const AppearanceFlagWriteOnce& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.AppearanceFlagWriteOnce) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppearanceFlagWriteOnce::IsInitialized() const { - return true; -} - -void AppearanceFlagWriteOnce::InternalSwap(AppearanceFlagWriteOnce* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.max_text_length_once_, other->_impl_.max_text_length_once_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppearanceFlagWriteOnce::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[12]); -} - -// =================================================================== - -class AppearanceFlagLight::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_brightness(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_color(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } -}; - -AppearanceFlagLight::AppearanceFlagLight(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.AppearanceFlagLight) -} -AppearanceFlagLight::AppearanceFlagLight(const AppearanceFlagLight& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppearanceFlagLight* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.brightness_){} - , decltype(_impl_.color_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.brightness_, &from._impl_.brightness_, - static_cast(reinterpret_cast(&_impl_.color_) - - reinterpret_cast(&_impl_.brightness_)) + sizeof(_impl_.color_)); - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.AppearanceFlagLight) -} - -inline void AppearanceFlagLight::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.brightness_){0u} - , decltype(_impl_.color_){0u} - }; -} - -AppearanceFlagLight::~AppearanceFlagLight() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.AppearanceFlagLight) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppearanceFlagLight::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void AppearanceFlagLight::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppearanceFlagLight::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.AppearanceFlagLight) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - ::memset(&_impl_.brightness_, 0, static_cast( - reinterpret_cast(&_impl_.color_) - - reinterpret_cast(&_impl_.brightness_)) + sizeof(_impl_.color_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppearanceFlagLight::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 brightness = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_brightness(&has_bits); - _impl_.brightness_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 color = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _Internal::set_has_color(&has_bits); - _impl_.color_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppearanceFlagLight::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.AppearanceFlagLight) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 brightness = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_brightness(), target); - } - - // optional uint32 color = 2; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_color(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.AppearanceFlagLight) - return target; -} - -size_t AppearanceFlagLight::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.AppearanceFlagLight) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional uint32 brightness = 1; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_brightness()); - } - - // optional uint32 color = 2; - if (cached_has_bits & 0x00000002u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_color()); - } - - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppearanceFlagLight::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppearanceFlagLight::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppearanceFlagLight::GetClassData() const { return &_class_data_; } - - -void AppearanceFlagLight::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.AppearanceFlagLight) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - if (cached_has_bits & 0x00000001u) { - _this->_impl_.brightness_ = from._impl_.brightness_; - } - if (cached_has_bits & 0x00000002u) { - _this->_impl_.color_ = from._impl_.color_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppearanceFlagLight::CopyFrom(const AppearanceFlagLight& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.AppearanceFlagLight) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppearanceFlagLight::IsInitialized() const { - return true; -} - -void AppearanceFlagLight::InternalSwap(AppearanceFlagLight* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(AppearanceFlagLight, _impl_.color_) - + sizeof(AppearanceFlagLight::_impl_.color_) - - PROTOBUF_FIELD_OFFSET(AppearanceFlagLight, _impl_.brightness_)>( - reinterpret_cast(&_impl_.brightness_), - reinterpret_cast(&other->_impl_.brightness_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppearanceFlagLight::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[13]); -} - -// =================================================================== - -class AppearanceFlagHeight::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_elevation(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } -}; - -AppearanceFlagHeight::AppearanceFlagHeight(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.AppearanceFlagHeight) -} -AppearanceFlagHeight::AppearanceFlagHeight(const AppearanceFlagHeight& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppearanceFlagHeight* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.elevation_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.elevation_ = from._impl_.elevation_; - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.AppearanceFlagHeight) -} - -inline void AppearanceFlagHeight::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.elevation_){0u} - }; -} - -AppearanceFlagHeight::~AppearanceFlagHeight() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.AppearanceFlagHeight) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppearanceFlagHeight::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void AppearanceFlagHeight::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppearanceFlagHeight::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.AppearanceFlagHeight) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.elevation_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppearanceFlagHeight::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 elevation = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_elevation(&has_bits); - _impl_.elevation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppearanceFlagHeight::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.AppearanceFlagHeight) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 elevation = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_elevation(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.AppearanceFlagHeight) - return target; -} - -size_t AppearanceFlagHeight::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.AppearanceFlagHeight) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // optional uint32 elevation = 1; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_elevation()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppearanceFlagHeight::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppearanceFlagHeight::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppearanceFlagHeight::GetClassData() const { return &_class_data_; } - - -void AppearanceFlagHeight::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.AppearanceFlagHeight) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_elevation()) { - _this->_internal_set_elevation(from._internal_elevation()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppearanceFlagHeight::CopyFrom(const AppearanceFlagHeight& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.AppearanceFlagHeight) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppearanceFlagHeight::IsInitialized() const { - return true; -} - -void AppearanceFlagHeight::InternalSwap(AppearanceFlagHeight* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.elevation_, other->_impl_.elevation_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppearanceFlagHeight::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[14]); -} - -// =================================================================== - -class AppearanceFlagShift::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_x(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_y(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } -}; - -AppearanceFlagShift::AppearanceFlagShift(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.AppearanceFlagShift) -} -AppearanceFlagShift::AppearanceFlagShift(const AppearanceFlagShift& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppearanceFlagShift* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.x_){} - , decltype(_impl_.y_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.x_, &from._impl_.x_, - static_cast(reinterpret_cast(&_impl_.y_) - - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.y_)); - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.AppearanceFlagShift) -} - -inline void AppearanceFlagShift::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.x_){0u} - , decltype(_impl_.y_){0u} - }; -} - -AppearanceFlagShift::~AppearanceFlagShift() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.AppearanceFlagShift) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppearanceFlagShift::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void AppearanceFlagShift::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppearanceFlagShift::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.AppearanceFlagShift) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - ::memset(&_impl_.x_, 0, static_cast( - reinterpret_cast(&_impl_.y_) - - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.y_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppearanceFlagShift::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 x = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_x(&has_bits); - _impl_.x_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 y = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _Internal::set_has_y(&has_bits); - _impl_.y_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppearanceFlagShift::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.AppearanceFlagShift) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 x = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_x(), target); - } - - // optional uint32 y = 2; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_y(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.AppearanceFlagShift) - return target; -} - -size_t AppearanceFlagShift::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.AppearanceFlagShift) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional uint32 x = 1; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_x()); - } - - // optional uint32 y = 2; - if (cached_has_bits & 0x00000002u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_y()); - } - - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppearanceFlagShift::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppearanceFlagShift::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppearanceFlagShift::GetClassData() const { return &_class_data_; } - - -void AppearanceFlagShift::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.AppearanceFlagShift) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - if (cached_has_bits & 0x00000001u) { - _this->_impl_.x_ = from._impl_.x_; - } - if (cached_has_bits & 0x00000002u) { - _this->_impl_.y_ = from._impl_.y_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppearanceFlagShift::CopyFrom(const AppearanceFlagShift& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.AppearanceFlagShift) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppearanceFlagShift::IsInitialized() const { - return true; -} - -void AppearanceFlagShift::InternalSwap(AppearanceFlagShift* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(AppearanceFlagShift, _impl_.y_) - + sizeof(AppearanceFlagShift::_impl_.y_) - - PROTOBUF_FIELD_OFFSET(AppearanceFlagShift, _impl_.x_)>( - reinterpret_cast(&_impl_.x_), - reinterpret_cast(&other->_impl_.x_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppearanceFlagShift::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[15]); -} - -// =================================================================== - -class AppearanceFlagClothes::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_slot(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } -}; - -AppearanceFlagClothes::AppearanceFlagClothes(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.AppearanceFlagClothes) -} -AppearanceFlagClothes::AppearanceFlagClothes(const AppearanceFlagClothes& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppearanceFlagClothes* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.slot_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.slot_ = from._impl_.slot_; - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.AppearanceFlagClothes) -} - -inline void AppearanceFlagClothes::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.slot_){0u} - }; -} - -AppearanceFlagClothes::~AppearanceFlagClothes() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.AppearanceFlagClothes) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppearanceFlagClothes::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void AppearanceFlagClothes::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppearanceFlagClothes::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.AppearanceFlagClothes) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.slot_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppearanceFlagClothes::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 slot = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_slot(&has_bits); - _impl_.slot_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppearanceFlagClothes::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.AppearanceFlagClothes) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 slot = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_slot(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.AppearanceFlagClothes) - return target; -} - -size_t AppearanceFlagClothes::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.AppearanceFlagClothes) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // optional uint32 slot = 1; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_slot()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppearanceFlagClothes::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppearanceFlagClothes::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppearanceFlagClothes::GetClassData() const { return &_class_data_; } - - -void AppearanceFlagClothes::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.AppearanceFlagClothes) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_slot()) { - _this->_internal_set_slot(from._internal_slot()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppearanceFlagClothes::CopyFrom(const AppearanceFlagClothes& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.AppearanceFlagClothes) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppearanceFlagClothes::IsInitialized() const { - return true; -} - -void AppearanceFlagClothes::InternalSwap(AppearanceFlagClothes* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.slot_, other->_impl_.slot_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppearanceFlagClothes::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[16]); -} - -// =================================================================== - -class AppearanceFlagDefaultAction::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_action(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } -}; - -AppearanceFlagDefaultAction::AppearanceFlagDefaultAction(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.AppearanceFlagDefaultAction) -} -AppearanceFlagDefaultAction::AppearanceFlagDefaultAction(const AppearanceFlagDefaultAction& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppearanceFlagDefaultAction* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.action_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.action_ = from._impl_.action_; - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.AppearanceFlagDefaultAction) -} - -inline void AppearanceFlagDefaultAction::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.action_){0} - }; -} - -AppearanceFlagDefaultAction::~AppearanceFlagDefaultAction() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.AppearanceFlagDefaultAction) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppearanceFlagDefaultAction::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void AppearanceFlagDefaultAction::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppearanceFlagDefaultAction::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.AppearanceFlagDefaultAction) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.action_ = 0; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppearanceFlagDefaultAction::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional .Canary.protobuf.appearances.PLAYER_ACTION action = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - if (PROTOBUF_PREDICT_TRUE(::Canary::protobuf::appearances::PLAYER_ACTION_IsValid(val))) { - _internal_set_action(static_cast<::Canary::protobuf::appearances::PLAYER_ACTION>(val)); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); - } - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppearanceFlagDefaultAction::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.AppearanceFlagDefaultAction) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional .Canary.protobuf.appearances.PLAYER_ACTION action = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this->_internal_action(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.AppearanceFlagDefaultAction) - return target; -} - -size_t AppearanceFlagDefaultAction::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.AppearanceFlagDefaultAction) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // optional .Canary.protobuf.appearances.PLAYER_ACTION action = 1; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_action()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppearanceFlagDefaultAction::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppearanceFlagDefaultAction::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppearanceFlagDefaultAction::GetClassData() const { return &_class_data_; } - - -void AppearanceFlagDefaultAction::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.AppearanceFlagDefaultAction) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_action()) { - _this->_internal_set_action(from._internal_action()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppearanceFlagDefaultAction::CopyFrom(const AppearanceFlagDefaultAction& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.AppearanceFlagDefaultAction) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppearanceFlagDefaultAction::IsInitialized() const { - return true; -} - -void AppearanceFlagDefaultAction::InternalSwap(AppearanceFlagDefaultAction* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.action_, other->_impl_.action_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppearanceFlagDefaultAction::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[17]); -} - -// =================================================================== - -class AppearanceFlagMarket::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_category(HasBits* has_bits) { - (*has_bits)[0] |= 8u; - } - static void set_has_trade_as_object_id(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_show_as_object_id(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } - static void set_has_minimum_level(HasBits* has_bits) { - (*has_bits)[0] |= 4u; - } -}; - -AppearanceFlagMarket::AppearanceFlagMarket(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.AppearanceFlagMarket) -} -AppearanceFlagMarket::AppearanceFlagMarket(const AppearanceFlagMarket& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppearanceFlagMarket* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.restrict_to_profession_){from._impl_.restrict_to_profession_} - , decltype(_impl_.trade_as_object_id_){} - , decltype(_impl_.show_as_object_id_){} - , decltype(_impl_.minimum_level_){} - , decltype(_impl_.category_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.trade_as_object_id_, &from._impl_.trade_as_object_id_, - static_cast(reinterpret_cast(&_impl_.category_) - - reinterpret_cast(&_impl_.trade_as_object_id_)) + sizeof(_impl_.category_)); - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.AppearanceFlagMarket) -} - -inline void AppearanceFlagMarket::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.restrict_to_profession_){arena} - , decltype(_impl_.trade_as_object_id_){0u} - , decltype(_impl_.show_as_object_id_){0u} - , decltype(_impl_.minimum_level_){0u} - , decltype(_impl_.category_){1} - }; -} - -AppearanceFlagMarket::~AppearanceFlagMarket() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.AppearanceFlagMarket) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppearanceFlagMarket::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.restrict_to_profession_.~RepeatedField(); -} - -void AppearanceFlagMarket::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppearanceFlagMarket::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.AppearanceFlagMarket) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.restrict_to_profession_.Clear(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - ::memset(&_impl_.trade_as_object_id_, 0, static_cast( - reinterpret_cast(&_impl_.minimum_level_) - - reinterpret_cast(&_impl_.trade_as_object_id_)) + sizeof(_impl_.minimum_level_)); - _impl_.category_ = 1; - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppearanceFlagMarket::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional .Canary.protobuf.appearances.ITEM_CATEGORY category = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - if (PROTOBUF_PREDICT_TRUE(::Canary::protobuf::appearances::ITEM_CATEGORY_IsValid(val))) { - _internal_set_category(static_cast<::Canary::protobuf::appearances::ITEM_CATEGORY>(val)); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); - } - } else - goto handle_unusual; - continue; - // optional uint32 trade_as_object_id = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _Internal::set_has_trade_as_object_id(&has_bits); - _impl_.trade_as_object_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 show_as_object_id = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _Internal::set_has_show_as_object_id(&has_bits); - _impl_.show_as_object_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated .Canary.protobuf.appearances.PLAYER_PROFESSION restrict_to_profession = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - ptr -= 1; - do { - ptr += 1; - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - if (PROTOBUF_PREDICT_TRUE(::Canary::protobuf::appearances::PLAYER_PROFESSION_IsValid(val))) { - _internal_add_restrict_to_profession(static_cast<::Canary::protobuf::appearances::PLAYER_PROFESSION>(val)); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields()); - } - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<40>(ptr)); - } else if (static_cast(tag) == 42) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(_internal_mutable_restrict_to_profession(), ptr, ctx, ::Canary::protobuf::appearances::PLAYER_PROFESSION_IsValid, &_internal_metadata_, 5); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 minimum_level = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { - _Internal::set_has_minimum_level(&has_bits); - _impl_.minimum_level_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppearanceFlagMarket::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.AppearanceFlagMarket) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional .Canary.protobuf.appearances.ITEM_CATEGORY category = 1; - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this->_internal_category(), target); - } - - // optional uint32 trade_as_object_id = 2; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_trade_as_object_id(), target); - } - - // optional uint32 show_as_object_id = 3; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_show_as_object_id(), target); - } - - // repeated .Canary.protobuf.appearances.PLAYER_PROFESSION restrict_to_profession = 5; - for (int i = 0, n = this->_internal_restrict_to_profession_size(); i < n; i++) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 5, this->_internal_restrict_to_profession(i), target); - } - - // optional uint32 minimum_level = 6; - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_minimum_level(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.AppearanceFlagMarket) - return target; -} - -size_t AppearanceFlagMarket::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.AppearanceFlagMarket) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .Canary.protobuf.appearances.PLAYER_PROFESSION restrict_to_profession = 5; - { - size_t data_size = 0; - unsigned int count = static_cast(this->_internal_restrict_to_profession_size());for (unsigned int i = 0; i < count; i++) { - data_size += ::_pbi::WireFormatLite::EnumSize( - this->_internal_restrict_to_profession(static_cast(i))); - } - total_size += (1UL * count) + data_size; - } - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - // optional uint32 trade_as_object_id = 2; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_trade_as_object_id()); - } - - // optional uint32 show_as_object_id = 3; - if (cached_has_bits & 0x00000002u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_show_as_object_id()); - } - - // optional uint32 minimum_level = 6; - if (cached_has_bits & 0x00000004u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_minimum_level()); - } - - // optional .Canary.protobuf.appearances.ITEM_CATEGORY category = 1; - if (cached_has_bits & 0x00000008u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_category()); - } - - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppearanceFlagMarket::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppearanceFlagMarket::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppearanceFlagMarket::GetClassData() const { return &_class_data_; } - - -void AppearanceFlagMarket::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.AppearanceFlagMarket) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_impl_.restrict_to_profession_.MergeFrom(from._impl_.restrict_to_profession_); - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - if (cached_has_bits & 0x00000001u) { - _this->_impl_.trade_as_object_id_ = from._impl_.trade_as_object_id_; - } - if (cached_has_bits & 0x00000002u) { - _this->_impl_.show_as_object_id_ = from._impl_.show_as_object_id_; - } - if (cached_has_bits & 0x00000004u) { - _this->_impl_.minimum_level_ = from._impl_.minimum_level_; - } - if (cached_has_bits & 0x00000008u) { - _this->_impl_.category_ = from._impl_.category_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppearanceFlagMarket::CopyFrom(const AppearanceFlagMarket& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.AppearanceFlagMarket) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppearanceFlagMarket::IsInitialized() const { - return true; -} - -void AppearanceFlagMarket::InternalSwap(AppearanceFlagMarket* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.restrict_to_profession_.InternalSwap(&other->_impl_.restrict_to_profession_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(AppearanceFlagMarket, _impl_.minimum_level_) - + sizeof(AppearanceFlagMarket::_impl_.minimum_level_) - - PROTOBUF_FIELD_OFFSET(AppearanceFlagMarket, _impl_.trade_as_object_id_)>( - reinterpret_cast(&_impl_.trade_as_object_id_), - reinterpret_cast(&other->_impl_.trade_as_object_id_)); - swap(_impl_.category_, other->_impl_.category_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppearanceFlagMarket::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[18]); -} - -// =================================================================== - -class AppearanceFlagNPC::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_name(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_location(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } - static void set_has_sale_price(HasBits* has_bits) { - (*has_bits)[0] |= 8u; - } - static void set_has_buy_price(HasBits* has_bits) { - (*has_bits)[0] |= 16u; - } - static void set_has_currency_object_type_id(HasBits* has_bits) { - (*has_bits)[0] |= 32u; - } - static void set_has_currency_quest_flag_display_name(HasBits* has_bits) { - (*has_bits)[0] |= 4u; - } -}; - -AppearanceFlagNPC::AppearanceFlagNPC(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.AppearanceFlagNPC) -} -AppearanceFlagNPC::AppearanceFlagNPC(const AppearanceFlagNPC& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppearanceFlagNPC* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.name_){} - , decltype(_impl_.location_){} - , decltype(_impl_.currency_quest_flag_display_name_){} - , decltype(_impl_.sale_price_){} - , decltype(_impl_.buy_price_){} - , decltype(_impl_.currency_object_type_id_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_name()) { - _this->_impl_.name_.Set(from._internal_name(), - _this->GetArenaForAllocation()); - } - _impl_.location_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.location_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_location()) { - _this->_impl_.location_.Set(from._internal_location(), - _this->GetArenaForAllocation()); - } - _impl_.currency_quest_flag_display_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.currency_quest_flag_display_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_currency_quest_flag_display_name()) { - _this->_impl_.currency_quest_flag_display_name_.Set(from._internal_currency_quest_flag_display_name(), - _this->GetArenaForAllocation()); - } - ::memcpy(&_impl_.sale_price_, &from._impl_.sale_price_, - static_cast(reinterpret_cast(&_impl_.currency_object_type_id_) - - reinterpret_cast(&_impl_.sale_price_)) + sizeof(_impl_.currency_object_type_id_)); - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.AppearanceFlagNPC) -} - -inline void AppearanceFlagNPC::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.name_){} - , decltype(_impl_.location_){} - , decltype(_impl_.currency_quest_flag_display_name_){} - , decltype(_impl_.sale_price_){0u} - , decltype(_impl_.buy_price_){0u} - , decltype(_impl_.currency_object_type_id_){0u} - }; - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.location_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.location_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.currency_quest_flag_display_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.currency_quest_flag_display_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -AppearanceFlagNPC::~AppearanceFlagNPC() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.AppearanceFlagNPC) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppearanceFlagNPC::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.name_.Destroy(); - _impl_.location_.Destroy(); - _impl_.currency_quest_flag_display_name_.Destroy(); -} - -void AppearanceFlagNPC::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppearanceFlagNPC::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.AppearanceFlagNPC) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000007u) { - if (cached_has_bits & 0x00000001u) { - _impl_.name_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000002u) { - _impl_.location_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000004u) { - _impl_.currency_quest_flag_display_name_.ClearNonDefaultToEmpty(); - } - } - if (cached_has_bits & 0x00000038u) { - ::memset(&_impl_.sale_price_, 0, static_cast( - reinterpret_cast(&_impl_.currency_object_type_id_) - - reinterpret_cast(&_impl_.sale_price_)) + sizeof(_impl_.currency_object_type_id_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppearanceFlagNPC::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional bytes name = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_name(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bytes location = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_location(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 sale_price = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _Internal::set_has_sale_price(&has_bits); - _impl_.sale_price_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 buy_price = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _Internal::set_has_buy_price(&has_bits); - _impl_.buy_price_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 currency_object_type_id = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _Internal::set_has_currency_object_type_id(&has_bits); - _impl_.currency_object_type_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bytes currency_quest_flag_display_name = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { - auto str = _internal_mutable_currency_quest_flag_display_name(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppearanceFlagNPC::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.AppearanceFlagNPC) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional bytes name = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->WriteBytesMaybeAliased( - 1, this->_internal_name(), target); - } - - // optional bytes location = 2; - if (cached_has_bits & 0x00000002u) { - target = stream->WriteBytesMaybeAliased( - 2, this->_internal_location(), target); - } - - // optional uint32 sale_price = 3; - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_sale_price(), target); - } - - // optional uint32 buy_price = 4; - if (cached_has_bits & 0x00000010u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_buy_price(), target); - } - - // optional uint32 currency_object_type_id = 5; - if (cached_has_bits & 0x00000020u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_currency_object_type_id(), target); - } - - // optional bytes currency_quest_flag_display_name = 6; - if (cached_has_bits & 0x00000004u) { - target = stream->WriteBytesMaybeAliased( - 6, this->_internal_currency_quest_flag_display_name(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.AppearanceFlagNPC) - return target; -} - -size_t AppearanceFlagNPC::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.AppearanceFlagNPC) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000003fu) { - // optional bytes name = 1; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_name()); - } - - // optional bytes location = 2; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_location()); - } - - // optional bytes currency_quest_flag_display_name = 6; - if (cached_has_bits & 0x00000004u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_currency_quest_flag_display_name()); - } - - // optional uint32 sale_price = 3; - if (cached_has_bits & 0x00000008u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_sale_price()); - } - - // optional uint32 buy_price = 4; - if (cached_has_bits & 0x00000010u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_buy_price()); - } - - // optional uint32 currency_object_type_id = 5; - if (cached_has_bits & 0x00000020u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_currency_object_type_id()); - } - - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppearanceFlagNPC::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppearanceFlagNPC::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppearanceFlagNPC::GetClassData() const { return &_class_data_; } - - -void AppearanceFlagNPC::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.AppearanceFlagNPC) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x0000003fu) { - if (cached_has_bits & 0x00000001u) { - _this->_internal_set_name(from._internal_name()); - } - if (cached_has_bits & 0x00000002u) { - _this->_internal_set_location(from._internal_location()); - } - if (cached_has_bits & 0x00000004u) { - _this->_internal_set_currency_quest_flag_display_name(from._internal_currency_quest_flag_display_name()); - } - if (cached_has_bits & 0x00000008u) { - _this->_impl_.sale_price_ = from._impl_.sale_price_; - } - if (cached_has_bits & 0x00000010u) { - _this->_impl_.buy_price_ = from._impl_.buy_price_; - } - if (cached_has_bits & 0x00000020u) { - _this->_impl_.currency_object_type_id_ = from._impl_.currency_object_type_id_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppearanceFlagNPC::CopyFrom(const AppearanceFlagNPC& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.AppearanceFlagNPC) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppearanceFlagNPC::IsInitialized() const { - return true; -} - -void AppearanceFlagNPC::InternalSwap(AppearanceFlagNPC* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.name_, lhs_arena, - &other->_impl_.name_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.location_, lhs_arena, - &other->_impl_.location_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.currency_quest_flag_display_name_, lhs_arena, - &other->_impl_.currency_quest_flag_display_name_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(AppearanceFlagNPC, _impl_.currency_object_type_id_) - + sizeof(AppearanceFlagNPC::_impl_.currency_object_type_id_) - - PROTOBUF_FIELD_OFFSET(AppearanceFlagNPC, _impl_.sale_price_)>( - reinterpret_cast(&_impl_.sale_price_), - reinterpret_cast(&other->_impl_.sale_price_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppearanceFlagNPC::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[19]); -} - -// =================================================================== - -class AppearanceFlagAutomap::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_color(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } -}; - -AppearanceFlagAutomap::AppearanceFlagAutomap(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.AppearanceFlagAutomap) -} -AppearanceFlagAutomap::AppearanceFlagAutomap(const AppearanceFlagAutomap& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppearanceFlagAutomap* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.color_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.color_ = from._impl_.color_; - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.AppearanceFlagAutomap) -} - -inline void AppearanceFlagAutomap::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.color_){0u} - }; -} - -AppearanceFlagAutomap::~AppearanceFlagAutomap() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.AppearanceFlagAutomap) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppearanceFlagAutomap::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void AppearanceFlagAutomap::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppearanceFlagAutomap::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.AppearanceFlagAutomap) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.color_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppearanceFlagAutomap::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 color = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_color(&has_bits); - _impl_.color_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppearanceFlagAutomap::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.AppearanceFlagAutomap) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 color = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_color(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.AppearanceFlagAutomap) - return target; -} - -size_t AppearanceFlagAutomap::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.AppearanceFlagAutomap) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // optional uint32 color = 1; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_color()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppearanceFlagAutomap::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppearanceFlagAutomap::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppearanceFlagAutomap::GetClassData() const { return &_class_data_; } - - -void AppearanceFlagAutomap::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.AppearanceFlagAutomap) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_color()) { - _this->_internal_set_color(from._internal_color()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppearanceFlagAutomap::CopyFrom(const AppearanceFlagAutomap& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.AppearanceFlagAutomap) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppearanceFlagAutomap::IsInitialized() const { - return true; -} - -void AppearanceFlagAutomap::InternalSwap(AppearanceFlagAutomap* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.color_, other->_impl_.color_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppearanceFlagAutomap::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[20]); -} - -// =================================================================== - -class AppearanceFlagHook::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_direction(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } -}; - -AppearanceFlagHook::AppearanceFlagHook(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.AppearanceFlagHook) -} -AppearanceFlagHook::AppearanceFlagHook(const AppearanceFlagHook& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppearanceFlagHook* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.direction_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.direction_ = from._impl_.direction_; - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.AppearanceFlagHook) -} - -inline void AppearanceFlagHook::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.direction_){1} - }; -} - -AppearanceFlagHook::~AppearanceFlagHook() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.AppearanceFlagHook) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppearanceFlagHook::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void AppearanceFlagHook::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppearanceFlagHook::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.AppearanceFlagHook) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.direction_ = 1; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppearanceFlagHook::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional .Canary.protobuf.appearances.HOOK_TYPE direction = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - if (PROTOBUF_PREDICT_TRUE(::Canary::protobuf::appearances::HOOK_TYPE_IsValid(val))) { - _internal_set_direction(static_cast<::Canary::protobuf::appearances::HOOK_TYPE>(val)); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); - } - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppearanceFlagHook::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.AppearanceFlagHook) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional .Canary.protobuf.appearances.HOOK_TYPE direction = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this->_internal_direction(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.AppearanceFlagHook) - return target; -} - -size_t AppearanceFlagHook::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.AppearanceFlagHook) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // optional .Canary.protobuf.appearances.HOOK_TYPE direction = 1; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_direction()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppearanceFlagHook::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppearanceFlagHook::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppearanceFlagHook::GetClassData() const { return &_class_data_; } - - -void AppearanceFlagHook::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.AppearanceFlagHook) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_direction()) { - _this->_internal_set_direction(from._internal_direction()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppearanceFlagHook::CopyFrom(const AppearanceFlagHook& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.AppearanceFlagHook) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppearanceFlagHook::IsInitialized() const { - return true; -} - -void AppearanceFlagHook::InternalSwap(AppearanceFlagHook* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.direction_, other->_impl_.direction_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppearanceFlagHook::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[21]); -} - -// =================================================================== - -class AppearanceFlagLenshelp::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_id(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } -}; - -AppearanceFlagLenshelp::AppearanceFlagLenshelp(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.AppearanceFlagLenshelp) -} -AppearanceFlagLenshelp::AppearanceFlagLenshelp(const AppearanceFlagLenshelp& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppearanceFlagLenshelp* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.id_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.id_ = from._impl_.id_; - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.AppearanceFlagLenshelp) -} - -inline void AppearanceFlagLenshelp::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.id_){0u} - }; -} - -AppearanceFlagLenshelp::~AppearanceFlagLenshelp() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.AppearanceFlagLenshelp) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppearanceFlagLenshelp::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void AppearanceFlagLenshelp::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppearanceFlagLenshelp::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.AppearanceFlagLenshelp) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.id_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppearanceFlagLenshelp::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_id(&has_bits); - _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppearanceFlagLenshelp::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.AppearanceFlagLenshelp) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 id = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_id(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.AppearanceFlagLenshelp) - return target; -} - -size_t AppearanceFlagLenshelp::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.AppearanceFlagLenshelp) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // optional uint32 id = 1; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_id()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppearanceFlagLenshelp::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppearanceFlagLenshelp::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppearanceFlagLenshelp::GetClassData() const { return &_class_data_; } - - -void AppearanceFlagLenshelp::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.AppearanceFlagLenshelp) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_id()) { - _this->_internal_set_id(from._internal_id()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppearanceFlagLenshelp::CopyFrom(const AppearanceFlagLenshelp& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.AppearanceFlagLenshelp) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppearanceFlagLenshelp::IsInitialized() const { - return true; -} - -void AppearanceFlagLenshelp::InternalSwap(AppearanceFlagLenshelp* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.id_, other->_impl_.id_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppearanceFlagLenshelp::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[22]); -} - -// =================================================================== - -class AppearanceFlagChangedToExpire::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_former_object_typeid(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } -}; - -AppearanceFlagChangedToExpire::AppearanceFlagChangedToExpire(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.AppearanceFlagChangedToExpire) -} -AppearanceFlagChangedToExpire::AppearanceFlagChangedToExpire(const AppearanceFlagChangedToExpire& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppearanceFlagChangedToExpire* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.former_object_typeid_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.former_object_typeid_ = from._impl_.former_object_typeid_; - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.AppearanceFlagChangedToExpire) -} - -inline void AppearanceFlagChangedToExpire::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.former_object_typeid_){0u} - }; -} - -AppearanceFlagChangedToExpire::~AppearanceFlagChangedToExpire() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.AppearanceFlagChangedToExpire) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppearanceFlagChangedToExpire::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void AppearanceFlagChangedToExpire::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppearanceFlagChangedToExpire::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.AppearanceFlagChangedToExpire) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.former_object_typeid_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppearanceFlagChangedToExpire::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 former_object_typeid = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_former_object_typeid(&has_bits); - _impl_.former_object_typeid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppearanceFlagChangedToExpire::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.AppearanceFlagChangedToExpire) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 former_object_typeid = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_former_object_typeid(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.AppearanceFlagChangedToExpire) - return target; -} - -size_t AppearanceFlagChangedToExpire::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.AppearanceFlagChangedToExpire) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // optional uint32 former_object_typeid = 1; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_former_object_typeid()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppearanceFlagChangedToExpire::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppearanceFlagChangedToExpire::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppearanceFlagChangedToExpire::GetClassData() const { return &_class_data_; } - - -void AppearanceFlagChangedToExpire::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.AppearanceFlagChangedToExpire) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_former_object_typeid()) { - _this->_internal_set_former_object_typeid(from._internal_former_object_typeid()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppearanceFlagChangedToExpire::CopyFrom(const AppearanceFlagChangedToExpire& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.AppearanceFlagChangedToExpire) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppearanceFlagChangedToExpire::IsInitialized() const { - return true; -} - -void AppearanceFlagChangedToExpire::InternalSwap(AppearanceFlagChangedToExpire* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.former_object_typeid_, other->_impl_.former_object_typeid_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppearanceFlagChangedToExpire::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[23]); -} - -// =================================================================== - -class AppearanceFlagCyclopedia::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_cyclopedia_type(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } -}; - -AppearanceFlagCyclopedia::AppearanceFlagCyclopedia(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.AppearanceFlagCyclopedia) -} -AppearanceFlagCyclopedia::AppearanceFlagCyclopedia(const AppearanceFlagCyclopedia& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppearanceFlagCyclopedia* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.cyclopedia_type_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.cyclopedia_type_ = from._impl_.cyclopedia_type_; - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.AppearanceFlagCyclopedia) -} - -inline void AppearanceFlagCyclopedia::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.cyclopedia_type_){0u} - }; -} - -AppearanceFlagCyclopedia::~AppearanceFlagCyclopedia() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.AppearanceFlagCyclopedia) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppearanceFlagCyclopedia::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void AppearanceFlagCyclopedia::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppearanceFlagCyclopedia::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.AppearanceFlagCyclopedia) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.cyclopedia_type_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppearanceFlagCyclopedia::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 cyclopedia_type = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_cyclopedia_type(&has_bits); - _impl_.cyclopedia_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppearanceFlagCyclopedia::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.AppearanceFlagCyclopedia) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 cyclopedia_type = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_cyclopedia_type(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.AppearanceFlagCyclopedia) - return target; -} - -size_t AppearanceFlagCyclopedia::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.AppearanceFlagCyclopedia) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // optional uint32 cyclopedia_type = 1; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_cyclopedia_type()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppearanceFlagCyclopedia::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppearanceFlagCyclopedia::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppearanceFlagCyclopedia::GetClassData() const { return &_class_data_; } - - -void AppearanceFlagCyclopedia::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.AppearanceFlagCyclopedia) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_cyclopedia_type()) { - _this->_internal_set_cyclopedia_type(from._internal_cyclopedia_type()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppearanceFlagCyclopedia::CopyFrom(const AppearanceFlagCyclopedia& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.AppearanceFlagCyclopedia) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppearanceFlagCyclopedia::IsInitialized() const { - return true; -} - -void AppearanceFlagCyclopedia::InternalSwap(AppearanceFlagCyclopedia* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.cyclopedia_type_, other->_impl_.cyclopedia_type_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppearanceFlagCyclopedia::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[24]); -} - -// =================================================================== - -class SpecialMeaningAppearanceIds::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_gold_coin_id(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_platinum_coin_id(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } - static void set_has_crystal_coin_id(HasBits* has_bits) { - (*has_bits)[0] |= 4u; - } - static void set_has_tibia_coin_id(HasBits* has_bits) { - (*has_bits)[0] |= 8u; - } - static void set_has_stamped_letter_id(HasBits* has_bits) { - (*has_bits)[0] |= 16u; - } - static void set_has_supply_stash_id(HasBits* has_bits) { - (*has_bits)[0] |= 32u; - } - static void set_has_reward_chest_id(HasBits* has_bits) { - (*has_bits)[0] |= 64u; - } -}; - -SpecialMeaningAppearanceIds::SpecialMeaningAppearanceIds(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.appearances.SpecialMeaningAppearanceIds) -} -SpecialMeaningAppearanceIds::SpecialMeaningAppearanceIds(const SpecialMeaningAppearanceIds& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - SpecialMeaningAppearanceIds* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.gold_coin_id_){} - , decltype(_impl_.platinum_coin_id_){} - , decltype(_impl_.crystal_coin_id_){} - , decltype(_impl_.tibia_coin_id_){} - , decltype(_impl_.stamped_letter_id_){} - , decltype(_impl_.supply_stash_id_){} - , decltype(_impl_.reward_chest_id_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.gold_coin_id_, &from._impl_.gold_coin_id_, - static_cast(reinterpret_cast(&_impl_.reward_chest_id_) - - reinterpret_cast(&_impl_.gold_coin_id_)) + sizeof(_impl_.reward_chest_id_)); - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.appearances.SpecialMeaningAppearanceIds) -} - -inline void SpecialMeaningAppearanceIds::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.gold_coin_id_){0u} - , decltype(_impl_.platinum_coin_id_){0u} - , decltype(_impl_.crystal_coin_id_){0u} - , decltype(_impl_.tibia_coin_id_){0u} - , decltype(_impl_.stamped_letter_id_){0u} - , decltype(_impl_.supply_stash_id_){0u} - , decltype(_impl_.reward_chest_id_){0u} - }; -} - -SpecialMeaningAppearanceIds::~SpecialMeaningAppearanceIds() { - // @@protoc_insertion_point(destructor:Canary.protobuf.appearances.SpecialMeaningAppearanceIds) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void SpecialMeaningAppearanceIds::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void SpecialMeaningAppearanceIds::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void SpecialMeaningAppearanceIds::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.appearances.SpecialMeaningAppearanceIds) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000007fu) { - ::memset(&_impl_.gold_coin_id_, 0, static_cast( - reinterpret_cast(&_impl_.reward_chest_id_) - - reinterpret_cast(&_impl_.gold_coin_id_)) + sizeof(_impl_.reward_chest_id_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* SpecialMeaningAppearanceIds::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional uint32 gold_coin_id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_gold_coin_id(&has_bits); - _impl_.gold_coin_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 platinum_coin_id = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _Internal::set_has_platinum_coin_id(&has_bits); - _impl_.platinum_coin_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 crystal_coin_id = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _Internal::set_has_crystal_coin_id(&has_bits); - _impl_.crystal_coin_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 tibia_coin_id = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _Internal::set_has_tibia_coin_id(&has_bits); - _impl_.tibia_coin_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 stamped_letter_id = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _Internal::set_has_stamped_letter_id(&has_bits); - _impl_.stamped_letter_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 supply_stash_id = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { - _Internal::set_has_supply_stash_id(&has_bits); - _impl_.supply_stash_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 reward_chest_id = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { - _Internal::set_has_reward_chest_id(&has_bits); - _impl_.reward_chest_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* SpecialMeaningAppearanceIds::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.appearances.SpecialMeaningAppearanceIds) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional uint32 gold_coin_id = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_gold_coin_id(), target); - } - - // optional uint32 platinum_coin_id = 2; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_platinum_coin_id(), target); - } - - // optional uint32 crystal_coin_id = 3; - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_crystal_coin_id(), target); - } - - // optional uint32 tibia_coin_id = 4; - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_tibia_coin_id(), target); - } - - // optional uint32 stamped_letter_id = 5; - if (cached_has_bits & 0x00000010u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_stamped_letter_id(), target); - } - - // optional uint32 supply_stash_id = 6; - if (cached_has_bits & 0x00000020u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_supply_stash_id(), target); - } - - // optional uint32 reward_chest_id = 7; - if (cached_has_bits & 0x00000040u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_reward_chest_id(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.appearances.SpecialMeaningAppearanceIds) - return target; -} - -size_t SpecialMeaningAppearanceIds::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.appearances.SpecialMeaningAppearanceIds) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000007fu) { - // optional uint32 gold_coin_id = 1; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_gold_coin_id()); - } - - // optional uint32 platinum_coin_id = 2; - if (cached_has_bits & 0x00000002u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_platinum_coin_id()); - } - - // optional uint32 crystal_coin_id = 3; - if (cached_has_bits & 0x00000004u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_crystal_coin_id()); - } - - // optional uint32 tibia_coin_id = 4; - if (cached_has_bits & 0x00000008u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_tibia_coin_id()); - } - - // optional uint32 stamped_letter_id = 5; - if (cached_has_bits & 0x00000010u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_stamped_letter_id()); - } - - // optional uint32 supply_stash_id = 6; - if (cached_has_bits & 0x00000020u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_supply_stash_id()); - } - - // optional uint32 reward_chest_id = 7; - if (cached_has_bits & 0x00000040u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_reward_chest_id()); - } - - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SpecialMeaningAppearanceIds::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - SpecialMeaningAppearanceIds::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SpecialMeaningAppearanceIds::GetClassData() const { return &_class_data_; } - - -void SpecialMeaningAppearanceIds::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.appearances.SpecialMeaningAppearanceIds) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x0000007fu) { - if (cached_has_bits & 0x00000001u) { - _this->_impl_.gold_coin_id_ = from._impl_.gold_coin_id_; - } - if (cached_has_bits & 0x00000002u) { - _this->_impl_.platinum_coin_id_ = from._impl_.platinum_coin_id_; - } - if (cached_has_bits & 0x00000004u) { - _this->_impl_.crystal_coin_id_ = from._impl_.crystal_coin_id_; - } - if (cached_has_bits & 0x00000008u) { - _this->_impl_.tibia_coin_id_ = from._impl_.tibia_coin_id_; - } - if (cached_has_bits & 0x00000010u) { - _this->_impl_.stamped_letter_id_ = from._impl_.stamped_letter_id_; - } - if (cached_has_bits & 0x00000020u) { - _this->_impl_.supply_stash_id_ = from._impl_.supply_stash_id_; - } - if (cached_has_bits & 0x00000040u) { - _this->_impl_.reward_chest_id_ = from._impl_.reward_chest_id_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void SpecialMeaningAppearanceIds::CopyFrom(const SpecialMeaningAppearanceIds& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.appearances.SpecialMeaningAppearanceIds) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool SpecialMeaningAppearanceIds::IsInitialized() const { - return true; -} - -void SpecialMeaningAppearanceIds::InternalSwap(SpecialMeaningAppearanceIds* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(SpecialMeaningAppearanceIds, _impl_.reward_chest_id_) - + sizeof(SpecialMeaningAppearanceIds::_impl_.reward_chest_id_) - - PROTOBUF_FIELD_OFFSET(SpecialMeaningAppearanceIds, _impl_.gold_coin_id_)>( - reinterpret_cast(&_impl_.gold_coin_id_), - reinterpret_cast(&other->_impl_.gold_coin_id_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata SpecialMeaningAppearanceIds::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appearances_2eproto_getter, &descriptor_table_appearances_2eproto_once, - file_level_metadata_appearances_2eproto[25]); -} - -// @@protoc_insertion_point(namespace_scope) -} // namespace appearances -} // namespace protobuf -} // namespace Canary -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::Coordinate* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::Coordinate >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::Coordinate >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::Appearances* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::Appearances >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::Appearances >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::SpritePhase* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::SpritePhase >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::SpritePhase >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::SpriteAnimation* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::SpriteAnimation >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::SpriteAnimation >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::Box* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::Box >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::Box >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::SpriteInfo* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::SpriteInfo >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::SpriteInfo >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::FrameGroup* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::FrameGroup >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::FrameGroup >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::Appearance* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::Appearance >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::Appearance >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::AppearanceFlags* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::AppearanceFlags >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::AppearanceFlags >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::AppearanceFlagBank* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::AppearanceFlagBank >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::AppearanceFlagBank >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::AppearanceFlagWrite* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::AppearanceFlagWrite >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::AppearanceFlagWrite >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::AppearanceFlagWriteOnce* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::AppearanceFlagWriteOnce >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::AppearanceFlagWriteOnce >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::AppearanceFlagLight* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::AppearanceFlagLight >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::AppearanceFlagLight >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::AppearanceFlagHeight* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::AppearanceFlagHeight >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::AppearanceFlagHeight >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::AppearanceFlagShift* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::AppearanceFlagShift >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::AppearanceFlagShift >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::AppearanceFlagClothes* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::AppearanceFlagClothes >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::AppearanceFlagClothes >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::AppearanceFlagDefaultAction* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::AppearanceFlagDefaultAction >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::AppearanceFlagDefaultAction >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::AppearanceFlagMarket* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::AppearanceFlagMarket >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::AppearanceFlagMarket >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::AppearanceFlagNPC* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::AppearanceFlagNPC >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::AppearanceFlagNPC >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::AppearanceFlagAutomap* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::AppearanceFlagAutomap >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::AppearanceFlagAutomap >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::AppearanceFlagHook* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::AppearanceFlagHook >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::AppearanceFlagHook >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::AppearanceFlagLenshelp* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::AppearanceFlagLenshelp >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::AppearanceFlagLenshelp >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::AppearanceFlagCyclopedia* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::AppearanceFlagCyclopedia >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::AppearanceFlagCyclopedia >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* -Arena::CreateMaybeMessage< ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/src/protobuf/appearances.pb.h b/src/protobuf/appearances.pb.h deleted file mode 100644 index 65bc2c7e9..000000000 --- a/src/protobuf/appearances.pb.h +++ /dev/null @@ -1,11506 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: appearances.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_appearances_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_appearances_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3021000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_appearances_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_appearances_2eproto { - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_appearances_2eproto; -namespace Canary { -namespace protobuf { -namespace appearances { -class Appearance; -struct AppearanceDefaultTypeInternal; -extern AppearanceDefaultTypeInternal _Appearance_default_instance_; -class AppearanceFlagAutomap; -struct AppearanceFlagAutomapDefaultTypeInternal; -extern AppearanceFlagAutomapDefaultTypeInternal _AppearanceFlagAutomap_default_instance_; -class AppearanceFlagBank; -struct AppearanceFlagBankDefaultTypeInternal; -extern AppearanceFlagBankDefaultTypeInternal _AppearanceFlagBank_default_instance_; -class AppearanceFlagChangedToExpire; -struct AppearanceFlagChangedToExpireDefaultTypeInternal; -extern AppearanceFlagChangedToExpireDefaultTypeInternal _AppearanceFlagChangedToExpire_default_instance_; -class AppearanceFlagClothes; -struct AppearanceFlagClothesDefaultTypeInternal; -extern AppearanceFlagClothesDefaultTypeInternal _AppearanceFlagClothes_default_instance_; -class AppearanceFlagCyclopedia; -struct AppearanceFlagCyclopediaDefaultTypeInternal; -extern AppearanceFlagCyclopediaDefaultTypeInternal _AppearanceFlagCyclopedia_default_instance_; -class AppearanceFlagDefaultAction; -struct AppearanceFlagDefaultActionDefaultTypeInternal; -extern AppearanceFlagDefaultActionDefaultTypeInternal _AppearanceFlagDefaultAction_default_instance_; -class AppearanceFlagHeight; -struct AppearanceFlagHeightDefaultTypeInternal; -extern AppearanceFlagHeightDefaultTypeInternal _AppearanceFlagHeight_default_instance_; -class AppearanceFlagHook; -struct AppearanceFlagHookDefaultTypeInternal; -extern AppearanceFlagHookDefaultTypeInternal _AppearanceFlagHook_default_instance_; -class AppearanceFlagLenshelp; -struct AppearanceFlagLenshelpDefaultTypeInternal; -extern AppearanceFlagLenshelpDefaultTypeInternal _AppearanceFlagLenshelp_default_instance_; -class AppearanceFlagLight; -struct AppearanceFlagLightDefaultTypeInternal; -extern AppearanceFlagLightDefaultTypeInternal _AppearanceFlagLight_default_instance_; -class AppearanceFlagMarket; -struct AppearanceFlagMarketDefaultTypeInternal; -extern AppearanceFlagMarketDefaultTypeInternal _AppearanceFlagMarket_default_instance_; -class AppearanceFlagNPC; -struct AppearanceFlagNPCDefaultTypeInternal; -extern AppearanceFlagNPCDefaultTypeInternal _AppearanceFlagNPC_default_instance_; -class AppearanceFlagShift; -struct AppearanceFlagShiftDefaultTypeInternal; -extern AppearanceFlagShiftDefaultTypeInternal _AppearanceFlagShift_default_instance_; -class AppearanceFlagUpgradeClassification; -struct AppearanceFlagUpgradeClassificationDefaultTypeInternal; -extern AppearanceFlagUpgradeClassificationDefaultTypeInternal _AppearanceFlagUpgradeClassification_default_instance_; -class AppearanceFlagWrite; -struct AppearanceFlagWriteDefaultTypeInternal; -extern AppearanceFlagWriteDefaultTypeInternal _AppearanceFlagWrite_default_instance_; -class AppearanceFlagWriteOnce; -struct AppearanceFlagWriteOnceDefaultTypeInternal; -extern AppearanceFlagWriteOnceDefaultTypeInternal _AppearanceFlagWriteOnce_default_instance_; -class AppearanceFlags; -struct AppearanceFlagsDefaultTypeInternal; -extern AppearanceFlagsDefaultTypeInternal _AppearanceFlags_default_instance_; -class Appearances; -struct AppearancesDefaultTypeInternal; -extern AppearancesDefaultTypeInternal _Appearances_default_instance_; -class Box; -struct BoxDefaultTypeInternal; -extern BoxDefaultTypeInternal _Box_default_instance_; -class Coordinate; -struct CoordinateDefaultTypeInternal; -extern CoordinateDefaultTypeInternal _Coordinate_default_instance_; -class FrameGroup; -struct FrameGroupDefaultTypeInternal; -extern FrameGroupDefaultTypeInternal _FrameGroup_default_instance_; -class SpecialMeaningAppearanceIds; -struct SpecialMeaningAppearanceIdsDefaultTypeInternal; -extern SpecialMeaningAppearanceIdsDefaultTypeInternal _SpecialMeaningAppearanceIds_default_instance_; -class SpriteAnimation; -struct SpriteAnimationDefaultTypeInternal; -extern SpriteAnimationDefaultTypeInternal _SpriteAnimation_default_instance_; -class SpriteInfo; -struct SpriteInfoDefaultTypeInternal; -extern SpriteInfoDefaultTypeInternal _SpriteInfo_default_instance_; -class SpritePhase; -struct SpritePhaseDefaultTypeInternal; -extern SpritePhaseDefaultTypeInternal _SpritePhase_default_instance_; -} // namespace appearances -} // namespace protobuf -} // namespace Canary -PROTOBUF_NAMESPACE_OPEN -template<> ::Canary::protobuf::appearances::Appearance* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::Appearance>(Arena*); -template<> ::Canary::protobuf::appearances::AppearanceFlagAutomap* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagAutomap>(Arena*); -template<> ::Canary::protobuf::appearances::AppearanceFlagBank* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagBank>(Arena*); -template<> ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagChangedToExpire>(Arena*); -template<> ::Canary::protobuf::appearances::AppearanceFlagClothes* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagClothes>(Arena*); -template<> ::Canary::protobuf::appearances::AppearanceFlagCyclopedia* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagCyclopedia>(Arena*); -template<> ::Canary::protobuf::appearances::AppearanceFlagDefaultAction* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagDefaultAction>(Arena*); -template<> ::Canary::protobuf::appearances::AppearanceFlagHeight* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagHeight>(Arena*); -template<> ::Canary::protobuf::appearances::AppearanceFlagHook* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagHook>(Arena*); -template<> ::Canary::protobuf::appearances::AppearanceFlagLenshelp* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagLenshelp>(Arena*); -template<> ::Canary::protobuf::appearances::AppearanceFlagLight* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagLight>(Arena*); -template<> ::Canary::protobuf::appearances::AppearanceFlagMarket* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagMarket>(Arena*); -template<> ::Canary::protobuf::appearances::AppearanceFlagNPC* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagNPC>(Arena*); -template<> ::Canary::protobuf::appearances::AppearanceFlagShift* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagShift>(Arena*); -template<> ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification>(Arena*); -template<> ::Canary::protobuf::appearances::AppearanceFlagWrite* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagWrite>(Arena*); -template<> ::Canary::protobuf::appearances::AppearanceFlagWriteOnce* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagWriteOnce>(Arena*); -template<> ::Canary::protobuf::appearances::AppearanceFlags* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlags>(Arena*); -template<> ::Canary::protobuf::appearances::Appearances* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::Appearances>(Arena*); -template<> ::Canary::protobuf::appearances::Box* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::Box>(Arena*); -template<> ::Canary::protobuf::appearances::Coordinate* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::Coordinate>(Arena*); -template<> ::Canary::protobuf::appearances::FrameGroup* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::FrameGroup>(Arena*); -template<> ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::SpecialMeaningAppearanceIds>(Arena*); -template<> ::Canary::protobuf::appearances::SpriteAnimation* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::SpriteAnimation>(Arena*); -template<> ::Canary::protobuf::appearances::SpriteInfo* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::SpriteInfo>(Arena*); -template<> ::Canary::protobuf::appearances::SpritePhase* Arena::CreateMaybeMessage<::Canary::protobuf::appearances::SpritePhase>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace Canary { -namespace protobuf { -namespace appearances { - -enum PLAYER_ACTION : int { - PLAYER_ACTION_NONE = 0, - PLAYER_ACTION_LOOK = 1, - PLAYER_ACTION_USE = 2, - PLAYER_ACTION_OPEN = 3, - PLAYER_ACTION_AUTOWALK_HIGHLIGHT = 4 -}; -bool PLAYER_ACTION_IsValid(int value); -constexpr PLAYER_ACTION PLAYER_ACTION_MIN = PLAYER_ACTION_NONE; -constexpr PLAYER_ACTION PLAYER_ACTION_MAX = PLAYER_ACTION_AUTOWALK_HIGHLIGHT; -constexpr int PLAYER_ACTION_ARRAYSIZE = PLAYER_ACTION_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PLAYER_ACTION_descriptor(); -template -inline const std::string& PLAYER_ACTION_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function PLAYER_ACTION_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - PLAYER_ACTION_descriptor(), enum_t_value); -} -inline bool PLAYER_ACTION_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PLAYER_ACTION* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - PLAYER_ACTION_descriptor(), name, value); -} -enum ITEM_CATEGORY : int { - ITEM_CATEGORY_ARMORS = 1, - ITEM_CATEGORY_AMULETS = 2, - ITEM_CATEGORY_BOOTS = 3, - ITEM_CATEGORY_CONTAINERS = 4, - ITEM_CATEGORY_DECORATION = 5, - ITEM_CATEGORY_FOOD = 6, - ITEM_CATEGORY_HELMETS_HATS = 7, - ITEM_CATEGORY_LEGS = 8, - ITEM_CATEGORY_OTHERS = 9, - ITEM_CATEGORY_POTIONS = 10, - ITEM_CATEGORY_RINGS = 11, - ITEM_CATEGORY_RUNES = 12, - ITEM_CATEGORY_SHIELDS = 13, - ITEM_CATEGORY_TOOLS = 14, - ITEM_CATEGORY_VALUABLES = 15, - ITEM_CATEGORY_AMMUNITION = 16, - ITEM_CATEGORY_AXES = 17, - ITEM_CATEGORY_CLUBS = 18, - ITEM_CATEGORY_DISTANCE_WEAPONS = 19, - ITEM_CATEGORY_SWORDS = 20, - ITEM_CATEGORY_WANDS_RODS = 21, - ITEM_CATEGORY_PREMIUM_SCROLLS = 22, - ITEM_CATEGORY_TIBIA_COINS = 23, - ITEM_CATEGORY_CREATURE_PRODUCTS = 24, - ITEM_CATEGORY_QUIVER = 25 -}; -bool ITEM_CATEGORY_IsValid(int value); -constexpr ITEM_CATEGORY ITEM_CATEGORY_MIN = ITEM_CATEGORY_ARMORS; -constexpr ITEM_CATEGORY ITEM_CATEGORY_MAX = ITEM_CATEGORY_QUIVER; -constexpr int ITEM_CATEGORY_ARRAYSIZE = ITEM_CATEGORY_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ITEM_CATEGORY_descriptor(); -template -inline const std::string& ITEM_CATEGORY_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function ITEM_CATEGORY_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - ITEM_CATEGORY_descriptor(), enum_t_value); -} -inline bool ITEM_CATEGORY_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ITEM_CATEGORY* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - ITEM_CATEGORY_descriptor(), name, value); -} -enum PLAYER_PROFESSION : int { - PLAYER_PROFESSION_ANY = -1, - PLAYER_PROFESSION_NONE = 0, - PLAYER_PROFESSION_KNIGHT = 1, - PLAYER_PROFESSION_PALADIN = 2, - PLAYER_PROFESSION_SORCERER = 3, - PLAYER_PROFESSION_DRUID = 4, - PLAYER_PROFESSION_PROMOTED = 10 -}; -bool PLAYER_PROFESSION_IsValid(int value); -constexpr PLAYER_PROFESSION PLAYER_PROFESSION_MIN = PLAYER_PROFESSION_ANY; -constexpr PLAYER_PROFESSION PLAYER_PROFESSION_MAX = PLAYER_PROFESSION_PROMOTED; -constexpr int PLAYER_PROFESSION_ARRAYSIZE = PLAYER_PROFESSION_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PLAYER_PROFESSION_descriptor(); -template -inline const std::string& PLAYER_PROFESSION_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function PLAYER_PROFESSION_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - PLAYER_PROFESSION_descriptor(), enum_t_value); -} -inline bool PLAYER_PROFESSION_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PLAYER_PROFESSION* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - PLAYER_PROFESSION_descriptor(), name, value); -} -enum ANIMATION_LOOP_TYPE : int { - ANIMATION_LOOP_TYPE_PINGPONG = -1, - ANIMATION_LOOP_TYPE_INFINITE = 0, - ANIMATION_LOOP_TYPE_COUNTED = 1 -}; -bool ANIMATION_LOOP_TYPE_IsValid(int value); -constexpr ANIMATION_LOOP_TYPE ANIMATION_LOOP_TYPE_MIN = ANIMATION_LOOP_TYPE_PINGPONG; -constexpr ANIMATION_LOOP_TYPE ANIMATION_LOOP_TYPE_MAX = ANIMATION_LOOP_TYPE_COUNTED; -constexpr int ANIMATION_LOOP_TYPE_ARRAYSIZE = ANIMATION_LOOP_TYPE_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ANIMATION_LOOP_TYPE_descriptor(); -template -inline const std::string& ANIMATION_LOOP_TYPE_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function ANIMATION_LOOP_TYPE_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - ANIMATION_LOOP_TYPE_descriptor(), enum_t_value); -} -inline bool ANIMATION_LOOP_TYPE_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ANIMATION_LOOP_TYPE* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - ANIMATION_LOOP_TYPE_descriptor(), name, value); -} -enum HOOK_TYPE : int { - HOOK_TYPE_SOUTH = 1, - HOOK_TYPE_EAST = 2 -}; -bool HOOK_TYPE_IsValid(int value); -constexpr HOOK_TYPE HOOK_TYPE_MIN = HOOK_TYPE_SOUTH; -constexpr HOOK_TYPE HOOK_TYPE_MAX = HOOK_TYPE_EAST; -constexpr int HOOK_TYPE_ARRAYSIZE = HOOK_TYPE_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* HOOK_TYPE_descriptor(); -template -inline const std::string& HOOK_TYPE_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function HOOK_TYPE_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - HOOK_TYPE_descriptor(), enum_t_value); -} -inline bool HOOK_TYPE_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, HOOK_TYPE* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - HOOK_TYPE_descriptor(), name, value); -} -enum FIXED_FRAME_GROUP : int { - FIXED_FRAME_GROUP_OUTFIT_IDLE = 0, - FIXED_FRAME_GROUP_OUTFIT_MOVING = 1, - FIXED_FRAME_GROUP_OBJECT_INITIAL = 2 -}; -bool FIXED_FRAME_GROUP_IsValid(int value); -constexpr FIXED_FRAME_GROUP FIXED_FRAME_GROUP_MIN = FIXED_FRAME_GROUP_OUTFIT_IDLE; -constexpr FIXED_FRAME_GROUP FIXED_FRAME_GROUP_MAX = FIXED_FRAME_GROUP_OBJECT_INITIAL; -constexpr int FIXED_FRAME_GROUP_ARRAYSIZE = FIXED_FRAME_GROUP_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FIXED_FRAME_GROUP_descriptor(); -template -inline const std::string& FIXED_FRAME_GROUP_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function FIXED_FRAME_GROUP_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - FIXED_FRAME_GROUP_descriptor(), enum_t_value); -} -inline bool FIXED_FRAME_GROUP_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FIXED_FRAME_GROUP* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - FIXED_FRAME_GROUP_descriptor(), name, value); -} -// =================================================================== - -class Coordinate final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.Coordinate) */ { - public: - inline Coordinate() : Coordinate(nullptr) {} - ~Coordinate() override; - explicit PROTOBUF_CONSTEXPR Coordinate(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - Coordinate(const Coordinate& from); - Coordinate(Coordinate&& from) noexcept - : Coordinate() { - *this = ::std::move(from); - } - - inline Coordinate& operator=(const Coordinate& from) { - CopyFrom(from); - return *this; - } - inline Coordinate& operator=(Coordinate&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const Coordinate& default_instance() { - return *internal_default_instance(); - } - static inline const Coordinate* internal_default_instance() { - return reinterpret_cast( - &_Coordinate_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(Coordinate& a, Coordinate& b) { - a.Swap(&b); - } - inline void Swap(Coordinate* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Coordinate* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Coordinate* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const Coordinate& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const Coordinate& from) { - Coordinate::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Coordinate* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.Coordinate"; - } - protected: - explicit Coordinate(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kXFieldNumber = 1, - kYFieldNumber = 2, - kZFieldNumber = 3, - }; - // optional uint32 x = 1; - bool has_x() const; - private: - bool _internal_has_x() const; - public: - void clear_x(); - uint32_t x() const; - void set_x(uint32_t value); - private: - uint32_t _internal_x() const; - void _internal_set_x(uint32_t value); - public: - - // optional uint32 y = 2; - bool has_y() const; - private: - bool _internal_has_y() const; - public: - void clear_y(); - uint32_t y() const; - void set_y(uint32_t value); - private: - uint32_t _internal_y() const; - void _internal_set_y(uint32_t value); - public: - - // optional uint32 z = 3; - bool has_z() const; - private: - bool _internal_has_z() const; - public: - void clear_z(); - uint32_t z() const; - void set_z(uint32_t value); - private: - uint32_t _internal_z() const; - void _internal_set_z(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.Coordinate) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t x_; - uint32_t y_; - uint32_t z_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class Appearances final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.Appearances) */ { - public: - inline Appearances() : Appearances(nullptr) {} - ~Appearances() override; - explicit PROTOBUF_CONSTEXPR Appearances(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - Appearances(const Appearances& from); - Appearances(Appearances&& from) noexcept - : Appearances() { - *this = ::std::move(from); - } - - inline Appearances& operator=(const Appearances& from) { - CopyFrom(from); - return *this; - } - inline Appearances& operator=(Appearances&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const Appearances& default_instance() { - return *internal_default_instance(); - } - static inline const Appearances* internal_default_instance() { - return reinterpret_cast( - &_Appearances_default_instance_); - } - static constexpr int kIndexInFileMessages = - 1; - - friend void swap(Appearances& a, Appearances& b) { - a.Swap(&b); - } - inline void Swap(Appearances* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Appearances* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Appearances* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const Appearances& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const Appearances& from) { - Appearances::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Appearances* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.Appearances"; - } - protected: - explicit Appearances(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kObjectFieldNumber = 1, - kOutfitFieldNumber = 2, - kEffectFieldNumber = 3, - kMissileFieldNumber = 4, - kSpecialMeaningAppearanceIdsFieldNumber = 5, - }; - // repeated .Canary.protobuf.appearances.Appearance object = 1; - int object_size() const; - private: - int _internal_object_size() const; - public: - void clear_object(); - ::Canary::protobuf::appearances::Appearance* mutable_object(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance >* - mutable_object(); - private: - const ::Canary::protobuf::appearances::Appearance& _internal_object(int index) const; - ::Canary::protobuf::appearances::Appearance* _internal_add_object(); - public: - const ::Canary::protobuf::appearances::Appearance& object(int index) const; - ::Canary::protobuf::appearances::Appearance* add_object(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance >& - object() const; - - // repeated .Canary.protobuf.appearances.Appearance outfit = 2; - int outfit_size() const; - private: - int _internal_outfit_size() const; - public: - void clear_outfit(); - ::Canary::protobuf::appearances::Appearance* mutable_outfit(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance >* - mutable_outfit(); - private: - const ::Canary::protobuf::appearances::Appearance& _internal_outfit(int index) const; - ::Canary::protobuf::appearances::Appearance* _internal_add_outfit(); - public: - const ::Canary::protobuf::appearances::Appearance& outfit(int index) const; - ::Canary::protobuf::appearances::Appearance* add_outfit(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance >& - outfit() const; - - // repeated .Canary.protobuf.appearances.Appearance effect = 3; - int effect_size() const; - private: - int _internal_effect_size() const; - public: - void clear_effect(); - ::Canary::protobuf::appearances::Appearance* mutable_effect(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance >* - mutable_effect(); - private: - const ::Canary::protobuf::appearances::Appearance& _internal_effect(int index) const; - ::Canary::protobuf::appearances::Appearance* _internal_add_effect(); - public: - const ::Canary::protobuf::appearances::Appearance& effect(int index) const; - ::Canary::protobuf::appearances::Appearance* add_effect(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance >& - effect() const; - - // repeated .Canary.protobuf.appearances.Appearance missile = 4; - int missile_size() const; - private: - int _internal_missile_size() const; - public: - void clear_missile(); - ::Canary::protobuf::appearances::Appearance* mutable_missile(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance >* - mutable_missile(); - private: - const ::Canary::protobuf::appearances::Appearance& _internal_missile(int index) const; - ::Canary::protobuf::appearances::Appearance* _internal_add_missile(); - public: - const ::Canary::protobuf::appearances::Appearance& missile(int index) const; - ::Canary::protobuf::appearances::Appearance* add_missile(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance >& - missile() const; - - // optional .Canary.protobuf.appearances.SpecialMeaningAppearanceIds special_meaning_appearance_ids = 5; - bool has_special_meaning_appearance_ids() const; - private: - bool _internal_has_special_meaning_appearance_ids() const; - public: - void clear_special_meaning_appearance_ids(); - const ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds& special_meaning_appearance_ids() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* release_special_meaning_appearance_ids(); - ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* mutable_special_meaning_appearance_ids(); - void set_allocated_special_meaning_appearance_ids(::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* special_meaning_appearance_ids); - private: - const ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds& _internal_special_meaning_appearance_ids() const; - ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* _internal_mutable_special_meaning_appearance_ids(); - public: - void unsafe_arena_set_allocated_special_meaning_appearance_ids( - ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* special_meaning_appearance_ids); - ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* unsafe_arena_release_special_meaning_appearance_ids(); - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.Appearances) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance > object_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance > outfit_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance > effect_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance > missile_; - ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* special_meaning_appearance_ids_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class SpritePhase final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.SpritePhase) */ { - public: - inline SpritePhase() : SpritePhase(nullptr) {} - ~SpritePhase() override; - explicit PROTOBUF_CONSTEXPR SpritePhase(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - SpritePhase(const SpritePhase& from); - SpritePhase(SpritePhase&& from) noexcept - : SpritePhase() { - *this = ::std::move(from); - } - - inline SpritePhase& operator=(const SpritePhase& from) { - CopyFrom(from); - return *this; - } - inline SpritePhase& operator=(SpritePhase&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const SpritePhase& default_instance() { - return *internal_default_instance(); - } - static inline const SpritePhase* internal_default_instance() { - return reinterpret_cast( - &_SpritePhase_default_instance_); - } - static constexpr int kIndexInFileMessages = - 2; - - friend void swap(SpritePhase& a, SpritePhase& b) { - a.Swap(&b); - } - inline void Swap(SpritePhase* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(SpritePhase* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - SpritePhase* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const SpritePhase& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const SpritePhase& from) { - SpritePhase::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(SpritePhase* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.SpritePhase"; - } - protected: - explicit SpritePhase(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kDurationMinFieldNumber = 1, - kDurationMaxFieldNumber = 2, - }; - // optional uint32 duration_min = 1; - bool has_duration_min() const; - private: - bool _internal_has_duration_min() const; - public: - void clear_duration_min(); - uint32_t duration_min() const; - void set_duration_min(uint32_t value); - private: - uint32_t _internal_duration_min() const; - void _internal_set_duration_min(uint32_t value); - public: - - // optional uint32 duration_max = 2; - bool has_duration_max() const; - private: - bool _internal_has_duration_max() const; - public: - void clear_duration_max(); - uint32_t duration_max() const; - void set_duration_max(uint32_t value); - private: - uint32_t _internal_duration_max() const; - void _internal_set_duration_max(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.SpritePhase) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t duration_min_; - uint32_t duration_max_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class SpriteAnimation final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.SpriteAnimation) */ { - public: - inline SpriteAnimation() : SpriteAnimation(nullptr) {} - ~SpriteAnimation() override; - explicit PROTOBUF_CONSTEXPR SpriteAnimation(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - SpriteAnimation(const SpriteAnimation& from); - SpriteAnimation(SpriteAnimation&& from) noexcept - : SpriteAnimation() { - *this = ::std::move(from); - } - - inline SpriteAnimation& operator=(const SpriteAnimation& from) { - CopyFrom(from); - return *this; - } - inline SpriteAnimation& operator=(SpriteAnimation&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const SpriteAnimation& default_instance() { - return *internal_default_instance(); - } - static inline const SpriteAnimation* internal_default_instance() { - return reinterpret_cast( - &_SpriteAnimation_default_instance_); - } - static constexpr int kIndexInFileMessages = - 3; - - friend void swap(SpriteAnimation& a, SpriteAnimation& b) { - a.Swap(&b); - } - inline void Swap(SpriteAnimation* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(SpriteAnimation* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - SpriteAnimation* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const SpriteAnimation& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const SpriteAnimation& from) { - SpriteAnimation::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(SpriteAnimation* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.SpriteAnimation"; - } - protected: - explicit SpriteAnimation(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kSpritePhaseFieldNumber = 6, - kDefaultStartPhaseFieldNumber = 1, - kSynchronizedFieldNumber = 2, - kRandomStartPhaseFieldNumber = 3, - kLoopCountFieldNumber = 5, - kLoopTypeFieldNumber = 4, - }; - // repeated .Canary.protobuf.appearances.SpritePhase sprite_phase = 6; - int sprite_phase_size() const; - private: - int _internal_sprite_phase_size() const; - public: - void clear_sprite_phase(); - ::Canary::protobuf::appearances::SpritePhase* mutable_sprite_phase(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::SpritePhase >* - mutable_sprite_phase(); - private: - const ::Canary::protobuf::appearances::SpritePhase& _internal_sprite_phase(int index) const; - ::Canary::protobuf::appearances::SpritePhase* _internal_add_sprite_phase(); - public: - const ::Canary::protobuf::appearances::SpritePhase& sprite_phase(int index) const; - ::Canary::protobuf::appearances::SpritePhase* add_sprite_phase(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::SpritePhase >& - sprite_phase() const; - - // optional uint32 default_start_phase = 1; - bool has_default_start_phase() const; - private: - bool _internal_has_default_start_phase() const; - public: - void clear_default_start_phase(); - uint32_t default_start_phase() const; - void set_default_start_phase(uint32_t value); - private: - uint32_t _internal_default_start_phase() const; - void _internal_set_default_start_phase(uint32_t value); - public: - - // optional bool synchronized = 2; - bool has_synchronized() const; - private: - bool _internal_has_synchronized() const; - public: - void clear_synchronized(); - bool synchronized() const; - void set_synchronized(bool value); - private: - bool _internal_synchronized() const; - void _internal_set_synchronized(bool value); - public: - - // optional bool random_start_phase = 3; - bool has_random_start_phase() const; - private: - bool _internal_has_random_start_phase() const; - public: - void clear_random_start_phase(); - bool random_start_phase() const; - void set_random_start_phase(bool value); - private: - bool _internal_random_start_phase() const; - void _internal_set_random_start_phase(bool value); - public: - - // optional uint32 loop_count = 5; - bool has_loop_count() const; - private: - bool _internal_has_loop_count() const; - public: - void clear_loop_count(); - uint32_t loop_count() const; - void set_loop_count(uint32_t value); - private: - uint32_t _internal_loop_count() const; - void _internal_set_loop_count(uint32_t value); - public: - - // optional .Canary.protobuf.appearances.ANIMATION_LOOP_TYPE loop_type = 4; - bool has_loop_type() const; - private: - bool _internal_has_loop_type() const; - public: - void clear_loop_type(); - ::Canary::protobuf::appearances::ANIMATION_LOOP_TYPE loop_type() const; - void set_loop_type(::Canary::protobuf::appearances::ANIMATION_LOOP_TYPE value); - private: - ::Canary::protobuf::appearances::ANIMATION_LOOP_TYPE _internal_loop_type() const; - void _internal_set_loop_type(::Canary::protobuf::appearances::ANIMATION_LOOP_TYPE value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.SpriteAnimation) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::SpritePhase > sprite_phase_; - uint32_t default_start_phase_; - bool synchronized_; - bool random_start_phase_; - uint32_t loop_count_; - int loop_type_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class Box final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.Box) */ { - public: - inline Box() : Box(nullptr) {} - ~Box() override; - explicit PROTOBUF_CONSTEXPR Box(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - Box(const Box& from); - Box(Box&& from) noexcept - : Box() { - *this = ::std::move(from); - } - - inline Box& operator=(const Box& from) { - CopyFrom(from); - return *this; - } - inline Box& operator=(Box&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const Box& default_instance() { - return *internal_default_instance(); - } - static inline const Box* internal_default_instance() { - return reinterpret_cast( - &_Box_default_instance_); - } - static constexpr int kIndexInFileMessages = - 4; - - friend void swap(Box& a, Box& b) { - a.Swap(&b); - } - inline void Swap(Box* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Box* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Box* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const Box& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const Box& from) { - Box::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Box* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.Box"; - } - protected: - explicit Box(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kXFieldNumber = 1, - kYFieldNumber = 2, - kWidthFieldNumber = 3, - kHeightFieldNumber = 4, - }; - // optional uint32 x = 1; - bool has_x() const; - private: - bool _internal_has_x() const; - public: - void clear_x(); - uint32_t x() const; - void set_x(uint32_t value); - private: - uint32_t _internal_x() const; - void _internal_set_x(uint32_t value); - public: - - // optional uint32 y = 2; - bool has_y() const; - private: - bool _internal_has_y() const; - public: - void clear_y(); - uint32_t y() const; - void set_y(uint32_t value); - private: - uint32_t _internal_y() const; - void _internal_set_y(uint32_t value); - public: - - // optional uint32 width = 3; - bool has_width() const; - private: - bool _internal_has_width() const; - public: - void clear_width(); - uint32_t width() const; - void set_width(uint32_t value); - private: - uint32_t _internal_width() const; - void _internal_set_width(uint32_t value); - public: - - // optional uint32 height = 4; - bool has_height() const; - private: - bool _internal_has_height() const; - public: - void clear_height(); - uint32_t height() const; - void set_height(uint32_t value); - private: - uint32_t _internal_height() const; - void _internal_set_height(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.Box) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t x_; - uint32_t y_; - uint32_t width_; - uint32_t height_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class SpriteInfo final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.SpriteInfo) */ { - public: - inline SpriteInfo() : SpriteInfo(nullptr) {} - ~SpriteInfo() override; - explicit PROTOBUF_CONSTEXPR SpriteInfo(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - SpriteInfo(const SpriteInfo& from); - SpriteInfo(SpriteInfo&& from) noexcept - : SpriteInfo() { - *this = ::std::move(from); - } - - inline SpriteInfo& operator=(const SpriteInfo& from) { - CopyFrom(from); - return *this; - } - inline SpriteInfo& operator=(SpriteInfo&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const SpriteInfo& default_instance() { - return *internal_default_instance(); - } - static inline const SpriteInfo* internal_default_instance() { - return reinterpret_cast( - &_SpriteInfo_default_instance_); - } - static constexpr int kIndexInFileMessages = - 5; - - friend void swap(SpriteInfo& a, SpriteInfo& b) { - a.Swap(&b); - } - inline void Swap(SpriteInfo* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(SpriteInfo* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - SpriteInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const SpriteInfo& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const SpriteInfo& from) { - SpriteInfo::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(SpriteInfo* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.SpriteInfo"; - } - protected: - explicit SpriteInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kSpriteIdFieldNumber = 5, - kBoundingBoxPerDirectionFieldNumber = 9, - kAnimationFieldNumber = 6, - kPatternWidthFieldNumber = 1, - kPatternHeightFieldNumber = 2, - kPatternDepthFieldNumber = 3, - kLayersFieldNumber = 4, - kBoundingSquareFieldNumber = 7, - kIsOpaqueFieldNumber = 8, - }; - // repeated uint32 sprite_id = 5; - int sprite_id_size() const; - private: - int _internal_sprite_id_size() const; - public: - void clear_sprite_id(); - private: - uint32_t _internal_sprite_id(int index) const; - const ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint32_t >& - _internal_sprite_id() const; - void _internal_add_sprite_id(uint32_t value); - ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint32_t >* - _internal_mutable_sprite_id(); - public: - uint32_t sprite_id(int index) const; - void set_sprite_id(int index, uint32_t value); - void add_sprite_id(uint32_t value); - const ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint32_t >& - sprite_id() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint32_t >* - mutable_sprite_id(); - - // repeated .Canary.protobuf.appearances.Box bounding_box_per_direction = 9; - int bounding_box_per_direction_size() const; - private: - int _internal_bounding_box_per_direction_size() const; - public: - void clear_bounding_box_per_direction(); - ::Canary::protobuf::appearances::Box* mutable_bounding_box_per_direction(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Box >* - mutable_bounding_box_per_direction(); - private: - const ::Canary::protobuf::appearances::Box& _internal_bounding_box_per_direction(int index) const; - ::Canary::protobuf::appearances::Box* _internal_add_bounding_box_per_direction(); - public: - const ::Canary::protobuf::appearances::Box& bounding_box_per_direction(int index) const; - ::Canary::protobuf::appearances::Box* add_bounding_box_per_direction(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Box >& - bounding_box_per_direction() const; - - // optional .Canary.protobuf.appearances.SpriteAnimation animation = 6; - bool has_animation() const; - private: - bool _internal_has_animation() const; - public: - void clear_animation(); - const ::Canary::protobuf::appearances::SpriteAnimation& animation() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::SpriteAnimation* release_animation(); - ::Canary::protobuf::appearances::SpriteAnimation* mutable_animation(); - void set_allocated_animation(::Canary::protobuf::appearances::SpriteAnimation* animation); - private: - const ::Canary::protobuf::appearances::SpriteAnimation& _internal_animation() const; - ::Canary::protobuf::appearances::SpriteAnimation* _internal_mutable_animation(); - public: - void unsafe_arena_set_allocated_animation( - ::Canary::protobuf::appearances::SpriteAnimation* animation); - ::Canary::protobuf::appearances::SpriteAnimation* unsafe_arena_release_animation(); - - // optional uint32 pattern_width = 1; - bool has_pattern_width() const; - private: - bool _internal_has_pattern_width() const; - public: - void clear_pattern_width(); - uint32_t pattern_width() const; - void set_pattern_width(uint32_t value); - private: - uint32_t _internal_pattern_width() const; - void _internal_set_pattern_width(uint32_t value); - public: - - // optional uint32 pattern_height = 2; - bool has_pattern_height() const; - private: - bool _internal_has_pattern_height() const; - public: - void clear_pattern_height(); - uint32_t pattern_height() const; - void set_pattern_height(uint32_t value); - private: - uint32_t _internal_pattern_height() const; - void _internal_set_pattern_height(uint32_t value); - public: - - // optional uint32 pattern_depth = 3; - bool has_pattern_depth() const; - private: - bool _internal_has_pattern_depth() const; - public: - void clear_pattern_depth(); - uint32_t pattern_depth() const; - void set_pattern_depth(uint32_t value); - private: - uint32_t _internal_pattern_depth() const; - void _internal_set_pattern_depth(uint32_t value); - public: - - // optional uint32 layers = 4; - bool has_layers() const; - private: - bool _internal_has_layers() const; - public: - void clear_layers(); - uint32_t layers() const; - void set_layers(uint32_t value); - private: - uint32_t _internal_layers() const; - void _internal_set_layers(uint32_t value); - public: - - // optional uint32 bounding_square = 7; - bool has_bounding_square() const; - private: - bool _internal_has_bounding_square() const; - public: - void clear_bounding_square(); - uint32_t bounding_square() const; - void set_bounding_square(uint32_t value); - private: - uint32_t _internal_bounding_square() const; - void _internal_set_bounding_square(uint32_t value); - public: - - // optional bool is_opaque = 8; - bool has_is_opaque() const; - private: - bool _internal_has_is_opaque() const; - public: - void clear_is_opaque(); - bool is_opaque() const; - void set_is_opaque(bool value); - private: - bool _internal_is_opaque() const; - void _internal_set_is_opaque(bool value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.SpriteInfo) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint32_t > sprite_id_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Box > bounding_box_per_direction_; - ::Canary::protobuf::appearances::SpriteAnimation* animation_; - uint32_t pattern_width_; - uint32_t pattern_height_; - uint32_t pattern_depth_; - uint32_t layers_; - uint32_t bounding_square_; - bool is_opaque_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class FrameGroup final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.FrameGroup) */ { - public: - inline FrameGroup() : FrameGroup(nullptr) {} - ~FrameGroup() override; - explicit PROTOBUF_CONSTEXPR FrameGroup(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - FrameGroup(const FrameGroup& from); - FrameGroup(FrameGroup&& from) noexcept - : FrameGroup() { - *this = ::std::move(from); - } - - inline FrameGroup& operator=(const FrameGroup& from) { - CopyFrom(from); - return *this; - } - inline FrameGroup& operator=(FrameGroup&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const FrameGroup& default_instance() { - return *internal_default_instance(); - } - static inline const FrameGroup* internal_default_instance() { - return reinterpret_cast( - &_FrameGroup_default_instance_); - } - static constexpr int kIndexInFileMessages = - 6; - - friend void swap(FrameGroup& a, FrameGroup& b) { - a.Swap(&b); - } - inline void Swap(FrameGroup* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(FrameGroup* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - FrameGroup* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const FrameGroup& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const FrameGroup& from) { - FrameGroup::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(FrameGroup* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.FrameGroup"; - } - protected: - explicit FrameGroup(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kSpriteInfoFieldNumber = 3, - kFixedFrameGroupFieldNumber = 1, - kIdFieldNumber = 2, - }; - // optional .Canary.protobuf.appearances.SpriteInfo sprite_info = 3; - bool has_sprite_info() const; - private: - bool _internal_has_sprite_info() const; - public: - void clear_sprite_info(); - const ::Canary::protobuf::appearances::SpriteInfo& sprite_info() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::SpriteInfo* release_sprite_info(); - ::Canary::protobuf::appearances::SpriteInfo* mutable_sprite_info(); - void set_allocated_sprite_info(::Canary::protobuf::appearances::SpriteInfo* sprite_info); - private: - const ::Canary::protobuf::appearances::SpriteInfo& _internal_sprite_info() const; - ::Canary::protobuf::appearances::SpriteInfo* _internal_mutable_sprite_info(); - public: - void unsafe_arena_set_allocated_sprite_info( - ::Canary::protobuf::appearances::SpriteInfo* sprite_info); - ::Canary::protobuf::appearances::SpriteInfo* unsafe_arena_release_sprite_info(); - - // optional .Canary.protobuf.appearances.FIXED_FRAME_GROUP fixed_frame_group = 1; - bool has_fixed_frame_group() const; - private: - bool _internal_has_fixed_frame_group() const; - public: - void clear_fixed_frame_group(); - ::Canary::protobuf::appearances::FIXED_FRAME_GROUP fixed_frame_group() const; - void set_fixed_frame_group(::Canary::protobuf::appearances::FIXED_FRAME_GROUP value); - private: - ::Canary::protobuf::appearances::FIXED_FRAME_GROUP _internal_fixed_frame_group() const; - void _internal_set_fixed_frame_group(::Canary::protobuf::appearances::FIXED_FRAME_GROUP value); - public: - - // optional uint32 id = 2; - bool has_id() const; - private: - bool _internal_has_id() const; - public: - void clear_id(); - uint32_t id() const; - void set_id(uint32_t value); - private: - uint32_t _internal_id() const; - void _internal_set_id(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.FrameGroup) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::Canary::protobuf::appearances::SpriteInfo* sprite_info_; - int fixed_frame_group_; - uint32_t id_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class Appearance final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.Appearance) */ { - public: - inline Appearance() : Appearance(nullptr) {} - ~Appearance() override; - explicit PROTOBUF_CONSTEXPR Appearance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - Appearance(const Appearance& from); - Appearance(Appearance&& from) noexcept - : Appearance() { - *this = ::std::move(from); - } - - inline Appearance& operator=(const Appearance& from) { - CopyFrom(from); - return *this; - } - inline Appearance& operator=(Appearance&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const Appearance& default_instance() { - return *internal_default_instance(); - } - static inline const Appearance* internal_default_instance() { - return reinterpret_cast( - &_Appearance_default_instance_); - } - static constexpr int kIndexInFileMessages = - 7; - - friend void swap(Appearance& a, Appearance& b) { - a.Swap(&b); - } - inline void Swap(Appearance* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Appearance* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Appearance* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const Appearance& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const Appearance& from) { - Appearance::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Appearance* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.Appearance"; - } - protected: - explicit Appearance(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kFrameGroupFieldNumber = 2, - kNameFieldNumber = 4, - kDescriptionFieldNumber = 5, - kFlagsFieldNumber = 3, - kIdFieldNumber = 1, - }; - // repeated .Canary.protobuf.appearances.FrameGroup frame_group = 2; - int frame_group_size() const; - private: - int _internal_frame_group_size() const; - public: - void clear_frame_group(); - ::Canary::protobuf::appearances::FrameGroup* mutable_frame_group(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::FrameGroup >* - mutable_frame_group(); - private: - const ::Canary::protobuf::appearances::FrameGroup& _internal_frame_group(int index) const; - ::Canary::protobuf::appearances::FrameGroup* _internal_add_frame_group(); - public: - const ::Canary::protobuf::appearances::FrameGroup& frame_group(int index) const; - ::Canary::protobuf::appearances::FrameGroup* add_frame_group(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::FrameGroup >& - frame_group() const; - - // optional bytes name = 4; - bool has_name() const; - private: - bool _internal_has_name() const; - public: - void clear_name(); - const std::string& name() const; - template - void set_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_name(); - PROTOBUF_NODISCARD std::string* release_name(); - void set_allocated_name(std::string* name); - private: - const std::string& _internal_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); - std::string* _internal_mutable_name(); - public: - - // optional bytes description = 5; - bool has_description() const; - private: - bool _internal_has_description() const; - public: - void clear_description(); - const std::string& description() const; - template - void set_description(ArgT0&& arg0, ArgT... args); - std::string* mutable_description(); - PROTOBUF_NODISCARD std::string* release_description(); - void set_allocated_description(std::string* description); - private: - const std::string& _internal_description() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_description(const std::string& value); - std::string* _internal_mutable_description(); - public: - - // optional .Canary.protobuf.appearances.AppearanceFlags flags = 3; - bool has_flags() const; - private: - bool _internal_has_flags() const; - public: - void clear_flags(); - const ::Canary::protobuf::appearances::AppearanceFlags& flags() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::AppearanceFlags* release_flags(); - ::Canary::protobuf::appearances::AppearanceFlags* mutable_flags(); - void set_allocated_flags(::Canary::protobuf::appearances::AppearanceFlags* flags); - private: - const ::Canary::protobuf::appearances::AppearanceFlags& _internal_flags() const; - ::Canary::protobuf::appearances::AppearanceFlags* _internal_mutable_flags(); - public: - void unsafe_arena_set_allocated_flags( - ::Canary::protobuf::appearances::AppearanceFlags* flags); - ::Canary::protobuf::appearances::AppearanceFlags* unsafe_arena_release_flags(); - - // optional uint32 id = 1; - bool has_id() const; - private: - bool _internal_has_id() const; - public: - void clear_id(); - uint32_t id() const; - void set_id(uint32_t value); - private: - uint32_t _internal_id() const; - void _internal_set_id(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.Appearance) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::FrameGroup > frame_group_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr description_; - ::Canary::protobuf::appearances::AppearanceFlags* flags_; - uint32_t id_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class AppearanceFlags final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.AppearanceFlags) */ { - public: - inline AppearanceFlags() : AppearanceFlags(nullptr) {} - ~AppearanceFlags() override; - explicit PROTOBUF_CONSTEXPR AppearanceFlags(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppearanceFlags(const AppearanceFlags& from); - AppearanceFlags(AppearanceFlags&& from) noexcept - : AppearanceFlags() { - *this = ::std::move(from); - } - - inline AppearanceFlags& operator=(const AppearanceFlags& from) { - CopyFrom(from); - return *this; - } - inline AppearanceFlags& operator=(AppearanceFlags&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppearanceFlags& default_instance() { - return *internal_default_instance(); - } - static inline const AppearanceFlags* internal_default_instance() { - return reinterpret_cast( - &_AppearanceFlags_default_instance_); - } - static constexpr int kIndexInFileMessages = - 8; - - friend void swap(AppearanceFlags& a, AppearanceFlags& b) { - a.Swap(&b); - } - inline void Swap(AppearanceFlags* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppearanceFlags* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppearanceFlags* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppearanceFlags& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppearanceFlags& from) { - AppearanceFlags::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppearanceFlags* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.AppearanceFlags"; - } - protected: - explicit AppearanceFlags(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kNpcsaledataFieldNumber = 40, - kBankFieldNumber = 1, - kWriteFieldNumber = 10, - kWriteOnceFieldNumber = 11, - kHookFieldNumber = 21, - kLightFieldNumber = 23, - kShiftFieldNumber = 26, - kHeightFieldNumber = 27, - kAutomapFieldNumber = 30, - kLenshelpFieldNumber = 31, - kClothesFieldNumber = 34, - kDefaultActionFieldNumber = 35, - kMarketFieldNumber = 36, - kChangedtoexpireFieldNumber = 41, - kCyclopediaitemFieldNumber = 44, - kUpgradeclassificationFieldNumber = 48, - kClipFieldNumber = 2, - kBottomFieldNumber = 3, - kTopFieldNumber = 4, - kContainerFieldNumber = 5, - kCumulativeFieldNumber = 6, - kUsableFieldNumber = 7, - kForceuseFieldNumber = 8, - kMultiuseFieldNumber = 9, - kLiquidpoolFieldNumber = 12, - kUnpassFieldNumber = 13, - kUnmoveFieldNumber = 14, - kUnsightFieldNumber = 15, - kAvoidFieldNumber = 16, - kNoMovementAnimationFieldNumber = 17, - kTakeFieldNumber = 18, - kLiquidcontainerFieldNumber = 19, - kHangFieldNumber = 20, - kRotateFieldNumber = 22, - kDontHideFieldNumber = 24, - kTranslucentFieldNumber = 25, - kLyingObjectFieldNumber = 28, - kAnimateAlwaysFieldNumber = 29, - kFullbankFieldNumber = 32, - kIgnoreLookFieldNumber = 33, - kWrapFieldNumber = 37, - kUnwrapFieldNumber = 38, - kTopeffectFieldNumber = 39, - kCorpseFieldNumber = 42, - kPlayerCorpseFieldNumber = 43, - kAmmoFieldNumber = 45, - kShowOffSocketFieldNumber = 46, - kReportableFieldNumber = 47, - kReverseAddonsEastFieldNumber = 49, - kReverseAddonsWestFieldNumber = 50, - kReverseAddonsSouthFieldNumber = 51, - kReverseAddonsNorthFieldNumber = 52, - kWearoutFieldNumber = 53, - kClockexpireFieldNumber = 54, - kExpireFieldNumber = 55, - kExpirestopFieldNumber = 56, - kWrapkitFieldNumber = 57, - }; - // repeated .Canary.protobuf.appearances.AppearanceFlagNPC npcsaledata = 40; - int npcsaledata_size() const; - private: - int _internal_npcsaledata_size() const; - public: - void clear_npcsaledata(); - ::Canary::protobuf::appearances::AppearanceFlagNPC* mutable_npcsaledata(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::AppearanceFlagNPC >* - mutable_npcsaledata(); - private: - const ::Canary::protobuf::appearances::AppearanceFlagNPC& _internal_npcsaledata(int index) const; - ::Canary::protobuf::appearances::AppearanceFlagNPC* _internal_add_npcsaledata(); - public: - const ::Canary::protobuf::appearances::AppearanceFlagNPC& npcsaledata(int index) const; - ::Canary::protobuf::appearances::AppearanceFlagNPC* add_npcsaledata(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::AppearanceFlagNPC >& - npcsaledata() const; - - // optional .Canary.protobuf.appearances.AppearanceFlagBank bank = 1; - bool has_bank() const; - private: - bool _internal_has_bank() const; - public: - void clear_bank(); - const ::Canary::protobuf::appearances::AppearanceFlagBank& bank() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::AppearanceFlagBank* release_bank(); - ::Canary::protobuf::appearances::AppearanceFlagBank* mutable_bank(); - void set_allocated_bank(::Canary::protobuf::appearances::AppearanceFlagBank* bank); - private: - const ::Canary::protobuf::appearances::AppearanceFlagBank& _internal_bank() const; - ::Canary::protobuf::appearances::AppearanceFlagBank* _internal_mutable_bank(); - public: - void unsafe_arena_set_allocated_bank( - ::Canary::protobuf::appearances::AppearanceFlagBank* bank); - ::Canary::protobuf::appearances::AppearanceFlagBank* unsafe_arena_release_bank(); - - // optional .Canary.protobuf.appearances.AppearanceFlagWrite write = 10; - bool has_write() const; - private: - bool _internal_has_write() const; - public: - void clear_write(); - const ::Canary::protobuf::appearances::AppearanceFlagWrite& write() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::AppearanceFlagWrite* release_write(); - ::Canary::protobuf::appearances::AppearanceFlagWrite* mutable_write(); - void set_allocated_write(::Canary::protobuf::appearances::AppearanceFlagWrite* write); - private: - const ::Canary::protobuf::appearances::AppearanceFlagWrite& _internal_write() const; - ::Canary::protobuf::appearances::AppearanceFlagWrite* _internal_mutable_write(); - public: - void unsafe_arena_set_allocated_write( - ::Canary::protobuf::appearances::AppearanceFlagWrite* write); - ::Canary::protobuf::appearances::AppearanceFlagWrite* unsafe_arena_release_write(); - - // optional .Canary.protobuf.appearances.AppearanceFlagWriteOnce write_once = 11; - bool has_write_once() const; - private: - bool _internal_has_write_once() const; - public: - void clear_write_once(); - const ::Canary::protobuf::appearances::AppearanceFlagWriteOnce& write_once() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::AppearanceFlagWriteOnce* release_write_once(); - ::Canary::protobuf::appearances::AppearanceFlagWriteOnce* mutable_write_once(); - void set_allocated_write_once(::Canary::protobuf::appearances::AppearanceFlagWriteOnce* write_once); - private: - const ::Canary::protobuf::appearances::AppearanceFlagWriteOnce& _internal_write_once() const; - ::Canary::protobuf::appearances::AppearanceFlagWriteOnce* _internal_mutable_write_once(); - public: - void unsafe_arena_set_allocated_write_once( - ::Canary::protobuf::appearances::AppearanceFlagWriteOnce* write_once); - ::Canary::protobuf::appearances::AppearanceFlagWriteOnce* unsafe_arena_release_write_once(); - - // optional .Canary.protobuf.appearances.AppearanceFlagHook hook = 21; - bool has_hook() const; - private: - bool _internal_has_hook() const; - public: - void clear_hook(); - const ::Canary::protobuf::appearances::AppearanceFlagHook& hook() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::AppearanceFlagHook* release_hook(); - ::Canary::protobuf::appearances::AppearanceFlagHook* mutable_hook(); - void set_allocated_hook(::Canary::protobuf::appearances::AppearanceFlagHook* hook); - private: - const ::Canary::protobuf::appearances::AppearanceFlagHook& _internal_hook() const; - ::Canary::protobuf::appearances::AppearanceFlagHook* _internal_mutable_hook(); - public: - void unsafe_arena_set_allocated_hook( - ::Canary::protobuf::appearances::AppearanceFlagHook* hook); - ::Canary::protobuf::appearances::AppearanceFlagHook* unsafe_arena_release_hook(); - - // optional .Canary.protobuf.appearances.AppearanceFlagLight light = 23; - bool has_light() const; - private: - bool _internal_has_light() const; - public: - void clear_light(); - const ::Canary::protobuf::appearances::AppearanceFlagLight& light() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::AppearanceFlagLight* release_light(); - ::Canary::protobuf::appearances::AppearanceFlagLight* mutable_light(); - void set_allocated_light(::Canary::protobuf::appearances::AppearanceFlagLight* light); - private: - const ::Canary::protobuf::appearances::AppearanceFlagLight& _internal_light() const; - ::Canary::protobuf::appearances::AppearanceFlagLight* _internal_mutable_light(); - public: - void unsafe_arena_set_allocated_light( - ::Canary::protobuf::appearances::AppearanceFlagLight* light); - ::Canary::protobuf::appearances::AppearanceFlagLight* unsafe_arena_release_light(); - - // optional .Canary.protobuf.appearances.AppearanceFlagShift shift = 26; - bool has_shift() const; - private: - bool _internal_has_shift() const; - public: - void clear_shift(); - const ::Canary::protobuf::appearances::AppearanceFlagShift& shift() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::AppearanceFlagShift* release_shift(); - ::Canary::protobuf::appearances::AppearanceFlagShift* mutable_shift(); - void set_allocated_shift(::Canary::protobuf::appearances::AppearanceFlagShift* shift); - private: - const ::Canary::protobuf::appearances::AppearanceFlagShift& _internal_shift() const; - ::Canary::protobuf::appearances::AppearanceFlagShift* _internal_mutable_shift(); - public: - void unsafe_arena_set_allocated_shift( - ::Canary::protobuf::appearances::AppearanceFlagShift* shift); - ::Canary::protobuf::appearances::AppearanceFlagShift* unsafe_arena_release_shift(); - - // optional .Canary.protobuf.appearances.AppearanceFlagHeight height = 27; - bool has_height() const; - private: - bool _internal_has_height() const; - public: - void clear_height(); - const ::Canary::protobuf::appearances::AppearanceFlagHeight& height() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::AppearanceFlagHeight* release_height(); - ::Canary::protobuf::appearances::AppearanceFlagHeight* mutable_height(); - void set_allocated_height(::Canary::protobuf::appearances::AppearanceFlagHeight* height); - private: - const ::Canary::protobuf::appearances::AppearanceFlagHeight& _internal_height() const; - ::Canary::protobuf::appearances::AppearanceFlagHeight* _internal_mutable_height(); - public: - void unsafe_arena_set_allocated_height( - ::Canary::protobuf::appearances::AppearanceFlagHeight* height); - ::Canary::protobuf::appearances::AppearanceFlagHeight* unsafe_arena_release_height(); - - // optional .Canary.protobuf.appearances.AppearanceFlagAutomap automap = 30; - bool has_automap() const; - private: - bool _internal_has_automap() const; - public: - void clear_automap(); - const ::Canary::protobuf::appearances::AppearanceFlagAutomap& automap() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::AppearanceFlagAutomap* release_automap(); - ::Canary::protobuf::appearances::AppearanceFlagAutomap* mutable_automap(); - void set_allocated_automap(::Canary::protobuf::appearances::AppearanceFlagAutomap* automap); - private: - const ::Canary::protobuf::appearances::AppearanceFlagAutomap& _internal_automap() const; - ::Canary::protobuf::appearances::AppearanceFlagAutomap* _internal_mutable_automap(); - public: - void unsafe_arena_set_allocated_automap( - ::Canary::protobuf::appearances::AppearanceFlagAutomap* automap); - ::Canary::protobuf::appearances::AppearanceFlagAutomap* unsafe_arena_release_automap(); - - // optional .Canary.protobuf.appearances.AppearanceFlagLenshelp lenshelp = 31; - bool has_lenshelp() const; - private: - bool _internal_has_lenshelp() const; - public: - void clear_lenshelp(); - const ::Canary::protobuf::appearances::AppearanceFlagLenshelp& lenshelp() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::AppearanceFlagLenshelp* release_lenshelp(); - ::Canary::protobuf::appearances::AppearanceFlagLenshelp* mutable_lenshelp(); - void set_allocated_lenshelp(::Canary::protobuf::appearances::AppearanceFlagLenshelp* lenshelp); - private: - const ::Canary::protobuf::appearances::AppearanceFlagLenshelp& _internal_lenshelp() const; - ::Canary::protobuf::appearances::AppearanceFlagLenshelp* _internal_mutable_lenshelp(); - public: - void unsafe_arena_set_allocated_lenshelp( - ::Canary::protobuf::appearances::AppearanceFlagLenshelp* lenshelp); - ::Canary::protobuf::appearances::AppearanceFlagLenshelp* unsafe_arena_release_lenshelp(); - - // optional .Canary.protobuf.appearances.AppearanceFlagClothes clothes = 34; - bool has_clothes() const; - private: - bool _internal_has_clothes() const; - public: - void clear_clothes(); - const ::Canary::protobuf::appearances::AppearanceFlagClothes& clothes() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::AppearanceFlagClothes* release_clothes(); - ::Canary::protobuf::appearances::AppearanceFlagClothes* mutable_clothes(); - void set_allocated_clothes(::Canary::protobuf::appearances::AppearanceFlagClothes* clothes); - private: - const ::Canary::protobuf::appearances::AppearanceFlagClothes& _internal_clothes() const; - ::Canary::protobuf::appearances::AppearanceFlagClothes* _internal_mutable_clothes(); - public: - void unsafe_arena_set_allocated_clothes( - ::Canary::protobuf::appearances::AppearanceFlagClothes* clothes); - ::Canary::protobuf::appearances::AppearanceFlagClothes* unsafe_arena_release_clothes(); - - // optional .Canary.protobuf.appearances.AppearanceFlagDefaultAction default_action = 35; - bool has_default_action() const; - private: - bool _internal_has_default_action() const; - public: - void clear_default_action(); - const ::Canary::protobuf::appearances::AppearanceFlagDefaultAction& default_action() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::AppearanceFlagDefaultAction* release_default_action(); - ::Canary::protobuf::appearances::AppearanceFlagDefaultAction* mutable_default_action(); - void set_allocated_default_action(::Canary::protobuf::appearances::AppearanceFlagDefaultAction* default_action); - private: - const ::Canary::protobuf::appearances::AppearanceFlagDefaultAction& _internal_default_action() const; - ::Canary::protobuf::appearances::AppearanceFlagDefaultAction* _internal_mutable_default_action(); - public: - void unsafe_arena_set_allocated_default_action( - ::Canary::protobuf::appearances::AppearanceFlagDefaultAction* default_action); - ::Canary::protobuf::appearances::AppearanceFlagDefaultAction* unsafe_arena_release_default_action(); - - // optional .Canary.protobuf.appearances.AppearanceFlagMarket market = 36; - bool has_market() const; - private: - bool _internal_has_market() const; - public: - void clear_market(); - const ::Canary::protobuf::appearances::AppearanceFlagMarket& market() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::AppearanceFlagMarket* release_market(); - ::Canary::protobuf::appearances::AppearanceFlagMarket* mutable_market(); - void set_allocated_market(::Canary::protobuf::appearances::AppearanceFlagMarket* market); - private: - const ::Canary::protobuf::appearances::AppearanceFlagMarket& _internal_market() const; - ::Canary::protobuf::appearances::AppearanceFlagMarket* _internal_mutable_market(); - public: - void unsafe_arena_set_allocated_market( - ::Canary::protobuf::appearances::AppearanceFlagMarket* market); - ::Canary::protobuf::appearances::AppearanceFlagMarket* unsafe_arena_release_market(); - - // optional .Canary.protobuf.appearances.AppearanceFlagChangedToExpire changedtoexpire = 41; - bool has_changedtoexpire() const; - private: - bool _internal_has_changedtoexpire() const; - public: - void clear_changedtoexpire(); - const ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire& changedtoexpire() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* release_changedtoexpire(); - ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* mutable_changedtoexpire(); - void set_allocated_changedtoexpire(::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* changedtoexpire); - private: - const ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire& _internal_changedtoexpire() const; - ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* _internal_mutable_changedtoexpire(); - public: - void unsafe_arena_set_allocated_changedtoexpire( - ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* changedtoexpire); - ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* unsafe_arena_release_changedtoexpire(); - - // optional .Canary.protobuf.appearances.AppearanceFlagCyclopedia cyclopediaitem = 44; - bool has_cyclopediaitem() const; - private: - bool _internal_has_cyclopediaitem() const; - public: - void clear_cyclopediaitem(); - const ::Canary::protobuf::appearances::AppearanceFlagCyclopedia& cyclopediaitem() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::AppearanceFlagCyclopedia* release_cyclopediaitem(); - ::Canary::protobuf::appearances::AppearanceFlagCyclopedia* mutable_cyclopediaitem(); - void set_allocated_cyclopediaitem(::Canary::protobuf::appearances::AppearanceFlagCyclopedia* cyclopediaitem); - private: - const ::Canary::protobuf::appearances::AppearanceFlagCyclopedia& _internal_cyclopediaitem() const; - ::Canary::protobuf::appearances::AppearanceFlagCyclopedia* _internal_mutable_cyclopediaitem(); - public: - void unsafe_arena_set_allocated_cyclopediaitem( - ::Canary::protobuf::appearances::AppearanceFlagCyclopedia* cyclopediaitem); - ::Canary::protobuf::appearances::AppearanceFlagCyclopedia* unsafe_arena_release_cyclopediaitem(); - - // optional .Canary.protobuf.appearances.AppearanceFlagUpgradeClassification upgradeclassification = 48; - bool has_upgradeclassification() const; - private: - bool _internal_has_upgradeclassification() const; - public: - void clear_upgradeclassification(); - const ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification& upgradeclassification() const; - PROTOBUF_NODISCARD ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* release_upgradeclassification(); - ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* mutable_upgradeclassification(); - void set_allocated_upgradeclassification(::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* upgradeclassification); - private: - const ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification& _internal_upgradeclassification() const; - ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* _internal_mutable_upgradeclassification(); - public: - void unsafe_arena_set_allocated_upgradeclassification( - ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* upgradeclassification); - ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* unsafe_arena_release_upgradeclassification(); - - // optional bool clip = 2; - bool has_clip() const; - private: - bool _internal_has_clip() const; - public: - void clear_clip(); - bool clip() const; - void set_clip(bool value); - private: - bool _internal_clip() const; - void _internal_set_clip(bool value); - public: - - // optional bool bottom = 3; - bool has_bottom() const; - private: - bool _internal_has_bottom() const; - public: - void clear_bottom(); - bool bottom() const; - void set_bottom(bool value); - private: - bool _internal_bottom() const; - void _internal_set_bottom(bool value); - public: - - // optional bool top = 4; - bool has_top() const; - private: - bool _internal_has_top() const; - public: - void clear_top(); - bool top() const; - void set_top(bool value); - private: - bool _internal_top() const; - void _internal_set_top(bool value); - public: - - // optional bool container = 5; - bool has_container() const; - private: - bool _internal_has_container() const; - public: - void clear_container(); - bool container() const; - void set_container(bool value); - private: - bool _internal_container() const; - void _internal_set_container(bool value); - public: - - // optional bool cumulative = 6; - bool has_cumulative() const; - private: - bool _internal_has_cumulative() const; - public: - void clear_cumulative(); - bool cumulative() const; - void set_cumulative(bool value); - private: - bool _internal_cumulative() const; - void _internal_set_cumulative(bool value); - public: - - // optional bool usable = 7; - bool has_usable() const; - private: - bool _internal_has_usable() const; - public: - void clear_usable(); - bool usable() const; - void set_usable(bool value); - private: - bool _internal_usable() const; - void _internal_set_usable(bool value); - public: - - // optional bool forceuse = 8; - bool has_forceuse() const; - private: - bool _internal_has_forceuse() const; - public: - void clear_forceuse(); - bool forceuse() const; - void set_forceuse(bool value); - private: - bool _internal_forceuse() const; - void _internal_set_forceuse(bool value); - public: - - // optional bool multiuse = 9; - bool has_multiuse() const; - private: - bool _internal_has_multiuse() const; - public: - void clear_multiuse(); - bool multiuse() const; - void set_multiuse(bool value); - private: - bool _internal_multiuse() const; - void _internal_set_multiuse(bool value); - public: - - // optional bool liquidpool = 12; - bool has_liquidpool() const; - private: - bool _internal_has_liquidpool() const; - public: - void clear_liquidpool(); - bool liquidpool() const; - void set_liquidpool(bool value); - private: - bool _internal_liquidpool() const; - void _internal_set_liquidpool(bool value); - public: - - // optional bool unpass = 13; - bool has_unpass() const; - private: - bool _internal_has_unpass() const; - public: - void clear_unpass(); - bool unpass() const; - void set_unpass(bool value); - private: - bool _internal_unpass() const; - void _internal_set_unpass(bool value); - public: - - // optional bool unmove = 14; - bool has_unmove() const; - private: - bool _internal_has_unmove() const; - public: - void clear_unmove(); - bool unmove() const; - void set_unmove(bool value); - private: - bool _internal_unmove() const; - void _internal_set_unmove(bool value); - public: - - // optional bool unsight = 15; - bool has_unsight() const; - private: - bool _internal_has_unsight() const; - public: - void clear_unsight(); - bool unsight() const; - void set_unsight(bool value); - private: - bool _internal_unsight() const; - void _internal_set_unsight(bool value); - public: - - // optional bool avoid = 16; - bool has_avoid() const; - private: - bool _internal_has_avoid() const; - public: - void clear_avoid(); - bool avoid() const; - void set_avoid(bool value); - private: - bool _internal_avoid() const; - void _internal_set_avoid(bool value); - public: - - // optional bool no_movement_animation = 17; - bool has_no_movement_animation() const; - private: - bool _internal_has_no_movement_animation() const; - public: - void clear_no_movement_animation(); - bool no_movement_animation() const; - void set_no_movement_animation(bool value); - private: - bool _internal_no_movement_animation() const; - void _internal_set_no_movement_animation(bool value); - public: - - // optional bool take = 18; - bool has_take() const; - private: - bool _internal_has_take() const; - public: - void clear_take(); - bool take() const; - void set_take(bool value); - private: - bool _internal_take() const; - void _internal_set_take(bool value); - public: - - // optional bool liquidcontainer = 19; - bool has_liquidcontainer() const; - private: - bool _internal_has_liquidcontainer() const; - public: - void clear_liquidcontainer(); - bool liquidcontainer() const; - void set_liquidcontainer(bool value); - private: - bool _internal_liquidcontainer() const; - void _internal_set_liquidcontainer(bool value); - public: - - // optional bool hang = 20; - bool has_hang() const; - private: - bool _internal_has_hang() const; - public: - void clear_hang(); - bool hang() const; - void set_hang(bool value); - private: - bool _internal_hang() const; - void _internal_set_hang(bool value); - public: - - // optional bool rotate = 22; - bool has_rotate() const; - private: - bool _internal_has_rotate() const; - public: - void clear_rotate(); - bool rotate() const; - void set_rotate(bool value); - private: - bool _internal_rotate() const; - void _internal_set_rotate(bool value); - public: - - // optional bool dont_hide = 24; - bool has_dont_hide() const; - private: - bool _internal_has_dont_hide() const; - public: - void clear_dont_hide(); - bool dont_hide() const; - void set_dont_hide(bool value); - private: - bool _internal_dont_hide() const; - void _internal_set_dont_hide(bool value); - public: - - // optional bool translucent = 25; - bool has_translucent() const; - private: - bool _internal_has_translucent() const; - public: - void clear_translucent(); - bool translucent() const; - void set_translucent(bool value); - private: - bool _internal_translucent() const; - void _internal_set_translucent(bool value); - public: - - // optional bool lying_object = 28; - bool has_lying_object() const; - private: - bool _internal_has_lying_object() const; - public: - void clear_lying_object(); - bool lying_object() const; - void set_lying_object(bool value); - private: - bool _internal_lying_object() const; - void _internal_set_lying_object(bool value); - public: - - // optional bool animate_always = 29; - bool has_animate_always() const; - private: - bool _internal_has_animate_always() const; - public: - void clear_animate_always(); - bool animate_always() const; - void set_animate_always(bool value); - private: - bool _internal_animate_always() const; - void _internal_set_animate_always(bool value); - public: - - // optional bool fullbank = 32; - bool has_fullbank() const; - private: - bool _internal_has_fullbank() const; - public: - void clear_fullbank(); - bool fullbank() const; - void set_fullbank(bool value); - private: - bool _internal_fullbank() const; - void _internal_set_fullbank(bool value); - public: - - // optional bool ignore_look = 33; - bool has_ignore_look() const; - private: - bool _internal_has_ignore_look() const; - public: - void clear_ignore_look(); - bool ignore_look() const; - void set_ignore_look(bool value); - private: - bool _internal_ignore_look() const; - void _internal_set_ignore_look(bool value); - public: - - // optional bool wrap = 37; - bool has_wrap() const; - private: - bool _internal_has_wrap() const; - public: - void clear_wrap(); - bool wrap() const; - void set_wrap(bool value); - private: - bool _internal_wrap() const; - void _internal_set_wrap(bool value); - public: - - // optional bool unwrap = 38; - bool has_unwrap() const; - private: - bool _internal_has_unwrap() const; - public: - void clear_unwrap(); - bool unwrap() const; - void set_unwrap(bool value); - private: - bool _internal_unwrap() const; - void _internal_set_unwrap(bool value); - public: - - // optional bool topeffect = 39; - bool has_topeffect() const; - private: - bool _internal_has_topeffect() const; - public: - void clear_topeffect(); - bool topeffect() const; - void set_topeffect(bool value); - private: - bool _internal_topeffect() const; - void _internal_set_topeffect(bool value); - public: - - // optional bool corpse = 42; - bool has_corpse() const; - private: - bool _internal_has_corpse() const; - public: - void clear_corpse(); - bool corpse() const; - void set_corpse(bool value); - private: - bool _internal_corpse() const; - void _internal_set_corpse(bool value); - public: - - // optional bool player_corpse = 43; - bool has_player_corpse() const; - private: - bool _internal_has_player_corpse() const; - public: - void clear_player_corpse(); - bool player_corpse() const; - void set_player_corpse(bool value); - private: - bool _internal_player_corpse() const; - void _internal_set_player_corpse(bool value); - public: - - // optional bool ammo = 45; - bool has_ammo() const; - private: - bool _internal_has_ammo() const; - public: - void clear_ammo(); - bool ammo() const; - void set_ammo(bool value); - private: - bool _internal_ammo() const; - void _internal_set_ammo(bool value); - public: - - // optional bool show_off_socket = 46; - bool has_show_off_socket() const; - private: - bool _internal_has_show_off_socket() const; - public: - void clear_show_off_socket(); - bool show_off_socket() const; - void set_show_off_socket(bool value); - private: - bool _internal_show_off_socket() const; - void _internal_set_show_off_socket(bool value); - public: - - // optional bool reportable = 47; - bool has_reportable() const; - private: - bool _internal_has_reportable() const; - public: - void clear_reportable(); - bool reportable() const; - void set_reportable(bool value); - private: - bool _internal_reportable() const; - void _internal_set_reportable(bool value); - public: - - // optional bool reverse_addons_east = 49; - bool has_reverse_addons_east() const; - private: - bool _internal_has_reverse_addons_east() const; - public: - void clear_reverse_addons_east(); - bool reverse_addons_east() const; - void set_reverse_addons_east(bool value); - private: - bool _internal_reverse_addons_east() const; - void _internal_set_reverse_addons_east(bool value); - public: - - // optional bool reverse_addons_west = 50; - bool has_reverse_addons_west() const; - private: - bool _internal_has_reverse_addons_west() const; - public: - void clear_reverse_addons_west(); - bool reverse_addons_west() const; - void set_reverse_addons_west(bool value); - private: - bool _internal_reverse_addons_west() const; - void _internal_set_reverse_addons_west(bool value); - public: - - // optional bool reverse_addons_south = 51; - bool has_reverse_addons_south() const; - private: - bool _internal_has_reverse_addons_south() const; - public: - void clear_reverse_addons_south(); - bool reverse_addons_south() const; - void set_reverse_addons_south(bool value); - private: - bool _internal_reverse_addons_south() const; - void _internal_set_reverse_addons_south(bool value); - public: - - // optional bool reverse_addons_north = 52; - bool has_reverse_addons_north() const; - private: - bool _internal_has_reverse_addons_north() const; - public: - void clear_reverse_addons_north(); - bool reverse_addons_north() const; - void set_reverse_addons_north(bool value); - private: - bool _internal_reverse_addons_north() const; - void _internal_set_reverse_addons_north(bool value); - public: - - // optional bool wearout = 53; - bool has_wearout() const; - private: - bool _internal_has_wearout() const; - public: - void clear_wearout(); - bool wearout() const; - void set_wearout(bool value); - private: - bool _internal_wearout() const; - void _internal_set_wearout(bool value); - public: - - // optional bool clockexpire = 54; - bool has_clockexpire() const; - private: - bool _internal_has_clockexpire() const; - public: - void clear_clockexpire(); - bool clockexpire() const; - void set_clockexpire(bool value); - private: - bool _internal_clockexpire() const; - void _internal_set_clockexpire(bool value); - public: - - // optional bool expire = 55; - bool has_expire() const; - private: - bool _internal_has_expire() const; - public: - void clear_expire(); - bool expire() const; - void set_expire(bool value); - private: - bool _internal_expire() const; - void _internal_set_expire(bool value); - public: - - // optional bool expirestop = 56; - bool has_expirestop() const; - private: - bool _internal_has_expirestop() const; - public: - void clear_expirestop(); - bool expirestop() const; - void set_expirestop(bool value); - private: - bool _internal_expirestop() const; - void _internal_set_expirestop(bool value); - public: - - // optional bool wrapkit = 57; - bool has_wrapkit() const; - private: - bool _internal_has_wrapkit() const; - public: - void clear_wrapkit(); - bool wrapkit() const; - void set_wrapkit(bool value); - private: - bool _internal_wrapkit() const; - void _internal_set_wrapkit(bool value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.AppearanceFlags) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<2> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::AppearanceFlagNPC > npcsaledata_; - ::Canary::protobuf::appearances::AppearanceFlagBank* bank_; - ::Canary::protobuf::appearances::AppearanceFlagWrite* write_; - ::Canary::protobuf::appearances::AppearanceFlagWriteOnce* write_once_; - ::Canary::protobuf::appearances::AppearanceFlagHook* hook_; - ::Canary::protobuf::appearances::AppearanceFlagLight* light_; - ::Canary::protobuf::appearances::AppearanceFlagShift* shift_; - ::Canary::protobuf::appearances::AppearanceFlagHeight* height_; - ::Canary::protobuf::appearances::AppearanceFlagAutomap* automap_; - ::Canary::protobuf::appearances::AppearanceFlagLenshelp* lenshelp_; - ::Canary::protobuf::appearances::AppearanceFlagClothes* clothes_; - ::Canary::protobuf::appearances::AppearanceFlagDefaultAction* default_action_; - ::Canary::protobuf::appearances::AppearanceFlagMarket* market_; - ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* changedtoexpire_; - ::Canary::protobuf::appearances::AppearanceFlagCyclopedia* cyclopediaitem_; - ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* upgradeclassification_; - bool clip_; - bool bottom_; - bool top_; - bool container_; - bool cumulative_; - bool usable_; - bool forceuse_; - bool multiuse_; - bool liquidpool_; - bool unpass_; - bool unmove_; - bool unsight_; - bool avoid_; - bool no_movement_animation_; - bool take_; - bool liquidcontainer_; - bool hang_; - bool rotate_; - bool dont_hide_; - bool translucent_; - bool lying_object_; - bool animate_always_; - bool fullbank_; - bool ignore_look_; - bool wrap_; - bool unwrap_; - bool topeffect_; - bool corpse_; - bool player_corpse_; - bool ammo_; - bool show_off_socket_; - bool reportable_; - bool reverse_addons_east_; - bool reverse_addons_west_; - bool reverse_addons_south_; - bool reverse_addons_north_; - bool wearout_; - bool clockexpire_; - bool expire_; - bool expirestop_; - bool wrapkit_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class AppearanceFlagUpgradeClassification final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.AppearanceFlagUpgradeClassification) */ { - public: - inline AppearanceFlagUpgradeClassification() : AppearanceFlagUpgradeClassification(nullptr) {} - ~AppearanceFlagUpgradeClassification() override; - explicit PROTOBUF_CONSTEXPR AppearanceFlagUpgradeClassification(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppearanceFlagUpgradeClassification(const AppearanceFlagUpgradeClassification& from); - AppearanceFlagUpgradeClassification(AppearanceFlagUpgradeClassification&& from) noexcept - : AppearanceFlagUpgradeClassification() { - *this = ::std::move(from); - } - - inline AppearanceFlagUpgradeClassification& operator=(const AppearanceFlagUpgradeClassification& from) { - CopyFrom(from); - return *this; - } - inline AppearanceFlagUpgradeClassification& operator=(AppearanceFlagUpgradeClassification&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppearanceFlagUpgradeClassification& default_instance() { - return *internal_default_instance(); - } - static inline const AppearanceFlagUpgradeClassification* internal_default_instance() { - return reinterpret_cast( - &_AppearanceFlagUpgradeClassification_default_instance_); - } - static constexpr int kIndexInFileMessages = - 9; - - friend void swap(AppearanceFlagUpgradeClassification& a, AppearanceFlagUpgradeClassification& b) { - a.Swap(&b); - } - inline void Swap(AppearanceFlagUpgradeClassification* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppearanceFlagUpgradeClassification* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppearanceFlagUpgradeClassification* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppearanceFlagUpgradeClassification& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppearanceFlagUpgradeClassification& from) { - AppearanceFlagUpgradeClassification::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppearanceFlagUpgradeClassification* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.AppearanceFlagUpgradeClassification"; - } - protected: - explicit AppearanceFlagUpgradeClassification(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kUpgradeClassificationFieldNumber = 1, - }; - // optional uint32 upgrade_classification = 1; - bool has_upgrade_classification() const; - private: - bool _internal_has_upgrade_classification() const; - public: - void clear_upgrade_classification(); - uint32_t upgrade_classification() const; - void set_upgrade_classification(uint32_t value); - private: - uint32_t _internal_upgrade_classification() const; - void _internal_set_upgrade_classification(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.AppearanceFlagUpgradeClassification) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t upgrade_classification_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class AppearanceFlagBank final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.AppearanceFlagBank) */ { - public: - inline AppearanceFlagBank() : AppearanceFlagBank(nullptr) {} - ~AppearanceFlagBank() override; - explicit PROTOBUF_CONSTEXPR AppearanceFlagBank(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppearanceFlagBank(const AppearanceFlagBank& from); - AppearanceFlagBank(AppearanceFlagBank&& from) noexcept - : AppearanceFlagBank() { - *this = ::std::move(from); - } - - inline AppearanceFlagBank& operator=(const AppearanceFlagBank& from) { - CopyFrom(from); - return *this; - } - inline AppearanceFlagBank& operator=(AppearanceFlagBank&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppearanceFlagBank& default_instance() { - return *internal_default_instance(); - } - static inline const AppearanceFlagBank* internal_default_instance() { - return reinterpret_cast( - &_AppearanceFlagBank_default_instance_); - } - static constexpr int kIndexInFileMessages = - 10; - - friend void swap(AppearanceFlagBank& a, AppearanceFlagBank& b) { - a.Swap(&b); - } - inline void Swap(AppearanceFlagBank* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppearanceFlagBank* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppearanceFlagBank* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppearanceFlagBank& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppearanceFlagBank& from) { - AppearanceFlagBank::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppearanceFlagBank* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.AppearanceFlagBank"; - } - protected: - explicit AppearanceFlagBank(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kWaypointsFieldNumber = 1, - }; - // optional uint32 waypoints = 1; - bool has_waypoints() const; - private: - bool _internal_has_waypoints() const; - public: - void clear_waypoints(); - uint32_t waypoints() const; - void set_waypoints(uint32_t value); - private: - uint32_t _internal_waypoints() const; - void _internal_set_waypoints(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.AppearanceFlagBank) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t waypoints_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class AppearanceFlagWrite final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.AppearanceFlagWrite) */ { - public: - inline AppearanceFlagWrite() : AppearanceFlagWrite(nullptr) {} - ~AppearanceFlagWrite() override; - explicit PROTOBUF_CONSTEXPR AppearanceFlagWrite(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppearanceFlagWrite(const AppearanceFlagWrite& from); - AppearanceFlagWrite(AppearanceFlagWrite&& from) noexcept - : AppearanceFlagWrite() { - *this = ::std::move(from); - } - - inline AppearanceFlagWrite& operator=(const AppearanceFlagWrite& from) { - CopyFrom(from); - return *this; - } - inline AppearanceFlagWrite& operator=(AppearanceFlagWrite&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppearanceFlagWrite& default_instance() { - return *internal_default_instance(); - } - static inline const AppearanceFlagWrite* internal_default_instance() { - return reinterpret_cast( - &_AppearanceFlagWrite_default_instance_); - } - static constexpr int kIndexInFileMessages = - 11; - - friend void swap(AppearanceFlagWrite& a, AppearanceFlagWrite& b) { - a.Swap(&b); - } - inline void Swap(AppearanceFlagWrite* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppearanceFlagWrite* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppearanceFlagWrite* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppearanceFlagWrite& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppearanceFlagWrite& from) { - AppearanceFlagWrite::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppearanceFlagWrite* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.AppearanceFlagWrite"; - } - protected: - explicit AppearanceFlagWrite(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kMaxTextLengthFieldNumber = 1, - }; - // optional uint32 max_text_length = 1; - bool has_max_text_length() const; - private: - bool _internal_has_max_text_length() const; - public: - void clear_max_text_length(); - uint32_t max_text_length() const; - void set_max_text_length(uint32_t value); - private: - uint32_t _internal_max_text_length() const; - void _internal_set_max_text_length(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.AppearanceFlagWrite) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t max_text_length_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class AppearanceFlagWriteOnce final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.AppearanceFlagWriteOnce) */ { - public: - inline AppearanceFlagWriteOnce() : AppearanceFlagWriteOnce(nullptr) {} - ~AppearanceFlagWriteOnce() override; - explicit PROTOBUF_CONSTEXPR AppearanceFlagWriteOnce(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppearanceFlagWriteOnce(const AppearanceFlagWriteOnce& from); - AppearanceFlagWriteOnce(AppearanceFlagWriteOnce&& from) noexcept - : AppearanceFlagWriteOnce() { - *this = ::std::move(from); - } - - inline AppearanceFlagWriteOnce& operator=(const AppearanceFlagWriteOnce& from) { - CopyFrom(from); - return *this; - } - inline AppearanceFlagWriteOnce& operator=(AppearanceFlagWriteOnce&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppearanceFlagWriteOnce& default_instance() { - return *internal_default_instance(); - } - static inline const AppearanceFlagWriteOnce* internal_default_instance() { - return reinterpret_cast( - &_AppearanceFlagWriteOnce_default_instance_); - } - static constexpr int kIndexInFileMessages = - 12; - - friend void swap(AppearanceFlagWriteOnce& a, AppearanceFlagWriteOnce& b) { - a.Swap(&b); - } - inline void Swap(AppearanceFlagWriteOnce* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppearanceFlagWriteOnce* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppearanceFlagWriteOnce* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppearanceFlagWriteOnce& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppearanceFlagWriteOnce& from) { - AppearanceFlagWriteOnce::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppearanceFlagWriteOnce* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.AppearanceFlagWriteOnce"; - } - protected: - explicit AppearanceFlagWriteOnce(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kMaxTextLengthOnceFieldNumber = 1, - }; - // optional uint32 max_text_length_once = 1; - bool has_max_text_length_once() const; - private: - bool _internal_has_max_text_length_once() const; - public: - void clear_max_text_length_once(); - uint32_t max_text_length_once() const; - void set_max_text_length_once(uint32_t value); - private: - uint32_t _internal_max_text_length_once() const; - void _internal_set_max_text_length_once(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.AppearanceFlagWriteOnce) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t max_text_length_once_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class AppearanceFlagLight final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.AppearanceFlagLight) */ { - public: - inline AppearanceFlagLight() : AppearanceFlagLight(nullptr) {} - ~AppearanceFlagLight() override; - explicit PROTOBUF_CONSTEXPR AppearanceFlagLight(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppearanceFlagLight(const AppearanceFlagLight& from); - AppearanceFlagLight(AppearanceFlagLight&& from) noexcept - : AppearanceFlagLight() { - *this = ::std::move(from); - } - - inline AppearanceFlagLight& operator=(const AppearanceFlagLight& from) { - CopyFrom(from); - return *this; - } - inline AppearanceFlagLight& operator=(AppearanceFlagLight&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppearanceFlagLight& default_instance() { - return *internal_default_instance(); - } - static inline const AppearanceFlagLight* internal_default_instance() { - return reinterpret_cast( - &_AppearanceFlagLight_default_instance_); - } - static constexpr int kIndexInFileMessages = - 13; - - friend void swap(AppearanceFlagLight& a, AppearanceFlagLight& b) { - a.Swap(&b); - } - inline void Swap(AppearanceFlagLight* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppearanceFlagLight* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppearanceFlagLight* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppearanceFlagLight& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppearanceFlagLight& from) { - AppearanceFlagLight::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppearanceFlagLight* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.AppearanceFlagLight"; - } - protected: - explicit AppearanceFlagLight(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kBrightnessFieldNumber = 1, - kColorFieldNumber = 2, - }; - // optional uint32 brightness = 1; - bool has_brightness() const; - private: - bool _internal_has_brightness() const; - public: - void clear_brightness(); - uint32_t brightness() const; - void set_brightness(uint32_t value); - private: - uint32_t _internal_brightness() const; - void _internal_set_brightness(uint32_t value); - public: - - // optional uint32 color = 2; - bool has_color() const; - private: - bool _internal_has_color() const; - public: - void clear_color(); - uint32_t color() const; - void set_color(uint32_t value); - private: - uint32_t _internal_color() const; - void _internal_set_color(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.AppearanceFlagLight) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t brightness_; - uint32_t color_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class AppearanceFlagHeight final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.AppearanceFlagHeight) */ { - public: - inline AppearanceFlagHeight() : AppearanceFlagHeight(nullptr) {} - ~AppearanceFlagHeight() override; - explicit PROTOBUF_CONSTEXPR AppearanceFlagHeight(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppearanceFlagHeight(const AppearanceFlagHeight& from); - AppearanceFlagHeight(AppearanceFlagHeight&& from) noexcept - : AppearanceFlagHeight() { - *this = ::std::move(from); - } - - inline AppearanceFlagHeight& operator=(const AppearanceFlagHeight& from) { - CopyFrom(from); - return *this; - } - inline AppearanceFlagHeight& operator=(AppearanceFlagHeight&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppearanceFlagHeight& default_instance() { - return *internal_default_instance(); - } - static inline const AppearanceFlagHeight* internal_default_instance() { - return reinterpret_cast( - &_AppearanceFlagHeight_default_instance_); - } - static constexpr int kIndexInFileMessages = - 14; - - friend void swap(AppearanceFlagHeight& a, AppearanceFlagHeight& b) { - a.Swap(&b); - } - inline void Swap(AppearanceFlagHeight* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppearanceFlagHeight* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppearanceFlagHeight* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppearanceFlagHeight& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppearanceFlagHeight& from) { - AppearanceFlagHeight::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppearanceFlagHeight* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.AppearanceFlagHeight"; - } - protected: - explicit AppearanceFlagHeight(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kElevationFieldNumber = 1, - }; - // optional uint32 elevation = 1; - bool has_elevation() const; - private: - bool _internal_has_elevation() const; - public: - void clear_elevation(); - uint32_t elevation() const; - void set_elevation(uint32_t value); - private: - uint32_t _internal_elevation() const; - void _internal_set_elevation(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.AppearanceFlagHeight) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t elevation_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class AppearanceFlagShift final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.AppearanceFlagShift) */ { - public: - inline AppearanceFlagShift() : AppearanceFlagShift(nullptr) {} - ~AppearanceFlagShift() override; - explicit PROTOBUF_CONSTEXPR AppearanceFlagShift(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppearanceFlagShift(const AppearanceFlagShift& from); - AppearanceFlagShift(AppearanceFlagShift&& from) noexcept - : AppearanceFlagShift() { - *this = ::std::move(from); - } - - inline AppearanceFlagShift& operator=(const AppearanceFlagShift& from) { - CopyFrom(from); - return *this; - } - inline AppearanceFlagShift& operator=(AppearanceFlagShift&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppearanceFlagShift& default_instance() { - return *internal_default_instance(); - } - static inline const AppearanceFlagShift* internal_default_instance() { - return reinterpret_cast( - &_AppearanceFlagShift_default_instance_); - } - static constexpr int kIndexInFileMessages = - 15; - - friend void swap(AppearanceFlagShift& a, AppearanceFlagShift& b) { - a.Swap(&b); - } - inline void Swap(AppearanceFlagShift* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppearanceFlagShift* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppearanceFlagShift* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppearanceFlagShift& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppearanceFlagShift& from) { - AppearanceFlagShift::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppearanceFlagShift* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.AppearanceFlagShift"; - } - protected: - explicit AppearanceFlagShift(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kXFieldNumber = 1, - kYFieldNumber = 2, - }; - // optional uint32 x = 1; - bool has_x() const; - private: - bool _internal_has_x() const; - public: - void clear_x(); - uint32_t x() const; - void set_x(uint32_t value); - private: - uint32_t _internal_x() const; - void _internal_set_x(uint32_t value); - public: - - // optional uint32 y = 2; - bool has_y() const; - private: - bool _internal_has_y() const; - public: - void clear_y(); - uint32_t y() const; - void set_y(uint32_t value); - private: - uint32_t _internal_y() const; - void _internal_set_y(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.AppearanceFlagShift) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t x_; - uint32_t y_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class AppearanceFlagClothes final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.AppearanceFlagClothes) */ { - public: - inline AppearanceFlagClothes() : AppearanceFlagClothes(nullptr) {} - ~AppearanceFlagClothes() override; - explicit PROTOBUF_CONSTEXPR AppearanceFlagClothes(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppearanceFlagClothes(const AppearanceFlagClothes& from); - AppearanceFlagClothes(AppearanceFlagClothes&& from) noexcept - : AppearanceFlagClothes() { - *this = ::std::move(from); - } - - inline AppearanceFlagClothes& operator=(const AppearanceFlagClothes& from) { - CopyFrom(from); - return *this; - } - inline AppearanceFlagClothes& operator=(AppearanceFlagClothes&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppearanceFlagClothes& default_instance() { - return *internal_default_instance(); - } - static inline const AppearanceFlagClothes* internal_default_instance() { - return reinterpret_cast( - &_AppearanceFlagClothes_default_instance_); - } - static constexpr int kIndexInFileMessages = - 16; - - friend void swap(AppearanceFlagClothes& a, AppearanceFlagClothes& b) { - a.Swap(&b); - } - inline void Swap(AppearanceFlagClothes* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppearanceFlagClothes* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppearanceFlagClothes* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppearanceFlagClothes& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppearanceFlagClothes& from) { - AppearanceFlagClothes::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppearanceFlagClothes* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.AppearanceFlagClothes"; - } - protected: - explicit AppearanceFlagClothes(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kSlotFieldNumber = 1, - }; - // optional uint32 slot = 1; - bool has_slot() const; - private: - bool _internal_has_slot() const; - public: - void clear_slot(); - uint32_t slot() const; - void set_slot(uint32_t value); - private: - uint32_t _internal_slot() const; - void _internal_set_slot(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.AppearanceFlagClothes) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t slot_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class AppearanceFlagDefaultAction final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.AppearanceFlagDefaultAction) */ { - public: - inline AppearanceFlagDefaultAction() : AppearanceFlagDefaultAction(nullptr) {} - ~AppearanceFlagDefaultAction() override; - explicit PROTOBUF_CONSTEXPR AppearanceFlagDefaultAction(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppearanceFlagDefaultAction(const AppearanceFlagDefaultAction& from); - AppearanceFlagDefaultAction(AppearanceFlagDefaultAction&& from) noexcept - : AppearanceFlagDefaultAction() { - *this = ::std::move(from); - } - - inline AppearanceFlagDefaultAction& operator=(const AppearanceFlagDefaultAction& from) { - CopyFrom(from); - return *this; - } - inline AppearanceFlagDefaultAction& operator=(AppearanceFlagDefaultAction&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppearanceFlagDefaultAction& default_instance() { - return *internal_default_instance(); - } - static inline const AppearanceFlagDefaultAction* internal_default_instance() { - return reinterpret_cast( - &_AppearanceFlagDefaultAction_default_instance_); - } - static constexpr int kIndexInFileMessages = - 17; - - friend void swap(AppearanceFlagDefaultAction& a, AppearanceFlagDefaultAction& b) { - a.Swap(&b); - } - inline void Swap(AppearanceFlagDefaultAction* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppearanceFlagDefaultAction* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppearanceFlagDefaultAction* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppearanceFlagDefaultAction& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppearanceFlagDefaultAction& from) { - AppearanceFlagDefaultAction::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppearanceFlagDefaultAction* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.AppearanceFlagDefaultAction"; - } - protected: - explicit AppearanceFlagDefaultAction(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kActionFieldNumber = 1, - }; - // optional .Canary.protobuf.appearances.PLAYER_ACTION action = 1; - bool has_action() const; - private: - bool _internal_has_action() const; - public: - void clear_action(); - ::Canary::protobuf::appearances::PLAYER_ACTION action() const; - void set_action(::Canary::protobuf::appearances::PLAYER_ACTION value); - private: - ::Canary::protobuf::appearances::PLAYER_ACTION _internal_action() const; - void _internal_set_action(::Canary::protobuf::appearances::PLAYER_ACTION value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.AppearanceFlagDefaultAction) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - int action_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class AppearanceFlagMarket final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.AppearanceFlagMarket) */ { - public: - inline AppearanceFlagMarket() : AppearanceFlagMarket(nullptr) {} - ~AppearanceFlagMarket() override; - explicit PROTOBUF_CONSTEXPR AppearanceFlagMarket(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppearanceFlagMarket(const AppearanceFlagMarket& from); - AppearanceFlagMarket(AppearanceFlagMarket&& from) noexcept - : AppearanceFlagMarket() { - *this = ::std::move(from); - } - - inline AppearanceFlagMarket& operator=(const AppearanceFlagMarket& from) { - CopyFrom(from); - return *this; - } - inline AppearanceFlagMarket& operator=(AppearanceFlagMarket&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppearanceFlagMarket& default_instance() { - return *internal_default_instance(); - } - static inline const AppearanceFlagMarket* internal_default_instance() { - return reinterpret_cast( - &_AppearanceFlagMarket_default_instance_); - } - static constexpr int kIndexInFileMessages = - 18; - - friend void swap(AppearanceFlagMarket& a, AppearanceFlagMarket& b) { - a.Swap(&b); - } - inline void Swap(AppearanceFlagMarket* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppearanceFlagMarket* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppearanceFlagMarket* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppearanceFlagMarket& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppearanceFlagMarket& from) { - AppearanceFlagMarket::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppearanceFlagMarket* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.AppearanceFlagMarket"; - } - protected: - explicit AppearanceFlagMarket(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kRestrictToProfessionFieldNumber = 5, - kTradeAsObjectIdFieldNumber = 2, - kShowAsObjectIdFieldNumber = 3, - kMinimumLevelFieldNumber = 6, - kCategoryFieldNumber = 1, - }; - // repeated .Canary.protobuf.appearances.PLAYER_PROFESSION restrict_to_profession = 5; - int restrict_to_profession_size() const; - private: - int _internal_restrict_to_profession_size() const; - public: - void clear_restrict_to_profession(); - private: - ::Canary::protobuf::appearances::PLAYER_PROFESSION _internal_restrict_to_profession(int index) const; - void _internal_add_restrict_to_profession(::Canary::protobuf::appearances::PLAYER_PROFESSION value); - ::PROTOBUF_NAMESPACE_ID::RepeatedField* _internal_mutable_restrict_to_profession(); - public: - ::Canary::protobuf::appearances::PLAYER_PROFESSION restrict_to_profession(int index) const; - void set_restrict_to_profession(int index, ::Canary::protobuf::appearances::PLAYER_PROFESSION value); - void add_restrict_to_profession(::Canary::protobuf::appearances::PLAYER_PROFESSION value); - const ::PROTOBUF_NAMESPACE_ID::RepeatedField& restrict_to_profession() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_restrict_to_profession(); - - // optional uint32 trade_as_object_id = 2; - bool has_trade_as_object_id() const; - private: - bool _internal_has_trade_as_object_id() const; - public: - void clear_trade_as_object_id(); - uint32_t trade_as_object_id() const; - void set_trade_as_object_id(uint32_t value); - private: - uint32_t _internal_trade_as_object_id() const; - void _internal_set_trade_as_object_id(uint32_t value); - public: - - // optional uint32 show_as_object_id = 3; - bool has_show_as_object_id() const; - private: - bool _internal_has_show_as_object_id() const; - public: - void clear_show_as_object_id(); - uint32_t show_as_object_id() const; - void set_show_as_object_id(uint32_t value); - private: - uint32_t _internal_show_as_object_id() const; - void _internal_set_show_as_object_id(uint32_t value); - public: - - // optional uint32 minimum_level = 6; - bool has_minimum_level() const; - private: - bool _internal_has_minimum_level() const; - public: - void clear_minimum_level(); - uint32_t minimum_level() const; - void set_minimum_level(uint32_t value); - private: - uint32_t _internal_minimum_level() const; - void _internal_set_minimum_level(uint32_t value); - public: - - // optional .Canary.protobuf.appearances.ITEM_CATEGORY category = 1; - bool has_category() const; - private: - bool _internal_has_category() const; - public: - void clear_category(); - ::Canary::protobuf::appearances::ITEM_CATEGORY category() const; - void set_category(::Canary::protobuf::appearances::ITEM_CATEGORY value); - private: - ::Canary::protobuf::appearances::ITEM_CATEGORY _internal_category() const; - void _internal_set_category(::Canary::protobuf::appearances::ITEM_CATEGORY value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.AppearanceFlagMarket) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::RepeatedField restrict_to_profession_; - uint32_t trade_as_object_id_; - uint32_t show_as_object_id_; - uint32_t minimum_level_; - int category_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class AppearanceFlagNPC final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.AppearanceFlagNPC) */ { - public: - inline AppearanceFlagNPC() : AppearanceFlagNPC(nullptr) {} - ~AppearanceFlagNPC() override; - explicit PROTOBUF_CONSTEXPR AppearanceFlagNPC(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppearanceFlagNPC(const AppearanceFlagNPC& from); - AppearanceFlagNPC(AppearanceFlagNPC&& from) noexcept - : AppearanceFlagNPC() { - *this = ::std::move(from); - } - - inline AppearanceFlagNPC& operator=(const AppearanceFlagNPC& from) { - CopyFrom(from); - return *this; - } - inline AppearanceFlagNPC& operator=(AppearanceFlagNPC&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppearanceFlagNPC& default_instance() { - return *internal_default_instance(); - } - static inline const AppearanceFlagNPC* internal_default_instance() { - return reinterpret_cast( - &_AppearanceFlagNPC_default_instance_); - } - static constexpr int kIndexInFileMessages = - 19; - - friend void swap(AppearanceFlagNPC& a, AppearanceFlagNPC& b) { - a.Swap(&b); - } - inline void Swap(AppearanceFlagNPC* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppearanceFlagNPC* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppearanceFlagNPC* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppearanceFlagNPC& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppearanceFlagNPC& from) { - AppearanceFlagNPC::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppearanceFlagNPC* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.AppearanceFlagNPC"; - } - protected: - explicit AppearanceFlagNPC(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kNameFieldNumber = 1, - kLocationFieldNumber = 2, - kCurrencyQuestFlagDisplayNameFieldNumber = 6, - kSalePriceFieldNumber = 3, - kBuyPriceFieldNumber = 4, - kCurrencyObjectTypeIdFieldNumber = 5, - }; - // optional bytes name = 1; - bool has_name() const; - private: - bool _internal_has_name() const; - public: - void clear_name(); - const std::string& name() const; - template - void set_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_name(); - PROTOBUF_NODISCARD std::string* release_name(); - void set_allocated_name(std::string* name); - private: - const std::string& _internal_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); - std::string* _internal_mutable_name(); - public: - - // optional bytes location = 2; - bool has_location() const; - private: - bool _internal_has_location() const; - public: - void clear_location(); - const std::string& location() const; - template - void set_location(ArgT0&& arg0, ArgT... args); - std::string* mutable_location(); - PROTOBUF_NODISCARD std::string* release_location(); - void set_allocated_location(std::string* location); - private: - const std::string& _internal_location() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_location(const std::string& value); - std::string* _internal_mutable_location(); - public: - - // optional bytes currency_quest_flag_display_name = 6; - bool has_currency_quest_flag_display_name() const; - private: - bool _internal_has_currency_quest_flag_display_name() const; - public: - void clear_currency_quest_flag_display_name(); - const std::string& currency_quest_flag_display_name() const; - template - void set_currency_quest_flag_display_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_currency_quest_flag_display_name(); - PROTOBUF_NODISCARD std::string* release_currency_quest_flag_display_name(); - void set_allocated_currency_quest_flag_display_name(std::string* currency_quest_flag_display_name); - private: - const std::string& _internal_currency_quest_flag_display_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_currency_quest_flag_display_name(const std::string& value); - std::string* _internal_mutable_currency_quest_flag_display_name(); - public: - - // optional uint32 sale_price = 3; - bool has_sale_price() const; - private: - bool _internal_has_sale_price() const; - public: - void clear_sale_price(); - uint32_t sale_price() const; - void set_sale_price(uint32_t value); - private: - uint32_t _internal_sale_price() const; - void _internal_set_sale_price(uint32_t value); - public: - - // optional uint32 buy_price = 4; - bool has_buy_price() const; - private: - bool _internal_has_buy_price() const; - public: - void clear_buy_price(); - uint32_t buy_price() const; - void set_buy_price(uint32_t value); - private: - uint32_t _internal_buy_price() const; - void _internal_set_buy_price(uint32_t value); - public: - - // optional uint32 currency_object_type_id = 5; - bool has_currency_object_type_id() const; - private: - bool _internal_has_currency_object_type_id() const; - public: - void clear_currency_object_type_id(); - uint32_t currency_object_type_id() const; - void set_currency_object_type_id(uint32_t value); - private: - uint32_t _internal_currency_object_type_id() const; - void _internal_set_currency_object_type_id(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.AppearanceFlagNPC) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr location_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr currency_quest_flag_display_name_; - uint32_t sale_price_; - uint32_t buy_price_; - uint32_t currency_object_type_id_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class AppearanceFlagAutomap final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.AppearanceFlagAutomap) */ { - public: - inline AppearanceFlagAutomap() : AppearanceFlagAutomap(nullptr) {} - ~AppearanceFlagAutomap() override; - explicit PROTOBUF_CONSTEXPR AppearanceFlagAutomap(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppearanceFlagAutomap(const AppearanceFlagAutomap& from); - AppearanceFlagAutomap(AppearanceFlagAutomap&& from) noexcept - : AppearanceFlagAutomap() { - *this = ::std::move(from); - } - - inline AppearanceFlagAutomap& operator=(const AppearanceFlagAutomap& from) { - CopyFrom(from); - return *this; - } - inline AppearanceFlagAutomap& operator=(AppearanceFlagAutomap&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppearanceFlagAutomap& default_instance() { - return *internal_default_instance(); - } - static inline const AppearanceFlagAutomap* internal_default_instance() { - return reinterpret_cast( - &_AppearanceFlagAutomap_default_instance_); - } - static constexpr int kIndexInFileMessages = - 20; - - friend void swap(AppearanceFlagAutomap& a, AppearanceFlagAutomap& b) { - a.Swap(&b); - } - inline void Swap(AppearanceFlagAutomap* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppearanceFlagAutomap* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppearanceFlagAutomap* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppearanceFlagAutomap& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppearanceFlagAutomap& from) { - AppearanceFlagAutomap::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppearanceFlagAutomap* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.AppearanceFlagAutomap"; - } - protected: - explicit AppearanceFlagAutomap(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kColorFieldNumber = 1, - }; - // optional uint32 color = 1; - bool has_color() const; - private: - bool _internal_has_color() const; - public: - void clear_color(); - uint32_t color() const; - void set_color(uint32_t value); - private: - uint32_t _internal_color() const; - void _internal_set_color(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.AppearanceFlagAutomap) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t color_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class AppearanceFlagHook final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.AppearanceFlagHook) */ { - public: - inline AppearanceFlagHook() : AppearanceFlagHook(nullptr) {} - ~AppearanceFlagHook() override; - explicit PROTOBUF_CONSTEXPR AppearanceFlagHook(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppearanceFlagHook(const AppearanceFlagHook& from); - AppearanceFlagHook(AppearanceFlagHook&& from) noexcept - : AppearanceFlagHook() { - *this = ::std::move(from); - } - - inline AppearanceFlagHook& operator=(const AppearanceFlagHook& from) { - CopyFrom(from); - return *this; - } - inline AppearanceFlagHook& operator=(AppearanceFlagHook&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppearanceFlagHook& default_instance() { - return *internal_default_instance(); - } - static inline const AppearanceFlagHook* internal_default_instance() { - return reinterpret_cast( - &_AppearanceFlagHook_default_instance_); - } - static constexpr int kIndexInFileMessages = - 21; - - friend void swap(AppearanceFlagHook& a, AppearanceFlagHook& b) { - a.Swap(&b); - } - inline void Swap(AppearanceFlagHook* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppearanceFlagHook* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppearanceFlagHook* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppearanceFlagHook& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppearanceFlagHook& from) { - AppearanceFlagHook::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppearanceFlagHook* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.AppearanceFlagHook"; - } - protected: - explicit AppearanceFlagHook(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kDirectionFieldNumber = 1, - }; - // optional .Canary.protobuf.appearances.HOOK_TYPE direction = 1; - bool has_direction() const; - private: - bool _internal_has_direction() const; - public: - void clear_direction(); - ::Canary::protobuf::appearances::HOOK_TYPE direction() const; - void set_direction(::Canary::protobuf::appearances::HOOK_TYPE value); - private: - ::Canary::protobuf::appearances::HOOK_TYPE _internal_direction() const; - void _internal_set_direction(::Canary::protobuf::appearances::HOOK_TYPE value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.AppearanceFlagHook) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - int direction_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class AppearanceFlagLenshelp final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.AppearanceFlagLenshelp) */ { - public: - inline AppearanceFlagLenshelp() : AppearanceFlagLenshelp(nullptr) {} - ~AppearanceFlagLenshelp() override; - explicit PROTOBUF_CONSTEXPR AppearanceFlagLenshelp(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppearanceFlagLenshelp(const AppearanceFlagLenshelp& from); - AppearanceFlagLenshelp(AppearanceFlagLenshelp&& from) noexcept - : AppearanceFlagLenshelp() { - *this = ::std::move(from); - } - - inline AppearanceFlagLenshelp& operator=(const AppearanceFlagLenshelp& from) { - CopyFrom(from); - return *this; - } - inline AppearanceFlagLenshelp& operator=(AppearanceFlagLenshelp&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppearanceFlagLenshelp& default_instance() { - return *internal_default_instance(); - } - static inline const AppearanceFlagLenshelp* internal_default_instance() { - return reinterpret_cast( - &_AppearanceFlagLenshelp_default_instance_); - } - static constexpr int kIndexInFileMessages = - 22; - - friend void swap(AppearanceFlagLenshelp& a, AppearanceFlagLenshelp& b) { - a.Swap(&b); - } - inline void Swap(AppearanceFlagLenshelp* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppearanceFlagLenshelp* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppearanceFlagLenshelp* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppearanceFlagLenshelp& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppearanceFlagLenshelp& from) { - AppearanceFlagLenshelp::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppearanceFlagLenshelp* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.AppearanceFlagLenshelp"; - } - protected: - explicit AppearanceFlagLenshelp(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kIdFieldNumber = 1, - }; - // optional uint32 id = 1; - bool has_id() const; - private: - bool _internal_has_id() const; - public: - void clear_id(); - uint32_t id() const; - void set_id(uint32_t value); - private: - uint32_t _internal_id() const; - void _internal_set_id(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.AppearanceFlagLenshelp) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t id_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class AppearanceFlagChangedToExpire final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.AppearanceFlagChangedToExpire) */ { - public: - inline AppearanceFlagChangedToExpire() : AppearanceFlagChangedToExpire(nullptr) {} - ~AppearanceFlagChangedToExpire() override; - explicit PROTOBUF_CONSTEXPR AppearanceFlagChangedToExpire(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppearanceFlagChangedToExpire(const AppearanceFlagChangedToExpire& from); - AppearanceFlagChangedToExpire(AppearanceFlagChangedToExpire&& from) noexcept - : AppearanceFlagChangedToExpire() { - *this = ::std::move(from); - } - - inline AppearanceFlagChangedToExpire& operator=(const AppearanceFlagChangedToExpire& from) { - CopyFrom(from); - return *this; - } - inline AppearanceFlagChangedToExpire& operator=(AppearanceFlagChangedToExpire&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppearanceFlagChangedToExpire& default_instance() { - return *internal_default_instance(); - } - static inline const AppearanceFlagChangedToExpire* internal_default_instance() { - return reinterpret_cast( - &_AppearanceFlagChangedToExpire_default_instance_); - } - static constexpr int kIndexInFileMessages = - 23; - - friend void swap(AppearanceFlagChangedToExpire& a, AppearanceFlagChangedToExpire& b) { - a.Swap(&b); - } - inline void Swap(AppearanceFlagChangedToExpire* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppearanceFlagChangedToExpire* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppearanceFlagChangedToExpire* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppearanceFlagChangedToExpire& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppearanceFlagChangedToExpire& from) { - AppearanceFlagChangedToExpire::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppearanceFlagChangedToExpire* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.AppearanceFlagChangedToExpire"; - } - protected: - explicit AppearanceFlagChangedToExpire(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kFormerObjectTypeidFieldNumber = 1, - }; - // optional uint32 former_object_typeid = 1; - bool has_former_object_typeid() const; - private: - bool _internal_has_former_object_typeid() const; - public: - void clear_former_object_typeid(); - uint32_t former_object_typeid() const; - void set_former_object_typeid(uint32_t value); - private: - uint32_t _internal_former_object_typeid() const; - void _internal_set_former_object_typeid(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.AppearanceFlagChangedToExpire) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t former_object_typeid_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class AppearanceFlagCyclopedia final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.AppearanceFlagCyclopedia) */ { - public: - inline AppearanceFlagCyclopedia() : AppearanceFlagCyclopedia(nullptr) {} - ~AppearanceFlagCyclopedia() override; - explicit PROTOBUF_CONSTEXPR AppearanceFlagCyclopedia(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppearanceFlagCyclopedia(const AppearanceFlagCyclopedia& from); - AppearanceFlagCyclopedia(AppearanceFlagCyclopedia&& from) noexcept - : AppearanceFlagCyclopedia() { - *this = ::std::move(from); - } - - inline AppearanceFlagCyclopedia& operator=(const AppearanceFlagCyclopedia& from) { - CopyFrom(from); - return *this; - } - inline AppearanceFlagCyclopedia& operator=(AppearanceFlagCyclopedia&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppearanceFlagCyclopedia& default_instance() { - return *internal_default_instance(); - } - static inline const AppearanceFlagCyclopedia* internal_default_instance() { - return reinterpret_cast( - &_AppearanceFlagCyclopedia_default_instance_); - } - static constexpr int kIndexInFileMessages = - 24; - - friend void swap(AppearanceFlagCyclopedia& a, AppearanceFlagCyclopedia& b) { - a.Swap(&b); - } - inline void Swap(AppearanceFlagCyclopedia* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppearanceFlagCyclopedia* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppearanceFlagCyclopedia* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppearanceFlagCyclopedia& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppearanceFlagCyclopedia& from) { - AppearanceFlagCyclopedia::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppearanceFlagCyclopedia* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.AppearanceFlagCyclopedia"; - } - protected: - explicit AppearanceFlagCyclopedia(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kCyclopediaTypeFieldNumber = 1, - }; - // optional uint32 cyclopedia_type = 1; - bool has_cyclopedia_type() const; - private: - bool _internal_has_cyclopedia_type() const; - public: - void clear_cyclopedia_type(); - uint32_t cyclopedia_type() const; - void set_cyclopedia_type(uint32_t value); - private: - uint32_t _internal_cyclopedia_type() const; - void _internal_set_cyclopedia_type(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.AppearanceFlagCyclopedia) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t cyclopedia_type_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// ------------------------------------------------------------------- - -class SpecialMeaningAppearanceIds final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.appearances.SpecialMeaningAppearanceIds) */ { - public: - inline SpecialMeaningAppearanceIds() : SpecialMeaningAppearanceIds(nullptr) {} - ~SpecialMeaningAppearanceIds() override; - explicit PROTOBUF_CONSTEXPR SpecialMeaningAppearanceIds(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - SpecialMeaningAppearanceIds(const SpecialMeaningAppearanceIds& from); - SpecialMeaningAppearanceIds(SpecialMeaningAppearanceIds&& from) noexcept - : SpecialMeaningAppearanceIds() { - *this = ::std::move(from); - } - - inline SpecialMeaningAppearanceIds& operator=(const SpecialMeaningAppearanceIds& from) { - CopyFrom(from); - return *this; - } - inline SpecialMeaningAppearanceIds& operator=(SpecialMeaningAppearanceIds&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); - } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const SpecialMeaningAppearanceIds& default_instance() { - return *internal_default_instance(); - } - static inline const SpecialMeaningAppearanceIds* internal_default_instance() { - return reinterpret_cast( - &_SpecialMeaningAppearanceIds_default_instance_); - } - static constexpr int kIndexInFileMessages = - 25; - - friend void swap(SpecialMeaningAppearanceIds& a, SpecialMeaningAppearanceIds& b) { - a.Swap(&b); - } - inline void Swap(SpecialMeaningAppearanceIds* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(SpecialMeaningAppearanceIds* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - SpecialMeaningAppearanceIds* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const SpecialMeaningAppearanceIds& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const SpecialMeaningAppearanceIds& from) { - SpecialMeaningAppearanceIds::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(SpecialMeaningAppearanceIds* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.appearances.SpecialMeaningAppearanceIds"; - } - protected: - explicit SpecialMeaningAppearanceIds(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kGoldCoinIdFieldNumber = 1, - kPlatinumCoinIdFieldNumber = 2, - kCrystalCoinIdFieldNumber = 3, - kTibiaCoinIdFieldNumber = 4, - kStampedLetterIdFieldNumber = 5, - kSupplyStashIdFieldNumber = 6, - kRewardChestIdFieldNumber = 7, - }; - // optional uint32 gold_coin_id = 1; - bool has_gold_coin_id() const; - private: - bool _internal_has_gold_coin_id() const; - public: - void clear_gold_coin_id(); - uint32_t gold_coin_id() const; - void set_gold_coin_id(uint32_t value); - private: - uint32_t _internal_gold_coin_id() const; - void _internal_set_gold_coin_id(uint32_t value); - public: - - // optional uint32 platinum_coin_id = 2; - bool has_platinum_coin_id() const; - private: - bool _internal_has_platinum_coin_id() const; - public: - void clear_platinum_coin_id(); - uint32_t platinum_coin_id() const; - void set_platinum_coin_id(uint32_t value); - private: - uint32_t _internal_platinum_coin_id() const; - void _internal_set_platinum_coin_id(uint32_t value); - public: - - // optional uint32 crystal_coin_id = 3; - bool has_crystal_coin_id() const; - private: - bool _internal_has_crystal_coin_id() const; - public: - void clear_crystal_coin_id(); - uint32_t crystal_coin_id() const; - void set_crystal_coin_id(uint32_t value); - private: - uint32_t _internal_crystal_coin_id() const; - void _internal_set_crystal_coin_id(uint32_t value); - public: - - // optional uint32 tibia_coin_id = 4; - bool has_tibia_coin_id() const; - private: - bool _internal_has_tibia_coin_id() const; - public: - void clear_tibia_coin_id(); - uint32_t tibia_coin_id() const; - void set_tibia_coin_id(uint32_t value); - private: - uint32_t _internal_tibia_coin_id() const; - void _internal_set_tibia_coin_id(uint32_t value); - public: - - // optional uint32 stamped_letter_id = 5; - bool has_stamped_letter_id() const; - private: - bool _internal_has_stamped_letter_id() const; - public: - void clear_stamped_letter_id(); - uint32_t stamped_letter_id() const; - void set_stamped_letter_id(uint32_t value); - private: - uint32_t _internal_stamped_letter_id() const; - void _internal_set_stamped_letter_id(uint32_t value); - public: - - // optional uint32 supply_stash_id = 6; - bool has_supply_stash_id() const; - private: - bool _internal_has_supply_stash_id() const; - public: - void clear_supply_stash_id(); - uint32_t supply_stash_id() const; - void set_supply_stash_id(uint32_t value); - private: - uint32_t _internal_supply_stash_id() const; - void _internal_set_supply_stash_id(uint32_t value); - public: - - // optional uint32 reward_chest_id = 7; - bool has_reward_chest_id() const; - private: - bool _internal_has_reward_chest_id() const; - public: - void clear_reward_chest_id(); - uint32_t reward_chest_id() const; - void set_reward_chest_id(uint32_t value); - private: - uint32_t _internal_reward_chest_id() const; - void _internal_set_reward_chest_id(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:Canary.protobuf.appearances.SpecialMeaningAppearanceIds) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t gold_coin_id_; - uint32_t platinum_coin_id_; - uint32_t crystal_coin_id_; - uint32_t tibia_coin_id_; - uint32_t stamped_letter_id_; - uint32_t supply_stash_id_; - uint32_t reward_chest_id_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appearances_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// Coordinate - -// optional uint32 x = 1; -inline bool Coordinate::_internal_has_x() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool Coordinate::has_x() const { - return _internal_has_x(); -} -inline void Coordinate::clear_x() { - _impl_.x_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t Coordinate::_internal_x() const { - return _impl_.x_; -} -inline uint32_t Coordinate::x() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.Coordinate.x) - return _internal_x(); -} -inline void Coordinate::_internal_set_x(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.x_ = value; -} -inline void Coordinate::set_x(uint32_t value) { - _internal_set_x(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.Coordinate.x) -} - -// optional uint32 y = 2; -inline bool Coordinate::_internal_has_y() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool Coordinate::has_y() const { - return _internal_has_y(); -} -inline void Coordinate::clear_y() { - _impl_.y_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline uint32_t Coordinate::_internal_y() const { - return _impl_.y_; -} -inline uint32_t Coordinate::y() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.Coordinate.y) - return _internal_y(); -} -inline void Coordinate::_internal_set_y(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.y_ = value; -} -inline void Coordinate::set_y(uint32_t value) { - _internal_set_y(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.Coordinate.y) -} - -// optional uint32 z = 3; -inline bool Coordinate::_internal_has_z() const { - bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; - return value; -} -inline bool Coordinate::has_z() const { - return _internal_has_z(); -} -inline void Coordinate::clear_z() { - _impl_.z_ = 0u; - _impl_._has_bits_[0] &= ~0x00000004u; -} -inline uint32_t Coordinate::_internal_z() const { - return _impl_.z_; -} -inline uint32_t Coordinate::z() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.Coordinate.z) - return _internal_z(); -} -inline void Coordinate::_internal_set_z(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000004u; - _impl_.z_ = value; -} -inline void Coordinate::set_z(uint32_t value) { - _internal_set_z(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.Coordinate.z) -} - -// ------------------------------------------------------------------- - -// Appearances - -// repeated .Canary.protobuf.appearances.Appearance object = 1; -inline int Appearances::_internal_object_size() const { - return _impl_.object_.size(); -} -inline int Appearances::object_size() const { - return _internal_object_size(); -} -inline void Appearances::clear_object() { - _impl_.object_.Clear(); -} -inline ::Canary::protobuf::appearances::Appearance* Appearances::mutable_object(int index) { - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.Appearances.object) - return _impl_.object_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance >* -Appearances::mutable_object() { - // @@protoc_insertion_point(field_mutable_list:Canary.protobuf.appearances.Appearances.object) - return &_impl_.object_; -} -inline const ::Canary::protobuf::appearances::Appearance& Appearances::_internal_object(int index) const { - return _impl_.object_.Get(index); -} -inline const ::Canary::protobuf::appearances::Appearance& Appearances::object(int index) const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.Appearances.object) - return _internal_object(index); -} -inline ::Canary::protobuf::appearances::Appearance* Appearances::_internal_add_object() { - return _impl_.object_.Add(); -} -inline ::Canary::protobuf::appearances::Appearance* Appearances::add_object() { - ::Canary::protobuf::appearances::Appearance* _add = _internal_add_object(); - // @@protoc_insertion_point(field_add:Canary.protobuf.appearances.Appearances.object) - return _add; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance >& -Appearances::object() const { - // @@protoc_insertion_point(field_list:Canary.protobuf.appearances.Appearances.object) - return _impl_.object_; -} - -// repeated .Canary.protobuf.appearances.Appearance outfit = 2; -inline int Appearances::_internal_outfit_size() const { - return _impl_.outfit_.size(); -} -inline int Appearances::outfit_size() const { - return _internal_outfit_size(); -} -inline void Appearances::clear_outfit() { - _impl_.outfit_.Clear(); -} -inline ::Canary::protobuf::appearances::Appearance* Appearances::mutable_outfit(int index) { - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.Appearances.outfit) - return _impl_.outfit_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance >* -Appearances::mutable_outfit() { - // @@protoc_insertion_point(field_mutable_list:Canary.protobuf.appearances.Appearances.outfit) - return &_impl_.outfit_; -} -inline const ::Canary::protobuf::appearances::Appearance& Appearances::_internal_outfit(int index) const { - return _impl_.outfit_.Get(index); -} -inline const ::Canary::protobuf::appearances::Appearance& Appearances::outfit(int index) const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.Appearances.outfit) - return _internal_outfit(index); -} -inline ::Canary::protobuf::appearances::Appearance* Appearances::_internal_add_outfit() { - return _impl_.outfit_.Add(); -} -inline ::Canary::protobuf::appearances::Appearance* Appearances::add_outfit() { - ::Canary::protobuf::appearances::Appearance* _add = _internal_add_outfit(); - // @@protoc_insertion_point(field_add:Canary.protobuf.appearances.Appearances.outfit) - return _add; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance >& -Appearances::outfit() const { - // @@protoc_insertion_point(field_list:Canary.protobuf.appearances.Appearances.outfit) - return _impl_.outfit_; -} - -// repeated .Canary.protobuf.appearances.Appearance effect = 3; -inline int Appearances::_internal_effect_size() const { - return _impl_.effect_.size(); -} -inline int Appearances::effect_size() const { - return _internal_effect_size(); -} -inline void Appearances::clear_effect() { - _impl_.effect_.Clear(); -} -inline ::Canary::protobuf::appearances::Appearance* Appearances::mutable_effect(int index) { - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.Appearances.effect) - return _impl_.effect_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance >* -Appearances::mutable_effect() { - // @@protoc_insertion_point(field_mutable_list:Canary.protobuf.appearances.Appearances.effect) - return &_impl_.effect_; -} -inline const ::Canary::protobuf::appearances::Appearance& Appearances::_internal_effect(int index) const { - return _impl_.effect_.Get(index); -} -inline const ::Canary::protobuf::appearances::Appearance& Appearances::effect(int index) const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.Appearances.effect) - return _internal_effect(index); -} -inline ::Canary::protobuf::appearances::Appearance* Appearances::_internal_add_effect() { - return _impl_.effect_.Add(); -} -inline ::Canary::protobuf::appearances::Appearance* Appearances::add_effect() { - ::Canary::protobuf::appearances::Appearance* _add = _internal_add_effect(); - // @@protoc_insertion_point(field_add:Canary.protobuf.appearances.Appearances.effect) - return _add; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance >& -Appearances::effect() const { - // @@protoc_insertion_point(field_list:Canary.protobuf.appearances.Appearances.effect) - return _impl_.effect_; -} - -// repeated .Canary.protobuf.appearances.Appearance missile = 4; -inline int Appearances::_internal_missile_size() const { - return _impl_.missile_.size(); -} -inline int Appearances::missile_size() const { - return _internal_missile_size(); -} -inline void Appearances::clear_missile() { - _impl_.missile_.Clear(); -} -inline ::Canary::protobuf::appearances::Appearance* Appearances::mutable_missile(int index) { - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.Appearances.missile) - return _impl_.missile_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance >* -Appearances::mutable_missile() { - // @@protoc_insertion_point(field_mutable_list:Canary.protobuf.appearances.Appearances.missile) - return &_impl_.missile_; -} -inline const ::Canary::protobuf::appearances::Appearance& Appearances::_internal_missile(int index) const { - return _impl_.missile_.Get(index); -} -inline const ::Canary::protobuf::appearances::Appearance& Appearances::missile(int index) const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.Appearances.missile) - return _internal_missile(index); -} -inline ::Canary::protobuf::appearances::Appearance* Appearances::_internal_add_missile() { - return _impl_.missile_.Add(); -} -inline ::Canary::protobuf::appearances::Appearance* Appearances::add_missile() { - ::Canary::protobuf::appearances::Appearance* _add = _internal_add_missile(); - // @@protoc_insertion_point(field_add:Canary.protobuf.appearances.Appearances.missile) - return _add; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Appearance >& -Appearances::missile() const { - // @@protoc_insertion_point(field_list:Canary.protobuf.appearances.Appearances.missile) - return _impl_.missile_; -} - -// optional .Canary.protobuf.appearances.SpecialMeaningAppearanceIds special_meaning_appearance_ids = 5; -inline bool Appearances::_internal_has_special_meaning_appearance_ids() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - PROTOBUF_ASSUME(!value || _impl_.special_meaning_appearance_ids_ != nullptr); - return value; -} -inline bool Appearances::has_special_meaning_appearance_ids() const { - return _internal_has_special_meaning_appearance_ids(); -} -inline void Appearances::clear_special_meaning_appearance_ids() { - if (_impl_.special_meaning_appearance_ids_ != nullptr) _impl_.special_meaning_appearance_ids_->Clear(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline const ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds& Appearances::_internal_special_meaning_appearance_ids() const { - const ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* p = _impl_.special_meaning_appearance_ids_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_SpecialMeaningAppearanceIds_default_instance_); -} -inline const ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds& Appearances::special_meaning_appearance_ids() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.Appearances.special_meaning_appearance_ids) - return _internal_special_meaning_appearance_ids(); -} -inline void Appearances::unsafe_arena_set_allocated_special_meaning_appearance_ids( - ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* special_meaning_appearance_ids) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.special_meaning_appearance_ids_); - } - _impl_.special_meaning_appearance_ids_ = special_meaning_appearance_ids; - if (special_meaning_appearance_ids) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.Appearances.special_meaning_appearance_ids) -} -inline ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* Appearances::release_special_meaning_appearance_ids() { - _impl_._has_bits_[0] &= ~0x00000001u; - ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* temp = _impl_.special_meaning_appearance_ids_; - _impl_.special_meaning_appearance_ids_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* Appearances::unsafe_arena_release_special_meaning_appearance_ids() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.Appearances.special_meaning_appearance_ids) - _impl_._has_bits_[0] &= ~0x00000001u; - ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* temp = _impl_.special_meaning_appearance_ids_; - _impl_.special_meaning_appearance_ids_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* Appearances::_internal_mutable_special_meaning_appearance_ids() { - _impl_._has_bits_[0] |= 0x00000001u; - if (_impl_.special_meaning_appearance_ids_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::SpecialMeaningAppearanceIds>(GetArenaForAllocation()); - _impl_.special_meaning_appearance_ids_ = p; - } - return _impl_.special_meaning_appearance_ids_; -} -inline ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* Appearances::mutable_special_meaning_appearance_ids() { - ::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* _msg = _internal_mutable_special_meaning_appearance_ids(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.Appearances.special_meaning_appearance_ids) - return _msg; -} -inline void Appearances::set_allocated_special_meaning_appearance_ids(::Canary::protobuf::appearances::SpecialMeaningAppearanceIds* special_meaning_appearance_ids) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.special_meaning_appearance_ids_; - } - if (special_meaning_appearance_ids) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(special_meaning_appearance_ids); - if (message_arena != submessage_arena) { - special_meaning_appearance_ids = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, special_meaning_appearance_ids, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - _impl_.special_meaning_appearance_ids_ = special_meaning_appearance_ids; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.Appearances.special_meaning_appearance_ids) -} - -// ------------------------------------------------------------------- - -// SpritePhase - -// optional uint32 duration_min = 1; -inline bool SpritePhase::_internal_has_duration_min() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool SpritePhase::has_duration_min() const { - return _internal_has_duration_min(); -} -inline void SpritePhase::clear_duration_min() { - _impl_.duration_min_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t SpritePhase::_internal_duration_min() const { - return _impl_.duration_min_; -} -inline uint32_t SpritePhase::duration_min() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpritePhase.duration_min) - return _internal_duration_min(); -} -inline void SpritePhase::_internal_set_duration_min(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.duration_min_ = value; -} -inline void SpritePhase::set_duration_min(uint32_t value) { - _internal_set_duration_min(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpritePhase.duration_min) -} - -// optional uint32 duration_max = 2; -inline bool SpritePhase::_internal_has_duration_max() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool SpritePhase::has_duration_max() const { - return _internal_has_duration_max(); -} -inline void SpritePhase::clear_duration_max() { - _impl_.duration_max_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline uint32_t SpritePhase::_internal_duration_max() const { - return _impl_.duration_max_; -} -inline uint32_t SpritePhase::duration_max() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpritePhase.duration_max) - return _internal_duration_max(); -} -inline void SpritePhase::_internal_set_duration_max(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.duration_max_ = value; -} -inline void SpritePhase::set_duration_max(uint32_t value) { - _internal_set_duration_max(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpritePhase.duration_max) -} - -// ------------------------------------------------------------------- - -// SpriteAnimation - -// optional uint32 default_start_phase = 1; -inline bool SpriteAnimation::_internal_has_default_start_phase() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool SpriteAnimation::has_default_start_phase() const { - return _internal_has_default_start_phase(); -} -inline void SpriteAnimation::clear_default_start_phase() { - _impl_.default_start_phase_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t SpriteAnimation::_internal_default_start_phase() const { - return _impl_.default_start_phase_; -} -inline uint32_t SpriteAnimation::default_start_phase() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpriteAnimation.default_start_phase) - return _internal_default_start_phase(); -} -inline void SpriteAnimation::_internal_set_default_start_phase(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.default_start_phase_ = value; -} -inline void SpriteAnimation::set_default_start_phase(uint32_t value) { - _internal_set_default_start_phase(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpriteAnimation.default_start_phase) -} - -// optional bool synchronized = 2; -inline bool SpriteAnimation::_internal_has_synchronized() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool SpriteAnimation::has_synchronized() const { - return _internal_has_synchronized(); -} -inline void SpriteAnimation::clear_synchronized() { - _impl_.synchronized_ = false; - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline bool SpriteAnimation::_internal_synchronized() const { - return _impl_.synchronized_; -} -inline bool SpriteAnimation::synchronized() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpriteAnimation.synchronized) - return _internal_synchronized(); -} -inline void SpriteAnimation::_internal_set_synchronized(bool value) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.synchronized_ = value; -} -inline void SpriteAnimation::set_synchronized(bool value) { - _internal_set_synchronized(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpriteAnimation.synchronized) -} - -// optional bool random_start_phase = 3; -inline bool SpriteAnimation::_internal_has_random_start_phase() const { - bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; - return value; -} -inline bool SpriteAnimation::has_random_start_phase() const { - return _internal_has_random_start_phase(); -} -inline void SpriteAnimation::clear_random_start_phase() { - _impl_.random_start_phase_ = false; - _impl_._has_bits_[0] &= ~0x00000004u; -} -inline bool SpriteAnimation::_internal_random_start_phase() const { - return _impl_.random_start_phase_; -} -inline bool SpriteAnimation::random_start_phase() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpriteAnimation.random_start_phase) - return _internal_random_start_phase(); -} -inline void SpriteAnimation::_internal_set_random_start_phase(bool value) { - _impl_._has_bits_[0] |= 0x00000004u; - _impl_.random_start_phase_ = value; -} -inline void SpriteAnimation::set_random_start_phase(bool value) { - _internal_set_random_start_phase(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpriteAnimation.random_start_phase) -} - -// optional .Canary.protobuf.appearances.ANIMATION_LOOP_TYPE loop_type = 4; -inline bool SpriteAnimation::_internal_has_loop_type() const { - bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; - return value; -} -inline bool SpriteAnimation::has_loop_type() const { - return _internal_has_loop_type(); -} -inline void SpriteAnimation::clear_loop_type() { - _impl_.loop_type_ = -1; - _impl_._has_bits_[0] &= ~0x00000010u; -} -inline ::Canary::protobuf::appearances::ANIMATION_LOOP_TYPE SpriteAnimation::_internal_loop_type() const { - return static_cast< ::Canary::protobuf::appearances::ANIMATION_LOOP_TYPE >(_impl_.loop_type_); -} -inline ::Canary::protobuf::appearances::ANIMATION_LOOP_TYPE SpriteAnimation::loop_type() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpriteAnimation.loop_type) - return _internal_loop_type(); -} -inline void SpriteAnimation::_internal_set_loop_type(::Canary::protobuf::appearances::ANIMATION_LOOP_TYPE value) { - assert(::Canary::protobuf::appearances::ANIMATION_LOOP_TYPE_IsValid(value)); - _impl_._has_bits_[0] |= 0x00000010u; - _impl_.loop_type_ = value; -} -inline void SpriteAnimation::set_loop_type(::Canary::protobuf::appearances::ANIMATION_LOOP_TYPE value) { - _internal_set_loop_type(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpriteAnimation.loop_type) -} - -// optional uint32 loop_count = 5; -inline bool SpriteAnimation::_internal_has_loop_count() const { - bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; - return value; -} -inline bool SpriteAnimation::has_loop_count() const { - return _internal_has_loop_count(); -} -inline void SpriteAnimation::clear_loop_count() { - _impl_.loop_count_ = 0u; - _impl_._has_bits_[0] &= ~0x00000008u; -} -inline uint32_t SpriteAnimation::_internal_loop_count() const { - return _impl_.loop_count_; -} -inline uint32_t SpriteAnimation::loop_count() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpriteAnimation.loop_count) - return _internal_loop_count(); -} -inline void SpriteAnimation::_internal_set_loop_count(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000008u; - _impl_.loop_count_ = value; -} -inline void SpriteAnimation::set_loop_count(uint32_t value) { - _internal_set_loop_count(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpriteAnimation.loop_count) -} - -// repeated .Canary.protobuf.appearances.SpritePhase sprite_phase = 6; -inline int SpriteAnimation::_internal_sprite_phase_size() const { - return _impl_.sprite_phase_.size(); -} -inline int SpriteAnimation::sprite_phase_size() const { - return _internal_sprite_phase_size(); -} -inline void SpriteAnimation::clear_sprite_phase() { - _impl_.sprite_phase_.Clear(); -} -inline ::Canary::protobuf::appearances::SpritePhase* SpriteAnimation::mutable_sprite_phase(int index) { - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.SpriteAnimation.sprite_phase) - return _impl_.sprite_phase_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::SpritePhase >* -SpriteAnimation::mutable_sprite_phase() { - // @@protoc_insertion_point(field_mutable_list:Canary.protobuf.appearances.SpriteAnimation.sprite_phase) - return &_impl_.sprite_phase_; -} -inline const ::Canary::protobuf::appearances::SpritePhase& SpriteAnimation::_internal_sprite_phase(int index) const { - return _impl_.sprite_phase_.Get(index); -} -inline const ::Canary::protobuf::appearances::SpritePhase& SpriteAnimation::sprite_phase(int index) const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpriteAnimation.sprite_phase) - return _internal_sprite_phase(index); -} -inline ::Canary::protobuf::appearances::SpritePhase* SpriteAnimation::_internal_add_sprite_phase() { - return _impl_.sprite_phase_.Add(); -} -inline ::Canary::protobuf::appearances::SpritePhase* SpriteAnimation::add_sprite_phase() { - ::Canary::protobuf::appearances::SpritePhase* _add = _internal_add_sprite_phase(); - // @@protoc_insertion_point(field_add:Canary.protobuf.appearances.SpriteAnimation.sprite_phase) - return _add; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::SpritePhase >& -SpriteAnimation::sprite_phase() const { - // @@protoc_insertion_point(field_list:Canary.protobuf.appearances.SpriteAnimation.sprite_phase) - return _impl_.sprite_phase_; -} - -// ------------------------------------------------------------------- - -// Box - -// optional uint32 x = 1; -inline bool Box::_internal_has_x() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool Box::has_x() const { - return _internal_has_x(); -} -inline void Box::clear_x() { - _impl_.x_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t Box::_internal_x() const { - return _impl_.x_; -} -inline uint32_t Box::x() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.Box.x) - return _internal_x(); -} -inline void Box::_internal_set_x(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.x_ = value; -} -inline void Box::set_x(uint32_t value) { - _internal_set_x(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.Box.x) -} - -// optional uint32 y = 2; -inline bool Box::_internal_has_y() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool Box::has_y() const { - return _internal_has_y(); -} -inline void Box::clear_y() { - _impl_.y_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline uint32_t Box::_internal_y() const { - return _impl_.y_; -} -inline uint32_t Box::y() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.Box.y) - return _internal_y(); -} -inline void Box::_internal_set_y(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.y_ = value; -} -inline void Box::set_y(uint32_t value) { - _internal_set_y(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.Box.y) -} - -// optional uint32 width = 3; -inline bool Box::_internal_has_width() const { - bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; - return value; -} -inline bool Box::has_width() const { - return _internal_has_width(); -} -inline void Box::clear_width() { - _impl_.width_ = 0u; - _impl_._has_bits_[0] &= ~0x00000004u; -} -inline uint32_t Box::_internal_width() const { - return _impl_.width_; -} -inline uint32_t Box::width() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.Box.width) - return _internal_width(); -} -inline void Box::_internal_set_width(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000004u; - _impl_.width_ = value; -} -inline void Box::set_width(uint32_t value) { - _internal_set_width(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.Box.width) -} - -// optional uint32 height = 4; -inline bool Box::_internal_has_height() const { - bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; - return value; -} -inline bool Box::has_height() const { - return _internal_has_height(); -} -inline void Box::clear_height() { - _impl_.height_ = 0u; - _impl_._has_bits_[0] &= ~0x00000008u; -} -inline uint32_t Box::_internal_height() const { - return _impl_.height_; -} -inline uint32_t Box::height() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.Box.height) - return _internal_height(); -} -inline void Box::_internal_set_height(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000008u; - _impl_.height_ = value; -} -inline void Box::set_height(uint32_t value) { - _internal_set_height(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.Box.height) -} - -// ------------------------------------------------------------------- - -// SpriteInfo - -// optional uint32 pattern_width = 1; -inline bool SpriteInfo::_internal_has_pattern_width() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool SpriteInfo::has_pattern_width() const { - return _internal_has_pattern_width(); -} -inline void SpriteInfo::clear_pattern_width() { - _impl_.pattern_width_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline uint32_t SpriteInfo::_internal_pattern_width() const { - return _impl_.pattern_width_; -} -inline uint32_t SpriteInfo::pattern_width() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpriteInfo.pattern_width) - return _internal_pattern_width(); -} -inline void SpriteInfo::_internal_set_pattern_width(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.pattern_width_ = value; -} -inline void SpriteInfo::set_pattern_width(uint32_t value) { - _internal_set_pattern_width(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpriteInfo.pattern_width) -} - -// optional uint32 pattern_height = 2; -inline bool SpriteInfo::_internal_has_pattern_height() const { - bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; - return value; -} -inline bool SpriteInfo::has_pattern_height() const { - return _internal_has_pattern_height(); -} -inline void SpriteInfo::clear_pattern_height() { - _impl_.pattern_height_ = 0u; - _impl_._has_bits_[0] &= ~0x00000004u; -} -inline uint32_t SpriteInfo::_internal_pattern_height() const { - return _impl_.pattern_height_; -} -inline uint32_t SpriteInfo::pattern_height() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpriteInfo.pattern_height) - return _internal_pattern_height(); -} -inline void SpriteInfo::_internal_set_pattern_height(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000004u; - _impl_.pattern_height_ = value; -} -inline void SpriteInfo::set_pattern_height(uint32_t value) { - _internal_set_pattern_height(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpriteInfo.pattern_height) -} - -// optional uint32 pattern_depth = 3; -inline bool SpriteInfo::_internal_has_pattern_depth() const { - bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; - return value; -} -inline bool SpriteInfo::has_pattern_depth() const { - return _internal_has_pattern_depth(); -} -inline void SpriteInfo::clear_pattern_depth() { - _impl_.pattern_depth_ = 0u; - _impl_._has_bits_[0] &= ~0x00000008u; -} -inline uint32_t SpriteInfo::_internal_pattern_depth() const { - return _impl_.pattern_depth_; -} -inline uint32_t SpriteInfo::pattern_depth() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpriteInfo.pattern_depth) - return _internal_pattern_depth(); -} -inline void SpriteInfo::_internal_set_pattern_depth(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000008u; - _impl_.pattern_depth_ = value; -} -inline void SpriteInfo::set_pattern_depth(uint32_t value) { - _internal_set_pattern_depth(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpriteInfo.pattern_depth) -} - -// optional uint32 layers = 4; -inline bool SpriteInfo::_internal_has_layers() const { - bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; - return value; -} -inline bool SpriteInfo::has_layers() const { - return _internal_has_layers(); -} -inline void SpriteInfo::clear_layers() { - _impl_.layers_ = 0u; - _impl_._has_bits_[0] &= ~0x00000010u; -} -inline uint32_t SpriteInfo::_internal_layers() const { - return _impl_.layers_; -} -inline uint32_t SpriteInfo::layers() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpriteInfo.layers) - return _internal_layers(); -} -inline void SpriteInfo::_internal_set_layers(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000010u; - _impl_.layers_ = value; -} -inline void SpriteInfo::set_layers(uint32_t value) { - _internal_set_layers(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpriteInfo.layers) -} - -// repeated uint32 sprite_id = 5; -inline int SpriteInfo::_internal_sprite_id_size() const { - return _impl_.sprite_id_.size(); -} -inline int SpriteInfo::sprite_id_size() const { - return _internal_sprite_id_size(); -} -inline void SpriteInfo::clear_sprite_id() { - _impl_.sprite_id_.Clear(); -} -inline uint32_t SpriteInfo::_internal_sprite_id(int index) const { - return _impl_.sprite_id_.Get(index); -} -inline uint32_t SpriteInfo::sprite_id(int index) const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpriteInfo.sprite_id) - return _internal_sprite_id(index); -} -inline void SpriteInfo::set_sprite_id(int index, uint32_t value) { - _impl_.sprite_id_.Set(index, value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpriteInfo.sprite_id) -} -inline void SpriteInfo::_internal_add_sprite_id(uint32_t value) { - _impl_.sprite_id_.Add(value); -} -inline void SpriteInfo::add_sprite_id(uint32_t value) { - _internal_add_sprite_id(value); - // @@protoc_insertion_point(field_add:Canary.protobuf.appearances.SpriteInfo.sprite_id) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint32_t >& -SpriteInfo::_internal_sprite_id() const { - return _impl_.sprite_id_; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint32_t >& -SpriteInfo::sprite_id() const { - // @@protoc_insertion_point(field_list:Canary.protobuf.appearances.SpriteInfo.sprite_id) - return _internal_sprite_id(); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint32_t >* -SpriteInfo::_internal_mutable_sprite_id() { - return &_impl_.sprite_id_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint32_t >* -SpriteInfo::mutable_sprite_id() { - // @@protoc_insertion_point(field_mutable_list:Canary.protobuf.appearances.SpriteInfo.sprite_id) - return _internal_mutable_sprite_id(); -} - -// optional uint32 bounding_square = 7; -inline bool SpriteInfo::_internal_has_bounding_square() const { - bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0; - return value; -} -inline bool SpriteInfo::has_bounding_square() const { - return _internal_has_bounding_square(); -} -inline void SpriteInfo::clear_bounding_square() { - _impl_.bounding_square_ = 0u; - _impl_._has_bits_[0] &= ~0x00000020u; -} -inline uint32_t SpriteInfo::_internal_bounding_square() const { - return _impl_.bounding_square_; -} -inline uint32_t SpriteInfo::bounding_square() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpriteInfo.bounding_square) - return _internal_bounding_square(); -} -inline void SpriteInfo::_internal_set_bounding_square(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000020u; - _impl_.bounding_square_ = value; -} -inline void SpriteInfo::set_bounding_square(uint32_t value) { - _internal_set_bounding_square(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpriteInfo.bounding_square) -} - -// optional .Canary.protobuf.appearances.SpriteAnimation animation = 6; -inline bool SpriteInfo::_internal_has_animation() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - PROTOBUF_ASSUME(!value || _impl_.animation_ != nullptr); - return value; -} -inline bool SpriteInfo::has_animation() const { - return _internal_has_animation(); -} -inline void SpriteInfo::clear_animation() { - if (_impl_.animation_ != nullptr) _impl_.animation_->Clear(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline const ::Canary::protobuf::appearances::SpriteAnimation& SpriteInfo::_internal_animation() const { - const ::Canary::protobuf::appearances::SpriteAnimation* p = _impl_.animation_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_SpriteAnimation_default_instance_); -} -inline const ::Canary::protobuf::appearances::SpriteAnimation& SpriteInfo::animation() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpriteInfo.animation) - return _internal_animation(); -} -inline void SpriteInfo::unsafe_arena_set_allocated_animation( - ::Canary::protobuf::appearances::SpriteAnimation* animation) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.animation_); - } - _impl_.animation_ = animation; - if (animation) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.SpriteInfo.animation) -} -inline ::Canary::protobuf::appearances::SpriteAnimation* SpriteInfo::release_animation() { - _impl_._has_bits_[0] &= ~0x00000001u; - ::Canary::protobuf::appearances::SpriteAnimation* temp = _impl_.animation_; - _impl_.animation_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::SpriteAnimation* SpriteInfo::unsafe_arena_release_animation() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.SpriteInfo.animation) - _impl_._has_bits_[0] &= ~0x00000001u; - ::Canary::protobuf::appearances::SpriteAnimation* temp = _impl_.animation_; - _impl_.animation_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::SpriteAnimation* SpriteInfo::_internal_mutable_animation() { - _impl_._has_bits_[0] |= 0x00000001u; - if (_impl_.animation_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::SpriteAnimation>(GetArenaForAllocation()); - _impl_.animation_ = p; - } - return _impl_.animation_; -} -inline ::Canary::protobuf::appearances::SpriteAnimation* SpriteInfo::mutable_animation() { - ::Canary::protobuf::appearances::SpriteAnimation* _msg = _internal_mutable_animation(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.SpriteInfo.animation) - return _msg; -} -inline void SpriteInfo::set_allocated_animation(::Canary::protobuf::appearances::SpriteAnimation* animation) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.animation_; - } - if (animation) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(animation); - if (message_arena != submessage_arena) { - animation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, animation, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - _impl_.animation_ = animation; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.SpriteInfo.animation) -} - -// optional bool is_opaque = 8; -inline bool SpriteInfo::_internal_has_is_opaque() const { - bool value = (_impl_._has_bits_[0] & 0x00000040u) != 0; - return value; -} -inline bool SpriteInfo::has_is_opaque() const { - return _internal_has_is_opaque(); -} -inline void SpriteInfo::clear_is_opaque() { - _impl_.is_opaque_ = false; - _impl_._has_bits_[0] &= ~0x00000040u; -} -inline bool SpriteInfo::_internal_is_opaque() const { - return _impl_.is_opaque_; -} -inline bool SpriteInfo::is_opaque() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpriteInfo.is_opaque) - return _internal_is_opaque(); -} -inline void SpriteInfo::_internal_set_is_opaque(bool value) { - _impl_._has_bits_[0] |= 0x00000040u; - _impl_.is_opaque_ = value; -} -inline void SpriteInfo::set_is_opaque(bool value) { - _internal_set_is_opaque(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpriteInfo.is_opaque) -} - -// repeated .Canary.protobuf.appearances.Box bounding_box_per_direction = 9; -inline int SpriteInfo::_internal_bounding_box_per_direction_size() const { - return _impl_.bounding_box_per_direction_.size(); -} -inline int SpriteInfo::bounding_box_per_direction_size() const { - return _internal_bounding_box_per_direction_size(); -} -inline void SpriteInfo::clear_bounding_box_per_direction() { - _impl_.bounding_box_per_direction_.Clear(); -} -inline ::Canary::protobuf::appearances::Box* SpriteInfo::mutable_bounding_box_per_direction(int index) { - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.SpriteInfo.bounding_box_per_direction) - return _impl_.bounding_box_per_direction_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Box >* -SpriteInfo::mutable_bounding_box_per_direction() { - // @@protoc_insertion_point(field_mutable_list:Canary.protobuf.appearances.SpriteInfo.bounding_box_per_direction) - return &_impl_.bounding_box_per_direction_; -} -inline const ::Canary::protobuf::appearances::Box& SpriteInfo::_internal_bounding_box_per_direction(int index) const { - return _impl_.bounding_box_per_direction_.Get(index); -} -inline const ::Canary::protobuf::appearances::Box& SpriteInfo::bounding_box_per_direction(int index) const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpriteInfo.bounding_box_per_direction) - return _internal_bounding_box_per_direction(index); -} -inline ::Canary::protobuf::appearances::Box* SpriteInfo::_internal_add_bounding_box_per_direction() { - return _impl_.bounding_box_per_direction_.Add(); -} -inline ::Canary::protobuf::appearances::Box* SpriteInfo::add_bounding_box_per_direction() { - ::Canary::protobuf::appearances::Box* _add = _internal_add_bounding_box_per_direction(); - // @@protoc_insertion_point(field_add:Canary.protobuf.appearances.SpriteInfo.bounding_box_per_direction) - return _add; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::Box >& -SpriteInfo::bounding_box_per_direction() const { - // @@protoc_insertion_point(field_list:Canary.protobuf.appearances.SpriteInfo.bounding_box_per_direction) - return _impl_.bounding_box_per_direction_; -} - -// ------------------------------------------------------------------- - -// FrameGroup - -// optional .Canary.protobuf.appearances.FIXED_FRAME_GROUP fixed_frame_group = 1; -inline bool FrameGroup::_internal_has_fixed_frame_group() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool FrameGroup::has_fixed_frame_group() const { - return _internal_has_fixed_frame_group(); -} -inline void FrameGroup::clear_fixed_frame_group() { - _impl_.fixed_frame_group_ = 0; - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline ::Canary::protobuf::appearances::FIXED_FRAME_GROUP FrameGroup::_internal_fixed_frame_group() const { - return static_cast< ::Canary::protobuf::appearances::FIXED_FRAME_GROUP >(_impl_.fixed_frame_group_); -} -inline ::Canary::protobuf::appearances::FIXED_FRAME_GROUP FrameGroup::fixed_frame_group() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.FrameGroup.fixed_frame_group) - return _internal_fixed_frame_group(); -} -inline void FrameGroup::_internal_set_fixed_frame_group(::Canary::protobuf::appearances::FIXED_FRAME_GROUP value) { - assert(::Canary::protobuf::appearances::FIXED_FRAME_GROUP_IsValid(value)); - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.fixed_frame_group_ = value; -} -inline void FrameGroup::set_fixed_frame_group(::Canary::protobuf::appearances::FIXED_FRAME_GROUP value) { - _internal_set_fixed_frame_group(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.FrameGroup.fixed_frame_group) -} - -// optional uint32 id = 2; -inline bool FrameGroup::_internal_has_id() const { - bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; - return value; -} -inline bool FrameGroup::has_id() const { - return _internal_has_id(); -} -inline void FrameGroup::clear_id() { - _impl_.id_ = 0u; - _impl_._has_bits_[0] &= ~0x00000004u; -} -inline uint32_t FrameGroup::_internal_id() const { - return _impl_.id_; -} -inline uint32_t FrameGroup::id() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.FrameGroup.id) - return _internal_id(); -} -inline void FrameGroup::_internal_set_id(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000004u; - _impl_.id_ = value; -} -inline void FrameGroup::set_id(uint32_t value) { - _internal_set_id(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.FrameGroup.id) -} - -// optional .Canary.protobuf.appearances.SpriteInfo sprite_info = 3; -inline bool FrameGroup::_internal_has_sprite_info() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - PROTOBUF_ASSUME(!value || _impl_.sprite_info_ != nullptr); - return value; -} -inline bool FrameGroup::has_sprite_info() const { - return _internal_has_sprite_info(); -} -inline void FrameGroup::clear_sprite_info() { - if (_impl_.sprite_info_ != nullptr) _impl_.sprite_info_->Clear(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline const ::Canary::protobuf::appearances::SpriteInfo& FrameGroup::_internal_sprite_info() const { - const ::Canary::protobuf::appearances::SpriteInfo* p = _impl_.sprite_info_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_SpriteInfo_default_instance_); -} -inline const ::Canary::protobuf::appearances::SpriteInfo& FrameGroup::sprite_info() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.FrameGroup.sprite_info) - return _internal_sprite_info(); -} -inline void FrameGroup::unsafe_arena_set_allocated_sprite_info( - ::Canary::protobuf::appearances::SpriteInfo* sprite_info) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.sprite_info_); - } - _impl_.sprite_info_ = sprite_info; - if (sprite_info) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.FrameGroup.sprite_info) -} -inline ::Canary::protobuf::appearances::SpriteInfo* FrameGroup::release_sprite_info() { - _impl_._has_bits_[0] &= ~0x00000001u; - ::Canary::protobuf::appearances::SpriteInfo* temp = _impl_.sprite_info_; - _impl_.sprite_info_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::SpriteInfo* FrameGroup::unsafe_arena_release_sprite_info() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.FrameGroup.sprite_info) - _impl_._has_bits_[0] &= ~0x00000001u; - ::Canary::protobuf::appearances::SpriteInfo* temp = _impl_.sprite_info_; - _impl_.sprite_info_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::SpriteInfo* FrameGroup::_internal_mutable_sprite_info() { - _impl_._has_bits_[0] |= 0x00000001u; - if (_impl_.sprite_info_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::SpriteInfo>(GetArenaForAllocation()); - _impl_.sprite_info_ = p; - } - return _impl_.sprite_info_; -} -inline ::Canary::protobuf::appearances::SpriteInfo* FrameGroup::mutable_sprite_info() { - ::Canary::protobuf::appearances::SpriteInfo* _msg = _internal_mutable_sprite_info(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.FrameGroup.sprite_info) - return _msg; -} -inline void FrameGroup::set_allocated_sprite_info(::Canary::protobuf::appearances::SpriteInfo* sprite_info) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.sprite_info_; - } - if (sprite_info) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(sprite_info); - if (message_arena != submessage_arena) { - sprite_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, sprite_info, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - _impl_.sprite_info_ = sprite_info; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.FrameGroup.sprite_info) -} - -// ------------------------------------------------------------------- - -// Appearance - -// optional uint32 id = 1; -inline bool Appearance::_internal_has_id() const { - bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; - return value; -} -inline bool Appearance::has_id() const { - return _internal_has_id(); -} -inline void Appearance::clear_id() { - _impl_.id_ = 0u; - _impl_._has_bits_[0] &= ~0x00000008u; -} -inline uint32_t Appearance::_internal_id() const { - return _impl_.id_; -} -inline uint32_t Appearance::id() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.Appearance.id) - return _internal_id(); -} -inline void Appearance::_internal_set_id(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000008u; - _impl_.id_ = value; -} -inline void Appearance::set_id(uint32_t value) { - _internal_set_id(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.Appearance.id) -} - -// repeated .Canary.protobuf.appearances.FrameGroup frame_group = 2; -inline int Appearance::_internal_frame_group_size() const { - return _impl_.frame_group_.size(); -} -inline int Appearance::frame_group_size() const { - return _internal_frame_group_size(); -} -inline void Appearance::clear_frame_group() { - _impl_.frame_group_.Clear(); -} -inline ::Canary::protobuf::appearances::FrameGroup* Appearance::mutable_frame_group(int index) { - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.Appearance.frame_group) - return _impl_.frame_group_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::FrameGroup >* -Appearance::mutable_frame_group() { - // @@protoc_insertion_point(field_mutable_list:Canary.protobuf.appearances.Appearance.frame_group) - return &_impl_.frame_group_; -} -inline const ::Canary::protobuf::appearances::FrameGroup& Appearance::_internal_frame_group(int index) const { - return _impl_.frame_group_.Get(index); -} -inline const ::Canary::protobuf::appearances::FrameGroup& Appearance::frame_group(int index) const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.Appearance.frame_group) - return _internal_frame_group(index); -} -inline ::Canary::protobuf::appearances::FrameGroup* Appearance::_internal_add_frame_group() { - return _impl_.frame_group_.Add(); -} -inline ::Canary::protobuf::appearances::FrameGroup* Appearance::add_frame_group() { - ::Canary::protobuf::appearances::FrameGroup* _add = _internal_add_frame_group(); - // @@protoc_insertion_point(field_add:Canary.protobuf.appearances.Appearance.frame_group) - return _add; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::FrameGroup >& -Appearance::frame_group() const { - // @@protoc_insertion_point(field_list:Canary.protobuf.appearances.Appearance.frame_group) - return _impl_.frame_group_; -} - -// optional .Canary.protobuf.appearances.AppearanceFlags flags = 3; -inline bool Appearance::_internal_has_flags() const { - bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; - PROTOBUF_ASSUME(!value || _impl_.flags_ != nullptr); - return value; -} -inline bool Appearance::has_flags() const { - return _internal_has_flags(); -} -inline void Appearance::clear_flags() { - if (_impl_.flags_ != nullptr) _impl_.flags_->Clear(); - _impl_._has_bits_[0] &= ~0x00000004u; -} -inline const ::Canary::protobuf::appearances::AppearanceFlags& Appearance::_internal_flags() const { - const ::Canary::protobuf::appearances::AppearanceFlags* p = _impl_.flags_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_AppearanceFlags_default_instance_); -} -inline const ::Canary::protobuf::appearances::AppearanceFlags& Appearance::flags() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.Appearance.flags) - return _internal_flags(); -} -inline void Appearance::unsafe_arena_set_allocated_flags( - ::Canary::protobuf::appearances::AppearanceFlags* flags) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.flags_); - } - _impl_.flags_ = flags; - if (flags) { - _impl_._has_bits_[0] |= 0x00000004u; - } else { - _impl_._has_bits_[0] &= ~0x00000004u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.Appearance.flags) -} -inline ::Canary::protobuf::appearances::AppearanceFlags* Appearance::release_flags() { - _impl_._has_bits_[0] &= ~0x00000004u; - ::Canary::protobuf::appearances::AppearanceFlags* temp = _impl_.flags_; - _impl_.flags_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlags* Appearance::unsafe_arena_release_flags() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.Appearance.flags) - _impl_._has_bits_[0] &= ~0x00000004u; - ::Canary::protobuf::appearances::AppearanceFlags* temp = _impl_.flags_; - _impl_.flags_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlags* Appearance::_internal_mutable_flags() { - _impl_._has_bits_[0] |= 0x00000004u; - if (_impl_.flags_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlags>(GetArenaForAllocation()); - _impl_.flags_ = p; - } - return _impl_.flags_; -} -inline ::Canary::protobuf::appearances::AppearanceFlags* Appearance::mutable_flags() { - ::Canary::protobuf::appearances::AppearanceFlags* _msg = _internal_mutable_flags(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.Appearance.flags) - return _msg; -} -inline void Appearance::set_allocated_flags(::Canary::protobuf::appearances::AppearanceFlags* flags) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.flags_; - } - if (flags) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(flags); - if (message_arena != submessage_arena) { - flags = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, flags, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000004u; - } else { - _impl_._has_bits_[0] &= ~0x00000004u; - } - _impl_.flags_ = flags; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.Appearance.flags) -} - -// optional bytes name = 4; -inline bool Appearance::_internal_has_name() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool Appearance::has_name() const { - return _internal_has_name(); -} -inline void Appearance::clear_name() { - _impl_.name_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline const std::string& Appearance::name() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.Appearance.name) - return _internal_name(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void Appearance::set_name(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.name_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.Appearance.name) -} -inline std::string* Appearance::mutable_name() { - std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.Appearance.name) - return _s; -} -inline const std::string& Appearance::_internal_name() const { - return _impl_.name_.Get(); -} -inline void Appearance::_internal_set_name(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.name_.Set(value, GetArenaForAllocation()); -} -inline std::string* Appearance::_internal_mutable_name() { - _impl_._has_bits_[0] |= 0x00000001u; - return _impl_.name_.Mutable(GetArenaForAllocation()); -} -inline std::string* Appearance::release_name() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.Appearance.name) - if (!_internal_has_name()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000001u; - auto* p = _impl_.name_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void Appearance::set_allocated_name(std::string* name) { - if (name != nullptr) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - _impl_.name_.SetAllocated(name, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.Appearance.name) -} - -// optional bytes description = 5; -inline bool Appearance::_internal_has_description() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool Appearance::has_description() const { - return _internal_has_description(); -} -inline void Appearance::clear_description() { - _impl_.description_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline const std::string& Appearance::description() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.Appearance.description) - return _internal_description(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void Appearance::set_description(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.description_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.Appearance.description) -} -inline std::string* Appearance::mutable_description() { - std::string* _s = _internal_mutable_description(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.Appearance.description) - return _s; -} -inline const std::string& Appearance::_internal_description() const { - return _impl_.description_.Get(); -} -inline void Appearance::_internal_set_description(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.description_.Set(value, GetArenaForAllocation()); -} -inline std::string* Appearance::_internal_mutable_description() { - _impl_._has_bits_[0] |= 0x00000002u; - return _impl_.description_.Mutable(GetArenaForAllocation()); -} -inline std::string* Appearance::release_description() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.Appearance.description) - if (!_internal_has_description()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000002u; - auto* p = _impl_.description_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.description_.IsDefault()) { - _impl_.description_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void Appearance::set_allocated_description(std::string* description) { - if (description != nullptr) { - _impl_._has_bits_[0] |= 0x00000002u; - } else { - _impl_._has_bits_[0] &= ~0x00000002u; - } - _impl_.description_.SetAllocated(description, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.description_.IsDefault()) { - _impl_.description_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.Appearance.description) -} - -// ------------------------------------------------------------------- - -// AppearanceFlags - -// optional .Canary.protobuf.appearances.AppearanceFlagBank bank = 1; -inline bool AppearanceFlags::_internal_has_bank() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - PROTOBUF_ASSUME(!value || _impl_.bank_ != nullptr); - return value; -} -inline bool AppearanceFlags::has_bank() const { - return _internal_has_bank(); -} -inline void AppearanceFlags::clear_bank() { - if (_impl_.bank_ != nullptr) _impl_.bank_->Clear(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline const ::Canary::protobuf::appearances::AppearanceFlagBank& AppearanceFlags::_internal_bank() const { - const ::Canary::protobuf::appearances::AppearanceFlagBank* p = _impl_.bank_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_AppearanceFlagBank_default_instance_); -} -inline const ::Canary::protobuf::appearances::AppearanceFlagBank& AppearanceFlags::bank() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.bank) - return _internal_bank(); -} -inline void AppearanceFlags::unsafe_arena_set_allocated_bank( - ::Canary::protobuf::appearances::AppearanceFlagBank* bank) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.bank_); - } - _impl_.bank_ = bank; - if (bank) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.AppearanceFlags.bank) -} -inline ::Canary::protobuf::appearances::AppearanceFlagBank* AppearanceFlags::release_bank() { - _impl_._has_bits_[0] &= ~0x00000001u; - ::Canary::protobuf::appearances::AppearanceFlagBank* temp = _impl_.bank_; - _impl_.bank_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagBank* AppearanceFlags::unsafe_arena_release_bank() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlags.bank) - _impl_._has_bits_[0] &= ~0x00000001u; - ::Canary::protobuf::appearances::AppearanceFlagBank* temp = _impl_.bank_; - _impl_.bank_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagBank* AppearanceFlags::_internal_mutable_bank() { - _impl_._has_bits_[0] |= 0x00000001u; - if (_impl_.bank_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagBank>(GetArenaForAllocation()); - _impl_.bank_ = p; - } - return _impl_.bank_; -} -inline ::Canary::protobuf::appearances::AppearanceFlagBank* AppearanceFlags::mutable_bank() { - ::Canary::protobuf::appearances::AppearanceFlagBank* _msg = _internal_mutable_bank(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlags.bank) - return _msg; -} -inline void AppearanceFlags::set_allocated_bank(::Canary::protobuf::appearances::AppearanceFlagBank* bank) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.bank_; - } - if (bank) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(bank); - if (message_arena != submessage_arena) { - bank = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, bank, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - _impl_.bank_ = bank; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlags.bank) -} - -// optional bool clip = 2; -inline bool AppearanceFlags::_internal_has_clip() const { - bool value = (_impl_._has_bits_[0] & 0x00008000u) != 0; - return value; -} -inline bool AppearanceFlags::has_clip() const { - return _internal_has_clip(); -} -inline void AppearanceFlags::clear_clip() { - _impl_.clip_ = false; - _impl_._has_bits_[0] &= ~0x00008000u; -} -inline bool AppearanceFlags::_internal_clip() const { - return _impl_.clip_; -} -inline bool AppearanceFlags::clip() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.clip) - return _internal_clip(); -} -inline void AppearanceFlags::_internal_set_clip(bool value) { - _impl_._has_bits_[0] |= 0x00008000u; - _impl_.clip_ = value; -} -inline void AppearanceFlags::set_clip(bool value) { - _internal_set_clip(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.clip) -} - -// optional bool bottom = 3; -inline bool AppearanceFlags::_internal_has_bottom() const { - bool value = (_impl_._has_bits_[0] & 0x00010000u) != 0; - return value; -} -inline bool AppearanceFlags::has_bottom() const { - return _internal_has_bottom(); -} -inline void AppearanceFlags::clear_bottom() { - _impl_.bottom_ = false; - _impl_._has_bits_[0] &= ~0x00010000u; -} -inline bool AppearanceFlags::_internal_bottom() const { - return _impl_.bottom_; -} -inline bool AppearanceFlags::bottom() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.bottom) - return _internal_bottom(); -} -inline void AppearanceFlags::_internal_set_bottom(bool value) { - _impl_._has_bits_[0] |= 0x00010000u; - _impl_.bottom_ = value; -} -inline void AppearanceFlags::set_bottom(bool value) { - _internal_set_bottom(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.bottom) -} - -// optional bool top = 4; -inline bool AppearanceFlags::_internal_has_top() const { - bool value = (_impl_._has_bits_[0] & 0x00020000u) != 0; - return value; -} -inline bool AppearanceFlags::has_top() const { - return _internal_has_top(); -} -inline void AppearanceFlags::clear_top() { - _impl_.top_ = false; - _impl_._has_bits_[0] &= ~0x00020000u; -} -inline bool AppearanceFlags::_internal_top() const { - return _impl_.top_; -} -inline bool AppearanceFlags::top() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.top) - return _internal_top(); -} -inline void AppearanceFlags::_internal_set_top(bool value) { - _impl_._has_bits_[0] |= 0x00020000u; - _impl_.top_ = value; -} -inline void AppearanceFlags::set_top(bool value) { - _internal_set_top(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.top) -} - -// optional bool container = 5; -inline bool AppearanceFlags::_internal_has_container() const { - bool value = (_impl_._has_bits_[0] & 0x00040000u) != 0; - return value; -} -inline bool AppearanceFlags::has_container() const { - return _internal_has_container(); -} -inline void AppearanceFlags::clear_container() { - _impl_.container_ = false; - _impl_._has_bits_[0] &= ~0x00040000u; -} -inline bool AppearanceFlags::_internal_container() const { - return _impl_.container_; -} -inline bool AppearanceFlags::container() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.container) - return _internal_container(); -} -inline void AppearanceFlags::_internal_set_container(bool value) { - _impl_._has_bits_[0] |= 0x00040000u; - _impl_.container_ = value; -} -inline void AppearanceFlags::set_container(bool value) { - _internal_set_container(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.container) -} - -// optional bool cumulative = 6; -inline bool AppearanceFlags::_internal_has_cumulative() const { - bool value = (_impl_._has_bits_[0] & 0x00080000u) != 0; - return value; -} -inline bool AppearanceFlags::has_cumulative() const { - return _internal_has_cumulative(); -} -inline void AppearanceFlags::clear_cumulative() { - _impl_.cumulative_ = false; - _impl_._has_bits_[0] &= ~0x00080000u; -} -inline bool AppearanceFlags::_internal_cumulative() const { - return _impl_.cumulative_; -} -inline bool AppearanceFlags::cumulative() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.cumulative) - return _internal_cumulative(); -} -inline void AppearanceFlags::_internal_set_cumulative(bool value) { - _impl_._has_bits_[0] |= 0x00080000u; - _impl_.cumulative_ = value; -} -inline void AppearanceFlags::set_cumulative(bool value) { - _internal_set_cumulative(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.cumulative) -} - -// optional bool usable = 7; -inline bool AppearanceFlags::_internal_has_usable() const { - bool value = (_impl_._has_bits_[0] & 0x00100000u) != 0; - return value; -} -inline bool AppearanceFlags::has_usable() const { - return _internal_has_usable(); -} -inline void AppearanceFlags::clear_usable() { - _impl_.usable_ = false; - _impl_._has_bits_[0] &= ~0x00100000u; -} -inline bool AppearanceFlags::_internal_usable() const { - return _impl_.usable_; -} -inline bool AppearanceFlags::usable() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.usable) - return _internal_usable(); -} -inline void AppearanceFlags::_internal_set_usable(bool value) { - _impl_._has_bits_[0] |= 0x00100000u; - _impl_.usable_ = value; -} -inline void AppearanceFlags::set_usable(bool value) { - _internal_set_usable(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.usable) -} - -// optional bool forceuse = 8; -inline bool AppearanceFlags::_internal_has_forceuse() const { - bool value = (_impl_._has_bits_[0] & 0x00200000u) != 0; - return value; -} -inline bool AppearanceFlags::has_forceuse() const { - return _internal_has_forceuse(); -} -inline void AppearanceFlags::clear_forceuse() { - _impl_.forceuse_ = false; - _impl_._has_bits_[0] &= ~0x00200000u; -} -inline bool AppearanceFlags::_internal_forceuse() const { - return _impl_.forceuse_; -} -inline bool AppearanceFlags::forceuse() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.forceuse) - return _internal_forceuse(); -} -inline void AppearanceFlags::_internal_set_forceuse(bool value) { - _impl_._has_bits_[0] |= 0x00200000u; - _impl_.forceuse_ = value; -} -inline void AppearanceFlags::set_forceuse(bool value) { - _internal_set_forceuse(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.forceuse) -} - -// optional bool multiuse = 9; -inline bool AppearanceFlags::_internal_has_multiuse() const { - bool value = (_impl_._has_bits_[0] & 0x00400000u) != 0; - return value; -} -inline bool AppearanceFlags::has_multiuse() const { - return _internal_has_multiuse(); -} -inline void AppearanceFlags::clear_multiuse() { - _impl_.multiuse_ = false; - _impl_._has_bits_[0] &= ~0x00400000u; -} -inline bool AppearanceFlags::_internal_multiuse() const { - return _impl_.multiuse_; -} -inline bool AppearanceFlags::multiuse() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.multiuse) - return _internal_multiuse(); -} -inline void AppearanceFlags::_internal_set_multiuse(bool value) { - _impl_._has_bits_[0] |= 0x00400000u; - _impl_.multiuse_ = value; -} -inline void AppearanceFlags::set_multiuse(bool value) { - _internal_set_multiuse(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.multiuse) -} - -// optional .Canary.protobuf.appearances.AppearanceFlagWrite write = 10; -inline bool AppearanceFlags::_internal_has_write() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - PROTOBUF_ASSUME(!value || _impl_.write_ != nullptr); - return value; -} -inline bool AppearanceFlags::has_write() const { - return _internal_has_write(); -} -inline void AppearanceFlags::clear_write() { - if (_impl_.write_ != nullptr) _impl_.write_->Clear(); - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline const ::Canary::protobuf::appearances::AppearanceFlagWrite& AppearanceFlags::_internal_write() const { - const ::Canary::protobuf::appearances::AppearanceFlagWrite* p = _impl_.write_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_AppearanceFlagWrite_default_instance_); -} -inline const ::Canary::protobuf::appearances::AppearanceFlagWrite& AppearanceFlags::write() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.write) - return _internal_write(); -} -inline void AppearanceFlags::unsafe_arena_set_allocated_write( - ::Canary::protobuf::appearances::AppearanceFlagWrite* write) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.write_); - } - _impl_.write_ = write; - if (write) { - _impl_._has_bits_[0] |= 0x00000002u; - } else { - _impl_._has_bits_[0] &= ~0x00000002u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.AppearanceFlags.write) -} -inline ::Canary::protobuf::appearances::AppearanceFlagWrite* AppearanceFlags::release_write() { - _impl_._has_bits_[0] &= ~0x00000002u; - ::Canary::protobuf::appearances::AppearanceFlagWrite* temp = _impl_.write_; - _impl_.write_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagWrite* AppearanceFlags::unsafe_arena_release_write() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlags.write) - _impl_._has_bits_[0] &= ~0x00000002u; - ::Canary::protobuf::appearances::AppearanceFlagWrite* temp = _impl_.write_; - _impl_.write_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagWrite* AppearanceFlags::_internal_mutable_write() { - _impl_._has_bits_[0] |= 0x00000002u; - if (_impl_.write_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagWrite>(GetArenaForAllocation()); - _impl_.write_ = p; - } - return _impl_.write_; -} -inline ::Canary::protobuf::appearances::AppearanceFlagWrite* AppearanceFlags::mutable_write() { - ::Canary::protobuf::appearances::AppearanceFlagWrite* _msg = _internal_mutable_write(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlags.write) - return _msg; -} -inline void AppearanceFlags::set_allocated_write(::Canary::protobuf::appearances::AppearanceFlagWrite* write) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.write_; - } - if (write) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(write); - if (message_arena != submessage_arena) { - write = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, write, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000002u; - } else { - _impl_._has_bits_[0] &= ~0x00000002u; - } - _impl_.write_ = write; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlags.write) -} - -// optional .Canary.protobuf.appearances.AppearanceFlagWriteOnce write_once = 11; -inline bool AppearanceFlags::_internal_has_write_once() const { - bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; - PROTOBUF_ASSUME(!value || _impl_.write_once_ != nullptr); - return value; -} -inline bool AppearanceFlags::has_write_once() const { - return _internal_has_write_once(); -} -inline void AppearanceFlags::clear_write_once() { - if (_impl_.write_once_ != nullptr) _impl_.write_once_->Clear(); - _impl_._has_bits_[0] &= ~0x00000004u; -} -inline const ::Canary::protobuf::appearances::AppearanceFlagWriteOnce& AppearanceFlags::_internal_write_once() const { - const ::Canary::protobuf::appearances::AppearanceFlagWriteOnce* p = _impl_.write_once_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_AppearanceFlagWriteOnce_default_instance_); -} -inline const ::Canary::protobuf::appearances::AppearanceFlagWriteOnce& AppearanceFlags::write_once() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.write_once) - return _internal_write_once(); -} -inline void AppearanceFlags::unsafe_arena_set_allocated_write_once( - ::Canary::protobuf::appearances::AppearanceFlagWriteOnce* write_once) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.write_once_); - } - _impl_.write_once_ = write_once; - if (write_once) { - _impl_._has_bits_[0] |= 0x00000004u; - } else { - _impl_._has_bits_[0] &= ~0x00000004u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.AppearanceFlags.write_once) -} -inline ::Canary::protobuf::appearances::AppearanceFlagWriteOnce* AppearanceFlags::release_write_once() { - _impl_._has_bits_[0] &= ~0x00000004u; - ::Canary::protobuf::appearances::AppearanceFlagWriteOnce* temp = _impl_.write_once_; - _impl_.write_once_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagWriteOnce* AppearanceFlags::unsafe_arena_release_write_once() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlags.write_once) - _impl_._has_bits_[0] &= ~0x00000004u; - ::Canary::protobuf::appearances::AppearanceFlagWriteOnce* temp = _impl_.write_once_; - _impl_.write_once_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagWriteOnce* AppearanceFlags::_internal_mutable_write_once() { - _impl_._has_bits_[0] |= 0x00000004u; - if (_impl_.write_once_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagWriteOnce>(GetArenaForAllocation()); - _impl_.write_once_ = p; - } - return _impl_.write_once_; -} -inline ::Canary::protobuf::appearances::AppearanceFlagWriteOnce* AppearanceFlags::mutable_write_once() { - ::Canary::protobuf::appearances::AppearanceFlagWriteOnce* _msg = _internal_mutable_write_once(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlags.write_once) - return _msg; -} -inline void AppearanceFlags::set_allocated_write_once(::Canary::protobuf::appearances::AppearanceFlagWriteOnce* write_once) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.write_once_; - } - if (write_once) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(write_once); - if (message_arena != submessage_arena) { - write_once = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, write_once, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000004u; - } else { - _impl_._has_bits_[0] &= ~0x00000004u; - } - _impl_.write_once_ = write_once; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlags.write_once) -} - -// optional bool liquidpool = 12; -inline bool AppearanceFlags::_internal_has_liquidpool() const { - bool value = (_impl_._has_bits_[0] & 0x00800000u) != 0; - return value; -} -inline bool AppearanceFlags::has_liquidpool() const { - return _internal_has_liquidpool(); -} -inline void AppearanceFlags::clear_liquidpool() { - _impl_.liquidpool_ = false; - _impl_._has_bits_[0] &= ~0x00800000u; -} -inline bool AppearanceFlags::_internal_liquidpool() const { - return _impl_.liquidpool_; -} -inline bool AppearanceFlags::liquidpool() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.liquidpool) - return _internal_liquidpool(); -} -inline void AppearanceFlags::_internal_set_liquidpool(bool value) { - _impl_._has_bits_[0] |= 0x00800000u; - _impl_.liquidpool_ = value; -} -inline void AppearanceFlags::set_liquidpool(bool value) { - _internal_set_liquidpool(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.liquidpool) -} - -// optional bool unpass = 13; -inline bool AppearanceFlags::_internal_has_unpass() const { - bool value = (_impl_._has_bits_[0] & 0x01000000u) != 0; - return value; -} -inline bool AppearanceFlags::has_unpass() const { - return _internal_has_unpass(); -} -inline void AppearanceFlags::clear_unpass() { - _impl_.unpass_ = false; - _impl_._has_bits_[0] &= ~0x01000000u; -} -inline bool AppearanceFlags::_internal_unpass() const { - return _impl_.unpass_; -} -inline bool AppearanceFlags::unpass() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.unpass) - return _internal_unpass(); -} -inline void AppearanceFlags::_internal_set_unpass(bool value) { - _impl_._has_bits_[0] |= 0x01000000u; - _impl_.unpass_ = value; -} -inline void AppearanceFlags::set_unpass(bool value) { - _internal_set_unpass(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.unpass) -} - -// optional bool unmove = 14; -inline bool AppearanceFlags::_internal_has_unmove() const { - bool value = (_impl_._has_bits_[0] & 0x02000000u) != 0; - return value; -} -inline bool AppearanceFlags::has_unmove() const { - return _internal_has_unmove(); -} -inline void AppearanceFlags::clear_unmove() { - _impl_.unmove_ = false; - _impl_._has_bits_[0] &= ~0x02000000u; -} -inline bool AppearanceFlags::_internal_unmove() const { - return _impl_.unmove_; -} -inline bool AppearanceFlags::unmove() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.unmove) - return _internal_unmove(); -} -inline void AppearanceFlags::_internal_set_unmove(bool value) { - _impl_._has_bits_[0] |= 0x02000000u; - _impl_.unmove_ = value; -} -inline void AppearanceFlags::set_unmove(bool value) { - _internal_set_unmove(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.unmove) -} - -// optional bool unsight = 15; -inline bool AppearanceFlags::_internal_has_unsight() const { - bool value = (_impl_._has_bits_[0] & 0x04000000u) != 0; - return value; -} -inline bool AppearanceFlags::has_unsight() const { - return _internal_has_unsight(); -} -inline void AppearanceFlags::clear_unsight() { - _impl_.unsight_ = false; - _impl_._has_bits_[0] &= ~0x04000000u; -} -inline bool AppearanceFlags::_internal_unsight() const { - return _impl_.unsight_; -} -inline bool AppearanceFlags::unsight() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.unsight) - return _internal_unsight(); -} -inline void AppearanceFlags::_internal_set_unsight(bool value) { - _impl_._has_bits_[0] |= 0x04000000u; - _impl_.unsight_ = value; -} -inline void AppearanceFlags::set_unsight(bool value) { - _internal_set_unsight(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.unsight) -} - -// optional bool avoid = 16; -inline bool AppearanceFlags::_internal_has_avoid() const { - bool value = (_impl_._has_bits_[0] & 0x08000000u) != 0; - return value; -} -inline bool AppearanceFlags::has_avoid() const { - return _internal_has_avoid(); -} -inline void AppearanceFlags::clear_avoid() { - _impl_.avoid_ = false; - _impl_._has_bits_[0] &= ~0x08000000u; -} -inline bool AppearanceFlags::_internal_avoid() const { - return _impl_.avoid_; -} -inline bool AppearanceFlags::avoid() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.avoid) - return _internal_avoid(); -} -inline void AppearanceFlags::_internal_set_avoid(bool value) { - _impl_._has_bits_[0] |= 0x08000000u; - _impl_.avoid_ = value; -} -inline void AppearanceFlags::set_avoid(bool value) { - _internal_set_avoid(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.avoid) -} - -// optional bool no_movement_animation = 17; -inline bool AppearanceFlags::_internal_has_no_movement_animation() const { - bool value = (_impl_._has_bits_[0] & 0x10000000u) != 0; - return value; -} -inline bool AppearanceFlags::has_no_movement_animation() const { - return _internal_has_no_movement_animation(); -} -inline void AppearanceFlags::clear_no_movement_animation() { - _impl_.no_movement_animation_ = false; - _impl_._has_bits_[0] &= ~0x10000000u; -} -inline bool AppearanceFlags::_internal_no_movement_animation() const { - return _impl_.no_movement_animation_; -} -inline bool AppearanceFlags::no_movement_animation() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.no_movement_animation) - return _internal_no_movement_animation(); -} -inline void AppearanceFlags::_internal_set_no_movement_animation(bool value) { - _impl_._has_bits_[0] |= 0x10000000u; - _impl_.no_movement_animation_ = value; -} -inline void AppearanceFlags::set_no_movement_animation(bool value) { - _internal_set_no_movement_animation(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.no_movement_animation) -} - -// optional bool take = 18; -inline bool AppearanceFlags::_internal_has_take() const { - bool value = (_impl_._has_bits_[0] & 0x20000000u) != 0; - return value; -} -inline bool AppearanceFlags::has_take() const { - return _internal_has_take(); -} -inline void AppearanceFlags::clear_take() { - _impl_.take_ = false; - _impl_._has_bits_[0] &= ~0x20000000u; -} -inline bool AppearanceFlags::_internal_take() const { - return _impl_.take_; -} -inline bool AppearanceFlags::take() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.take) - return _internal_take(); -} -inline void AppearanceFlags::_internal_set_take(bool value) { - _impl_._has_bits_[0] |= 0x20000000u; - _impl_.take_ = value; -} -inline void AppearanceFlags::set_take(bool value) { - _internal_set_take(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.take) -} - -// optional bool liquidcontainer = 19; -inline bool AppearanceFlags::_internal_has_liquidcontainer() const { - bool value = (_impl_._has_bits_[0] & 0x40000000u) != 0; - return value; -} -inline bool AppearanceFlags::has_liquidcontainer() const { - return _internal_has_liquidcontainer(); -} -inline void AppearanceFlags::clear_liquidcontainer() { - _impl_.liquidcontainer_ = false; - _impl_._has_bits_[0] &= ~0x40000000u; -} -inline bool AppearanceFlags::_internal_liquidcontainer() const { - return _impl_.liquidcontainer_; -} -inline bool AppearanceFlags::liquidcontainer() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.liquidcontainer) - return _internal_liquidcontainer(); -} -inline void AppearanceFlags::_internal_set_liquidcontainer(bool value) { - _impl_._has_bits_[0] |= 0x40000000u; - _impl_.liquidcontainer_ = value; -} -inline void AppearanceFlags::set_liquidcontainer(bool value) { - _internal_set_liquidcontainer(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.liquidcontainer) -} - -// optional bool hang = 20; -inline bool AppearanceFlags::_internal_has_hang() const { - bool value = (_impl_._has_bits_[0] & 0x80000000u) != 0; - return value; -} -inline bool AppearanceFlags::has_hang() const { - return _internal_has_hang(); -} -inline void AppearanceFlags::clear_hang() { - _impl_.hang_ = false; - _impl_._has_bits_[0] &= ~0x80000000u; -} -inline bool AppearanceFlags::_internal_hang() const { - return _impl_.hang_; -} -inline bool AppearanceFlags::hang() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.hang) - return _internal_hang(); -} -inline void AppearanceFlags::_internal_set_hang(bool value) { - _impl_._has_bits_[0] |= 0x80000000u; - _impl_.hang_ = value; -} -inline void AppearanceFlags::set_hang(bool value) { - _internal_set_hang(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.hang) -} - -// optional .Canary.protobuf.appearances.AppearanceFlagHook hook = 21; -inline bool AppearanceFlags::_internal_has_hook() const { - bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; - PROTOBUF_ASSUME(!value || _impl_.hook_ != nullptr); - return value; -} -inline bool AppearanceFlags::has_hook() const { - return _internal_has_hook(); -} -inline void AppearanceFlags::clear_hook() { - if (_impl_.hook_ != nullptr) _impl_.hook_->Clear(); - _impl_._has_bits_[0] &= ~0x00000008u; -} -inline const ::Canary::protobuf::appearances::AppearanceFlagHook& AppearanceFlags::_internal_hook() const { - const ::Canary::protobuf::appearances::AppearanceFlagHook* p = _impl_.hook_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_AppearanceFlagHook_default_instance_); -} -inline const ::Canary::protobuf::appearances::AppearanceFlagHook& AppearanceFlags::hook() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.hook) - return _internal_hook(); -} -inline void AppearanceFlags::unsafe_arena_set_allocated_hook( - ::Canary::protobuf::appearances::AppearanceFlagHook* hook) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.hook_); - } - _impl_.hook_ = hook; - if (hook) { - _impl_._has_bits_[0] |= 0x00000008u; - } else { - _impl_._has_bits_[0] &= ~0x00000008u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.AppearanceFlags.hook) -} -inline ::Canary::protobuf::appearances::AppearanceFlagHook* AppearanceFlags::release_hook() { - _impl_._has_bits_[0] &= ~0x00000008u; - ::Canary::protobuf::appearances::AppearanceFlagHook* temp = _impl_.hook_; - _impl_.hook_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagHook* AppearanceFlags::unsafe_arena_release_hook() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlags.hook) - _impl_._has_bits_[0] &= ~0x00000008u; - ::Canary::protobuf::appearances::AppearanceFlagHook* temp = _impl_.hook_; - _impl_.hook_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagHook* AppearanceFlags::_internal_mutable_hook() { - _impl_._has_bits_[0] |= 0x00000008u; - if (_impl_.hook_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagHook>(GetArenaForAllocation()); - _impl_.hook_ = p; - } - return _impl_.hook_; -} -inline ::Canary::protobuf::appearances::AppearanceFlagHook* AppearanceFlags::mutable_hook() { - ::Canary::protobuf::appearances::AppearanceFlagHook* _msg = _internal_mutable_hook(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlags.hook) - return _msg; -} -inline void AppearanceFlags::set_allocated_hook(::Canary::protobuf::appearances::AppearanceFlagHook* hook) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.hook_; - } - if (hook) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(hook); - if (message_arena != submessage_arena) { - hook = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, hook, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000008u; - } else { - _impl_._has_bits_[0] &= ~0x00000008u; - } - _impl_.hook_ = hook; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlags.hook) -} - -// optional bool rotate = 22; -inline bool AppearanceFlags::_internal_has_rotate() const { - bool value = (_impl_._has_bits_[1] & 0x00000001u) != 0; - return value; -} -inline bool AppearanceFlags::has_rotate() const { - return _internal_has_rotate(); -} -inline void AppearanceFlags::clear_rotate() { - _impl_.rotate_ = false; - _impl_._has_bits_[1] &= ~0x00000001u; -} -inline bool AppearanceFlags::_internal_rotate() const { - return _impl_.rotate_; -} -inline bool AppearanceFlags::rotate() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.rotate) - return _internal_rotate(); -} -inline void AppearanceFlags::_internal_set_rotate(bool value) { - _impl_._has_bits_[1] |= 0x00000001u; - _impl_.rotate_ = value; -} -inline void AppearanceFlags::set_rotate(bool value) { - _internal_set_rotate(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.rotate) -} - -// optional .Canary.protobuf.appearances.AppearanceFlagLight light = 23; -inline bool AppearanceFlags::_internal_has_light() const { - bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; - PROTOBUF_ASSUME(!value || _impl_.light_ != nullptr); - return value; -} -inline bool AppearanceFlags::has_light() const { - return _internal_has_light(); -} -inline void AppearanceFlags::clear_light() { - if (_impl_.light_ != nullptr) _impl_.light_->Clear(); - _impl_._has_bits_[0] &= ~0x00000010u; -} -inline const ::Canary::protobuf::appearances::AppearanceFlagLight& AppearanceFlags::_internal_light() const { - const ::Canary::protobuf::appearances::AppearanceFlagLight* p = _impl_.light_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_AppearanceFlagLight_default_instance_); -} -inline const ::Canary::protobuf::appearances::AppearanceFlagLight& AppearanceFlags::light() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.light) - return _internal_light(); -} -inline void AppearanceFlags::unsafe_arena_set_allocated_light( - ::Canary::protobuf::appearances::AppearanceFlagLight* light) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.light_); - } - _impl_.light_ = light; - if (light) { - _impl_._has_bits_[0] |= 0x00000010u; - } else { - _impl_._has_bits_[0] &= ~0x00000010u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.AppearanceFlags.light) -} -inline ::Canary::protobuf::appearances::AppearanceFlagLight* AppearanceFlags::release_light() { - _impl_._has_bits_[0] &= ~0x00000010u; - ::Canary::protobuf::appearances::AppearanceFlagLight* temp = _impl_.light_; - _impl_.light_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagLight* AppearanceFlags::unsafe_arena_release_light() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlags.light) - _impl_._has_bits_[0] &= ~0x00000010u; - ::Canary::protobuf::appearances::AppearanceFlagLight* temp = _impl_.light_; - _impl_.light_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagLight* AppearanceFlags::_internal_mutable_light() { - _impl_._has_bits_[0] |= 0x00000010u; - if (_impl_.light_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagLight>(GetArenaForAllocation()); - _impl_.light_ = p; - } - return _impl_.light_; -} -inline ::Canary::protobuf::appearances::AppearanceFlagLight* AppearanceFlags::mutable_light() { - ::Canary::protobuf::appearances::AppearanceFlagLight* _msg = _internal_mutable_light(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlags.light) - return _msg; -} -inline void AppearanceFlags::set_allocated_light(::Canary::protobuf::appearances::AppearanceFlagLight* light) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.light_; - } - if (light) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(light); - if (message_arena != submessage_arena) { - light = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, light, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000010u; - } else { - _impl_._has_bits_[0] &= ~0x00000010u; - } - _impl_.light_ = light; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlags.light) -} - -// optional bool dont_hide = 24; -inline bool AppearanceFlags::_internal_has_dont_hide() const { - bool value = (_impl_._has_bits_[1] & 0x00000002u) != 0; - return value; -} -inline bool AppearanceFlags::has_dont_hide() const { - return _internal_has_dont_hide(); -} -inline void AppearanceFlags::clear_dont_hide() { - _impl_.dont_hide_ = false; - _impl_._has_bits_[1] &= ~0x00000002u; -} -inline bool AppearanceFlags::_internal_dont_hide() const { - return _impl_.dont_hide_; -} -inline bool AppearanceFlags::dont_hide() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.dont_hide) - return _internal_dont_hide(); -} -inline void AppearanceFlags::_internal_set_dont_hide(bool value) { - _impl_._has_bits_[1] |= 0x00000002u; - _impl_.dont_hide_ = value; -} -inline void AppearanceFlags::set_dont_hide(bool value) { - _internal_set_dont_hide(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.dont_hide) -} - -// optional bool translucent = 25; -inline bool AppearanceFlags::_internal_has_translucent() const { - bool value = (_impl_._has_bits_[1] & 0x00000004u) != 0; - return value; -} -inline bool AppearanceFlags::has_translucent() const { - return _internal_has_translucent(); -} -inline void AppearanceFlags::clear_translucent() { - _impl_.translucent_ = false; - _impl_._has_bits_[1] &= ~0x00000004u; -} -inline bool AppearanceFlags::_internal_translucent() const { - return _impl_.translucent_; -} -inline bool AppearanceFlags::translucent() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.translucent) - return _internal_translucent(); -} -inline void AppearanceFlags::_internal_set_translucent(bool value) { - _impl_._has_bits_[1] |= 0x00000004u; - _impl_.translucent_ = value; -} -inline void AppearanceFlags::set_translucent(bool value) { - _internal_set_translucent(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.translucent) -} - -// optional .Canary.protobuf.appearances.AppearanceFlagShift shift = 26; -inline bool AppearanceFlags::_internal_has_shift() const { - bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0; - PROTOBUF_ASSUME(!value || _impl_.shift_ != nullptr); - return value; -} -inline bool AppearanceFlags::has_shift() const { - return _internal_has_shift(); -} -inline void AppearanceFlags::clear_shift() { - if (_impl_.shift_ != nullptr) _impl_.shift_->Clear(); - _impl_._has_bits_[0] &= ~0x00000020u; -} -inline const ::Canary::protobuf::appearances::AppearanceFlagShift& AppearanceFlags::_internal_shift() const { - const ::Canary::protobuf::appearances::AppearanceFlagShift* p = _impl_.shift_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_AppearanceFlagShift_default_instance_); -} -inline const ::Canary::protobuf::appearances::AppearanceFlagShift& AppearanceFlags::shift() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.shift) - return _internal_shift(); -} -inline void AppearanceFlags::unsafe_arena_set_allocated_shift( - ::Canary::protobuf::appearances::AppearanceFlagShift* shift) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.shift_); - } - _impl_.shift_ = shift; - if (shift) { - _impl_._has_bits_[0] |= 0x00000020u; - } else { - _impl_._has_bits_[0] &= ~0x00000020u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.AppearanceFlags.shift) -} -inline ::Canary::protobuf::appearances::AppearanceFlagShift* AppearanceFlags::release_shift() { - _impl_._has_bits_[0] &= ~0x00000020u; - ::Canary::protobuf::appearances::AppearanceFlagShift* temp = _impl_.shift_; - _impl_.shift_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagShift* AppearanceFlags::unsafe_arena_release_shift() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlags.shift) - _impl_._has_bits_[0] &= ~0x00000020u; - ::Canary::protobuf::appearances::AppearanceFlagShift* temp = _impl_.shift_; - _impl_.shift_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagShift* AppearanceFlags::_internal_mutable_shift() { - _impl_._has_bits_[0] |= 0x00000020u; - if (_impl_.shift_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagShift>(GetArenaForAllocation()); - _impl_.shift_ = p; - } - return _impl_.shift_; -} -inline ::Canary::protobuf::appearances::AppearanceFlagShift* AppearanceFlags::mutable_shift() { - ::Canary::protobuf::appearances::AppearanceFlagShift* _msg = _internal_mutable_shift(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlags.shift) - return _msg; -} -inline void AppearanceFlags::set_allocated_shift(::Canary::protobuf::appearances::AppearanceFlagShift* shift) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.shift_; - } - if (shift) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(shift); - if (message_arena != submessage_arena) { - shift = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, shift, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000020u; - } else { - _impl_._has_bits_[0] &= ~0x00000020u; - } - _impl_.shift_ = shift; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlags.shift) -} - -// optional .Canary.protobuf.appearances.AppearanceFlagHeight height = 27; -inline bool AppearanceFlags::_internal_has_height() const { - bool value = (_impl_._has_bits_[0] & 0x00000040u) != 0; - PROTOBUF_ASSUME(!value || _impl_.height_ != nullptr); - return value; -} -inline bool AppearanceFlags::has_height() const { - return _internal_has_height(); -} -inline void AppearanceFlags::clear_height() { - if (_impl_.height_ != nullptr) _impl_.height_->Clear(); - _impl_._has_bits_[0] &= ~0x00000040u; -} -inline const ::Canary::protobuf::appearances::AppearanceFlagHeight& AppearanceFlags::_internal_height() const { - const ::Canary::protobuf::appearances::AppearanceFlagHeight* p = _impl_.height_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_AppearanceFlagHeight_default_instance_); -} -inline const ::Canary::protobuf::appearances::AppearanceFlagHeight& AppearanceFlags::height() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.height) - return _internal_height(); -} -inline void AppearanceFlags::unsafe_arena_set_allocated_height( - ::Canary::protobuf::appearances::AppearanceFlagHeight* height) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.height_); - } - _impl_.height_ = height; - if (height) { - _impl_._has_bits_[0] |= 0x00000040u; - } else { - _impl_._has_bits_[0] &= ~0x00000040u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.AppearanceFlags.height) -} -inline ::Canary::protobuf::appearances::AppearanceFlagHeight* AppearanceFlags::release_height() { - _impl_._has_bits_[0] &= ~0x00000040u; - ::Canary::protobuf::appearances::AppearanceFlagHeight* temp = _impl_.height_; - _impl_.height_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagHeight* AppearanceFlags::unsafe_arena_release_height() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlags.height) - _impl_._has_bits_[0] &= ~0x00000040u; - ::Canary::protobuf::appearances::AppearanceFlagHeight* temp = _impl_.height_; - _impl_.height_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagHeight* AppearanceFlags::_internal_mutable_height() { - _impl_._has_bits_[0] |= 0x00000040u; - if (_impl_.height_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagHeight>(GetArenaForAllocation()); - _impl_.height_ = p; - } - return _impl_.height_; -} -inline ::Canary::protobuf::appearances::AppearanceFlagHeight* AppearanceFlags::mutable_height() { - ::Canary::protobuf::appearances::AppearanceFlagHeight* _msg = _internal_mutable_height(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlags.height) - return _msg; -} -inline void AppearanceFlags::set_allocated_height(::Canary::protobuf::appearances::AppearanceFlagHeight* height) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.height_; - } - if (height) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(height); - if (message_arena != submessage_arena) { - height = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, height, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000040u; - } else { - _impl_._has_bits_[0] &= ~0x00000040u; - } - _impl_.height_ = height; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlags.height) -} - -// optional bool lying_object = 28; -inline bool AppearanceFlags::_internal_has_lying_object() const { - bool value = (_impl_._has_bits_[1] & 0x00000008u) != 0; - return value; -} -inline bool AppearanceFlags::has_lying_object() const { - return _internal_has_lying_object(); -} -inline void AppearanceFlags::clear_lying_object() { - _impl_.lying_object_ = false; - _impl_._has_bits_[1] &= ~0x00000008u; -} -inline bool AppearanceFlags::_internal_lying_object() const { - return _impl_.lying_object_; -} -inline bool AppearanceFlags::lying_object() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.lying_object) - return _internal_lying_object(); -} -inline void AppearanceFlags::_internal_set_lying_object(bool value) { - _impl_._has_bits_[1] |= 0x00000008u; - _impl_.lying_object_ = value; -} -inline void AppearanceFlags::set_lying_object(bool value) { - _internal_set_lying_object(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.lying_object) -} - -// optional bool animate_always = 29; -inline bool AppearanceFlags::_internal_has_animate_always() const { - bool value = (_impl_._has_bits_[1] & 0x00000010u) != 0; - return value; -} -inline bool AppearanceFlags::has_animate_always() const { - return _internal_has_animate_always(); -} -inline void AppearanceFlags::clear_animate_always() { - _impl_.animate_always_ = false; - _impl_._has_bits_[1] &= ~0x00000010u; -} -inline bool AppearanceFlags::_internal_animate_always() const { - return _impl_.animate_always_; -} -inline bool AppearanceFlags::animate_always() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.animate_always) - return _internal_animate_always(); -} -inline void AppearanceFlags::_internal_set_animate_always(bool value) { - _impl_._has_bits_[1] |= 0x00000010u; - _impl_.animate_always_ = value; -} -inline void AppearanceFlags::set_animate_always(bool value) { - _internal_set_animate_always(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.animate_always) -} - -// optional .Canary.protobuf.appearances.AppearanceFlagAutomap automap = 30; -inline bool AppearanceFlags::_internal_has_automap() const { - bool value = (_impl_._has_bits_[0] & 0x00000080u) != 0; - PROTOBUF_ASSUME(!value || _impl_.automap_ != nullptr); - return value; -} -inline bool AppearanceFlags::has_automap() const { - return _internal_has_automap(); -} -inline void AppearanceFlags::clear_automap() { - if (_impl_.automap_ != nullptr) _impl_.automap_->Clear(); - _impl_._has_bits_[0] &= ~0x00000080u; -} -inline const ::Canary::protobuf::appearances::AppearanceFlagAutomap& AppearanceFlags::_internal_automap() const { - const ::Canary::protobuf::appearances::AppearanceFlagAutomap* p = _impl_.automap_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_AppearanceFlagAutomap_default_instance_); -} -inline const ::Canary::protobuf::appearances::AppearanceFlagAutomap& AppearanceFlags::automap() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.automap) - return _internal_automap(); -} -inline void AppearanceFlags::unsafe_arena_set_allocated_automap( - ::Canary::protobuf::appearances::AppearanceFlagAutomap* automap) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.automap_); - } - _impl_.automap_ = automap; - if (automap) { - _impl_._has_bits_[0] |= 0x00000080u; - } else { - _impl_._has_bits_[0] &= ~0x00000080u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.AppearanceFlags.automap) -} -inline ::Canary::protobuf::appearances::AppearanceFlagAutomap* AppearanceFlags::release_automap() { - _impl_._has_bits_[0] &= ~0x00000080u; - ::Canary::protobuf::appearances::AppearanceFlagAutomap* temp = _impl_.automap_; - _impl_.automap_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagAutomap* AppearanceFlags::unsafe_arena_release_automap() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlags.automap) - _impl_._has_bits_[0] &= ~0x00000080u; - ::Canary::protobuf::appearances::AppearanceFlagAutomap* temp = _impl_.automap_; - _impl_.automap_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagAutomap* AppearanceFlags::_internal_mutable_automap() { - _impl_._has_bits_[0] |= 0x00000080u; - if (_impl_.automap_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagAutomap>(GetArenaForAllocation()); - _impl_.automap_ = p; - } - return _impl_.automap_; -} -inline ::Canary::protobuf::appearances::AppearanceFlagAutomap* AppearanceFlags::mutable_automap() { - ::Canary::protobuf::appearances::AppearanceFlagAutomap* _msg = _internal_mutable_automap(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlags.automap) - return _msg; -} -inline void AppearanceFlags::set_allocated_automap(::Canary::protobuf::appearances::AppearanceFlagAutomap* automap) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.automap_; - } - if (automap) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(automap); - if (message_arena != submessage_arena) { - automap = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, automap, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000080u; - } else { - _impl_._has_bits_[0] &= ~0x00000080u; - } - _impl_.automap_ = automap; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlags.automap) -} - -// optional .Canary.protobuf.appearances.AppearanceFlagLenshelp lenshelp = 31; -inline bool AppearanceFlags::_internal_has_lenshelp() const { - bool value = (_impl_._has_bits_[0] & 0x00000100u) != 0; - PROTOBUF_ASSUME(!value || _impl_.lenshelp_ != nullptr); - return value; -} -inline bool AppearanceFlags::has_lenshelp() const { - return _internal_has_lenshelp(); -} -inline void AppearanceFlags::clear_lenshelp() { - if (_impl_.lenshelp_ != nullptr) _impl_.lenshelp_->Clear(); - _impl_._has_bits_[0] &= ~0x00000100u; -} -inline const ::Canary::protobuf::appearances::AppearanceFlagLenshelp& AppearanceFlags::_internal_lenshelp() const { - const ::Canary::protobuf::appearances::AppearanceFlagLenshelp* p = _impl_.lenshelp_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_AppearanceFlagLenshelp_default_instance_); -} -inline const ::Canary::protobuf::appearances::AppearanceFlagLenshelp& AppearanceFlags::lenshelp() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.lenshelp) - return _internal_lenshelp(); -} -inline void AppearanceFlags::unsafe_arena_set_allocated_lenshelp( - ::Canary::protobuf::appearances::AppearanceFlagLenshelp* lenshelp) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.lenshelp_); - } - _impl_.lenshelp_ = lenshelp; - if (lenshelp) { - _impl_._has_bits_[0] |= 0x00000100u; - } else { - _impl_._has_bits_[0] &= ~0x00000100u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.AppearanceFlags.lenshelp) -} -inline ::Canary::protobuf::appearances::AppearanceFlagLenshelp* AppearanceFlags::release_lenshelp() { - _impl_._has_bits_[0] &= ~0x00000100u; - ::Canary::protobuf::appearances::AppearanceFlagLenshelp* temp = _impl_.lenshelp_; - _impl_.lenshelp_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagLenshelp* AppearanceFlags::unsafe_arena_release_lenshelp() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlags.lenshelp) - _impl_._has_bits_[0] &= ~0x00000100u; - ::Canary::protobuf::appearances::AppearanceFlagLenshelp* temp = _impl_.lenshelp_; - _impl_.lenshelp_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagLenshelp* AppearanceFlags::_internal_mutable_lenshelp() { - _impl_._has_bits_[0] |= 0x00000100u; - if (_impl_.lenshelp_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagLenshelp>(GetArenaForAllocation()); - _impl_.lenshelp_ = p; - } - return _impl_.lenshelp_; -} -inline ::Canary::protobuf::appearances::AppearanceFlagLenshelp* AppearanceFlags::mutable_lenshelp() { - ::Canary::protobuf::appearances::AppearanceFlagLenshelp* _msg = _internal_mutable_lenshelp(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlags.lenshelp) - return _msg; -} -inline void AppearanceFlags::set_allocated_lenshelp(::Canary::protobuf::appearances::AppearanceFlagLenshelp* lenshelp) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.lenshelp_; - } - if (lenshelp) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(lenshelp); - if (message_arena != submessage_arena) { - lenshelp = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, lenshelp, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000100u; - } else { - _impl_._has_bits_[0] &= ~0x00000100u; - } - _impl_.lenshelp_ = lenshelp; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlags.lenshelp) -} - -// optional bool fullbank = 32; -inline bool AppearanceFlags::_internal_has_fullbank() const { - bool value = (_impl_._has_bits_[1] & 0x00000020u) != 0; - return value; -} -inline bool AppearanceFlags::has_fullbank() const { - return _internal_has_fullbank(); -} -inline void AppearanceFlags::clear_fullbank() { - _impl_.fullbank_ = false; - _impl_._has_bits_[1] &= ~0x00000020u; -} -inline bool AppearanceFlags::_internal_fullbank() const { - return _impl_.fullbank_; -} -inline bool AppearanceFlags::fullbank() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.fullbank) - return _internal_fullbank(); -} -inline void AppearanceFlags::_internal_set_fullbank(bool value) { - _impl_._has_bits_[1] |= 0x00000020u; - _impl_.fullbank_ = value; -} -inline void AppearanceFlags::set_fullbank(bool value) { - _internal_set_fullbank(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.fullbank) -} - -// optional bool ignore_look = 33; -inline bool AppearanceFlags::_internal_has_ignore_look() const { - bool value = (_impl_._has_bits_[1] & 0x00000040u) != 0; - return value; -} -inline bool AppearanceFlags::has_ignore_look() const { - return _internal_has_ignore_look(); -} -inline void AppearanceFlags::clear_ignore_look() { - _impl_.ignore_look_ = false; - _impl_._has_bits_[1] &= ~0x00000040u; -} -inline bool AppearanceFlags::_internal_ignore_look() const { - return _impl_.ignore_look_; -} -inline bool AppearanceFlags::ignore_look() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.ignore_look) - return _internal_ignore_look(); -} -inline void AppearanceFlags::_internal_set_ignore_look(bool value) { - _impl_._has_bits_[1] |= 0x00000040u; - _impl_.ignore_look_ = value; -} -inline void AppearanceFlags::set_ignore_look(bool value) { - _internal_set_ignore_look(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.ignore_look) -} - -// optional .Canary.protobuf.appearances.AppearanceFlagClothes clothes = 34; -inline bool AppearanceFlags::_internal_has_clothes() const { - bool value = (_impl_._has_bits_[0] & 0x00000200u) != 0; - PROTOBUF_ASSUME(!value || _impl_.clothes_ != nullptr); - return value; -} -inline bool AppearanceFlags::has_clothes() const { - return _internal_has_clothes(); -} -inline void AppearanceFlags::clear_clothes() { - if (_impl_.clothes_ != nullptr) _impl_.clothes_->Clear(); - _impl_._has_bits_[0] &= ~0x00000200u; -} -inline const ::Canary::protobuf::appearances::AppearanceFlagClothes& AppearanceFlags::_internal_clothes() const { - const ::Canary::protobuf::appearances::AppearanceFlagClothes* p = _impl_.clothes_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_AppearanceFlagClothes_default_instance_); -} -inline const ::Canary::protobuf::appearances::AppearanceFlagClothes& AppearanceFlags::clothes() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.clothes) - return _internal_clothes(); -} -inline void AppearanceFlags::unsafe_arena_set_allocated_clothes( - ::Canary::protobuf::appearances::AppearanceFlagClothes* clothes) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.clothes_); - } - _impl_.clothes_ = clothes; - if (clothes) { - _impl_._has_bits_[0] |= 0x00000200u; - } else { - _impl_._has_bits_[0] &= ~0x00000200u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.AppearanceFlags.clothes) -} -inline ::Canary::protobuf::appearances::AppearanceFlagClothes* AppearanceFlags::release_clothes() { - _impl_._has_bits_[0] &= ~0x00000200u; - ::Canary::protobuf::appearances::AppearanceFlagClothes* temp = _impl_.clothes_; - _impl_.clothes_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagClothes* AppearanceFlags::unsafe_arena_release_clothes() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlags.clothes) - _impl_._has_bits_[0] &= ~0x00000200u; - ::Canary::protobuf::appearances::AppearanceFlagClothes* temp = _impl_.clothes_; - _impl_.clothes_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagClothes* AppearanceFlags::_internal_mutable_clothes() { - _impl_._has_bits_[0] |= 0x00000200u; - if (_impl_.clothes_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagClothes>(GetArenaForAllocation()); - _impl_.clothes_ = p; - } - return _impl_.clothes_; -} -inline ::Canary::protobuf::appearances::AppearanceFlagClothes* AppearanceFlags::mutable_clothes() { - ::Canary::protobuf::appearances::AppearanceFlagClothes* _msg = _internal_mutable_clothes(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlags.clothes) - return _msg; -} -inline void AppearanceFlags::set_allocated_clothes(::Canary::protobuf::appearances::AppearanceFlagClothes* clothes) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.clothes_; - } - if (clothes) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(clothes); - if (message_arena != submessage_arena) { - clothes = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, clothes, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000200u; - } else { - _impl_._has_bits_[0] &= ~0x00000200u; - } - _impl_.clothes_ = clothes; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlags.clothes) -} - -// optional .Canary.protobuf.appearances.AppearanceFlagDefaultAction default_action = 35; -inline bool AppearanceFlags::_internal_has_default_action() const { - bool value = (_impl_._has_bits_[0] & 0x00000400u) != 0; - PROTOBUF_ASSUME(!value || _impl_.default_action_ != nullptr); - return value; -} -inline bool AppearanceFlags::has_default_action() const { - return _internal_has_default_action(); -} -inline void AppearanceFlags::clear_default_action() { - if (_impl_.default_action_ != nullptr) _impl_.default_action_->Clear(); - _impl_._has_bits_[0] &= ~0x00000400u; -} -inline const ::Canary::protobuf::appearances::AppearanceFlagDefaultAction& AppearanceFlags::_internal_default_action() const { - const ::Canary::protobuf::appearances::AppearanceFlagDefaultAction* p = _impl_.default_action_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_AppearanceFlagDefaultAction_default_instance_); -} -inline const ::Canary::protobuf::appearances::AppearanceFlagDefaultAction& AppearanceFlags::default_action() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.default_action) - return _internal_default_action(); -} -inline void AppearanceFlags::unsafe_arena_set_allocated_default_action( - ::Canary::protobuf::appearances::AppearanceFlagDefaultAction* default_action) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.default_action_); - } - _impl_.default_action_ = default_action; - if (default_action) { - _impl_._has_bits_[0] |= 0x00000400u; - } else { - _impl_._has_bits_[0] &= ~0x00000400u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.AppearanceFlags.default_action) -} -inline ::Canary::protobuf::appearances::AppearanceFlagDefaultAction* AppearanceFlags::release_default_action() { - _impl_._has_bits_[0] &= ~0x00000400u; - ::Canary::protobuf::appearances::AppearanceFlagDefaultAction* temp = _impl_.default_action_; - _impl_.default_action_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagDefaultAction* AppearanceFlags::unsafe_arena_release_default_action() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlags.default_action) - _impl_._has_bits_[0] &= ~0x00000400u; - ::Canary::protobuf::appearances::AppearanceFlagDefaultAction* temp = _impl_.default_action_; - _impl_.default_action_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagDefaultAction* AppearanceFlags::_internal_mutable_default_action() { - _impl_._has_bits_[0] |= 0x00000400u; - if (_impl_.default_action_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagDefaultAction>(GetArenaForAllocation()); - _impl_.default_action_ = p; - } - return _impl_.default_action_; -} -inline ::Canary::protobuf::appearances::AppearanceFlagDefaultAction* AppearanceFlags::mutable_default_action() { - ::Canary::protobuf::appearances::AppearanceFlagDefaultAction* _msg = _internal_mutable_default_action(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlags.default_action) - return _msg; -} -inline void AppearanceFlags::set_allocated_default_action(::Canary::protobuf::appearances::AppearanceFlagDefaultAction* default_action) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.default_action_; - } - if (default_action) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(default_action); - if (message_arena != submessage_arena) { - default_action = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, default_action, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000400u; - } else { - _impl_._has_bits_[0] &= ~0x00000400u; - } - _impl_.default_action_ = default_action; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlags.default_action) -} - -// optional .Canary.protobuf.appearances.AppearanceFlagMarket market = 36; -inline bool AppearanceFlags::_internal_has_market() const { - bool value = (_impl_._has_bits_[0] & 0x00000800u) != 0; - PROTOBUF_ASSUME(!value || _impl_.market_ != nullptr); - return value; -} -inline bool AppearanceFlags::has_market() const { - return _internal_has_market(); -} -inline void AppearanceFlags::clear_market() { - if (_impl_.market_ != nullptr) _impl_.market_->Clear(); - _impl_._has_bits_[0] &= ~0x00000800u; -} -inline const ::Canary::protobuf::appearances::AppearanceFlagMarket& AppearanceFlags::_internal_market() const { - const ::Canary::protobuf::appearances::AppearanceFlagMarket* p = _impl_.market_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_AppearanceFlagMarket_default_instance_); -} -inline const ::Canary::protobuf::appearances::AppearanceFlagMarket& AppearanceFlags::market() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.market) - return _internal_market(); -} -inline void AppearanceFlags::unsafe_arena_set_allocated_market( - ::Canary::protobuf::appearances::AppearanceFlagMarket* market) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.market_); - } - _impl_.market_ = market; - if (market) { - _impl_._has_bits_[0] |= 0x00000800u; - } else { - _impl_._has_bits_[0] &= ~0x00000800u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.AppearanceFlags.market) -} -inline ::Canary::protobuf::appearances::AppearanceFlagMarket* AppearanceFlags::release_market() { - _impl_._has_bits_[0] &= ~0x00000800u; - ::Canary::protobuf::appearances::AppearanceFlagMarket* temp = _impl_.market_; - _impl_.market_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagMarket* AppearanceFlags::unsafe_arena_release_market() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlags.market) - _impl_._has_bits_[0] &= ~0x00000800u; - ::Canary::protobuf::appearances::AppearanceFlagMarket* temp = _impl_.market_; - _impl_.market_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagMarket* AppearanceFlags::_internal_mutable_market() { - _impl_._has_bits_[0] |= 0x00000800u; - if (_impl_.market_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagMarket>(GetArenaForAllocation()); - _impl_.market_ = p; - } - return _impl_.market_; -} -inline ::Canary::protobuf::appearances::AppearanceFlagMarket* AppearanceFlags::mutable_market() { - ::Canary::protobuf::appearances::AppearanceFlagMarket* _msg = _internal_mutable_market(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlags.market) - return _msg; -} -inline void AppearanceFlags::set_allocated_market(::Canary::protobuf::appearances::AppearanceFlagMarket* market) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.market_; - } - if (market) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(market); - if (message_arena != submessage_arena) { - market = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, market, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000800u; - } else { - _impl_._has_bits_[0] &= ~0x00000800u; - } - _impl_.market_ = market; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlags.market) -} - -// optional bool wrap = 37; -inline bool AppearanceFlags::_internal_has_wrap() const { - bool value = (_impl_._has_bits_[1] & 0x00000080u) != 0; - return value; -} -inline bool AppearanceFlags::has_wrap() const { - return _internal_has_wrap(); -} -inline void AppearanceFlags::clear_wrap() { - _impl_.wrap_ = false; - _impl_._has_bits_[1] &= ~0x00000080u; -} -inline bool AppearanceFlags::_internal_wrap() const { - return _impl_.wrap_; -} -inline bool AppearanceFlags::wrap() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.wrap) - return _internal_wrap(); -} -inline void AppearanceFlags::_internal_set_wrap(bool value) { - _impl_._has_bits_[1] |= 0x00000080u; - _impl_.wrap_ = value; -} -inline void AppearanceFlags::set_wrap(bool value) { - _internal_set_wrap(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.wrap) -} - -// optional bool unwrap = 38; -inline bool AppearanceFlags::_internal_has_unwrap() const { - bool value = (_impl_._has_bits_[1] & 0x00000100u) != 0; - return value; -} -inline bool AppearanceFlags::has_unwrap() const { - return _internal_has_unwrap(); -} -inline void AppearanceFlags::clear_unwrap() { - _impl_.unwrap_ = false; - _impl_._has_bits_[1] &= ~0x00000100u; -} -inline bool AppearanceFlags::_internal_unwrap() const { - return _impl_.unwrap_; -} -inline bool AppearanceFlags::unwrap() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.unwrap) - return _internal_unwrap(); -} -inline void AppearanceFlags::_internal_set_unwrap(bool value) { - _impl_._has_bits_[1] |= 0x00000100u; - _impl_.unwrap_ = value; -} -inline void AppearanceFlags::set_unwrap(bool value) { - _internal_set_unwrap(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.unwrap) -} - -// optional bool topeffect = 39; -inline bool AppearanceFlags::_internal_has_topeffect() const { - bool value = (_impl_._has_bits_[1] & 0x00000200u) != 0; - return value; -} -inline bool AppearanceFlags::has_topeffect() const { - return _internal_has_topeffect(); -} -inline void AppearanceFlags::clear_topeffect() { - _impl_.topeffect_ = false; - _impl_._has_bits_[1] &= ~0x00000200u; -} -inline bool AppearanceFlags::_internal_topeffect() const { - return _impl_.topeffect_; -} -inline bool AppearanceFlags::topeffect() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.topeffect) - return _internal_topeffect(); -} -inline void AppearanceFlags::_internal_set_topeffect(bool value) { - _impl_._has_bits_[1] |= 0x00000200u; - _impl_.topeffect_ = value; -} -inline void AppearanceFlags::set_topeffect(bool value) { - _internal_set_topeffect(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.topeffect) -} - -// repeated .Canary.protobuf.appearances.AppearanceFlagNPC npcsaledata = 40; -inline int AppearanceFlags::_internal_npcsaledata_size() const { - return _impl_.npcsaledata_.size(); -} -inline int AppearanceFlags::npcsaledata_size() const { - return _internal_npcsaledata_size(); -} -inline void AppearanceFlags::clear_npcsaledata() { - _impl_.npcsaledata_.Clear(); -} -inline ::Canary::protobuf::appearances::AppearanceFlagNPC* AppearanceFlags::mutable_npcsaledata(int index) { - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlags.npcsaledata) - return _impl_.npcsaledata_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::AppearanceFlagNPC >* -AppearanceFlags::mutable_npcsaledata() { - // @@protoc_insertion_point(field_mutable_list:Canary.protobuf.appearances.AppearanceFlags.npcsaledata) - return &_impl_.npcsaledata_; -} -inline const ::Canary::protobuf::appearances::AppearanceFlagNPC& AppearanceFlags::_internal_npcsaledata(int index) const { - return _impl_.npcsaledata_.Get(index); -} -inline const ::Canary::protobuf::appearances::AppearanceFlagNPC& AppearanceFlags::npcsaledata(int index) const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.npcsaledata) - return _internal_npcsaledata(index); -} -inline ::Canary::protobuf::appearances::AppearanceFlagNPC* AppearanceFlags::_internal_add_npcsaledata() { - return _impl_.npcsaledata_.Add(); -} -inline ::Canary::protobuf::appearances::AppearanceFlagNPC* AppearanceFlags::add_npcsaledata() { - ::Canary::protobuf::appearances::AppearanceFlagNPC* _add = _internal_add_npcsaledata(); - // @@protoc_insertion_point(field_add:Canary.protobuf.appearances.AppearanceFlags.npcsaledata) - return _add; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::appearances::AppearanceFlagNPC >& -AppearanceFlags::npcsaledata() const { - // @@protoc_insertion_point(field_list:Canary.protobuf.appearances.AppearanceFlags.npcsaledata) - return _impl_.npcsaledata_; -} - -// optional .Canary.protobuf.appearances.AppearanceFlagChangedToExpire changedtoexpire = 41; -inline bool AppearanceFlags::_internal_has_changedtoexpire() const { - bool value = (_impl_._has_bits_[0] & 0x00001000u) != 0; - PROTOBUF_ASSUME(!value || _impl_.changedtoexpire_ != nullptr); - return value; -} -inline bool AppearanceFlags::has_changedtoexpire() const { - return _internal_has_changedtoexpire(); -} -inline void AppearanceFlags::clear_changedtoexpire() { - if (_impl_.changedtoexpire_ != nullptr) _impl_.changedtoexpire_->Clear(); - _impl_._has_bits_[0] &= ~0x00001000u; -} -inline const ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire& AppearanceFlags::_internal_changedtoexpire() const { - const ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* p = _impl_.changedtoexpire_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_AppearanceFlagChangedToExpire_default_instance_); -} -inline const ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire& AppearanceFlags::changedtoexpire() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.changedtoexpire) - return _internal_changedtoexpire(); -} -inline void AppearanceFlags::unsafe_arena_set_allocated_changedtoexpire( - ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* changedtoexpire) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.changedtoexpire_); - } - _impl_.changedtoexpire_ = changedtoexpire; - if (changedtoexpire) { - _impl_._has_bits_[0] |= 0x00001000u; - } else { - _impl_._has_bits_[0] &= ~0x00001000u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.AppearanceFlags.changedtoexpire) -} -inline ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* AppearanceFlags::release_changedtoexpire() { - _impl_._has_bits_[0] &= ~0x00001000u; - ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* temp = _impl_.changedtoexpire_; - _impl_.changedtoexpire_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* AppearanceFlags::unsafe_arena_release_changedtoexpire() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlags.changedtoexpire) - _impl_._has_bits_[0] &= ~0x00001000u; - ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* temp = _impl_.changedtoexpire_; - _impl_.changedtoexpire_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* AppearanceFlags::_internal_mutable_changedtoexpire() { - _impl_._has_bits_[0] |= 0x00001000u; - if (_impl_.changedtoexpire_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagChangedToExpire>(GetArenaForAllocation()); - _impl_.changedtoexpire_ = p; - } - return _impl_.changedtoexpire_; -} -inline ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* AppearanceFlags::mutable_changedtoexpire() { - ::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* _msg = _internal_mutable_changedtoexpire(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlags.changedtoexpire) - return _msg; -} -inline void AppearanceFlags::set_allocated_changedtoexpire(::Canary::protobuf::appearances::AppearanceFlagChangedToExpire* changedtoexpire) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.changedtoexpire_; - } - if (changedtoexpire) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(changedtoexpire); - if (message_arena != submessage_arena) { - changedtoexpire = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, changedtoexpire, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00001000u; - } else { - _impl_._has_bits_[0] &= ~0x00001000u; - } - _impl_.changedtoexpire_ = changedtoexpire; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlags.changedtoexpire) -} - -// optional bool corpse = 42; -inline bool AppearanceFlags::_internal_has_corpse() const { - bool value = (_impl_._has_bits_[1] & 0x00000400u) != 0; - return value; -} -inline bool AppearanceFlags::has_corpse() const { - return _internal_has_corpse(); -} -inline void AppearanceFlags::clear_corpse() { - _impl_.corpse_ = false; - _impl_._has_bits_[1] &= ~0x00000400u; -} -inline bool AppearanceFlags::_internal_corpse() const { - return _impl_.corpse_; -} -inline bool AppearanceFlags::corpse() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.corpse) - return _internal_corpse(); -} -inline void AppearanceFlags::_internal_set_corpse(bool value) { - _impl_._has_bits_[1] |= 0x00000400u; - _impl_.corpse_ = value; -} -inline void AppearanceFlags::set_corpse(bool value) { - _internal_set_corpse(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.corpse) -} - -// optional bool player_corpse = 43; -inline bool AppearanceFlags::_internal_has_player_corpse() const { - bool value = (_impl_._has_bits_[1] & 0x00000800u) != 0; - return value; -} -inline bool AppearanceFlags::has_player_corpse() const { - return _internal_has_player_corpse(); -} -inline void AppearanceFlags::clear_player_corpse() { - _impl_.player_corpse_ = false; - _impl_._has_bits_[1] &= ~0x00000800u; -} -inline bool AppearanceFlags::_internal_player_corpse() const { - return _impl_.player_corpse_; -} -inline bool AppearanceFlags::player_corpse() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.player_corpse) - return _internal_player_corpse(); -} -inline void AppearanceFlags::_internal_set_player_corpse(bool value) { - _impl_._has_bits_[1] |= 0x00000800u; - _impl_.player_corpse_ = value; -} -inline void AppearanceFlags::set_player_corpse(bool value) { - _internal_set_player_corpse(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.player_corpse) -} - -// optional .Canary.protobuf.appearances.AppearanceFlagCyclopedia cyclopediaitem = 44; -inline bool AppearanceFlags::_internal_has_cyclopediaitem() const { - bool value = (_impl_._has_bits_[0] & 0x00002000u) != 0; - PROTOBUF_ASSUME(!value || _impl_.cyclopediaitem_ != nullptr); - return value; -} -inline bool AppearanceFlags::has_cyclopediaitem() const { - return _internal_has_cyclopediaitem(); -} -inline void AppearanceFlags::clear_cyclopediaitem() { - if (_impl_.cyclopediaitem_ != nullptr) _impl_.cyclopediaitem_->Clear(); - _impl_._has_bits_[0] &= ~0x00002000u; -} -inline const ::Canary::protobuf::appearances::AppearanceFlagCyclopedia& AppearanceFlags::_internal_cyclopediaitem() const { - const ::Canary::protobuf::appearances::AppearanceFlagCyclopedia* p = _impl_.cyclopediaitem_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_AppearanceFlagCyclopedia_default_instance_); -} -inline const ::Canary::protobuf::appearances::AppearanceFlagCyclopedia& AppearanceFlags::cyclopediaitem() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.cyclopediaitem) - return _internal_cyclopediaitem(); -} -inline void AppearanceFlags::unsafe_arena_set_allocated_cyclopediaitem( - ::Canary::protobuf::appearances::AppearanceFlagCyclopedia* cyclopediaitem) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.cyclopediaitem_); - } - _impl_.cyclopediaitem_ = cyclopediaitem; - if (cyclopediaitem) { - _impl_._has_bits_[0] |= 0x00002000u; - } else { - _impl_._has_bits_[0] &= ~0x00002000u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.AppearanceFlags.cyclopediaitem) -} -inline ::Canary::protobuf::appearances::AppearanceFlagCyclopedia* AppearanceFlags::release_cyclopediaitem() { - _impl_._has_bits_[0] &= ~0x00002000u; - ::Canary::protobuf::appearances::AppearanceFlagCyclopedia* temp = _impl_.cyclopediaitem_; - _impl_.cyclopediaitem_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagCyclopedia* AppearanceFlags::unsafe_arena_release_cyclopediaitem() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlags.cyclopediaitem) - _impl_._has_bits_[0] &= ~0x00002000u; - ::Canary::protobuf::appearances::AppearanceFlagCyclopedia* temp = _impl_.cyclopediaitem_; - _impl_.cyclopediaitem_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagCyclopedia* AppearanceFlags::_internal_mutable_cyclopediaitem() { - _impl_._has_bits_[0] |= 0x00002000u; - if (_impl_.cyclopediaitem_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagCyclopedia>(GetArenaForAllocation()); - _impl_.cyclopediaitem_ = p; - } - return _impl_.cyclopediaitem_; -} -inline ::Canary::protobuf::appearances::AppearanceFlagCyclopedia* AppearanceFlags::mutable_cyclopediaitem() { - ::Canary::protobuf::appearances::AppearanceFlagCyclopedia* _msg = _internal_mutable_cyclopediaitem(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlags.cyclopediaitem) - return _msg; -} -inline void AppearanceFlags::set_allocated_cyclopediaitem(::Canary::protobuf::appearances::AppearanceFlagCyclopedia* cyclopediaitem) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.cyclopediaitem_; - } - if (cyclopediaitem) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(cyclopediaitem); - if (message_arena != submessage_arena) { - cyclopediaitem = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, cyclopediaitem, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00002000u; - } else { - _impl_._has_bits_[0] &= ~0x00002000u; - } - _impl_.cyclopediaitem_ = cyclopediaitem; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlags.cyclopediaitem) -} - -// optional bool ammo = 45; -inline bool AppearanceFlags::_internal_has_ammo() const { - bool value = (_impl_._has_bits_[1] & 0x00001000u) != 0; - return value; -} -inline bool AppearanceFlags::has_ammo() const { - return _internal_has_ammo(); -} -inline void AppearanceFlags::clear_ammo() { - _impl_.ammo_ = false; - _impl_._has_bits_[1] &= ~0x00001000u; -} -inline bool AppearanceFlags::_internal_ammo() const { - return _impl_.ammo_; -} -inline bool AppearanceFlags::ammo() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.ammo) - return _internal_ammo(); -} -inline void AppearanceFlags::_internal_set_ammo(bool value) { - _impl_._has_bits_[1] |= 0x00001000u; - _impl_.ammo_ = value; -} -inline void AppearanceFlags::set_ammo(bool value) { - _internal_set_ammo(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.ammo) -} - -// optional bool show_off_socket = 46; -inline bool AppearanceFlags::_internal_has_show_off_socket() const { - bool value = (_impl_._has_bits_[1] & 0x00002000u) != 0; - return value; -} -inline bool AppearanceFlags::has_show_off_socket() const { - return _internal_has_show_off_socket(); -} -inline void AppearanceFlags::clear_show_off_socket() { - _impl_.show_off_socket_ = false; - _impl_._has_bits_[1] &= ~0x00002000u; -} -inline bool AppearanceFlags::_internal_show_off_socket() const { - return _impl_.show_off_socket_; -} -inline bool AppearanceFlags::show_off_socket() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.show_off_socket) - return _internal_show_off_socket(); -} -inline void AppearanceFlags::_internal_set_show_off_socket(bool value) { - _impl_._has_bits_[1] |= 0x00002000u; - _impl_.show_off_socket_ = value; -} -inline void AppearanceFlags::set_show_off_socket(bool value) { - _internal_set_show_off_socket(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.show_off_socket) -} - -// optional bool reportable = 47; -inline bool AppearanceFlags::_internal_has_reportable() const { - bool value = (_impl_._has_bits_[1] & 0x00004000u) != 0; - return value; -} -inline bool AppearanceFlags::has_reportable() const { - return _internal_has_reportable(); -} -inline void AppearanceFlags::clear_reportable() { - _impl_.reportable_ = false; - _impl_._has_bits_[1] &= ~0x00004000u; -} -inline bool AppearanceFlags::_internal_reportable() const { - return _impl_.reportable_; -} -inline bool AppearanceFlags::reportable() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.reportable) - return _internal_reportable(); -} -inline void AppearanceFlags::_internal_set_reportable(bool value) { - _impl_._has_bits_[1] |= 0x00004000u; - _impl_.reportable_ = value; -} -inline void AppearanceFlags::set_reportable(bool value) { - _internal_set_reportable(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.reportable) -} - -// optional .Canary.protobuf.appearances.AppearanceFlagUpgradeClassification upgradeclassification = 48; -inline bool AppearanceFlags::_internal_has_upgradeclassification() const { - bool value = (_impl_._has_bits_[0] & 0x00004000u) != 0; - PROTOBUF_ASSUME(!value || _impl_.upgradeclassification_ != nullptr); - return value; -} -inline bool AppearanceFlags::has_upgradeclassification() const { - return _internal_has_upgradeclassification(); -} -inline void AppearanceFlags::clear_upgradeclassification() { - if (_impl_.upgradeclassification_ != nullptr) _impl_.upgradeclassification_->Clear(); - _impl_._has_bits_[0] &= ~0x00004000u; -} -inline const ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification& AppearanceFlags::_internal_upgradeclassification() const { - const ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* p = _impl_.upgradeclassification_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::appearances::_AppearanceFlagUpgradeClassification_default_instance_); -} -inline const ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification& AppearanceFlags::upgradeclassification() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.upgradeclassification) - return _internal_upgradeclassification(); -} -inline void AppearanceFlags::unsafe_arena_set_allocated_upgradeclassification( - ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* upgradeclassification) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.upgradeclassification_); - } - _impl_.upgradeclassification_ = upgradeclassification; - if (upgradeclassification) { - _impl_._has_bits_[0] |= 0x00004000u; - } else { - _impl_._has_bits_[0] &= ~0x00004000u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.appearances.AppearanceFlags.upgradeclassification) -} -inline ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* AppearanceFlags::release_upgradeclassification() { - _impl_._has_bits_[0] &= ~0x00004000u; - ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* temp = _impl_.upgradeclassification_; - _impl_.upgradeclassification_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* AppearanceFlags::unsafe_arena_release_upgradeclassification() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlags.upgradeclassification) - _impl_._has_bits_[0] &= ~0x00004000u; - ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* temp = _impl_.upgradeclassification_; - _impl_.upgradeclassification_ = nullptr; - return temp; -} -inline ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* AppearanceFlags::_internal_mutable_upgradeclassification() { - _impl_._has_bits_[0] |= 0x00004000u; - if (_impl_.upgradeclassification_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification>(GetArenaForAllocation()); - _impl_.upgradeclassification_ = p; - } - return _impl_.upgradeclassification_; -} -inline ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* AppearanceFlags::mutable_upgradeclassification() { - ::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* _msg = _internal_mutable_upgradeclassification(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlags.upgradeclassification) - return _msg; -} -inline void AppearanceFlags::set_allocated_upgradeclassification(::Canary::protobuf::appearances::AppearanceFlagUpgradeClassification* upgradeclassification) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.upgradeclassification_; - } - if (upgradeclassification) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(upgradeclassification); - if (message_arena != submessage_arena) { - upgradeclassification = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, upgradeclassification, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00004000u; - } else { - _impl_._has_bits_[0] &= ~0x00004000u; - } - _impl_.upgradeclassification_ = upgradeclassification; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlags.upgradeclassification) -} - -// optional bool reverse_addons_east = 49; -inline bool AppearanceFlags::_internal_has_reverse_addons_east() const { - bool value = (_impl_._has_bits_[1] & 0x00008000u) != 0; - return value; -} -inline bool AppearanceFlags::has_reverse_addons_east() const { - return _internal_has_reverse_addons_east(); -} -inline void AppearanceFlags::clear_reverse_addons_east() { - _impl_.reverse_addons_east_ = false; - _impl_._has_bits_[1] &= ~0x00008000u; -} -inline bool AppearanceFlags::_internal_reverse_addons_east() const { - return _impl_.reverse_addons_east_; -} -inline bool AppearanceFlags::reverse_addons_east() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.reverse_addons_east) - return _internal_reverse_addons_east(); -} -inline void AppearanceFlags::_internal_set_reverse_addons_east(bool value) { - _impl_._has_bits_[1] |= 0x00008000u; - _impl_.reverse_addons_east_ = value; -} -inline void AppearanceFlags::set_reverse_addons_east(bool value) { - _internal_set_reverse_addons_east(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.reverse_addons_east) -} - -// optional bool reverse_addons_west = 50; -inline bool AppearanceFlags::_internal_has_reverse_addons_west() const { - bool value = (_impl_._has_bits_[1] & 0x00010000u) != 0; - return value; -} -inline bool AppearanceFlags::has_reverse_addons_west() const { - return _internal_has_reverse_addons_west(); -} -inline void AppearanceFlags::clear_reverse_addons_west() { - _impl_.reverse_addons_west_ = false; - _impl_._has_bits_[1] &= ~0x00010000u; -} -inline bool AppearanceFlags::_internal_reverse_addons_west() const { - return _impl_.reverse_addons_west_; -} -inline bool AppearanceFlags::reverse_addons_west() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.reverse_addons_west) - return _internal_reverse_addons_west(); -} -inline void AppearanceFlags::_internal_set_reverse_addons_west(bool value) { - _impl_._has_bits_[1] |= 0x00010000u; - _impl_.reverse_addons_west_ = value; -} -inline void AppearanceFlags::set_reverse_addons_west(bool value) { - _internal_set_reverse_addons_west(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.reverse_addons_west) -} - -// optional bool reverse_addons_south = 51; -inline bool AppearanceFlags::_internal_has_reverse_addons_south() const { - bool value = (_impl_._has_bits_[1] & 0x00020000u) != 0; - return value; -} -inline bool AppearanceFlags::has_reverse_addons_south() const { - return _internal_has_reverse_addons_south(); -} -inline void AppearanceFlags::clear_reverse_addons_south() { - _impl_.reverse_addons_south_ = false; - _impl_._has_bits_[1] &= ~0x00020000u; -} -inline bool AppearanceFlags::_internal_reverse_addons_south() const { - return _impl_.reverse_addons_south_; -} -inline bool AppearanceFlags::reverse_addons_south() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.reverse_addons_south) - return _internal_reverse_addons_south(); -} -inline void AppearanceFlags::_internal_set_reverse_addons_south(bool value) { - _impl_._has_bits_[1] |= 0x00020000u; - _impl_.reverse_addons_south_ = value; -} -inline void AppearanceFlags::set_reverse_addons_south(bool value) { - _internal_set_reverse_addons_south(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.reverse_addons_south) -} - -// optional bool reverse_addons_north = 52; -inline bool AppearanceFlags::_internal_has_reverse_addons_north() const { - bool value = (_impl_._has_bits_[1] & 0x00040000u) != 0; - return value; -} -inline bool AppearanceFlags::has_reverse_addons_north() const { - return _internal_has_reverse_addons_north(); -} -inline void AppearanceFlags::clear_reverse_addons_north() { - _impl_.reverse_addons_north_ = false; - _impl_._has_bits_[1] &= ~0x00040000u; -} -inline bool AppearanceFlags::_internal_reverse_addons_north() const { - return _impl_.reverse_addons_north_; -} -inline bool AppearanceFlags::reverse_addons_north() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.reverse_addons_north) - return _internal_reverse_addons_north(); -} -inline void AppearanceFlags::_internal_set_reverse_addons_north(bool value) { - _impl_._has_bits_[1] |= 0x00040000u; - _impl_.reverse_addons_north_ = value; -} -inline void AppearanceFlags::set_reverse_addons_north(bool value) { - _internal_set_reverse_addons_north(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.reverse_addons_north) -} - -// optional bool wearout = 53; -inline bool AppearanceFlags::_internal_has_wearout() const { - bool value = (_impl_._has_bits_[1] & 0x00080000u) != 0; - return value; -} -inline bool AppearanceFlags::has_wearout() const { - return _internal_has_wearout(); -} -inline void AppearanceFlags::clear_wearout() { - _impl_.wearout_ = false; - _impl_._has_bits_[1] &= ~0x00080000u; -} -inline bool AppearanceFlags::_internal_wearout() const { - return _impl_.wearout_; -} -inline bool AppearanceFlags::wearout() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.wearout) - return _internal_wearout(); -} -inline void AppearanceFlags::_internal_set_wearout(bool value) { - _impl_._has_bits_[1] |= 0x00080000u; - _impl_.wearout_ = value; -} -inline void AppearanceFlags::set_wearout(bool value) { - _internal_set_wearout(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.wearout) -} - -// optional bool clockexpire = 54; -inline bool AppearanceFlags::_internal_has_clockexpire() const { - bool value = (_impl_._has_bits_[1] & 0x00100000u) != 0; - return value; -} -inline bool AppearanceFlags::has_clockexpire() const { - return _internal_has_clockexpire(); -} -inline void AppearanceFlags::clear_clockexpire() { - _impl_.clockexpire_ = false; - _impl_._has_bits_[1] &= ~0x00100000u; -} -inline bool AppearanceFlags::_internal_clockexpire() const { - return _impl_.clockexpire_; -} -inline bool AppearanceFlags::clockexpire() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.clockexpire) - return _internal_clockexpire(); -} -inline void AppearanceFlags::_internal_set_clockexpire(bool value) { - _impl_._has_bits_[1] |= 0x00100000u; - _impl_.clockexpire_ = value; -} -inline void AppearanceFlags::set_clockexpire(bool value) { - _internal_set_clockexpire(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.clockexpire) -} - -// optional bool expire = 55; -inline bool AppearanceFlags::_internal_has_expire() const { - bool value = (_impl_._has_bits_[1] & 0x00200000u) != 0; - return value; -} -inline bool AppearanceFlags::has_expire() const { - return _internal_has_expire(); -} -inline void AppearanceFlags::clear_expire() { - _impl_.expire_ = false; - _impl_._has_bits_[1] &= ~0x00200000u; -} -inline bool AppearanceFlags::_internal_expire() const { - return _impl_.expire_; -} -inline bool AppearanceFlags::expire() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.expire) - return _internal_expire(); -} -inline void AppearanceFlags::_internal_set_expire(bool value) { - _impl_._has_bits_[1] |= 0x00200000u; - _impl_.expire_ = value; -} -inline void AppearanceFlags::set_expire(bool value) { - _internal_set_expire(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.expire) -} - -// optional bool expirestop = 56; -inline bool AppearanceFlags::_internal_has_expirestop() const { - bool value = (_impl_._has_bits_[1] & 0x00400000u) != 0; - return value; -} -inline bool AppearanceFlags::has_expirestop() const { - return _internal_has_expirestop(); -} -inline void AppearanceFlags::clear_expirestop() { - _impl_.expirestop_ = false; - _impl_._has_bits_[1] &= ~0x00400000u; -} -inline bool AppearanceFlags::_internal_expirestop() const { - return _impl_.expirestop_; -} -inline bool AppearanceFlags::expirestop() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.expirestop) - return _internal_expirestop(); -} -inline void AppearanceFlags::_internal_set_expirestop(bool value) { - _impl_._has_bits_[1] |= 0x00400000u; - _impl_.expirestop_ = value; -} -inline void AppearanceFlags::set_expirestop(bool value) { - _internal_set_expirestop(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.expirestop) -} - -// optional bool wrapkit = 57; -inline bool AppearanceFlags::_internal_has_wrapkit() const { - bool value = (_impl_._has_bits_[1] & 0x00800000u) != 0; - return value; -} -inline bool AppearanceFlags::has_wrapkit() const { - return _internal_has_wrapkit(); -} -inline void AppearanceFlags::clear_wrapkit() { - _impl_.wrapkit_ = false; - _impl_._has_bits_[1] &= ~0x00800000u; -} -inline bool AppearanceFlags::_internal_wrapkit() const { - return _impl_.wrapkit_; -} -inline bool AppearanceFlags::wrapkit() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlags.wrapkit) - return _internal_wrapkit(); -} -inline void AppearanceFlags::_internal_set_wrapkit(bool value) { - _impl_._has_bits_[1] |= 0x00800000u; - _impl_.wrapkit_ = value; -} -inline void AppearanceFlags::set_wrapkit(bool value) { - _internal_set_wrapkit(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlags.wrapkit) -} - -// ------------------------------------------------------------------- - -// AppearanceFlagUpgradeClassification - -// optional uint32 upgrade_classification = 1; -inline bool AppearanceFlagUpgradeClassification::_internal_has_upgrade_classification() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppearanceFlagUpgradeClassification::has_upgrade_classification() const { - return _internal_has_upgrade_classification(); -} -inline void AppearanceFlagUpgradeClassification::clear_upgrade_classification() { - _impl_.upgrade_classification_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t AppearanceFlagUpgradeClassification::_internal_upgrade_classification() const { - return _impl_.upgrade_classification_; -} -inline uint32_t AppearanceFlagUpgradeClassification::upgrade_classification() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagUpgradeClassification.upgrade_classification) - return _internal_upgrade_classification(); -} -inline void AppearanceFlagUpgradeClassification::_internal_set_upgrade_classification(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.upgrade_classification_ = value; -} -inline void AppearanceFlagUpgradeClassification::set_upgrade_classification(uint32_t value) { - _internal_set_upgrade_classification(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagUpgradeClassification.upgrade_classification) -} - -// ------------------------------------------------------------------- - -// AppearanceFlagBank - -// optional uint32 waypoints = 1; -inline bool AppearanceFlagBank::_internal_has_waypoints() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppearanceFlagBank::has_waypoints() const { - return _internal_has_waypoints(); -} -inline void AppearanceFlagBank::clear_waypoints() { - _impl_.waypoints_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t AppearanceFlagBank::_internal_waypoints() const { - return _impl_.waypoints_; -} -inline uint32_t AppearanceFlagBank::waypoints() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagBank.waypoints) - return _internal_waypoints(); -} -inline void AppearanceFlagBank::_internal_set_waypoints(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.waypoints_ = value; -} -inline void AppearanceFlagBank::set_waypoints(uint32_t value) { - _internal_set_waypoints(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagBank.waypoints) -} - -// ------------------------------------------------------------------- - -// AppearanceFlagWrite - -// optional uint32 max_text_length = 1; -inline bool AppearanceFlagWrite::_internal_has_max_text_length() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppearanceFlagWrite::has_max_text_length() const { - return _internal_has_max_text_length(); -} -inline void AppearanceFlagWrite::clear_max_text_length() { - _impl_.max_text_length_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t AppearanceFlagWrite::_internal_max_text_length() const { - return _impl_.max_text_length_; -} -inline uint32_t AppearanceFlagWrite::max_text_length() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagWrite.max_text_length) - return _internal_max_text_length(); -} -inline void AppearanceFlagWrite::_internal_set_max_text_length(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.max_text_length_ = value; -} -inline void AppearanceFlagWrite::set_max_text_length(uint32_t value) { - _internal_set_max_text_length(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagWrite.max_text_length) -} - -// ------------------------------------------------------------------- - -// AppearanceFlagWriteOnce - -// optional uint32 max_text_length_once = 1; -inline bool AppearanceFlagWriteOnce::_internal_has_max_text_length_once() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppearanceFlagWriteOnce::has_max_text_length_once() const { - return _internal_has_max_text_length_once(); -} -inline void AppearanceFlagWriteOnce::clear_max_text_length_once() { - _impl_.max_text_length_once_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t AppearanceFlagWriteOnce::_internal_max_text_length_once() const { - return _impl_.max_text_length_once_; -} -inline uint32_t AppearanceFlagWriteOnce::max_text_length_once() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagWriteOnce.max_text_length_once) - return _internal_max_text_length_once(); -} -inline void AppearanceFlagWriteOnce::_internal_set_max_text_length_once(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.max_text_length_once_ = value; -} -inline void AppearanceFlagWriteOnce::set_max_text_length_once(uint32_t value) { - _internal_set_max_text_length_once(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagWriteOnce.max_text_length_once) -} - -// ------------------------------------------------------------------- - -// AppearanceFlagLight - -// optional uint32 brightness = 1; -inline bool AppearanceFlagLight::_internal_has_brightness() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppearanceFlagLight::has_brightness() const { - return _internal_has_brightness(); -} -inline void AppearanceFlagLight::clear_brightness() { - _impl_.brightness_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t AppearanceFlagLight::_internal_brightness() const { - return _impl_.brightness_; -} -inline uint32_t AppearanceFlagLight::brightness() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagLight.brightness) - return _internal_brightness(); -} -inline void AppearanceFlagLight::_internal_set_brightness(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.brightness_ = value; -} -inline void AppearanceFlagLight::set_brightness(uint32_t value) { - _internal_set_brightness(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagLight.brightness) -} - -// optional uint32 color = 2; -inline bool AppearanceFlagLight::_internal_has_color() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool AppearanceFlagLight::has_color() const { - return _internal_has_color(); -} -inline void AppearanceFlagLight::clear_color() { - _impl_.color_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline uint32_t AppearanceFlagLight::_internal_color() const { - return _impl_.color_; -} -inline uint32_t AppearanceFlagLight::color() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagLight.color) - return _internal_color(); -} -inline void AppearanceFlagLight::_internal_set_color(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.color_ = value; -} -inline void AppearanceFlagLight::set_color(uint32_t value) { - _internal_set_color(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagLight.color) -} - -// ------------------------------------------------------------------- - -// AppearanceFlagHeight - -// optional uint32 elevation = 1; -inline bool AppearanceFlagHeight::_internal_has_elevation() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppearanceFlagHeight::has_elevation() const { - return _internal_has_elevation(); -} -inline void AppearanceFlagHeight::clear_elevation() { - _impl_.elevation_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t AppearanceFlagHeight::_internal_elevation() const { - return _impl_.elevation_; -} -inline uint32_t AppearanceFlagHeight::elevation() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagHeight.elevation) - return _internal_elevation(); -} -inline void AppearanceFlagHeight::_internal_set_elevation(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.elevation_ = value; -} -inline void AppearanceFlagHeight::set_elevation(uint32_t value) { - _internal_set_elevation(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagHeight.elevation) -} - -// ------------------------------------------------------------------- - -// AppearanceFlagShift - -// optional uint32 x = 1; -inline bool AppearanceFlagShift::_internal_has_x() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppearanceFlagShift::has_x() const { - return _internal_has_x(); -} -inline void AppearanceFlagShift::clear_x() { - _impl_.x_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t AppearanceFlagShift::_internal_x() const { - return _impl_.x_; -} -inline uint32_t AppearanceFlagShift::x() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagShift.x) - return _internal_x(); -} -inline void AppearanceFlagShift::_internal_set_x(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.x_ = value; -} -inline void AppearanceFlagShift::set_x(uint32_t value) { - _internal_set_x(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagShift.x) -} - -// optional uint32 y = 2; -inline bool AppearanceFlagShift::_internal_has_y() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool AppearanceFlagShift::has_y() const { - return _internal_has_y(); -} -inline void AppearanceFlagShift::clear_y() { - _impl_.y_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline uint32_t AppearanceFlagShift::_internal_y() const { - return _impl_.y_; -} -inline uint32_t AppearanceFlagShift::y() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagShift.y) - return _internal_y(); -} -inline void AppearanceFlagShift::_internal_set_y(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.y_ = value; -} -inline void AppearanceFlagShift::set_y(uint32_t value) { - _internal_set_y(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagShift.y) -} - -// ------------------------------------------------------------------- - -// AppearanceFlagClothes - -// optional uint32 slot = 1; -inline bool AppearanceFlagClothes::_internal_has_slot() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppearanceFlagClothes::has_slot() const { - return _internal_has_slot(); -} -inline void AppearanceFlagClothes::clear_slot() { - _impl_.slot_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t AppearanceFlagClothes::_internal_slot() const { - return _impl_.slot_; -} -inline uint32_t AppearanceFlagClothes::slot() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagClothes.slot) - return _internal_slot(); -} -inline void AppearanceFlagClothes::_internal_set_slot(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.slot_ = value; -} -inline void AppearanceFlagClothes::set_slot(uint32_t value) { - _internal_set_slot(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagClothes.slot) -} - -// ------------------------------------------------------------------- - -// AppearanceFlagDefaultAction - -// optional .Canary.protobuf.appearances.PLAYER_ACTION action = 1; -inline bool AppearanceFlagDefaultAction::_internal_has_action() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppearanceFlagDefaultAction::has_action() const { - return _internal_has_action(); -} -inline void AppearanceFlagDefaultAction::clear_action() { - _impl_.action_ = 0; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline ::Canary::protobuf::appearances::PLAYER_ACTION AppearanceFlagDefaultAction::_internal_action() const { - return static_cast< ::Canary::protobuf::appearances::PLAYER_ACTION >(_impl_.action_); -} -inline ::Canary::protobuf::appearances::PLAYER_ACTION AppearanceFlagDefaultAction::action() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagDefaultAction.action) - return _internal_action(); -} -inline void AppearanceFlagDefaultAction::_internal_set_action(::Canary::protobuf::appearances::PLAYER_ACTION value) { - assert(::Canary::protobuf::appearances::PLAYER_ACTION_IsValid(value)); - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.action_ = value; -} -inline void AppearanceFlagDefaultAction::set_action(::Canary::protobuf::appearances::PLAYER_ACTION value) { - _internal_set_action(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagDefaultAction.action) -} - -// ------------------------------------------------------------------- - -// AppearanceFlagMarket - -// optional .Canary.protobuf.appearances.ITEM_CATEGORY category = 1; -inline bool AppearanceFlagMarket::_internal_has_category() const { - bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; - return value; -} -inline bool AppearanceFlagMarket::has_category() const { - return _internal_has_category(); -} -inline void AppearanceFlagMarket::clear_category() { - _impl_.category_ = 1; - _impl_._has_bits_[0] &= ~0x00000008u; -} -inline ::Canary::protobuf::appearances::ITEM_CATEGORY AppearanceFlagMarket::_internal_category() const { - return static_cast< ::Canary::protobuf::appearances::ITEM_CATEGORY >(_impl_.category_); -} -inline ::Canary::protobuf::appearances::ITEM_CATEGORY AppearanceFlagMarket::category() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagMarket.category) - return _internal_category(); -} -inline void AppearanceFlagMarket::_internal_set_category(::Canary::protobuf::appearances::ITEM_CATEGORY value) { - assert(::Canary::protobuf::appearances::ITEM_CATEGORY_IsValid(value)); - _impl_._has_bits_[0] |= 0x00000008u; - _impl_.category_ = value; -} -inline void AppearanceFlagMarket::set_category(::Canary::protobuf::appearances::ITEM_CATEGORY value) { - _internal_set_category(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagMarket.category) -} - -// optional uint32 trade_as_object_id = 2; -inline bool AppearanceFlagMarket::_internal_has_trade_as_object_id() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppearanceFlagMarket::has_trade_as_object_id() const { - return _internal_has_trade_as_object_id(); -} -inline void AppearanceFlagMarket::clear_trade_as_object_id() { - _impl_.trade_as_object_id_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t AppearanceFlagMarket::_internal_trade_as_object_id() const { - return _impl_.trade_as_object_id_; -} -inline uint32_t AppearanceFlagMarket::trade_as_object_id() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagMarket.trade_as_object_id) - return _internal_trade_as_object_id(); -} -inline void AppearanceFlagMarket::_internal_set_trade_as_object_id(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.trade_as_object_id_ = value; -} -inline void AppearanceFlagMarket::set_trade_as_object_id(uint32_t value) { - _internal_set_trade_as_object_id(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagMarket.trade_as_object_id) -} - -// optional uint32 show_as_object_id = 3; -inline bool AppearanceFlagMarket::_internal_has_show_as_object_id() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool AppearanceFlagMarket::has_show_as_object_id() const { - return _internal_has_show_as_object_id(); -} -inline void AppearanceFlagMarket::clear_show_as_object_id() { - _impl_.show_as_object_id_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline uint32_t AppearanceFlagMarket::_internal_show_as_object_id() const { - return _impl_.show_as_object_id_; -} -inline uint32_t AppearanceFlagMarket::show_as_object_id() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagMarket.show_as_object_id) - return _internal_show_as_object_id(); -} -inline void AppearanceFlagMarket::_internal_set_show_as_object_id(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.show_as_object_id_ = value; -} -inline void AppearanceFlagMarket::set_show_as_object_id(uint32_t value) { - _internal_set_show_as_object_id(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagMarket.show_as_object_id) -} - -// repeated .Canary.protobuf.appearances.PLAYER_PROFESSION restrict_to_profession = 5; -inline int AppearanceFlagMarket::_internal_restrict_to_profession_size() const { - return _impl_.restrict_to_profession_.size(); -} -inline int AppearanceFlagMarket::restrict_to_profession_size() const { - return _internal_restrict_to_profession_size(); -} -inline void AppearanceFlagMarket::clear_restrict_to_profession() { - _impl_.restrict_to_profession_.Clear(); -} -inline ::Canary::protobuf::appearances::PLAYER_PROFESSION AppearanceFlagMarket::_internal_restrict_to_profession(int index) const { - return static_cast< ::Canary::protobuf::appearances::PLAYER_PROFESSION >(_impl_.restrict_to_profession_.Get(index)); -} -inline ::Canary::protobuf::appearances::PLAYER_PROFESSION AppearanceFlagMarket::restrict_to_profession(int index) const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagMarket.restrict_to_profession) - return _internal_restrict_to_profession(index); -} -inline void AppearanceFlagMarket::set_restrict_to_profession(int index, ::Canary::protobuf::appearances::PLAYER_PROFESSION value) { - assert(::Canary::protobuf::appearances::PLAYER_PROFESSION_IsValid(value)); - _impl_.restrict_to_profession_.Set(index, value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagMarket.restrict_to_profession) -} -inline void AppearanceFlagMarket::_internal_add_restrict_to_profession(::Canary::protobuf::appearances::PLAYER_PROFESSION value) { - assert(::Canary::protobuf::appearances::PLAYER_PROFESSION_IsValid(value)); - _impl_.restrict_to_profession_.Add(value); -} -inline void AppearanceFlagMarket::add_restrict_to_profession(::Canary::protobuf::appearances::PLAYER_PROFESSION value) { - _internal_add_restrict_to_profession(value); - // @@protoc_insertion_point(field_add:Canary.protobuf.appearances.AppearanceFlagMarket.restrict_to_profession) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& -AppearanceFlagMarket::restrict_to_profession() const { - // @@protoc_insertion_point(field_list:Canary.protobuf.appearances.AppearanceFlagMarket.restrict_to_profession) - return _impl_.restrict_to_profession_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* -AppearanceFlagMarket::_internal_mutable_restrict_to_profession() { - return &_impl_.restrict_to_profession_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* -AppearanceFlagMarket::mutable_restrict_to_profession() { - // @@protoc_insertion_point(field_mutable_list:Canary.protobuf.appearances.AppearanceFlagMarket.restrict_to_profession) - return _internal_mutable_restrict_to_profession(); -} - -// optional uint32 minimum_level = 6; -inline bool AppearanceFlagMarket::_internal_has_minimum_level() const { - bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; - return value; -} -inline bool AppearanceFlagMarket::has_minimum_level() const { - return _internal_has_minimum_level(); -} -inline void AppearanceFlagMarket::clear_minimum_level() { - _impl_.minimum_level_ = 0u; - _impl_._has_bits_[0] &= ~0x00000004u; -} -inline uint32_t AppearanceFlagMarket::_internal_minimum_level() const { - return _impl_.minimum_level_; -} -inline uint32_t AppearanceFlagMarket::minimum_level() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagMarket.minimum_level) - return _internal_minimum_level(); -} -inline void AppearanceFlagMarket::_internal_set_minimum_level(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000004u; - _impl_.minimum_level_ = value; -} -inline void AppearanceFlagMarket::set_minimum_level(uint32_t value) { - _internal_set_minimum_level(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagMarket.minimum_level) -} - -// ------------------------------------------------------------------- - -// AppearanceFlagNPC - -// optional bytes name = 1; -inline bool AppearanceFlagNPC::_internal_has_name() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppearanceFlagNPC::has_name() const { - return _internal_has_name(); -} -inline void AppearanceFlagNPC::clear_name() { - _impl_.name_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline const std::string& AppearanceFlagNPC::name() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagNPC.name) - return _internal_name(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppearanceFlagNPC::set_name(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.name_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagNPC.name) -} -inline std::string* AppearanceFlagNPC::mutable_name() { - std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlagNPC.name) - return _s; -} -inline const std::string& AppearanceFlagNPC::_internal_name() const { - return _impl_.name_.Get(); -} -inline void AppearanceFlagNPC::_internal_set_name(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.name_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppearanceFlagNPC::_internal_mutable_name() { - _impl_._has_bits_[0] |= 0x00000001u; - return _impl_.name_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppearanceFlagNPC::release_name() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlagNPC.name) - if (!_internal_has_name()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000001u; - auto* p = _impl_.name_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void AppearanceFlagNPC::set_allocated_name(std::string* name) { - if (name != nullptr) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - _impl_.name_.SetAllocated(name, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlagNPC.name) -} - -// optional bytes location = 2; -inline bool AppearanceFlagNPC::_internal_has_location() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool AppearanceFlagNPC::has_location() const { - return _internal_has_location(); -} -inline void AppearanceFlagNPC::clear_location() { - _impl_.location_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline const std::string& AppearanceFlagNPC::location() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagNPC.location) - return _internal_location(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppearanceFlagNPC::set_location(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.location_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagNPC.location) -} -inline std::string* AppearanceFlagNPC::mutable_location() { - std::string* _s = _internal_mutable_location(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlagNPC.location) - return _s; -} -inline const std::string& AppearanceFlagNPC::_internal_location() const { - return _impl_.location_.Get(); -} -inline void AppearanceFlagNPC::_internal_set_location(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.location_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppearanceFlagNPC::_internal_mutable_location() { - _impl_._has_bits_[0] |= 0x00000002u; - return _impl_.location_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppearanceFlagNPC::release_location() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlagNPC.location) - if (!_internal_has_location()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000002u; - auto* p = _impl_.location_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.location_.IsDefault()) { - _impl_.location_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void AppearanceFlagNPC::set_allocated_location(std::string* location) { - if (location != nullptr) { - _impl_._has_bits_[0] |= 0x00000002u; - } else { - _impl_._has_bits_[0] &= ~0x00000002u; - } - _impl_.location_.SetAllocated(location, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.location_.IsDefault()) { - _impl_.location_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlagNPC.location) -} - -// optional uint32 sale_price = 3; -inline bool AppearanceFlagNPC::_internal_has_sale_price() const { - bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; - return value; -} -inline bool AppearanceFlagNPC::has_sale_price() const { - return _internal_has_sale_price(); -} -inline void AppearanceFlagNPC::clear_sale_price() { - _impl_.sale_price_ = 0u; - _impl_._has_bits_[0] &= ~0x00000008u; -} -inline uint32_t AppearanceFlagNPC::_internal_sale_price() const { - return _impl_.sale_price_; -} -inline uint32_t AppearanceFlagNPC::sale_price() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagNPC.sale_price) - return _internal_sale_price(); -} -inline void AppearanceFlagNPC::_internal_set_sale_price(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000008u; - _impl_.sale_price_ = value; -} -inline void AppearanceFlagNPC::set_sale_price(uint32_t value) { - _internal_set_sale_price(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagNPC.sale_price) -} - -// optional uint32 buy_price = 4; -inline bool AppearanceFlagNPC::_internal_has_buy_price() const { - bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; - return value; -} -inline bool AppearanceFlagNPC::has_buy_price() const { - return _internal_has_buy_price(); -} -inline void AppearanceFlagNPC::clear_buy_price() { - _impl_.buy_price_ = 0u; - _impl_._has_bits_[0] &= ~0x00000010u; -} -inline uint32_t AppearanceFlagNPC::_internal_buy_price() const { - return _impl_.buy_price_; -} -inline uint32_t AppearanceFlagNPC::buy_price() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagNPC.buy_price) - return _internal_buy_price(); -} -inline void AppearanceFlagNPC::_internal_set_buy_price(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000010u; - _impl_.buy_price_ = value; -} -inline void AppearanceFlagNPC::set_buy_price(uint32_t value) { - _internal_set_buy_price(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagNPC.buy_price) -} - -// optional uint32 currency_object_type_id = 5; -inline bool AppearanceFlagNPC::_internal_has_currency_object_type_id() const { - bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0; - return value; -} -inline bool AppearanceFlagNPC::has_currency_object_type_id() const { - return _internal_has_currency_object_type_id(); -} -inline void AppearanceFlagNPC::clear_currency_object_type_id() { - _impl_.currency_object_type_id_ = 0u; - _impl_._has_bits_[0] &= ~0x00000020u; -} -inline uint32_t AppearanceFlagNPC::_internal_currency_object_type_id() const { - return _impl_.currency_object_type_id_; -} -inline uint32_t AppearanceFlagNPC::currency_object_type_id() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagNPC.currency_object_type_id) - return _internal_currency_object_type_id(); -} -inline void AppearanceFlagNPC::_internal_set_currency_object_type_id(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000020u; - _impl_.currency_object_type_id_ = value; -} -inline void AppearanceFlagNPC::set_currency_object_type_id(uint32_t value) { - _internal_set_currency_object_type_id(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagNPC.currency_object_type_id) -} - -// optional bytes currency_quest_flag_display_name = 6; -inline bool AppearanceFlagNPC::_internal_has_currency_quest_flag_display_name() const { - bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; - return value; -} -inline bool AppearanceFlagNPC::has_currency_quest_flag_display_name() const { - return _internal_has_currency_quest_flag_display_name(); -} -inline void AppearanceFlagNPC::clear_currency_quest_flag_display_name() { - _impl_.currency_quest_flag_display_name_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000004u; -} -inline const std::string& AppearanceFlagNPC::currency_quest_flag_display_name() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagNPC.currency_quest_flag_display_name) - return _internal_currency_quest_flag_display_name(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppearanceFlagNPC::set_currency_quest_flag_display_name(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000004u; - _impl_.currency_quest_flag_display_name_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagNPC.currency_quest_flag_display_name) -} -inline std::string* AppearanceFlagNPC::mutable_currency_quest_flag_display_name() { - std::string* _s = _internal_mutable_currency_quest_flag_display_name(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.appearances.AppearanceFlagNPC.currency_quest_flag_display_name) - return _s; -} -inline const std::string& AppearanceFlagNPC::_internal_currency_quest_flag_display_name() const { - return _impl_.currency_quest_flag_display_name_.Get(); -} -inline void AppearanceFlagNPC::_internal_set_currency_quest_flag_display_name(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000004u; - _impl_.currency_quest_flag_display_name_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppearanceFlagNPC::_internal_mutable_currency_quest_flag_display_name() { - _impl_._has_bits_[0] |= 0x00000004u; - return _impl_.currency_quest_flag_display_name_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppearanceFlagNPC::release_currency_quest_flag_display_name() { - // @@protoc_insertion_point(field_release:Canary.protobuf.appearances.AppearanceFlagNPC.currency_quest_flag_display_name) - if (!_internal_has_currency_quest_flag_display_name()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000004u; - auto* p = _impl_.currency_quest_flag_display_name_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.currency_quest_flag_display_name_.IsDefault()) { - _impl_.currency_quest_flag_display_name_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void AppearanceFlagNPC::set_allocated_currency_quest_flag_display_name(std::string* currency_quest_flag_display_name) { - if (currency_quest_flag_display_name != nullptr) { - _impl_._has_bits_[0] |= 0x00000004u; - } else { - _impl_._has_bits_[0] &= ~0x00000004u; - } - _impl_.currency_quest_flag_display_name_.SetAllocated(currency_quest_flag_display_name, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.currency_quest_flag_display_name_.IsDefault()) { - _impl_.currency_quest_flag_display_name_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.appearances.AppearanceFlagNPC.currency_quest_flag_display_name) -} - -// ------------------------------------------------------------------- - -// AppearanceFlagAutomap - -// optional uint32 color = 1; -inline bool AppearanceFlagAutomap::_internal_has_color() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppearanceFlagAutomap::has_color() const { - return _internal_has_color(); -} -inline void AppearanceFlagAutomap::clear_color() { - _impl_.color_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t AppearanceFlagAutomap::_internal_color() const { - return _impl_.color_; -} -inline uint32_t AppearanceFlagAutomap::color() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagAutomap.color) - return _internal_color(); -} -inline void AppearanceFlagAutomap::_internal_set_color(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.color_ = value; -} -inline void AppearanceFlagAutomap::set_color(uint32_t value) { - _internal_set_color(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagAutomap.color) -} - -// ------------------------------------------------------------------- - -// AppearanceFlagHook - -// optional .Canary.protobuf.appearances.HOOK_TYPE direction = 1; -inline bool AppearanceFlagHook::_internal_has_direction() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppearanceFlagHook::has_direction() const { - return _internal_has_direction(); -} -inline void AppearanceFlagHook::clear_direction() { - _impl_.direction_ = 1; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline ::Canary::protobuf::appearances::HOOK_TYPE AppearanceFlagHook::_internal_direction() const { - return static_cast< ::Canary::protobuf::appearances::HOOK_TYPE >(_impl_.direction_); -} -inline ::Canary::protobuf::appearances::HOOK_TYPE AppearanceFlagHook::direction() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagHook.direction) - return _internal_direction(); -} -inline void AppearanceFlagHook::_internal_set_direction(::Canary::protobuf::appearances::HOOK_TYPE value) { - assert(::Canary::protobuf::appearances::HOOK_TYPE_IsValid(value)); - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.direction_ = value; -} -inline void AppearanceFlagHook::set_direction(::Canary::protobuf::appearances::HOOK_TYPE value) { - _internal_set_direction(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagHook.direction) -} - -// ------------------------------------------------------------------- - -// AppearanceFlagLenshelp - -// optional uint32 id = 1; -inline bool AppearanceFlagLenshelp::_internal_has_id() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppearanceFlagLenshelp::has_id() const { - return _internal_has_id(); -} -inline void AppearanceFlagLenshelp::clear_id() { - _impl_.id_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t AppearanceFlagLenshelp::_internal_id() const { - return _impl_.id_; -} -inline uint32_t AppearanceFlagLenshelp::id() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagLenshelp.id) - return _internal_id(); -} -inline void AppearanceFlagLenshelp::_internal_set_id(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.id_ = value; -} -inline void AppearanceFlagLenshelp::set_id(uint32_t value) { - _internal_set_id(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagLenshelp.id) -} - -// ------------------------------------------------------------------- - -// AppearanceFlagChangedToExpire - -// optional uint32 former_object_typeid = 1; -inline bool AppearanceFlagChangedToExpire::_internal_has_former_object_typeid() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppearanceFlagChangedToExpire::has_former_object_typeid() const { - return _internal_has_former_object_typeid(); -} -inline void AppearanceFlagChangedToExpire::clear_former_object_typeid() { - _impl_.former_object_typeid_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t AppearanceFlagChangedToExpire::_internal_former_object_typeid() const { - return _impl_.former_object_typeid_; -} -inline uint32_t AppearanceFlagChangedToExpire::former_object_typeid() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagChangedToExpire.former_object_typeid) - return _internal_former_object_typeid(); -} -inline void AppearanceFlagChangedToExpire::_internal_set_former_object_typeid(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.former_object_typeid_ = value; -} -inline void AppearanceFlagChangedToExpire::set_former_object_typeid(uint32_t value) { - _internal_set_former_object_typeid(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagChangedToExpire.former_object_typeid) -} - -// ------------------------------------------------------------------- - -// AppearanceFlagCyclopedia - -// optional uint32 cyclopedia_type = 1; -inline bool AppearanceFlagCyclopedia::_internal_has_cyclopedia_type() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppearanceFlagCyclopedia::has_cyclopedia_type() const { - return _internal_has_cyclopedia_type(); -} -inline void AppearanceFlagCyclopedia::clear_cyclopedia_type() { - _impl_.cyclopedia_type_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t AppearanceFlagCyclopedia::_internal_cyclopedia_type() const { - return _impl_.cyclopedia_type_; -} -inline uint32_t AppearanceFlagCyclopedia::cyclopedia_type() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.AppearanceFlagCyclopedia.cyclopedia_type) - return _internal_cyclopedia_type(); -} -inline void AppearanceFlagCyclopedia::_internal_set_cyclopedia_type(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.cyclopedia_type_ = value; -} -inline void AppearanceFlagCyclopedia::set_cyclopedia_type(uint32_t value) { - _internal_set_cyclopedia_type(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.AppearanceFlagCyclopedia.cyclopedia_type) -} - -// ------------------------------------------------------------------- - -// SpecialMeaningAppearanceIds - -// optional uint32 gold_coin_id = 1; -inline bool SpecialMeaningAppearanceIds::_internal_has_gold_coin_id() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool SpecialMeaningAppearanceIds::has_gold_coin_id() const { - return _internal_has_gold_coin_id(); -} -inline void SpecialMeaningAppearanceIds::clear_gold_coin_id() { - _impl_.gold_coin_id_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t SpecialMeaningAppearanceIds::_internal_gold_coin_id() const { - return _impl_.gold_coin_id_; -} -inline uint32_t SpecialMeaningAppearanceIds::gold_coin_id() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpecialMeaningAppearanceIds.gold_coin_id) - return _internal_gold_coin_id(); -} -inline void SpecialMeaningAppearanceIds::_internal_set_gold_coin_id(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.gold_coin_id_ = value; -} -inline void SpecialMeaningAppearanceIds::set_gold_coin_id(uint32_t value) { - _internal_set_gold_coin_id(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpecialMeaningAppearanceIds.gold_coin_id) -} - -// optional uint32 platinum_coin_id = 2; -inline bool SpecialMeaningAppearanceIds::_internal_has_platinum_coin_id() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool SpecialMeaningAppearanceIds::has_platinum_coin_id() const { - return _internal_has_platinum_coin_id(); -} -inline void SpecialMeaningAppearanceIds::clear_platinum_coin_id() { - _impl_.platinum_coin_id_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline uint32_t SpecialMeaningAppearanceIds::_internal_platinum_coin_id() const { - return _impl_.platinum_coin_id_; -} -inline uint32_t SpecialMeaningAppearanceIds::platinum_coin_id() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpecialMeaningAppearanceIds.platinum_coin_id) - return _internal_platinum_coin_id(); -} -inline void SpecialMeaningAppearanceIds::_internal_set_platinum_coin_id(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.platinum_coin_id_ = value; -} -inline void SpecialMeaningAppearanceIds::set_platinum_coin_id(uint32_t value) { - _internal_set_platinum_coin_id(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpecialMeaningAppearanceIds.platinum_coin_id) -} - -// optional uint32 crystal_coin_id = 3; -inline bool SpecialMeaningAppearanceIds::_internal_has_crystal_coin_id() const { - bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; - return value; -} -inline bool SpecialMeaningAppearanceIds::has_crystal_coin_id() const { - return _internal_has_crystal_coin_id(); -} -inline void SpecialMeaningAppearanceIds::clear_crystal_coin_id() { - _impl_.crystal_coin_id_ = 0u; - _impl_._has_bits_[0] &= ~0x00000004u; -} -inline uint32_t SpecialMeaningAppearanceIds::_internal_crystal_coin_id() const { - return _impl_.crystal_coin_id_; -} -inline uint32_t SpecialMeaningAppearanceIds::crystal_coin_id() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpecialMeaningAppearanceIds.crystal_coin_id) - return _internal_crystal_coin_id(); -} -inline void SpecialMeaningAppearanceIds::_internal_set_crystal_coin_id(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000004u; - _impl_.crystal_coin_id_ = value; -} -inline void SpecialMeaningAppearanceIds::set_crystal_coin_id(uint32_t value) { - _internal_set_crystal_coin_id(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpecialMeaningAppearanceIds.crystal_coin_id) -} - -// optional uint32 tibia_coin_id = 4; -inline bool SpecialMeaningAppearanceIds::_internal_has_tibia_coin_id() const { - bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; - return value; -} -inline bool SpecialMeaningAppearanceIds::has_tibia_coin_id() const { - return _internal_has_tibia_coin_id(); -} -inline void SpecialMeaningAppearanceIds::clear_tibia_coin_id() { - _impl_.tibia_coin_id_ = 0u; - _impl_._has_bits_[0] &= ~0x00000008u; -} -inline uint32_t SpecialMeaningAppearanceIds::_internal_tibia_coin_id() const { - return _impl_.tibia_coin_id_; -} -inline uint32_t SpecialMeaningAppearanceIds::tibia_coin_id() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpecialMeaningAppearanceIds.tibia_coin_id) - return _internal_tibia_coin_id(); -} -inline void SpecialMeaningAppearanceIds::_internal_set_tibia_coin_id(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000008u; - _impl_.tibia_coin_id_ = value; -} -inline void SpecialMeaningAppearanceIds::set_tibia_coin_id(uint32_t value) { - _internal_set_tibia_coin_id(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpecialMeaningAppearanceIds.tibia_coin_id) -} - -// optional uint32 stamped_letter_id = 5; -inline bool SpecialMeaningAppearanceIds::_internal_has_stamped_letter_id() const { - bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; - return value; -} -inline bool SpecialMeaningAppearanceIds::has_stamped_letter_id() const { - return _internal_has_stamped_letter_id(); -} -inline void SpecialMeaningAppearanceIds::clear_stamped_letter_id() { - _impl_.stamped_letter_id_ = 0u; - _impl_._has_bits_[0] &= ~0x00000010u; -} -inline uint32_t SpecialMeaningAppearanceIds::_internal_stamped_letter_id() const { - return _impl_.stamped_letter_id_; -} -inline uint32_t SpecialMeaningAppearanceIds::stamped_letter_id() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpecialMeaningAppearanceIds.stamped_letter_id) - return _internal_stamped_letter_id(); -} -inline void SpecialMeaningAppearanceIds::_internal_set_stamped_letter_id(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000010u; - _impl_.stamped_letter_id_ = value; -} -inline void SpecialMeaningAppearanceIds::set_stamped_letter_id(uint32_t value) { - _internal_set_stamped_letter_id(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpecialMeaningAppearanceIds.stamped_letter_id) -} - -// optional uint32 supply_stash_id = 6; -inline bool SpecialMeaningAppearanceIds::_internal_has_supply_stash_id() const { - bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0; - return value; -} -inline bool SpecialMeaningAppearanceIds::has_supply_stash_id() const { - return _internal_has_supply_stash_id(); -} -inline void SpecialMeaningAppearanceIds::clear_supply_stash_id() { - _impl_.supply_stash_id_ = 0u; - _impl_._has_bits_[0] &= ~0x00000020u; -} -inline uint32_t SpecialMeaningAppearanceIds::_internal_supply_stash_id() const { - return _impl_.supply_stash_id_; -} -inline uint32_t SpecialMeaningAppearanceIds::supply_stash_id() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpecialMeaningAppearanceIds.supply_stash_id) - return _internal_supply_stash_id(); -} -inline void SpecialMeaningAppearanceIds::_internal_set_supply_stash_id(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000020u; - _impl_.supply_stash_id_ = value; -} -inline void SpecialMeaningAppearanceIds::set_supply_stash_id(uint32_t value) { - _internal_set_supply_stash_id(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpecialMeaningAppearanceIds.supply_stash_id) -} - -// optional uint32 reward_chest_id = 7; -inline bool SpecialMeaningAppearanceIds::_internal_has_reward_chest_id() const { - bool value = (_impl_._has_bits_[0] & 0x00000040u) != 0; - return value; -} -inline bool SpecialMeaningAppearanceIds::has_reward_chest_id() const { - return _internal_has_reward_chest_id(); -} -inline void SpecialMeaningAppearanceIds::clear_reward_chest_id() { - _impl_.reward_chest_id_ = 0u; - _impl_._has_bits_[0] &= ~0x00000040u; -} -inline uint32_t SpecialMeaningAppearanceIds::_internal_reward_chest_id() const { - return _impl_.reward_chest_id_; -} -inline uint32_t SpecialMeaningAppearanceIds::reward_chest_id() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.appearances.SpecialMeaningAppearanceIds.reward_chest_id) - return _internal_reward_chest_id(); -} -inline void SpecialMeaningAppearanceIds::_internal_set_reward_chest_id(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000040u; - _impl_.reward_chest_id_ = value; -} -inline void SpecialMeaningAppearanceIds::set_reward_chest_id(uint32_t value) { - _internal_set_reward_chest_id(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.appearances.SpecialMeaningAppearanceIds.reward_chest_id) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace appearances -} // namespace protobuf -} // namespace Canary - -PROTOBUF_NAMESPACE_OPEN - -template <> struct is_proto_enum< ::Canary::protobuf::appearances::PLAYER_ACTION> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::Canary::protobuf::appearances::PLAYER_ACTION>() { - return ::Canary::protobuf::appearances::PLAYER_ACTION_descriptor(); -} -template <> struct is_proto_enum< ::Canary::protobuf::appearances::ITEM_CATEGORY> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::Canary::protobuf::appearances::ITEM_CATEGORY>() { - return ::Canary::protobuf::appearances::ITEM_CATEGORY_descriptor(); -} -template <> struct is_proto_enum< ::Canary::protobuf::appearances::PLAYER_PROFESSION> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::Canary::protobuf::appearances::PLAYER_PROFESSION>() { - return ::Canary::protobuf::appearances::PLAYER_PROFESSION_descriptor(); -} -template <> struct is_proto_enum< ::Canary::protobuf::appearances::ANIMATION_LOOP_TYPE> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::Canary::protobuf::appearances::ANIMATION_LOOP_TYPE>() { - return ::Canary::protobuf::appearances::ANIMATION_LOOP_TYPE_descriptor(); -} -template <> struct is_proto_enum< ::Canary::protobuf::appearances::HOOK_TYPE> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::Canary::protobuf::appearances::HOOK_TYPE>() { - return ::Canary::protobuf::appearances::HOOK_TYPE_descriptor(); -} -template <> struct is_proto_enum< ::Canary::protobuf::appearances::FIXED_FRAME_GROUP> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::Canary::protobuf::appearances::FIXED_FRAME_GROUP>() { - return ::Canary::protobuf::appearances::FIXED_FRAME_GROUP_descriptor(); -} - -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_appearances_2eproto diff --git a/src/protobuf/kv.pb.cc b/src/protobuf/kv.pb.cc deleted file mode 100644 index 74cbaece4..000000000 --- a/src/protobuf/kv.pb.cc +++ /dev/null @@ -1,1247 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kv.proto - -#include "kv.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG - -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; - -namespace Canary { -namespace protobuf { -namespace kv { -PROTOBUF_CONSTEXPR ValueWrapper::ValueWrapper( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.value_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_._oneof_case_)*/{}} {} -struct ValueWrapperDefaultTypeInternal { - PROTOBUF_CONSTEXPR ValueWrapperDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~ValueWrapperDefaultTypeInternal() {} - union { - ValueWrapper _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ValueWrapperDefaultTypeInternal _ValueWrapper_default_instance_; -PROTOBUF_CONSTEXPR ArrayType::ArrayType( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.values_)*/{} - , /*decltype(_impl_._cached_size_)*/{}} {} -struct ArrayTypeDefaultTypeInternal { - PROTOBUF_CONSTEXPR ArrayTypeDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~ArrayTypeDefaultTypeInternal() {} - union { - ArrayType _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ArrayTypeDefaultTypeInternal _ArrayType_default_instance_; -PROTOBUF_CONSTEXPR KeyValuePair::KeyValuePair( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.value_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct KeyValuePairDefaultTypeInternal { - PROTOBUF_CONSTEXPR KeyValuePairDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~KeyValuePairDefaultTypeInternal() {} - union { - KeyValuePair _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KeyValuePairDefaultTypeInternal _KeyValuePair_default_instance_; -PROTOBUF_CONSTEXPR MapType::MapType( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.items_)*/{} - , /*decltype(_impl_._cached_size_)*/{}} {} -struct MapTypeDefaultTypeInternal { - PROTOBUF_CONSTEXPR MapTypeDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~MapTypeDefaultTypeInternal() {} - union { - MapType _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MapTypeDefaultTypeInternal _MapType_default_instance_; -} // namespace kv -} // namespace protobuf -} // namespace Canary -static ::_pb::Metadata file_level_metadata_kv_2eproto[4]; -static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_kv_2eproto = nullptr; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_kv_2eproto = nullptr; - -const uint32_t TableStruct_kv_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::kv::ValueWrapper, _internal_metadata_), - ~0u, // no _extensions_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::kv::ValueWrapper, _impl_._oneof_case_[0]), - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - ::_pbi::kInvalidFieldOffsetTag, - ::_pbi::kInvalidFieldOffsetTag, - ::_pbi::kInvalidFieldOffsetTag, - ::_pbi::kInvalidFieldOffsetTag, - ::_pbi::kInvalidFieldOffsetTag, - ::_pbi::kInvalidFieldOffsetTag, - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::kv::ValueWrapper, _impl_.value_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::kv::ArrayType, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::kv::ArrayType, _impl_.values_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::kv::KeyValuePair, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::kv::KeyValuePair, _impl_.key_), - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::kv::KeyValuePair, _impl_.value_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::kv::MapType, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Canary::protobuf::kv::MapType, _impl_.items_), -}; -static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, -1, sizeof(::Canary::protobuf::kv::ValueWrapper)}, - { 13, -1, -1, sizeof(::Canary::protobuf::kv::ArrayType)}, - { 20, -1, -1, sizeof(::Canary::protobuf::kv::KeyValuePair)}, - { 28, -1, -1, sizeof(::Canary::protobuf::kv::MapType)}, -}; - -static const ::_pb::Message* const file_default_instances[] = { - &::Canary::protobuf::kv::_ValueWrapper_default_instance_._instance, - &::Canary::protobuf::kv::_ArrayType_default_instance_._instance, - &::Canary::protobuf::kv::_KeyValuePair_default_instance_._instance, - &::Canary::protobuf::kv::_MapType_default_instance_._instance, -}; - -const char descriptor_table_protodef_kv_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\010kv.proto\022\022Canary.protobuf.kv\"\327\001\n\014Value" - "Wrapper\022\023\n\tstr_value\030\001 \001(\tH\000\022\023\n\tint_valu" - "e\030\002 \001(\005H\000\022\026\n\014double_value\030\003 \001(\001H\000\0224\n\013arr" - "ay_value\030\004 \001(\0132\035.Canary.protobuf.kv.Arra" - "yTypeH\000\0220\n\tmap_value\030\005 \001(\0132\033.Canary.prot" - "obuf.kv.MapTypeH\000\022\024\n\nbool_value\030\006 \001(\010H\000B" - "\007\n\005value\"=\n\tArrayType\0220\n\006values\030\001 \003(\0132 ." - "Canary.protobuf.kv.ValueWrapper\"L\n\014KeyVa" - "luePair\022\013\n\003key\030\001 \001(\t\022/\n\005value\030\002 \001(\0132 .Ca" - "nary.protobuf.kv.ValueWrapper\":\n\007MapType" - "\022/\n\005items\030\001 \003(\0132 .Canary.protobuf.kv.Key" - "ValuePairb\006proto3" - ; -static ::_pbi::once_flag descriptor_table_kv_2eproto_once; -const ::_pbi::DescriptorTable descriptor_table_kv_2eproto = { - false, false, 457, descriptor_table_protodef_kv_2eproto, - "kv.proto", - &descriptor_table_kv_2eproto_once, nullptr, 0, 4, - schemas, file_default_instances, TableStruct_kv_2eproto::offsets, - file_level_metadata_kv_2eproto, file_level_enum_descriptors_kv_2eproto, - file_level_service_descriptors_kv_2eproto, -}; -PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_kv_2eproto_getter() { - return &descriptor_table_kv_2eproto; -} - -// Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_kv_2eproto(&descriptor_table_kv_2eproto); -namespace Canary { -namespace protobuf { -namespace kv { - -// =================================================================== - -class ValueWrapper::_Internal { - public: - static const ::Canary::protobuf::kv::ArrayType& array_value(const ValueWrapper* msg); - static const ::Canary::protobuf::kv::MapType& map_value(const ValueWrapper* msg); -}; - -const ::Canary::protobuf::kv::ArrayType& -ValueWrapper::_Internal::array_value(const ValueWrapper* msg) { - return *msg->_impl_.value_.array_value_; -} -const ::Canary::protobuf::kv::MapType& -ValueWrapper::_Internal::map_value(const ValueWrapper* msg) { - return *msg->_impl_.value_.map_value_; -} -void ValueWrapper::set_allocated_array_value(::Canary::protobuf::kv::ArrayType* array_value) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - clear_value(); - if (array_value) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(array_value); - if (message_arena != submessage_arena) { - array_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, array_value, submessage_arena); - } - set_has_array_value(); - _impl_.value_.array_value_ = array_value; - } - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.kv.ValueWrapper.array_value) -} -void ValueWrapper::set_allocated_map_value(::Canary::protobuf::kv::MapType* map_value) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - clear_value(); - if (map_value) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(map_value); - if (message_arena != submessage_arena) { - map_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, map_value, submessage_arena); - } - set_has_map_value(); - _impl_.value_.map_value_ = map_value; - } - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.kv.ValueWrapper.map_value) -} -ValueWrapper::ValueWrapper(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.kv.ValueWrapper) -} -ValueWrapper::ValueWrapper(const ValueWrapper& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - ValueWrapper* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.value_){} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_._oneof_case_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - clear_has_value(); - switch (from.value_case()) { - case kStrValue: { - _this->_internal_set_str_value(from._internal_str_value()); - break; - } - case kIntValue: { - _this->_internal_set_int_value(from._internal_int_value()); - break; - } - case kDoubleValue: { - _this->_internal_set_double_value(from._internal_double_value()); - break; - } - case kArrayValue: { - _this->_internal_mutable_array_value()->::Canary::protobuf::kv::ArrayType::MergeFrom( - from._internal_array_value()); - break; - } - case kMapValue: { - _this->_internal_mutable_map_value()->::Canary::protobuf::kv::MapType::MergeFrom( - from._internal_map_value()); - break; - } - case kBoolValue: { - _this->_internal_set_bool_value(from._internal_bool_value()); - break; - } - case VALUE_NOT_SET: { - break; - } - } - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.kv.ValueWrapper) -} - -inline void ValueWrapper::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.value_){} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_._oneof_case_)*/{} - }; - clear_has_value(); -} - -ValueWrapper::~ValueWrapper() { - // @@protoc_insertion_point(destructor:Canary.protobuf.kv.ValueWrapper) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void ValueWrapper::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (has_value()) { - clear_value(); - } -} - -void ValueWrapper::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void ValueWrapper::clear_value() { -// @@protoc_insertion_point(one_of_clear_start:Canary.protobuf.kv.ValueWrapper) - switch (value_case()) { - case kStrValue: { - _impl_.value_.str_value_.Destroy(); - break; - } - case kIntValue: { - // No need to clear - break; - } - case kDoubleValue: { - // No need to clear - break; - } - case kArrayValue: { - if (GetArenaForAllocation() == nullptr) { - delete _impl_.value_.array_value_; - } - break; - } - case kMapValue: { - if (GetArenaForAllocation() == nullptr) { - delete _impl_.value_.map_value_; - } - break; - } - case kBoolValue: { - // No need to clear - break; - } - case VALUE_NOT_SET: { - break; - } - } - _impl_._oneof_case_[0] = VALUE_NOT_SET; -} - - -void ValueWrapper::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.kv.ValueWrapper) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - clear_value(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ValueWrapper::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // string str_value = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_str_value(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "Canary.protobuf.kv.ValueWrapper.str_value")); - } else - goto handle_unusual; - continue; - // int32 int_value = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _internal_set_int_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // double double_value = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 25)) { - _internal_set_double_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; - // .Canary.protobuf.kv.ArrayType array_value = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr = ctx->ParseMessage(_internal_mutable_array_value(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .Canary.protobuf.kv.MapType map_value = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { - ptr = ctx->ParseMessage(_internal_mutable_map_value(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool bool_value = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { - _internal_set_bool_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* ValueWrapper::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.kv.ValueWrapper) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // string str_value = 1; - if (_internal_has_str_value()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_str_value().data(), static_cast(this->_internal_str_value().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Canary.protobuf.kv.ValueWrapper.str_value"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_str_value(), target); - } - - // int32 int_value = 2; - if (_internal_has_int_value()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_int_value(), target); - } - - // double double_value = 3; - if (_internal_has_double_value()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(3, this->_internal_double_value(), target); - } - - // .Canary.protobuf.kv.ArrayType array_value = 4; - if (_internal_has_array_value()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(4, _Internal::array_value(this), - _Internal::array_value(this).GetCachedSize(), target, stream); - } - - // .Canary.protobuf.kv.MapType map_value = 5; - if (_internal_has_map_value()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(5, _Internal::map_value(this), - _Internal::map_value(this).GetCachedSize(), target, stream); - } - - // bool bool_value = 6; - if (_internal_has_bool_value()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_bool_value(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.kv.ValueWrapper) - return target; -} - -size_t ValueWrapper::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.kv.ValueWrapper) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - switch (value_case()) { - // string str_value = 1; - case kStrValue: { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_str_value()); - break; - } - // int32 int_value = 2; - case kIntValue: { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_int_value()); - break; - } - // double double_value = 3; - case kDoubleValue: { - total_size += 1 + 8; - break; - } - // .Canary.protobuf.kv.ArrayType array_value = 4; - case kArrayValue: { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.value_.array_value_); - break; - } - // .Canary.protobuf.kv.MapType map_value = 5; - case kMapValue: { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.value_.map_value_); - break; - } - // bool bool_value = 6; - case kBoolValue: { - total_size += 1 + 1; - break; - } - case VALUE_NOT_SET: { - break; - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ValueWrapper::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - ValueWrapper::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ValueWrapper::GetClassData() const { return &_class_data_; } - - -void ValueWrapper::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.kv.ValueWrapper) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - switch (from.value_case()) { - case kStrValue: { - _this->_internal_set_str_value(from._internal_str_value()); - break; - } - case kIntValue: { - _this->_internal_set_int_value(from._internal_int_value()); - break; - } - case kDoubleValue: { - _this->_internal_set_double_value(from._internal_double_value()); - break; - } - case kArrayValue: { - _this->_internal_mutable_array_value()->::Canary::protobuf::kv::ArrayType::MergeFrom( - from._internal_array_value()); - break; - } - case kMapValue: { - _this->_internal_mutable_map_value()->::Canary::protobuf::kv::MapType::MergeFrom( - from._internal_map_value()); - break; - } - case kBoolValue: { - _this->_internal_set_bool_value(from._internal_bool_value()); - break; - } - case VALUE_NOT_SET: { - break; - } - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void ValueWrapper::CopyFrom(const ValueWrapper& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.kv.ValueWrapper) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ValueWrapper::IsInitialized() const { - return true; -} - -void ValueWrapper::InternalSwap(ValueWrapper* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_.value_, other->_impl_.value_); - swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ValueWrapper::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_kv_2eproto_getter, &descriptor_table_kv_2eproto_once, - file_level_metadata_kv_2eproto[0]); -} - -// =================================================================== - -class ArrayType::_Internal { - public: -}; - -ArrayType::ArrayType(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.kv.ArrayType) -} -ArrayType::ArrayType(const ArrayType& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - ArrayType* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.values_){from._impl_.values_} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.kv.ArrayType) -} - -inline void ArrayType::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.values_){arena} - , /*decltype(_impl_._cached_size_)*/{} - }; -} - -ArrayType::~ArrayType() { - // @@protoc_insertion_point(destructor:Canary.protobuf.kv.ArrayType) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void ArrayType::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.values_.~RepeatedPtrField(); -} - -void ArrayType::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void ArrayType::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.kv.ArrayType) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.values_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ArrayType::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // repeated .Canary.protobuf.kv.ValueWrapper values = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_values(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* ArrayType::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.kv.ArrayType) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .Canary.protobuf.kv.ValueWrapper values = 1; - for (unsigned i = 0, - n = static_cast(this->_internal_values_size()); i < n; i++) { - const auto& repfield = this->_internal_values(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.kv.ArrayType) - return target; -} - -size_t ArrayType::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.kv.ArrayType) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .Canary.protobuf.kv.ValueWrapper values = 1; - total_size += 1UL * this->_internal_values_size(); - for (const auto& msg : this->_impl_.values_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ArrayType::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - ArrayType::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ArrayType::GetClassData() const { return &_class_data_; } - - -void ArrayType::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.kv.ArrayType) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_impl_.values_.MergeFrom(from._impl_.values_); - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void ArrayType::CopyFrom(const ArrayType& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.kv.ArrayType) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ArrayType::IsInitialized() const { - return true; -} - -void ArrayType::InternalSwap(ArrayType* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.values_.InternalSwap(&other->_impl_.values_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ArrayType::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_kv_2eproto_getter, &descriptor_table_kv_2eproto_once, - file_level_metadata_kv_2eproto[1]); -} - -// =================================================================== - -class KeyValuePair::_Internal { - public: - static const ::Canary::protobuf::kv::ValueWrapper& value(const KeyValuePair* msg); -}; - -const ::Canary::protobuf::kv::ValueWrapper& -KeyValuePair::_Internal::value(const KeyValuePair* msg) { - return *msg->_impl_.value_; -} -KeyValuePair::KeyValuePair(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.kv.KeyValuePair) -} -KeyValuePair::KeyValuePair(const KeyValuePair& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - KeyValuePair* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.value_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_key().empty()) { - _this->_impl_.key_.Set(from._internal_key(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_value()) { - _this->_impl_.value_ = new ::Canary::protobuf::kv::ValueWrapper(*from._impl_.value_); - } - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.kv.KeyValuePair) -} - -inline void KeyValuePair::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.value_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -KeyValuePair::~KeyValuePair() { - // @@protoc_insertion_point(destructor:Canary.protobuf.kv.KeyValuePair) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void KeyValuePair::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.key_.Destroy(); - if (this != internal_default_instance()) delete _impl_.value_; -} - -void KeyValuePair::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void KeyValuePair::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.kv.KeyValuePair) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.key_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.value_ != nullptr) { - delete _impl_.value_; - } - _impl_.value_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* KeyValuePair::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // string key = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "Canary.protobuf.kv.KeyValuePair.key")); - } else - goto handle_unusual; - continue; - // .Canary.protobuf.kv.ValueWrapper value = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_value(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* KeyValuePair::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.kv.KeyValuePair) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // string key = 1; - if (!this->_internal_key().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_key().data(), static_cast(this->_internal_key().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Canary.protobuf.kv.KeyValuePair.key"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_key(), target); - } - - // .Canary.protobuf.kv.ValueWrapper value = 2; - if (this->_internal_has_value()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, _Internal::value(this), - _Internal::value(this).GetCachedSize(), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.kv.KeyValuePair) - return target; -} - -size_t KeyValuePair::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.kv.KeyValuePair) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string key = 1; - if (!this->_internal_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_key()); - } - - // .Canary.protobuf.kv.ValueWrapper value = 2; - if (this->_internal_has_value()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.value_); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData KeyValuePair::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - KeyValuePair::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*KeyValuePair::GetClassData() const { return &_class_data_; } - - -void KeyValuePair::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.kv.KeyValuePair) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (!from._internal_key().empty()) { - _this->_internal_set_key(from._internal_key()); - } - if (from._internal_has_value()) { - _this->_internal_mutable_value()->::Canary::protobuf::kv::ValueWrapper::MergeFrom( - from._internal_value()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void KeyValuePair::CopyFrom(const KeyValuePair& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.kv.KeyValuePair) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool KeyValuePair::IsInitialized() const { - return true; -} - -void KeyValuePair::InternalSwap(KeyValuePair* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.key_, lhs_arena, - &other->_impl_.key_, rhs_arena - ); - swap(_impl_.value_, other->_impl_.value_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata KeyValuePair::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_kv_2eproto_getter, &descriptor_table_kv_2eproto_once, - file_level_metadata_kv_2eproto[2]); -} - -// =================================================================== - -class MapType::_Internal { - public: -}; - -MapType::MapType(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Canary.protobuf.kv.MapType) -} -MapType::MapType(const MapType& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - MapType* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.items_){from._impl_.items_} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:Canary.protobuf.kv.MapType) -} - -inline void MapType::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.items_){arena} - , /*decltype(_impl_._cached_size_)*/{} - }; -} - -MapType::~MapType() { - // @@protoc_insertion_point(destructor:Canary.protobuf.kv.MapType) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void MapType::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.items_.~RepeatedPtrField(); -} - -void MapType::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void MapType::Clear() { -// @@protoc_insertion_point(message_clear_start:Canary.protobuf.kv.MapType) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.items_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* MapType::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // repeated .Canary.protobuf.kv.KeyValuePair items = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_items(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* MapType::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Canary.protobuf.kv.MapType) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .Canary.protobuf.kv.KeyValuePair items = 1; - for (unsigned i = 0, - n = static_cast(this->_internal_items_size()); i < n; i++) { - const auto& repfield = this->_internal_items(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Canary.protobuf.kv.MapType) - return target; -} - -size_t MapType::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Canary.protobuf.kv.MapType) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .Canary.protobuf.kv.KeyValuePair items = 1; - total_size += 1UL * this->_internal_items_size(); - for (const auto& msg : this->_impl_.items_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MapType::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - MapType::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*MapType::GetClassData() const { return &_class_data_; } - - -void MapType::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Canary.protobuf.kv.MapType) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_impl_.items_.MergeFrom(from._impl_.items_); - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void MapType::CopyFrom(const MapType& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Canary.protobuf.kv.MapType) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool MapType::IsInitialized() const { - return true; -} - -void MapType::InternalSwap(MapType* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.items_.InternalSwap(&other->_impl_.items_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata MapType::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_kv_2eproto_getter, &descriptor_table_kv_2eproto_once, - file_level_metadata_kv_2eproto[3]); -} - -// @@protoc_insertion_point(namespace_scope) -} // namespace kv -} // namespace protobuf -} // namespace Canary -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::Canary::protobuf::kv::ValueWrapper* -Arena::CreateMaybeMessage< ::Canary::protobuf::kv::ValueWrapper >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::kv::ValueWrapper >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::kv::ArrayType* -Arena::CreateMaybeMessage< ::Canary::protobuf::kv::ArrayType >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::kv::ArrayType >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::kv::KeyValuePair* -Arena::CreateMaybeMessage< ::Canary::protobuf::kv::KeyValuePair >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::kv::KeyValuePair >(arena); -} -template<> PROTOBUF_NOINLINE ::Canary::protobuf::kv::MapType* -Arena::CreateMaybeMessage< ::Canary::protobuf::kv::MapType >(Arena* arena) { - return Arena::CreateMessageInternal< ::Canary::protobuf::kv::MapType >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/src/protobuf/kv.pb.h b/src/protobuf/kv.pb.h deleted file mode 100644 index c40c0a465..000000000 --- a/src/protobuf/kv.pb.h +++ /dev/null @@ -1,1441 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kv.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_kv_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_kv_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3021000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_kv_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_kv_2eproto { - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_kv_2eproto; -namespace Canary { -namespace protobuf { -namespace kv { -class ArrayType; -struct ArrayTypeDefaultTypeInternal; -extern ArrayTypeDefaultTypeInternal _ArrayType_default_instance_; -class KeyValuePair; -struct KeyValuePairDefaultTypeInternal; -extern KeyValuePairDefaultTypeInternal _KeyValuePair_default_instance_; -class MapType; -struct MapTypeDefaultTypeInternal; -extern MapTypeDefaultTypeInternal _MapType_default_instance_; -class ValueWrapper; -struct ValueWrapperDefaultTypeInternal; -extern ValueWrapperDefaultTypeInternal _ValueWrapper_default_instance_; -} // namespace kv -} // namespace protobuf -} // namespace Canary -PROTOBUF_NAMESPACE_OPEN -template<> ::Canary::protobuf::kv::ArrayType* Arena::CreateMaybeMessage<::Canary::protobuf::kv::ArrayType>(Arena*); -template<> ::Canary::protobuf::kv::KeyValuePair* Arena::CreateMaybeMessage<::Canary::protobuf::kv::KeyValuePair>(Arena*); -template<> ::Canary::protobuf::kv::MapType* Arena::CreateMaybeMessage<::Canary::protobuf::kv::MapType>(Arena*); -template<> ::Canary::protobuf::kv::ValueWrapper* Arena::CreateMaybeMessage<::Canary::protobuf::kv::ValueWrapper>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace Canary { -namespace protobuf { -namespace kv { - -// =================================================================== - -class ValueWrapper final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.kv.ValueWrapper) */ { - public: - inline ValueWrapper() : ValueWrapper(nullptr) {} - ~ValueWrapper() override; - explicit PROTOBUF_CONSTEXPR ValueWrapper(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ValueWrapper(const ValueWrapper& from); - ValueWrapper(ValueWrapper&& from) noexcept - : ValueWrapper() { - *this = ::std::move(from); - } - - inline ValueWrapper& operator=(const ValueWrapper& from) { - CopyFrom(from); - return *this; - } - inline ValueWrapper& operator=(ValueWrapper&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ValueWrapper& default_instance() { - return *internal_default_instance(); - } - enum ValueCase { - kStrValue = 1, - kIntValue = 2, - kDoubleValue = 3, - kArrayValue = 4, - kMapValue = 5, - kBoolValue = 6, - VALUE_NOT_SET = 0, - }; - - static inline const ValueWrapper* internal_default_instance() { - return reinterpret_cast( - &_ValueWrapper_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(ValueWrapper& a, ValueWrapper& b) { - a.Swap(&b); - } - inline void Swap(ValueWrapper* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ValueWrapper* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ValueWrapper* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ValueWrapper& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const ValueWrapper& from) { - ValueWrapper::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ValueWrapper* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.kv.ValueWrapper"; - } - protected: - explicit ValueWrapper(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kStrValueFieldNumber = 1, - kIntValueFieldNumber = 2, - kDoubleValueFieldNumber = 3, - kArrayValueFieldNumber = 4, - kMapValueFieldNumber = 5, - kBoolValueFieldNumber = 6, - }; - // string str_value = 1; - bool has_str_value() const; - private: - bool _internal_has_str_value() const; - public: - void clear_str_value(); - const std::string& str_value() const; - template - void set_str_value(ArgT0&& arg0, ArgT... args); - std::string* mutable_str_value(); - PROTOBUF_NODISCARD std::string* release_str_value(); - void set_allocated_str_value(std::string* str_value); - private: - const std::string& _internal_str_value() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_str_value(const std::string& value); - std::string* _internal_mutable_str_value(); - public: - - // int32 int_value = 2; - bool has_int_value() const; - private: - bool _internal_has_int_value() const; - public: - void clear_int_value(); - int32_t int_value() const; - void set_int_value(int32_t value); - private: - int32_t _internal_int_value() const; - void _internal_set_int_value(int32_t value); - public: - - // double double_value = 3; - bool has_double_value() const; - private: - bool _internal_has_double_value() const; - public: - void clear_double_value(); - double double_value() const; - void set_double_value(double value); - private: - double _internal_double_value() const; - void _internal_set_double_value(double value); - public: - - // .Canary.protobuf.kv.ArrayType array_value = 4; - bool has_array_value() const; - private: - bool _internal_has_array_value() const; - public: - void clear_array_value(); - const ::Canary::protobuf::kv::ArrayType& array_value() const; - PROTOBUF_NODISCARD ::Canary::protobuf::kv::ArrayType* release_array_value(); - ::Canary::protobuf::kv::ArrayType* mutable_array_value(); - void set_allocated_array_value(::Canary::protobuf::kv::ArrayType* array_value); - private: - const ::Canary::protobuf::kv::ArrayType& _internal_array_value() const; - ::Canary::protobuf::kv::ArrayType* _internal_mutable_array_value(); - public: - void unsafe_arena_set_allocated_array_value( - ::Canary::protobuf::kv::ArrayType* array_value); - ::Canary::protobuf::kv::ArrayType* unsafe_arena_release_array_value(); - - // .Canary.protobuf.kv.MapType map_value = 5; - bool has_map_value() const; - private: - bool _internal_has_map_value() const; - public: - void clear_map_value(); - const ::Canary::protobuf::kv::MapType& map_value() const; - PROTOBUF_NODISCARD ::Canary::protobuf::kv::MapType* release_map_value(); - ::Canary::protobuf::kv::MapType* mutable_map_value(); - void set_allocated_map_value(::Canary::protobuf::kv::MapType* map_value); - private: - const ::Canary::protobuf::kv::MapType& _internal_map_value() const; - ::Canary::protobuf::kv::MapType* _internal_mutable_map_value(); - public: - void unsafe_arena_set_allocated_map_value( - ::Canary::protobuf::kv::MapType* map_value); - ::Canary::protobuf::kv::MapType* unsafe_arena_release_map_value(); - - // bool bool_value = 6; - bool has_bool_value() const; - private: - bool _internal_has_bool_value() const; - public: - void clear_bool_value(); - bool bool_value() const; - void set_bool_value(bool value); - private: - bool _internal_bool_value() const; - void _internal_set_bool_value(bool value); - public: - - void clear_value(); - ValueCase value_case() const; - // @@protoc_insertion_point(class_scope:Canary.protobuf.kv.ValueWrapper) - private: - class _Internal; - void set_has_str_value(); - void set_has_int_value(); - void set_has_double_value(); - void set_has_array_value(); - void set_has_map_value(); - void set_has_bool_value(); - - inline bool has_value() const; - inline void clear_has_value(); - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - union ValueUnion { - constexpr ValueUnion() : _constinit_{} {} - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr str_value_; - int32_t int_value_; - double double_value_; - ::Canary::protobuf::kv::ArrayType* array_value_; - ::Canary::protobuf::kv::MapType* map_value_; - bool bool_value_; - } value_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t _oneof_case_[1]; - - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_kv_2eproto; -}; -// ------------------------------------------------------------------- - -class ArrayType final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.kv.ArrayType) */ { - public: - inline ArrayType() : ArrayType(nullptr) {} - ~ArrayType() override; - explicit PROTOBUF_CONSTEXPR ArrayType(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ArrayType(const ArrayType& from); - ArrayType(ArrayType&& from) noexcept - : ArrayType() { - *this = ::std::move(from); - } - - inline ArrayType& operator=(const ArrayType& from) { - CopyFrom(from); - return *this; - } - inline ArrayType& operator=(ArrayType&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ArrayType& default_instance() { - return *internal_default_instance(); - } - static inline const ArrayType* internal_default_instance() { - return reinterpret_cast( - &_ArrayType_default_instance_); - } - static constexpr int kIndexInFileMessages = - 1; - - friend void swap(ArrayType& a, ArrayType& b) { - a.Swap(&b); - } - inline void Swap(ArrayType* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ArrayType* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ArrayType* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ArrayType& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const ArrayType& from) { - ArrayType::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ArrayType* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.kv.ArrayType"; - } - protected: - explicit ArrayType(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kValuesFieldNumber = 1, - }; - // repeated .Canary.protobuf.kv.ValueWrapper values = 1; - int values_size() const; - private: - int _internal_values_size() const; - public: - void clear_values(); - ::Canary::protobuf::kv::ValueWrapper* mutable_values(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::kv::ValueWrapper >* - mutable_values(); - private: - const ::Canary::protobuf::kv::ValueWrapper& _internal_values(int index) const; - ::Canary::protobuf::kv::ValueWrapper* _internal_add_values(); - public: - const ::Canary::protobuf::kv::ValueWrapper& values(int index) const; - ::Canary::protobuf::kv::ValueWrapper* add_values(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::kv::ValueWrapper >& - values() const; - - // @@protoc_insertion_point(class_scope:Canary.protobuf.kv.ArrayType) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::kv::ValueWrapper > values_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_kv_2eproto; -}; -// ------------------------------------------------------------------- - -class KeyValuePair final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.kv.KeyValuePair) */ { - public: - inline KeyValuePair() : KeyValuePair(nullptr) {} - ~KeyValuePair() override; - explicit PROTOBUF_CONSTEXPR KeyValuePair(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - KeyValuePair(const KeyValuePair& from); - KeyValuePair(KeyValuePair&& from) noexcept - : KeyValuePair() { - *this = ::std::move(from); - } - - inline KeyValuePair& operator=(const KeyValuePair& from) { - CopyFrom(from); - return *this; - } - inline KeyValuePair& operator=(KeyValuePair&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const KeyValuePair& default_instance() { - return *internal_default_instance(); - } - static inline const KeyValuePair* internal_default_instance() { - return reinterpret_cast( - &_KeyValuePair_default_instance_); - } - static constexpr int kIndexInFileMessages = - 2; - - friend void swap(KeyValuePair& a, KeyValuePair& b) { - a.Swap(&b); - } - inline void Swap(KeyValuePair* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(KeyValuePair* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - KeyValuePair* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const KeyValuePair& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const KeyValuePair& from) { - KeyValuePair::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(KeyValuePair* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.kv.KeyValuePair"; - } - protected: - explicit KeyValuePair(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kKeyFieldNumber = 1, - kValueFieldNumber = 2, - }; - // string key = 1; - void clear_key(); - const std::string& key() const; - template - void set_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_key(); - PROTOBUF_NODISCARD std::string* release_key(); - void set_allocated_key(std::string* key); - private: - const std::string& _internal_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_key(const std::string& value); - std::string* _internal_mutable_key(); - public: - - // .Canary.protobuf.kv.ValueWrapper value = 2; - bool has_value() const; - private: - bool _internal_has_value() const; - public: - void clear_value(); - const ::Canary::protobuf::kv::ValueWrapper& value() const; - PROTOBUF_NODISCARD ::Canary::protobuf::kv::ValueWrapper* release_value(); - ::Canary::protobuf::kv::ValueWrapper* mutable_value(); - void set_allocated_value(::Canary::protobuf::kv::ValueWrapper* value); - private: - const ::Canary::protobuf::kv::ValueWrapper& _internal_value() const; - ::Canary::protobuf::kv::ValueWrapper* _internal_mutable_value(); - public: - void unsafe_arena_set_allocated_value( - ::Canary::protobuf::kv::ValueWrapper* value); - ::Canary::protobuf::kv::ValueWrapper* unsafe_arena_release_value(); - - // @@protoc_insertion_point(class_scope:Canary.protobuf.kv.KeyValuePair) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_; - ::Canary::protobuf::kv::ValueWrapper* value_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_kv_2eproto; -}; -// ------------------------------------------------------------------- - -class MapType final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Canary.protobuf.kv.MapType) */ { - public: - inline MapType() : MapType(nullptr) {} - ~MapType() override; - explicit PROTOBUF_CONSTEXPR MapType(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - MapType(const MapType& from); - MapType(MapType&& from) noexcept - : MapType() { - *this = ::std::move(from); - } - - inline MapType& operator=(const MapType& from) { - CopyFrom(from); - return *this; - } - inline MapType& operator=(MapType&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const MapType& default_instance() { - return *internal_default_instance(); - } - static inline const MapType* internal_default_instance() { - return reinterpret_cast( - &_MapType_default_instance_); - } - static constexpr int kIndexInFileMessages = - 3; - - friend void swap(MapType& a, MapType& b) { - a.Swap(&b); - } - inline void Swap(MapType* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(MapType* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - MapType* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const MapType& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const MapType& from) { - MapType::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(MapType* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Canary.protobuf.kv.MapType"; - } - protected: - explicit MapType(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kItemsFieldNumber = 1, - }; - // repeated .Canary.protobuf.kv.KeyValuePair items = 1; - int items_size() const; - private: - int _internal_items_size() const; - public: - void clear_items(); - ::Canary::protobuf::kv::KeyValuePair* mutable_items(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::kv::KeyValuePair >* - mutable_items(); - private: - const ::Canary::protobuf::kv::KeyValuePair& _internal_items(int index) const; - ::Canary::protobuf::kv::KeyValuePair* _internal_add_items(); - public: - const ::Canary::protobuf::kv::KeyValuePair& items(int index) const; - ::Canary::protobuf::kv::KeyValuePair* add_items(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::kv::KeyValuePair >& - items() const; - - // @@protoc_insertion_point(class_scope:Canary.protobuf.kv.MapType) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::kv::KeyValuePair > items_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_kv_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// ValueWrapper - -// string str_value = 1; -inline bool ValueWrapper::_internal_has_str_value() const { - return value_case() == kStrValue; -} -inline bool ValueWrapper::has_str_value() const { - return _internal_has_str_value(); -} -inline void ValueWrapper::set_has_str_value() { - _impl_._oneof_case_[0] = kStrValue; -} -inline void ValueWrapper::clear_str_value() { - if (_internal_has_str_value()) { - _impl_.value_.str_value_.Destroy(); - clear_has_value(); - } -} -inline const std::string& ValueWrapper::str_value() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.kv.ValueWrapper.str_value) - return _internal_str_value(); -} -template -inline void ValueWrapper::set_str_value(ArgT0&& arg0, ArgT... args) { - if (!_internal_has_str_value()) { - clear_value(); - set_has_str_value(); - _impl_.value_.str_value_.InitDefault(); - } - _impl_.value_.str_value_.Set( static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:Canary.protobuf.kv.ValueWrapper.str_value) -} -inline std::string* ValueWrapper::mutable_str_value() { - std::string* _s = _internal_mutable_str_value(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.kv.ValueWrapper.str_value) - return _s; -} -inline const std::string& ValueWrapper::_internal_str_value() const { - if (_internal_has_str_value()) { - return _impl_.value_.str_value_.Get(); - } - return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); -} -inline void ValueWrapper::_internal_set_str_value(const std::string& value) { - if (!_internal_has_str_value()) { - clear_value(); - set_has_str_value(); - _impl_.value_.str_value_.InitDefault(); - } - _impl_.value_.str_value_.Set(value, GetArenaForAllocation()); -} -inline std::string* ValueWrapper::_internal_mutable_str_value() { - if (!_internal_has_str_value()) { - clear_value(); - set_has_str_value(); - _impl_.value_.str_value_.InitDefault(); - } - return _impl_.value_.str_value_.Mutable( GetArenaForAllocation()); -} -inline std::string* ValueWrapper::release_str_value() { - // @@protoc_insertion_point(field_release:Canary.protobuf.kv.ValueWrapper.str_value) - if (_internal_has_str_value()) { - clear_has_value(); - return _impl_.value_.str_value_.Release(); - } else { - return nullptr; - } -} -inline void ValueWrapper::set_allocated_str_value(std::string* str_value) { - if (has_value()) { - clear_value(); - } - if (str_value != nullptr) { - set_has_str_value(); - _impl_.value_.str_value_.InitAllocated(str_value, GetArenaForAllocation()); - } - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.kv.ValueWrapper.str_value) -} - -// int32 int_value = 2; -inline bool ValueWrapper::_internal_has_int_value() const { - return value_case() == kIntValue; -} -inline bool ValueWrapper::has_int_value() const { - return _internal_has_int_value(); -} -inline void ValueWrapper::set_has_int_value() { - _impl_._oneof_case_[0] = kIntValue; -} -inline void ValueWrapper::clear_int_value() { - if (_internal_has_int_value()) { - _impl_.value_.int_value_ = 0; - clear_has_value(); - } -} -inline int32_t ValueWrapper::_internal_int_value() const { - if (_internal_has_int_value()) { - return _impl_.value_.int_value_; - } - return 0; -} -inline void ValueWrapper::_internal_set_int_value(int32_t value) { - if (!_internal_has_int_value()) { - clear_value(); - set_has_int_value(); - } - _impl_.value_.int_value_ = value; -} -inline int32_t ValueWrapper::int_value() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.kv.ValueWrapper.int_value) - return _internal_int_value(); -} -inline void ValueWrapper::set_int_value(int32_t value) { - _internal_set_int_value(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.kv.ValueWrapper.int_value) -} - -// double double_value = 3; -inline bool ValueWrapper::_internal_has_double_value() const { - return value_case() == kDoubleValue; -} -inline bool ValueWrapper::has_double_value() const { - return _internal_has_double_value(); -} -inline void ValueWrapper::set_has_double_value() { - _impl_._oneof_case_[0] = kDoubleValue; -} -inline void ValueWrapper::clear_double_value() { - if (_internal_has_double_value()) { - _impl_.value_.double_value_ = 0; - clear_has_value(); - } -} -inline double ValueWrapper::_internal_double_value() const { - if (_internal_has_double_value()) { - return _impl_.value_.double_value_; - } - return 0; -} -inline void ValueWrapper::_internal_set_double_value(double value) { - if (!_internal_has_double_value()) { - clear_value(); - set_has_double_value(); - } - _impl_.value_.double_value_ = value; -} -inline double ValueWrapper::double_value() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.kv.ValueWrapper.double_value) - return _internal_double_value(); -} -inline void ValueWrapper::set_double_value(double value) { - _internal_set_double_value(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.kv.ValueWrapper.double_value) -} - -// .Canary.protobuf.kv.ArrayType array_value = 4; -inline bool ValueWrapper::_internal_has_array_value() const { - return value_case() == kArrayValue; -} -inline bool ValueWrapper::has_array_value() const { - return _internal_has_array_value(); -} -inline void ValueWrapper::set_has_array_value() { - _impl_._oneof_case_[0] = kArrayValue; -} -inline void ValueWrapper::clear_array_value() { - if (_internal_has_array_value()) { - if (GetArenaForAllocation() == nullptr) { - delete _impl_.value_.array_value_; - } - clear_has_value(); - } -} -inline ::Canary::protobuf::kv::ArrayType* ValueWrapper::release_array_value() { - // @@protoc_insertion_point(field_release:Canary.protobuf.kv.ValueWrapper.array_value) - if (_internal_has_array_value()) { - clear_has_value(); - ::Canary::protobuf::kv::ArrayType* temp = _impl_.value_.array_value_; - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - _impl_.value_.array_value_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::Canary::protobuf::kv::ArrayType& ValueWrapper::_internal_array_value() const { - return _internal_has_array_value() - ? *_impl_.value_.array_value_ - : reinterpret_cast< ::Canary::protobuf::kv::ArrayType&>(::Canary::protobuf::kv::_ArrayType_default_instance_); -} -inline const ::Canary::protobuf::kv::ArrayType& ValueWrapper::array_value() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.kv.ValueWrapper.array_value) - return _internal_array_value(); -} -inline ::Canary::protobuf::kv::ArrayType* ValueWrapper::unsafe_arena_release_array_value() { - // @@protoc_insertion_point(field_unsafe_arena_release:Canary.protobuf.kv.ValueWrapper.array_value) - if (_internal_has_array_value()) { - clear_has_value(); - ::Canary::protobuf::kv::ArrayType* temp = _impl_.value_.array_value_; - _impl_.value_.array_value_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void ValueWrapper::unsafe_arena_set_allocated_array_value(::Canary::protobuf::kv::ArrayType* array_value) { - clear_value(); - if (array_value) { - set_has_array_value(); - _impl_.value_.array_value_ = array_value; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.kv.ValueWrapper.array_value) -} -inline ::Canary::protobuf::kv::ArrayType* ValueWrapper::_internal_mutable_array_value() { - if (!_internal_has_array_value()) { - clear_value(); - set_has_array_value(); - _impl_.value_.array_value_ = CreateMaybeMessage< ::Canary::protobuf::kv::ArrayType >(GetArenaForAllocation()); - } - return _impl_.value_.array_value_; -} -inline ::Canary::protobuf::kv::ArrayType* ValueWrapper::mutable_array_value() { - ::Canary::protobuf::kv::ArrayType* _msg = _internal_mutable_array_value(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.kv.ValueWrapper.array_value) - return _msg; -} - -// .Canary.protobuf.kv.MapType map_value = 5; -inline bool ValueWrapper::_internal_has_map_value() const { - return value_case() == kMapValue; -} -inline bool ValueWrapper::has_map_value() const { - return _internal_has_map_value(); -} -inline void ValueWrapper::set_has_map_value() { - _impl_._oneof_case_[0] = kMapValue; -} -inline void ValueWrapper::clear_map_value() { - if (_internal_has_map_value()) { - if (GetArenaForAllocation() == nullptr) { - delete _impl_.value_.map_value_; - } - clear_has_value(); - } -} -inline ::Canary::protobuf::kv::MapType* ValueWrapper::release_map_value() { - // @@protoc_insertion_point(field_release:Canary.protobuf.kv.ValueWrapper.map_value) - if (_internal_has_map_value()) { - clear_has_value(); - ::Canary::protobuf::kv::MapType* temp = _impl_.value_.map_value_; - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - _impl_.value_.map_value_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::Canary::protobuf::kv::MapType& ValueWrapper::_internal_map_value() const { - return _internal_has_map_value() - ? *_impl_.value_.map_value_ - : reinterpret_cast< ::Canary::protobuf::kv::MapType&>(::Canary::protobuf::kv::_MapType_default_instance_); -} -inline const ::Canary::protobuf::kv::MapType& ValueWrapper::map_value() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.kv.ValueWrapper.map_value) - return _internal_map_value(); -} -inline ::Canary::protobuf::kv::MapType* ValueWrapper::unsafe_arena_release_map_value() { - // @@protoc_insertion_point(field_unsafe_arena_release:Canary.protobuf.kv.ValueWrapper.map_value) - if (_internal_has_map_value()) { - clear_has_value(); - ::Canary::protobuf::kv::MapType* temp = _impl_.value_.map_value_; - _impl_.value_.map_value_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void ValueWrapper::unsafe_arena_set_allocated_map_value(::Canary::protobuf::kv::MapType* map_value) { - clear_value(); - if (map_value) { - set_has_map_value(); - _impl_.value_.map_value_ = map_value; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.kv.ValueWrapper.map_value) -} -inline ::Canary::protobuf::kv::MapType* ValueWrapper::_internal_mutable_map_value() { - if (!_internal_has_map_value()) { - clear_value(); - set_has_map_value(); - _impl_.value_.map_value_ = CreateMaybeMessage< ::Canary::protobuf::kv::MapType >(GetArenaForAllocation()); - } - return _impl_.value_.map_value_; -} -inline ::Canary::protobuf::kv::MapType* ValueWrapper::mutable_map_value() { - ::Canary::protobuf::kv::MapType* _msg = _internal_mutable_map_value(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.kv.ValueWrapper.map_value) - return _msg; -} - -// bool bool_value = 6; -inline bool ValueWrapper::_internal_has_bool_value() const { - return value_case() == kBoolValue; -} -inline bool ValueWrapper::has_bool_value() const { - return _internal_has_bool_value(); -} -inline void ValueWrapper::set_has_bool_value() { - _impl_._oneof_case_[0] = kBoolValue; -} -inline void ValueWrapper::clear_bool_value() { - if (_internal_has_bool_value()) { - _impl_.value_.bool_value_ = false; - clear_has_value(); - } -} -inline bool ValueWrapper::_internal_bool_value() const { - if (_internal_has_bool_value()) { - return _impl_.value_.bool_value_; - } - return false; -} -inline void ValueWrapper::_internal_set_bool_value(bool value) { - if (!_internal_has_bool_value()) { - clear_value(); - set_has_bool_value(); - } - _impl_.value_.bool_value_ = value; -} -inline bool ValueWrapper::bool_value() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.kv.ValueWrapper.bool_value) - return _internal_bool_value(); -} -inline void ValueWrapper::set_bool_value(bool value) { - _internal_set_bool_value(value); - // @@protoc_insertion_point(field_set:Canary.protobuf.kv.ValueWrapper.bool_value) -} - -inline bool ValueWrapper::has_value() const { - return value_case() != VALUE_NOT_SET; -} -inline void ValueWrapper::clear_has_value() { - _impl_._oneof_case_[0] = VALUE_NOT_SET; -} -inline ValueWrapper::ValueCase ValueWrapper::value_case() const { - return ValueWrapper::ValueCase(_impl_._oneof_case_[0]); -} -// ------------------------------------------------------------------- - -// ArrayType - -// repeated .Canary.protobuf.kv.ValueWrapper values = 1; -inline int ArrayType::_internal_values_size() const { - return _impl_.values_.size(); -} -inline int ArrayType::values_size() const { - return _internal_values_size(); -} -inline void ArrayType::clear_values() { - _impl_.values_.Clear(); -} -inline ::Canary::protobuf::kv::ValueWrapper* ArrayType::mutable_values(int index) { - // @@protoc_insertion_point(field_mutable:Canary.protobuf.kv.ArrayType.values) - return _impl_.values_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::kv::ValueWrapper >* -ArrayType::mutable_values() { - // @@protoc_insertion_point(field_mutable_list:Canary.protobuf.kv.ArrayType.values) - return &_impl_.values_; -} -inline const ::Canary::protobuf::kv::ValueWrapper& ArrayType::_internal_values(int index) const { - return _impl_.values_.Get(index); -} -inline const ::Canary::protobuf::kv::ValueWrapper& ArrayType::values(int index) const { - // @@protoc_insertion_point(field_get:Canary.protobuf.kv.ArrayType.values) - return _internal_values(index); -} -inline ::Canary::protobuf::kv::ValueWrapper* ArrayType::_internal_add_values() { - return _impl_.values_.Add(); -} -inline ::Canary::protobuf::kv::ValueWrapper* ArrayType::add_values() { - ::Canary::protobuf::kv::ValueWrapper* _add = _internal_add_values(); - // @@protoc_insertion_point(field_add:Canary.protobuf.kv.ArrayType.values) - return _add; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::kv::ValueWrapper >& -ArrayType::values() const { - // @@protoc_insertion_point(field_list:Canary.protobuf.kv.ArrayType.values) - return _impl_.values_; -} - -// ------------------------------------------------------------------- - -// KeyValuePair - -// string key = 1; -inline void KeyValuePair::clear_key() { - _impl_.key_.ClearToEmpty(); -} -inline const std::string& KeyValuePair::key() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.kv.KeyValuePair.key) - return _internal_key(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void KeyValuePair::set_key(ArgT0&& arg0, ArgT... args) { - - _impl_.key_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:Canary.protobuf.kv.KeyValuePair.key) -} -inline std::string* KeyValuePair::mutable_key() { - std::string* _s = _internal_mutable_key(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.kv.KeyValuePair.key) - return _s; -} -inline const std::string& KeyValuePair::_internal_key() const { - return _impl_.key_.Get(); -} -inline void KeyValuePair::_internal_set_key(const std::string& value) { - - _impl_.key_.Set(value, GetArenaForAllocation()); -} -inline std::string* KeyValuePair::_internal_mutable_key() { - - return _impl_.key_.Mutable(GetArenaForAllocation()); -} -inline std::string* KeyValuePair::release_key() { - // @@protoc_insertion_point(field_release:Canary.protobuf.kv.KeyValuePair.key) - return _impl_.key_.Release(); -} -inline void KeyValuePair::set_allocated_key(std::string* key) { - if (key != nullptr) { - - } else { - - } - _impl_.key_.SetAllocated(key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.key_.IsDefault()) { - _impl_.key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.kv.KeyValuePair.key) -} - -// .Canary.protobuf.kv.ValueWrapper value = 2; -inline bool KeyValuePair::_internal_has_value() const { - return this != internal_default_instance() && _impl_.value_ != nullptr; -} -inline bool KeyValuePair::has_value() const { - return _internal_has_value(); -} -inline void KeyValuePair::clear_value() { - if (GetArenaForAllocation() == nullptr && _impl_.value_ != nullptr) { - delete _impl_.value_; - } - _impl_.value_ = nullptr; -} -inline const ::Canary::protobuf::kv::ValueWrapper& KeyValuePair::_internal_value() const { - const ::Canary::protobuf::kv::ValueWrapper* p = _impl_.value_; - return p != nullptr ? *p : reinterpret_cast( - ::Canary::protobuf::kv::_ValueWrapper_default_instance_); -} -inline const ::Canary::protobuf::kv::ValueWrapper& KeyValuePair::value() const { - // @@protoc_insertion_point(field_get:Canary.protobuf.kv.KeyValuePair.value) - return _internal_value(); -} -inline void KeyValuePair::unsafe_arena_set_allocated_value( - ::Canary::protobuf::kv::ValueWrapper* value) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.value_); - } - _impl_.value_ = value; - if (value) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Canary.protobuf.kv.KeyValuePair.value) -} -inline ::Canary::protobuf::kv::ValueWrapper* KeyValuePair::release_value() { - - ::Canary::protobuf::kv::ValueWrapper* temp = _impl_.value_; - _impl_.value_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::Canary::protobuf::kv::ValueWrapper* KeyValuePair::unsafe_arena_release_value() { - // @@protoc_insertion_point(field_release:Canary.protobuf.kv.KeyValuePair.value) - - ::Canary::protobuf::kv::ValueWrapper* temp = _impl_.value_; - _impl_.value_ = nullptr; - return temp; -} -inline ::Canary::protobuf::kv::ValueWrapper* KeyValuePair::_internal_mutable_value() { - - if (_impl_.value_ == nullptr) { - auto* p = CreateMaybeMessage<::Canary::protobuf::kv::ValueWrapper>(GetArenaForAllocation()); - _impl_.value_ = p; - } - return _impl_.value_; -} -inline ::Canary::protobuf::kv::ValueWrapper* KeyValuePair::mutable_value() { - ::Canary::protobuf::kv::ValueWrapper* _msg = _internal_mutable_value(); - // @@protoc_insertion_point(field_mutable:Canary.protobuf.kv.KeyValuePair.value) - return _msg; -} -inline void KeyValuePair::set_allocated_value(::Canary::protobuf::kv::ValueWrapper* value) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.value_; - } - if (value) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(value); - if (message_arena != submessage_arena) { - value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, value, submessage_arena); - } - - } else { - - } - _impl_.value_ = value; - // @@protoc_insertion_point(field_set_allocated:Canary.protobuf.kv.KeyValuePair.value) -} - -// ------------------------------------------------------------------- - -// MapType - -// repeated .Canary.protobuf.kv.KeyValuePair items = 1; -inline int MapType::_internal_items_size() const { - return _impl_.items_.size(); -} -inline int MapType::items_size() const { - return _internal_items_size(); -} -inline void MapType::clear_items() { - _impl_.items_.Clear(); -} -inline ::Canary::protobuf::kv::KeyValuePair* MapType::mutable_items(int index) { - // @@protoc_insertion_point(field_mutable:Canary.protobuf.kv.MapType.items) - return _impl_.items_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::kv::KeyValuePair >* -MapType::mutable_items() { - // @@protoc_insertion_point(field_mutable_list:Canary.protobuf.kv.MapType.items) - return &_impl_.items_; -} -inline const ::Canary::protobuf::kv::KeyValuePair& MapType::_internal_items(int index) const { - return _impl_.items_.Get(index); -} -inline const ::Canary::protobuf::kv::KeyValuePair& MapType::items(int index) const { - // @@protoc_insertion_point(field_get:Canary.protobuf.kv.MapType.items) - return _internal_items(index); -} -inline ::Canary::protobuf::kv::KeyValuePair* MapType::_internal_add_items() { - return _impl_.items_.Add(); -} -inline ::Canary::protobuf::kv::KeyValuePair* MapType::add_items() { - ::Canary::protobuf::kv::KeyValuePair* _add = _internal_add_items(); - // @@protoc_insertion_point(field_add:Canary.protobuf.kv.MapType.items) - return _add; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Canary::protobuf::kv::KeyValuePair >& -MapType::items() const { - // @@protoc_insertion_point(field_list:Canary.protobuf.kv.MapType.items) - return _impl_.items_; -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace kv -} // namespace protobuf -} // namespace Canary - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_kv_2eproto diff --git a/src/security/argon.cpp b/src/security/argon.cpp index 7a869fc2a..02079e70c 100644 --- a/src/security/argon.cpp +++ b/src/security/argon.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/security/argon.hpp b/src/security/argon.hpp index 03dea87f5..ea09dcffc 100644 --- a/src/security/argon.hpp +++ b/src/security/argon.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/security/rsa.cpp b/src/security/rsa.cpp index b5f64356d..fc28d931f 100644 --- a/src/security/rsa.cpp +++ b/src/security/rsa.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/security/rsa.hpp b/src/security/rsa.hpp index 1ede77483..a6de23b4e 100644 --- a/src/security/rsa.hpp +++ b/src/security/rsa.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/network/connection/connection.cpp b/src/server/network/connection/connection.cpp index 3ae209754..7d9de9162 100644 --- a/src/server/network/connection/connection.cpp +++ b/src/server/network/connection/connection.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/network/connection/connection.hpp b/src/server/network/connection/connection.hpp index 2054cf69f..76d9b1c18 100644 --- a/src/server/network/connection/connection.hpp +++ b/src/server/network/connection/connection.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/network/message/networkmessage.cpp b/src/server/network/message/networkmessage.cpp index 9c10b4907..159631355 100644 --- a/src/server/network/message/networkmessage.cpp +++ b/src/server/network/message/networkmessage.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/network/message/networkmessage.hpp b/src/server/network/message/networkmessage.hpp index 3051e87bb..72f0e69c3 100644 --- a/src/server/network/message/networkmessage.hpp +++ b/src/server/network/message/networkmessage.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/network/message/outputmessage.cpp b/src/server/network/message/outputmessage.cpp index d15cd4b36..6ede36da4 100644 --- a/src/server/network/message/outputmessage.cpp +++ b/src/server/network/message/outputmessage.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/network/message/outputmessage.hpp b/src/server/network/message/outputmessage.hpp index 6cc6f067b..1f590fbd2 100644 --- a/src/server/network/message/outputmessage.hpp +++ b/src/server/network/message/outputmessage.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/network/protocol/protocol.cpp b/src/server/network/protocol/protocol.cpp index 686a8f7e4..6f6a1c822 100644 --- a/src/server/network/protocol/protocol.cpp +++ b/src/server/network/protocol/protocol.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/network/protocol/protocol.hpp b/src/server/network/protocol/protocol.hpp index 6e4b09c46..c264f49bf 100644 --- a/src/server/network/protocol/protocol.hpp +++ b/src/server/network/protocol/protocol.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 2492d800c..76795ced0 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -26,6 +26,7 @@ #include "server/network/message/outputmessage.hpp" #include "creatures/players/player.hpp" #include "creatures/players/wheel/player_wheel.hpp" +#include "creatures/players/achievement/player_achievement.hpp" #include "creatures/players/grouping/familiars.hpp" #include "server/network/protocol/protocolgame.hpp" #include "game/scheduling/dispatcher.hpp" @@ -38,6 +39,8 @@ #include "enums/account_group_type.hpp" #include "enums/account_coins.hpp" +#include "creatures/players/highscore_category.hpp" + /* * NOTE: This namespace is used so that we can add functions without having to declare them in the ".hpp/.hpp" file * Do not use functions only in the .cpp scope without having a namespace, it may conflict with functions in other files of the same name @@ -2155,24 +2158,15 @@ void ProtocolGame::sendHighscores(const std::vector &charact } msg.add(selectedVocation); // Selected Vocation - HighscoreCategory highscoreCategories[] = { - { "Experience Points", HIGHSCORE_CATEGORY_EXPERIENCE }, - { "Fist Fighting", HIGHSCORE_CATEGORY_FIST_FIGHTING }, - { "Club Fighting", HIGHSCORE_CATEGORY_CLUB_FIGHTING }, - { "Sword Fighting", HIGHSCORE_CATEGORY_SWORD_FIGHTING }, - { "Axe Fighting", HIGHSCORE_CATEGORY_AXE_FIGHTING }, - { "Distance Fighting", HIGHSCORE_CATEGORY_DISTANCE_FIGHTING }, - { "Shielding", HIGHSCORE_CATEGORY_SHIELDING }, - { "Fishing", HIGHSCORE_CATEGORY_FISHING }, - { "Magic Level", HIGHSCORE_CATEGORY_MAGIC_LEVEL } - }; - uint8_t selectedCategory = 0; - msg.addByte(sizeof(highscoreCategories) / sizeof(HighscoreCategory)); // Category Count - for (HighscoreCategory &category : highscoreCategories) { - msg.addByte(category.id); // Category Id - msg.addString(category.name, "ProtocolGame::sendHighscores - category.name"); // Category Name - if (category.id == categoryId) { + const auto &highscoreCategories = g_game().getHighscoreCategories(); + msg.addByte(highscoreCategories.size()); // Category Count + g_logger().debug("[ProtocolGame::sendHighscores] - Category Count: {}", highscoreCategories.size()); + for (const HighscoreCategory &category : highscoreCategories) { + g_logger().debug("[ProtocolGame::sendHighscores] - Category: {} - Name: {}", category.m_id, category.m_name); + msg.addByte(category.m_id); // Category Id + msg.addString(category.m_name, "ProtocolGame::sendHighscores - category.name"); // Category Name + if (category.m_id == categoryId) { selectedCategory = categoryId; } } @@ -3649,7 +3643,7 @@ void ProtocolGame::sendCyclopediaCharacterRecentPvPKills(uint16_t page, uint16_t writeToOutputBuffer(msg); } -void ProtocolGame::sendCyclopediaCharacterAchievements() { +void ProtocolGame::sendCyclopediaCharacterAchievements(uint16_t secretsUnlocked, std::vector> achievementsUnlocked) { if (!player || oldProtocol) { return; } @@ -3657,10 +3651,24 @@ void ProtocolGame::sendCyclopediaCharacterAchievements() { NetworkMessage msg; msg.addByte(0xDA); msg.addByte(CYCLOPEDIA_CHARACTERINFO_ACHIEVEMENTS); - msg.addByte(0x00); - msg.add(0); - msg.add(0); - msg.add(0); + msg.addByte(0x00); // 0x00 Here means 'no error' + msg.add(player->achiev()->getPoints()); + msg.add(secretsUnlocked); + msg.add(static_cast(achievementsUnlocked.size())); + std::string messageAchievName = "ProtocolGame::sendCyclopediaCharacterAchievements - achievement.name"; + std::string messageAchievDesc = "ProtocolGame::sendCyclopediaCharacterAchievements - achievement.description"; + for (const auto &[achievement, addedTimestamp] : achievementsUnlocked) { + msg.add(achievement.id); + msg.add(addedTimestamp); + if (achievement.secret) { + msg.addByte(0x01); + msg.addString(achievement.name, messageAchievName); + msg.addString(achievement.description, messageAchievDesc); + msg.addByte(achievement.grade); + } else { + msg.addByte(0x00); + } + } writeToOutputBuffer(msg); } @@ -4054,7 +4062,7 @@ void ProtocolGame::sendPremiumTrigger() { void ProtocolGame::sendTextMessage(const TextMessage &message) { if (message.type == MESSAGE_NONE) { g_logger().error("[ProtocolGame::sendTextMessage] - Message type is wrong, missing or invalid for player with name {}, on position {}", player->getName(), player->getPosition().toString()); - player->sendTextMessage(MESSAGE_ADMINISTRADOR, "There was a problem requesting your message, please contact the administrator"); + player->sendTextMessage(MESSAGE_ADMINISTRATOR, "There was a problem requesting your message, please contact the administrator"); return; } @@ -4133,15 +4141,21 @@ void ProtocolGame::sendTextMessage(const TextMessage &message) { } case MESSAGE_HEALED: case MESSAGE_HEALED_OTHERS: { - msg.addPosition(message.position); - msg.add(message.primary.value); - msg.addByte(message.primary.color); + if (!oldProtocol) { + msg.addPosition(message.position); + msg.add(message.primary.value); + msg.addByte(message.primary.color); + } break; } case MESSAGE_EXPERIENCE: case MESSAGE_EXPERIENCE_OTHERS: { msg.addPosition(message.position); - msg.add(message.primary.value); + if (!oldProtocol) { + msg.add(message.primary.value); + } else { + msg.add(message.primary.value); + } msg.addByte(message.primary.color); break; } @@ -5018,7 +5032,6 @@ void ProtocolGame::sendOpenForge() { // Checking size of map to send in the addByte (total fusion items count) uint8_t fusionTotalItemsCount = 0; for (const auto &[itemId, tierAndCountMap] : fusionItemsMap) { - auto classification = Item::items[itemId].upgradeClassification; for (const auto [itemTier, itemCount] : tierAndCountMap) { if (itemCount >= 2) { fusionTotalItemsCount++; @@ -6596,17 +6609,6 @@ void ProtocolGame::sendOutfitWindow() { AddOutfit(msg, currentOutfit); std::vector protocolOutfits; - if (player->isAccessPlayer()) { - static const std::string gamemasterOutfitName = "Game Master"; - protocolOutfits.emplace_back(gamemasterOutfitName, 75, 0); - - static const std::string gmCustomerSupport = "Customer Support"; - protocolOutfits.emplace_back(gmCustomerSupport, 266, 0); - - static const std::string communityManager = "Community Manager"; - protocolOutfits.emplace_back(communityManager, 302, 0); - } - const auto outfits = Outfits::getInstance().getOutfits(player->getSex()); protocolOutfits.reserve(outfits.size()); for (const auto &outfit : outfits) { diff --git a/src/server/network/protocol/protocolgame.hpp b/src/server/network/protocol/protocolgame.hpp index 0906f75e6..61c3aa19a 100644 --- a/src/server/network/protocol/protocolgame.hpp +++ b/src/server/network/protocol/protocolgame.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -28,6 +28,7 @@ class TaskHuntingSlot; class TaskHuntingOption; struct ModalWindow; +struct Achievement; using ProtocolGame_ptr = std::shared_ptr; @@ -317,7 +318,7 @@ class ProtocolGame final : public Protocol { void sendCyclopediaCharacterCombatStats(); void sendCyclopediaCharacterRecentDeaths(uint16_t page, uint16_t pages, const std::vector &entries); void sendCyclopediaCharacterRecentPvPKills(uint16_t page, uint16_t pages, const std::vector &entries); - void sendCyclopediaCharacterAchievements(); + void sendCyclopediaCharacterAchievements(uint16_t secretsUnlocked, std::vector> achievementsUnlocked); void sendCyclopediaCharacterItemSummary(); void sendCyclopediaCharacterOutfitsMounts(); void sendCyclopediaCharacterStoreSummary(); diff --git a/src/server/network/protocol/protocollogin.cpp b/src/server/network/protocol/protocollogin.cpp index 9efd5f753..4e38a7503 100644 --- a/src/server/network/protocol/protocollogin.cpp +++ b/src/server/network/protocol/protocollogin.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/network/protocol/protocollogin.hpp b/src/server/network/protocol/protocollogin.hpp index 367c4ccf1..6652a8562 100644 --- a/src/server/network/protocol/protocollogin.hpp +++ b/src/server/network/protocol/protocollogin.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/network/protocol/protocolstatus.cpp b/src/server/network/protocol/protocolstatus.cpp index 9c851e783..42e20da65 100644 --- a/src/server/network/protocol/protocolstatus.cpp +++ b/src/server/network/protocol/protocolstatus.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/network/protocol/protocolstatus.hpp b/src/server/network/protocol/protocolstatus.hpp index 36d83f77d..78b03a743 100644 --- a/src/server/network/protocol/protocolstatus.hpp +++ b/src/server/network/protocol/protocolstatus.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/network/webhook/webhook.cpp b/src/server/network/webhook/webhook.cpp index af801f558..57d4f607a 100644 --- a/src/server/network/webhook/webhook.cpp +++ b/src/server/network/webhook/webhook.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/network/webhook/webhook.hpp b/src/server/network/webhook/webhook.hpp index df414f24e..bae62a64c 100644 --- a/src/server/network/webhook/webhook.hpp +++ b/src/server/network/webhook/webhook.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/server.cpp b/src/server/server.cpp index a2c614293..2968033ba 100644 --- a/src/server/server.cpp +++ b/src/server/server.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/server.hpp b/src/server/server.hpp index ae6f805e4..054ec2607 100644 --- a/src/server/server.hpp +++ b/src/server/server.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/server_definitions.hpp b/src/server/server_definitions.hpp index 7b3c254e1..ad816b76b 100644 --- a/src/server/server_definitions.hpp +++ b/src/server/server_definitions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -112,16 +112,6 @@ enum Supply_Stash_Actions_t : uint8_t { SUPPLY_STASH_ACTION_WITHDRAW = 3 }; -// Structs -struct HighscoreCategory { - HighscoreCategory(const char* name, uint8_t id) : - name(name), - id(id) { } - - const char* name; - uint8_t id; -}; - struct HighscoreCharacter { HighscoreCharacter(std::string name, uint64_t points, uint32_t id, uint32_t rank, uint16_t level, uint8_t vocation) : name(std::move(name)), diff --git a/src/server/signals.cpp b/src/server/signals.cpp index 149554d3b..978b589eb 100644 --- a/src/server/signals.cpp +++ b/src/server/signals.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/server/signals.hpp b/src/server/signals.hpp index 88d7d037e..4d46e24e1 100644 --- a/src/server/signals.hpp +++ b/src/server/signals.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/utils/arraylist.hpp b/src/utils/arraylist.hpp index 94e05e2eb..da507e684 100644 --- a/src/utils/arraylist.hpp +++ b/src/utils/arraylist.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/utils/benchmark.hpp b/src/utils/benchmark.hpp index 7ec007cea..961547efc 100644 --- a/src/utils/benchmark.hpp +++ b/src/utils/benchmark.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/utils/const.hpp b/src/utils/const.hpp index c681d110c..c3f82df7f 100644 --- a/src/utils/const.hpp +++ b/src/utils/const.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/utils/definitions.hpp b/src/utils/definitions.hpp index af53e58ba..d557896f3 100644 --- a/src/utils/definitions.hpp +++ b/src/utils/definitions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/utils/pugicast.cpp b/src/utils/pugicast.cpp index 22c20f1e6..62717c336 100644 --- a/src/utils/pugicast.cpp +++ b/src/utils/pugicast.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/utils/pugicast.hpp b/src/utils/pugicast.hpp index 7e1a1ce99..d09532a2d 100644 --- a/src/utils/pugicast.hpp +++ b/src/utils/pugicast.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/utils/simd.hpp b/src/utils/simd.hpp index 9089fcfe0..3961d51e7 100644 --- a/src/utils/simd.hpp +++ b/src/utils/simd.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/utils/tools.cpp b/src/utils/tools.cpp index c7bccf2af..0d8b39a48 100644 --- a/src/utils/tools.cpp +++ b/src/utils/tools.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -1077,6 +1077,47 @@ std::string getWeaponName(WeaponType_t weaponType) { } } +WeaponType_t getWeaponType(const std::string &name) { + static const std::unordered_map type_mapping = { + { "none", WeaponType_t::WEAPON_NONE }, + { "sword", WeaponType_t::WEAPON_SWORD }, + { "club", WeaponType_t::WEAPON_CLUB }, + { "axe", WeaponType_t::WEAPON_AXE }, + { "shield", WeaponType_t::WEAPON_SHIELD }, + { "distance", WeaponType_t::WEAPON_DISTANCE }, + { "wand", WeaponType_t::WEAPON_WAND }, + { "ammo", WeaponType_t::WEAPON_AMMO }, + { "missile", WeaponType_t::WEAPON_MISSILE } + }; + + auto it = type_mapping.find(name); + if (it != type_mapping.end()) { + return it->second; + } + + return WEAPON_NONE; +} + +MoveEvent_t getMoveEventType(const std::string &name) { + static const std::unordered_map move_event_type_mapping = { + { "stepin", MOVE_EVENT_STEP_IN }, + { "stepout", MOVE_EVENT_STEP_OUT }, + { "equip", MOVE_EVENT_EQUIP }, + { "deequip", MOVE_EVENT_DEEQUIP }, + { "additem", MOVE_EVENT_ADD_ITEM }, + { "removeitem", MOVE_EVENT_REMOVE_ITEM }, + { "additemitemtile", MOVE_EVENT_ADD_ITEM_ITEMTILE }, + { "removeitemitemtile", MOVE_EVENT_REMOVE_ITEM_ITEMTILE } + }; + + auto it = move_event_type_mapping.find(name); + if (it != move_event_type_mapping.end()) { + return it->second; + } + + return MOVE_EVENT_NONE; +} + std::string getCombatName(CombatType_t combatType) { auto combatName = combatTypeNames.find(combatType); if (combatName != combatTypeNames.end()) { @@ -1203,6 +1244,15 @@ const char* getReturnMessage(ReturnValue value) { case RETURNVALUE_NOERROR: return "No error."; + case RETURNVALUE_NOTBOUGHTINSTORE: + return "You cannot move this item into your store inbox as it was not bought in the store."; + + case RETURNVALUE_ITEMCANNOTBEMOVEDPOUCH: + return "This item cannot be moved there. You can only place gold, platinum and crystal coins in your gold pouch."; + + case RETURNVALUE_ITEMCANNOTBEMOVEDTHERE: + return "This item cannot be moved there."; + case RETURNVALUE_REWARDCHESTISEMPTY: return "The chest is currently empty. You did not take part in any battles in the last seven days or already claimed your reward."; @@ -1769,11 +1819,11 @@ std::string getVerbForPronoun(PlayerPronoun_t pronoun, bool pastTense) { return pastTense ? "was" : "is"; } -std::vector split(const std::string &str) { +std::vector split(const std::string &str, char delimiter /* = ','*/) { std::vector tokens; std::string token; std::istringstream tokenStream(str); - while (std::getline(tokenStream, token, ',')) { + while (std::getline(tokenStream, token, delimiter)) { auto trimedToken = token; trimString(trimedToken); tokens.push_back(trimedToken); diff --git a/src/utils/tools.hpp b/src/utils/tools.hpp index 654c9d73c..769fb5d68 100644 --- a/src/utils/tools.hpp +++ b/src/utils/tools.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -108,6 +108,8 @@ std::string ucwords(std::string str); bool booleanString(const std::string &str); std::string getWeaponName(WeaponType_t weaponType); +WeaponType_t getWeaponType(const std::string &name); +MoveEvent_t getMoveEventType(const std::string &name); std::string getCombatName(CombatType_t combatType); CombatType_t getCombatTypeByName(const std::string &combatname); @@ -152,7 +154,7 @@ SpellGroup_t stringToSpellGroup(const std::string &value); uint8_t forgeBonus(int32_t number); std::string formatPrice(std::string price, bool space /* = false*/); -std::vector split(const std::string &str); +std::vector split(const std::string &str, char delimiter = ','); std::string getFormattedTimeRemaining(uint32_t time); unsigned int getNumberOfCores(); diff --git a/src/utils/utils_definitions.hpp b/src/utils/utils_definitions.hpp index 2d18849b3..af2c40ba5 100644 --- a/src/utils/utils_definitions.hpp +++ b/src/utils/utils_definitions.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors @@ -340,7 +340,7 @@ enum MessageClasses : uint8_t { /* Red message in the console*/ /* TALKTYPE_BROADCAST */ MESSAGE_LOGIN = 17, /* White message at the bottom of the game window and in the console*/ - MESSAGE_ADMINISTRADOR = 18, /* Red message in game window and in the console*/ + MESSAGE_ADMINISTRATOR = 18, /* Red message in game window and in the console*/ MESSAGE_EVENT_ADVANCE = 19, /* White message in game window and in the console*/ MESSAGE_GAME_HIGHLIGHT = 20, /* Red message in game window and in the console*/ MESSAGE_FAILURE = 21, /* White message at the bottom of the game window"*/ diff --git a/src/utils/vectorset.hpp b/src/utils/vectorset.hpp index dab8901bf..0f81ce396 100644 --- a/src/utils/vectorset.hpp +++ b/src/utils/vectorset.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/utils/vectorsort.hpp b/src/utils/vectorsort.hpp index 7069e5463..0a3618b96 100644 --- a/src/utils/vectorsort.hpp +++ b/src/utils/vectorsort.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/utils/wildcardtree.cpp b/src/utils/wildcardtree.cpp index 6ab174d7b..1e91b9b41 100644 --- a/src/utils/wildcardtree.cpp +++ b/src/utils/wildcardtree.cpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/src/utils/wildcardtree.hpp b/src/utils/wildcardtree.hpp index 1a614ede5..07728ae98 100644 --- a/src/utils/wildcardtree.hpp +++ b/src/utils/wildcardtree.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/tests/fixture/account/in_memory_account_repository.hpp b/tests/fixture/account/in_memory_account_repository.hpp index e390cd46d..40dbda38e 100644 --- a/tests/fixture/account/in_memory_account_repository.hpp +++ b/tests/fixture/account/in_memory_account_repository.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/tests/fixture/kv/in_memory_kv.hpp b/tests/fixture/kv/in_memory_kv.hpp index 84a84ba8d..60a99ed89 100644 --- a/tests/fixture/kv/in_memory_kv.hpp +++ b/tests/fixture/kv/in_memory_kv.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/tests/fixture/lib/logging/in_memory_logger.hpp b/tests/fixture/lib/logging/in_memory_logger.hpp index a6767a446..76f0e7307 100644 --- a/tests/fixture/lib/logging/in_memory_logger.hpp +++ b/tests/fixture/lib/logging/in_memory_logger.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/tests/unit/lib/logging/in_memory_logger.hpp b/tests/unit/lib/logging/in_memory_logger.hpp index f97f2ad40..0cfd0ef41 100644 --- a/tests/unit/lib/logging/in_memory_logger.hpp +++ b/tests/unit/lib/logging/in_memory_logger.hpp @@ -1,6 +1,6 @@ /** * Canary - A free and open-source MMORPG server emulator - * Copyright (©) 2019-2022 OpenTibiaBR + * Copyright (©) 2019-2024 OpenTibiaBR * Repository: https://github.com/opentibiabr/canary * License: https://github.com/opentibiabr/canary/blob/main/LICENSE * Contributors: https://github.com/opentibiabr/canary/graphs/contributors diff --git a/vcpkg.json b/vcpkg.json index 7201d4a55..82f1058bd 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -16,7 +16,10 @@ { "name": "opentelemetry-cpp", "default-features": true, - "features": ["otlp-http", "prometheus"] + "features": [ + "otlp-http", + "prometheus" + ] }, "parallel-hashmap", "protobuf", @@ -25,7 +28,9 @@ "zlib", { "name": "libmariadb", - "features": ["mariadbclient"] + "features": [ + "mariadbclient" + ] }, { "name": "gmp", @@ -36,5 +41,5 @@ "platform": "windows" } ], - "builtin-baseline": "98a562a04cd03728f399e79e1b37bcccb5a69b37" + "builtin-baseline": "095ee06e7f60dceef7d713e3f8b1c2eb10d650d7" } diff --git a/vcproj/otxserver.vcxproj b/vcproj/otxserver.vcxproj index e1481fc9c..4c161ed06 100644 --- a/vcproj/otxserver.vcxproj +++ b/vcproj/otxserver.vcxproj @@ -44,6 +44,7 @@ + @@ -255,6 +256,7 @@ + @@ -483,7 +485,7 @@ vcpkg_installed x64-windows - true + false false diff --git a/vcproj/settings.props b/vcproj/settings.props index 1f7471f48..35625d790 100644 --- a/vcproj/settings.props +++ b/vcproj/settings.props @@ -24,15 +24,28 @@ jsoncpp.lib; abseil_dll.lib; argon2.lib; - opentelemetry_common.lib; - opentelemetry_resources.lib; - opentelemetry_metrics.lib; - opentelemetry_exporter_ostream_metrics.lib; - opentelemetry_exporter_prometheus.lib; - prometheus-cpp-core.lib; - prometheus-cpp-pull.lib; - civetweb.lib; - civetweb-cpp.lib + opentelemetry_common.lib; + opentelemetry_exporter_in_memory.lib; + opentelemetry_exporter_ostream_logs.lib; + opentelemetry_exporter_ostream_metrics.lib; + opentelemetry_exporter_ostream_span.lib; + opentelemetry_exporter_otlp_http.lib; + opentelemetry_exporter_otlp_http_client.lib; + opentelemetry_exporter_otlp_http_log.lib; + opentelemetry_exporter_otlp_http_metric.lib; + opentelemetry_exporter_prometheus.lib; + opentelemetry_http_client_curl.lib; + opentelemetry_logs.lib; + opentelemetry_metrics.lib; + opentelemetry_otlp_recordable.lib; + opentelemetry_proto.lib; + opentelemetry_resources.lib; + opentelemetry_trace.lib; + opentelemetry_version.lib; + prometheus-cpp-core.lib; + prometheus-cpp-pull.lib; + civetweb.lib; + civetweb-cpp.lib comctl32.lib; @@ -50,15 +63,26 @@ jsoncpp.lib; abseil_dll.lib; argon2.lib; - opentelemetry_common.lib; - opentelemetry_resources.lib; - opentelemetry_metrics.lib; - opentelemetry_exporter_ostream_metrics.lib; - opentelemetry_exporter_prometheus.lib; - prometheus-cpp-core.lib; - prometheus-cpp-pull.lib; - civetweb.lib; - civetweb-cpp.lib + opentelemetry_common.lib; + opentelemetry_exporter_in_memory.lib; + opentelemetry_exporter_ostream_logs.lib; + opentelemetry_exporter_ostream_metrics.lib; + opentelemetry_exporter_ostream_span.lib; + opentelemetry_exporter_otlp_http.lib; + opentelemetry_exporter_otlp_http_client.lib; + opentelemetry_exporter_otlp_http_log.lib; + opentelemetry_exporter_otlp_http_metric.lib; + opentelemetry_exporter_prometheus.lib; + opentelemetry_http_client_curl.lib; + opentelemetry_logs.lib; + opentelemetry_metrics.lib; + opentelemetry_otlp_recordable.lib; + opentelemetry_proto.lib; + opentelemetry_resources.lib; + opentelemetry_trace.lib; + opentelemetry_version.lib; + civetweb.lib; + civetweb-cpp.lib