/*
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
*/
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 + " pos:" + itos(pos) + " ------ power:" + itos(_power2));
}
else
{
DBG_PRINT("level:" + itos(level) + " " + a + " pos:" + itos(pos) + " id:" + itos(_id));
}
level ++;
for(int i=0;i<_children.size() - 1;++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_PRINTS("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) + ") " + 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;
}