/* ReferentialMessageCore : Class to store referential to decode message Copyright (C) 2019 AleaJactaEst This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "modules/debug/debug.h" #include "referentialmessagecore.h" ReferentialMessageCore *ReferentialMessageCore::singleton = nullptr; /* * ElementReferential */ String get_command_name(uint32_t id) { switch (id) { case ReferentialMessageCore::Command::TARGET_PARTY: return "TARGET_PARTY"; case ReferentialMessageCore::Command::TARGET_INVENTORY: return "TARGET_INVENTORY"; case ReferentialMessageCore::Command::TARGET_FOLLOW: return "TARGET_FOLLOW"; case ReferentialMessageCore::Command::TARGET_NO_FOLLOW: return "TARGET_NO_FOLLOW"; case ReferentialMessageCore::Command::CONNECTION_USER_CHAR: return "CONNECTION_USER_CHAR"; case ReferentialMessageCore::Command::CONNECTION_NO_USER_CHAR: return "CONNECTION_NO_USER_CHAR"; case ReferentialMessageCore::Command::CONNECTION_USER_CHARS: return "CONNECTION_USER_CHARS"; case ReferentialMessageCore::Command::CONNECTION_CREATE_CHAR: return "CONNECTION_CREATE_CHAR"; case ReferentialMessageCore::Command::CONNECTION_SELECT_CHAR: return "CONNECTION_SELECT_CHAR"; case ReferentialMessageCore::Command::CONNECTION_DELETE_CHAR: return "CONNECTION_DELETE_CHAR"; case ReferentialMessageCore::Command::CONNECTION_RENAME_CHAR: return "CONNECTION_RENAME_CHAR"; case ReferentialMessageCore::Command::CONNECTION_ENTER: return "CONNECTION_ENTER"; case ReferentialMessageCore::Command::CONNECTION_READY: return "CONNECTION_READY"; case ReferentialMessageCore::Command::CONNECTION_TIME_DATE_SYNCHRO: return "CONNECTION_TIME_DATE_SYNCHRO"; case ReferentialMessageCore::Command::CONNECTION_ASK_NAME: return "CONNECTION_ASK_NAME"; case ReferentialMessageCore::Command::CONNECTION_VALID_NAME: return "CONNECTION_VALID_NAME"; case ReferentialMessageCore::Command::CONNECTION_CREATE_CHAR_ERROR: return "CONNECTION_CREATE_CHAR_ERROR"; case ReferentialMessageCore::Command::CONNECTION_RECONNECT: return "CONNECTION_RECONNECT"; case ReferentialMessageCore::Command::CONNECTION_SERVER_RECONNECT_OK: return "CONNECTION_SERVER_RECONNECT_OK"; case ReferentialMessageCore::Command::CONNECTION_SHARD_ID: return "CONNECTION_SHARD_ID"; case ReferentialMessageCore::Command::CONNECTION_SERVER_QUIT_OK: return "CONNECTION_SERVER_QUIT_OK"; case ReferentialMessageCore::Command::CONNECTION_SERVER_QUIT_ABORT: return "CONNECTION_SERVER_QUIT_ABORT"; case ReferentialMessageCore::Command::CONNECTION_CLIENT_QUIT_REQUEST: return "CONNECTION_CLIENT_QUIT_REQUEST"; case ReferentialMessageCore::Command::CONNECTION_MAIL_AVAILABLE: return "CONNECTION_MAIL_AVAILABLE"; case ReferentialMessageCore::Command::CONNECTION_GUILD_MESSAGE_AVAILABLE: return "CONNECTION_GUILD_MESSAGE_AVAILABLE"; case ReferentialMessageCore::Command::CONNECTION_PERMANENT_BAN: return "CONNECTION_PERMANENT_BAN"; case ReferentialMessageCore::Command::CONNECTION_UNBAN: return "CONNECTION_UNBAN"; case ReferentialMessageCore::Command::CONNECTION_FAR_TP: return "CONNECTION_FAR_TP"; case ReferentialMessageCore::Command::CONNECTION_RET_MAINLAND: return "CONNECTION_RET_MAINLAND"; case ReferentialMessageCore::Command::DB_UPD_PLR: return "DB_UPD_PLR"; case ReferentialMessageCore::Command::DB_UPD_INV: return "DB_UPD_INV"; case ReferentialMessageCore::Command::DB_INIT_PLR: return "DB_INIT_PLR"; case ReferentialMessageCore::Command::DB_INIT_INV: return "DB_INIT_INV"; case ReferentialMessageCore::Command::DB_GROUP_UPDATE_BANK: return "DB_GROUP_UPDATE_BANK"; case ReferentialMessageCore::Command::DB_GROUP_INIT_BANK: return "DB_GROUP_INIT_BANK"; case ReferentialMessageCore::Command::DB_GROUP_RESET_BANK: return "DB_GROUP_RESET_BANK"; case ReferentialMessageCore::Command::POSITION: return "POSITION"; case ReferentialMessageCore::Command::HARVEST_DEPOSIT: return "HARVEST_DEPOSIT"; case ReferentialMessageCore::Command::HARVEST_CORPSE: return "HARVEST_CORPSE"; case ReferentialMessageCore::Command::HARVEST_INTERRUPT: return "HARVEST_INTERRUPT"; case ReferentialMessageCore::Command::HARVEST_CLOSE_TEMP_INVENTORY: return "HARVEST_CLOSE_TEMP_INVENTORY"; case ReferentialMessageCore::Command::TRAINING: return "TRAINING"; case ReferentialMessageCore::Command::JOB_SET_JOB_STATUS: return "JOB_SET_JOB_STATUS"; case ReferentialMessageCore::Command::JOB_SWAP_JOB_STATUS: return "JOB_SWAP_JOB_STATUS"; case ReferentialMessageCore::Command::CASTING_BEGIN: return "CASTING_BEGIN"; case ReferentialMessageCore::Command::CASTING_INTERRUPT: return "CASTING_INTERRUPT"; case ReferentialMessageCore::Command::FABER_OPEN: return "FABER_OPEN"; case ReferentialMessageCore::Command::FABER_CLOSE: return "FABER_CLOSE"; case ReferentialMessageCore::Command::FABER_EXECUTE: return "FABER_EXECUTE"; case ReferentialMessageCore::Command::FABER_SET_NUM_ITEM: return "FABER_SET_NUM_ITEM"; case ReferentialMessageCore::Command::FABER_START_CREATE: return "FABER_START_CREATE"; case ReferentialMessageCore::Command::FABER_START_REPAIR: return "FABER_START_REPAIR"; case ReferentialMessageCore::Command::FABER_START_REFINE: return "FABER_START_REFINE"; case ReferentialMessageCore::Command::FABER_SET_MP_QUALITY: return "FABER_SET_MP_QUALITY"; case ReferentialMessageCore::Command::FABER_SET_MP_REFINE: return "FABER_SET_MP_REFINE"; case ReferentialMessageCore::Command::FABER_SET_TOOL: return "FABER_SET_TOOL"; case ReferentialMessageCore::Command::FABER_RESET_TOOL: return "FABER_RESET_TOOL"; case ReferentialMessageCore::Command::FABER_INTERRUPT: return "FABER_INTERRUPT"; case ReferentialMessageCore::Command::COMBAT_ENGAGE: return "COMBAT_ENGAGE"; case ReferentialMessageCore::Command::COMBAT_DISENGAGE: return "COMBAT_DISENGAGE"; case ReferentialMessageCore::Command::COMBAT_DEFAULT_ATTACK: return "COMBAT_DEFAULT_ATTACK"; case ReferentialMessageCore::Command::COMBAT_ENGAGE_FAILED: return "COMBAT_ENGAGE_FAILED"; case ReferentialMessageCore::Command::COMBAT_VALIDATE_MELEE: return "COMBAT_VALIDATE_MELEE"; case ReferentialMessageCore::Command::COMBAT_PARRY: return "COMBAT_PARRY"; case ReferentialMessageCore::Command::COMBAT_DODGE: return "COMBAT_DODGE"; case ReferentialMessageCore::Command::COMBAT_PROTECTED_SLOT: return "COMBAT_PROTECTED_SLOT"; case ReferentialMessageCore::Command::COMBAT_FLYING_ChaScore1_DELTA: return "COMBAT_FLYING_ChaScore1_DELTA"; case ReferentialMessageCore::Command::COMBAT_FLYING_TEXT_ISE: return "COMBAT_FLYING_TEXT_ISE"; case ReferentialMessageCore::Command::COMBAT_FLYING_TEXT: return "COMBAT_FLYING_TEXT"; case ReferentialMessageCore::Command::STRING_TELL: return "STRING_TELL"; case ReferentialMessageCore::Command::STRING_FAR_TELL: return "STRING_FAR_TELL"; case ReferentialMessageCore::Command::STRING_CHAT: return "STRING_CHAT"; case ReferentialMessageCore::Command::STRING_CHAT_TEAM: return "STRING_CHAT_TEAM"; case ReferentialMessageCore::Command::STRING_ADD_DYN_STR: return "STRING_ADD_DYN_STR"; case ReferentialMessageCore::Command::STRING_FILTER: return "STRING_FILTER"; case ReferentialMessageCore::Command::STRING_CHAT_MODE: return "STRING_CHAT_MODE"; case ReferentialMessageCore::Command::STRING_CHAT2: return "STRING_CHAT2"; case ReferentialMessageCore::Command::STRING_TELL2: return "STRING_TELL2"; case ReferentialMessageCore::Command::STRING_DYN_STRING: return "STRING_DYN_STRING"; case ReferentialMessageCore::Command::STRING_DYN_STRING_GROUP: return "STRING_DYN_STRING_GROUP"; case ReferentialMessageCore::Command::STRING_AFK_TXT: return "STRING_AFK_TXT"; case ReferentialMessageCore::Command::STUN_STUN: return "STUN_STUN"; case ReferentialMessageCore::Command::STUN_WAKE_UP: return "STUN_WAKE_UP"; case ReferentialMessageCore::Command::SENTENCE_EXECUTE: return "SENTENCE_EXECUTE"; case ReferentialMessageCore::Command::SENTENCE_CANCEL: return "SENTENCE_CANCEL"; case ReferentialMessageCore::Command::SENTENCE_CANCEL_CURRENT: return "SENTENCE_CANCEL_CURRENT"; case ReferentialMessageCore::Command::SENTENCE_CANCEL_ALL: return "SENTENCE_CANCEL_ALL"; case ReferentialMessageCore::Command::SENTENCE_CLEAR: return "SENTENCE_CLEAR"; case ReferentialMessageCore::Command::SENTENCE_MEMORIZE: return "SENTENCE_MEMORIZE"; case ReferentialMessageCore::Command::SENTENCE_FORGET: return "SENTENCE_FORGET"; case ReferentialMessageCore::Command::SENTENCE_EVALUATE: return "SENTENCE_EVALUATE"; case ReferentialMessageCore::Command::SENTENCE_ADD_BRICK: return "SENTENCE_ADD_BRICK"; case ReferentialMessageCore::Command::SENTENCE_REMOVE_BRICK: return "SENTENCE_REMOVE_BRICK"; case ReferentialMessageCore::Command::SENTENCE_START: return "SENTENCE_START"; case ReferentialMessageCore::Command::SENTENCE_STOP: return "SENTENCE_STOP"; case ReferentialMessageCore::Command::TEAM_JOIN: return "TEAM_JOIN"; case ReferentialMessageCore::Command::TEAM_LEAVE: return "TEAM_LEAVE"; case ReferentialMessageCore::Command::TEAM_INVITATION: return "TEAM_INVITATION"; case ReferentialMessageCore::Command::TEAM_JOIN_PROPOSAL: return "TEAM_JOIN_PROPOSAL"; case ReferentialMessageCore::Command::TEAM_JOIN_PROPOSAL_DECLINE: return "TEAM_JOIN_PROPOSAL_DECLINE"; case ReferentialMessageCore::Command::TEAM_KICK: return "TEAM_KICK"; case ReferentialMessageCore::Command::TEAM_SET_SUCCESSOR: return "TEAM_SET_SUCCESSOR"; case ReferentialMessageCore::Command::TEAM_SHARE_OPEN: return "TEAM_SHARE_OPEN"; case ReferentialMessageCore::Command::TEAM_SHARE_VALID_ITEM: return "TEAM_SHARE_VALID_ITEM"; case ReferentialMessageCore::Command::TEAM_SHARE_INVALID_ITEM: return "TEAM_SHARE_INVALID_ITEM"; case ReferentialMessageCore::Command::TEAM_SHARE_VALID: return "TEAM_SHARE_VALID"; case ReferentialMessageCore::Command::TEAM_SHARE_INVALID: return "TEAM_SHARE_INVALID"; case ReferentialMessageCore::Command::TEAM_SHARE_CLOSE: return "TEAM_SHARE_CLOSE"; case ReferentialMessageCore::Command::TEAM_CONTACT_INIT: return "TEAM_CONTACT_INIT"; case ReferentialMessageCore::Command::TEAM_CONTACT_ADD: return "TEAM_CONTACT_ADD"; case ReferentialMessageCore::Command::TEAM_CONTACT_DEL: return "TEAM_CONTACT_DEL"; case ReferentialMessageCore::Command::TEAM_CONTACT_MOVE: return "TEAM_CONTACT_MOVE"; case ReferentialMessageCore::Command::TEAM_CONTACT_CREATE: return "TEAM_CONTACT_CREATE"; case ReferentialMessageCore::Command::TEAM_CONTACT_STATUS: return "TEAM_CONTACT_STATUS"; case ReferentialMessageCore::Command::TEAM_CONTACT_REMOVE: return "TEAM_CONTACT_REMOVE"; case ReferentialMessageCore::Command::ITEM_DROP: return "ITEM_DROP"; case ReferentialMessageCore::Command::ITEM_PICK_UP: return "ITEM_PICK_UP"; case ReferentialMessageCore::Command::ITEM_PICK_UP_CLOSE: return "ITEM_PICK_UP_CLOSE"; case ReferentialMessageCore::Command::ITEM_SWAP: return "ITEM_SWAP"; case ReferentialMessageCore::Command::ITEM_ACTIVATE_SHEATH: return "ITEM_ACTIVATE_SHEATH"; case ReferentialMessageCore::Command::ITEM_HARVEST: return "ITEM_HARVEST"; case ReferentialMessageCore::Command::ITEM_HARVEST_CLOSE: return "ITEM_HARVEST_CLOSE"; case ReferentialMessageCore::Command::ITEM_GIVE: return "ITEM_GIVE"; case ReferentialMessageCore::Command::ITEM_DESTROY: return "ITEM_DESTROY"; case ReferentialMessageCore::Command::ITEM_EQUIP: return "ITEM_EQUIP"; case ReferentialMessageCore::Command::ITEM_UNEQUIP: return "ITEM_UNEQUIP"; case ReferentialMessageCore::Command::ITEM_TEMP_TO_BAG: return "ITEM_TEMP_TO_BAG"; case ReferentialMessageCore::Command::ITEM_ALL_TEMP: return "ITEM_ALL_TEMP"; case ReferentialMessageCore::Command::ITEM_NO_TEMP: return "ITEM_NO_TEMP"; case ReferentialMessageCore::Command::ITEM_ENCHANT: return "ITEM_ENCHANT"; case ReferentialMessageCore::Command::ITEM_OPEN_ROOM_INVENTORY: return "ITEM_OPEN_ROOM_INVENTORY"; case ReferentialMessageCore::Command::ITEM_CLOSE_ROOM_INVENTORY: return "ITEM_CLOSE_ROOM_INVENTORY"; case ReferentialMessageCore::Command::ITEM_USE_ITEM: return "ITEM_USE_ITEM"; case ReferentialMessageCore::Command::ITEM_STOP_USE_XP_CAT: return "ITEM_STOP_USE_XP_CAT"; case ReferentialMessageCore::Command::TP_RESPAWN: return "TP_RESPAWN"; case ReferentialMessageCore::Command::TP_BOT: return "TP_BOT"; case ReferentialMessageCore::Command::TP_WANTED: return "TP_WANTED"; case ReferentialMessageCore::Command::TP_DEST: return "TP_DEST"; case ReferentialMessageCore::Command::TP_DEST_WITH_SEASON: return "TP_DEST_WITH_SEASON"; case ReferentialMessageCore::Command::TP_ACK: return "TP_ACK"; case ReferentialMessageCore::Command::TP_CORRECT: return "TP_CORRECT"; case ReferentialMessageCore::Command::DEATH_RESPAWN_POINT: return "DEATH_RESPAWN_POINT"; case ReferentialMessageCore::Command::DEATH_ASK_RESPAWN: return "DEATH_ASK_RESPAWN"; case ReferentialMessageCore::Command::DEATH_RESPAWN: return "DEATH_RESPAWN"; case ReferentialMessageCore::Command::ANIMALS_BEAST: return "ANIMALS_BEAST"; case ReferentialMessageCore::Command::ANIMALS_MOUNT_ABORT: return "ANIMALS_MOUNT_ABORT"; case ReferentialMessageCore::Command::EXCHANGE_INVITATION: return "EXCHANGE_INVITATION"; case ReferentialMessageCore::Command::EXCHANGE_CLOSE_INVITATION: return "EXCHANGE_CLOSE_INVITATION"; case ReferentialMessageCore::Command::EXCHANGE_PROPOSAL: return "EXCHANGE_PROPOSAL"; case ReferentialMessageCore::Command::EXCHANGE_ACCEPT_INVITATION: return "EXCHANGE_ACCEPT_INVITATION"; case ReferentialMessageCore::Command::EXCHANGE_DECLINE_INVITATION: return "EXCHANGE_DECLINE_INVITATION"; case ReferentialMessageCore::Command::EXCHANGE_VALIDATE: return "EXCHANGE_VALIDATE"; case ReferentialMessageCore::Command::EXCHANGE_INVALIDATE: return "EXCHANGE_INVALIDATE"; case ReferentialMessageCore::Command::EXCHANGE_END: return "EXCHANGE_END"; case ReferentialMessageCore::Command::EXCHANGE_SEEDS: return "EXCHANGE_SEEDS"; case ReferentialMessageCore::Command::EXCHANGE_ADD: return "EXCHANGE_ADD"; case ReferentialMessageCore::Command::EXCHANGE_REMOVE: return "EXCHANGE_REMOVE"; case ReferentialMessageCore::Command::DEBUG_WHERE: return "DEBUG_WHERE"; case ReferentialMessageCore::Command::DEBUG_WHO: return "DEBUG_WHO"; case ReferentialMessageCore::Command::DEBUG_REPLY_WHERE: return "DEBUG_REPLY_WHERE"; case ReferentialMessageCore::Command::DEBUG_SERVICES: return "DEBUG_SERVICES"; case ReferentialMessageCore::Command::DEBUG_CMD: return "DEBUG_CMD"; case ReferentialMessageCore::Command::DEBUG_PING: return "DEBUG_PING"; case ReferentialMessageCore::Command::DEBUG_COUNTER: return "DEBUG_COUNTER"; case ReferentialMessageCore::Command::COMMAND_EMOTE: return "COMMAND_EMOTE"; case ReferentialMessageCore::Command::COMMAND_CUSTOM_EMOTE: return "COMMAND_CUSTOM_EMOTE"; case ReferentialMessageCore::Command::COMMAND_WHERE: return "COMMAND_WHERE"; case ReferentialMessageCore::Command::COMMAND_ADMIN: return "COMMAND_ADMIN"; case ReferentialMessageCore::Command::COMMAND_ADMIN_OFFLINE: return "COMMAND_ADMIN_OFFLINE"; case ReferentialMessageCore::Command::COMMAND_REMOTE_ADMIN: return "COMMAND_REMOTE_ADMIN"; case ReferentialMessageCore::Command::COMMAND_REMOTE_ADMIN_ANSWER: return "COMMAND_REMOTE_ADMIN_ANSWER"; case ReferentialMessageCore::Command::COMMAND_SIT: return "COMMAND_SIT"; case ReferentialMessageCore::Command::COMMAND_AFK: return "COMMAND_AFK"; case ReferentialMessageCore::Command::COMMAND_RANDOM: return "COMMAND_RANDOM"; case ReferentialMessageCore::Command::COMMAND_GUILDMOTD: return "COMMAND_GUILDMOTD"; case ReferentialMessageCore::Command::MP_EVAL_SET_MP: return "MP_EVAL_SET_MP"; case ReferentialMessageCore::Command::MP_EVAL_SET_MP_LEVEL: return "MP_EVAL_SET_MP_LEVEL"; case ReferentialMessageCore::Command::MP_EVAL_SET_MARKET: return "MP_EVAL_SET_MARKET"; case ReferentialMessageCore::Command::MP_EVAL_EXECUTE: return "MP_EVAL_EXECUTE"; case ReferentialMessageCore::Command::BOTCHAT_NEXT_PAGE_ITEM: return "BOTCHAT_NEXT_PAGE_ITEM"; case ReferentialMessageCore::Command::BOTCHAT_NEXT_PAGE_MISSION: return "BOTCHAT_NEXT_PAGE_MISSION"; case ReferentialMessageCore::Command::BOTCHAT_START_TRADE_ITEM: return "BOTCHAT_START_TRADE_ITEM"; case ReferentialMessageCore::Command::BOTCHAT_START_TRADE_TELEPORT: return "BOTCHAT_START_TRADE_TELEPORT"; case ReferentialMessageCore::Command::BOTCHAT_START_TRADE_FACTION: return "BOTCHAT_START_TRADE_FACTION"; case ReferentialMessageCore::Command::BOTCHAT_START_TRADE_SKILL: return "BOTCHAT_START_TRADE_SKILL"; case ReferentialMessageCore::Command::BOTCHAT_START_TRADE_PACT: return "BOTCHAT_START_TRADE_PACT"; case ReferentialMessageCore::Command::BOTCHAT_START_TRADE_ACTION: return "BOTCHAT_START_TRADE_ACTION"; case ReferentialMessageCore::Command::BOTCHAT_BUY: return "BOTCHAT_BUY"; case ReferentialMessageCore::Command::BOTCHAT_SELL: return "BOTCHAT_SELL"; case ReferentialMessageCore::Command::BOTCHAT_DESTROY_ITEM: return "BOTCHAT_DESTROY_ITEM"; case ReferentialMessageCore::Command::BOTCHAT_REFRESH_TRADE_LIST: return "BOTCHAT_REFRESH_TRADE_LIST"; case ReferentialMessageCore::Command::BOTCHAT_SET_FILTERS: return "BOTCHAT_SET_FILTERS"; case ReferentialMessageCore::Command::BOTCHAT_START_CHOOSE_MISSION: return "BOTCHAT_START_CHOOSE_MISSION"; case ReferentialMessageCore::Command::BOTCHAT_START_DYNAMIC_MISSION: return "BOTCHAT_START_DYNAMIC_MISSION"; case ReferentialMessageCore::Command::BOTCHAT_CONTINUE_MISSION: return "BOTCHAT_CONTINUE_MISSION"; case ReferentialMessageCore::Command::BOTCHAT_VALIDATE_PLAYER_GIFT: return "BOTCHAT_VALIDATE_PLAYER_GIFT"; case ReferentialMessageCore::Command::BOTCHAT_PICK_MISSION: return "BOTCHAT_PICK_MISSION"; case ReferentialMessageCore::Command::BOTCHAT_DM_CHOICE: return "BOTCHAT_DM_CHOICE"; case ReferentialMessageCore::Command::BOTCHAT_DM_ACCEPT: return "BOTCHAT_DM_ACCEPT"; case ReferentialMessageCore::Command::BOTCHAT_START_NEWS: return "BOTCHAT_START_NEWS"; case ReferentialMessageCore::Command::BOTCHAT_START_CREATE_GUILD: return "BOTCHAT_START_CREATE_GUILD"; case ReferentialMessageCore::Command::BOTCHAT_END: return "BOTCHAT_END"; case ReferentialMessageCore::Command::BOTCHAT_FORCE_END: return "BOTCHAT_FORCE_END"; case ReferentialMessageCore::Command::BOTCHAT_START_CHOOSE_DUTY: return "BOTCHAT_START_CHOOSE_DUTY"; case ReferentialMessageCore::Command::BOTCHAT_NEXT_PAGE_DUTY: return "BOTCHAT_NEXT_PAGE_DUTY"; case ReferentialMessageCore::Command::BOTCHAT_DUTY_APPLY: return "BOTCHAT_DUTY_APPLY"; case ReferentialMessageCore::Command::BOTCHAT_DUTY_CANCEL_APPLY: return "BOTCHAT_DUTY_CANCEL_APPLY"; case ReferentialMessageCore::Command::BOTCHAT_START_TRADE_GUILD_OPTIONS: return "BOTCHAT_START_TRADE_GUILD_OPTIONS"; case ReferentialMessageCore::Command::BOTCHAT_BUY_GUILD_OPTION: return "BOTCHAT_BUY_GUILD_OPTION"; case ReferentialMessageCore::Command::BOTCHAT_START_GUILD_RESEARCH: return "BOTCHAT_START_GUILD_RESEARCH"; case ReferentialMessageCore::Command::BOTCHAT_DESTROY_BUILDING: return "BOTCHAT_DESTROY_BUILDING"; case ReferentialMessageCore::Command::BOTCHAT_DYNCHAT_OPEN: return "BOTCHAT_DYNCHAT_OPEN"; case ReferentialMessageCore::Command::BOTCHAT_DYNCHAT_CLOSE: return "BOTCHAT_DYNCHAT_CLOSE"; case ReferentialMessageCore::Command::BOTCHAT_DYNCHAT_SEND: return "BOTCHAT_DYNCHAT_SEND"; case ReferentialMessageCore::Command::JOURNAL_INIT_COMPLETED_MISSIONS: return "JOURNAL_INIT_COMPLETED_MISSIONS"; case ReferentialMessageCore::Command::JOURNAL_UPDATE_COMPLETED_MISSIONS: return "JOURNAL_UPDATE_COMPLETED_MISSIONS"; case ReferentialMessageCore::Command::JOURNAL_MISSION_ABANDON: return "JOURNAL_MISSION_ABANDON"; case ReferentialMessageCore::Command::JOURNAL_GROUP_MISSION_ABANDON: return "JOURNAL_GROUP_MISSION_ABANDON"; case ReferentialMessageCore::Command::JOURNAL_ADD_COMPASS: return "JOURNAL_ADD_COMPASS"; case ReferentialMessageCore::Command::JOURNAL_ADD_COMPASS_BOT: return "JOURNAL_ADD_COMPASS_BOT"; case ReferentialMessageCore::Command::JOURNAL_REMOVE_COMPASS: return "JOURNAL_REMOVE_COMPASS"; case ReferentialMessageCore::Command::JOURNAL_REMOVE_COMPASS_BOT: return "JOURNAL_REMOVE_COMPASS_BOT"; case ReferentialMessageCore::Command::STRING_MANAGER_SET_LANGUAGE: return "STRING_MANAGER_SET_LANGUAGE"; case ReferentialMessageCore::Command::STRING_MANAGER_PHRASE_SEND: return "STRING_MANAGER_PHRASE_SEND"; case ReferentialMessageCore::Command::STRING_MANAGER_STRING_RQ: return "STRING_MANAGER_STRING_RQ"; case ReferentialMessageCore::Command::STRING_MANAGER_STRING_RESP: return "STRING_MANAGER_STRING_RESP"; case ReferentialMessageCore::Command::STRING_MANAGER_RELOAD_CACHE: return "STRING_MANAGER_RELOAD_CACHE"; case ReferentialMessageCore::Command::GUILD_CREATE: return "GUILD_CREATE"; case ReferentialMessageCore::Command::GUILD_ABORT_CREATION: return "GUILD_ABORT_CREATION"; case ReferentialMessageCore::Command::GUILD_OPEN_GUILD_WINDOW: return "GUILD_OPEN_GUILD_WINDOW"; case ReferentialMessageCore::Command::GUILD_INVITATION: return "GUILD_INVITATION"; case ReferentialMessageCore::Command::GUILD_ACCEPT_INVITATION: return "GUILD_ACCEPT_INVITATION"; case ReferentialMessageCore::Command::GUILD_REFUSE_INVITATION: return "GUILD_REFUSE_INVITATION"; case ReferentialMessageCore::Command::GUILD_JOIN_PROPOSAL: return "GUILD_JOIN_PROPOSAL"; case ReferentialMessageCore::Command::GUILD_SET_GRADE: return "GUILD_SET_GRADE"; case ReferentialMessageCore::Command::GUILD_SET_LEADER: return "GUILD_SET_LEADER"; case ReferentialMessageCore::Command::GUILD_KICK_MEMBER: return "GUILD_KICK_MEMBER"; case ReferentialMessageCore::Command::GUILD_TELEPORT: return "GUILD_TELEPORT"; case ReferentialMessageCore::Command::GUILD_ASCENSOR: return "GUILD_ASCENSOR"; case ReferentialMessageCore::Command::GUILD_FIRST_ASCENSOR_PAGE: return "GUILD_FIRST_ASCENSOR_PAGE"; case ReferentialMessageCore::Command::GUILD_NEXT_ASCENSOR_PAGE: return "GUILD_NEXT_ASCENSOR_PAGE"; case ReferentialMessageCore::Command::GUILD_LEAVE_ASCENSOR: return "GUILD_LEAVE_ASCENSOR"; case ReferentialMessageCore::Command::GUILD_QUIT: return "GUILD_QUIT"; case ReferentialMessageCore::Command::GUILD_SET_PLAYER_TITLE: return "GUILD_SET_PLAYER_TITLE"; case ReferentialMessageCore::Command::GUILD_UPDATE_PLAYER_TITLE: return "GUILD_UPDATE_PLAYER_TITLE"; case ReferentialMessageCore::Command::GUILD_USE_FEMALE_TITLES: return "GUILD_USE_FEMALE_TITLES"; case ReferentialMessageCore::Command::GUILD_PUT_MONEY: return "GUILD_PUT_MONEY"; case ReferentialMessageCore::Command::GUILD_TAKE_MONEY: return "GUILD_TAKE_MONEY"; case ReferentialMessageCore::Command::GUILD_OPEN_INVENTORY: return "GUILD_OPEN_INVENTORY"; case ReferentialMessageCore::Command::GUILD_CLOSE_INVENTORY: return "GUILD_CLOSE_INVENTORY"; case ReferentialMessageCore::Command::OUTPOST_GIVEUP_OUTPOST: return "OUTPOST_GIVEUP_OUTPOST"; case ReferentialMessageCore::Command::OUTPOST_SELECT: return "OUTPOST_SELECT"; case ReferentialMessageCore::Command::OUTPOST_UNSELECT: return "OUTPOST_UNSELECT"; case ReferentialMessageCore::Command::OUTPOST_DECLARE_WAR_START: return "OUTPOST_DECLARE_WAR_START"; case ReferentialMessageCore::Command::OUTPOST_DECLARE_WAR_ACK: return "OUTPOST_DECLARE_WAR_ACK"; case ReferentialMessageCore::Command::OUTPOST_DECLARE_WAR_VALIDATE: return "OUTPOST_DECLARE_WAR_VALIDATE"; case ReferentialMessageCore::Command::OUTPOST_SET_DEF_PERIOD: return "OUTPOST_SET_DEF_PERIOD"; case ReferentialMessageCore::Command::OUTPOST_SET_SQUAD: return "OUTPOST_SET_SQUAD"; case ReferentialMessageCore::Command::OUTPOST_SET_SQUAD_SPAWN: return "OUTPOST_SET_SQUAD_SPAWN"; case ReferentialMessageCore::Command::OUTPOST_INSERT_SQUAD: return "OUTPOST_INSERT_SQUAD"; case ReferentialMessageCore::Command::OUTPOST_REMOVE_SQUAD: return "OUTPOST_REMOVE_SQUAD"; case ReferentialMessageCore::Command::OUTPOST_SET_SQUAD_CAPITAL: return "OUTPOST_SET_SQUAD_CAPITAL"; case ReferentialMessageCore::Command::OUTPOST_CHOOSE_SIDE: return "OUTPOST_CHOOSE_SIDE"; case ReferentialMessageCore::Command::OUTPOST_SIDE_CHOSEN: return "OUTPOST_SIDE_CHOSEN"; case ReferentialMessageCore::Command::OUTPOST_BANISH_PLAYER: return "OUTPOST_BANISH_PLAYER"; case ReferentialMessageCore::Command::OUTPOST_BANISH_GUILD: return "OUTPOST_BANISH_GUILD"; case ReferentialMessageCore::Command::OUTPOST_BUY_BUILDING: return "OUTPOST_BUY_BUILDING"; case ReferentialMessageCore::Command::OUTPOST_DESTROY_BUILDING: return "OUTPOST_DESTROY_BUILDING"; case ReferentialMessageCore::Command::PHRASE_DELETE: return "PHRASE_DELETE"; case ReferentialMessageCore::Command::PHRASE_LEARN: return "PHRASE_LEARN"; case ReferentialMessageCore::Command::PHRASE_MEMORIZE: return "PHRASE_MEMORIZE"; case ReferentialMessageCore::Command::PHRASE_FORGET: return "PHRASE_FORGET"; case ReferentialMessageCore::Command::PHRASE_EXECUTE: return "PHRASE_EXECUTE"; case ReferentialMessageCore::Command::PHRASE_EXECUTE_CYCLIC: return "PHRASE_EXECUTE_CYCLIC"; case ReferentialMessageCore::Command::PHRASE_EXECUTE_FABER: return "PHRASE_EXECUTE_FABER"; case ReferentialMessageCore::Command::PHRASE_DOWNLOAD: return "PHRASE_DOWNLOAD"; case ReferentialMessageCore::Command::PHRASE_BUY: return "PHRASE_BUY"; case ReferentialMessageCore::Command::PHRASE_CONFIRM_BUY: return "PHRASE_CONFIRM_BUY"; case ReferentialMessageCore::Command::PHRASE_BUY_SHEET: return "PHRASE_BUY_SHEET"; case ReferentialMessageCore::Command::PHRASE_CANCEL_LINK: return "PHRASE_CANCEL_LINK"; case ReferentialMessageCore::Command::PHRASE_CANCEL_TOP: return "PHRASE_CANCEL_TOP"; case ReferentialMessageCore::Command::PHRASE_CANCEL_ALL: return "PHRASE_CANCEL_ALL"; case ReferentialMessageCore::Command::PHRASE_CRISTALIZE: return "PHRASE_CRISTALIZE"; case ReferentialMessageCore::Command::PHRASE_EXEC_CYCLIC_ACK: return "PHRASE_EXEC_CYCLIC_ACK"; case ReferentialMessageCore::Command::PHRASE_EXEC_NEXT_ACK: return "PHRASE_EXEC_NEXT_ACK"; case ReferentialMessageCore::Command::ITEM_INFO_GET: return "ITEM_INFO_GET"; case ReferentialMessageCore::Command::ITEM_INFO_SET: return "ITEM_INFO_SET"; case ReferentialMessageCore::Command::ITEM_INFO_REFRESH_VERSION: return "ITEM_INFO_REFRESH_VERSION"; case ReferentialMessageCore::Command::MISSION_PREREQ_GET: return "MISSION_PREREQ_GET"; case ReferentialMessageCore::Command::MISSION_PREREQ_SET: return "MISSION_PREREQ_SET"; case ReferentialMessageCore::Command::MISSION_ENTER_CRITICAL: return "MISSION_ENTER_CRITICAL"; case ReferentialMessageCore::Command::MISSION_ASK_ENTER_CRITICAL: return "MISSION_ASK_ENTER_CRITICAL"; case ReferentialMessageCore::Command::MISSION_CLOSE_ENTER_CRITICAL: return "MISSION_CLOSE_ENTER_CRITICAL"; case ReferentialMessageCore::Command::MISSION_WAKE: return "MISSION_WAKE"; case ReferentialMessageCore::Command::MISSION_GROUP_WAKE: return "MISSION_GROUP_WAKE"; case ReferentialMessageCore::Command::DUEL_ASK: return "DUEL_ASK"; case ReferentialMessageCore::Command::DUEL_ACCEPT: return "DUEL_ACCEPT"; case ReferentialMessageCore::Command::DUEL_REFUSE: return "DUEL_REFUSE"; case ReferentialMessageCore::Command::DUEL_ABANDON: return "DUEL_ABANDON"; case ReferentialMessageCore::Command::DUEL_INVITATION: return "DUEL_INVITATION"; case ReferentialMessageCore::Command::DUEL_CANCEL_INVITATION: return "DUEL_CANCEL_INVITATION"; case ReferentialMessageCore::Command::PVP_CHALLENGE_ASK: return "PVP_CHALLENGE_ASK"; case ReferentialMessageCore::Command::PVP_CHALLENGE_ACCEPT: return "PVP_CHALLENGE_ACCEPT"; case ReferentialMessageCore::Command::PVP_CHALLENGE_REFUSE: return "PVP_CHALLENGE_REFUSE"; case ReferentialMessageCore::Command::PVP_CHALLENGE_ABANDON: return "PVP_CHALLENGE_ABANDON"; case ReferentialMessageCore::Command::PVP_CHALLENGE_INVITATION: return "PVP_CHALLENGE_INVITATION"; case ReferentialMessageCore::Command::PVP_CHALLENGE_CANCEL_INVITATION: return "PVP_CHALLENGE_CANCEL_INVITATION"; case ReferentialMessageCore::Command::PVP_PVP_TAG: return "PVP_PVP_TAG"; case ReferentialMessageCore::Command::PVP_SET_NEUTRAL_ALLEGIANCE: return "PVP_SET_NEUTRAL_ALLEGIANCE"; case ReferentialMessageCore::Command::PVP_SET_NEUTRAL_ALLEGIANCE_GUILD: return "PVP_SET_NEUTRAL_ALLEGIANCE_GUILD"; case ReferentialMessageCore::Command::PVP_FACTION_PUSH_FACTION_WAR: return "PVP_FACTION_PUSH_FACTION_WAR"; case ReferentialMessageCore::Command::PVP_FACTION_POP_FACTION_WAR: return "PVP_FACTION_POP_FACTION_WAR"; case ReferentialMessageCore::Command::PVP_FACTION_FACTION_WARS: return "PVP_FACTION_FACTION_WARS"; case ReferentialMessageCore::Command::ENCYCLOPEDIA_UPDATE: return "ENCYCLOPEDIA_UPDATE"; case ReferentialMessageCore::Command::ENCYCLOPEDIA_INIT: return "ENCYCLOPEDIA_INIT"; case ReferentialMessageCore::Command::USER_BARS: return "USER_BARS"; case ReferentialMessageCore::Command::USER_POPUP: return "USER_POPUP"; case ReferentialMessageCore::Command::EVENT_SET_ITEM_CUSTOM_TEXT: return "EVENT_SET_ITEM_CUSTOM_TEXT"; case ReferentialMessageCore::Command::EVENT_DUMMY: return "EVENT_DUMMY"; case ReferentialMessageCore::Command::TOTEM_BUILD: return "TOTEM_BUILD"; case ReferentialMessageCore::Command::TOTEM_DUMMY: return "TOTEM_DUMMY"; case ReferentialMessageCore::Command::MODULE_GATEWAY_FEOPEN: return "MODULE_GATEWAY_FEOPEN"; case ReferentialMessageCore::Command::MODULE_GATEWAY_GATEWAY_MSG: return "MODULE_GATEWAY_GATEWAY_MSG"; case ReferentialMessageCore::Command::MODULE_GATEWAY_FECLOSE: return "MODULE_GATEWAY_FECLOSE"; case ReferentialMessageCore::Command::SEASON_SET: return "SEASON_SET"; case ReferentialMessageCore::Command::SEASON_DUMMY: return "SEASON_DUMMY"; case ReferentialMessageCore::Command::DM_GIFT_BEGIN: return "DM_GIFT_BEGIN"; case ReferentialMessageCore::Command::DM_GIFT_VALIDATE: return "DM_GIFT_VALIDATE"; case ReferentialMessageCore::Command::RING_MISSION_MISSION_RING_SELECT: return "RING_MISSION_MISSION_RING_SELECT"; case ReferentialMessageCore::Command::RING_MISSION_DSS_DOWN: return "RING_MISSION_DSS_DOWN"; case ReferentialMessageCore::Command::NPC_ICON_GET_DESC: return "NPC_ICON_GET_DESC"; case ReferentialMessageCore::Command::NPC_ICON_SET_DESC: return "NPC_ICON_SET_DESC"; case ReferentialMessageCore::Command::NPC_ICON_SVR_EVENT_MIS_AVL: return "NPC_ICON_SVR_EVENT_MIS_AVL"; case ReferentialMessageCore::Command::NPC_ICON_SET_TIMER: return "NPC_ICON_SET_TIMER"; case ReferentialMessageCore::Command::__LAST_ELEMENT: return "__LAST_ELEMENT"; default: return "?"; } } void ElementReferential::show(int level, int pos) { String a; for(int i=0;iprint("[%s:%d] level:%d %s pos:%3d ------ power:%d\n", __FILE__, __LINE__, level, a.ascii().get_data(), pos, _power2); DBG_PRINT("level:" + itos(level) + " " + a + " id:" + get_command_name(_id) + " pos:" + itos(pos) + " ------ power:" + itos(_power2)); } else { DBG_PRINT("level:" + itos(level) + " " + a + " pos:" + itos(pos) + " id:" + get_command_name(_id)); } level ++; for(int i=0;i<_children.size();++i) { Ref child = _children[i]; child->show(level, i); } } /* * ReferentialMessageCore */ void ReferentialMessageCore::_bind_methods() { BIND_ENUM_CONSTANT(TARGET_PARTY); BIND_ENUM_CONSTANT(TARGET_INVENTORY); BIND_ENUM_CONSTANT(TARGET_FOLLOW); BIND_ENUM_CONSTANT(TARGET_NO_FOLLOW); BIND_ENUM_CONSTANT(CONNECTION_USER_CHAR); BIND_ENUM_CONSTANT(CONNECTION_NO_USER_CHAR); BIND_ENUM_CONSTANT(CONNECTION_USER_CHARS); BIND_ENUM_CONSTANT(CONNECTION_CREATE_CHAR); BIND_ENUM_CONSTANT(CONNECTION_SELECT_CHAR); BIND_ENUM_CONSTANT(CONNECTION_DELETE_CHAR); BIND_ENUM_CONSTANT(CONNECTION_RENAME_CHAR); BIND_ENUM_CONSTANT(CONNECTION_ENTER); BIND_ENUM_CONSTANT(CONNECTION_READY); BIND_ENUM_CONSTANT(CONNECTION_TIME_DATE_SYNCHRO); BIND_ENUM_CONSTANT(CONNECTION_ASK_NAME); BIND_ENUM_CONSTANT(CONNECTION_VALID_NAME); BIND_ENUM_CONSTANT(CONNECTION_CREATE_CHAR_ERROR); BIND_ENUM_CONSTANT(CONNECTION_RECONNECT); BIND_ENUM_CONSTANT(CONNECTION_SERVER_RECONNECT_OK); BIND_ENUM_CONSTANT(CONNECTION_SHARD_ID); BIND_ENUM_CONSTANT(CONNECTION_SERVER_QUIT_OK); BIND_ENUM_CONSTANT(CONNECTION_SERVER_QUIT_ABORT); BIND_ENUM_CONSTANT(CONNECTION_CLIENT_QUIT_REQUEST); BIND_ENUM_CONSTANT(CONNECTION_MAIL_AVAILABLE); BIND_ENUM_CONSTANT(CONNECTION_GUILD_MESSAGE_AVAILABLE); BIND_ENUM_CONSTANT(CONNECTION_PERMANENT_BAN); BIND_ENUM_CONSTANT(CONNECTION_UNBAN); BIND_ENUM_CONSTANT(CONNECTION_FAR_TP); BIND_ENUM_CONSTANT(CONNECTION_RET_MAINLAND); BIND_ENUM_CONSTANT(DB_UPD_PLR); BIND_ENUM_CONSTANT(DB_UPD_INV); BIND_ENUM_CONSTANT(DB_INIT_PLR); BIND_ENUM_CONSTANT(DB_INIT_INV); BIND_ENUM_CONSTANT(DB_GROUP_UPDATE_BANK); BIND_ENUM_CONSTANT(DB_GROUP_INIT_BANK); BIND_ENUM_CONSTANT(DB_GROUP_RESET_BANK); BIND_ENUM_CONSTANT(POSITION); BIND_ENUM_CONSTANT(HARVEST_DEPOSIT); BIND_ENUM_CONSTANT(HARVEST_CORPSE); BIND_ENUM_CONSTANT(HARVEST_INTERRUPT); BIND_ENUM_CONSTANT(HARVEST_CLOSE_TEMP_INVENTORY); BIND_ENUM_CONSTANT(TRAINING); BIND_ENUM_CONSTANT(JOB_SET_JOB_STATUS); BIND_ENUM_CONSTANT(JOB_SWAP_JOB_STATUS); BIND_ENUM_CONSTANT(CASTING_BEGIN); BIND_ENUM_CONSTANT(CASTING_INTERRUPT); BIND_ENUM_CONSTANT(FABER_OPEN); BIND_ENUM_CONSTANT(FABER_CLOSE); BIND_ENUM_CONSTANT(FABER_EXECUTE); BIND_ENUM_CONSTANT(FABER_SET_NUM_ITEM); BIND_ENUM_CONSTANT(FABER_START_CREATE); BIND_ENUM_CONSTANT(FABER_START_REPAIR); BIND_ENUM_CONSTANT(FABER_START_REFINE); BIND_ENUM_CONSTANT(FABER_SET_MP_QUALITY); BIND_ENUM_CONSTANT(FABER_SET_MP_REFINE); BIND_ENUM_CONSTANT(FABER_SET_TOOL); BIND_ENUM_CONSTANT(FABER_RESET_TOOL); BIND_ENUM_CONSTANT(FABER_INTERRUPT); BIND_ENUM_CONSTANT(COMBAT_ENGAGE); BIND_ENUM_CONSTANT(COMBAT_DISENGAGE); BIND_ENUM_CONSTANT(COMBAT_DEFAULT_ATTACK); BIND_ENUM_CONSTANT(COMBAT_ENGAGE_FAILED); BIND_ENUM_CONSTANT(COMBAT_VALIDATE_MELEE); BIND_ENUM_CONSTANT(COMBAT_PARRY); BIND_ENUM_CONSTANT(COMBAT_DODGE); BIND_ENUM_CONSTANT(COMBAT_PROTECTED_SLOT); BIND_ENUM_CONSTANT(COMBAT_FLYING_ChaScore1_DELTA); BIND_ENUM_CONSTANT(COMBAT_FLYING_TEXT_ISE); BIND_ENUM_CONSTANT(COMBAT_FLYING_TEXT); BIND_ENUM_CONSTANT(STRING_TELL); BIND_ENUM_CONSTANT(STRING_FAR_TELL); BIND_ENUM_CONSTANT(STRING_CHAT); BIND_ENUM_CONSTANT(STRING_CHAT_TEAM); BIND_ENUM_CONSTANT(STRING_ADD_DYN_STR); BIND_ENUM_CONSTANT(STRING_FILTER); BIND_ENUM_CONSTANT(STRING_CHAT_MODE); BIND_ENUM_CONSTANT(STRING_CHAT2); BIND_ENUM_CONSTANT(STRING_TELL2); BIND_ENUM_CONSTANT(STRING_DYN_STRING); BIND_ENUM_CONSTANT(STRING_DYN_STRING_GROUP); BIND_ENUM_CONSTANT(STRING_AFK_TXT); BIND_ENUM_CONSTANT(STUN_STUN); BIND_ENUM_CONSTANT(STUN_WAKE_UP); BIND_ENUM_CONSTANT(SENTENCE_EXECUTE); BIND_ENUM_CONSTANT(SENTENCE_CANCEL); BIND_ENUM_CONSTANT(SENTENCE_CANCEL_CURRENT); BIND_ENUM_CONSTANT(SENTENCE_CANCEL_ALL); BIND_ENUM_CONSTANT(SENTENCE_CLEAR); BIND_ENUM_CONSTANT(SENTENCE_MEMORIZE); BIND_ENUM_CONSTANT(SENTENCE_FORGET); BIND_ENUM_CONSTANT(SENTENCE_EVALUATE); BIND_ENUM_CONSTANT(SENTENCE_ADD_BRICK); BIND_ENUM_CONSTANT(SENTENCE_REMOVE_BRICK); BIND_ENUM_CONSTANT(SENTENCE_START); BIND_ENUM_CONSTANT(SENTENCE_STOP); BIND_ENUM_CONSTANT(TEAM_JOIN); BIND_ENUM_CONSTANT(TEAM_LEAVE); BIND_ENUM_CONSTANT(TEAM_INVITATION); BIND_ENUM_CONSTANT(TEAM_JOIN_PROPOSAL); BIND_ENUM_CONSTANT(TEAM_JOIN_PROPOSAL_DECLINE); BIND_ENUM_CONSTANT(TEAM_KICK); BIND_ENUM_CONSTANT(TEAM_SET_SUCCESSOR); BIND_ENUM_CONSTANT(TEAM_SHARE_OPEN); BIND_ENUM_CONSTANT(TEAM_SHARE_VALID_ITEM); BIND_ENUM_CONSTANT(TEAM_SHARE_INVALID_ITEM); BIND_ENUM_CONSTANT(TEAM_SHARE_VALID); BIND_ENUM_CONSTANT(TEAM_SHARE_INVALID); BIND_ENUM_CONSTANT(TEAM_SHARE_CLOSE); BIND_ENUM_CONSTANT(TEAM_CONTACT_INIT); BIND_ENUM_CONSTANT(TEAM_CONTACT_ADD); BIND_ENUM_CONSTANT(TEAM_CONTACT_DEL); BIND_ENUM_CONSTANT(TEAM_CONTACT_MOVE); BIND_ENUM_CONSTANT(TEAM_CONTACT_CREATE); BIND_ENUM_CONSTANT(TEAM_CONTACT_STATUS); BIND_ENUM_CONSTANT(TEAM_CONTACT_REMOVE); BIND_ENUM_CONSTANT(ITEM_DROP); BIND_ENUM_CONSTANT(ITEM_PICK_UP); BIND_ENUM_CONSTANT(ITEM_PICK_UP_CLOSE); BIND_ENUM_CONSTANT(ITEM_SWAP); BIND_ENUM_CONSTANT(ITEM_ACTIVATE_SHEATH); BIND_ENUM_CONSTANT(ITEM_HARVEST); BIND_ENUM_CONSTANT(ITEM_HARVEST_CLOSE); BIND_ENUM_CONSTANT(ITEM_GIVE); BIND_ENUM_CONSTANT(ITEM_DESTROY); BIND_ENUM_CONSTANT(ITEM_EQUIP); BIND_ENUM_CONSTANT(ITEM_UNEQUIP); BIND_ENUM_CONSTANT(ITEM_TEMP_TO_BAG); BIND_ENUM_CONSTANT(ITEM_ALL_TEMP); BIND_ENUM_CONSTANT(ITEM_NO_TEMP); BIND_ENUM_CONSTANT(ITEM_ENCHANT); BIND_ENUM_CONSTANT(ITEM_OPEN_ROOM_INVENTORY); BIND_ENUM_CONSTANT(ITEM_CLOSE_ROOM_INVENTORY); BIND_ENUM_CONSTANT(ITEM_USE_ITEM); BIND_ENUM_CONSTANT(ITEM_STOP_USE_XP_CAT); BIND_ENUM_CONSTANT(TP_RESPAWN); BIND_ENUM_CONSTANT(TP_BOT); BIND_ENUM_CONSTANT(TP_WANTED); BIND_ENUM_CONSTANT(TP_DEST); BIND_ENUM_CONSTANT(TP_DEST_WITH_SEASON); BIND_ENUM_CONSTANT(TP_ACK); BIND_ENUM_CONSTANT(TP_CORRECT); BIND_ENUM_CONSTANT(DEATH_RESPAWN_POINT); BIND_ENUM_CONSTANT(DEATH_ASK_RESPAWN); BIND_ENUM_CONSTANT(DEATH_RESPAWN); BIND_ENUM_CONSTANT(ANIMALS_BEAST); BIND_ENUM_CONSTANT(ANIMALS_MOUNT_ABORT); BIND_ENUM_CONSTANT(EXCHANGE_INVITATION); BIND_ENUM_CONSTANT(EXCHANGE_CLOSE_INVITATION); BIND_ENUM_CONSTANT(EXCHANGE_PROPOSAL); BIND_ENUM_CONSTANT(EXCHANGE_ACCEPT_INVITATION); BIND_ENUM_CONSTANT(EXCHANGE_DECLINE_INVITATION); BIND_ENUM_CONSTANT(EXCHANGE_VALIDATE); BIND_ENUM_CONSTANT(EXCHANGE_INVALIDATE); BIND_ENUM_CONSTANT(EXCHANGE_END); BIND_ENUM_CONSTANT(EXCHANGE_SEEDS); BIND_ENUM_CONSTANT(EXCHANGE_ADD); BIND_ENUM_CONSTANT(EXCHANGE_REMOVE); BIND_ENUM_CONSTANT(DEBUG_WHERE); BIND_ENUM_CONSTANT(DEBUG_WHO); BIND_ENUM_CONSTANT(DEBUG_REPLY_WHERE); BIND_ENUM_CONSTANT(DEBUG_SERVICES); BIND_ENUM_CONSTANT(DEBUG_CMD); BIND_ENUM_CONSTANT(DEBUG_PING); BIND_ENUM_CONSTANT(DEBUG_COUNTER); BIND_ENUM_CONSTANT(COMMAND_EMOTE); BIND_ENUM_CONSTANT(COMMAND_CUSTOM_EMOTE); BIND_ENUM_CONSTANT(COMMAND_WHERE); BIND_ENUM_CONSTANT(COMMAND_ADMIN); BIND_ENUM_CONSTANT(COMMAND_ADMIN_OFFLINE); BIND_ENUM_CONSTANT(COMMAND_REMOTE_ADMIN); BIND_ENUM_CONSTANT(COMMAND_REMOTE_ADMIN_ANSWER); BIND_ENUM_CONSTANT(COMMAND_SIT); BIND_ENUM_CONSTANT(COMMAND_AFK); BIND_ENUM_CONSTANT(COMMAND_RANDOM); BIND_ENUM_CONSTANT(COMMAND_GUILDMOTD); BIND_ENUM_CONSTANT(MP_EVAL_SET_MP); BIND_ENUM_CONSTANT(MP_EVAL_SET_MP_LEVEL); BIND_ENUM_CONSTANT(MP_EVAL_SET_MARKET); BIND_ENUM_CONSTANT(MP_EVAL_EXECUTE); BIND_ENUM_CONSTANT(BOTCHAT_NEXT_PAGE_ITEM); BIND_ENUM_CONSTANT(BOTCHAT_NEXT_PAGE_MISSION); BIND_ENUM_CONSTANT(BOTCHAT_START_TRADE_ITEM); BIND_ENUM_CONSTANT(BOTCHAT_START_TRADE_TELEPORT); BIND_ENUM_CONSTANT(BOTCHAT_START_TRADE_FACTION); BIND_ENUM_CONSTANT(BOTCHAT_START_TRADE_SKILL); BIND_ENUM_CONSTANT(BOTCHAT_START_TRADE_PACT); BIND_ENUM_CONSTANT(BOTCHAT_START_TRADE_ACTION); BIND_ENUM_CONSTANT(BOTCHAT_BUY); BIND_ENUM_CONSTANT(BOTCHAT_SELL); BIND_ENUM_CONSTANT(BOTCHAT_DESTROY_ITEM); BIND_ENUM_CONSTANT(BOTCHAT_REFRESH_TRADE_LIST); BIND_ENUM_CONSTANT(BOTCHAT_SET_FILTERS); BIND_ENUM_CONSTANT(BOTCHAT_START_CHOOSE_MISSION); BIND_ENUM_CONSTANT(BOTCHAT_START_DYNAMIC_MISSION); BIND_ENUM_CONSTANT(BOTCHAT_CONTINUE_MISSION); BIND_ENUM_CONSTANT(BOTCHAT_VALIDATE_PLAYER_GIFT); BIND_ENUM_CONSTANT(BOTCHAT_PICK_MISSION); BIND_ENUM_CONSTANT(BOTCHAT_DM_CHOICE); BIND_ENUM_CONSTANT(BOTCHAT_DM_ACCEPT); BIND_ENUM_CONSTANT(BOTCHAT_START_NEWS); BIND_ENUM_CONSTANT(BOTCHAT_START_CREATE_GUILD); BIND_ENUM_CONSTANT(BOTCHAT_END); BIND_ENUM_CONSTANT(BOTCHAT_FORCE_END); BIND_ENUM_CONSTANT(BOTCHAT_START_CHOOSE_DUTY); BIND_ENUM_CONSTANT(BOTCHAT_NEXT_PAGE_DUTY); BIND_ENUM_CONSTANT(BOTCHAT_DUTY_APPLY); BIND_ENUM_CONSTANT(BOTCHAT_DUTY_CANCEL_APPLY); BIND_ENUM_CONSTANT(BOTCHAT_START_TRADE_GUILD_OPTIONS); BIND_ENUM_CONSTANT(BOTCHAT_BUY_GUILD_OPTION); BIND_ENUM_CONSTANT(BOTCHAT_START_GUILD_RESEARCH); BIND_ENUM_CONSTANT(BOTCHAT_DESTROY_BUILDING); BIND_ENUM_CONSTANT(BOTCHAT_DYNCHAT_OPEN); BIND_ENUM_CONSTANT(BOTCHAT_DYNCHAT_CLOSE); BIND_ENUM_CONSTANT(BOTCHAT_DYNCHAT_SEND); BIND_ENUM_CONSTANT(JOURNAL_INIT_COMPLETED_MISSIONS); BIND_ENUM_CONSTANT(JOURNAL_UPDATE_COMPLETED_MISSIONS); BIND_ENUM_CONSTANT(JOURNAL_MISSION_ABANDON); BIND_ENUM_CONSTANT(JOURNAL_GROUP_MISSION_ABANDON); BIND_ENUM_CONSTANT(JOURNAL_ADD_COMPASS); BIND_ENUM_CONSTANT(JOURNAL_ADD_COMPASS_BOT); BIND_ENUM_CONSTANT(JOURNAL_REMOVE_COMPASS); BIND_ENUM_CONSTANT(JOURNAL_REMOVE_COMPASS_BOT); BIND_ENUM_CONSTANT(STRING_MANAGER_SET_LANGUAGE); BIND_ENUM_CONSTANT(STRING_MANAGER_PHRASE_SEND); BIND_ENUM_CONSTANT(STRING_MANAGER_STRING_RQ); BIND_ENUM_CONSTANT(STRING_MANAGER_STRING_RESP); BIND_ENUM_CONSTANT(STRING_MANAGER_RELOAD_CACHE); BIND_ENUM_CONSTANT(GUILD_CREATE); BIND_ENUM_CONSTANT(GUILD_ABORT_CREATION); BIND_ENUM_CONSTANT(GUILD_OPEN_GUILD_WINDOW); BIND_ENUM_CONSTANT(GUILD_INVITATION); BIND_ENUM_CONSTANT(GUILD_ACCEPT_INVITATION); BIND_ENUM_CONSTANT(GUILD_REFUSE_INVITATION); BIND_ENUM_CONSTANT(GUILD_JOIN_PROPOSAL); BIND_ENUM_CONSTANT(GUILD_SET_GRADE); BIND_ENUM_CONSTANT(GUILD_SET_LEADER); BIND_ENUM_CONSTANT(GUILD_KICK_MEMBER); BIND_ENUM_CONSTANT(GUILD_TELEPORT); BIND_ENUM_CONSTANT(GUILD_ASCENSOR); BIND_ENUM_CONSTANT(GUILD_FIRST_ASCENSOR_PAGE); BIND_ENUM_CONSTANT(GUILD_NEXT_ASCENSOR_PAGE); BIND_ENUM_CONSTANT(GUILD_LEAVE_ASCENSOR); BIND_ENUM_CONSTANT(GUILD_QUIT); BIND_ENUM_CONSTANT(GUILD_SET_PLAYER_TITLE); BIND_ENUM_CONSTANT(GUILD_UPDATE_PLAYER_TITLE); BIND_ENUM_CONSTANT(GUILD_USE_FEMALE_TITLES); BIND_ENUM_CONSTANT(GUILD_PUT_MONEY); BIND_ENUM_CONSTANT(GUILD_TAKE_MONEY); BIND_ENUM_CONSTANT(GUILD_OPEN_INVENTORY); BIND_ENUM_CONSTANT(GUILD_CLOSE_INVENTORY); BIND_ENUM_CONSTANT(OUTPOST_GIVEUP_OUTPOST); BIND_ENUM_CONSTANT(OUTPOST_SELECT); BIND_ENUM_CONSTANT(OUTPOST_UNSELECT); BIND_ENUM_CONSTANT(OUTPOST_DECLARE_WAR_START); BIND_ENUM_CONSTANT(OUTPOST_DECLARE_WAR_ACK); BIND_ENUM_CONSTANT(OUTPOST_DECLARE_WAR_VALIDATE); BIND_ENUM_CONSTANT(OUTPOST_SET_DEF_PERIOD); BIND_ENUM_CONSTANT(OUTPOST_SET_SQUAD); BIND_ENUM_CONSTANT(OUTPOST_SET_SQUAD_SPAWN); BIND_ENUM_CONSTANT(OUTPOST_INSERT_SQUAD); BIND_ENUM_CONSTANT(OUTPOST_REMOVE_SQUAD); BIND_ENUM_CONSTANT(OUTPOST_SET_SQUAD_CAPITAL); BIND_ENUM_CONSTANT(OUTPOST_CHOOSE_SIDE); BIND_ENUM_CONSTANT(OUTPOST_SIDE_CHOSEN); BIND_ENUM_CONSTANT(OUTPOST_BANISH_PLAYER); BIND_ENUM_CONSTANT(OUTPOST_BANISH_GUILD); BIND_ENUM_CONSTANT(OUTPOST_BUY_BUILDING); BIND_ENUM_CONSTANT(OUTPOST_DESTROY_BUILDING); BIND_ENUM_CONSTANT(PHRASE_DELETE); BIND_ENUM_CONSTANT(PHRASE_LEARN); BIND_ENUM_CONSTANT(PHRASE_MEMORIZE); BIND_ENUM_CONSTANT(PHRASE_FORGET); BIND_ENUM_CONSTANT(PHRASE_EXECUTE); BIND_ENUM_CONSTANT(PHRASE_EXECUTE_CYCLIC); BIND_ENUM_CONSTANT(PHRASE_EXECUTE_FABER); BIND_ENUM_CONSTANT(PHRASE_DOWNLOAD); BIND_ENUM_CONSTANT(PHRASE_BUY); BIND_ENUM_CONSTANT(PHRASE_CONFIRM_BUY); BIND_ENUM_CONSTANT(PHRASE_BUY_SHEET); BIND_ENUM_CONSTANT(PHRASE_CANCEL_LINK); BIND_ENUM_CONSTANT(PHRASE_CANCEL_TOP); BIND_ENUM_CONSTANT(PHRASE_CANCEL_ALL); BIND_ENUM_CONSTANT(PHRASE_CRISTALIZE); BIND_ENUM_CONSTANT(PHRASE_EXEC_CYCLIC_ACK); BIND_ENUM_CONSTANT(PHRASE_EXEC_NEXT_ACK); BIND_ENUM_CONSTANT(ITEM_INFO_GET); BIND_ENUM_CONSTANT(ITEM_INFO_SET); BIND_ENUM_CONSTANT(ITEM_INFO_REFRESH_VERSION); BIND_ENUM_CONSTANT(MISSION_PREREQ_GET); BIND_ENUM_CONSTANT(MISSION_PREREQ_SET); BIND_ENUM_CONSTANT(MISSION_ENTER_CRITICAL); BIND_ENUM_CONSTANT(MISSION_ASK_ENTER_CRITICAL); BIND_ENUM_CONSTANT(MISSION_CLOSE_ENTER_CRITICAL); BIND_ENUM_CONSTANT(MISSION_WAKE); BIND_ENUM_CONSTANT(MISSION_GROUP_WAKE); BIND_ENUM_CONSTANT(DUEL_ASK); BIND_ENUM_CONSTANT(DUEL_ACCEPT); BIND_ENUM_CONSTANT(DUEL_REFUSE); BIND_ENUM_CONSTANT(DUEL_ABANDON); BIND_ENUM_CONSTANT(DUEL_INVITATION); BIND_ENUM_CONSTANT(DUEL_CANCEL_INVITATION); BIND_ENUM_CONSTANT(PVP_CHALLENGE_ASK); BIND_ENUM_CONSTANT(PVP_CHALLENGE_ACCEPT); BIND_ENUM_CONSTANT(PVP_CHALLENGE_REFUSE); BIND_ENUM_CONSTANT(PVP_CHALLENGE_ABANDON); BIND_ENUM_CONSTANT(PVP_CHALLENGE_INVITATION); BIND_ENUM_CONSTANT(PVP_CHALLENGE_CANCEL_INVITATION); BIND_ENUM_CONSTANT(PVP_PVP_TAG); BIND_ENUM_CONSTANT(PVP_SET_NEUTRAL_ALLEGIANCE); BIND_ENUM_CONSTANT(PVP_SET_NEUTRAL_ALLEGIANCE_GUILD); BIND_ENUM_CONSTANT(PVP_FACTION_PUSH_FACTION_WAR); BIND_ENUM_CONSTANT(PVP_FACTION_POP_FACTION_WAR); BIND_ENUM_CONSTANT(PVP_FACTION_FACTION_WARS); BIND_ENUM_CONSTANT(ENCYCLOPEDIA_UPDATE); BIND_ENUM_CONSTANT(ENCYCLOPEDIA_INIT); BIND_ENUM_CONSTANT(USER_BARS); BIND_ENUM_CONSTANT(USER_POPUP); BIND_ENUM_CONSTANT(EVENT_SET_ITEM_CUSTOM_TEXT); BIND_ENUM_CONSTANT(EVENT_DUMMY); BIND_ENUM_CONSTANT(TOTEM_BUILD); BIND_ENUM_CONSTANT(TOTEM_DUMMY); BIND_ENUM_CONSTANT(MODULE_GATEWAY_FEOPEN); BIND_ENUM_CONSTANT(MODULE_GATEWAY_GATEWAY_MSG); BIND_ENUM_CONSTANT(MODULE_GATEWAY_FECLOSE); BIND_ENUM_CONSTANT(SEASON_SET); BIND_ENUM_CONSTANT(SEASON_DUMMY); BIND_ENUM_CONSTANT(DM_GIFT_BEGIN); BIND_ENUM_CONSTANT(DM_GIFT_VALIDATE); BIND_ENUM_CONSTANT(RING_MISSION_MISSION_RING_SELECT); BIND_ENUM_CONSTANT(RING_MISSION_DSS_DOWN); BIND_ENUM_CONSTANT(NPC_ICON_GET_DESC); BIND_ENUM_CONSTANT(NPC_ICON_SET_DESC); BIND_ENUM_CONSTANT(NPC_ICON_SVR_EVENT_MIS_AVL); BIND_ENUM_CONSTANT(NPC_ICON_SET_TIMER); BIND_ENUM_CONSTANT(__LAST_ELEMENT); } ReferentialMessageCore *ReferentialMessageCore::get_singleton() { if ( ReferentialMessageCore::singleton == nullptr ) ReferentialMessageCore::singleton = new ReferentialMessageCore(); return ReferentialMessageCore::singleton; } int ReferentialMessageCore::get_command(String name) { if( name == "TARGET_PARTY" ) { return Command::TARGET_PARTY; } else if( name == "TARGET_INVENTORY" ) { return Command::TARGET_INVENTORY; } else if( name == "TARGET_FOLLOW" ) { return Command::TARGET_FOLLOW; } else if( name == "TARGET_NO_FOLLOW" ) { return Command::TARGET_NO_FOLLOW; } else if( name == "CONNECTION_USER_CHAR" ) { return Command::CONNECTION_USER_CHAR; } else if( name == "CONNECTION_NO_USER_CHAR" ) { return Command::CONNECTION_NO_USER_CHAR; } else if( name == "CONNECTION_USER_CHARS" ) { return Command::CONNECTION_USER_CHARS; } else if( name == "CONNECTION_CREATE_CHAR" ) { return Command::CONNECTION_CREATE_CHAR; } else if( name == "CONNECTION_SELECT_CHAR" ) { return Command::CONNECTION_SELECT_CHAR; } else if( name == "CONNECTION_DELETE_CHAR" ) { return Command::CONNECTION_DELETE_CHAR; } else if( name == "CONNECTION_RENAME_CHAR" ) { return Command::CONNECTION_RENAME_CHAR; } else if( name == "CONNECTION_ENTER" ) { return Command::CONNECTION_ENTER; } else if( name == "CONNECTION_READY" ) { return Command::CONNECTION_READY; } else if( name == "CONNECTION_TIME_DATE_SYNCHRO" ) { return Command::CONNECTION_TIME_DATE_SYNCHRO; } else if( name == "CONNECTION_ASK_NAME" ) { return Command::CONNECTION_ASK_NAME; } else if( name == "CONNECTION_VALID_NAME" ) { return Command::CONNECTION_VALID_NAME; } else if( name == "CONNECTION_CREATE_CHAR_ERROR" ) { return Command::CONNECTION_CREATE_CHAR_ERROR; } else if( name == "CONNECTION_RECONNECT" ) { return Command::CONNECTION_RECONNECT; } else if( name == "CONNECTION_SERVER_RECONNECT_OK" ) { return Command::CONNECTION_SERVER_RECONNECT_OK; } else if( name == "CONNECTION_SHARD_ID" ) { return Command::CONNECTION_SHARD_ID; } else if( name == "CONNECTION_SERVER_QUIT_OK" ) { return Command::CONNECTION_SERVER_QUIT_OK; } else if( name == "CONNECTION_SERVER_QUIT_ABORT" ) { return Command::CONNECTION_SERVER_QUIT_ABORT; } else if( name == "CONNECTION_CLIENT_QUIT_REQUEST" ) { return Command::CONNECTION_CLIENT_QUIT_REQUEST; } else if( name == "CONNECTION_MAIL_AVAILABLE" ) { return Command::CONNECTION_MAIL_AVAILABLE; } else if( name == "CONNECTION_GUILD_MESSAGE_AVAILABLE" ) { return Command::CONNECTION_GUILD_MESSAGE_AVAILABLE; } else if( name == "CONNECTION_PERMANENT_BAN" ) { return Command::CONNECTION_PERMANENT_BAN; } else if( name == "CONNECTION_UNBAN" ) { return Command::CONNECTION_UNBAN; } else if( name == "CONNECTION_FAR_TP" ) { return Command::CONNECTION_FAR_TP; } else if( name == "CONNECTION_RET_MAINLAND" ) { return Command::CONNECTION_RET_MAINLAND; } else if( name == "DB_UPD_PLR" ) { return Command::DB_UPD_PLR; } else if( name == "DB_UPD_INV" ) { return Command::DB_UPD_INV; } else if( name == "DB_INIT_PLR" ) { return Command::DB_INIT_PLR; } else if( name == "DB_INIT_INV" ) { return Command::DB_INIT_INV; } else if( name == "DB_GROUP_UPDATE_BANK" ) { return Command::DB_GROUP_UPDATE_BANK; } else if( name == "DB_GROUP_INIT_BANK" ) { return Command::DB_GROUP_INIT_BANK; } else if( name == "DB_GROUP_RESET_BANK" ) { return Command::DB_GROUP_RESET_BANK; } else if( name == "POSITION" ) { return Command::POSITION; } else if( name == "HARVEST_DEPOSIT" ) { return Command::HARVEST_DEPOSIT; } else if( name == "HARVEST_CORPSE" ) { return Command::HARVEST_CORPSE; } else if( name == "HARVEST_INTERRUPT" ) { return Command::HARVEST_INTERRUPT; } else if( name == "HARVEST_CLOSE_TEMP_INVENTORY" ) { return Command::HARVEST_CLOSE_TEMP_INVENTORY; } else if( name == "TRAINING" ) { return Command::TRAINING; } else if( name == "JOB_SET_JOB_STATUS" ) { return Command::JOB_SET_JOB_STATUS; } else if( name == "JOB_SWAP_JOB_STATUS" ) { return Command::JOB_SWAP_JOB_STATUS; } else if( name == "CASTING_BEGIN" ) { return Command::CASTING_BEGIN; } else if( name == "CASTING_INTERRUPT" ) { return Command::CASTING_INTERRUPT; } else if( name == "FABER_OPEN" ) { return Command::FABER_OPEN; } else if( name == "FABER_CLOSE" ) { return Command::FABER_CLOSE; } else if( name == "FABER_EXECUTE" ) { return Command::FABER_EXECUTE; } else if( name == "FABER_SET_NUM_ITEM" ) { return Command::FABER_SET_NUM_ITEM; } else if( name == "FABER_START_CREATE" ) { return Command::FABER_START_CREATE; } else if( name == "FABER_START_REPAIR" ) { return Command::FABER_START_REPAIR; } else if( name == "FABER_START_REFINE" ) { return Command::FABER_START_REFINE; } else if( name == "FABER_SET_MP_QUALITY" ) { return Command::FABER_SET_MP_QUALITY; } else if( name == "FABER_SET_MP_REFINE" ) { return Command::FABER_SET_MP_REFINE; } else if( name == "FABER_SET_TOOL" ) { return Command::FABER_SET_TOOL; } else if( name == "FABER_RESET_TOOL" ) { return Command::FABER_RESET_TOOL; } else if( name == "FABER_INTERRUPT" ) { return Command::FABER_INTERRUPT; } else if( name == "COMBAT_ENGAGE" ) { return Command::COMBAT_ENGAGE; } else if( name == "COMBAT_DISENGAGE" ) { return Command::COMBAT_DISENGAGE; } else if( name == "COMBAT_DEFAULT_ATTACK" ) { return Command::COMBAT_DEFAULT_ATTACK; } else if( name == "COMBAT_ENGAGE_FAILED" ) { return Command::COMBAT_ENGAGE_FAILED; } else if( name == "COMBAT_VALIDATE_MELEE" ) { return Command::COMBAT_VALIDATE_MELEE; } else if( name == "COMBAT_PARRY" ) { return Command::COMBAT_PARRY; } else if( name == "COMBAT_DODGE" ) { return Command::COMBAT_DODGE; } else if( name == "COMBAT_PROTECTED_SLOT" ) { return Command::COMBAT_PROTECTED_SLOT; } else if( name == "COMBAT_FLYING_ChaScore1_DELTA" ) { return Command::COMBAT_FLYING_ChaScore1_DELTA; } else if( name == "COMBAT_FLYING_TEXT_ISE" ) { return Command::COMBAT_FLYING_TEXT_ISE; } else if( name == "COMBAT_FLYING_TEXT" ) { return Command::COMBAT_FLYING_TEXT; } else if( name == "STRING_TELL" ) { return Command::STRING_TELL; } else if( name == "STRING_FAR_TELL" ) { return Command::STRING_FAR_TELL; } else if( name == "STRING_CHAT" ) { return Command::STRING_CHAT; } else if( name == "STRING_CHAT_TEAM" ) { return Command::STRING_CHAT_TEAM; } else if( name == "STRING_ADD_DYN_STR" ) { return Command::STRING_ADD_DYN_STR; } else if( name == "STRING_FILTER" ) { return Command::STRING_FILTER; } else if( name == "STRING_CHAT_MODE" ) { return Command::STRING_CHAT_MODE; } else if( name == "STRING_CHAT2" ) { return Command::STRING_CHAT2; } else if( name == "STRING_TELL2" ) { return Command::STRING_TELL2; } else if( name == "STRING_DYN_STRING" ) { return Command::STRING_DYN_STRING; } else if( name == "STRING_DYN_STRING_GROUP" ) { return Command::STRING_DYN_STRING_GROUP; } else if( name == "STRING_AFK_TXT" ) { return Command::STRING_AFK_TXT; } else if( name == "STUN_STUN" ) { return Command::STUN_STUN; } else if( name == "STUN_WAKE_UP" ) { return Command::STUN_WAKE_UP; } else if( name == "SENTENCE_EXECUTE" ) { return Command::SENTENCE_EXECUTE; } else if( name == "SENTENCE_CANCEL" ) { return Command::SENTENCE_CANCEL; } else if( name == "SENTENCE_CANCEL_CURRENT" ) { return Command::SENTENCE_CANCEL_CURRENT; } else if( name == "SENTENCE_CANCEL_ALL" ) { return Command::SENTENCE_CANCEL_ALL; } else if( name == "SENTENCE_CLEAR" ) { return Command::SENTENCE_CLEAR; } else if( name == "SENTENCE_MEMORIZE" ) { return Command::SENTENCE_MEMORIZE; } else if( name == "SENTENCE_FORGET" ) { return Command::SENTENCE_FORGET; } else if( name == "SENTENCE_EVALUATE" ) { return Command::SENTENCE_EVALUATE; } else if( name == "SENTENCE_ADD_BRICK" ) { return Command::SENTENCE_ADD_BRICK; } else if( name == "SENTENCE_REMOVE_BRICK" ) { return Command::SENTENCE_REMOVE_BRICK; } else if( name == "SENTENCE_START" ) { return Command::SENTENCE_START; } else if( name == "SENTENCE_STOP" ) { return Command::SENTENCE_STOP; } else if( name == "TEAM_JOIN" ) { return Command::TEAM_JOIN; } else if( name == "TEAM_LEAVE" ) { return Command::TEAM_LEAVE; } else if( name == "TEAM_INVITATION" ) { return Command::TEAM_INVITATION; } else if( name == "TEAM_JOIN_PROPOSAL" ) { return Command::TEAM_JOIN_PROPOSAL; } else if( name == "TEAM_JOIN_PROPOSAL_DECLINE" ) { return Command::TEAM_JOIN_PROPOSAL_DECLINE; } else if( name == "TEAM_KICK" ) { return Command::TEAM_KICK; } else if( name == "TEAM_SET_SUCCESSOR" ) { return Command::TEAM_SET_SUCCESSOR; } else if( name == "TEAM_SHARE_OPEN" ) { return Command::TEAM_SHARE_OPEN; } else if( name == "TEAM_SHARE_VALID_ITEM" ) { return Command::TEAM_SHARE_VALID_ITEM; } else if( name == "TEAM_SHARE_INVALID_ITEM" ) { return Command::TEAM_SHARE_INVALID_ITEM; } else if( name == "TEAM_SHARE_VALID" ) { return Command::TEAM_SHARE_VALID; } else if( name == "TEAM_SHARE_INVALID" ) { return Command::TEAM_SHARE_INVALID; } else if( name == "TEAM_SHARE_CLOSE" ) { return Command::TEAM_SHARE_CLOSE; } else if( name == "TEAM_CONTACT_INIT" ) { return Command::TEAM_CONTACT_INIT; } else if( name == "TEAM_CONTACT_ADD" ) { return Command::TEAM_CONTACT_ADD; } else if( name == "TEAM_CONTACT_DEL" ) { return Command::TEAM_CONTACT_DEL; } else if( name == "TEAM_CONTACT_MOVE" ) { return Command::TEAM_CONTACT_MOVE; } else if( name == "TEAM_CONTACT_CREATE" ) { return Command::TEAM_CONTACT_CREATE; } else if( name == "TEAM_CONTACT_STATUS" ) { return Command::TEAM_CONTACT_STATUS; } else if( name == "TEAM_CONTACT_REMOVE" ) { return Command::TEAM_CONTACT_REMOVE; } else if( name == "ITEM_DROP" ) { return Command::ITEM_DROP; } else if( name == "ITEM_PICK_UP" ) { return Command::ITEM_PICK_UP; } else if( name == "ITEM_PICK_UP_CLOSE" ) { return Command::ITEM_PICK_UP_CLOSE; } else if( name == "ITEM_SWAP" ) { return Command::ITEM_SWAP; } else if( name == "ITEM_ACTIVATE_SHEATH" ) { return Command::ITEM_ACTIVATE_SHEATH; } else if( name == "ITEM_HARVEST" ) { return Command::ITEM_HARVEST; } else if( name == "ITEM_HARVEST_CLOSE" ) { return Command::ITEM_HARVEST_CLOSE; } else if( name == "ITEM_GIVE" ) { return Command::ITEM_GIVE; } else if( name == "ITEM_DESTROY" ) { return Command::ITEM_DESTROY; } else if( name == "ITEM_EQUIP" ) { return Command::ITEM_EQUIP; } else if( name == "ITEM_UNEQUIP" ) { return Command::ITEM_UNEQUIP; } else if( name == "ITEM_TEMP_TO_BAG" ) { return Command::ITEM_TEMP_TO_BAG; } else if( name == "ITEM_ALL_TEMP" ) { return Command::ITEM_ALL_TEMP; } else if( name == "ITEM_NO_TEMP" ) { return Command::ITEM_NO_TEMP; } else if( name == "ITEM_ENCHANT" ) { return Command::ITEM_ENCHANT; } else if( name == "ITEM_OPEN_ROOM_INVENTORY" ) { return Command::ITEM_OPEN_ROOM_INVENTORY; } else if( name == "ITEM_CLOSE_ROOM_INVENTORY" ) { return Command::ITEM_CLOSE_ROOM_INVENTORY; } else if( name == "ITEM_USE_ITEM" ) { return Command::ITEM_USE_ITEM; } else if( name == "ITEM_STOP_USE_XP_CAT" ) { return Command::ITEM_STOP_USE_XP_CAT; } else if( name == "TP_RESPAWN" ) { return Command::TP_RESPAWN; } else if( name == "TP_BOT" ) { return Command::TP_BOT; } else if( name == "TP_WANTED" ) { return Command::TP_WANTED; } else if( name == "TP_DEST" ) { return Command::TP_DEST; } else if( name == "TP_DEST_WITH_SEASON" ) { return Command::TP_DEST_WITH_SEASON; } else if( name == "TP_ACK" ) { return Command::TP_ACK; } else if( name == "TP_CORRECT" ) { return Command::TP_CORRECT; } else if( name == "DEATH_RESPAWN_POINT" ) { return Command::DEATH_RESPAWN_POINT; } else if( name == "DEATH_ASK_RESPAWN" ) { return Command::DEATH_ASK_RESPAWN; } else if( name == "DEATH_RESPAWN" ) { return Command::DEATH_RESPAWN; } else if( name == "ANIMALS_BEAST" ) { return Command::ANIMALS_BEAST; } else if( name == "ANIMALS_MOUNT_ABORT" ) { return Command::ANIMALS_MOUNT_ABORT; } else if( name == "EXCHANGE_INVITATION" ) { return Command::EXCHANGE_INVITATION; } else if( name == "EXCHANGE_CLOSE_INVITATION" ) { return Command::EXCHANGE_CLOSE_INVITATION; } else if( name == "EXCHANGE_PROPOSAL" ) { return Command::EXCHANGE_PROPOSAL; } else if( name == "EXCHANGE_ACCEPT_INVITATION" ) { return Command::EXCHANGE_ACCEPT_INVITATION; } else if( name == "EXCHANGE_DECLINE_INVITATION" ) { return Command::EXCHANGE_DECLINE_INVITATION; } else if( name == "EXCHANGE_VALIDATE" ) { return Command::EXCHANGE_VALIDATE; } else if( name == "EXCHANGE_INVALIDATE" ) { return Command::EXCHANGE_INVALIDATE; } else if( name == "EXCHANGE_END" ) { return Command::EXCHANGE_END; } else if( name == "EXCHANGE_SEEDS" ) { return Command::EXCHANGE_SEEDS; } else if( name == "EXCHANGE_ADD" ) { return Command::EXCHANGE_ADD; } else if( name == "EXCHANGE_REMOVE" ) { return Command::EXCHANGE_REMOVE; } else if( name == "DEBUG_WHERE" ) { return Command::DEBUG_WHERE; } else if( name == "DEBUG_WHO" ) { return Command::DEBUG_WHO; } else if( name == "DEBUG_REPLY_WHERE" ) { return Command::DEBUG_REPLY_WHERE; } else if( name == "DEBUG_SERVICES" ) { return Command::DEBUG_SERVICES; } else if( name == "DEBUG_CMD" ) { return Command::DEBUG_CMD; } else if( name == "DEBUG_PING" ) { return Command::DEBUG_PING; } else if( name == "DEBUG_COUNTER" ) { return Command::DEBUG_COUNTER; } else if( name == "COMMAND_EMOTE" ) { return Command::COMMAND_EMOTE; } else if( name == "COMMAND_CUSTOM_EMOTE" ) { return Command::COMMAND_CUSTOM_EMOTE; } else if( name == "COMMAND_WHERE" ) { return Command::COMMAND_WHERE; } else if( name == "COMMAND_ADMIN" ) { return Command::COMMAND_ADMIN; } else if( name == "COMMAND_ADMIN_OFFLINE" ) { return Command::COMMAND_ADMIN_OFFLINE; } else if( name == "COMMAND_REMOTE_ADMIN" ) { return Command::COMMAND_REMOTE_ADMIN; } else if( name == "COMMAND_REMOTE_ADMIN_ANSWER" ) { return Command::COMMAND_REMOTE_ADMIN_ANSWER; } else if( name == "COMMAND_SIT" ) { return Command::COMMAND_SIT; } else if( name == "COMMAND_AFK" ) { return Command::COMMAND_AFK; } else if( name == "COMMAND_RANDOM" ) { return Command::COMMAND_RANDOM; } else if( name == "COMMAND_GUILDMOTD" ) { return Command::COMMAND_GUILDMOTD; } else if( name == "MP_EVAL_SET_MP" ) { return Command::MP_EVAL_SET_MP; } else if( name == "MP_EVAL_SET_MP_LEVEL" ) { return Command::MP_EVAL_SET_MP_LEVEL; } else if( name == "MP_EVAL_SET_MARKET" ) { return Command::MP_EVAL_SET_MARKET; } else if( name == "MP_EVAL_EXECUTE" ) { return Command::MP_EVAL_EXECUTE; } else if( name == "BOTCHAT_NEXT_PAGE_ITEM" ) { return Command::BOTCHAT_NEXT_PAGE_ITEM; } else if( name == "BOTCHAT_NEXT_PAGE_MISSION" ) { return Command::BOTCHAT_NEXT_PAGE_MISSION; } else if( name == "BOTCHAT_START_TRADE_ITEM" ) { return Command::BOTCHAT_START_TRADE_ITEM; } else if( name == "BOTCHAT_START_TRADE_TELEPORT" ) { return Command::BOTCHAT_START_TRADE_TELEPORT; } else if( name == "BOTCHAT_START_TRADE_FACTION" ) { return Command::BOTCHAT_START_TRADE_FACTION; } else if( name == "BOTCHAT_START_TRADE_SKILL" ) { return Command::BOTCHAT_START_TRADE_SKILL; } else if( name == "BOTCHAT_START_TRADE_PACT" ) { return Command::BOTCHAT_START_TRADE_PACT; } else if( name == "BOTCHAT_START_TRADE_ACTION" ) { return Command::BOTCHAT_START_TRADE_ACTION; } else if( name == "BOTCHAT_BUY" ) { return Command::BOTCHAT_BUY; } else if( name == "BOTCHAT_SELL" ) { return Command::BOTCHAT_SELL; } else if( name == "BOTCHAT_DESTROY_ITEM" ) { return Command::BOTCHAT_DESTROY_ITEM; } else if( name == "BOTCHAT_REFRESH_TRADE_LIST" ) { return Command::BOTCHAT_REFRESH_TRADE_LIST; } else if( name == "BOTCHAT_SET_FILTERS" ) { return Command::BOTCHAT_SET_FILTERS; } else if( name == "BOTCHAT_START_CHOOSE_MISSION" ) { return Command::BOTCHAT_START_CHOOSE_MISSION; } else if( name == "BOTCHAT_START_DYNAMIC_MISSION" ) { return Command::BOTCHAT_START_DYNAMIC_MISSION; } else if( name == "BOTCHAT_CONTINUE_MISSION" ) { return Command::BOTCHAT_CONTINUE_MISSION; } else if( name == "BOTCHAT_VALIDATE_PLAYER_GIFT" ) { return Command::BOTCHAT_VALIDATE_PLAYER_GIFT; } else if( name == "BOTCHAT_PICK_MISSION" ) { return Command::BOTCHAT_PICK_MISSION; } else if( name == "BOTCHAT_DM_CHOICE" ) { return Command::BOTCHAT_DM_CHOICE; } else if( name == "BOTCHAT_DM_ACCEPT" ) { return Command::BOTCHAT_DM_ACCEPT; } else if( name == "BOTCHAT_START_NEWS" ) { return Command::BOTCHAT_START_NEWS; } else if( name == "BOTCHAT_START_CREATE_GUILD" ) { return Command::BOTCHAT_START_CREATE_GUILD; } else if( name == "BOTCHAT_END" ) { return Command::BOTCHAT_END; } else if( name == "BOTCHAT_FORCE_END" ) { return Command::BOTCHAT_FORCE_END; } else if( name == "BOTCHAT_START_CHOOSE_DUTY" ) { return Command::BOTCHAT_START_CHOOSE_DUTY; } else if( name == "BOTCHAT_NEXT_PAGE_DUTY" ) { return Command::BOTCHAT_NEXT_PAGE_DUTY; } else if( name == "BOTCHAT_DUTY_APPLY" ) { return Command::BOTCHAT_DUTY_APPLY; } else if( name == "BOTCHAT_DUTY_CANCEL_APPLY" ) { return Command::BOTCHAT_DUTY_CANCEL_APPLY; } else if( name == "BOTCHAT_START_TRADE_GUILD_OPTIONS" ) { return Command::BOTCHAT_START_TRADE_GUILD_OPTIONS; } else if( name == "BOTCHAT_BUY_GUILD_OPTION" ) { return Command::BOTCHAT_BUY_GUILD_OPTION; } else if( name == "BOTCHAT_START_GUILD_RESEARCH" ) { return Command::BOTCHAT_START_GUILD_RESEARCH; } else if( name == "BOTCHAT_DESTROY_BUILDING" ) { return Command::BOTCHAT_DESTROY_BUILDING; } else if( name == "BOTCHAT_DYNCHAT_OPEN" ) { return Command::BOTCHAT_DYNCHAT_OPEN; } else if( name == "BOTCHAT_DYNCHAT_CLOSE" ) { return Command::BOTCHAT_DYNCHAT_CLOSE; } else if( name == "BOTCHAT_DYNCHAT_SEND" ) { return Command::BOTCHAT_DYNCHAT_SEND; } else if( name == "JOURNAL_INIT_COMPLETED_MISSIONS" ) { return Command::JOURNAL_INIT_COMPLETED_MISSIONS; } else if( name == "JOURNAL_UPDATE_COMPLETED_MISSIONS" ) { return Command::JOURNAL_UPDATE_COMPLETED_MISSIONS; } else if( name == "JOURNAL_MISSION_ABANDON" ) { return Command::JOURNAL_MISSION_ABANDON; } else if( name == "JOURNAL_GROUP_MISSION_ABANDON" ) { return Command::JOURNAL_GROUP_MISSION_ABANDON; } else if( name == "JOURNAL_ADD_COMPASS" ) { return Command::JOURNAL_ADD_COMPASS; } else if( name == "JOURNAL_ADD_COMPASS_BOT" ) { return Command::JOURNAL_ADD_COMPASS_BOT; } else if( name == "JOURNAL_REMOVE_COMPASS" ) { return Command::JOURNAL_REMOVE_COMPASS; } else if( name == "JOURNAL_REMOVE_COMPASS_BOT" ) { return Command::JOURNAL_REMOVE_COMPASS_BOT; } else if( name == "STRING_MANAGER_SET_LANGUAGE" ) { return Command::STRING_MANAGER_SET_LANGUAGE; } else if( name == "STRING_MANAGER_PHRASE_SEND" ) { return Command::STRING_MANAGER_PHRASE_SEND; } else if( name == "STRING_MANAGER_STRING_RQ" ) { return Command::STRING_MANAGER_STRING_RQ; } else if( name == "STRING_MANAGER_STRING_RESP" ) { return Command::STRING_MANAGER_STRING_RESP; } else if( name == "STRING_MANAGER_RELOAD_CACHE" ) { return Command::STRING_MANAGER_RELOAD_CACHE; } else if( name == "GUILD_CREATE" ) { return Command::GUILD_CREATE; } else if( name == "GUILD_ABORT_CREATION" ) { return Command::GUILD_ABORT_CREATION; } else if( name == "GUILD_OPEN_GUILD_WINDOW" ) { return Command::GUILD_OPEN_GUILD_WINDOW; } else if( name == "GUILD_INVITATION" ) { return Command::GUILD_INVITATION; } else if( name == "GUILD_ACCEPT_INVITATION" ) { return Command::GUILD_ACCEPT_INVITATION; } else if( name == "GUILD_REFUSE_INVITATION" ) { return Command::GUILD_REFUSE_INVITATION; } else if( name == "GUILD_JOIN_PROPOSAL" ) { return Command::GUILD_JOIN_PROPOSAL; } else if( name == "GUILD_SET_GRADE" ) { return Command::GUILD_SET_GRADE; } else if( name == "GUILD_SET_LEADER" ) { return Command::GUILD_SET_LEADER; } else if( name == "GUILD_KICK_MEMBER" ) { return Command::GUILD_KICK_MEMBER; } else if( name == "GUILD_TELEPORT" ) { return Command::GUILD_TELEPORT; } else if( name == "GUILD_ASCENSOR" ) { return Command::GUILD_ASCENSOR; } else if( name == "GUILD_FIRST_ASCENSOR_PAGE" ) { return Command::GUILD_FIRST_ASCENSOR_PAGE; } else if( name == "GUILD_NEXT_ASCENSOR_PAGE" ) { return Command::GUILD_NEXT_ASCENSOR_PAGE; } else if( name == "GUILD_LEAVE_ASCENSOR" ) { return Command::GUILD_LEAVE_ASCENSOR; } else if( name == "GUILD_QUIT" ) { return Command::GUILD_QUIT; } else if( name == "GUILD_SET_PLAYER_TITLE" ) { return Command::GUILD_SET_PLAYER_TITLE; } else if( name == "GUILD_UPDATE_PLAYER_TITLE" ) { return Command::GUILD_UPDATE_PLAYER_TITLE; } else if( name == "GUILD_USE_FEMALE_TITLES" ) { return Command::GUILD_USE_FEMALE_TITLES; } else if( name == "GUILD_PUT_MONEY" ) { return Command::GUILD_PUT_MONEY; } else if( name == "GUILD_TAKE_MONEY" ) { return Command::GUILD_TAKE_MONEY; } else if( name == "GUILD_OPEN_INVENTORY" ) { return Command::GUILD_OPEN_INVENTORY; } else if( name == "GUILD_CLOSE_INVENTORY" ) { return Command::GUILD_CLOSE_INVENTORY; } else if( name == "OUTPOST_GIVEUP_OUTPOST" ) { return Command::OUTPOST_GIVEUP_OUTPOST; } else if( name == "OUTPOST_SELECT" ) { return Command::OUTPOST_SELECT; } else if( name == "OUTPOST_UNSELECT" ) { return Command::OUTPOST_UNSELECT; } else if( name == "OUTPOST_DECLARE_WAR_START" ) { return Command::OUTPOST_DECLARE_WAR_START; } else if( name == "OUTPOST_DECLARE_WAR_ACK" ) { return Command::OUTPOST_DECLARE_WAR_ACK; } else if( name == "OUTPOST_DECLARE_WAR_VALIDATE" ) { return Command::OUTPOST_DECLARE_WAR_VALIDATE; } else if( name == "OUTPOST_SET_DEF_PERIOD" ) { return Command::OUTPOST_SET_DEF_PERIOD; } else if( name == "OUTPOST_SET_SQUAD" ) { return Command::OUTPOST_SET_SQUAD; } else if( name == "OUTPOST_SET_SQUAD_SPAWN" ) { return Command::OUTPOST_SET_SQUAD_SPAWN; } else if( name == "OUTPOST_INSERT_SQUAD" ) { return Command::OUTPOST_INSERT_SQUAD; } else if( name == "OUTPOST_REMOVE_SQUAD" ) { return Command::OUTPOST_REMOVE_SQUAD; } else if( name == "OUTPOST_SET_SQUAD_CAPITAL" ) { return Command::OUTPOST_SET_SQUAD_CAPITAL; } else if( name == "OUTPOST_CHOOSE_SIDE" ) { return Command::OUTPOST_CHOOSE_SIDE; } else if( name == "OUTPOST_SIDE_CHOSEN" ) { return Command::OUTPOST_SIDE_CHOSEN; } else if( name == "OUTPOST_BANISH_PLAYER" ) { return Command::OUTPOST_BANISH_PLAYER; } else if( name == "OUTPOST_BANISH_GUILD" ) { return Command::OUTPOST_BANISH_GUILD; } else if( name == "OUTPOST_BUY_BUILDING" ) { return Command::OUTPOST_BUY_BUILDING; } else if( name == "OUTPOST_DESTROY_BUILDING" ) { return Command::OUTPOST_DESTROY_BUILDING; } else if( name == "PHRASE_DELETE" ) { return Command::PHRASE_DELETE; } else if( name == "PHRASE_LEARN" ) { return Command::PHRASE_LEARN; } else if( name == "PHRASE_MEMORIZE" ) { return Command::PHRASE_MEMORIZE; } else if( name == "PHRASE_FORGET" ) { return Command::PHRASE_FORGET; } else if( name == "PHRASE_EXECUTE" ) { return Command::PHRASE_EXECUTE; } else if( name == "PHRASE_EXECUTE_CYCLIC" ) { return Command::PHRASE_EXECUTE_CYCLIC; } else if( name == "PHRASE_EXECUTE_FABER" ) { return Command::PHRASE_EXECUTE_FABER; } else if( name == "PHRASE_DOWNLOAD" ) { return Command::PHRASE_DOWNLOAD; } else if( name == "PHRASE_BUY" ) { return Command::PHRASE_BUY; } else if( name == "PHRASE_CONFIRM_BUY" ) { return Command::PHRASE_CONFIRM_BUY; } else if( name == "PHRASE_BUY_SHEET" ) { return Command::PHRASE_BUY_SHEET; } else if( name == "PHRASE_CANCEL_LINK" ) { return Command::PHRASE_CANCEL_LINK; } else if( name == "PHRASE_CANCEL_TOP" ) { return Command::PHRASE_CANCEL_TOP; } else if( name == "PHRASE_CANCEL_ALL" ) { return Command::PHRASE_CANCEL_ALL; } else if( name == "PHRASE_CRISTALIZE" ) { return Command::PHRASE_CRISTALIZE; } else if( name == "PHRASE_EXEC_CYCLIC_ACK" ) { return Command::PHRASE_EXEC_CYCLIC_ACK; } else if( name == "PHRASE_EXEC_NEXT_ACK" ) { return Command::PHRASE_EXEC_NEXT_ACK; } else if( name == "ITEM_INFO_GET" ) { return Command::ITEM_INFO_GET; } else if( name == "ITEM_INFO_SET" ) { return Command::ITEM_INFO_SET; } else if( name == "ITEM_INFO_REFRESH_VERSION" ) { return Command::ITEM_INFO_REFRESH_VERSION; } else if( name == "MISSION_PREREQ_GET" ) { return Command::MISSION_PREREQ_GET; } else if( name == "MISSION_PREREQ_SET" ) { return Command::MISSION_PREREQ_SET; } else if( name == "MISSION_ENTER_CRITICAL" ) { return Command::MISSION_ENTER_CRITICAL; } else if( name == "MISSION_ASK_ENTER_CRITICAL" ) { return Command::MISSION_ASK_ENTER_CRITICAL; } else if( name == "MISSION_CLOSE_ENTER_CRITICAL" ) { return Command::MISSION_CLOSE_ENTER_CRITICAL; } else if( name == "MISSION_WAKE" ) { return Command::MISSION_WAKE; } else if( name == "MISSION_GROUP_WAKE" ) { return Command::MISSION_GROUP_WAKE; } else if( name == "DUEL_ASK" ) { return Command::DUEL_ASK; } else if( name == "DUEL_ACCEPT" ) { return Command::DUEL_ACCEPT; } else if( name == "DUEL_REFUSE" ) { return Command::DUEL_REFUSE; } else if( name == "DUEL_ABANDON" ) { return Command::DUEL_ABANDON; } else if( name == "DUEL_INVITATION" ) { return Command::DUEL_INVITATION; } else if( name == "DUEL_CANCEL_INVITATION" ) { return Command::DUEL_CANCEL_INVITATION; } else if( name == "PVP_CHALLENGE_ASK" ) { return Command::PVP_CHALLENGE_ASK; } else if( name == "PVP_CHALLENGE_ACCEPT" ) { return Command::PVP_CHALLENGE_ACCEPT; } else if( name == "PVP_CHALLENGE_REFUSE" ) { return Command::PVP_CHALLENGE_REFUSE; } else if( name == "PVP_CHALLENGE_ABANDON" ) { return Command::PVP_CHALLENGE_ABANDON; } else if( name == "PVP_CHALLENGE_INVITATION" ) { return Command::PVP_CHALLENGE_INVITATION; } else if( name == "PVP_CHALLENGE_CANCEL_INVITATION" ) { return Command::PVP_CHALLENGE_CANCEL_INVITATION; } else if( name == "PVP_PVP_TAG" ) { return Command::PVP_PVP_TAG; } else if( name == "PVP_SET_NEUTRAL_ALLEGIANCE" ) { return Command::PVP_SET_NEUTRAL_ALLEGIANCE; } else if( name == "PVP_SET_NEUTRAL_ALLEGIANCE_GUILD" ) { return Command::PVP_SET_NEUTRAL_ALLEGIANCE_GUILD; } else if( name == "PVP_FACTION_PUSH_FACTION_WAR" ) { return Command::PVP_FACTION_PUSH_FACTION_WAR; } else if( name == "PVP_FACTION_POP_FACTION_WAR" ) { return Command::PVP_FACTION_POP_FACTION_WAR; } else if( name == "PVP_FACTION_FACTION_WARS" ) { return Command::PVP_FACTION_FACTION_WARS; } else if( name == "ENCYCLOPEDIA_UPDATE" ) { return Command::ENCYCLOPEDIA_UPDATE; } else if( name == "ENCYCLOPEDIA_INIT" ) { return Command::ENCYCLOPEDIA_INIT; } else if( name == "USER_BARS" ) { return Command::USER_BARS; } else if( name == "USER_POPUP" ) { return Command::USER_POPUP; } else if( name == "EVENT_SET_ITEM_CUSTOM_TEXT" ) { return Command::EVENT_SET_ITEM_CUSTOM_TEXT; } else if( name == "EVENT_DUMMY" ) { return Command::EVENT_DUMMY; } else if( name == "TOTEM_BUILD" ) { return Command::TOTEM_BUILD; } else if( name == "TOTEM_DUMMY" ) { return Command::TOTEM_DUMMY; } else if( name == "MODULE_GATEWAY_FEOPEN" ) { return Command::MODULE_GATEWAY_FEOPEN; } else if( name == "MODULE_GATEWAY_GATEWAY_MSG" ) { return Command::MODULE_GATEWAY_GATEWAY_MSG; } else if( name == "MODULE_GATEWAY_FECLOSE" ) { return Command::MODULE_GATEWAY_FECLOSE; } else if( name == "SEASON_SET" ) { return Command::SEASON_SET; } else if( name == "SEASON_DUMMY" ) { return Command::SEASON_DUMMY; } else if( name == "DM_GIFT_BEGIN" ) { return Command::DM_GIFT_BEGIN; } else if( name == "DM_GIFT_VALIDATE" ) { return Command::DM_GIFT_VALIDATE; } else if( name == "RING_MISSION_MISSION_RING_SELECT" ) { return Command::RING_MISSION_MISSION_RING_SELECT; } else if( name == "RING_MISSION_DSS_DOWN" ) { return Command::RING_MISSION_DSS_DOWN; } else if( name == "NPC_ICON_GET_DESC" ) { return Command::NPC_ICON_GET_DESC; } else if( name == "NPC_ICON_SET_DESC" ) { return Command::NPC_ICON_SET_DESC; } else if( name == "NPC_ICON_SVR_EVENT_MIS_AVL" ) { return Command::NPC_ICON_SVR_EVENT_MIS_AVL; } else if( name == "NPC_ICON_SET_TIMER" ) { return Command::NPC_ICON_SET_TIMER; } else { WARN_PRINT("Ignore unknown keyword command '" + name + "'"); } return Command::__LAST_ELEMENT; } void ReferentialMessageCore::read_referential_step(Dictionary step, Vector head, Ref root) { uint32_t i; Array keys = step.keys(); String name; String sep = ":"; if ( keys.size() == 0 ) { Ref ele; String a; int ii; ele.instance(); for(ii=0;iiput_serial(head.get(ii).get_pos(), getPowerOf2(_size)); } a += head.get(ii).get_name(); uint32_t _size = head.get(ii).get_size(); ele->put_serial(head.get(ii).get_pos(), getPowerOf2(_size)); int id = get_command(a); if (id != Command::__LAST_ELEMENT) { _encoder[id].copy_ref_bitstream(ele); root->set_id(id); } ele.unref(); return; } root->set_size(keys.size()); uint32_t nb = keys.size() - 1; String a; for(i=0; i <= nb; ++i) { name = keys[i]; Vector info = name.split(sep, false, 2); if(info.size() == 2 ) { uint32_t id = info[0].to_int(); Ref root_child = root->add_child(Command::__LAST_ELEMENT, i); Variant child ; child = step[name]; ElementHead tmp; tmp.create(id, nb, info[1].ascii().get_data()); head.push_back(tmp); read_referential_step(child, head, root_child); head.remove(head.size()-1); } } } void ReferentialMessageCore::read_referential(Dictionary dictionary_message) { Vector head; DBG_PRINT("Read Referential Message"); _decoder->set_id(Command::__LAST_ELEMENT); read_referential_step(dictionary_message, head, _decoder); } void ReferentialMessageCore::show() { // For fun, list powerOf2 - TODO check is same with server side, and check size is same value for msg.xml /* { for(int i=0;i<67;++i) DBG_PRINT(itos(i) + "=> powerOf2 = " + itos(getPowerOf2(i))); } */ // show Element to push data { for(int i = 0; i < Command::__LAST_ELEMENT; ++i) { DBG_PRINT(itos(i) + ") " + get_command_name(i) + " " + this->_encoder[i].show().ascii().get_data() + "."); } } // show element to read data _decoder->show(); } void ReferentialMessageCore::clear_session() { if ( ReferentialMessageCore::singleton == nullptr ) return; DBG_PRINT("Clear session for Referential Message."); delete ReferentialMessageCore::singleton; ReferentialMessageCore::singleton = nullptr; }