diff --git a/login_scene/message_system.gd b/login_scene/message_system.gd index f2a5a63..96e9a98 100644 --- a/login_scene/message_system.gd +++ b/login_scene/message_system.gd @@ -14,11 +14,19 @@ var _shard_names = Array() var _character_summaries = Array() var _mainlands = Array() +var _create_char = false var _delete_char = false +var _select_char = false var _launch_create_user = false # Called when the node enters the scene tree for the first time. func _ready(): + + var cmd = ImpulseConnectionDeleteChar.new() + cmd.set_data(0) + var name = cmd.get_name() + print("slot:" + name) + pass # Replace with function body. func phrase_send(message): @@ -28,7 +36,7 @@ func phrase_send(message): var id = message['string_id'][i] if _string_manager.check_phrases(id) == false: decoded = false - var command = {'action': Action.ACTION_GENERIC_CODE, 'impulse': ImpulseBase.STRING_MANAGER_STRING_RQ, "string_id": id} + var command = {'action': Action.ACTION_GENERIC_CODE, 'impulse': Impulse.STRING_MANAGER_STRING_RQ, "string_id": id} _networkconnection.put_command(command); else: tmp.append(_string_manager.get_phrases(id)) @@ -53,8 +61,8 @@ func string_resp(message): if _string_manager.check_phrases(id) == false: decoded = false var command = { - 'action': Action.ACTION_GENERIC_CODE, - 'impulse': ImpulseBase.STRING_MANAGER_STRING_RQ, + 'action': Action.ACTION_GENERIC_CODE, + 'impulse': Impulse.STRING_MANAGER_STRING_RQ, "string_id": id } _networkconnection.put_command(command); @@ -97,8 +105,8 @@ func append_message(id, flow): # add message to debug var msg = Dictionary() msg['flow'] = flow - var impulse_base = ImpulseBase.new() - msg['impulse_debug'] = impulse_base.get_name(id) + var impulse_base = Impulse.new() + msg['impulse_debug'] = impulse_base.extract_name(id) _history.append(msg) func append_message_raw(message, flow): @@ -110,19 +118,26 @@ func append_message_raw(message, flow): func create_char(): var slot = 2 + if _create_char == true: + return if _character_summaries.size() <= slot: return if _character_summaries[slot]['people'] != People.Unknown: if _delete_char == false: print("***** Delete old car") var command = { - 'action': Action.ACTION_GENERIC_CODE, - 'impulse': ImpulseBase.CONNECTION_DELETE_CHAR, + 'action': Action.ACTION_GENERIC_CODE, + 'impulse': Impulse.CONNECTION_DELETE_CHAR, "slot": slot } _networkconnection.put_command(command); append_message(command['impulse'], '<') _delete_char = true + + #var cmd = ImpulseConnectionDeleteChar.new() + #cmd.set_slot(0) + #print("slot:" + String(cmd['slot'])) + return if _launch_create_user == true: return @@ -143,7 +158,7 @@ func create_char(): # void setHAIR_COLOR(CCDBSynchronised &dbGroup, uint8 value, bool forceSending = false) var command1 = { 'action': Action.ACTION_GENERIC_CODE, - 'impulse': ImpulseBase.CONNECTION_CREATE_CHAR, + 'impulse': Impulse.CONNECTION_CREATE_CHAR, 'slot': slot, 'sheet_id': 0, 'session_id': int(_shard_names[0]['session_id']), @@ -154,7 +169,7 @@ func create_char(): 'nb_point_caster': 1, 'nb_point_crafter': 1, 'nb_point_harvester': 1, - 'start_point': 2281701451, + 'start_point': 1, 'hair_type': 7, 'hair_color': 7, 'gabarit_height': 255, @@ -181,7 +196,7 @@ func create_char(): } var command2 = { 'action': Action.ACTION_GENERIC_CODE, - 'impulse': ImpulseBase.CONNECTION_CREATE_CHAR, + 'impulse': Impulse.CONNECTION_CREATE_CHAR, 'slot': slot, 'sheet_id': 0, 'session_id': int(_shard_names[0]['session_id']), @@ -192,7 +207,7 @@ func create_char(): 'nb_point_caster': 1, 'nb_point_crafter': 1, 'nb_point_harvester': 1, - 'start_point': 123, + 'start_point': 1, 'hair_type': 1, 'hair_color': 2, 'gabarit_height': 3, @@ -219,7 +234,7 @@ func create_char(): } var command = { 'action': Action.ACTION_GENERIC_CODE, - 'impulse': ImpulseBase.CONNECTION_CREATE_CHAR, + 'impulse': Impulse.CONNECTION_CREATE_CHAR, 'slot': slot, 'sheet_id': 0, 'session_id': int(_shard_names[0]['session_id']), @@ -230,7 +245,7 @@ func create_char(): 'nb_point_caster': 0, 'nb_point_crafter': 0, 'nb_point_harvester': 0, - 'start_point': 0, + 'start_point': 1, 'hair_type': 0, 'hair_color': 0, 'gabarit_height': 0, @@ -255,25 +270,40 @@ func create_char(): 'hands_color': 0, 'feet_color': 0 } - _networkconnection.put_command(command); + _networkconnection.put_command(command1); append_message(command['impulse'], '<') _delete_char = true + _create_char = true + +func select_char(): + var slot = 2 + var command = { + 'action': Action.ACTION_GENERIC_CODE, + 'impulse': Impulse.CONNECTION_SELECT_CHAR, + "slot": slot + } + _networkconnection.put_command(command); + append_message(command['impulse'], '<') + _select_char = true func analyze_message(message): if message['action'] == Action.ACTION_POSITION_CODE: pass elif message['action'] == Action.ACTION_GENERIC_CODE: - if message['impulse'] == ImpulseBase.STRING_MANAGER_RELOAD_CACHE: + if message['impulse'] == Impulse.STRING_MANAGER_RELOAD_CACHE: print(message['timestamp']) _string_manager.set_timestamp(message['timestamp']) - elif message['impulse'] == ImpulseBase.STRING_MANAGER_PHRASE_SEND: + elif message['impulse'] == Impulse.STRING_MANAGER_PHRASE_SEND: phrase_send(message) - elif message['impulse'] == ImpulseBase.STRING_MANAGER_STRING_RESP: + elif message['impulse'] == Impulse.STRING_MANAGER_STRING_RESP: string_resp(message) - elif message['impulse'] == ImpulseBase.CONNECTION_USER_CHARS: + elif message['impulse'] == Impulse.CONNECTION_USER_CHARS: user_chars(message) # Normally this step is executed when player ask to create - create_char() + if _create_char == false: + create_char() + elif _select_char == false: + select_char() # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta): diff --git a/modules/action/action_factory.cpp b/modules/action/action_factory.cpp index 491742f..f693182 100644 --- a/modules/action/action_factory.cpp +++ b/modules/action/action_factory.cpp @@ -27,10 +27,10 @@ #include "modules/networkconnection/state_connexion.h" #include "modules/referentialmessage/referentialmessage.h" #include "modules/referentialmessage/referentialmessagecore.h" -#include "modules/impulse/impulsebase.h" #include "action_factory.h" #include "action_genericmultipart.h" #include "action.h" +#include "modules/impulse/impulse.h" struct SPropVisualA { @@ -106,40 +106,40 @@ void ActionFactory::decode_message(NetworkData * data, Ref msgin) Dictionary value; ReferentialMessage ref_msg; uint32_t id = ref_msg.read_command(msgin); - DBG_PRINT("Decode message:" + ImpulseBase::get_command_name(id)); + DBG_PRINT("Decode message:" + Impulse::extract_command_name(id)); value["action"] = Action::CODE::ACTION_GENERIC_CODE; value["impulse"] = id; #ifdef DEBUG_ENABLED value["action_debug"] = "ACTION_GENERIC_CODE"; - value["impulse_debug"] = ImpulseBase::get_command_name(id); + value["impulse_debug"] = Impulse::extract_command_name(id); #endif switch(id) { - case ImpulseBase::Impulse::TARGET_PARTY: + case Impulse::TARGET_PARTY: { break; } - case ImpulseBase::Impulse::TARGET_INVENTORY: + case Impulse::TARGET_INVENTORY: { break; } - case ImpulseBase::Impulse::TARGET_FOLLOW: + case Impulse::TARGET_FOLLOW: { break; } - case ImpulseBase::Impulse::TARGET_NO_FOLLOW: + case Impulse::TARGET_NO_FOLLOW: { break; } - case ImpulseBase::Impulse::CONNECTION_USER_CHAR: + case Impulse::CONNECTION_USER_CHAR: { break; } - case ImpulseBase::Impulse::CONNECTION_NO_USER_CHAR: + case Impulse::CONNECTION_NO_USER_CHAR: { break; } - case ImpulseBase::Impulse::CONNECTION_USER_CHARS: + case Impulse::CONNECTION_USER_CHARS: { // khanat-opennel-code/code/ryzom/client/src/net_manager.cpp void impulseUserChars(NLMISC::CBitMemStream &impulse) // khanat-opennel-code/code/ryzom/server/src/entities_game_service/entity_manager/entity_callbacks.cpp void sendCharactersSummary( CPlayer *player, bool AllAutorized, uint32 bitfieldOwnerOfActiveAnimSession, uint32 bitfieldOwnerOfEditSession ) @@ -249,871 +249,871 @@ void ActionFactory::decode_message(NetworkData * data, Ref msgin) break; } - case ImpulseBase::Impulse::CONNECTION_CREATE_CHAR: + case Impulse::CONNECTION_CREATE_CHAR: { break; } - case ImpulseBase::Impulse::CONNECTION_SELECT_CHAR: + case Impulse::CONNECTION_SELECT_CHAR: { break; } - case ImpulseBase::Impulse::CONNECTION_DELETE_CHAR: + case Impulse::CONNECTION_DELETE_CHAR: { break; } - case ImpulseBase::Impulse::CONNECTION_RENAME_CHAR: + case Impulse::CONNECTION_RENAME_CHAR: { break; } - case ImpulseBase::Impulse::CONNECTION_ENTER: + case Impulse::CONNECTION_ENTER: { break; } - case ImpulseBase::Impulse::CONNECTION_READY: + case Impulse::CONNECTION_READY: { break; } - case ImpulseBase::Impulse::CONNECTION_TIME_DATE_SYNCHRO: + case Impulse::CONNECTION_TIME_DATE_SYNCHRO: { break; } - case ImpulseBase::Impulse::CONNECTION_ASK_NAME: + case Impulse::CONNECTION_ASK_NAME: { break; } - case ImpulseBase::Impulse::CONNECTION_VALID_NAME: + case Impulse::CONNECTION_VALID_NAME: { break; } - case ImpulseBase::Impulse::CONNECTION_CREATE_CHAR_ERROR: + case Impulse::CONNECTION_CREATE_CHAR_ERROR: { break; } - case ImpulseBase::Impulse::CONNECTION_RECONNECT: + case Impulse::CONNECTION_RECONNECT: { break; } - case ImpulseBase::Impulse::CONNECTION_SERVER_RECONNECT_OK: + case Impulse::CONNECTION_SERVER_RECONNECT_OK: { break; } - case ImpulseBase::Impulse::CONNECTION_SHARD_ID: + case Impulse::CONNECTION_SHARD_ID: { break; } - case ImpulseBase::Impulse::CONNECTION_SERVER_QUIT_OK: + case Impulse::CONNECTION_SERVER_QUIT_OK: { break; } - case ImpulseBase::Impulse::CONNECTION_SERVER_QUIT_ABORT: + case Impulse::CONNECTION_SERVER_QUIT_ABORT: { break; } - case ImpulseBase::Impulse::CONNECTION_CLIENT_QUIT_REQUEST: + case Impulse::CONNECTION_CLIENT_QUIT_REQUEST: { break; } - case ImpulseBase::Impulse::CONNECTION_MAIL_AVAILABLE: + case Impulse::CONNECTION_MAIL_AVAILABLE: { break; } - case ImpulseBase::Impulse::CONNECTION_GUILD_MESSAGE_AVAILABLE: + case Impulse::CONNECTION_GUILD_MESSAGE_AVAILABLE: { break; } - case ImpulseBase::Impulse::CONNECTION_PERMANENT_BAN: + case Impulse::CONNECTION_PERMANENT_BAN: { break; } - case ImpulseBase::Impulse::CONNECTION_UNBAN: + case Impulse::CONNECTION_UNBAN: { break; } - case ImpulseBase::Impulse::CONNECTION_FAR_TP: + case Impulse::CONNECTION_FAR_TP: { break; } - case ImpulseBase::Impulse::CONNECTION_RET_MAINLAND: + case Impulse::CONNECTION_RET_MAINLAND: { break; } - case ImpulseBase::Impulse::DB_UPD_PLR: + case Impulse::DB_UPD_PLR: { break; } - case ImpulseBase::Impulse::DB_UPD_INV: + case Impulse::DB_UPD_INV: { break; } - case ImpulseBase::Impulse::DB_INIT_PLR: + case Impulse::DB_INIT_PLR: { break; } - case ImpulseBase::Impulse::DB_INIT_INV: + case Impulse::DB_INIT_INV: { break; } - case ImpulseBase::Impulse::DB_GROUP_UPDATE_BANK: + case Impulse::DB_GROUP_UPDATE_BANK: { break; } - case ImpulseBase::Impulse::DB_GROUP_INIT_BANK: + case Impulse::DB_GROUP_INIT_BANK: { break; } - case ImpulseBase::Impulse::DB_GROUP_RESET_BANK: + case Impulse::DB_GROUP_RESET_BANK: { break; } - case ImpulseBase::Impulse::POSITION: + case Impulse::POSITION: { break; } - case ImpulseBase::Impulse::HARVEST_DEPOSIT: + case Impulse::HARVEST_DEPOSIT: { break; } - case ImpulseBase::Impulse::HARVEST_CORPSE: + case Impulse::HARVEST_CORPSE: { break; } - case ImpulseBase::Impulse::HARVEST_INTERRUPT: + case Impulse::HARVEST_INTERRUPT: { break; } - case ImpulseBase::Impulse::HARVEST_CLOSE_TEMP_INVENTORY: + case Impulse::HARVEST_CLOSE_TEMP_INVENTORY: { break; } - case ImpulseBase::Impulse::TRAINING: + case Impulse::TRAINING: { break; } - case ImpulseBase::Impulse::JOB_SET_JOB_STATUS: + case Impulse::JOB_SET_JOB_STATUS: { break; } - case ImpulseBase::Impulse::JOB_SWAP_JOB_STATUS: + case Impulse::JOB_SWAP_JOB_STATUS: { break; } - case ImpulseBase::Impulse::CASTING_BEGIN: + case Impulse::CASTING_BEGIN: { break; } - case ImpulseBase::Impulse::CASTING_INTERRUPT: + case Impulse::CASTING_INTERRUPT: { break; } - case ImpulseBase::Impulse::FABER_OPEN: + case Impulse::FABER_OPEN: { break; } - case ImpulseBase::Impulse::FABER_CLOSE: + case Impulse::FABER_CLOSE: { break; } - case ImpulseBase::Impulse::FABER_EXECUTE: + case Impulse::FABER_EXECUTE: { break; } - case ImpulseBase::Impulse::FABER_SET_NUM_ITEM: + case Impulse::FABER_SET_NUM_ITEM: { break; } - case ImpulseBase::Impulse::FABER_START_CREATE: + case Impulse::FABER_START_CREATE: { break; } - case ImpulseBase::Impulse::FABER_START_REPAIR: + case Impulse::FABER_START_REPAIR: { break; } - case ImpulseBase::Impulse::FABER_START_REFINE: + case Impulse::FABER_START_REFINE: { break; } - case ImpulseBase::Impulse::FABER_SET_MP_QUALITY: + case Impulse::FABER_SET_MP_QUALITY: { break; } - case ImpulseBase::Impulse::FABER_SET_MP_REFINE: + case Impulse::FABER_SET_MP_REFINE: { break; } - case ImpulseBase::Impulse::FABER_SET_TOOL: + case Impulse::FABER_SET_TOOL: { break; } - case ImpulseBase::Impulse::FABER_RESET_TOOL: + case Impulse::FABER_RESET_TOOL: { break; } - case ImpulseBase::Impulse::FABER_INTERRUPT: + case Impulse::FABER_INTERRUPT: { break; } - case ImpulseBase::Impulse::COMBAT_ENGAGE: + case Impulse::COMBAT_ENGAGE: { break; } - case ImpulseBase::Impulse::COMBAT_DISENGAGE: + case Impulse::COMBAT_DISENGAGE: { break; } - case ImpulseBase::Impulse::COMBAT_DEFAULT_ATTACK: + case Impulse::COMBAT_DEFAULT_ATTACK: { break; } - case ImpulseBase::Impulse::COMBAT_ENGAGE_FAILED: + case Impulse::COMBAT_ENGAGE_FAILED: { break; } - case ImpulseBase::Impulse::COMBAT_VALIDATE_MELEE: + case Impulse::COMBAT_VALIDATE_MELEE: { break; } - case ImpulseBase::Impulse::COMBAT_PARRY: + case Impulse::COMBAT_PARRY: { break; } - case ImpulseBase::Impulse::COMBAT_DODGE: + case Impulse::COMBAT_DODGE: { break; } - case ImpulseBase::Impulse::COMBAT_PROTECTED_SLOT: + case Impulse::COMBAT_PROTECTED_SLOT: { break; } - case ImpulseBase::Impulse::COMBAT_FLYING_ChaScore1_DELTA: + case Impulse::COMBAT_FLYING_ChaScore1_DELTA: { break; } - case ImpulseBase::Impulse::COMBAT_FLYING_TEXT_ISE: + case Impulse::COMBAT_FLYING_TEXT_ISE: { break; } - case ImpulseBase::Impulse::COMBAT_FLYING_TEXT: + case Impulse::COMBAT_FLYING_TEXT: { break; } - case ImpulseBase::Impulse::STRING_TELL: + case Impulse::STRING_TELL: { break; } - case ImpulseBase::Impulse::STRING_FAR_TELL: + case Impulse::STRING_FAR_TELL: { break; } - case ImpulseBase::Impulse::STRING_CHAT: + case Impulse::STRING_CHAT: { break; } - case ImpulseBase::Impulse::STRING_CHAT_TEAM: + case Impulse::STRING_CHAT_TEAM: { break; } - case ImpulseBase::Impulse::STRING_ADD_DYN_STR: + case Impulse::STRING_ADD_DYN_STR: { break; } - case ImpulseBase::Impulse::STRING_FILTER: + case Impulse::STRING_FILTER: { break; } - case ImpulseBase::Impulse::STRING_CHAT_MODE: + case Impulse::STRING_CHAT_MODE: { break; } - case ImpulseBase::Impulse::STRING_CHAT2: + case Impulse::STRING_CHAT2: { break; } - case ImpulseBase::Impulse::STRING_TELL2: + case Impulse::STRING_TELL2: { break; } - case ImpulseBase::Impulse::STRING_DYN_STRING: + case Impulse::STRING_DYN_STRING: { break; } - case ImpulseBase::Impulse::STRING_DYN_STRING_GROUP: + case Impulse::STRING_DYN_STRING_GROUP: { break; } - case ImpulseBase::Impulse::STRING_AFK_TXT: + case Impulse::STRING_AFK_TXT: { break; } - case ImpulseBase::Impulse::STUN_STUN: + case Impulse::STUN_STUN: { break; } - case ImpulseBase::Impulse::STUN_WAKE_UP: + case Impulse::STUN_WAKE_UP: { break; } - case ImpulseBase::Impulse::SENTENCE_EXECUTE: + case Impulse::SENTENCE_EXECUTE: { break; } - case ImpulseBase::Impulse::SENTENCE_CANCEL: + case Impulse::SENTENCE_CANCEL: { break; } - case ImpulseBase::Impulse::SENTENCE_CANCEL_CURRENT: + case Impulse::SENTENCE_CANCEL_CURRENT: { break; } - case ImpulseBase::Impulse::SENTENCE_CANCEL_ALL: + case Impulse::SENTENCE_CANCEL_ALL: { break; } - case ImpulseBase::Impulse::SENTENCE_CLEAR: + case Impulse::SENTENCE_CLEAR: { break; } - case ImpulseBase::Impulse::SENTENCE_MEMORIZE: + case Impulse::SENTENCE_MEMORIZE: { break; } - case ImpulseBase::Impulse::SENTENCE_FORGET: + case Impulse::SENTENCE_FORGET: { break; } - case ImpulseBase::Impulse::SENTENCE_EVALUATE: + case Impulse::SENTENCE_EVALUATE: { break; } - case ImpulseBase::Impulse::SENTENCE_ADD_BRICK: + case Impulse::SENTENCE_ADD_BRICK: { break; } - case ImpulseBase::Impulse::SENTENCE_REMOVE_BRICK: + case Impulse::SENTENCE_REMOVE_BRICK: { break; } - case ImpulseBase::Impulse::SENTENCE_START: + case Impulse::SENTENCE_START: { break; } - case ImpulseBase::Impulse::SENTENCE_STOP: + case Impulse::SENTENCE_STOP: { break; } - case ImpulseBase::Impulse::TEAM_JOIN: + case Impulse::TEAM_JOIN: { break; } - case ImpulseBase::Impulse::TEAM_LEAVE: + case Impulse::TEAM_LEAVE: { break; } - case ImpulseBase::Impulse::TEAM_INVITATION: + case Impulse::TEAM_INVITATION: { break; } - case ImpulseBase::Impulse::TEAM_JOIN_PROPOSAL: + case Impulse::TEAM_JOIN_PROPOSAL: { break; } - case ImpulseBase::Impulse::TEAM_JOIN_PROPOSAL_DECLINE: + case Impulse::TEAM_JOIN_PROPOSAL_DECLINE: { break; } - case ImpulseBase::Impulse::TEAM_KICK: + case Impulse::TEAM_KICK: { break; } - case ImpulseBase::Impulse::TEAM_SET_SUCCESSOR: + case Impulse::TEAM_SET_SUCCESSOR: { break; } - case ImpulseBase::Impulse::TEAM_SHARE_OPEN: + case Impulse::TEAM_SHARE_OPEN: { break; } - case ImpulseBase::Impulse::TEAM_SHARE_VALID_ITEM: + case Impulse::TEAM_SHARE_VALID_ITEM: { break; } - case ImpulseBase::Impulse::TEAM_SHARE_INVALID_ITEM: + case Impulse::TEAM_SHARE_INVALID_ITEM: { break; } - case ImpulseBase::Impulse::TEAM_SHARE_VALID: + case Impulse::TEAM_SHARE_VALID: { break; } - case ImpulseBase::Impulse::TEAM_SHARE_INVALID: + case Impulse::TEAM_SHARE_INVALID: { break; } - case ImpulseBase::Impulse::TEAM_SHARE_CLOSE: + case Impulse::TEAM_SHARE_CLOSE: { break; } - case ImpulseBase::Impulse::TEAM_CONTACT_INIT: + case Impulse::TEAM_CONTACT_INIT: { break; } - case ImpulseBase::Impulse::TEAM_CONTACT_ADD: + case Impulse::TEAM_CONTACT_ADD: { break; } - case ImpulseBase::Impulse::TEAM_CONTACT_DEL: + case Impulse::TEAM_CONTACT_DEL: { break; } - case ImpulseBase::Impulse::TEAM_CONTACT_MOVE: + case Impulse::TEAM_CONTACT_MOVE: { break; } - case ImpulseBase::Impulse::TEAM_CONTACT_CREATE: + case Impulse::TEAM_CONTACT_CREATE: { break; } - case ImpulseBase::Impulse::TEAM_CONTACT_STATUS: + case Impulse::TEAM_CONTACT_STATUS: { break; } - case ImpulseBase::Impulse::TEAM_CONTACT_REMOVE: + case Impulse::TEAM_CONTACT_REMOVE: { break; } - case ImpulseBase::Impulse::ITEM_DROP: + case Impulse::ITEM_DROP: { break; } - case ImpulseBase::Impulse::ITEM_PICK_UP: + case Impulse::ITEM_PICK_UP: { break; } - case ImpulseBase::Impulse::ITEM_PICK_UP_CLOSE: + case Impulse::ITEM_PICK_UP_CLOSE: { break; } - case ImpulseBase::Impulse::ITEM_SWAP: + case Impulse::ITEM_SWAP: { break; } - case ImpulseBase::Impulse::ITEM_ACTIVATE_SHEATH: + case Impulse::ITEM_ACTIVATE_SHEATH: { break; } - case ImpulseBase::Impulse::ITEM_HARVEST: + case Impulse::ITEM_HARVEST: { break; } - case ImpulseBase::Impulse::ITEM_HARVEST_CLOSE: + case Impulse::ITEM_HARVEST_CLOSE: { break; } - case ImpulseBase::Impulse::ITEM_GIVE: + case Impulse::ITEM_GIVE: { break; } - case ImpulseBase::Impulse::ITEM_DESTROY: + case Impulse::ITEM_DESTROY: { break; } - case ImpulseBase::Impulse::ITEM_EQUIP: + case Impulse::ITEM_EQUIP: { break; } - case ImpulseBase::Impulse::ITEM_UNEQUIP: + case Impulse::ITEM_UNEQUIP: { break; } - case ImpulseBase::Impulse::ITEM_TEMP_TO_BAG: + case Impulse::ITEM_TEMP_TO_BAG: { break; } - case ImpulseBase::Impulse::ITEM_ALL_TEMP: + case Impulse::ITEM_ALL_TEMP: { break; } - case ImpulseBase::Impulse::ITEM_NO_TEMP: + case Impulse::ITEM_NO_TEMP: { break; } - case ImpulseBase::Impulse::ITEM_ENCHANT: + case Impulse::ITEM_ENCHANT: { break; } - case ImpulseBase::Impulse::ITEM_OPEN_ROOM_INVENTORY: + case Impulse::ITEM_OPEN_ROOM_INVENTORY: { break; } - case ImpulseBase::Impulse::ITEM_CLOSE_ROOM_INVENTORY: + case Impulse::ITEM_CLOSE_ROOM_INVENTORY: { break; } - case ImpulseBase::Impulse::ITEM_USE_ITEM: + case Impulse::ITEM_USE_ITEM: { break; } - case ImpulseBase::Impulse::ITEM_STOP_USE_XP_CAT: + case Impulse::ITEM_STOP_USE_XP_CAT: { break; } - case ImpulseBase::Impulse::TP_RESPAWN: + case Impulse::TP_RESPAWN: { break; } - case ImpulseBase::Impulse::TP_BOT: + case Impulse::TP_BOT: { break; } - case ImpulseBase::Impulse::TP_WANTED: + case Impulse::TP_WANTED: { break; } - case ImpulseBase::Impulse::TP_DEST: + case Impulse::TP_DEST: { break; } - case ImpulseBase::Impulse::TP_DEST_WITH_SEASON: + case Impulse::TP_DEST_WITH_SEASON: { break; } - case ImpulseBase::Impulse::TP_ACK: + case Impulse::TP_ACK: { break; } - case ImpulseBase::Impulse::TP_CORRECT: + case Impulse::TP_CORRECT: { break; } - case ImpulseBase::Impulse::DEATH_RESPAWN_POINT: + case Impulse::DEATH_RESPAWN_POINT: { break; } - case ImpulseBase::Impulse::DEATH_ASK_RESPAWN: + case Impulse::DEATH_ASK_RESPAWN: { break; } - case ImpulseBase::Impulse::DEATH_RESPAWN: + case Impulse::DEATH_RESPAWN: { break; } - case ImpulseBase::Impulse::ANIMALS_BEAST: + case Impulse::ANIMALS_BEAST: { break; } - case ImpulseBase::Impulse::ANIMALS_MOUNT_ABORT: + case Impulse::ANIMALS_MOUNT_ABORT: { break; } - case ImpulseBase::Impulse::EXCHANGE_INVITATION: + case Impulse::EXCHANGE_INVITATION: { break; } - case ImpulseBase::Impulse::EXCHANGE_CLOSE_INVITATION: + case Impulse::EXCHANGE_CLOSE_INVITATION: { break; } - case ImpulseBase::Impulse::EXCHANGE_PROPOSAL: + case Impulse::EXCHANGE_PROPOSAL: { break; } - case ImpulseBase::Impulse::EXCHANGE_ACCEPT_INVITATION: + case Impulse::EXCHANGE_ACCEPT_INVITATION: { break; } - case ImpulseBase::Impulse::EXCHANGE_DECLINE_INVITATION: + case Impulse::EXCHANGE_DECLINE_INVITATION: { break; } - case ImpulseBase::Impulse::EXCHANGE_VALIDATE: + case Impulse::EXCHANGE_VALIDATE: { break; } - case ImpulseBase::Impulse::EXCHANGE_INVALIDATE: + case Impulse::EXCHANGE_INVALIDATE: { break; } - case ImpulseBase::Impulse::EXCHANGE_END: + case Impulse::EXCHANGE_END: { break; } - case ImpulseBase::Impulse::EXCHANGE_SEEDS: + case Impulse::EXCHANGE_SEEDS: { break; } - case ImpulseBase::Impulse::EXCHANGE_ADD: + case Impulse::EXCHANGE_ADD: { break; } - case ImpulseBase::Impulse::EXCHANGE_REMOVE: + case Impulse::EXCHANGE_REMOVE: { break; } - case ImpulseBase::Impulse::DEBUG_WHERE: + case Impulse::DEBUG_WHERE: { break; } - case ImpulseBase::Impulse::DEBUG_WHO: + case Impulse::DEBUG_WHO: { break; } - case ImpulseBase::Impulse::DEBUG_REPLY_WHERE: + case Impulse::DEBUG_REPLY_WHERE: { break; } - case ImpulseBase::Impulse::DEBUG_SERVICES: + case Impulse::DEBUG_SERVICES: { break; } - case ImpulseBase::Impulse::DEBUG_CMD: + case Impulse::DEBUG_CMD: { break; } - case ImpulseBase::Impulse::DEBUG_PING: + case Impulse::DEBUG_PING: { break; } - case ImpulseBase::Impulse::DEBUG_COUNTER: + case Impulse::DEBUG_COUNTER: { break; } - case ImpulseBase::Impulse::COMMAND_EMOTE: + case Impulse::COMMAND_EMOTE: { break; } - case ImpulseBase::Impulse::COMMAND_CUSTOM_EMOTE: + case Impulse::COMMAND_CUSTOM_EMOTE: { break; } - case ImpulseBase::Impulse::COMMAND_WHERE: + case Impulse::COMMAND_WHERE: { break; } - case ImpulseBase::Impulse::COMMAND_ADMIN: + case Impulse::COMMAND_ADMIN: { break; } - case ImpulseBase::Impulse::COMMAND_ADMIN_OFFLINE: + case Impulse::COMMAND_ADMIN_OFFLINE: { break; } - case ImpulseBase::Impulse::COMMAND_REMOTE_ADMIN: + case Impulse::COMMAND_REMOTE_ADMIN: { break; } - case ImpulseBase::Impulse::COMMAND_REMOTE_ADMIN_ANSWER: + case Impulse::COMMAND_REMOTE_ADMIN_ANSWER: { break; } - case ImpulseBase::Impulse::COMMAND_SIT: + case Impulse::COMMAND_SIT: { break; } - case ImpulseBase::Impulse::COMMAND_AFK: + case Impulse::COMMAND_AFK: { break; } - case ImpulseBase::Impulse::COMMAND_RANDOM: + case Impulse::COMMAND_RANDOM: { break; } - case ImpulseBase::Impulse::COMMAND_GUILDMOTD: + case Impulse::COMMAND_GUILDMOTD: { break; } - case ImpulseBase::Impulse::MP_EVAL_SET_MP: + case Impulse::MP_EVAL_SET_MP: { break; } - case ImpulseBase::Impulse::MP_EVAL_SET_MP_LEVEL: + case Impulse::MP_EVAL_SET_MP_LEVEL: { break; } - case ImpulseBase::Impulse::MP_EVAL_SET_MARKET: + case Impulse::MP_EVAL_SET_MARKET: { break; } - case ImpulseBase::Impulse::MP_EVAL_EXECUTE: + case Impulse::MP_EVAL_EXECUTE: { break; } - case ImpulseBase::Impulse::BOTCHAT_NEXT_PAGE_ITEM: + case Impulse::BOTCHAT_NEXT_PAGE_ITEM: { break; } - case ImpulseBase::Impulse::BOTCHAT_NEXT_PAGE_MISSION: + case Impulse::BOTCHAT_NEXT_PAGE_MISSION: { break; } - case ImpulseBase::Impulse::BOTCHAT_START_TRADE_ITEM: + case Impulse::BOTCHAT_START_TRADE_ITEM: { break; } - case ImpulseBase::Impulse::BOTCHAT_START_TRADE_TELEPORT: + case Impulse::BOTCHAT_START_TRADE_TELEPORT: { break; } - case ImpulseBase::Impulse::BOTCHAT_START_TRADE_FACTION: + case Impulse::BOTCHAT_START_TRADE_FACTION: { break; } - case ImpulseBase::Impulse::BOTCHAT_START_TRADE_SKILL: + case Impulse::BOTCHAT_START_TRADE_SKILL: { break; } - case ImpulseBase::Impulse::BOTCHAT_START_TRADE_PACT: + case Impulse::BOTCHAT_START_TRADE_PACT: { break; } - case ImpulseBase::Impulse::BOTCHAT_START_TRADE_ACTION: + case Impulse::BOTCHAT_START_TRADE_ACTION: { break; } - case ImpulseBase::Impulse::BOTCHAT_BUY: + case Impulse::BOTCHAT_BUY: { break; } - case ImpulseBase::Impulse::BOTCHAT_SELL: + case Impulse::BOTCHAT_SELL: { break; } - case ImpulseBase::Impulse::BOTCHAT_DESTROY_ITEM: + case Impulse::BOTCHAT_DESTROY_ITEM: { break; } - case ImpulseBase::Impulse::BOTCHAT_REFRESH_TRADE_LIST: + case Impulse::BOTCHAT_REFRESH_TRADE_LIST: { break; } - case ImpulseBase::Impulse::BOTCHAT_SET_FILTERS: + case Impulse::BOTCHAT_SET_FILTERS: { break; } - case ImpulseBase::Impulse::BOTCHAT_START_CHOOSE_MISSION: + case Impulse::BOTCHAT_START_CHOOSE_MISSION: { break; } - case ImpulseBase::Impulse::BOTCHAT_START_DYNAMIC_MISSION: + case Impulse::BOTCHAT_START_DYNAMIC_MISSION: { break; } - case ImpulseBase::Impulse::BOTCHAT_CONTINUE_MISSION: + case Impulse::BOTCHAT_CONTINUE_MISSION: { break; } - case ImpulseBase::Impulse::BOTCHAT_VALIDATE_PLAYER_GIFT: + case Impulse::BOTCHAT_VALIDATE_PLAYER_GIFT: { break; } - case ImpulseBase::Impulse::BOTCHAT_PICK_MISSION: + case Impulse::BOTCHAT_PICK_MISSION: { break; } - case ImpulseBase::Impulse::BOTCHAT_DM_CHOICE: + case Impulse::BOTCHAT_DM_CHOICE: { break; } - case ImpulseBase::Impulse::BOTCHAT_DM_ACCEPT: + case Impulse::BOTCHAT_DM_ACCEPT: { break; } - case ImpulseBase::Impulse::BOTCHAT_START_NEWS: + case Impulse::BOTCHAT_START_NEWS: { break; } - case ImpulseBase::Impulse::BOTCHAT_START_CREATE_GUILD: + case Impulse::BOTCHAT_START_CREATE_GUILD: { break; } - case ImpulseBase::Impulse::BOTCHAT_END: + case Impulse::BOTCHAT_END: { break; } - case ImpulseBase::Impulse::BOTCHAT_FORCE_END: + case Impulse::BOTCHAT_FORCE_END: { break; } - case ImpulseBase::Impulse::BOTCHAT_START_CHOOSE_DUTY: + case Impulse::BOTCHAT_START_CHOOSE_DUTY: { break; } - case ImpulseBase::Impulse::BOTCHAT_NEXT_PAGE_DUTY: + case Impulse::BOTCHAT_NEXT_PAGE_DUTY: { break; } - case ImpulseBase::Impulse::BOTCHAT_DUTY_APPLY: + case Impulse::BOTCHAT_DUTY_APPLY: { break; } - case ImpulseBase::Impulse::BOTCHAT_DUTY_CANCEL_APPLY: + case Impulse::BOTCHAT_DUTY_CANCEL_APPLY: { break; } - case ImpulseBase::Impulse::BOTCHAT_START_TRADE_GUILD_OPTIONS: + case Impulse::BOTCHAT_START_TRADE_GUILD_OPTIONS: { break; } - case ImpulseBase::Impulse::BOTCHAT_BUY_GUILD_OPTION: + case Impulse::BOTCHAT_BUY_GUILD_OPTION: { break; } - case ImpulseBase::Impulse::BOTCHAT_START_GUILD_RESEARCH: + case Impulse::BOTCHAT_START_GUILD_RESEARCH: { break; } - case ImpulseBase::Impulse::BOTCHAT_DESTROY_BUILDING: + case Impulse::BOTCHAT_DESTROY_BUILDING: { break; } - case ImpulseBase::Impulse::BOTCHAT_DYNCHAT_OPEN: + case Impulse::BOTCHAT_DYNCHAT_OPEN: { break; } - case ImpulseBase::Impulse::BOTCHAT_DYNCHAT_CLOSE: + case Impulse::BOTCHAT_DYNCHAT_CLOSE: { break; } - case ImpulseBase::Impulse::BOTCHAT_DYNCHAT_SEND: + case Impulse::BOTCHAT_DYNCHAT_SEND: { break; } - case ImpulseBase::Impulse::JOURNAL_INIT_COMPLETED_MISSIONS: + case Impulse::JOURNAL_INIT_COMPLETED_MISSIONS: { break; } - case ImpulseBase::Impulse::JOURNAL_UPDATE_COMPLETED_MISSIONS: + case Impulse::JOURNAL_UPDATE_COMPLETED_MISSIONS: { break; } - case ImpulseBase::Impulse::JOURNAL_MISSION_ABANDON: + case Impulse::JOURNAL_MISSION_ABANDON: { break; } - case ImpulseBase::Impulse::JOURNAL_GROUP_MISSION_ABANDON: + case Impulse::JOURNAL_GROUP_MISSION_ABANDON: { break; } - case ImpulseBase::Impulse::JOURNAL_ADD_COMPASS: + case Impulse::JOURNAL_ADD_COMPASS: { break; } - case ImpulseBase::Impulse::JOURNAL_ADD_COMPASS_BOT: + case Impulse::JOURNAL_ADD_COMPASS_BOT: { break; } - case ImpulseBase::Impulse::JOURNAL_REMOVE_COMPASS: + case Impulse::JOURNAL_REMOVE_COMPASS: { break; } - case ImpulseBase::Impulse::JOURNAL_REMOVE_COMPASS_BOT: + case Impulse::JOURNAL_REMOVE_COMPASS_BOT: { break; } - case ImpulseBase::Impulse::STRING_MANAGER_SET_LANGUAGE: + case Impulse::STRING_MANAGER_SET_LANGUAGE: { break; } - case ImpulseBase::Impulse::STRING_MANAGER_PHRASE_SEND: + case Impulse::STRING_MANAGER_PHRASE_SEND: { uint32_t dyn_id = msgin->get_uint32(); value["dyn_id"] = dyn_id; @@ -1124,15 +1124,15 @@ void ActionFactory::decode_message(NetworkData * data, Ref msgin) value["string_id"] = string_id; break; } - case ImpulseBase::Impulse::STRING_MANAGER_STRING_RQ: + case Impulse::STRING_MANAGER_STRING_RQ: { break; } - case ImpulseBase::Impulse::STRING_MANAGER_STRING_RESP: + case Impulse::STRING_MANAGER_STRING_RESP: { uint32_t string_id = msgin->get_uint32(); String str_utf8 = msgin->get_string_utf8(); - DBG_PRINT("Decode message:" + ImpulseBase::get_command_name(id) + " string_id:" + itos(string_id) + " str_utf8:" + str_utf8); + DBG_PRINT("Decode message:" + Impulse::extract_command_name(id) + " string_id:" + itos(string_id) + " str_utf8:" + str_utf8); //param.push_back(timestamp); value["string_id"] = string_id; @@ -1140,10 +1140,10 @@ void ActionFactory::decode_message(NetworkData * data, Ref msgin) break; } - case ImpulseBase::Impulse::STRING_MANAGER_RELOAD_CACHE: + case Impulse::STRING_MANAGER_RELOAD_CACHE: { uint32_t timestamp = msgin->get_uint32(); - DBG_PRINT("Decode message:" + ImpulseBase::get_command_name(id) + " timestamp:" + itos(timestamp)); + DBG_PRINT("Decode message:" + Impulse::extract_command_name(id) + " timestamp:" + itos(timestamp)); //param.push_back(timestamp); value["timestamp"] = timestamp; @@ -1151,431 +1151,431 @@ void ActionFactory::decode_message(NetworkData * data, Ref msgin) //data->_server_messages.push_back(value); break; } - case ImpulseBase::Impulse::GUILD_CREATE: + case Impulse::GUILD_CREATE: { break; } - case ImpulseBase::Impulse::GUILD_ABORT_CREATION: + case Impulse::GUILD_ABORT_CREATION: { break; } - case ImpulseBase::Impulse::GUILD_OPEN_GUILD_WINDOW: + case Impulse::GUILD_OPEN_GUILD_WINDOW: { break; } - case ImpulseBase::Impulse::GUILD_INVITATION: + case Impulse::GUILD_INVITATION: { break; } - case ImpulseBase::Impulse::GUILD_ACCEPT_INVITATION: + case Impulse::GUILD_ACCEPT_INVITATION: { break; } - case ImpulseBase::Impulse::GUILD_REFUSE_INVITATION: + case Impulse::GUILD_REFUSE_INVITATION: { break; } - case ImpulseBase::Impulse::GUILD_JOIN_PROPOSAL: + case Impulse::GUILD_JOIN_PROPOSAL: { break; } - case ImpulseBase::Impulse::GUILD_SET_GRADE: + case Impulse::GUILD_SET_GRADE: { break; } - case ImpulseBase::Impulse::GUILD_SET_LEADER: + case Impulse::GUILD_SET_LEADER: { break; } - case ImpulseBase::Impulse::GUILD_KICK_MEMBER: + case Impulse::GUILD_KICK_MEMBER: { break; } - case ImpulseBase::Impulse::GUILD_TELEPORT: + case Impulse::GUILD_TELEPORT: { break; } - case ImpulseBase::Impulse::GUILD_ASCENSOR: + case Impulse::GUILD_ASCENSOR: { break; } - case ImpulseBase::Impulse::GUILD_FIRST_ASCENSOR_PAGE: + case Impulse::GUILD_FIRST_ASCENSOR_PAGE: { break; } - case ImpulseBase::Impulse::GUILD_NEXT_ASCENSOR_PAGE: + case Impulse::GUILD_NEXT_ASCENSOR_PAGE: { break; } - case ImpulseBase::Impulse::GUILD_LEAVE_ASCENSOR: + case Impulse::GUILD_LEAVE_ASCENSOR: { break; } - case ImpulseBase::Impulse::GUILD_QUIT: + case Impulse::GUILD_QUIT: { break; } - case ImpulseBase::Impulse::GUILD_SET_PLAYER_TITLE: + case Impulse::GUILD_SET_PLAYER_TITLE: { break; } - case ImpulseBase::Impulse::GUILD_UPDATE_PLAYER_TITLE: + case Impulse::GUILD_UPDATE_PLAYER_TITLE: { break; } - case ImpulseBase::Impulse::GUILD_USE_FEMALE_TITLES: + case Impulse::GUILD_USE_FEMALE_TITLES: { break; } - case ImpulseBase::Impulse::GUILD_PUT_MONEY: + case Impulse::GUILD_PUT_MONEY: { break; } - case ImpulseBase::Impulse::GUILD_TAKE_MONEY: + case Impulse::GUILD_TAKE_MONEY: { break; } - case ImpulseBase::Impulse::GUILD_OPEN_INVENTORY: + case Impulse::GUILD_OPEN_INVENTORY: { break; } - case ImpulseBase::Impulse::GUILD_CLOSE_INVENTORY: + case Impulse::GUILD_CLOSE_INVENTORY: { break; } - case ImpulseBase::Impulse::OUTPOST_GIVEUP_OUTPOST: + case Impulse::OUTPOST_GIVEUP_OUTPOST: { break; } - case ImpulseBase::Impulse::OUTPOST_SELECT: + case Impulse::OUTPOST_SELECT: { break; } - case ImpulseBase::Impulse::OUTPOST_UNSELECT: + case Impulse::OUTPOST_UNSELECT: { break; } - case ImpulseBase::Impulse::OUTPOST_DECLARE_WAR_START: + case Impulse::OUTPOST_DECLARE_WAR_START: { break; } - case ImpulseBase::Impulse::OUTPOST_DECLARE_WAR_ACK: + case Impulse::OUTPOST_DECLARE_WAR_ACK: { break; } - case ImpulseBase::Impulse::OUTPOST_DECLARE_WAR_VALIDATE: + case Impulse::OUTPOST_DECLARE_WAR_VALIDATE: { break; } - case ImpulseBase::Impulse::OUTPOST_SET_DEF_PERIOD: + case Impulse::OUTPOST_SET_DEF_PERIOD: { break; } - case ImpulseBase::Impulse::OUTPOST_SET_SQUAD: + case Impulse::OUTPOST_SET_SQUAD: { break; } - case ImpulseBase::Impulse::OUTPOST_SET_SQUAD_SPAWN: + case Impulse::OUTPOST_SET_SQUAD_SPAWN: { break; } - case ImpulseBase::Impulse::OUTPOST_INSERT_SQUAD: + case Impulse::OUTPOST_INSERT_SQUAD: { break; } - case ImpulseBase::Impulse::OUTPOST_REMOVE_SQUAD: + case Impulse::OUTPOST_REMOVE_SQUAD: { break; } - case ImpulseBase::Impulse::OUTPOST_SET_SQUAD_CAPITAL: + case Impulse::OUTPOST_SET_SQUAD_CAPITAL: { break; } - case ImpulseBase::Impulse::OUTPOST_CHOOSE_SIDE: + case Impulse::OUTPOST_CHOOSE_SIDE: { break; } - case ImpulseBase::Impulse::OUTPOST_SIDE_CHOSEN: + case Impulse::OUTPOST_SIDE_CHOSEN: { break; } - case ImpulseBase::Impulse::OUTPOST_BANISH_PLAYER: + case Impulse::OUTPOST_BANISH_PLAYER: { break; } - case ImpulseBase::Impulse::OUTPOST_BANISH_GUILD: + case Impulse::OUTPOST_BANISH_GUILD: { break; } - case ImpulseBase::Impulse::OUTPOST_BUY_BUILDING: + case Impulse::OUTPOST_BUY_BUILDING: { break; } - case ImpulseBase::Impulse::OUTPOST_DESTROY_BUILDING: + case Impulse::OUTPOST_DESTROY_BUILDING: { break; } - case ImpulseBase::Impulse::PHRASE_DELETE: + case Impulse::PHRASE_DELETE: { break; } - case ImpulseBase::Impulse::PHRASE_LEARN: + case Impulse::PHRASE_LEARN: { break; } - case ImpulseBase::Impulse::PHRASE_MEMORIZE: + case Impulse::PHRASE_MEMORIZE: { break; } - case ImpulseBase::Impulse::PHRASE_FORGET: + case Impulse::PHRASE_FORGET: { break; } - case ImpulseBase::Impulse::PHRASE_EXECUTE: + case Impulse::PHRASE_EXECUTE: { break; } - case ImpulseBase::Impulse::PHRASE_EXECUTE_CYCLIC: + case Impulse::PHRASE_EXECUTE_CYCLIC: { break; } - case ImpulseBase::Impulse::PHRASE_EXECUTE_FABER: + case Impulse::PHRASE_EXECUTE_FABER: { break; } - case ImpulseBase::Impulse::PHRASE_DOWNLOAD: + case Impulse::PHRASE_DOWNLOAD: { break; } - case ImpulseBase::Impulse::PHRASE_BUY: + case Impulse::PHRASE_BUY: { break; } - case ImpulseBase::Impulse::PHRASE_CONFIRM_BUY: + case Impulse::PHRASE_CONFIRM_BUY: { break; } - case ImpulseBase::Impulse::PHRASE_BUY_SHEET: + case Impulse::PHRASE_BUY_SHEET: { break; } - case ImpulseBase::Impulse::PHRASE_CANCEL_LINK: + case Impulse::PHRASE_CANCEL_LINK: { break; } - case ImpulseBase::Impulse::PHRASE_CANCEL_TOP: + case Impulse::PHRASE_CANCEL_TOP: { break; } - case ImpulseBase::Impulse::PHRASE_CANCEL_ALL: + case Impulse::PHRASE_CANCEL_ALL: { break; } - case ImpulseBase::Impulse::PHRASE_CRISTALIZE: + case Impulse::PHRASE_CRISTALIZE: { break; } - case ImpulseBase::Impulse::PHRASE_EXEC_CYCLIC_ACK: + case Impulse::PHRASE_EXEC_CYCLIC_ACK: { break; } - case ImpulseBase::Impulse::PHRASE_EXEC_NEXT_ACK: + case Impulse::PHRASE_EXEC_NEXT_ACK: { break; } - case ImpulseBase::Impulse::ITEM_INFO_GET: + case Impulse::ITEM_INFO_GET: { break; } - case ImpulseBase::Impulse::ITEM_INFO_SET: + case Impulse::ITEM_INFO_SET: { break; } - case ImpulseBase::Impulse::ITEM_INFO_REFRESH_VERSION: + case Impulse::ITEM_INFO_REFRESH_VERSION: { break; } - case ImpulseBase::Impulse::MISSION_PREREQ_GET: + case Impulse::MISSION_PREREQ_GET: { break; } - case ImpulseBase::Impulse::MISSION_PREREQ_SET: + case Impulse::MISSION_PREREQ_SET: { break; } - case ImpulseBase::Impulse::MISSION_ENTER_CRITICAL: + case Impulse::MISSION_ENTER_CRITICAL: { break; } - case ImpulseBase::Impulse::MISSION_ASK_ENTER_CRITICAL: + case Impulse::MISSION_ASK_ENTER_CRITICAL: { break; } - case ImpulseBase::Impulse::MISSION_CLOSE_ENTER_CRITICAL: + case Impulse::MISSION_CLOSE_ENTER_CRITICAL: { break; } - case ImpulseBase::Impulse::MISSION_WAKE: + case Impulse::MISSION_WAKE: { break; } - case ImpulseBase::Impulse::MISSION_GROUP_WAKE: + case Impulse::MISSION_GROUP_WAKE: { break; } - case ImpulseBase::Impulse::DUEL_ASK: + case Impulse::DUEL_ASK: { break; } - case ImpulseBase::Impulse::DUEL_ACCEPT: + case Impulse::DUEL_ACCEPT: { break; } - case ImpulseBase::Impulse::DUEL_REFUSE: + case Impulse::DUEL_REFUSE: { break; } - case ImpulseBase::Impulse::DUEL_ABANDON: + case Impulse::DUEL_ABANDON: { break; } - case ImpulseBase::Impulse::DUEL_INVITATION: + case Impulse::DUEL_INVITATION: { break; } - case ImpulseBase::Impulse::DUEL_CANCEL_INVITATION: + case Impulse::DUEL_CANCEL_INVITATION: { break; } - case ImpulseBase::Impulse::PVP_CHALLENGE_ASK: + case Impulse::PVP_CHALLENGE_ASK: { break; } - case ImpulseBase::Impulse::PVP_CHALLENGE_ACCEPT: + case Impulse::PVP_CHALLENGE_ACCEPT: { break; } - case ImpulseBase::Impulse::PVP_CHALLENGE_REFUSE: + case Impulse::PVP_CHALLENGE_REFUSE: { break; } - case ImpulseBase::Impulse::PVP_CHALLENGE_ABANDON: + case Impulse::PVP_CHALLENGE_ABANDON: { break; } - case ImpulseBase::Impulse::PVP_CHALLENGE_INVITATION: + case Impulse::PVP_CHALLENGE_INVITATION: { break; } - case ImpulseBase::Impulse::PVP_CHALLENGE_CANCEL_INVITATION: + case Impulse::PVP_CHALLENGE_CANCEL_INVITATION: { break; } - case ImpulseBase::Impulse::PVP_PVP_TAG: + case Impulse::PVP_PVP_TAG: { break; } - case ImpulseBase::Impulse::PVP_SET_NEUTRAL_ALLEGIANCE: + case Impulse::PVP_SET_NEUTRAL_ALLEGIANCE: { break; } - case ImpulseBase::Impulse::PVP_SET_NEUTRAL_ALLEGIANCE_GUILD: + case Impulse::PVP_SET_NEUTRAL_ALLEGIANCE_GUILD: { break; } - case ImpulseBase::Impulse::PVP_FACTION_PUSH_FACTION_WAR: + case Impulse::PVP_FACTION_PUSH_FACTION_WAR: { break; } - case ImpulseBase::Impulse::PVP_FACTION_POP_FACTION_WAR: + case Impulse::PVP_FACTION_POP_FACTION_WAR: { break; } - case ImpulseBase::Impulse::PVP_FACTION_FACTION_WARS: + case Impulse::PVP_FACTION_FACTION_WARS: { break; } - case ImpulseBase::Impulse::ENCYCLOPEDIA_UPDATE: + case Impulse::ENCYCLOPEDIA_UPDATE: { break; } - case ImpulseBase::Impulse::ENCYCLOPEDIA_INIT: + case Impulse::ENCYCLOPEDIA_INIT: { break; } - case ImpulseBase::Impulse::USER_BARS: + case Impulse::USER_BARS: { break; } - case ImpulseBase::Impulse::USER_POPUP: + case Impulse::USER_POPUP: { break; } - case ImpulseBase::Impulse::EVENT_SET_ITEM_CUSTOM_TEXT: + case Impulse::EVENT_SET_ITEM_CUSTOM_TEXT: { break; } - case ImpulseBase::Impulse::EVENT_DUMMY: + case Impulse::EVENT_DUMMY: { break; } - case ImpulseBase::Impulse::TOTEM_BUILD: + case Impulse::TOTEM_BUILD: { break; } - case ImpulseBase::Impulse::TOTEM_DUMMY: + case Impulse::TOTEM_DUMMY: { break; } - case ImpulseBase::Impulse::MODULE_GATEWAY_FEOPEN: + case Impulse::MODULE_GATEWAY_FEOPEN: { break; } - case ImpulseBase::Impulse::MODULE_GATEWAY_GATEWAY_MSG: + case Impulse::MODULE_GATEWAY_GATEWAY_MSG: { break; } - case ImpulseBase::Impulse::MODULE_GATEWAY_FECLOSE: + case Impulse::MODULE_GATEWAY_FECLOSE: { break; } - case ImpulseBase::Impulse::SEASON_SET: + case Impulse::SEASON_SET: { break; } - case ImpulseBase::Impulse::SEASON_DUMMY: + case Impulse::SEASON_DUMMY: { break; } - case ImpulseBase::Impulse::DM_GIFT_BEGIN: + case Impulse::DM_GIFT_BEGIN: { break; } - case ImpulseBase::Impulse::DM_GIFT_VALIDATE: + case Impulse::DM_GIFT_VALIDATE: { break; } - case ImpulseBase::Impulse::RING_MISSION_MISSION_RING_SELECT: + case Impulse::RING_MISSION_MISSION_RING_SELECT: { break; } - case ImpulseBase::Impulse::RING_MISSION_DSS_DOWN: + case Impulse::RING_MISSION_DSS_DOWN: { break; } - case ImpulseBase::Impulse::NPC_ICON_GET_DESC: + case Impulse::NPC_ICON_GET_DESC: { break; } - case ImpulseBase::Impulse::NPC_ICON_SET_DESC: + case Impulse::NPC_ICON_SET_DESC: { break; } - case ImpulseBase::Impulse::NPC_ICON_SVR_EVENT_MIS_AVL: + case Impulse::NPC_ICON_SVR_EVENT_MIS_AVL: { break; } - case ImpulseBase::Impulse::NPC_ICON_SET_TIMER: + case Impulse::NPC_ICON_SET_TIMER: { break; } @@ -1613,28 +1613,28 @@ void ActionFactory::encode_message(Dictionary value, Ref msgout) ReferentialMessage ref_msg; int id = value["impulse"]; - ref_msg.write_command((ImpulseBase::Impulse)id, msgout); + ref_msg.write_command((Impulse::eImpulse)id, msgout); DBG_PRINT("[ActionFactory::pack] ACTION_GENERIC_CODE encode_message A:" + itos(id) + " / " + msgout->show_detail()); switch(id) { - case ImpulseBase::Impulse::TARGET_PARTY: + case Impulse::TARGET_PARTY: { break; } - case ImpulseBase::Impulse::STRING_MANAGER_STRING_RQ: + case Impulse::STRING_MANAGER_STRING_RQ: { uint32_t string_id = value["string_id"]; msgout->put_uint32(string_id); DBG_PRINT("[ActionFactory::pack] ACTION_GENERIC_CODE encode_message B:" + itos(id) + " / " + msgout->show_detail()); break; } - case ImpulseBase::Impulse::CONNECTION_DELETE_CHAR: + case Impulse::CONNECTION_DELETE_CHAR: { uint8_t slot = value["slot"]; msgout->put_uint8(slot); break; } - case ImpulseBase::Impulse::CONNECTION_CREATE_CHAR: + case Impulse::CONNECTION_CREATE_CHAR: { // khanat-opennel-code/code/ryzom/server/src/entities_game_service/player_manager/character.cpp:7977 bool CCharacter::checkCreateParams( const CCreateCharMsg& createCharMsg, CCreateCharErrorMsg& createCharErrorMsg, uint32 userId ) uint8_t slot = value["slot"]; diff --git a/modules/bitstream/bitstream.cpp b/modules/bitstream/bitstream.cpp index 319e2a0..032b69b 100644 --- a/modules/bitstream/bitstream.cpp +++ b/modules/bitstream/bitstream.cpp @@ -204,32 +204,43 @@ void BitStream::put_uint32(uint32_t value) this->put_serial(value, 32); } -void BitStream::put_sint64(int64_t value) +void BitStream::put_uint64(uint64_t value) { + // khanat-opennel-code/code/nel/include/nel/misc/stream_inline.h inline void IStream::serial(uint64 &b) + // khanat-opennel-code/code/nel/include/nel/misc/stream.h #define NLMISC_BSWAP64(src) (src) = (((src)>>56)&0xFF) | ((((src)>>48)&0xFF)<<8) | ((((src)>>40)&0xFF)<<16) | ((((src)>>32)&0xFF)<<24) | ((((src)>>24)&0xFF)<<32) | ((((src)>>16)&0xFF)<<40) | ((((src)>>8)&0xFF)<<48) | (((src)&0xFF)<<56) + union S { + uint64_t full; + uint8_t key[8]; + }; + S v; + v.full = value; if(little_endian) { - this->put_serial(value>>32, 32); - this->put_serial(value, 32); + this->put_uint8(v.key[3]); + this->put_uint8(v.key[2]); + this->put_uint8(v.key[1]); + this->put_uint8(v.key[0]); + this->put_uint8(v.key[7]); + this->put_uint8(v.key[6]); + this->put_uint8(v.key[5]); + this->put_uint8(v.key[4]); } else { - this->put_serial(value, 32); - this->put_serial(value>>32, 32); + this->put_uint8(v.key[0]); + this->put_uint8(v.key[1]); + this->put_uint8(v.key[2]); + this->put_uint8(v.key[3]); + this->put_uint8(v.key[4]); + this->put_uint8(v.key[5]); + this->put_uint8(v.key[6]); + this->put_uint8(v.key[7]); } } -void BitStream::put_uint64(uint64_t value) +void BitStream::put_sint64(int64_t value) { - if(little_endian) - { - this->put_serial(value>>32, 32); - this->put_serial(value, 32); - } - else - { - this->put_serial(value, 32); - this->put_serial(value>>32, 32); - } + put_uint64((uint64_t) value); } void BitStream::put_string_hexa32(String hexa) @@ -525,38 +536,43 @@ uint32_t BitStream::get_uint32() return this->get_serial(32); } -int64_t BitStream::get_sint64() -{ - int64_t v1; - int64_t v2; - if(little_endian) - { - v1 = this->get_serial(32); - v2 = this->get_serial(32); - } - else - { - v2 = this->get_serial(32); - v1 = this->get_serial(32); - } - return (v1 << 32) | v2; -} - uint64_t BitStream::get_uint64() { - int64_t v1; - int64_t v2; + // khanat-opennel-code/code/nel/include/nel/misc/stream_inline.h inline void IStream::serial(uint64 &b) + // khanat-opennel-code/code/nel/include/nel/misc/stream.h #define NLMISC_BSWAP64(src) (src) = (((src)>>56)&0xFF) | ((((src)>>48)&0xFF)<<8) | ((((src)>>40)&0xFF)<<16) | ((((src)>>32)&0xFF)<<24) | ((((src)>>24)&0xFF)<<32) | ((((src)>>16)&0xFF)<<40) | ((((src)>>8)&0xFF)<<48) | (((src)&0xFF)<<56) + union S { + uint64_t full; + uint8_t key[8]; + }; + S v; if(little_endian) { - v1 = this->get_serial(32); - v2 = this->get_serial(32); + v.key[3] = this->get_uint8(); + v.key[2] = this->get_uint8(); + v.key[1] = this->get_uint8(); + v.key[0] = this->get_uint8(); + v.key[7] = this->get_uint8(); + v.key[6] = this->get_uint8(); + v.key[5] = this->get_uint8(); + v.key[4] = this->get_uint8(); } else { - v2 = this->get_serial(32); - v1 = this->get_serial(32); + v.key[0] = this->get_uint8(); + v.key[1] = this->get_uint8(); + v.key[2] = this->get_uint8(); + v.key[3] = this->get_uint8(); + v.key[4] = this->get_uint8(); + v.key[5] = this->get_uint8(); + v.key[6] = this->get_uint8(); + v.key[7] = this->get_uint8(); } - return (v1 << 32) | v2; + return v.full; +} + +int64_t BitStream::get_sint64() +{ + return (int64_t) get_uint64(); } uint32_t BitStream::get_version() diff --git a/modules/impulse/impulsebase.cpp b/modules/impulse/impulse.cpp similarity index 57% rename from modules/impulse/impulsebase.cpp rename to modules/impulse/impulse.cpp index 10ed240..bb73719 100644 --- a/modules/impulse/impulsebase.cpp +++ b/modules/impulse/impulse.cpp @@ -18,10 +18,11 @@ */ -#include "impulsebase.h" +#include "impulse.h" #include "core/class_db.h" +#include "modules/referentialmessage/referentialmessage.h" -void ImpulseBase::_bind_methods() +void Impulse::_bind_methods() { BIND_ENUM_CONSTANT(TARGET_PARTY); BIND_ENUM_CONSTANT(TARGET_INVENTORY); @@ -359,1366 +360,1381 @@ void ImpulseBase::_bind_methods() BIND_ENUM_CONSTANT(NPC_ICON_SET_TIMER); BIND_ENUM_CONSTANT(__LAST_ELEMENT); - ClassDB::bind_method(D_METHOD("get_name", "id"), &ImpulseBase::get_name); + ClassDB::bind_method(D_METHOD("extract_command_id", "name"), &Impulse::get_name); + ClassDB::bind_method(D_METHOD("extract_command_name", "id"), &Impulse::get_id); + ClassDB::bind_method(D_METHOD("extract_name", "id"), &Impulse::extract_name); + ClassDB::bind_method(D_METHOD("get_name"), &Impulse::get_name); + ClassDB::bind_method(D_METHOD("put_stream"), &Impulse::put_stream); } -int ImpulseBase::get_command(String name) +int Impulse::extract_command_id(String name) { if( name == "TARGET_PARTY" ) { - return ImpulseBase::TARGET_PARTY; + return Impulse::TARGET_PARTY; } else if( name == "TARGET_INVENTORY" ) { - return ImpulseBase::TARGET_INVENTORY; + return Impulse::TARGET_INVENTORY; } else if( name == "TARGET_FOLLOW" ) { - return ImpulseBase::TARGET_FOLLOW; + return Impulse::TARGET_FOLLOW; } else if( name == "TARGET_NO_FOLLOW" ) { - return ImpulseBase::TARGET_NO_FOLLOW; + return Impulse::TARGET_NO_FOLLOW; } else if( name == "CONNECTION_USER_CHAR" ) { - return ImpulseBase::CONNECTION_USER_CHAR; + return Impulse::CONNECTION_USER_CHAR; } else if( name == "CONNECTION_NO_USER_CHAR" ) { - return ImpulseBase::CONNECTION_NO_USER_CHAR; + return Impulse::CONNECTION_NO_USER_CHAR; } else if( name == "CONNECTION_USER_CHARS" ) { - return ImpulseBase::CONNECTION_USER_CHARS; + return Impulse::CONNECTION_USER_CHARS; } else if( name == "CONNECTION_CREATE_CHAR" ) { - return ImpulseBase::CONNECTION_CREATE_CHAR; + return Impulse::CONNECTION_CREATE_CHAR; } else if( name == "CONNECTION_SELECT_CHAR" ) { - return ImpulseBase::CONNECTION_SELECT_CHAR; + return Impulse::CONNECTION_SELECT_CHAR; } else if( name == "CONNECTION_DELETE_CHAR" ) { - return ImpulseBase::CONNECTION_DELETE_CHAR; + return Impulse::CONNECTION_DELETE_CHAR; } else if( name == "CONNECTION_RENAME_CHAR" ) { - return ImpulseBase::CONNECTION_RENAME_CHAR; + return Impulse::CONNECTION_RENAME_CHAR; } else if( name == "CONNECTION_ENTER" ) { - return ImpulseBase::CONNECTION_ENTER; + return Impulse::CONNECTION_ENTER; } else if( name == "CONNECTION_READY" ) { - return ImpulseBase::CONNECTION_READY; + return Impulse::CONNECTION_READY; } else if( name == "CONNECTION_TIME_DATE_SYNCHRO" ) { - return ImpulseBase::CONNECTION_TIME_DATE_SYNCHRO; + return Impulse::CONNECTION_TIME_DATE_SYNCHRO; } else if( name == "CONNECTION_ASK_NAME" ) { - return ImpulseBase::CONNECTION_ASK_NAME; + return Impulse::CONNECTION_ASK_NAME; } else if( name == "CONNECTION_VALID_NAME" ) { - return ImpulseBase::CONNECTION_VALID_NAME; + return Impulse::CONNECTION_VALID_NAME; } else if( name == "CONNECTION_CREATE_CHAR_ERROR" ) { - return ImpulseBase::CONNECTION_CREATE_CHAR_ERROR; + return Impulse::CONNECTION_CREATE_CHAR_ERROR; } else if( name == "CONNECTION_RECONNECT" ) { - return ImpulseBase::CONNECTION_RECONNECT; + return Impulse::CONNECTION_RECONNECT; } else if( name == "CONNECTION_SERVER_RECONNECT_OK" ) { - return ImpulseBase::CONNECTION_SERVER_RECONNECT_OK; + return Impulse::CONNECTION_SERVER_RECONNECT_OK; } else if( name == "CONNECTION_SHARD_ID" ) { - return ImpulseBase::CONNECTION_SHARD_ID; + return Impulse::CONNECTION_SHARD_ID; } else if( name == "CONNECTION_SERVER_QUIT_OK" ) { - return ImpulseBase::CONNECTION_SERVER_QUIT_OK; + return Impulse::CONNECTION_SERVER_QUIT_OK; } else if( name == "CONNECTION_SERVER_QUIT_ABORT" ) { - return ImpulseBase::CONNECTION_SERVER_QUIT_ABORT; + return Impulse::CONNECTION_SERVER_QUIT_ABORT; } else if( name == "CONNECTION_CLIENT_QUIT_REQUEST" ) { - return ImpulseBase::CONNECTION_CLIENT_QUIT_REQUEST; + return Impulse::CONNECTION_CLIENT_QUIT_REQUEST; } else if( name == "CONNECTION_MAIL_AVAILABLE" ) { - return ImpulseBase::CONNECTION_MAIL_AVAILABLE; + return Impulse::CONNECTION_MAIL_AVAILABLE; } else if( name == "CONNECTION_GUILD_MESSAGE_AVAILABLE" ) { - return ImpulseBase::CONNECTION_GUILD_MESSAGE_AVAILABLE; + return Impulse::CONNECTION_GUILD_MESSAGE_AVAILABLE; } else if( name == "CONNECTION_PERMANENT_BAN" ) { - return ImpulseBase::CONNECTION_PERMANENT_BAN; + return Impulse::CONNECTION_PERMANENT_BAN; } else if( name == "CONNECTION_UNBAN" ) { - return ImpulseBase::CONNECTION_UNBAN; + return Impulse::CONNECTION_UNBAN; } else if( name == "CONNECTION_FAR_TP" ) { - return ImpulseBase::CONNECTION_FAR_TP; + return Impulse::CONNECTION_FAR_TP; } else if( name == "CONNECTION_RET_MAINLAND" ) { - return ImpulseBase::CONNECTION_RET_MAINLAND; + return Impulse::CONNECTION_RET_MAINLAND; } else if( name == "DB_UPD_PLR" ) { - return ImpulseBase::DB_UPD_PLR; + return Impulse::DB_UPD_PLR; } else if( name == "DB_UPD_INV" ) { - return ImpulseBase::DB_UPD_INV; + return Impulse::DB_UPD_INV; } else if( name == "DB_INIT_PLR" ) { - return ImpulseBase::DB_INIT_PLR; + return Impulse::DB_INIT_PLR; } else if( name == "DB_INIT_INV" ) { - return ImpulseBase::DB_INIT_INV; + return Impulse::DB_INIT_INV; } else if( name == "DB_GROUP_UPDATE_BANK" ) { - return ImpulseBase::DB_GROUP_UPDATE_BANK; + return Impulse::DB_GROUP_UPDATE_BANK; } else if( name == "DB_GROUP_INIT_BANK" ) { - return ImpulseBase::DB_GROUP_INIT_BANK; + return Impulse::DB_GROUP_INIT_BANK; } else if( name == "DB_GROUP_RESET_BANK" ) { - return ImpulseBase::DB_GROUP_RESET_BANK; + return Impulse::DB_GROUP_RESET_BANK; } else if( name == "POSITION" ) { - return ImpulseBase::POSITION; + return Impulse::POSITION; } else if( name == "HARVEST_DEPOSIT" ) { - return ImpulseBase::HARVEST_DEPOSIT; + return Impulse::HARVEST_DEPOSIT; } else if( name == "HARVEST_CORPSE" ) { - return ImpulseBase::HARVEST_CORPSE; + return Impulse::HARVEST_CORPSE; } else if( name == "HARVEST_INTERRUPT" ) { - return ImpulseBase::HARVEST_INTERRUPT; + return Impulse::HARVEST_INTERRUPT; } else if( name == "HARVEST_CLOSE_TEMP_INVENTORY" ) { - return ImpulseBase::HARVEST_CLOSE_TEMP_INVENTORY; + return Impulse::HARVEST_CLOSE_TEMP_INVENTORY; } else if( name == "TRAINING" ) { - return ImpulseBase::TRAINING; + return Impulse::TRAINING; } else if( name == "JOB_SET_JOB_STATUS" ) { - return ImpulseBase::JOB_SET_JOB_STATUS; + return Impulse::JOB_SET_JOB_STATUS; } else if( name == "JOB_SWAP_JOB_STATUS" ) { - return ImpulseBase::JOB_SWAP_JOB_STATUS; + return Impulse::JOB_SWAP_JOB_STATUS; } else if( name == "CASTING_BEGIN" ) { - return ImpulseBase::CASTING_BEGIN; + return Impulse::CASTING_BEGIN; } else if( name == "CASTING_INTERRUPT" ) { - return ImpulseBase::CASTING_INTERRUPT; + return Impulse::CASTING_INTERRUPT; } else if( name == "FABER_OPEN" ) { - return ImpulseBase::FABER_OPEN; + return Impulse::FABER_OPEN; } else if( name == "FABER_CLOSE" ) { - return ImpulseBase::FABER_CLOSE; + return Impulse::FABER_CLOSE; } else if( name == "FABER_EXECUTE" ) { - return ImpulseBase::FABER_EXECUTE; + return Impulse::FABER_EXECUTE; } else if( name == "FABER_SET_NUM_ITEM" ) { - return ImpulseBase::FABER_SET_NUM_ITEM; + return Impulse::FABER_SET_NUM_ITEM; } else if( name == "FABER_START_CREATE" ) { - return ImpulseBase::FABER_START_CREATE; + return Impulse::FABER_START_CREATE; } else if( name == "FABER_START_REPAIR" ) { - return ImpulseBase::FABER_START_REPAIR; + return Impulse::FABER_START_REPAIR; } else if( name == "FABER_START_REFINE" ) { - return ImpulseBase::FABER_START_REFINE; + return Impulse::FABER_START_REFINE; } else if( name == "FABER_SET_MP_QUALITY" ) { - return ImpulseBase::FABER_SET_MP_QUALITY; + return Impulse::FABER_SET_MP_QUALITY; } else if( name == "FABER_SET_MP_REFINE" ) { - return ImpulseBase::FABER_SET_MP_REFINE; + return Impulse::FABER_SET_MP_REFINE; } else if( name == "FABER_SET_TOOL" ) { - return ImpulseBase::FABER_SET_TOOL; + return Impulse::FABER_SET_TOOL; } else if( name == "FABER_RESET_TOOL" ) { - return ImpulseBase::FABER_RESET_TOOL; + return Impulse::FABER_RESET_TOOL; } else if( name == "FABER_INTERRUPT" ) { - return ImpulseBase::FABER_INTERRUPT; + return Impulse::FABER_INTERRUPT; } else if( name == "COMBAT_ENGAGE" ) { - return ImpulseBase::COMBAT_ENGAGE; + return Impulse::COMBAT_ENGAGE; } else if( name == "COMBAT_DISENGAGE" ) { - return ImpulseBase::COMBAT_DISENGAGE; + return Impulse::COMBAT_DISENGAGE; } else if( name == "COMBAT_DEFAULT_ATTACK" ) { - return ImpulseBase::COMBAT_DEFAULT_ATTACK; + return Impulse::COMBAT_DEFAULT_ATTACK; } else if( name == "COMBAT_ENGAGE_FAILED" ) { - return ImpulseBase::COMBAT_ENGAGE_FAILED; + return Impulse::COMBAT_ENGAGE_FAILED; } else if( name == "COMBAT_VALIDATE_MELEE" ) { - return ImpulseBase::COMBAT_VALIDATE_MELEE; + return Impulse::COMBAT_VALIDATE_MELEE; } else if( name == "COMBAT_PARRY" ) { - return ImpulseBase::COMBAT_PARRY; + return Impulse::COMBAT_PARRY; } else if( name == "COMBAT_DODGE" ) { - return ImpulseBase::COMBAT_DODGE; + return Impulse::COMBAT_DODGE; } else if( name == "COMBAT_PROTECTED_SLOT" ) { - return ImpulseBase::COMBAT_PROTECTED_SLOT; + return Impulse::COMBAT_PROTECTED_SLOT; } else if( name == "COMBAT_FLYING_ChaScore1_DELTA" ) { - return ImpulseBase::COMBAT_FLYING_ChaScore1_DELTA; + return Impulse::COMBAT_FLYING_ChaScore1_DELTA; } else if( name == "COMBAT_FLYING_TEXT_ISE" ) { - return ImpulseBase::COMBAT_FLYING_TEXT_ISE; + return Impulse::COMBAT_FLYING_TEXT_ISE; } else if( name == "COMBAT_FLYING_TEXT" ) { - return ImpulseBase::COMBAT_FLYING_TEXT; + return Impulse::COMBAT_FLYING_TEXT; } else if( name == "STRING_TELL" ) { - return ImpulseBase::STRING_TELL; + return Impulse::STRING_TELL; } else if( name == "STRING_FAR_TELL" ) { - return ImpulseBase::STRING_FAR_TELL; + return Impulse::STRING_FAR_TELL; } else if( name == "STRING_CHAT" ) { - return ImpulseBase::STRING_CHAT; + return Impulse::STRING_CHAT; } else if( name == "STRING_CHAT_TEAM" ) { - return ImpulseBase::STRING_CHAT_TEAM; + return Impulse::STRING_CHAT_TEAM; } else if( name == "STRING_ADD_DYN_STR" ) { - return ImpulseBase::STRING_ADD_DYN_STR; + return Impulse::STRING_ADD_DYN_STR; } else if( name == "STRING_FILTER" ) { - return ImpulseBase::STRING_FILTER; + return Impulse::STRING_FILTER; } else if( name == "STRING_CHAT_MODE" ) { - return ImpulseBase::STRING_CHAT_MODE; + return Impulse::STRING_CHAT_MODE; } else if( name == "STRING_CHAT2" ) { - return ImpulseBase::STRING_CHAT2; + return Impulse::STRING_CHAT2; } else if( name == "STRING_TELL2" ) { - return ImpulseBase::STRING_TELL2; + return Impulse::STRING_TELL2; } else if( name == "STRING_DYN_STRING" ) { - return ImpulseBase::STRING_DYN_STRING; + return Impulse::STRING_DYN_STRING; } else if( name == "STRING_DYN_STRING_GROUP" ) { - return ImpulseBase::STRING_DYN_STRING_GROUP; + return Impulse::STRING_DYN_STRING_GROUP; } else if( name == "STRING_AFK_TXT" ) { - return ImpulseBase::STRING_AFK_TXT; + return Impulse::STRING_AFK_TXT; } else if( name == "STUN_STUN" ) { - return ImpulseBase::STUN_STUN; + return Impulse::STUN_STUN; } else if( name == "STUN_WAKE_UP" ) { - return ImpulseBase::STUN_WAKE_UP; + return Impulse::STUN_WAKE_UP; } else if( name == "SENTENCE_EXECUTE" ) { - return ImpulseBase::SENTENCE_EXECUTE; + return Impulse::SENTENCE_EXECUTE; } else if( name == "SENTENCE_CANCEL" ) { - return ImpulseBase::SENTENCE_CANCEL; + return Impulse::SENTENCE_CANCEL; } else if( name == "SENTENCE_CANCEL_CURRENT" ) { - return ImpulseBase::SENTENCE_CANCEL_CURRENT; + return Impulse::SENTENCE_CANCEL_CURRENT; } else if( name == "SENTENCE_CANCEL_ALL" ) { - return ImpulseBase::SENTENCE_CANCEL_ALL; + return Impulse::SENTENCE_CANCEL_ALL; } else if( name == "SENTENCE_CLEAR" ) { - return ImpulseBase::SENTENCE_CLEAR; + return Impulse::SENTENCE_CLEAR; } else if( name == "SENTENCE_MEMORIZE" ) { - return ImpulseBase::SENTENCE_MEMORIZE; + return Impulse::SENTENCE_MEMORIZE; } else if( name == "SENTENCE_FORGET" ) { - return ImpulseBase::SENTENCE_FORGET; + return Impulse::SENTENCE_FORGET; } else if( name == "SENTENCE_EVALUATE" ) { - return ImpulseBase::SENTENCE_EVALUATE; + return Impulse::SENTENCE_EVALUATE; } else if( name == "SENTENCE_ADD_BRICK" ) { - return ImpulseBase::SENTENCE_ADD_BRICK; + return Impulse::SENTENCE_ADD_BRICK; } else if( name == "SENTENCE_REMOVE_BRICK" ) { - return ImpulseBase::SENTENCE_REMOVE_BRICK; + return Impulse::SENTENCE_REMOVE_BRICK; } else if( name == "SENTENCE_START" ) { - return ImpulseBase::SENTENCE_START; + return Impulse::SENTENCE_START; } else if( name == "SENTENCE_STOP" ) { - return ImpulseBase::SENTENCE_STOP; + return Impulse::SENTENCE_STOP; } else if( name == "TEAM_JOIN" ) { - return ImpulseBase::TEAM_JOIN; + return Impulse::TEAM_JOIN; } else if( name == "TEAM_LEAVE" ) { - return ImpulseBase::TEAM_LEAVE; + return Impulse::TEAM_LEAVE; } else if( name == "TEAM_INVITATION" ) { - return ImpulseBase::TEAM_INVITATION; + return Impulse::TEAM_INVITATION; } else if( name == "TEAM_JOIN_PROPOSAL" ) { - return ImpulseBase::TEAM_JOIN_PROPOSAL; + return Impulse::TEAM_JOIN_PROPOSAL; } else if( name == "TEAM_JOIN_PROPOSAL_DECLINE" ) { - return ImpulseBase::TEAM_JOIN_PROPOSAL_DECLINE; + return Impulse::TEAM_JOIN_PROPOSAL_DECLINE; } else if( name == "TEAM_KICK" ) { - return ImpulseBase::TEAM_KICK; + return Impulse::TEAM_KICK; } else if( name == "TEAM_SET_SUCCESSOR" ) { - return ImpulseBase::TEAM_SET_SUCCESSOR; + return Impulse::TEAM_SET_SUCCESSOR; } else if( name == "TEAM_SHARE_OPEN" ) { - return ImpulseBase::TEAM_SHARE_OPEN; + return Impulse::TEAM_SHARE_OPEN; } else if( name == "TEAM_SHARE_VALID_ITEM" ) { - return ImpulseBase::TEAM_SHARE_VALID_ITEM; + return Impulse::TEAM_SHARE_VALID_ITEM; } else if( name == "TEAM_SHARE_INVALID_ITEM" ) { - return ImpulseBase::TEAM_SHARE_INVALID_ITEM; + return Impulse::TEAM_SHARE_INVALID_ITEM; } else if( name == "TEAM_SHARE_VALID" ) { - return ImpulseBase::TEAM_SHARE_VALID; + return Impulse::TEAM_SHARE_VALID; } else if( name == "TEAM_SHARE_INVALID" ) { - return ImpulseBase::TEAM_SHARE_INVALID; + return Impulse::TEAM_SHARE_INVALID; } else if( name == "TEAM_SHARE_CLOSE" ) { - return ImpulseBase::TEAM_SHARE_CLOSE; + return Impulse::TEAM_SHARE_CLOSE; } else if( name == "TEAM_CONTACT_INIT" ) { - return ImpulseBase::TEAM_CONTACT_INIT; + return Impulse::TEAM_CONTACT_INIT; } else if( name == "TEAM_CONTACT_ADD" ) { - return ImpulseBase::TEAM_CONTACT_ADD; + return Impulse::TEAM_CONTACT_ADD; } else if( name == "TEAM_CONTACT_DEL" ) { - return ImpulseBase::TEAM_CONTACT_DEL; + return Impulse::TEAM_CONTACT_DEL; } else if( name == "TEAM_CONTACT_MOVE" ) { - return ImpulseBase::TEAM_CONTACT_MOVE; + return Impulse::TEAM_CONTACT_MOVE; } else if( name == "TEAM_CONTACT_CREATE" ) { - return ImpulseBase::TEAM_CONTACT_CREATE; + return Impulse::TEAM_CONTACT_CREATE; } else if( name == "TEAM_CONTACT_STATUS" ) { - return ImpulseBase::TEAM_CONTACT_STATUS; + return Impulse::TEAM_CONTACT_STATUS; } else if( name == "TEAM_CONTACT_REMOVE" ) { - return ImpulseBase::TEAM_CONTACT_REMOVE; + return Impulse::TEAM_CONTACT_REMOVE; } else if( name == "ITEM_DROP" ) { - return ImpulseBase::ITEM_DROP; + return Impulse::ITEM_DROP; } else if( name == "ITEM_PICK_UP" ) { - return ImpulseBase::ITEM_PICK_UP; + return Impulse::ITEM_PICK_UP; } else if( name == "ITEM_PICK_UP_CLOSE" ) { - return ImpulseBase::ITEM_PICK_UP_CLOSE; + return Impulse::ITEM_PICK_UP_CLOSE; } else if( name == "ITEM_SWAP" ) { - return ImpulseBase::ITEM_SWAP; + return Impulse::ITEM_SWAP; } else if( name == "ITEM_ACTIVATE_SHEATH" ) { - return ImpulseBase::ITEM_ACTIVATE_SHEATH; + return Impulse::ITEM_ACTIVATE_SHEATH; } else if( name == "ITEM_HARVEST" ) { - return ImpulseBase::ITEM_HARVEST; + return Impulse::ITEM_HARVEST; } else if( name == "ITEM_HARVEST_CLOSE" ) { - return ImpulseBase::ITEM_HARVEST_CLOSE; + return Impulse::ITEM_HARVEST_CLOSE; } else if( name == "ITEM_GIVE" ) { - return ImpulseBase::ITEM_GIVE; + return Impulse::ITEM_GIVE; } else if( name == "ITEM_DESTROY" ) { - return ImpulseBase::ITEM_DESTROY; + return Impulse::ITEM_DESTROY; } else if( name == "ITEM_EQUIP" ) { - return ImpulseBase::ITEM_EQUIP; + return Impulse::ITEM_EQUIP; } else if( name == "ITEM_UNEQUIP" ) { - return ImpulseBase::ITEM_UNEQUIP; + return Impulse::ITEM_UNEQUIP; } else if( name == "ITEM_TEMP_TO_BAG" ) { - return ImpulseBase::ITEM_TEMP_TO_BAG; + return Impulse::ITEM_TEMP_TO_BAG; } else if( name == "ITEM_ALL_TEMP" ) { - return ImpulseBase::ITEM_ALL_TEMP; + return Impulse::ITEM_ALL_TEMP; } else if( name == "ITEM_NO_TEMP" ) { - return ImpulseBase::ITEM_NO_TEMP; + return Impulse::ITEM_NO_TEMP; } else if( name == "ITEM_ENCHANT" ) { - return ImpulseBase::ITEM_ENCHANT; + return Impulse::ITEM_ENCHANT; } else if( name == "ITEM_OPEN_ROOM_INVENTORY" ) { - return ImpulseBase::ITEM_OPEN_ROOM_INVENTORY; + return Impulse::ITEM_OPEN_ROOM_INVENTORY; } else if( name == "ITEM_CLOSE_ROOM_INVENTORY" ) { - return ImpulseBase::ITEM_CLOSE_ROOM_INVENTORY; + return Impulse::ITEM_CLOSE_ROOM_INVENTORY; } else if( name == "ITEM_USE_ITEM" ) { - return ImpulseBase::ITEM_USE_ITEM; + return Impulse::ITEM_USE_ITEM; } else if( name == "ITEM_STOP_USE_XP_CAT" ) { - return ImpulseBase::ITEM_STOP_USE_XP_CAT; + return Impulse::ITEM_STOP_USE_XP_CAT; } else if( name == "TP_RESPAWN" ) { - return ImpulseBase::TP_RESPAWN; + return Impulse::TP_RESPAWN; } else if( name == "TP_BOT" ) { - return ImpulseBase::TP_BOT; + return Impulse::TP_BOT; } else if( name == "TP_WANTED" ) { - return ImpulseBase::TP_WANTED; + return Impulse::TP_WANTED; } else if( name == "TP_DEST" ) { - return ImpulseBase::TP_DEST; + return Impulse::TP_DEST; } else if( name == "TP_DEST_WITH_SEASON" ) { - return ImpulseBase::TP_DEST_WITH_SEASON; + return Impulse::TP_DEST_WITH_SEASON; } else if( name == "TP_ACK" ) { - return ImpulseBase::TP_ACK; + return Impulse::TP_ACK; } else if( name == "TP_CORRECT" ) { - return ImpulseBase::TP_CORRECT; + return Impulse::TP_CORRECT; } else if( name == "DEATH_RESPAWN_POINT" ) { - return ImpulseBase::DEATH_RESPAWN_POINT; + return Impulse::DEATH_RESPAWN_POINT; } else if( name == "DEATH_ASK_RESPAWN" ) { - return ImpulseBase::DEATH_ASK_RESPAWN; + return Impulse::DEATH_ASK_RESPAWN; } else if( name == "DEATH_RESPAWN" ) { - return ImpulseBase::DEATH_RESPAWN; + return Impulse::DEATH_RESPAWN; } else if( name == "ANIMALS_BEAST" ) { - return ImpulseBase::ANIMALS_BEAST; + return Impulse::ANIMALS_BEAST; } else if( name == "ANIMALS_MOUNT_ABORT" ) { - return ImpulseBase::ANIMALS_MOUNT_ABORT; + return Impulse::ANIMALS_MOUNT_ABORT; } else if( name == "EXCHANGE_INVITATION" ) { - return ImpulseBase::EXCHANGE_INVITATION; + return Impulse::EXCHANGE_INVITATION; } else if( name == "EXCHANGE_CLOSE_INVITATION" ) { - return ImpulseBase::EXCHANGE_CLOSE_INVITATION; + return Impulse::EXCHANGE_CLOSE_INVITATION; } else if( name == "EXCHANGE_PROPOSAL" ) { - return ImpulseBase::EXCHANGE_PROPOSAL; + return Impulse::EXCHANGE_PROPOSAL; } else if( name == "EXCHANGE_ACCEPT_INVITATION" ) { - return ImpulseBase::EXCHANGE_ACCEPT_INVITATION; + return Impulse::EXCHANGE_ACCEPT_INVITATION; } else if( name == "EXCHANGE_DECLINE_INVITATION" ) { - return ImpulseBase::EXCHANGE_DECLINE_INVITATION; + return Impulse::EXCHANGE_DECLINE_INVITATION; } else if( name == "EXCHANGE_VALIDATE" ) { - return ImpulseBase::EXCHANGE_VALIDATE; + return Impulse::EXCHANGE_VALIDATE; } else if( name == "EXCHANGE_INVALIDATE" ) { - return ImpulseBase::EXCHANGE_INVALIDATE; + return Impulse::EXCHANGE_INVALIDATE; } else if( name == "EXCHANGE_END" ) { - return ImpulseBase::EXCHANGE_END; + return Impulse::EXCHANGE_END; } else if( name == "EXCHANGE_SEEDS" ) { - return ImpulseBase::EXCHANGE_SEEDS; + return Impulse::EXCHANGE_SEEDS; } else if( name == "EXCHANGE_ADD" ) { - return ImpulseBase::EXCHANGE_ADD; + return Impulse::EXCHANGE_ADD; } else if( name == "EXCHANGE_REMOVE" ) { - return ImpulseBase::EXCHANGE_REMOVE; + return Impulse::EXCHANGE_REMOVE; } else if( name == "DEBUG_WHERE" ) { - return ImpulseBase::DEBUG_WHERE; + return Impulse::DEBUG_WHERE; } else if( name == "DEBUG_WHO" ) { - return ImpulseBase::DEBUG_WHO; + return Impulse::DEBUG_WHO; } else if( name == "DEBUG_REPLY_WHERE" ) { - return ImpulseBase::DEBUG_REPLY_WHERE; + return Impulse::DEBUG_REPLY_WHERE; } else if( name == "DEBUG_SERVICES" ) { - return ImpulseBase::DEBUG_SERVICES; + return Impulse::DEBUG_SERVICES; } else if( name == "DEBUG_CMD" ) { - return ImpulseBase::DEBUG_CMD; + return Impulse::DEBUG_CMD; } else if( name == "DEBUG_PING" ) { - return ImpulseBase::DEBUG_PING; + return Impulse::DEBUG_PING; } else if( name == "DEBUG_COUNTER" ) { - return ImpulseBase::DEBUG_COUNTER; + return Impulse::DEBUG_COUNTER; } else if( name == "COMMAND_EMOTE" ) { - return ImpulseBase::COMMAND_EMOTE; + return Impulse::COMMAND_EMOTE; } else if( name == "COMMAND_CUSTOM_EMOTE" ) { - return ImpulseBase::COMMAND_CUSTOM_EMOTE; + return Impulse::COMMAND_CUSTOM_EMOTE; } else if( name == "COMMAND_WHERE" ) { - return ImpulseBase::COMMAND_WHERE; + return Impulse::COMMAND_WHERE; } else if( name == "COMMAND_ADMIN" ) { - return ImpulseBase::COMMAND_ADMIN; + return Impulse::COMMAND_ADMIN; } else if( name == "COMMAND_ADMIN_OFFLINE" ) { - return ImpulseBase::COMMAND_ADMIN_OFFLINE; + return Impulse::COMMAND_ADMIN_OFFLINE; } else if( name == "COMMAND_REMOTE_ADMIN" ) { - return ImpulseBase::COMMAND_REMOTE_ADMIN; + return Impulse::COMMAND_REMOTE_ADMIN; } else if( name == "COMMAND_REMOTE_ADMIN_ANSWER" ) { - return ImpulseBase::COMMAND_REMOTE_ADMIN_ANSWER; + return Impulse::COMMAND_REMOTE_ADMIN_ANSWER; } else if( name == "COMMAND_SIT" ) { - return ImpulseBase::COMMAND_SIT; + return Impulse::COMMAND_SIT; } else if( name == "COMMAND_AFK" ) { - return ImpulseBase::COMMAND_AFK; + return Impulse::COMMAND_AFK; } else if( name == "COMMAND_RANDOM" ) { - return ImpulseBase::COMMAND_RANDOM; + return Impulse::COMMAND_RANDOM; } else if( name == "COMMAND_GUILDMOTD" ) { - return ImpulseBase::COMMAND_GUILDMOTD; + return Impulse::COMMAND_GUILDMOTD; } else if( name == "MP_EVAL_SET_MP" ) { - return ImpulseBase::MP_EVAL_SET_MP; + return Impulse::MP_EVAL_SET_MP; } else if( name == "MP_EVAL_SET_MP_LEVEL" ) { - return ImpulseBase::MP_EVAL_SET_MP_LEVEL; + return Impulse::MP_EVAL_SET_MP_LEVEL; } else if( name == "MP_EVAL_SET_MARKET" ) { - return ImpulseBase::MP_EVAL_SET_MARKET; + return Impulse::MP_EVAL_SET_MARKET; } else if( name == "MP_EVAL_EXECUTE" ) { - return ImpulseBase::MP_EVAL_EXECUTE; + return Impulse::MP_EVAL_EXECUTE; } else if( name == "BOTCHAT_NEXT_PAGE_ITEM" ) { - return ImpulseBase::BOTCHAT_NEXT_PAGE_ITEM; + return Impulse::BOTCHAT_NEXT_PAGE_ITEM; } else if( name == "BOTCHAT_NEXT_PAGE_MISSION" ) { - return ImpulseBase::BOTCHAT_NEXT_PAGE_MISSION; + return Impulse::BOTCHAT_NEXT_PAGE_MISSION; } else if( name == "BOTCHAT_START_TRADE_ITEM" ) { - return ImpulseBase::BOTCHAT_START_TRADE_ITEM; + return Impulse::BOTCHAT_START_TRADE_ITEM; } else if( name == "BOTCHAT_START_TRADE_TELEPORT" ) { - return ImpulseBase::BOTCHAT_START_TRADE_TELEPORT; + return Impulse::BOTCHAT_START_TRADE_TELEPORT; } else if( name == "BOTCHAT_START_TRADE_FACTION" ) { - return ImpulseBase::BOTCHAT_START_TRADE_FACTION; + return Impulse::BOTCHAT_START_TRADE_FACTION; } else if( name == "BOTCHAT_START_TRADE_SKILL" ) { - return ImpulseBase::BOTCHAT_START_TRADE_SKILL; + return Impulse::BOTCHAT_START_TRADE_SKILL; } else if( name == "BOTCHAT_START_TRADE_PACT" ) { - return ImpulseBase::BOTCHAT_START_TRADE_PACT; + return Impulse::BOTCHAT_START_TRADE_PACT; } else if( name == "BOTCHAT_START_TRADE_ACTION" ) { - return ImpulseBase::BOTCHAT_START_TRADE_ACTION; + return Impulse::BOTCHAT_START_TRADE_ACTION; } else if( name == "BOTCHAT_BUY" ) { - return ImpulseBase::BOTCHAT_BUY; + return Impulse::BOTCHAT_BUY; } else if( name == "BOTCHAT_SELL" ) { - return ImpulseBase::BOTCHAT_SELL; + return Impulse::BOTCHAT_SELL; } else if( name == "BOTCHAT_DESTROY_ITEM" ) { - return ImpulseBase::BOTCHAT_DESTROY_ITEM; + return Impulse::BOTCHAT_DESTROY_ITEM; } else if( name == "BOTCHAT_REFRESH_TRADE_LIST" ) { - return ImpulseBase::BOTCHAT_REFRESH_TRADE_LIST; + return Impulse::BOTCHAT_REFRESH_TRADE_LIST; } else if( name == "BOTCHAT_SET_FILTERS" ) { - return ImpulseBase::BOTCHAT_SET_FILTERS; + return Impulse::BOTCHAT_SET_FILTERS; } else if( name == "BOTCHAT_START_CHOOSE_MISSION" ) { - return ImpulseBase::BOTCHAT_START_CHOOSE_MISSION; + return Impulse::BOTCHAT_START_CHOOSE_MISSION; } else if( name == "BOTCHAT_START_DYNAMIC_MISSION" ) { - return ImpulseBase::BOTCHAT_START_DYNAMIC_MISSION; + return Impulse::BOTCHAT_START_DYNAMIC_MISSION; } else if( name == "BOTCHAT_CONTINUE_MISSION" ) { - return ImpulseBase::BOTCHAT_CONTINUE_MISSION; + return Impulse::BOTCHAT_CONTINUE_MISSION; } else if( name == "BOTCHAT_VALIDATE_PLAYER_GIFT" ) { - return ImpulseBase::BOTCHAT_VALIDATE_PLAYER_GIFT; + return Impulse::BOTCHAT_VALIDATE_PLAYER_GIFT; } else if( name == "BOTCHAT_PICK_MISSION" ) { - return ImpulseBase::BOTCHAT_PICK_MISSION; + return Impulse::BOTCHAT_PICK_MISSION; } else if( name == "BOTCHAT_DM_CHOICE" ) { - return ImpulseBase::BOTCHAT_DM_CHOICE; + return Impulse::BOTCHAT_DM_CHOICE; } else if( name == "BOTCHAT_DM_ACCEPT" ) { - return ImpulseBase::BOTCHAT_DM_ACCEPT; + return Impulse::BOTCHAT_DM_ACCEPT; } else if( name == "BOTCHAT_START_NEWS" ) { - return ImpulseBase::BOTCHAT_START_NEWS; + return Impulse::BOTCHAT_START_NEWS; } else if( name == "BOTCHAT_START_CREATE_GUILD" ) { - return ImpulseBase::BOTCHAT_START_CREATE_GUILD; + return Impulse::BOTCHAT_START_CREATE_GUILD; } else if( name == "BOTCHAT_END" ) { - return ImpulseBase::BOTCHAT_END; + return Impulse::BOTCHAT_END; } else if( name == "BOTCHAT_FORCE_END" ) { - return ImpulseBase::BOTCHAT_FORCE_END; + return Impulse::BOTCHAT_FORCE_END; } else if( name == "BOTCHAT_START_CHOOSE_DUTY" ) { - return ImpulseBase::BOTCHAT_START_CHOOSE_DUTY; + return Impulse::BOTCHAT_START_CHOOSE_DUTY; } else if( name == "BOTCHAT_NEXT_PAGE_DUTY" ) { - return ImpulseBase::BOTCHAT_NEXT_PAGE_DUTY; + return Impulse::BOTCHAT_NEXT_PAGE_DUTY; } else if( name == "BOTCHAT_DUTY_APPLY" ) { - return ImpulseBase::BOTCHAT_DUTY_APPLY; + return Impulse::BOTCHAT_DUTY_APPLY; } else if( name == "BOTCHAT_DUTY_CANCEL_APPLY" ) { - return ImpulseBase::BOTCHAT_DUTY_CANCEL_APPLY; + return Impulse::BOTCHAT_DUTY_CANCEL_APPLY; } else if( name == "BOTCHAT_START_TRADE_GUILD_OPTIONS" ) { - return ImpulseBase::BOTCHAT_START_TRADE_GUILD_OPTIONS; + return Impulse::BOTCHAT_START_TRADE_GUILD_OPTIONS; } else if( name == "BOTCHAT_BUY_GUILD_OPTION" ) { - return ImpulseBase::BOTCHAT_BUY_GUILD_OPTION; + return Impulse::BOTCHAT_BUY_GUILD_OPTION; } else if( name == "BOTCHAT_START_GUILD_RESEARCH" ) { - return ImpulseBase::BOTCHAT_START_GUILD_RESEARCH; + return Impulse::BOTCHAT_START_GUILD_RESEARCH; } else if( name == "BOTCHAT_DESTROY_BUILDING" ) { - return ImpulseBase::BOTCHAT_DESTROY_BUILDING; + return Impulse::BOTCHAT_DESTROY_BUILDING; } else if( name == "BOTCHAT_DYNCHAT_OPEN" ) { - return ImpulseBase::BOTCHAT_DYNCHAT_OPEN; + return Impulse::BOTCHAT_DYNCHAT_OPEN; } else if( name == "BOTCHAT_DYNCHAT_CLOSE" ) { - return ImpulseBase::BOTCHAT_DYNCHAT_CLOSE; + return Impulse::BOTCHAT_DYNCHAT_CLOSE; } else if( name == "BOTCHAT_DYNCHAT_SEND" ) { - return ImpulseBase::BOTCHAT_DYNCHAT_SEND; + return Impulse::BOTCHAT_DYNCHAT_SEND; } else if( name == "JOURNAL_INIT_COMPLETED_MISSIONS" ) { - return ImpulseBase::JOURNAL_INIT_COMPLETED_MISSIONS; + return Impulse::JOURNAL_INIT_COMPLETED_MISSIONS; } else if( name == "JOURNAL_UPDATE_COMPLETED_MISSIONS" ) { - return ImpulseBase::JOURNAL_UPDATE_COMPLETED_MISSIONS; + return Impulse::JOURNAL_UPDATE_COMPLETED_MISSIONS; } else if( name == "JOURNAL_MISSION_ABANDON" ) { - return ImpulseBase::JOURNAL_MISSION_ABANDON; + return Impulse::JOURNAL_MISSION_ABANDON; } else if( name == "JOURNAL_GROUP_MISSION_ABANDON" ) { - return ImpulseBase::JOURNAL_GROUP_MISSION_ABANDON; + return Impulse::JOURNAL_GROUP_MISSION_ABANDON; } else if( name == "JOURNAL_ADD_COMPASS" ) { - return ImpulseBase::JOURNAL_ADD_COMPASS; + return Impulse::JOURNAL_ADD_COMPASS; } else if( name == "JOURNAL_ADD_COMPASS_BOT" ) { - return ImpulseBase::JOURNAL_ADD_COMPASS_BOT; + return Impulse::JOURNAL_ADD_COMPASS_BOT; } else if( name == "JOURNAL_REMOVE_COMPASS" ) { - return ImpulseBase::JOURNAL_REMOVE_COMPASS; + return Impulse::JOURNAL_REMOVE_COMPASS; } else if( name == "JOURNAL_REMOVE_COMPASS_BOT" ) { - return ImpulseBase::JOURNAL_REMOVE_COMPASS_BOT; + return Impulse::JOURNAL_REMOVE_COMPASS_BOT; } else if( name == "STRING_MANAGER_SET_LANGUAGE" ) { - return ImpulseBase::STRING_MANAGER_SET_LANGUAGE; + return Impulse::STRING_MANAGER_SET_LANGUAGE; } else if( name == "STRING_MANAGER_PHRASE_SEND" ) { - return ImpulseBase::STRING_MANAGER_PHRASE_SEND; + return Impulse::STRING_MANAGER_PHRASE_SEND; } else if( name == "STRING_MANAGER_STRING_RQ" ) { - return ImpulseBase::STRING_MANAGER_STRING_RQ; + return Impulse::STRING_MANAGER_STRING_RQ; } else if( name == "STRING_MANAGER_STRING_RESP" ) { - return ImpulseBase::STRING_MANAGER_STRING_RESP; + return Impulse::STRING_MANAGER_STRING_RESP; } else if( name == "STRING_MANAGER_RELOAD_CACHE" ) { - return ImpulseBase::STRING_MANAGER_RELOAD_CACHE; + return Impulse::STRING_MANAGER_RELOAD_CACHE; } else if( name == "GUILD_CREATE" ) { - return ImpulseBase::GUILD_CREATE; + return Impulse::GUILD_CREATE; } else if( name == "GUILD_ABORT_CREATION" ) { - return ImpulseBase::GUILD_ABORT_CREATION; + return Impulse::GUILD_ABORT_CREATION; } else if( name == "GUILD_OPEN_GUILD_WINDOW" ) { - return ImpulseBase::GUILD_OPEN_GUILD_WINDOW; + return Impulse::GUILD_OPEN_GUILD_WINDOW; } else if( name == "GUILD_INVITATION" ) { - return ImpulseBase::GUILD_INVITATION; + return Impulse::GUILD_INVITATION; } else if( name == "GUILD_ACCEPT_INVITATION" ) { - return ImpulseBase::GUILD_ACCEPT_INVITATION; + return Impulse::GUILD_ACCEPT_INVITATION; } else if( name == "GUILD_REFUSE_INVITATION" ) { - return ImpulseBase::GUILD_REFUSE_INVITATION; + return Impulse::GUILD_REFUSE_INVITATION; } else if( name == "GUILD_JOIN_PROPOSAL" ) { - return ImpulseBase::GUILD_JOIN_PROPOSAL; + return Impulse::GUILD_JOIN_PROPOSAL; } else if( name == "GUILD_SET_GRADE" ) { - return ImpulseBase::GUILD_SET_GRADE; + return Impulse::GUILD_SET_GRADE; } else if( name == "GUILD_SET_LEADER" ) { - return ImpulseBase::GUILD_SET_LEADER; + return Impulse::GUILD_SET_LEADER; } else if( name == "GUILD_KICK_MEMBER" ) { - return ImpulseBase::GUILD_KICK_MEMBER; + return Impulse::GUILD_KICK_MEMBER; } else if( name == "GUILD_TELEPORT" ) { - return ImpulseBase::GUILD_TELEPORT; + return Impulse::GUILD_TELEPORT; } else if( name == "GUILD_ASCENSOR" ) { - return ImpulseBase::GUILD_ASCENSOR; + return Impulse::GUILD_ASCENSOR; } else if( name == "GUILD_FIRST_ASCENSOR_PAGE" ) { - return ImpulseBase::GUILD_FIRST_ASCENSOR_PAGE; + return Impulse::GUILD_FIRST_ASCENSOR_PAGE; } else if( name == "GUILD_NEXT_ASCENSOR_PAGE" ) { - return ImpulseBase::GUILD_NEXT_ASCENSOR_PAGE; + return Impulse::GUILD_NEXT_ASCENSOR_PAGE; } else if( name == "GUILD_LEAVE_ASCENSOR" ) { - return ImpulseBase::GUILD_LEAVE_ASCENSOR; + return Impulse::GUILD_LEAVE_ASCENSOR; } else if( name == "GUILD_QUIT" ) { - return ImpulseBase::GUILD_QUIT; + return Impulse::GUILD_QUIT; } else if( name == "GUILD_SET_PLAYER_TITLE" ) { - return ImpulseBase::GUILD_SET_PLAYER_TITLE; + return Impulse::GUILD_SET_PLAYER_TITLE; } else if( name == "GUILD_UPDATE_PLAYER_TITLE" ) { - return ImpulseBase::GUILD_UPDATE_PLAYER_TITLE; + return Impulse::GUILD_UPDATE_PLAYER_TITLE; } else if( name == "GUILD_USE_FEMALE_TITLES" ) { - return ImpulseBase::GUILD_USE_FEMALE_TITLES; + return Impulse::GUILD_USE_FEMALE_TITLES; } else if( name == "GUILD_PUT_MONEY" ) { - return ImpulseBase::GUILD_PUT_MONEY; + return Impulse::GUILD_PUT_MONEY; } else if( name == "GUILD_TAKE_MONEY" ) { - return ImpulseBase::GUILD_TAKE_MONEY; + return Impulse::GUILD_TAKE_MONEY; } else if( name == "GUILD_OPEN_INVENTORY" ) { - return ImpulseBase::GUILD_OPEN_INVENTORY; + return Impulse::GUILD_OPEN_INVENTORY; } else if( name == "GUILD_CLOSE_INVENTORY" ) { - return ImpulseBase::GUILD_CLOSE_INVENTORY; + return Impulse::GUILD_CLOSE_INVENTORY; } else if( name == "OUTPOST_GIVEUP_OUTPOST" ) { - return ImpulseBase::OUTPOST_GIVEUP_OUTPOST; + return Impulse::OUTPOST_GIVEUP_OUTPOST; } else if( name == "OUTPOST_SELECT" ) { - return ImpulseBase::OUTPOST_SELECT; + return Impulse::OUTPOST_SELECT; } else if( name == "OUTPOST_UNSELECT" ) { - return ImpulseBase::OUTPOST_UNSELECT; + return Impulse::OUTPOST_UNSELECT; } else if( name == "OUTPOST_DECLARE_WAR_START" ) { - return ImpulseBase::OUTPOST_DECLARE_WAR_START; + return Impulse::OUTPOST_DECLARE_WAR_START; } else if( name == "OUTPOST_DECLARE_WAR_ACK" ) { - return ImpulseBase::OUTPOST_DECLARE_WAR_ACK; + return Impulse::OUTPOST_DECLARE_WAR_ACK; } else if( name == "OUTPOST_DECLARE_WAR_VALIDATE" ) { - return ImpulseBase::OUTPOST_DECLARE_WAR_VALIDATE; + return Impulse::OUTPOST_DECLARE_WAR_VALIDATE; } else if( name == "OUTPOST_SET_DEF_PERIOD" ) { - return ImpulseBase::OUTPOST_SET_DEF_PERIOD; + return Impulse::OUTPOST_SET_DEF_PERIOD; } else if( name == "OUTPOST_SET_SQUAD" ) { - return ImpulseBase::OUTPOST_SET_SQUAD; + return Impulse::OUTPOST_SET_SQUAD; } else if( name == "OUTPOST_SET_SQUAD_SPAWN" ) { - return ImpulseBase::OUTPOST_SET_SQUAD_SPAWN; + return Impulse::OUTPOST_SET_SQUAD_SPAWN; } else if( name == "OUTPOST_INSERT_SQUAD" ) { - return ImpulseBase::OUTPOST_INSERT_SQUAD; + return Impulse::OUTPOST_INSERT_SQUAD; } else if( name == "OUTPOST_REMOVE_SQUAD" ) { - return ImpulseBase::OUTPOST_REMOVE_SQUAD; + return Impulse::OUTPOST_REMOVE_SQUAD; } else if( name == "OUTPOST_SET_SQUAD_CAPITAL" ) { - return ImpulseBase::OUTPOST_SET_SQUAD_CAPITAL; + return Impulse::OUTPOST_SET_SQUAD_CAPITAL; } else if( name == "OUTPOST_CHOOSE_SIDE" ) { - return ImpulseBase::OUTPOST_CHOOSE_SIDE; + return Impulse::OUTPOST_CHOOSE_SIDE; } else if( name == "OUTPOST_SIDE_CHOSEN" ) { - return ImpulseBase::OUTPOST_SIDE_CHOSEN; + return Impulse::OUTPOST_SIDE_CHOSEN; } else if( name == "OUTPOST_BANISH_PLAYER" ) { - return ImpulseBase::OUTPOST_BANISH_PLAYER; + return Impulse::OUTPOST_BANISH_PLAYER; } else if( name == "OUTPOST_BANISH_GUILD" ) { - return ImpulseBase::OUTPOST_BANISH_GUILD; + return Impulse::OUTPOST_BANISH_GUILD; } else if( name == "OUTPOST_BUY_BUILDING" ) { - return ImpulseBase::OUTPOST_BUY_BUILDING; + return Impulse::OUTPOST_BUY_BUILDING; } else if( name == "OUTPOST_DESTROY_BUILDING" ) { - return ImpulseBase::OUTPOST_DESTROY_BUILDING; + return Impulse::OUTPOST_DESTROY_BUILDING; } else if( name == "PHRASE_DELETE" ) { - return ImpulseBase::PHRASE_DELETE; + return Impulse::PHRASE_DELETE; } else if( name == "PHRASE_LEARN" ) { - return ImpulseBase::PHRASE_LEARN; + return Impulse::PHRASE_LEARN; } else if( name == "PHRASE_MEMORIZE" ) { - return ImpulseBase::PHRASE_MEMORIZE; + return Impulse::PHRASE_MEMORIZE; } else if( name == "PHRASE_FORGET" ) { - return ImpulseBase::PHRASE_FORGET; + return Impulse::PHRASE_FORGET; } else if( name == "PHRASE_EXECUTE" ) { - return ImpulseBase::PHRASE_EXECUTE; + return Impulse::PHRASE_EXECUTE; } else if( name == "PHRASE_EXECUTE_CYCLIC" ) { - return ImpulseBase::PHRASE_EXECUTE_CYCLIC; + return Impulse::PHRASE_EXECUTE_CYCLIC; } else if( name == "PHRASE_EXECUTE_FABER" ) { - return ImpulseBase::PHRASE_EXECUTE_FABER; + return Impulse::PHRASE_EXECUTE_FABER; } else if( name == "PHRASE_DOWNLOAD" ) { - return ImpulseBase::PHRASE_DOWNLOAD; + return Impulse::PHRASE_DOWNLOAD; } else if( name == "PHRASE_BUY" ) { - return ImpulseBase::PHRASE_BUY; + return Impulse::PHRASE_BUY; } else if( name == "PHRASE_CONFIRM_BUY" ) { - return ImpulseBase::PHRASE_CONFIRM_BUY; + return Impulse::PHRASE_CONFIRM_BUY; } else if( name == "PHRASE_BUY_SHEET" ) { - return ImpulseBase::PHRASE_BUY_SHEET; + return Impulse::PHRASE_BUY_SHEET; } else if( name == "PHRASE_CANCEL_LINK" ) { - return ImpulseBase::PHRASE_CANCEL_LINK; + return Impulse::PHRASE_CANCEL_LINK; } else if( name == "PHRASE_CANCEL_TOP" ) { - return ImpulseBase::PHRASE_CANCEL_TOP; + return Impulse::PHRASE_CANCEL_TOP; } else if( name == "PHRASE_CANCEL_ALL" ) { - return ImpulseBase::PHRASE_CANCEL_ALL; + return Impulse::PHRASE_CANCEL_ALL; } else if( name == "PHRASE_CRISTALIZE" ) { - return ImpulseBase::PHRASE_CRISTALIZE; + return Impulse::PHRASE_CRISTALIZE; } else if( name == "PHRASE_EXEC_CYCLIC_ACK" ) { - return ImpulseBase::PHRASE_EXEC_CYCLIC_ACK; + return Impulse::PHRASE_EXEC_CYCLIC_ACK; } else if( name == "PHRASE_EXEC_NEXT_ACK" ) { - return ImpulseBase::PHRASE_EXEC_NEXT_ACK; + return Impulse::PHRASE_EXEC_NEXT_ACK; } else if( name == "ITEM_INFO_GET" ) { - return ImpulseBase::ITEM_INFO_GET; + return Impulse::ITEM_INFO_GET; } else if( name == "ITEM_INFO_SET" ) { - return ImpulseBase::ITEM_INFO_SET; + return Impulse::ITEM_INFO_SET; } else if( name == "ITEM_INFO_REFRESH_VERSION" ) { - return ImpulseBase::ITEM_INFO_REFRESH_VERSION; + return Impulse::ITEM_INFO_REFRESH_VERSION; } else if( name == "MISSION_PREREQ_GET" ) { - return ImpulseBase::MISSION_PREREQ_GET; + return Impulse::MISSION_PREREQ_GET; } else if( name == "MISSION_PREREQ_SET" ) { - return ImpulseBase::MISSION_PREREQ_SET; + return Impulse::MISSION_PREREQ_SET; } else if( name == "MISSION_ENTER_CRITICAL" ) { - return ImpulseBase::MISSION_ENTER_CRITICAL; + return Impulse::MISSION_ENTER_CRITICAL; } else if( name == "MISSION_ASK_ENTER_CRITICAL" ) { - return ImpulseBase::MISSION_ASK_ENTER_CRITICAL; + return Impulse::MISSION_ASK_ENTER_CRITICAL; } else if( name == "MISSION_CLOSE_ENTER_CRITICAL" ) { - return ImpulseBase::MISSION_CLOSE_ENTER_CRITICAL; + return Impulse::MISSION_CLOSE_ENTER_CRITICAL; } else if( name == "MISSION_WAKE" ) { - return ImpulseBase::MISSION_WAKE; + return Impulse::MISSION_WAKE; } else if( name == "MISSION_GROUP_WAKE" ) { - return ImpulseBase::MISSION_GROUP_WAKE; + return Impulse::MISSION_GROUP_WAKE; } else if( name == "DUEL_ASK" ) { - return ImpulseBase::DUEL_ASK; + return Impulse::DUEL_ASK; } else if( name == "DUEL_ACCEPT" ) { - return ImpulseBase::DUEL_ACCEPT; + return Impulse::DUEL_ACCEPT; } else if( name == "DUEL_REFUSE" ) { - return ImpulseBase::DUEL_REFUSE; + return Impulse::DUEL_REFUSE; } else if( name == "DUEL_ABANDON" ) { - return ImpulseBase::DUEL_ABANDON; + return Impulse::DUEL_ABANDON; } else if( name == "DUEL_INVITATION" ) { - return ImpulseBase::DUEL_INVITATION; + return Impulse::DUEL_INVITATION; } else if( name == "DUEL_CANCEL_INVITATION" ) { - return ImpulseBase::DUEL_CANCEL_INVITATION; + return Impulse::DUEL_CANCEL_INVITATION; } else if( name == "PVP_CHALLENGE_ASK" ) { - return ImpulseBase::PVP_CHALLENGE_ASK; + return Impulse::PVP_CHALLENGE_ASK; } else if( name == "PVP_CHALLENGE_ACCEPT" ) { - return ImpulseBase::PVP_CHALLENGE_ACCEPT; + return Impulse::PVP_CHALLENGE_ACCEPT; } else if( name == "PVP_CHALLENGE_REFUSE" ) { - return ImpulseBase::PVP_CHALLENGE_REFUSE; + return Impulse::PVP_CHALLENGE_REFUSE; } else if( name == "PVP_CHALLENGE_ABANDON" ) { - return ImpulseBase::PVP_CHALLENGE_ABANDON; + return Impulse::PVP_CHALLENGE_ABANDON; } else if( name == "PVP_CHALLENGE_INVITATION" ) { - return ImpulseBase::PVP_CHALLENGE_INVITATION; + return Impulse::PVP_CHALLENGE_INVITATION; } else if( name == "PVP_CHALLENGE_CANCEL_INVITATION" ) { - return ImpulseBase::PVP_CHALLENGE_CANCEL_INVITATION; + return Impulse::PVP_CHALLENGE_CANCEL_INVITATION; } else if( name == "PVP_PVP_TAG" ) { - return ImpulseBase::PVP_PVP_TAG; + return Impulse::PVP_PVP_TAG; } else if( name == "PVP_SET_NEUTRAL_ALLEGIANCE" ) { - return ImpulseBase::PVP_SET_NEUTRAL_ALLEGIANCE; + return Impulse::PVP_SET_NEUTRAL_ALLEGIANCE; } else if( name == "PVP_SET_NEUTRAL_ALLEGIANCE_GUILD" ) { - return ImpulseBase::PVP_SET_NEUTRAL_ALLEGIANCE_GUILD; + return Impulse::PVP_SET_NEUTRAL_ALLEGIANCE_GUILD; } else if( name == "PVP_FACTION_PUSH_FACTION_WAR" ) { - return ImpulseBase::PVP_FACTION_PUSH_FACTION_WAR; + return Impulse::PVP_FACTION_PUSH_FACTION_WAR; } else if( name == "PVP_FACTION_POP_FACTION_WAR" ) { - return ImpulseBase::PVP_FACTION_POP_FACTION_WAR; + return Impulse::PVP_FACTION_POP_FACTION_WAR; } else if( name == "PVP_FACTION_FACTION_WARS" ) { - return ImpulseBase::PVP_FACTION_FACTION_WARS; + return Impulse::PVP_FACTION_FACTION_WARS; } else if( name == "ENCYCLOPEDIA_UPDATE" ) { - return ImpulseBase::ENCYCLOPEDIA_UPDATE; + return Impulse::ENCYCLOPEDIA_UPDATE; } else if( name == "ENCYCLOPEDIA_INIT" ) { - return ImpulseBase::ENCYCLOPEDIA_INIT; + return Impulse::ENCYCLOPEDIA_INIT; } else if( name == "USER_BARS" ) { - return ImpulseBase::USER_BARS; + return Impulse::USER_BARS; } else if( name == "USER_POPUP" ) { - return ImpulseBase::USER_POPUP; + return Impulse::USER_POPUP; } else if( name == "EVENT_SET_ITEM_CUSTOM_TEXT" ) { - return ImpulseBase::EVENT_SET_ITEM_CUSTOM_TEXT; + return Impulse::EVENT_SET_ITEM_CUSTOM_TEXT; } else if( name == "EVENT_DUMMY" ) { - return ImpulseBase::EVENT_DUMMY; + return Impulse::EVENT_DUMMY; } else if( name == "TOTEM_BUILD" ) { - return ImpulseBase::TOTEM_BUILD; + return Impulse::TOTEM_BUILD; } else if( name == "TOTEM_DUMMY" ) { - return ImpulseBase::TOTEM_DUMMY; + return Impulse::TOTEM_DUMMY; } else if( name == "MODULE_GATEWAY_FEOPEN" ) { - return ImpulseBase::MODULE_GATEWAY_FEOPEN; + return Impulse::MODULE_GATEWAY_FEOPEN; } else if( name == "MODULE_GATEWAY_GATEWAY_MSG" ) { - return ImpulseBase::MODULE_GATEWAY_GATEWAY_MSG; + return Impulse::MODULE_GATEWAY_GATEWAY_MSG; } else if( name == "MODULE_GATEWAY_FECLOSE" ) { - return ImpulseBase::MODULE_GATEWAY_FECLOSE; + return Impulse::MODULE_GATEWAY_FECLOSE; } else if( name == "SEASON_SET" ) { - return ImpulseBase::SEASON_SET; + return Impulse::SEASON_SET; } else if( name == "SEASON_DUMMY" ) { - return ImpulseBase::SEASON_DUMMY; + return Impulse::SEASON_DUMMY; } else if( name == "DM_GIFT_BEGIN" ) { - return ImpulseBase::DM_GIFT_BEGIN; + return Impulse::DM_GIFT_BEGIN; } else if( name == "DM_GIFT_VALIDATE" ) { - return ImpulseBase::DM_GIFT_VALIDATE; + return Impulse::DM_GIFT_VALIDATE; } else if( name == "RING_MISSION_MISSION_RING_SELECT" ) { - return ImpulseBase::RING_MISSION_MISSION_RING_SELECT; + return Impulse::RING_MISSION_MISSION_RING_SELECT; } else if( name == "RING_MISSION_DSS_DOWN" ) { - return ImpulseBase::RING_MISSION_DSS_DOWN; + return Impulse::RING_MISSION_DSS_DOWN; } else if( name == "NPC_ICON_GET_DESC" ) { - return ImpulseBase::NPC_ICON_GET_DESC; + return Impulse::NPC_ICON_GET_DESC; } else if( name == "NPC_ICON_SET_DESC" ) { - return ImpulseBase::NPC_ICON_SET_DESC; + return Impulse::NPC_ICON_SET_DESC; } else if( name == "NPC_ICON_SVR_EVENT_MIS_AVL" ) { - return ImpulseBase::NPC_ICON_SVR_EVENT_MIS_AVL; + return Impulse::NPC_ICON_SVR_EVENT_MIS_AVL; } else if( name == "NPC_ICON_SET_TIMER" ) { - return ImpulseBase::NPC_ICON_SET_TIMER; + return Impulse::NPC_ICON_SET_TIMER; } else { - WARN_PRINT("Ignore unknown keyword ImpulseBase '" + name + "'"); + WARN_PRINT("Ignore unknown keyword Impulse '" + name + "'"); } - return ImpulseBase::__LAST_ELEMENT; + return Impulse::__LAST_ELEMENT; } -String ImpulseBase::get_command_name(uint32_t id) +String Impulse::extract_command_name(uint32_t id) { switch (id) { - case ImpulseBase::Impulse::TARGET_PARTY: + case Impulse::Impulse::TARGET_PARTY: return "TARGET_PARTY"; - case ImpulseBase::Impulse::TARGET_INVENTORY: + case Impulse::Impulse::TARGET_INVENTORY: return "TARGET_INVENTORY"; - case ImpulseBase::Impulse::TARGET_FOLLOW: + case Impulse::Impulse::TARGET_FOLLOW: return "TARGET_FOLLOW"; - case ImpulseBase::Impulse::TARGET_NO_FOLLOW: + case Impulse::Impulse::TARGET_NO_FOLLOW: return "TARGET_NO_FOLLOW"; - case ImpulseBase::Impulse::CONNECTION_USER_CHAR: + case Impulse::Impulse::CONNECTION_USER_CHAR: return "CONNECTION_USER_CHAR"; - case ImpulseBase::Impulse::CONNECTION_NO_USER_CHAR: + case Impulse::Impulse::CONNECTION_NO_USER_CHAR: return "CONNECTION_NO_USER_CHAR"; - case ImpulseBase::Impulse::CONNECTION_USER_CHARS: + case Impulse::Impulse::CONNECTION_USER_CHARS: return "CONNECTION_USER_CHARS"; - case ImpulseBase::Impulse::CONNECTION_CREATE_CHAR: + case Impulse::Impulse::CONNECTION_CREATE_CHAR: return "CONNECTION_CREATE_CHAR"; - case ImpulseBase::Impulse::CONNECTION_SELECT_CHAR: + case Impulse::Impulse::CONNECTION_SELECT_CHAR: return "CONNECTION_SELECT_CHAR"; - case ImpulseBase::Impulse::CONNECTION_DELETE_CHAR: + case Impulse::Impulse::CONNECTION_DELETE_CHAR: return "CONNECTION_DELETE_CHAR"; - case ImpulseBase::Impulse::CONNECTION_RENAME_CHAR: + case Impulse::Impulse::CONNECTION_RENAME_CHAR: return "CONNECTION_RENAME_CHAR"; - case ImpulseBase::Impulse::CONNECTION_ENTER: + case Impulse::Impulse::CONNECTION_ENTER: return "CONNECTION_ENTER"; - case ImpulseBase::Impulse::CONNECTION_READY: + case Impulse::Impulse::CONNECTION_READY: return "CONNECTION_READY"; - case ImpulseBase::Impulse::CONNECTION_TIME_DATE_SYNCHRO: + case Impulse::Impulse::CONNECTION_TIME_DATE_SYNCHRO: return "CONNECTION_TIME_DATE_SYNCHRO"; - case ImpulseBase::Impulse::CONNECTION_ASK_NAME: + case Impulse::Impulse::CONNECTION_ASK_NAME: return "CONNECTION_ASK_NAME"; - case ImpulseBase::Impulse::CONNECTION_VALID_NAME: + case Impulse::Impulse::CONNECTION_VALID_NAME: return "CONNECTION_VALID_NAME"; - case ImpulseBase::Impulse::CONNECTION_CREATE_CHAR_ERROR: + case Impulse::Impulse::CONNECTION_CREATE_CHAR_ERROR: return "CONNECTION_CREATE_CHAR_ERROR"; - case ImpulseBase::Impulse::CONNECTION_RECONNECT: + case Impulse::Impulse::CONNECTION_RECONNECT: return "CONNECTION_RECONNECT"; - case ImpulseBase::Impulse::CONNECTION_SERVER_RECONNECT_OK: + case Impulse::Impulse::CONNECTION_SERVER_RECONNECT_OK: return "CONNECTION_SERVER_RECONNECT_OK"; - case ImpulseBase::Impulse::CONNECTION_SHARD_ID: + case Impulse::Impulse::CONNECTION_SHARD_ID: return "CONNECTION_SHARD_ID"; - case ImpulseBase::Impulse::CONNECTION_SERVER_QUIT_OK: + case Impulse::Impulse::CONNECTION_SERVER_QUIT_OK: return "CONNECTION_SERVER_QUIT_OK"; - case ImpulseBase::Impulse::CONNECTION_SERVER_QUIT_ABORT: + case Impulse::Impulse::CONNECTION_SERVER_QUIT_ABORT: return "CONNECTION_SERVER_QUIT_ABORT"; - case ImpulseBase::Impulse::CONNECTION_CLIENT_QUIT_REQUEST: + case Impulse::Impulse::CONNECTION_CLIENT_QUIT_REQUEST: return "CONNECTION_CLIENT_QUIT_REQUEST"; - case ImpulseBase::Impulse::CONNECTION_MAIL_AVAILABLE: + case Impulse::Impulse::CONNECTION_MAIL_AVAILABLE: return "CONNECTION_MAIL_AVAILABLE"; - case ImpulseBase::Impulse::CONNECTION_GUILD_MESSAGE_AVAILABLE: + case Impulse::Impulse::CONNECTION_GUILD_MESSAGE_AVAILABLE: return "CONNECTION_GUILD_MESSAGE_AVAILABLE"; - case ImpulseBase::Impulse::CONNECTION_PERMANENT_BAN: + case Impulse::Impulse::CONNECTION_PERMANENT_BAN: return "CONNECTION_PERMANENT_BAN"; - case ImpulseBase::Impulse::CONNECTION_UNBAN: + case Impulse::Impulse::CONNECTION_UNBAN: return "CONNECTION_UNBAN"; - case ImpulseBase::Impulse::CONNECTION_FAR_TP: + case Impulse::Impulse::CONNECTION_FAR_TP: return "CONNECTION_FAR_TP"; - case ImpulseBase::Impulse::CONNECTION_RET_MAINLAND: + case Impulse::Impulse::CONNECTION_RET_MAINLAND: return "CONNECTION_RET_MAINLAND"; - case ImpulseBase::Impulse::DB_UPD_PLR: + case Impulse::Impulse::DB_UPD_PLR: return "DB_UPD_PLR"; - case ImpulseBase::Impulse::DB_UPD_INV: + case Impulse::Impulse::DB_UPD_INV: return "DB_UPD_INV"; - case ImpulseBase::Impulse::DB_INIT_PLR: + case Impulse::Impulse::DB_INIT_PLR: return "DB_INIT_PLR"; - case ImpulseBase::Impulse::DB_INIT_INV: + case Impulse::Impulse::DB_INIT_INV: return "DB_INIT_INV"; - case ImpulseBase::Impulse::DB_GROUP_UPDATE_BANK: + case Impulse::Impulse::DB_GROUP_UPDATE_BANK: return "DB_GROUP_UPDATE_BANK"; - case ImpulseBase::Impulse::DB_GROUP_INIT_BANK: + case Impulse::Impulse::DB_GROUP_INIT_BANK: return "DB_GROUP_INIT_BANK"; - case ImpulseBase::Impulse::DB_GROUP_RESET_BANK: + case Impulse::Impulse::DB_GROUP_RESET_BANK: return "DB_GROUP_RESET_BANK"; - case ImpulseBase::Impulse::POSITION: + case Impulse::Impulse::POSITION: return "POSITION"; - case ImpulseBase::Impulse::HARVEST_DEPOSIT: + case Impulse::Impulse::HARVEST_DEPOSIT: return "HARVEST_DEPOSIT"; - case ImpulseBase::Impulse::HARVEST_CORPSE: + case Impulse::Impulse::HARVEST_CORPSE: return "HARVEST_CORPSE"; - case ImpulseBase::Impulse::HARVEST_INTERRUPT: + case Impulse::Impulse::HARVEST_INTERRUPT: return "HARVEST_INTERRUPT"; - case ImpulseBase::Impulse::HARVEST_CLOSE_TEMP_INVENTORY: + case Impulse::Impulse::HARVEST_CLOSE_TEMP_INVENTORY: return "HARVEST_CLOSE_TEMP_INVENTORY"; - case ImpulseBase::Impulse::TRAINING: + case Impulse::Impulse::TRAINING: return "TRAINING"; - case ImpulseBase::Impulse::JOB_SET_JOB_STATUS: + case Impulse::Impulse::JOB_SET_JOB_STATUS: return "JOB_SET_JOB_STATUS"; - case ImpulseBase::Impulse::JOB_SWAP_JOB_STATUS: + case Impulse::Impulse::JOB_SWAP_JOB_STATUS: return "JOB_SWAP_JOB_STATUS"; - case ImpulseBase::Impulse::CASTING_BEGIN: + case Impulse::Impulse::CASTING_BEGIN: return "CASTING_BEGIN"; - case ImpulseBase::Impulse::CASTING_INTERRUPT: + case Impulse::Impulse::CASTING_INTERRUPT: return "CASTING_INTERRUPT"; - case ImpulseBase::Impulse::FABER_OPEN: + case Impulse::Impulse::FABER_OPEN: return "FABER_OPEN"; - case ImpulseBase::Impulse::FABER_CLOSE: + case Impulse::Impulse::FABER_CLOSE: return "FABER_CLOSE"; - case ImpulseBase::Impulse::FABER_EXECUTE: + case Impulse::Impulse::FABER_EXECUTE: return "FABER_EXECUTE"; - case ImpulseBase::Impulse::FABER_SET_NUM_ITEM: + case Impulse::Impulse::FABER_SET_NUM_ITEM: return "FABER_SET_NUM_ITEM"; - case ImpulseBase::Impulse::FABER_START_CREATE: + case Impulse::Impulse::FABER_START_CREATE: return "FABER_START_CREATE"; - case ImpulseBase::Impulse::FABER_START_REPAIR: + case Impulse::Impulse::FABER_START_REPAIR: return "FABER_START_REPAIR"; - case ImpulseBase::Impulse::FABER_START_REFINE: + case Impulse::Impulse::FABER_START_REFINE: return "FABER_START_REFINE"; - case ImpulseBase::Impulse::FABER_SET_MP_QUALITY: + case Impulse::Impulse::FABER_SET_MP_QUALITY: return "FABER_SET_MP_QUALITY"; - case ImpulseBase::Impulse::FABER_SET_MP_REFINE: + case Impulse::Impulse::FABER_SET_MP_REFINE: return "FABER_SET_MP_REFINE"; - case ImpulseBase::Impulse::FABER_SET_TOOL: + case Impulse::Impulse::FABER_SET_TOOL: return "FABER_SET_TOOL"; - case ImpulseBase::Impulse::FABER_RESET_TOOL: + case Impulse::Impulse::FABER_RESET_TOOL: return "FABER_RESET_TOOL"; - case ImpulseBase::Impulse::FABER_INTERRUPT: + case Impulse::Impulse::FABER_INTERRUPT: return "FABER_INTERRUPT"; - case ImpulseBase::Impulse::COMBAT_ENGAGE: + case Impulse::Impulse::COMBAT_ENGAGE: return "COMBAT_ENGAGE"; - case ImpulseBase::Impulse::COMBAT_DISENGAGE: + case Impulse::Impulse::COMBAT_DISENGAGE: return "COMBAT_DISENGAGE"; - case ImpulseBase::Impulse::COMBAT_DEFAULT_ATTACK: + case Impulse::Impulse::COMBAT_DEFAULT_ATTACK: return "COMBAT_DEFAULT_ATTACK"; - case ImpulseBase::Impulse::COMBAT_ENGAGE_FAILED: + case Impulse::Impulse::COMBAT_ENGAGE_FAILED: return "COMBAT_ENGAGE_FAILED"; - case ImpulseBase::Impulse::COMBAT_VALIDATE_MELEE: + case Impulse::Impulse::COMBAT_VALIDATE_MELEE: return "COMBAT_VALIDATE_MELEE"; - case ImpulseBase::Impulse::COMBAT_PARRY: + case Impulse::Impulse::COMBAT_PARRY: return "COMBAT_PARRY"; - case ImpulseBase::Impulse::COMBAT_DODGE: + case Impulse::Impulse::COMBAT_DODGE: return "COMBAT_DODGE"; - case ImpulseBase::Impulse::COMBAT_PROTECTED_SLOT: + case Impulse::Impulse::COMBAT_PROTECTED_SLOT: return "COMBAT_PROTECTED_SLOT"; - case ImpulseBase::Impulse::COMBAT_FLYING_ChaScore1_DELTA: + case Impulse::Impulse::COMBAT_FLYING_ChaScore1_DELTA: return "COMBAT_FLYING_ChaScore1_DELTA"; - case ImpulseBase::Impulse::COMBAT_FLYING_TEXT_ISE: + case Impulse::Impulse::COMBAT_FLYING_TEXT_ISE: return "COMBAT_FLYING_TEXT_ISE"; - case ImpulseBase::Impulse::COMBAT_FLYING_TEXT: + case Impulse::Impulse::COMBAT_FLYING_TEXT: return "COMBAT_FLYING_TEXT"; - case ImpulseBase::Impulse::STRING_TELL: + case Impulse::Impulse::STRING_TELL: return "STRING_TELL"; - case ImpulseBase::Impulse::STRING_FAR_TELL: + case Impulse::Impulse::STRING_FAR_TELL: return "STRING_FAR_TELL"; - case ImpulseBase::Impulse::STRING_CHAT: + case Impulse::Impulse::STRING_CHAT: return "STRING_CHAT"; - case ImpulseBase::Impulse::STRING_CHAT_TEAM: + case Impulse::Impulse::STRING_CHAT_TEAM: return "STRING_CHAT_TEAM"; - case ImpulseBase::Impulse::STRING_ADD_DYN_STR: + case Impulse::Impulse::STRING_ADD_DYN_STR: return "STRING_ADD_DYN_STR"; - case ImpulseBase::Impulse::STRING_FILTER: + case Impulse::Impulse::STRING_FILTER: return "STRING_FILTER"; - case ImpulseBase::Impulse::STRING_CHAT_MODE: + case Impulse::Impulse::STRING_CHAT_MODE: return "STRING_CHAT_MODE"; - case ImpulseBase::Impulse::STRING_CHAT2: + case Impulse::Impulse::STRING_CHAT2: return "STRING_CHAT2"; - case ImpulseBase::Impulse::STRING_TELL2: + case Impulse::Impulse::STRING_TELL2: return "STRING_TELL2"; - case ImpulseBase::Impulse::STRING_DYN_STRING: + case Impulse::Impulse::STRING_DYN_STRING: return "STRING_DYN_STRING"; - case ImpulseBase::Impulse::STRING_DYN_STRING_GROUP: + case Impulse::Impulse::STRING_DYN_STRING_GROUP: return "STRING_DYN_STRING_GROUP"; - case ImpulseBase::Impulse::STRING_AFK_TXT: + case Impulse::Impulse::STRING_AFK_TXT: return "STRING_AFK_TXT"; - case ImpulseBase::Impulse::STUN_STUN: + case Impulse::Impulse::STUN_STUN: return "STUN_STUN"; - case ImpulseBase::Impulse::STUN_WAKE_UP: + case Impulse::Impulse::STUN_WAKE_UP: return "STUN_WAKE_UP"; - case ImpulseBase::Impulse::SENTENCE_EXECUTE: + case Impulse::Impulse::SENTENCE_EXECUTE: return "SENTENCE_EXECUTE"; - case ImpulseBase::Impulse::SENTENCE_CANCEL: + case Impulse::Impulse::SENTENCE_CANCEL: return "SENTENCE_CANCEL"; - case ImpulseBase::Impulse::SENTENCE_CANCEL_CURRENT: + case Impulse::Impulse::SENTENCE_CANCEL_CURRENT: return "SENTENCE_CANCEL_CURRENT"; - case ImpulseBase::Impulse::SENTENCE_CANCEL_ALL: + case Impulse::Impulse::SENTENCE_CANCEL_ALL: return "SENTENCE_CANCEL_ALL"; - case ImpulseBase::Impulse::SENTENCE_CLEAR: + case Impulse::Impulse::SENTENCE_CLEAR: return "SENTENCE_CLEAR"; - case ImpulseBase::Impulse::SENTENCE_MEMORIZE: + case Impulse::Impulse::SENTENCE_MEMORIZE: return "SENTENCE_MEMORIZE"; - case ImpulseBase::Impulse::SENTENCE_FORGET: + case Impulse::Impulse::SENTENCE_FORGET: return "SENTENCE_FORGET"; - case ImpulseBase::Impulse::SENTENCE_EVALUATE: + case Impulse::Impulse::SENTENCE_EVALUATE: return "SENTENCE_EVALUATE"; - case ImpulseBase::Impulse::SENTENCE_ADD_BRICK: + case Impulse::Impulse::SENTENCE_ADD_BRICK: return "SENTENCE_ADD_BRICK"; - case ImpulseBase::Impulse::SENTENCE_REMOVE_BRICK: + case Impulse::Impulse::SENTENCE_REMOVE_BRICK: return "SENTENCE_REMOVE_BRICK"; - case ImpulseBase::Impulse::SENTENCE_START: + case Impulse::Impulse::SENTENCE_START: return "SENTENCE_START"; - case ImpulseBase::Impulse::SENTENCE_STOP: + case Impulse::Impulse::SENTENCE_STOP: return "SENTENCE_STOP"; - case ImpulseBase::Impulse::TEAM_JOIN: + case Impulse::Impulse::TEAM_JOIN: return "TEAM_JOIN"; - case ImpulseBase::Impulse::TEAM_LEAVE: + case Impulse::Impulse::TEAM_LEAVE: return "TEAM_LEAVE"; - case ImpulseBase::Impulse::TEAM_INVITATION: + case Impulse::Impulse::TEAM_INVITATION: return "TEAM_INVITATION"; - case ImpulseBase::Impulse::TEAM_JOIN_PROPOSAL: + case Impulse::Impulse::TEAM_JOIN_PROPOSAL: return "TEAM_JOIN_PROPOSAL"; - case ImpulseBase::Impulse::TEAM_JOIN_PROPOSAL_DECLINE: + case Impulse::Impulse::TEAM_JOIN_PROPOSAL_DECLINE: return "TEAM_JOIN_PROPOSAL_DECLINE"; - case ImpulseBase::Impulse::TEAM_KICK: + case Impulse::Impulse::TEAM_KICK: return "TEAM_KICK"; - case ImpulseBase::Impulse::TEAM_SET_SUCCESSOR: + case Impulse::Impulse::TEAM_SET_SUCCESSOR: return "TEAM_SET_SUCCESSOR"; - case ImpulseBase::Impulse::TEAM_SHARE_OPEN: + case Impulse::Impulse::TEAM_SHARE_OPEN: return "TEAM_SHARE_OPEN"; - case ImpulseBase::Impulse::TEAM_SHARE_VALID_ITEM: + case Impulse::Impulse::TEAM_SHARE_VALID_ITEM: return "TEAM_SHARE_VALID_ITEM"; - case ImpulseBase::Impulse::TEAM_SHARE_INVALID_ITEM: + case Impulse::Impulse::TEAM_SHARE_INVALID_ITEM: return "TEAM_SHARE_INVALID_ITEM"; - case ImpulseBase::Impulse::TEAM_SHARE_VALID: + case Impulse::Impulse::TEAM_SHARE_VALID: return "TEAM_SHARE_VALID"; - case ImpulseBase::Impulse::TEAM_SHARE_INVALID: + case Impulse::Impulse::TEAM_SHARE_INVALID: return "TEAM_SHARE_INVALID"; - case ImpulseBase::Impulse::TEAM_SHARE_CLOSE: + case Impulse::Impulse::TEAM_SHARE_CLOSE: return "TEAM_SHARE_CLOSE"; - case ImpulseBase::Impulse::TEAM_CONTACT_INIT: + case Impulse::Impulse::TEAM_CONTACT_INIT: return "TEAM_CONTACT_INIT"; - case ImpulseBase::Impulse::TEAM_CONTACT_ADD: + case Impulse::Impulse::TEAM_CONTACT_ADD: return "TEAM_CONTACT_ADD"; - case ImpulseBase::Impulse::TEAM_CONTACT_DEL: + case Impulse::Impulse::TEAM_CONTACT_DEL: return "TEAM_CONTACT_DEL"; - case ImpulseBase::Impulse::TEAM_CONTACT_MOVE: + case Impulse::Impulse::TEAM_CONTACT_MOVE: return "TEAM_CONTACT_MOVE"; - case ImpulseBase::Impulse::TEAM_CONTACT_CREATE: + case Impulse::Impulse::TEAM_CONTACT_CREATE: return "TEAM_CONTACT_CREATE"; - case ImpulseBase::Impulse::TEAM_CONTACT_STATUS: + case Impulse::Impulse::TEAM_CONTACT_STATUS: return "TEAM_CONTACT_STATUS"; - case ImpulseBase::Impulse::TEAM_CONTACT_REMOVE: + case Impulse::Impulse::TEAM_CONTACT_REMOVE: return "TEAM_CONTACT_REMOVE"; - case ImpulseBase::Impulse::ITEM_DROP: + case Impulse::Impulse::ITEM_DROP: return "ITEM_DROP"; - case ImpulseBase::Impulse::ITEM_PICK_UP: + case Impulse::Impulse::ITEM_PICK_UP: return "ITEM_PICK_UP"; - case ImpulseBase::Impulse::ITEM_PICK_UP_CLOSE: + case Impulse::Impulse::ITEM_PICK_UP_CLOSE: return "ITEM_PICK_UP_CLOSE"; - case ImpulseBase::Impulse::ITEM_SWAP: + case Impulse::Impulse::ITEM_SWAP: return "ITEM_SWAP"; - case ImpulseBase::Impulse::ITEM_ACTIVATE_SHEATH: + case Impulse::Impulse::ITEM_ACTIVATE_SHEATH: return "ITEM_ACTIVATE_SHEATH"; - case ImpulseBase::Impulse::ITEM_HARVEST: + case Impulse::Impulse::ITEM_HARVEST: return "ITEM_HARVEST"; - case ImpulseBase::Impulse::ITEM_HARVEST_CLOSE: + case Impulse::Impulse::ITEM_HARVEST_CLOSE: return "ITEM_HARVEST_CLOSE"; - case ImpulseBase::Impulse::ITEM_GIVE: + case Impulse::Impulse::ITEM_GIVE: return "ITEM_GIVE"; - case ImpulseBase::Impulse::ITEM_DESTROY: + case Impulse::Impulse::ITEM_DESTROY: return "ITEM_DESTROY"; - case ImpulseBase::Impulse::ITEM_EQUIP: + case Impulse::Impulse::ITEM_EQUIP: return "ITEM_EQUIP"; - case ImpulseBase::Impulse::ITEM_UNEQUIP: + case Impulse::Impulse::ITEM_UNEQUIP: return "ITEM_UNEQUIP"; - case ImpulseBase::Impulse::ITEM_TEMP_TO_BAG: + case Impulse::Impulse::ITEM_TEMP_TO_BAG: return "ITEM_TEMP_TO_BAG"; - case ImpulseBase::Impulse::ITEM_ALL_TEMP: + case Impulse::Impulse::ITEM_ALL_TEMP: return "ITEM_ALL_TEMP"; - case ImpulseBase::Impulse::ITEM_NO_TEMP: + case Impulse::Impulse::ITEM_NO_TEMP: return "ITEM_NO_TEMP"; - case ImpulseBase::Impulse::ITEM_ENCHANT: + case Impulse::Impulse::ITEM_ENCHANT: return "ITEM_ENCHANT"; - case ImpulseBase::Impulse::ITEM_OPEN_ROOM_INVENTORY: + case Impulse::Impulse::ITEM_OPEN_ROOM_INVENTORY: return "ITEM_OPEN_ROOM_INVENTORY"; - case ImpulseBase::Impulse::ITEM_CLOSE_ROOM_INVENTORY: + case Impulse::Impulse::ITEM_CLOSE_ROOM_INVENTORY: return "ITEM_CLOSE_ROOM_INVENTORY"; - case ImpulseBase::Impulse::ITEM_USE_ITEM: + case Impulse::Impulse::ITEM_USE_ITEM: return "ITEM_USE_ITEM"; - case ImpulseBase::Impulse::ITEM_STOP_USE_XP_CAT: + case Impulse::Impulse::ITEM_STOP_USE_XP_CAT: return "ITEM_STOP_USE_XP_CAT"; - case ImpulseBase::Impulse::TP_RESPAWN: + case Impulse::Impulse::TP_RESPAWN: return "TP_RESPAWN"; - case ImpulseBase::Impulse::TP_BOT: + case Impulse::Impulse::TP_BOT: return "TP_BOT"; - case ImpulseBase::Impulse::TP_WANTED: + case Impulse::Impulse::TP_WANTED: return "TP_WANTED"; - case ImpulseBase::Impulse::TP_DEST: + case Impulse::Impulse::TP_DEST: return "TP_DEST"; - case ImpulseBase::Impulse::TP_DEST_WITH_SEASON: + case Impulse::Impulse::TP_DEST_WITH_SEASON: return "TP_DEST_WITH_SEASON"; - case ImpulseBase::Impulse::TP_ACK: + case Impulse::Impulse::TP_ACK: return "TP_ACK"; - case ImpulseBase::Impulse::TP_CORRECT: + case Impulse::Impulse::TP_CORRECT: return "TP_CORRECT"; - case ImpulseBase::Impulse::DEATH_RESPAWN_POINT: + case Impulse::Impulse::DEATH_RESPAWN_POINT: return "DEATH_RESPAWN_POINT"; - case ImpulseBase::Impulse::DEATH_ASK_RESPAWN: + case Impulse::Impulse::DEATH_ASK_RESPAWN: return "DEATH_ASK_RESPAWN"; - case ImpulseBase::Impulse::DEATH_RESPAWN: + case Impulse::Impulse::DEATH_RESPAWN: return "DEATH_RESPAWN"; - case ImpulseBase::Impulse::ANIMALS_BEAST: + case Impulse::Impulse::ANIMALS_BEAST: return "ANIMALS_BEAST"; - case ImpulseBase::Impulse::ANIMALS_MOUNT_ABORT: + case Impulse::Impulse::ANIMALS_MOUNT_ABORT: return "ANIMALS_MOUNT_ABORT"; - case ImpulseBase::Impulse::EXCHANGE_INVITATION: + case Impulse::Impulse::EXCHANGE_INVITATION: return "EXCHANGE_INVITATION"; - case ImpulseBase::Impulse::EXCHANGE_CLOSE_INVITATION: + case Impulse::Impulse::EXCHANGE_CLOSE_INVITATION: return "EXCHANGE_CLOSE_INVITATION"; - case ImpulseBase::Impulse::EXCHANGE_PROPOSAL: + case Impulse::Impulse::EXCHANGE_PROPOSAL: return "EXCHANGE_PROPOSAL"; - case ImpulseBase::Impulse::EXCHANGE_ACCEPT_INVITATION: + case Impulse::Impulse::EXCHANGE_ACCEPT_INVITATION: return "EXCHANGE_ACCEPT_INVITATION"; - case ImpulseBase::Impulse::EXCHANGE_DECLINE_INVITATION: + case Impulse::Impulse::EXCHANGE_DECLINE_INVITATION: return "EXCHANGE_DECLINE_INVITATION"; - case ImpulseBase::Impulse::EXCHANGE_VALIDATE: + case Impulse::Impulse::EXCHANGE_VALIDATE: return "EXCHANGE_VALIDATE"; - case ImpulseBase::Impulse::EXCHANGE_INVALIDATE: + case Impulse::Impulse::EXCHANGE_INVALIDATE: return "EXCHANGE_INVALIDATE"; - case ImpulseBase::Impulse::EXCHANGE_END: + case Impulse::Impulse::EXCHANGE_END: return "EXCHANGE_END"; - case ImpulseBase::Impulse::EXCHANGE_SEEDS: + case Impulse::Impulse::EXCHANGE_SEEDS: return "EXCHANGE_SEEDS"; - case ImpulseBase::Impulse::EXCHANGE_ADD: + case Impulse::Impulse::EXCHANGE_ADD: return "EXCHANGE_ADD"; - case ImpulseBase::Impulse::EXCHANGE_REMOVE: + case Impulse::Impulse::EXCHANGE_REMOVE: return "EXCHANGE_REMOVE"; - case ImpulseBase::Impulse::DEBUG_WHERE: + case Impulse::Impulse::DEBUG_WHERE: return "DEBUG_WHERE"; - case ImpulseBase::Impulse::DEBUG_WHO: + case Impulse::Impulse::DEBUG_WHO: return "DEBUG_WHO"; - case ImpulseBase::Impulse::DEBUG_REPLY_WHERE: + case Impulse::Impulse::DEBUG_REPLY_WHERE: return "DEBUG_REPLY_WHERE"; - case ImpulseBase::Impulse::DEBUG_SERVICES: + case Impulse::Impulse::DEBUG_SERVICES: return "DEBUG_SERVICES"; - case ImpulseBase::Impulse::DEBUG_CMD: + case Impulse::Impulse::DEBUG_CMD: return "DEBUG_CMD"; - case ImpulseBase::Impulse::DEBUG_PING: + case Impulse::Impulse::DEBUG_PING: return "DEBUG_PING"; - case ImpulseBase::Impulse::DEBUG_COUNTER: + case Impulse::Impulse::DEBUG_COUNTER: return "DEBUG_COUNTER"; - case ImpulseBase::Impulse::COMMAND_EMOTE: + case Impulse::Impulse::COMMAND_EMOTE: return "COMMAND_EMOTE"; - case ImpulseBase::Impulse::COMMAND_CUSTOM_EMOTE: + case Impulse::Impulse::COMMAND_CUSTOM_EMOTE: return "COMMAND_CUSTOM_EMOTE"; - case ImpulseBase::Impulse::COMMAND_WHERE: + case Impulse::Impulse::COMMAND_WHERE: return "COMMAND_WHERE"; - case ImpulseBase::Impulse::COMMAND_ADMIN: + case Impulse::Impulse::COMMAND_ADMIN: return "COMMAND_ADMIN"; - case ImpulseBase::Impulse::COMMAND_ADMIN_OFFLINE: + case Impulse::Impulse::COMMAND_ADMIN_OFFLINE: return "COMMAND_ADMIN_OFFLINE"; - case ImpulseBase::Impulse::COMMAND_REMOTE_ADMIN: + case Impulse::Impulse::COMMAND_REMOTE_ADMIN: return "COMMAND_REMOTE_ADMIN"; - case ImpulseBase::Impulse::COMMAND_REMOTE_ADMIN_ANSWER: + case Impulse::Impulse::COMMAND_REMOTE_ADMIN_ANSWER: return "COMMAND_REMOTE_ADMIN_ANSWER"; - case ImpulseBase::Impulse::COMMAND_SIT: + case Impulse::Impulse::COMMAND_SIT: return "COMMAND_SIT"; - case ImpulseBase::Impulse::COMMAND_AFK: + case Impulse::Impulse::COMMAND_AFK: return "COMMAND_AFK"; - case ImpulseBase::Impulse::COMMAND_RANDOM: + case Impulse::Impulse::COMMAND_RANDOM: return "COMMAND_RANDOM"; - case ImpulseBase::Impulse::COMMAND_GUILDMOTD: + case Impulse::Impulse::COMMAND_GUILDMOTD: return "COMMAND_GUILDMOTD"; - case ImpulseBase::Impulse::MP_EVAL_SET_MP: + case Impulse::Impulse::MP_EVAL_SET_MP: return "MP_EVAL_SET_MP"; - case ImpulseBase::Impulse::MP_EVAL_SET_MP_LEVEL: + case Impulse::Impulse::MP_EVAL_SET_MP_LEVEL: return "MP_EVAL_SET_MP_LEVEL"; - case ImpulseBase::Impulse::MP_EVAL_SET_MARKET: + case Impulse::Impulse::MP_EVAL_SET_MARKET: return "MP_EVAL_SET_MARKET"; - case ImpulseBase::Impulse::MP_EVAL_EXECUTE: + case Impulse::Impulse::MP_EVAL_EXECUTE: return "MP_EVAL_EXECUTE"; - case ImpulseBase::Impulse::BOTCHAT_NEXT_PAGE_ITEM: + case Impulse::Impulse::BOTCHAT_NEXT_PAGE_ITEM: return "BOTCHAT_NEXT_PAGE_ITEM"; - case ImpulseBase::Impulse::BOTCHAT_NEXT_PAGE_MISSION: + case Impulse::Impulse::BOTCHAT_NEXT_PAGE_MISSION: return "BOTCHAT_NEXT_PAGE_MISSION"; - case ImpulseBase::Impulse::BOTCHAT_START_TRADE_ITEM: + case Impulse::Impulse::BOTCHAT_START_TRADE_ITEM: return "BOTCHAT_START_TRADE_ITEM"; - case ImpulseBase::Impulse::BOTCHAT_START_TRADE_TELEPORT: + case Impulse::Impulse::BOTCHAT_START_TRADE_TELEPORT: return "BOTCHAT_START_TRADE_TELEPORT"; - case ImpulseBase::Impulse::BOTCHAT_START_TRADE_FACTION: + case Impulse::Impulse::BOTCHAT_START_TRADE_FACTION: return "BOTCHAT_START_TRADE_FACTION"; - case ImpulseBase::Impulse::BOTCHAT_START_TRADE_SKILL: + case Impulse::Impulse::BOTCHAT_START_TRADE_SKILL: return "BOTCHAT_START_TRADE_SKILL"; - case ImpulseBase::Impulse::BOTCHAT_START_TRADE_PACT: + case Impulse::Impulse::BOTCHAT_START_TRADE_PACT: return "BOTCHAT_START_TRADE_PACT"; - case ImpulseBase::Impulse::BOTCHAT_START_TRADE_ACTION: + case Impulse::Impulse::BOTCHAT_START_TRADE_ACTION: return "BOTCHAT_START_TRADE_ACTION"; - case ImpulseBase::Impulse::BOTCHAT_BUY: + case Impulse::Impulse::BOTCHAT_BUY: return "BOTCHAT_BUY"; - case ImpulseBase::Impulse::BOTCHAT_SELL: + case Impulse::Impulse::BOTCHAT_SELL: return "BOTCHAT_SELL"; - case ImpulseBase::Impulse::BOTCHAT_DESTROY_ITEM: + case Impulse::Impulse::BOTCHAT_DESTROY_ITEM: return "BOTCHAT_DESTROY_ITEM"; - case ImpulseBase::Impulse::BOTCHAT_REFRESH_TRADE_LIST: + case Impulse::Impulse::BOTCHAT_REFRESH_TRADE_LIST: return "BOTCHAT_REFRESH_TRADE_LIST"; - case ImpulseBase::Impulse::BOTCHAT_SET_FILTERS: + case Impulse::Impulse::BOTCHAT_SET_FILTERS: return "BOTCHAT_SET_FILTERS"; - case ImpulseBase::Impulse::BOTCHAT_START_CHOOSE_MISSION: + case Impulse::Impulse::BOTCHAT_START_CHOOSE_MISSION: return "BOTCHAT_START_CHOOSE_MISSION"; - case ImpulseBase::Impulse::BOTCHAT_START_DYNAMIC_MISSION: + case Impulse::Impulse::BOTCHAT_START_DYNAMIC_MISSION: return "BOTCHAT_START_DYNAMIC_MISSION"; - case ImpulseBase::Impulse::BOTCHAT_CONTINUE_MISSION: + case Impulse::Impulse::BOTCHAT_CONTINUE_MISSION: return "BOTCHAT_CONTINUE_MISSION"; - case ImpulseBase::Impulse::BOTCHAT_VALIDATE_PLAYER_GIFT: + case Impulse::Impulse::BOTCHAT_VALIDATE_PLAYER_GIFT: return "BOTCHAT_VALIDATE_PLAYER_GIFT"; - case ImpulseBase::Impulse::BOTCHAT_PICK_MISSION: + case Impulse::Impulse::BOTCHAT_PICK_MISSION: return "BOTCHAT_PICK_MISSION"; - case ImpulseBase::Impulse::BOTCHAT_DM_CHOICE: + case Impulse::Impulse::BOTCHAT_DM_CHOICE: return "BOTCHAT_DM_CHOICE"; - case ImpulseBase::Impulse::BOTCHAT_DM_ACCEPT: + case Impulse::Impulse::BOTCHAT_DM_ACCEPT: return "BOTCHAT_DM_ACCEPT"; - case ImpulseBase::Impulse::BOTCHAT_START_NEWS: + case Impulse::Impulse::BOTCHAT_START_NEWS: return "BOTCHAT_START_NEWS"; - case ImpulseBase::Impulse::BOTCHAT_START_CREATE_GUILD: + case Impulse::Impulse::BOTCHAT_START_CREATE_GUILD: return "BOTCHAT_START_CREATE_GUILD"; - case ImpulseBase::Impulse::BOTCHAT_END: + case Impulse::Impulse::BOTCHAT_END: return "BOTCHAT_END"; - case ImpulseBase::Impulse::BOTCHAT_FORCE_END: + case Impulse::Impulse::BOTCHAT_FORCE_END: return "BOTCHAT_FORCE_END"; - case ImpulseBase::Impulse::BOTCHAT_START_CHOOSE_DUTY: + case Impulse::Impulse::BOTCHAT_START_CHOOSE_DUTY: return "BOTCHAT_START_CHOOSE_DUTY"; - case ImpulseBase::Impulse::BOTCHAT_NEXT_PAGE_DUTY: + case Impulse::Impulse::BOTCHAT_NEXT_PAGE_DUTY: return "BOTCHAT_NEXT_PAGE_DUTY"; - case ImpulseBase::Impulse::BOTCHAT_DUTY_APPLY: + case Impulse::Impulse::BOTCHAT_DUTY_APPLY: return "BOTCHAT_DUTY_APPLY"; - case ImpulseBase::Impulse::BOTCHAT_DUTY_CANCEL_APPLY: + case Impulse::Impulse::BOTCHAT_DUTY_CANCEL_APPLY: return "BOTCHAT_DUTY_CANCEL_APPLY"; - case ImpulseBase::Impulse::BOTCHAT_START_TRADE_GUILD_OPTIONS: + case Impulse::Impulse::BOTCHAT_START_TRADE_GUILD_OPTIONS: return "BOTCHAT_START_TRADE_GUILD_OPTIONS"; - case ImpulseBase::Impulse::BOTCHAT_BUY_GUILD_OPTION: + case Impulse::Impulse::BOTCHAT_BUY_GUILD_OPTION: return "BOTCHAT_BUY_GUILD_OPTION"; - case ImpulseBase::Impulse::BOTCHAT_START_GUILD_RESEARCH: + case Impulse::Impulse::BOTCHAT_START_GUILD_RESEARCH: return "BOTCHAT_START_GUILD_RESEARCH"; - case ImpulseBase::Impulse::BOTCHAT_DESTROY_BUILDING: + case Impulse::Impulse::BOTCHAT_DESTROY_BUILDING: return "BOTCHAT_DESTROY_BUILDING"; - case ImpulseBase::Impulse::BOTCHAT_DYNCHAT_OPEN: + case Impulse::Impulse::BOTCHAT_DYNCHAT_OPEN: return "BOTCHAT_DYNCHAT_OPEN"; - case ImpulseBase::Impulse::BOTCHAT_DYNCHAT_CLOSE: + case Impulse::Impulse::BOTCHAT_DYNCHAT_CLOSE: return "BOTCHAT_DYNCHAT_CLOSE"; - case ImpulseBase::Impulse::BOTCHAT_DYNCHAT_SEND: + case Impulse::Impulse::BOTCHAT_DYNCHAT_SEND: return "BOTCHAT_DYNCHAT_SEND"; - case ImpulseBase::Impulse::JOURNAL_INIT_COMPLETED_MISSIONS: + case Impulse::Impulse::JOURNAL_INIT_COMPLETED_MISSIONS: return "JOURNAL_INIT_COMPLETED_MISSIONS"; - case ImpulseBase::Impulse::JOURNAL_UPDATE_COMPLETED_MISSIONS: + case Impulse::Impulse::JOURNAL_UPDATE_COMPLETED_MISSIONS: return "JOURNAL_UPDATE_COMPLETED_MISSIONS"; - case ImpulseBase::Impulse::JOURNAL_MISSION_ABANDON: + case Impulse::Impulse::JOURNAL_MISSION_ABANDON: return "JOURNAL_MISSION_ABANDON"; - case ImpulseBase::Impulse::JOURNAL_GROUP_MISSION_ABANDON: + case Impulse::Impulse::JOURNAL_GROUP_MISSION_ABANDON: return "JOURNAL_GROUP_MISSION_ABANDON"; - case ImpulseBase::Impulse::JOURNAL_ADD_COMPASS: + case Impulse::Impulse::JOURNAL_ADD_COMPASS: return "JOURNAL_ADD_COMPASS"; - case ImpulseBase::Impulse::JOURNAL_ADD_COMPASS_BOT: + case Impulse::Impulse::JOURNAL_ADD_COMPASS_BOT: return "JOURNAL_ADD_COMPASS_BOT"; - case ImpulseBase::Impulse::JOURNAL_REMOVE_COMPASS: + case Impulse::Impulse::JOURNAL_REMOVE_COMPASS: return "JOURNAL_REMOVE_COMPASS"; - case ImpulseBase::Impulse::JOURNAL_REMOVE_COMPASS_BOT: + case Impulse::Impulse::JOURNAL_REMOVE_COMPASS_BOT: return "JOURNAL_REMOVE_COMPASS_BOT"; - case ImpulseBase::Impulse::STRING_MANAGER_SET_LANGUAGE: + case Impulse::Impulse::STRING_MANAGER_SET_LANGUAGE: return "STRING_MANAGER_SET_LANGUAGE"; - case ImpulseBase::Impulse::STRING_MANAGER_PHRASE_SEND: + case Impulse::Impulse::STRING_MANAGER_PHRASE_SEND: return "STRING_MANAGER_PHRASE_SEND"; - case ImpulseBase::Impulse::STRING_MANAGER_STRING_RQ: + case Impulse::Impulse::STRING_MANAGER_STRING_RQ: return "STRING_MANAGER_STRING_RQ"; - case ImpulseBase::Impulse::STRING_MANAGER_STRING_RESP: + case Impulse::Impulse::STRING_MANAGER_STRING_RESP: return "STRING_MANAGER_STRING_RESP"; - case ImpulseBase::Impulse::STRING_MANAGER_RELOAD_CACHE: + case Impulse::Impulse::STRING_MANAGER_RELOAD_CACHE: return "STRING_MANAGER_RELOAD_CACHE"; - case ImpulseBase::Impulse::GUILD_CREATE: + case Impulse::Impulse::GUILD_CREATE: return "GUILD_CREATE"; - case ImpulseBase::Impulse::GUILD_ABORT_CREATION: + case Impulse::Impulse::GUILD_ABORT_CREATION: return "GUILD_ABORT_CREATION"; - case ImpulseBase::Impulse::GUILD_OPEN_GUILD_WINDOW: + case Impulse::Impulse::GUILD_OPEN_GUILD_WINDOW: return "GUILD_OPEN_GUILD_WINDOW"; - case ImpulseBase::Impulse::GUILD_INVITATION: + case Impulse::Impulse::GUILD_INVITATION: return "GUILD_INVITATION"; - case ImpulseBase::Impulse::GUILD_ACCEPT_INVITATION: + case Impulse::Impulse::GUILD_ACCEPT_INVITATION: return "GUILD_ACCEPT_INVITATION"; - case ImpulseBase::Impulse::GUILD_REFUSE_INVITATION: + case Impulse::Impulse::GUILD_REFUSE_INVITATION: return "GUILD_REFUSE_INVITATION"; - case ImpulseBase::Impulse::GUILD_JOIN_PROPOSAL: + case Impulse::Impulse::GUILD_JOIN_PROPOSAL: return "GUILD_JOIN_PROPOSAL"; - case ImpulseBase::Impulse::GUILD_SET_GRADE: + case Impulse::Impulse::GUILD_SET_GRADE: return "GUILD_SET_GRADE"; - case ImpulseBase::Impulse::GUILD_SET_LEADER: + case Impulse::Impulse::GUILD_SET_LEADER: return "GUILD_SET_LEADER"; - case ImpulseBase::Impulse::GUILD_KICK_MEMBER: + case Impulse::Impulse::GUILD_KICK_MEMBER: return "GUILD_KICK_MEMBER"; - case ImpulseBase::Impulse::GUILD_TELEPORT: + case Impulse::Impulse::GUILD_TELEPORT: return "GUILD_TELEPORT"; - case ImpulseBase::Impulse::GUILD_ASCENSOR: + case Impulse::Impulse::GUILD_ASCENSOR: return "GUILD_ASCENSOR"; - case ImpulseBase::Impulse::GUILD_FIRST_ASCENSOR_PAGE: + case Impulse::Impulse::GUILD_FIRST_ASCENSOR_PAGE: return "GUILD_FIRST_ASCENSOR_PAGE"; - case ImpulseBase::Impulse::GUILD_NEXT_ASCENSOR_PAGE: + case Impulse::Impulse::GUILD_NEXT_ASCENSOR_PAGE: return "GUILD_NEXT_ASCENSOR_PAGE"; - case ImpulseBase::Impulse::GUILD_LEAVE_ASCENSOR: + case Impulse::Impulse::GUILD_LEAVE_ASCENSOR: return "GUILD_LEAVE_ASCENSOR"; - case ImpulseBase::Impulse::GUILD_QUIT: + case Impulse::Impulse::GUILD_QUIT: return "GUILD_QUIT"; - case ImpulseBase::Impulse::GUILD_SET_PLAYER_TITLE: + case Impulse::Impulse::GUILD_SET_PLAYER_TITLE: return "GUILD_SET_PLAYER_TITLE"; - case ImpulseBase::Impulse::GUILD_UPDATE_PLAYER_TITLE: + case Impulse::Impulse::GUILD_UPDATE_PLAYER_TITLE: return "GUILD_UPDATE_PLAYER_TITLE"; - case ImpulseBase::Impulse::GUILD_USE_FEMALE_TITLES: + case Impulse::Impulse::GUILD_USE_FEMALE_TITLES: return "GUILD_USE_FEMALE_TITLES"; - case ImpulseBase::Impulse::GUILD_PUT_MONEY: + case Impulse::Impulse::GUILD_PUT_MONEY: return "GUILD_PUT_MONEY"; - case ImpulseBase::Impulse::GUILD_TAKE_MONEY: + case Impulse::Impulse::GUILD_TAKE_MONEY: return "GUILD_TAKE_MONEY"; - case ImpulseBase::Impulse::GUILD_OPEN_INVENTORY: + case Impulse::Impulse::GUILD_OPEN_INVENTORY: return "GUILD_OPEN_INVENTORY"; - case ImpulseBase::Impulse::GUILD_CLOSE_INVENTORY: + case Impulse::Impulse::GUILD_CLOSE_INVENTORY: return "GUILD_CLOSE_INVENTORY"; - case ImpulseBase::Impulse::OUTPOST_GIVEUP_OUTPOST: + case Impulse::Impulse::OUTPOST_GIVEUP_OUTPOST: return "OUTPOST_GIVEUP_OUTPOST"; - case ImpulseBase::Impulse::OUTPOST_SELECT: + case Impulse::Impulse::OUTPOST_SELECT: return "OUTPOST_SELECT"; - case ImpulseBase::Impulse::OUTPOST_UNSELECT: + case Impulse::Impulse::OUTPOST_UNSELECT: return "OUTPOST_UNSELECT"; - case ImpulseBase::Impulse::OUTPOST_DECLARE_WAR_START: + case Impulse::Impulse::OUTPOST_DECLARE_WAR_START: return "OUTPOST_DECLARE_WAR_START"; - case ImpulseBase::Impulse::OUTPOST_DECLARE_WAR_ACK: + case Impulse::Impulse::OUTPOST_DECLARE_WAR_ACK: return "OUTPOST_DECLARE_WAR_ACK"; - case ImpulseBase::Impulse::OUTPOST_DECLARE_WAR_VALIDATE: + case Impulse::Impulse::OUTPOST_DECLARE_WAR_VALIDATE: return "OUTPOST_DECLARE_WAR_VALIDATE"; - case ImpulseBase::Impulse::OUTPOST_SET_DEF_PERIOD: + case Impulse::Impulse::OUTPOST_SET_DEF_PERIOD: return "OUTPOST_SET_DEF_PERIOD"; - case ImpulseBase::Impulse::OUTPOST_SET_SQUAD: + case Impulse::Impulse::OUTPOST_SET_SQUAD: return "OUTPOST_SET_SQUAD"; - case ImpulseBase::Impulse::OUTPOST_SET_SQUAD_SPAWN: + case Impulse::Impulse::OUTPOST_SET_SQUAD_SPAWN: return "OUTPOST_SET_SQUAD_SPAWN"; - case ImpulseBase::Impulse::OUTPOST_INSERT_SQUAD: + case Impulse::Impulse::OUTPOST_INSERT_SQUAD: return "OUTPOST_INSERT_SQUAD"; - case ImpulseBase::Impulse::OUTPOST_REMOVE_SQUAD: + case Impulse::Impulse::OUTPOST_REMOVE_SQUAD: return "OUTPOST_REMOVE_SQUAD"; - case ImpulseBase::Impulse::OUTPOST_SET_SQUAD_CAPITAL: + case Impulse::Impulse::OUTPOST_SET_SQUAD_CAPITAL: return "OUTPOST_SET_SQUAD_CAPITAL"; - case ImpulseBase::Impulse::OUTPOST_CHOOSE_SIDE: + case Impulse::Impulse::OUTPOST_CHOOSE_SIDE: return "OUTPOST_CHOOSE_SIDE"; - case ImpulseBase::Impulse::OUTPOST_SIDE_CHOSEN: + case Impulse::Impulse::OUTPOST_SIDE_CHOSEN: return "OUTPOST_SIDE_CHOSEN"; - case ImpulseBase::Impulse::OUTPOST_BANISH_PLAYER: + case Impulse::Impulse::OUTPOST_BANISH_PLAYER: return "OUTPOST_BANISH_PLAYER"; - case ImpulseBase::Impulse::OUTPOST_BANISH_GUILD: + case Impulse::Impulse::OUTPOST_BANISH_GUILD: return "OUTPOST_BANISH_GUILD"; - case ImpulseBase::Impulse::OUTPOST_BUY_BUILDING: + case Impulse::Impulse::OUTPOST_BUY_BUILDING: return "OUTPOST_BUY_BUILDING"; - case ImpulseBase::Impulse::OUTPOST_DESTROY_BUILDING: + case Impulse::Impulse::OUTPOST_DESTROY_BUILDING: return "OUTPOST_DESTROY_BUILDING"; - case ImpulseBase::Impulse::PHRASE_DELETE: + case Impulse::Impulse::PHRASE_DELETE: return "PHRASE_DELETE"; - case ImpulseBase::Impulse::PHRASE_LEARN: + case Impulse::Impulse::PHRASE_LEARN: return "PHRASE_LEARN"; - case ImpulseBase::Impulse::PHRASE_MEMORIZE: + case Impulse::Impulse::PHRASE_MEMORIZE: return "PHRASE_MEMORIZE"; - case ImpulseBase::Impulse::PHRASE_FORGET: + case Impulse::Impulse::PHRASE_FORGET: return "PHRASE_FORGET"; - case ImpulseBase::Impulse::PHRASE_EXECUTE: + case Impulse::Impulse::PHRASE_EXECUTE: return "PHRASE_EXECUTE"; - case ImpulseBase::Impulse::PHRASE_EXECUTE_CYCLIC: + case Impulse::Impulse::PHRASE_EXECUTE_CYCLIC: return "PHRASE_EXECUTE_CYCLIC"; - case ImpulseBase::Impulse::PHRASE_EXECUTE_FABER: + case Impulse::Impulse::PHRASE_EXECUTE_FABER: return "PHRASE_EXECUTE_FABER"; - case ImpulseBase::Impulse::PHRASE_DOWNLOAD: + case Impulse::Impulse::PHRASE_DOWNLOAD: return "PHRASE_DOWNLOAD"; - case ImpulseBase::Impulse::PHRASE_BUY: + case Impulse::Impulse::PHRASE_BUY: return "PHRASE_BUY"; - case ImpulseBase::Impulse::PHRASE_CONFIRM_BUY: + case Impulse::Impulse::PHRASE_CONFIRM_BUY: return "PHRASE_CONFIRM_BUY"; - case ImpulseBase::Impulse::PHRASE_BUY_SHEET: + case Impulse::Impulse::PHRASE_BUY_SHEET: return "PHRASE_BUY_SHEET"; - case ImpulseBase::Impulse::PHRASE_CANCEL_LINK: + case Impulse::Impulse::PHRASE_CANCEL_LINK: return "PHRASE_CANCEL_LINK"; - case ImpulseBase::Impulse::PHRASE_CANCEL_TOP: + case Impulse::Impulse::PHRASE_CANCEL_TOP: return "PHRASE_CANCEL_TOP"; - case ImpulseBase::Impulse::PHRASE_CANCEL_ALL: + case Impulse::Impulse::PHRASE_CANCEL_ALL: return "PHRASE_CANCEL_ALL"; - case ImpulseBase::Impulse::PHRASE_CRISTALIZE: + case Impulse::Impulse::PHRASE_CRISTALIZE: return "PHRASE_CRISTALIZE"; - case ImpulseBase::Impulse::PHRASE_EXEC_CYCLIC_ACK: + case Impulse::Impulse::PHRASE_EXEC_CYCLIC_ACK: return "PHRASE_EXEC_CYCLIC_ACK"; - case ImpulseBase::Impulse::PHRASE_EXEC_NEXT_ACK: + case Impulse::Impulse::PHRASE_EXEC_NEXT_ACK: return "PHRASE_EXEC_NEXT_ACK"; - case ImpulseBase::Impulse::ITEM_INFO_GET: + case Impulse::Impulse::ITEM_INFO_GET: return "ITEM_INFO_GET"; - case ImpulseBase::Impulse::ITEM_INFO_SET: + case Impulse::Impulse::ITEM_INFO_SET: return "ITEM_INFO_SET"; - case ImpulseBase::Impulse::ITEM_INFO_REFRESH_VERSION: + case Impulse::Impulse::ITEM_INFO_REFRESH_VERSION: return "ITEM_INFO_REFRESH_VERSION"; - case ImpulseBase::Impulse::MISSION_PREREQ_GET: + case Impulse::Impulse::MISSION_PREREQ_GET: return "MISSION_PREREQ_GET"; - case ImpulseBase::Impulse::MISSION_PREREQ_SET: + case Impulse::Impulse::MISSION_PREREQ_SET: return "MISSION_PREREQ_SET"; - case ImpulseBase::Impulse::MISSION_ENTER_CRITICAL: + case Impulse::Impulse::MISSION_ENTER_CRITICAL: return "MISSION_ENTER_CRITICAL"; - case ImpulseBase::Impulse::MISSION_ASK_ENTER_CRITICAL: + case Impulse::Impulse::MISSION_ASK_ENTER_CRITICAL: return "MISSION_ASK_ENTER_CRITICAL"; - case ImpulseBase::Impulse::MISSION_CLOSE_ENTER_CRITICAL: + case Impulse::Impulse::MISSION_CLOSE_ENTER_CRITICAL: return "MISSION_CLOSE_ENTER_CRITICAL"; - case ImpulseBase::Impulse::MISSION_WAKE: + case Impulse::Impulse::MISSION_WAKE: return "MISSION_WAKE"; - case ImpulseBase::Impulse::MISSION_GROUP_WAKE: + case Impulse::Impulse::MISSION_GROUP_WAKE: return "MISSION_GROUP_WAKE"; - case ImpulseBase::Impulse::DUEL_ASK: + case Impulse::Impulse::DUEL_ASK: return "DUEL_ASK"; - case ImpulseBase::Impulse::DUEL_ACCEPT: + case Impulse::Impulse::DUEL_ACCEPT: return "DUEL_ACCEPT"; - case ImpulseBase::Impulse::DUEL_REFUSE: + case Impulse::Impulse::DUEL_REFUSE: return "DUEL_REFUSE"; - case ImpulseBase::Impulse::DUEL_ABANDON: + case Impulse::Impulse::DUEL_ABANDON: return "DUEL_ABANDON"; - case ImpulseBase::Impulse::DUEL_INVITATION: + case Impulse::Impulse::DUEL_INVITATION: return "DUEL_INVITATION"; - case ImpulseBase::Impulse::DUEL_CANCEL_INVITATION: + case Impulse::Impulse::DUEL_CANCEL_INVITATION: return "DUEL_CANCEL_INVITATION"; - case ImpulseBase::Impulse::PVP_CHALLENGE_ASK: + case Impulse::Impulse::PVP_CHALLENGE_ASK: return "PVP_CHALLENGE_ASK"; - case ImpulseBase::Impulse::PVP_CHALLENGE_ACCEPT: + case Impulse::Impulse::PVP_CHALLENGE_ACCEPT: return "PVP_CHALLENGE_ACCEPT"; - case ImpulseBase::Impulse::PVP_CHALLENGE_REFUSE: + case Impulse::Impulse::PVP_CHALLENGE_REFUSE: return "PVP_CHALLENGE_REFUSE"; - case ImpulseBase::Impulse::PVP_CHALLENGE_ABANDON: + case Impulse::Impulse::PVP_CHALLENGE_ABANDON: return "PVP_CHALLENGE_ABANDON"; - case ImpulseBase::Impulse::PVP_CHALLENGE_INVITATION: + case Impulse::Impulse::PVP_CHALLENGE_INVITATION: return "PVP_CHALLENGE_INVITATION"; - case ImpulseBase::Impulse::PVP_CHALLENGE_CANCEL_INVITATION: + case Impulse::Impulse::PVP_CHALLENGE_CANCEL_INVITATION: return "PVP_CHALLENGE_CANCEL_INVITATION"; - case ImpulseBase::Impulse::PVP_PVP_TAG: + case Impulse::Impulse::PVP_PVP_TAG: return "PVP_PVP_TAG"; - case ImpulseBase::Impulse::PVP_SET_NEUTRAL_ALLEGIANCE: + case Impulse::Impulse::PVP_SET_NEUTRAL_ALLEGIANCE: return "PVP_SET_NEUTRAL_ALLEGIANCE"; - case ImpulseBase::Impulse::PVP_SET_NEUTRAL_ALLEGIANCE_GUILD: + case Impulse::Impulse::PVP_SET_NEUTRAL_ALLEGIANCE_GUILD: return "PVP_SET_NEUTRAL_ALLEGIANCE_GUILD"; - case ImpulseBase::Impulse::PVP_FACTION_PUSH_FACTION_WAR: + case Impulse::Impulse::PVP_FACTION_PUSH_FACTION_WAR: return "PVP_FACTION_PUSH_FACTION_WAR"; - case ImpulseBase::Impulse::PVP_FACTION_POP_FACTION_WAR: + case Impulse::Impulse::PVP_FACTION_POP_FACTION_WAR: return "PVP_FACTION_POP_FACTION_WAR"; - case ImpulseBase::Impulse::PVP_FACTION_FACTION_WARS: + case Impulse::Impulse::PVP_FACTION_FACTION_WARS: return "PVP_FACTION_FACTION_WARS"; - case ImpulseBase::Impulse::ENCYCLOPEDIA_UPDATE: + case Impulse::Impulse::ENCYCLOPEDIA_UPDATE: return "ENCYCLOPEDIA_UPDATE"; - case ImpulseBase::Impulse::ENCYCLOPEDIA_INIT: + case Impulse::Impulse::ENCYCLOPEDIA_INIT: return "ENCYCLOPEDIA_INIT"; - case ImpulseBase::Impulse::USER_BARS: + case Impulse::Impulse::USER_BARS: return "USER_BARS"; - case ImpulseBase::Impulse::USER_POPUP: + case Impulse::Impulse::USER_POPUP: return "USER_POPUP"; - case ImpulseBase::Impulse::EVENT_SET_ITEM_CUSTOM_TEXT: + case Impulse::Impulse::EVENT_SET_ITEM_CUSTOM_TEXT: return "EVENT_SET_ITEM_CUSTOM_TEXT"; - case ImpulseBase::Impulse::EVENT_DUMMY: + case Impulse::Impulse::EVENT_DUMMY: return "EVENT_DUMMY"; - case ImpulseBase::Impulse::TOTEM_BUILD: + case Impulse::Impulse::TOTEM_BUILD: return "TOTEM_BUILD"; - case ImpulseBase::Impulse::TOTEM_DUMMY: + case Impulse::Impulse::TOTEM_DUMMY: return "TOTEM_DUMMY"; - case ImpulseBase::Impulse::MODULE_GATEWAY_FEOPEN: + case Impulse::Impulse::MODULE_GATEWAY_FEOPEN: return "MODULE_GATEWAY_FEOPEN"; - case ImpulseBase::Impulse::MODULE_GATEWAY_GATEWAY_MSG: + case Impulse::Impulse::MODULE_GATEWAY_GATEWAY_MSG: return "MODULE_GATEWAY_GATEWAY_MSG"; - case ImpulseBase::Impulse::MODULE_GATEWAY_FECLOSE: + case Impulse::Impulse::MODULE_GATEWAY_FECLOSE: return "MODULE_GATEWAY_FECLOSE"; - case ImpulseBase::Impulse::SEASON_SET: + case Impulse::Impulse::SEASON_SET: return "SEASON_SET"; - case ImpulseBase::Impulse::SEASON_DUMMY: + case Impulse::Impulse::SEASON_DUMMY: return "SEASON_DUMMY"; - case ImpulseBase::Impulse::DM_GIFT_BEGIN: + case Impulse::Impulse::DM_GIFT_BEGIN: return "DM_GIFT_BEGIN"; - case ImpulseBase::Impulse::DM_GIFT_VALIDATE: + case Impulse::Impulse::DM_GIFT_VALIDATE: return "DM_GIFT_VALIDATE"; - case ImpulseBase::Impulse::RING_MISSION_MISSION_RING_SELECT: + case Impulse::Impulse::RING_MISSION_MISSION_RING_SELECT: return "RING_MISSION_MISSION_RING_SELECT"; - case ImpulseBase::Impulse::RING_MISSION_DSS_DOWN: + case Impulse::Impulse::RING_MISSION_DSS_DOWN: return "RING_MISSION_DSS_DOWN"; - case ImpulseBase::Impulse::NPC_ICON_GET_DESC: + case Impulse::Impulse::NPC_ICON_GET_DESC: return "NPC_ICON_GET_DESC"; - case ImpulseBase::Impulse::NPC_ICON_SET_DESC: + case Impulse::Impulse::NPC_ICON_SET_DESC: return "NPC_ICON_SET_DESC"; - case ImpulseBase::Impulse::NPC_ICON_SVR_EVENT_MIS_AVL: + case Impulse::Impulse::NPC_ICON_SVR_EVENT_MIS_AVL: return "NPC_ICON_SVR_EVENT_MIS_AVL"; - case ImpulseBase::Impulse::NPC_ICON_SET_TIMER: + case Impulse::Impulse::NPC_ICON_SET_TIMER: return "NPC_ICON_SET_TIMER"; - case ImpulseBase::Impulse::__LAST_ELEMENT: + case Impulse::Impulse::__LAST_ELEMENT: return "__LAST_ELEMENT"; default: return "?"; } } -String ImpulseBase::get_name(Variant id) +String Impulse::extract_name(Variant id) { - uint32_t _id = id; - return ImpulseBase::get_command_name(_id); + uint32_t i = id; + return Impulse::extract_command_name(i); +} + +String Impulse::get_name() +{ + return Impulse::extract_command_name(this->_id); +} + +void Impulse::put_stream(Ref msgout) +{ + ReferentialMessage ref_msg; + ref_msg.write_command((Impulse::eImpulse) this->_id, msgout); } \ No newline at end of file diff --git a/modules/impulse/impulsebase.h b/modules/impulse/impulse.h similarity index 94% rename from modules/impulse/impulsebase.h rename to modules/impulse/impulse.h index b6e00af..3e87392 100644 --- a/modules/impulse/impulsebase.h +++ b/modules/impulse/impulse.h @@ -18,23 +18,22 @@ */ -#ifndef IMPULSE_BASE_H -#define IMPULSE_BASE_H +#ifndef IMPULSE_H +#define IMPULSE_H #include "core/object.h" #include "core/reference.h" +#include "modules/bitstream/bitstream.h" -class ImpulseBase : public Reference +class Impulse : public Reference { - GDCLASS(ImpulseBase, Reference) + GDCLASS(Impulse, Reference) protected: static void _bind_methods(); +private: + int _id; public: - - ImpulseBase() {} - ~ImpulseBase() {} - - enum Impulse { + enum eImpulse { TARGET_PARTY, TARGET_INVENTORY, TARGET_FOLLOW, @@ -372,12 +371,21 @@ public: __LAST_ELEMENT }; - static int get_command(String name); - static String get_command_name(uint32_t id); - String get_name(Variant id); + Impulse() {_id = eImpulse::__LAST_ELEMENT;} + Impulse(int id) {_id = id;} + ~Impulse() {} + + static int extract_command_id(String name); + static String extract_command_name(uint32_t id); + String extract_name(Variant id); // if static flag is activate, I can't find method to bind with gdscript + String get_name(); + + int get_id() {return this->_id;} + + void put_stream(Ref msgout); }; -VARIANT_ENUM_CAST(ImpulseBase::Impulse); +VARIANT_ENUM_CAST(Impulse::eImpulse); #endif \ No newline at end of file diff --git a/modules/impulse/impulse_connection_delete_char.h b/modules/impulse/impulse_connection_delete_char.h new file mode 100644 index 0000000..255e9f3 --- /dev/null +++ b/modules/impulse/impulse_connection_delete_char.h @@ -0,0 +1,61 @@ +/* + Header Impulse CONNECTION_DELETE_CHAR + + 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 . + */ + +#ifndef IMPULSE_CONNECTION_DELETE_CHAR +#define IMPULSE_CONNECTION_DELETE_CHAR + + +#include "core/reference.h" +#include "modules/impulse/impulse.h" +#include "modules/bitstream/bitstream.h" + +class ImpulseConnectionDeleteChar : public Impulse +{ + GDCLASS(ImpulseConnectionDeleteChar, Reference) + Variant _slot; +public: + + ImpulseConnectionDeleteChar() : Impulse(Impulse::CONNECTION_DELETE_CHAR) {_slot = 0;} + ~ImpulseConnectionDeleteChar() {} + + void set_data(Variant slot) { _slot = slot;} + + void put_stream(Ref msgout) + { + Impulse::put_stream(msgout); + msgout->put_uint8((uint8_t)_slot); + } + + String get_name() + { + // We need re-expose function for gdscript + return Impulse::get_name(); + } + +protected: + static void _bind_methods() + { + ClassDB::bind_method(D_METHOD("get_name"), &ImpulseConnectionDeleteChar::get_name); + ClassDB::bind_method(D_METHOD("set_data", "slot"), &ImpulseConnectionDeleteChar::set_data); + ClassDB::bind_method(D_METHOD("put_stream", "msgout"), &ImpulseConnectionDeleteChar::put_stream); + } +}; + + +#endif \ No newline at end of file diff --git a/modules/impulse/register_types.cpp b/modules/impulse/register_types.cpp index f528e53..0b28072 100644 --- a/modules/impulse/register_types.cpp +++ b/modules/impulse/register_types.cpp @@ -3,11 +3,13 @@ #include "register_types.h" #include "core/class_db.h" -#include "impulsebase.h" +#include "impulse.h" +#include "impulse_connection_delete_char.h" #include "people.h" void register_impulse_types() { - ClassDB::register_class(); + ClassDB::register_class(); + ClassDB::register_class(); ClassDB::register_class(); } diff --git a/modules/referentialmessage/referentialmessage.cpp b/modules/referentialmessage/referentialmessage.cpp index f0962b3..f63ea3a 100644 --- a/modules/referentialmessage/referentialmessage.cpp +++ b/modules/referentialmessage/referentialmessage.cpp @@ -21,7 +21,7 @@ #include "referentialmessage.h" #include "core/os/os.h" -#include "modules/impulse/impulsebase.h" +#include "modules/impulse/impulse.h" void ReferentialMessage::_bind_methods() { @@ -47,7 +47,7 @@ int ReferentialMessage::read_command(Ref msgin) return ReferentialMessageCore::get_singleton()->read_command(msgin); } -void ReferentialMessage::write_command(ImpulseBase::Impulse command, Ref msgout) +void ReferentialMessage::write_command(Impulse::eImpulse command, Ref msgout) { ReferentialMessageCore::get_singleton()->write_command(command, msgout); } diff --git a/modules/referentialmessage/referentialmessage.h b/modules/referentialmessage/referentialmessage.h index a178b24..11e25a7 100644 --- a/modules/referentialmessage/referentialmessage.h +++ b/modules/referentialmessage/referentialmessage.h @@ -25,7 +25,7 @@ //#include "core/dictionary.h" //#include "modules/bitstream/bitstream.h" #include "modules/referentialmessage/referentialmessagecore.h" -#include "modules/impulse/impulsebase.h" +#include "modules/impulse/impulse.h" class ReferentialMessage : public Reference { GDCLASS(ReferentialMessage, Reference) @@ -41,7 +41,7 @@ public: void show(); int read_command(Ref msgin); - void write_command(ImpulseBase::Impulse command, Ref msgout); + void write_command(Impulse::eImpulse command, Ref msgout); void clear_session(); }; diff --git a/modules/referentialmessage/referentialmessagecore.cpp b/modules/referentialmessage/referentialmessagecore.cpp index 93e7616..60fa6a6 100644 --- a/modules/referentialmessage/referentialmessagecore.cpp +++ b/modules/referentialmessage/referentialmessagecore.cpp @@ -21,7 +21,7 @@ #include "modules/debug/debug.h" -#include "modules/impulse/impulsebase.h" +#include "modules/impulse/impulse.h" #include "referentialmessagecore.h" ReferentialMessageCore *ReferentialMessageCore::singleton = nullptr; @@ -35,14 +35,14 @@ 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:" + ImpulseBase::get_command_name(_id) + " pos:" + itos(pos) + " ------ power:" + itos(_power2)); + DBG_PRINT("level:" + itos(level) + " " + a + " id:" + Impulse::extract_command_name(_id) + " pos:" + itos(pos) + " ------ power:" + itos(_power2)); } else { - DBG_PRINT("level:" + itos(level) + " " + a + " pos:" + itos(pos) + " id:" + ImpulseBase::get_command_name(_id)); + DBG_PRINT("level:" + itos(level) + " " + a + " pos:" + itos(pos) + " id:" + Impulse::extract_command_name(_id)); } level ++; for(int i=0;i<_children.size();++i) @@ -57,7 +57,7 @@ int ElementReferential::read_command(Ref msgin) uint32_t i = msgin->get_serial(_power2); Ref child = _children[i]; - if ( child->_id != ImpulseBase::Impulse::__LAST_ELEMENT ) + if ( child->_id != Impulse::__LAST_ELEMENT ) return child->_id; return child->read_command(msgin); } @@ -98,8 +98,8 @@ void ReferentialMessageCore::read_referential_step(Dictionary step, Vectorput_serial(head.get(ii).get_pos(), getPowerOf2(_size)); - int id = ImpulseBase::get_command(a); - if (id != ImpulseBase::Impulse::__LAST_ELEMENT) + int id = Impulse::extract_command_id(a); + if (id != Impulse::__LAST_ELEMENT) { _encoder[id].copy_ref_bitstream(ele); root->set_id(id); @@ -117,7 +117,7 @@ void ReferentialMessageCore::read_referential_step(Dictionary step, Vector root_child = root->add_child(ImpulseBase::Impulse::__LAST_ELEMENT, i); + Ref root_child = root->add_child(Impulse::__LAST_ELEMENT, i); Variant child ; child = step[name]; ElementHead tmp; @@ -133,7 +133,7 @@ void ReferentialMessageCore::read_referential(Dictionary dictionary_message) { Vector head; DBG_PRINT("Read Referential Message"); - _decoder->set_id(ImpulseBase::Impulse::__LAST_ELEMENT); + _decoder->set_id(Impulse::__LAST_ELEMENT); read_referential_step(dictionary_message, head, _decoder); } @@ -148,9 +148,9 @@ void ReferentialMessageCore::show() */ // show Element to push data { - for(int i = 0; i < ImpulseBase::Impulse::__LAST_ELEMENT; ++i) + for(int i = 0; i < Impulse::__LAST_ELEMENT; ++i) { - DBG_PRINT(itos(i) + ") " + ImpulseBase::get_command_name(i) + " " + this->_encoder[i].show().ascii().get_data() + " [size:" + itos(this->_encoder[i].size_data()) + "]"); + DBG_PRINT(itos(i) + ") " + Impulse::extract_command_name(i) + " " + this->_encoder[i].show().ascii().get_data() + " [size:" + itos(this->_encoder[i].size_data()) + "]"); } } // show element to read data @@ -171,12 +171,12 @@ int ReferentialMessageCore::read_command(Ref msgin) return _decoder->read_command(msgin); } -void ReferentialMessageCore::write_command(ImpulseBase::Impulse command, Ref msgout) +void ReferentialMessageCore::write_command(Impulse::eImpulse command, Ref msgout) { #ifdef DEBUG_ENABLED - if ( command >= ImpulseBase::Impulse::__LAST_ELEMENT ) + if ( command >= Impulse::__LAST_ELEMENT ) { - ERR_PRINT("Out of range (" + itos(command) + " / " + itos(ImpulseBase::Impulse::__LAST_ELEMENT) + ")"); + ERR_PRINT("Out of range (" + itos(command) + " / " + itos(Impulse::__LAST_ELEMENT) + ")"); throw "Out of range"; } #endif diff --git a/modules/referentialmessage/referentialmessagecore.h b/modules/referentialmessage/referentialmessagecore.h index b38b8bd..87b482b 100644 --- a/modules/referentialmessage/referentialmessagecore.h +++ b/modules/referentialmessage/referentialmessagecore.h @@ -25,7 +25,7 @@ #include "core/dictionary.h" #include "modules/bitstream/bitstream.h" #include "modules/debug/debug.h" -#include "modules/impulse/impulsebase.h" +#include "modules/impulse/impulse.h" inline uint32_t getPowerOf2(uint32_t v) { @@ -85,7 +85,7 @@ public: }; private: static ReferentialMessageCore *singleton; - BitStream _encoder[ImpulseBase::Impulse::__LAST_ELEMENT]; + BitStream _encoder[Impulse::__LAST_ELEMENT]; Ref _decoder; void read_referential_step(Dictionary step, Vector head, Ref root); public: @@ -100,7 +100,7 @@ public: static void clear_session(); int read_command(Ref msgin); - void write_command(ImpulseBase::Impulse command, Ref msgout); + void write_command(Impulse::eImpulse command, Ref msgout); }; #endif \ No newline at end of file