test-client-godot/modules/action/action_factory.cpp

1615 lines
42 KiB
C++
Raw Normal View History

2020-04-11 11:56:47 +00:00
/*
Action Factory
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 <http://www.gnu.org/licenses/>.
*/
#include "core/reference.h"
2020-04-18 22:36:11 +00:00
#include "core/array.h"
#include "core/dictionary.h"
2020-04-11 11:56:47 +00:00
#include "modules/debug/debug.h"
#include "modules/networkconnection/network_data.h"
#include "modules/networkconnection/state_connexion.h"
#include "modules/referentialmessage/referentialmessage.h"
#include "modules/referentialmessage/referentialmessagecore.h"
2020-04-19 12:37:04 +00:00
#include "modules/impulse/impulsebase.h"
#include "action_factory.h"
2020-04-11 11:56:47 +00:00
2020-04-18 22:36:11 +00:00
void ActionFactory::decode_message(NetworkData * data, Ref<BitStream> msgin)
2020-04-11 11:56:47 +00:00
{
2020-04-18 22:36:11 +00:00
Dictionary value;
2020-04-11 11:56:47 +00:00
ReferentialMessage ref_msg;
uint32_t id = ref_msg.read_command(msgin);
2020-04-19 12:37:04 +00:00
DBG_PRINT("Decode message:" + ImpulseBase::get_command_name(id));
2020-04-18 22:36:11 +00:00
value["command"] = id;
#ifdef DEBUG_ENABLED
2020-04-19 12:37:04 +00:00
value["command_debug"] = ImpulseBase::get_command_name(id);
2020-04-18 22:36:11 +00:00
#endif
2020-04-11 11:56:47 +00:00
switch(id)
{
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TARGET_PARTY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TARGET_INVENTORY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TARGET_FOLLOW:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TARGET_NO_FOLLOW:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_USER_CHAR:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_NO_USER_CHAR:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_USER_CHARS:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_CREATE_CHAR:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_SELECT_CHAR:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_DELETE_CHAR:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_RENAME_CHAR:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_ENTER:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_READY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_TIME_DATE_SYNCHRO:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_ASK_NAME:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_VALID_NAME:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_CREATE_CHAR_ERROR:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_RECONNECT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_SERVER_RECONNECT_OK:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_SHARD_ID:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_SERVER_QUIT_OK:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_SERVER_QUIT_ABORT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_CLIENT_QUIT_REQUEST:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_MAIL_AVAILABLE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_GUILD_MESSAGE_AVAILABLE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_PERMANENT_BAN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_UNBAN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_FAR_TP:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CONNECTION_RET_MAINLAND:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DB_UPD_PLR:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DB_UPD_INV:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DB_INIT_PLR:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DB_INIT_INV:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DB_GROUP_UPDATE_BANK:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DB_GROUP_INIT_BANK:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DB_GROUP_RESET_BANK:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::POSITION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::HARVEST_DEPOSIT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::HARVEST_CORPSE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::HARVEST_INTERRUPT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::HARVEST_CLOSE_TEMP_INVENTORY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TRAINING:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::JOB_SET_JOB_STATUS:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::JOB_SWAP_JOB_STATUS:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CASTING_BEGIN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::CASTING_INTERRUPT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::FABER_OPEN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::FABER_CLOSE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::FABER_EXECUTE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::FABER_SET_NUM_ITEM:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::FABER_START_CREATE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::FABER_START_REPAIR:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::FABER_START_REFINE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::FABER_SET_MP_QUALITY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::FABER_SET_MP_REFINE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::FABER_SET_TOOL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::FABER_RESET_TOOL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::FABER_INTERRUPT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMBAT_ENGAGE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMBAT_DISENGAGE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMBAT_DEFAULT_ATTACK:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMBAT_ENGAGE_FAILED:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMBAT_VALIDATE_MELEE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMBAT_PARRY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMBAT_DODGE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMBAT_PROTECTED_SLOT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMBAT_FLYING_ChaScore1_DELTA:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMBAT_FLYING_TEXT_ISE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMBAT_FLYING_TEXT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STRING_TELL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STRING_FAR_TELL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STRING_CHAT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STRING_CHAT_TEAM:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STRING_ADD_DYN_STR:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STRING_FILTER:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STRING_CHAT_MODE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STRING_CHAT2:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STRING_TELL2:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STRING_DYN_STRING:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STRING_DYN_STRING_GROUP:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STRING_AFK_TXT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STUN_STUN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STUN_WAKE_UP:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::SENTENCE_EXECUTE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::SENTENCE_CANCEL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::SENTENCE_CANCEL_CURRENT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::SENTENCE_CANCEL_ALL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::SENTENCE_CLEAR:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::SENTENCE_MEMORIZE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::SENTENCE_FORGET:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::SENTENCE_EVALUATE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::SENTENCE_ADD_BRICK:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::SENTENCE_REMOVE_BRICK:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::SENTENCE_START:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::SENTENCE_STOP:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_JOIN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_LEAVE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_INVITATION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_JOIN_PROPOSAL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_JOIN_PROPOSAL_DECLINE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_KICK:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_SET_SUCCESSOR:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_SHARE_OPEN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_SHARE_VALID_ITEM:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_SHARE_INVALID_ITEM:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_SHARE_VALID:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_SHARE_INVALID:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_SHARE_CLOSE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_CONTACT_INIT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_CONTACT_ADD:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_CONTACT_DEL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_CONTACT_MOVE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_CONTACT_CREATE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_CONTACT_STATUS:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TEAM_CONTACT_REMOVE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_DROP:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_PICK_UP:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_PICK_UP_CLOSE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_SWAP:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_ACTIVATE_SHEATH:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_HARVEST:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_HARVEST_CLOSE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_GIVE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_DESTROY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_EQUIP:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_UNEQUIP:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_TEMP_TO_BAG:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_ALL_TEMP:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_NO_TEMP:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_ENCHANT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_OPEN_ROOM_INVENTORY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_CLOSE_ROOM_INVENTORY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_USE_ITEM:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_STOP_USE_XP_CAT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TP_RESPAWN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TP_BOT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TP_WANTED:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TP_DEST:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TP_DEST_WITH_SEASON:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TP_ACK:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TP_CORRECT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DEATH_RESPAWN_POINT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DEATH_ASK_RESPAWN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DEATH_RESPAWN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ANIMALS_BEAST:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ANIMALS_MOUNT_ABORT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::EXCHANGE_INVITATION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::EXCHANGE_CLOSE_INVITATION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::EXCHANGE_PROPOSAL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::EXCHANGE_ACCEPT_INVITATION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::EXCHANGE_DECLINE_INVITATION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::EXCHANGE_VALIDATE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::EXCHANGE_INVALIDATE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::EXCHANGE_END:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::EXCHANGE_SEEDS:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::EXCHANGE_ADD:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::EXCHANGE_REMOVE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DEBUG_WHERE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DEBUG_WHO:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DEBUG_REPLY_WHERE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DEBUG_SERVICES:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DEBUG_CMD:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DEBUG_PING:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DEBUG_COUNTER:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMMAND_EMOTE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMMAND_CUSTOM_EMOTE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMMAND_WHERE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMMAND_ADMIN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMMAND_ADMIN_OFFLINE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMMAND_REMOTE_ADMIN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMMAND_REMOTE_ADMIN_ANSWER:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMMAND_SIT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMMAND_AFK:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMMAND_RANDOM:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::COMMAND_GUILDMOTD:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::MP_EVAL_SET_MP:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::MP_EVAL_SET_MP_LEVEL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::MP_EVAL_SET_MARKET:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::MP_EVAL_EXECUTE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_NEXT_PAGE_ITEM:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_NEXT_PAGE_MISSION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_START_TRADE_ITEM:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_START_TRADE_TELEPORT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_START_TRADE_FACTION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_START_TRADE_SKILL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_START_TRADE_PACT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_START_TRADE_ACTION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_BUY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_SELL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_DESTROY_ITEM:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_REFRESH_TRADE_LIST:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_SET_FILTERS:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_START_CHOOSE_MISSION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_START_DYNAMIC_MISSION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_CONTINUE_MISSION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_VALIDATE_PLAYER_GIFT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_PICK_MISSION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_DM_CHOICE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_DM_ACCEPT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_START_NEWS:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_START_CREATE_GUILD:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_END:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_FORCE_END:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_START_CHOOSE_DUTY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_NEXT_PAGE_DUTY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_DUTY_APPLY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_DUTY_CANCEL_APPLY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_START_TRADE_GUILD_OPTIONS:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_BUY_GUILD_OPTION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_START_GUILD_RESEARCH:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_DESTROY_BUILDING:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_DYNCHAT_OPEN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_DYNCHAT_CLOSE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::BOTCHAT_DYNCHAT_SEND:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::JOURNAL_INIT_COMPLETED_MISSIONS:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::JOURNAL_UPDATE_COMPLETED_MISSIONS:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::JOURNAL_MISSION_ABANDON:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::JOURNAL_GROUP_MISSION_ABANDON:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::JOURNAL_ADD_COMPASS:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::JOURNAL_ADD_COMPASS_BOT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::JOURNAL_REMOVE_COMPASS:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::JOURNAL_REMOVE_COMPASS_BOT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STRING_MANAGER_SET_LANGUAGE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STRING_MANAGER_PHRASE_SEND:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STRING_MANAGER_STRING_RQ:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STRING_MANAGER_STRING_RESP:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::STRING_MANAGER_RELOAD_CACHE:
2020-04-11 11:56:47 +00:00
{
uint32_t timestamp = msgin->get_uint32();
2020-04-19 12:37:04 +00:00
DBG_PRINT("Decode message:" + ImpulseBase::get_command_name(id) + " timestamp:" + itos(timestamp));
2020-04-18 22:36:11 +00:00
//param.push_back(timestamp);
value["timestamp"] = timestamp;
data->_server_messages.push_back(value);
2020-04-11 11:56:47 +00:00
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_CREATE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_ABORT_CREATION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_OPEN_GUILD_WINDOW:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_INVITATION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_ACCEPT_INVITATION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_REFUSE_INVITATION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_JOIN_PROPOSAL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_SET_GRADE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_SET_LEADER:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_KICK_MEMBER:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_TELEPORT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_ASCENSOR:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_FIRST_ASCENSOR_PAGE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_NEXT_ASCENSOR_PAGE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_LEAVE_ASCENSOR:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_QUIT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_SET_PLAYER_TITLE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_UPDATE_PLAYER_TITLE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_USE_FEMALE_TITLES:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_PUT_MONEY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_TAKE_MONEY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_OPEN_INVENTORY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::GUILD_CLOSE_INVENTORY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_GIVEUP_OUTPOST:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_SELECT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_UNSELECT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_DECLARE_WAR_START:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_DECLARE_WAR_ACK:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_DECLARE_WAR_VALIDATE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_SET_DEF_PERIOD:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_SET_SQUAD:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_SET_SQUAD_SPAWN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_INSERT_SQUAD:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_REMOVE_SQUAD:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_SET_SQUAD_CAPITAL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_CHOOSE_SIDE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_SIDE_CHOSEN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_BANISH_PLAYER:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_BANISH_GUILD:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_BUY_BUILDING:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::OUTPOST_DESTROY_BUILDING:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PHRASE_DELETE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PHRASE_LEARN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PHRASE_MEMORIZE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PHRASE_FORGET:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PHRASE_EXECUTE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PHRASE_EXECUTE_CYCLIC:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PHRASE_EXECUTE_FABER:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PHRASE_DOWNLOAD:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PHRASE_BUY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PHRASE_CONFIRM_BUY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PHRASE_BUY_SHEET:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PHRASE_CANCEL_LINK:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PHRASE_CANCEL_TOP:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PHRASE_CANCEL_ALL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PHRASE_CRISTALIZE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PHRASE_EXEC_CYCLIC_ACK:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PHRASE_EXEC_NEXT_ACK:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_INFO_GET:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_INFO_SET:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ITEM_INFO_REFRESH_VERSION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::MISSION_PREREQ_GET:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::MISSION_PREREQ_SET:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::MISSION_ENTER_CRITICAL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::MISSION_ASK_ENTER_CRITICAL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::MISSION_CLOSE_ENTER_CRITICAL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::MISSION_WAKE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::MISSION_GROUP_WAKE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DUEL_ASK:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DUEL_ACCEPT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DUEL_REFUSE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DUEL_ABANDON:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DUEL_INVITATION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DUEL_CANCEL_INVITATION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PVP_CHALLENGE_ASK:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PVP_CHALLENGE_ACCEPT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PVP_CHALLENGE_REFUSE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PVP_CHALLENGE_ABANDON:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PVP_CHALLENGE_INVITATION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PVP_CHALLENGE_CANCEL_INVITATION:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PVP_PVP_TAG:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PVP_SET_NEUTRAL_ALLEGIANCE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PVP_SET_NEUTRAL_ALLEGIANCE_GUILD:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PVP_FACTION_PUSH_FACTION_WAR:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PVP_FACTION_POP_FACTION_WAR:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::PVP_FACTION_FACTION_WARS:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ENCYCLOPEDIA_UPDATE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::ENCYCLOPEDIA_INIT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::USER_BARS:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::USER_POPUP:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::EVENT_SET_ITEM_CUSTOM_TEXT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::EVENT_DUMMY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TOTEM_BUILD:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::TOTEM_DUMMY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::MODULE_GATEWAY_FEOPEN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::MODULE_GATEWAY_GATEWAY_MSG:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::MODULE_GATEWAY_FECLOSE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::SEASON_SET:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::SEASON_DUMMY:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DM_GIFT_BEGIN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::DM_GIFT_VALIDATE:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::RING_MISSION_MISSION_RING_SELECT:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::RING_MISSION_DSS_DOWN:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::NPC_ICON_GET_DESC:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::NPC_ICON_SET_DESC:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::NPC_ICON_SVR_EVENT_MIS_AVL:
2020-04-11 11:56:47 +00:00
{
break;
}
2020-04-19 12:37:04 +00:00
case ImpulseBase::Impulse::NPC_ICON_SET_TIMER:
2020-04-11 11:56:47 +00:00
{
break;
}
default:
{
break;
}
}
#ifdef DEBUG_ENABLED
// Check if we have read all data - only on debug mode
{
2020-04-18 22:36:11 +00:00
uint32_t last_data;
2020-04-11 11:56:47 +00:00
while ( msgin->number_bit_not_read() > 0 )
{
DBG_PRINT("Read : " + itos(msgin->number_bit_not_read()));
if ( msgin->number_bit_not_read() >= 8 )
2020-04-18 22:36:11 +00:00
last_data = msgin->get_uint8();
2020-04-11 11:56:47 +00:00
else
2020-04-18 22:36:11 +00:00
last_data = msgin->get_serial(msgin->number_bit_not_read());
if ( last_data != 0 )
2020-04-11 11:56:47 +00:00
{
ERR_PRINT("Missing some data - we dont' have translate all data : " + msgin->show());
break;
}
}
}
#endif
}
2020-04-18 22:36:11 +00:00
void ActionFactory::unpack(NetworkData * data, Ref<BitStream> msgin)
2020-04-11 11:56:47 +00:00
{
bool shortcode = msgin->get_bool();
uint8_t code;
DBG_PRINT("shortcode:" + itos(shortcode));
if ( shortcode == true )
code = msgin->get_serial(2);
else
code = msgin->get_uint8();
DBG_PRINT("code:" + itos(code));
switch (code)
{
case ACTIONCODE::ACTION_POSITION_CODE:
{
// khanat-opennel-code/code/ryzom/common/src/game_share/action_position.cpp:34 void CActionPosition::unpack (NLMISC::CBitMemStream &message)
// px ( 16 bit unsigned )
// py ( 16 bit unsigned )
// pz ( 16 bit unsigned ) : low bit have other signification
// 0x01 : IsRelative
// 0x02 : Interior
DBG_PRINT("ACTION_GENERIC_CODE");
uint16_t px = msgin->get_uint16();
uint16_t py = msgin->get_uint16();
uint16_t pz = msgin->get_uint16();
bool IsRelative = (pz & 0x1) != 0;
bool Interior = (pz & 0x2) != 0;
DBG_PRINT("ACTION_GENERIC_CODE px:" + uitos(px) + " py:" + uitos(py) + " pz:" + uitos(pz) + " IsRelative:" + uitos(IsRelative) + " Interior:" + uitos(Interior));
break;
}
case ACTIONCODE::ACTION_GENERIC_CODE:
{
DBG_PRINT("ACTION_GENERIC_CODE");
// khanat-opennel-code/code/ryzom/common/src/game_share/action_generic.cpp void CActionGeneric::unpack (NLMISC::CBitMemStream &message)
// size ( 32 bits unsigned ) : if size > 512 we have an error (normally reject by server)
// StreamByte ( Array : size * 8 bits unsigned )
uint32_t size = msgin->get_uint32();
DBG_PRINT("ACTION_GENERIC_CODE size:" + uitos(size));
PoolByteArray StreamByte = msgin->get_array_uint8(size);
//BitStream StreamByte = msgin->get_bitstream(size);
DBG_PRINT("ACTION_GENERIC_CODE size:" + uitos(size));
Ref<BitStream> tmp;
tmp.instance();
tmp->put_array_uint8(StreamByte);
2020-04-18 22:36:11 +00:00
decode_message(data, tmp);
2020-04-11 11:56:47 +00:00
tmp.unref();
break;
}
case ACTIONCODE::ACTION_GENERIC_MULTI_PART_CODE:
{
DBG_PRINT("ACTION_GENERIC_MULTI_PART_CODE");
// khanat-opennel-code/code/ryzom/common/src/game_share/action_generic_multi_part.h:46 virtual void unpack (NLMISC::CBitMemStream &message)
// Number ( 8 bits unsigned )
// Part ( 16 bits unsigned )
// NbBlock ( 16 bits unsigned )
// size ( 32 bits unsigned )
// PartCont ( Array : size * 8 bits unsigned )
uint8_t Number = msgin->get_uint8();
uint16_t Part = msgin->get_uint16();
uint16_t NbBlock = msgin->get_uint16();
uint32_t size = msgin->get_uint32();
PoolByteArray StreamByte = msgin->get_array_uint8(size);
//BitStream StreamByte = msgin->get_bitstream(size);
DBG_PRINT("ACTION_GENERIC_MULTI_PART_CODE Number:" + uitos(Number) + " Part:" + uitos(Part) + " NbBlock:" + uitos(NbBlock) + " size:" + uitos(size));
break;
}
case ACTIONCODE::ACTION_SINT64:
{
DBG_PRINT("ACTION_SINT64");
// khanat-opennel-code/code/ryzom/common/src/game_share/action_sint64.cpp:86 void CActionSint64::unpack (NLMISC::CBitMemStream &message)
// value ( 64 bits unsigned )
uint64_t value = msgin->get_uint64();
DBG_PRINT("ACTION_SINT64 value:" + uitos(value));
break;
}
case ACTIONCODE::ACTION_SYNC_CODE:
{
DBG_PRINT("ACTION_SYNC_CODE");
// khanat-opennel-code/code/ryzom/common/src/game_share/action_sync.h:44 virtual void unpack (NLMISC::CBitMemStream &message)
// Sync ( 32 bits unsigned )
// BKEntityId ( 64 bits unsigned ) [see definition : khanat-opennel-code/code/nel/include/nel/misc/entity_id.h:64]
uint32_t Sync = msgin->get_uint32();
uint64_t BKEntityId = msgin->get_uint64();
DBG_PRINT("ACTION_SYNC_CODE Sync:" + uitos(Sync) + " BKEntityId:" + uitos(BKEntityId));
break;
}
case ACTIONCODE::ACTION_DISCONNECTION_CODE:
{
// khanat-opennel-code/code/ryzom/common/src/game_share/action_disconnection.h
// No data
DBG_PRINT("ACTION_DISCONNECTION_CODE");
break;
}
case ACTIONCODE::ACTION_ASSOCIATION_CODE:
{
DBG_PRINT("ACTION_ASSOCIATION_CODE");
// khanat-opennel-code/code/ryzom/common/src/game_share/action_association.h virtual void unpack (NLMISC::CBitMemStream &message)
// IsNewAssociation ( bool / 1 bit )
// if IsNewAssociation is true:
// SheetId ( 32 bits unsigned )
// Replace ( bool / 1 bit )
uint32_t SheetId = msgin->get_uint32();
bool Replace = msgin->get_bool();
DBG_PRINT("ACTION_ASSOCIATION_CODE SheetId:" + uitos(SheetId) + " Replace:" + uitos(Replace));
break;
}
case ACTIONCODE::ACTION_LOGIN_CODE:
{
DBG_PRINT("ACTION_LOGIN_CODE");
// khanat-opennel-code/code/ryzom/common/src/game_share/action_login.h virtual void unpack (NLMISC::CBitMemStream &message)
// ua ( 32 bits unsigned )
// uk ( 32 bits unsigned )
// ui ( 32 bits unsigned )
uint32_t ua = msgin->get_uint32();
uint32_t uk = msgin->get_uint32();
uint32_t ui = msgin->get_uint32();
DBG_PRINT("ACTION_LOGIN_CODE ua:" + uitos(ua) + " uk:" + uitos(uk)+ " ui:" + uitos(ui));
break;
}
case ACTIONCODE::ACTION_TARGET_SLOT_CODE:
{
DBG_PRINT("ACTION_TARGET_SLOT_CODE");
// khanat-opennel-code/code/ryzom/common/src/game_share/action_target_slot.h virtual void unpack (NLMISC::CBitMemStream &message)
// Slot ( 8 bits unsigned )
// TargetOrPickup (2 bits unsigned)
uint8_t Slot = msgin->get_uint8();
uint32_t TargetOrPickup = msgin->get_serial(2);
DBG_PRINT("ACTION_TARGET_SLOT_CODE Slot:" + uitos(Slot) + " TargetOrPickup:" + uitos(TargetOrPickup));
break;
}
case ACTIONCODE::ACTION_DUMMY_CODE:
{
DBG_PRINT("ACTION_DUMMY_CODE");
// khanat-opennel-code/code/ryzom/common/src/game_share/action_dummy.h virtual void unpack (NLMISC::CBitMemStream &message)
// Dummy1 ( 32 bits unsigned )
// Dummy2 ( 32 bits unsigned )
uint32_t Dummy1 = msgin->get_uint32();
uint32_t Dummy2 = msgin->get_uint32();
DBG_PRINT("ACTION_DUMMY_CODE Dummy1:" + uitos(Dummy1) + " Dummy2:" + uitos(Dummy2));
break;
}
default:
{
ERR_PRINT("Impossible to decode message received from server (code:" + uitos(code) + ")");
break;
}
}
}
void ActionFactory::decode(NetworkData * data, Ref<BitStream> msgin)
{
// khanat-opennel-code/code/ryzom/client/src/impulse_decoder.cpp:38 void CImpulseDecoder::decode(CBitMemStream &inbox, TPacketNumber receivedPacket, TPacketNumber receivedAck, TPacketNumber nextSentPacket, vector<CLFECOMMON::CAction *> &actions)
int keep;
bool check_once;
bool next;
uint32_t * last_ack;
int level;
int channel;
int num;
data->_last_received_ack = msgin->get_uint32();
for( level=0 ; level < 3 ; ++level )
{
DBG_PRINT("level:" + itos(level));
switch(level)
{
case 0:
last_ack = data->_last_ack_0;
channel = 0;
break;
case 1:
last_ack = data->_last_ack_1;
channel = data->_current_received_number & 1;
break;
default: // 2
last_ack = data->_last_ack_2;
channel = data->_current_received_number & 3;
break;
}
DBG_PRINT("channel:" + itos(channel));
keep = -1;
check_once = false;
num = 0;
next = msgin->get_bool();
DBG_PRINT("next:" + itos(next));
while(next == true)
{
if( check_once == false )
{
check_once = true;
//keep = diff_uint32_circulate(received_ack, last_ack[channel]) >= 0;
keep = data->_last_received_ack >= last_ack[channel];
if(keep)
last_ack[channel] = data->_current_send_number;
}
num ++;
2020-04-18 22:36:11 +00:00
unpack(data, msgin);
2020-04-11 11:56:47 +00:00
// read next packet
next = msgin->get_bool();
DBG_PRINT("next:" + itos(next));
}
}
}