1615 lines
No EOL
42 KiB
C++
1615 lines
No EOL
42 KiB
C++
/*
|
|
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"
|
|
#include "core/array.h"
|
|
#include "core/dictionary.h"
|
|
#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"
|
|
#include "modules/impulse/impulsebase.h"
|
|
#include "action_factory.h"
|
|
|
|
void ActionFactory::decode_message(NetworkData * data, Ref<BitStream> msgin)
|
|
{
|
|
Dictionary value;
|
|
ReferentialMessage ref_msg;
|
|
uint32_t id = ref_msg.read_command(msgin);
|
|
DBG_PRINT("Decode message:" + ImpulseBase::get_command_name(id));
|
|
value["command"] = id;
|
|
#ifdef DEBUG_ENABLED
|
|
value["command_debug"] = ImpulseBase::get_command_name(id);
|
|
#endif
|
|
switch(id)
|
|
{
|
|
case ImpulseBase::Impulse::TARGET_PARTY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TARGET_INVENTORY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TARGET_FOLLOW:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TARGET_NO_FOLLOW:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_USER_CHAR:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_NO_USER_CHAR:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_USER_CHARS:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_CREATE_CHAR:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_SELECT_CHAR:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_DELETE_CHAR:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_RENAME_CHAR:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_ENTER:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_READY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_TIME_DATE_SYNCHRO:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_ASK_NAME:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_VALID_NAME:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_CREATE_CHAR_ERROR:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_RECONNECT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_SERVER_RECONNECT_OK:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_SHARD_ID:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_SERVER_QUIT_OK:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_SERVER_QUIT_ABORT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_CLIENT_QUIT_REQUEST:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_MAIL_AVAILABLE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_GUILD_MESSAGE_AVAILABLE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_PERMANENT_BAN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_UNBAN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_FAR_TP:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CONNECTION_RET_MAINLAND:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DB_UPD_PLR:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DB_UPD_INV:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DB_INIT_PLR:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DB_INIT_INV:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DB_GROUP_UPDATE_BANK:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DB_GROUP_INIT_BANK:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DB_GROUP_RESET_BANK:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::POSITION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::HARVEST_DEPOSIT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::HARVEST_CORPSE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::HARVEST_INTERRUPT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::HARVEST_CLOSE_TEMP_INVENTORY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TRAINING:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::JOB_SET_JOB_STATUS:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::JOB_SWAP_JOB_STATUS:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CASTING_BEGIN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::CASTING_INTERRUPT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::FABER_OPEN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::FABER_CLOSE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::FABER_EXECUTE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::FABER_SET_NUM_ITEM:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::FABER_START_CREATE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::FABER_START_REPAIR:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::FABER_START_REFINE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::FABER_SET_MP_QUALITY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::FABER_SET_MP_REFINE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::FABER_SET_TOOL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::FABER_RESET_TOOL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::FABER_INTERRUPT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMBAT_ENGAGE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMBAT_DISENGAGE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMBAT_DEFAULT_ATTACK:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMBAT_ENGAGE_FAILED:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMBAT_VALIDATE_MELEE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMBAT_PARRY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMBAT_DODGE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMBAT_PROTECTED_SLOT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMBAT_FLYING_ChaScore1_DELTA:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMBAT_FLYING_TEXT_ISE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMBAT_FLYING_TEXT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STRING_TELL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STRING_FAR_TELL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STRING_CHAT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STRING_CHAT_TEAM:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STRING_ADD_DYN_STR:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STRING_FILTER:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STRING_CHAT_MODE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STRING_CHAT2:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STRING_TELL2:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STRING_DYN_STRING:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STRING_DYN_STRING_GROUP:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STRING_AFK_TXT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STUN_STUN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STUN_WAKE_UP:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::SENTENCE_EXECUTE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::SENTENCE_CANCEL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::SENTENCE_CANCEL_CURRENT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::SENTENCE_CANCEL_ALL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::SENTENCE_CLEAR:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::SENTENCE_MEMORIZE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::SENTENCE_FORGET:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::SENTENCE_EVALUATE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::SENTENCE_ADD_BRICK:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::SENTENCE_REMOVE_BRICK:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::SENTENCE_START:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::SENTENCE_STOP:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_JOIN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_LEAVE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_INVITATION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_JOIN_PROPOSAL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_JOIN_PROPOSAL_DECLINE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_KICK:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_SET_SUCCESSOR:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_SHARE_OPEN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_SHARE_VALID_ITEM:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_SHARE_INVALID_ITEM:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_SHARE_VALID:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_SHARE_INVALID:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_SHARE_CLOSE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_CONTACT_INIT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_CONTACT_ADD:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_CONTACT_DEL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_CONTACT_MOVE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_CONTACT_CREATE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_CONTACT_STATUS:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TEAM_CONTACT_REMOVE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_DROP:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_PICK_UP:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_PICK_UP_CLOSE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_SWAP:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_ACTIVATE_SHEATH:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_HARVEST:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_HARVEST_CLOSE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_GIVE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_DESTROY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_EQUIP:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_UNEQUIP:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_TEMP_TO_BAG:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_ALL_TEMP:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_NO_TEMP:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_ENCHANT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_OPEN_ROOM_INVENTORY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_CLOSE_ROOM_INVENTORY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_USE_ITEM:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_STOP_USE_XP_CAT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TP_RESPAWN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TP_BOT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TP_WANTED:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TP_DEST:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TP_DEST_WITH_SEASON:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TP_ACK:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TP_CORRECT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DEATH_RESPAWN_POINT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DEATH_ASK_RESPAWN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DEATH_RESPAWN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ANIMALS_BEAST:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ANIMALS_MOUNT_ABORT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::EXCHANGE_INVITATION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::EXCHANGE_CLOSE_INVITATION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::EXCHANGE_PROPOSAL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::EXCHANGE_ACCEPT_INVITATION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::EXCHANGE_DECLINE_INVITATION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::EXCHANGE_VALIDATE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::EXCHANGE_INVALIDATE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::EXCHANGE_END:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::EXCHANGE_SEEDS:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::EXCHANGE_ADD:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::EXCHANGE_REMOVE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DEBUG_WHERE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DEBUG_WHO:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DEBUG_REPLY_WHERE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DEBUG_SERVICES:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DEBUG_CMD:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DEBUG_PING:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DEBUG_COUNTER:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMMAND_EMOTE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMMAND_CUSTOM_EMOTE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMMAND_WHERE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMMAND_ADMIN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMMAND_ADMIN_OFFLINE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMMAND_REMOTE_ADMIN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMMAND_REMOTE_ADMIN_ANSWER:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMMAND_SIT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMMAND_AFK:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMMAND_RANDOM:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::COMMAND_GUILDMOTD:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::MP_EVAL_SET_MP:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::MP_EVAL_SET_MP_LEVEL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::MP_EVAL_SET_MARKET:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::MP_EVAL_EXECUTE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_NEXT_PAGE_ITEM:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_NEXT_PAGE_MISSION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_START_TRADE_ITEM:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_START_TRADE_TELEPORT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_START_TRADE_FACTION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_START_TRADE_SKILL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_START_TRADE_PACT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_START_TRADE_ACTION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_BUY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_SELL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_DESTROY_ITEM:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_REFRESH_TRADE_LIST:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_SET_FILTERS:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_START_CHOOSE_MISSION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_START_DYNAMIC_MISSION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_CONTINUE_MISSION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_VALIDATE_PLAYER_GIFT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_PICK_MISSION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_DM_CHOICE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_DM_ACCEPT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_START_NEWS:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_START_CREATE_GUILD:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_END:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_FORCE_END:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_START_CHOOSE_DUTY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_NEXT_PAGE_DUTY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_DUTY_APPLY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_DUTY_CANCEL_APPLY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_START_TRADE_GUILD_OPTIONS:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_BUY_GUILD_OPTION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_START_GUILD_RESEARCH:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_DESTROY_BUILDING:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_DYNCHAT_OPEN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_DYNCHAT_CLOSE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::BOTCHAT_DYNCHAT_SEND:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::JOURNAL_INIT_COMPLETED_MISSIONS:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::JOURNAL_UPDATE_COMPLETED_MISSIONS:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::JOURNAL_MISSION_ABANDON:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::JOURNAL_GROUP_MISSION_ABANDON:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::JOURNAL_ADD_COMPASS:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::JOURNAL_ADD_COMPASS_BOT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::JOURNAL_REMOVE_COMPASS:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::JOURNAL_REMOVE_COMPASS_BOT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STRING_MANAGER_SET_LANGUAGE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STRING_MANAGER_PHRASE_SEND:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STRING_MANAGER_STRING_RQ:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STRING_MANAGER_STRING_RESP:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::STRING_MANAGER_RELOAD_CACHE:
|
|
{
|
|
uint32_t timestamp = msgin->get_uint32();
|
|
DBG_PRINT("Decode message:" + ImpulseBase::get_command_name(id) + " timestamp:" + itos(timestamp));
|
|
|
|
//param.push_back(timestamp);
|
|
value["timestamp"] = timestamp;
|
|
|
|
data->_server_messages.push_back(value);
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_CREATE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_ABORT_CREATION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_OPEN_GUILD_WINDOW:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_INVITATION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_ACCEPT_INVITATION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_REFUSE_INVITATION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_JOIN_PROPOSAL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_SET_GRADE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_SET_LEADER:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_KICK_MEMBER:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_TELEPORT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_ASCENSOR:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_FIRST_ASCENSOR_PAGE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_NEXT_ASCENSOR_PAGE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_LEAVE_ASCENSOR:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_QUIT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_SET_PLAYER_TITLE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_UPDATE_PLAYER_TITLE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_USE_FEMALE_TITLES:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_PUT_MONEY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_TAKE_MONEY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_OPEN_INVENTORY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::GUILD_CLOSE_INVENTORY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_GIVEUP_OUTPOST:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_SELECT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_UNSELECT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_DECLARE_WAR_START:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_DECLARE_WAR_ACK:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_DECLARE_WAR_VALIDATE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_SET_DEF_PERIOD:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_SET_SQUAD:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_SET_SQUAD_SPAWN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_INSERT_SQUAD:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_REMOVE_SQUAD:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_SET_SQUAD_CAPITAL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_CHOOSE_SIDE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_SIDE_CHOSEN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_BANISH_PLAYER:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_BANISH_GUILD:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_BUY_BUILDING:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::OUTPOST_DESTROY_BUILDING:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PHRASE_DELETE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PHRASE_LEARN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PHRASE_MEMORIZE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PHRASE_FORGET:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PHRASE_EXECUTE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PHRASE_EXECUTE_CYCLIC:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PHRASE_EXECUTE_FABER:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PHRASE_DOWNLOAD:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PHRASE_BUY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PHRASE_CONFIRM_BUY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PHRASE_BUY_SHEET:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PHRASE_CANCEL_LINK:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PHRASE_CANCEL_TOP:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PHRASE_CANCEL_ALL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PHRASE_CRISTALIZE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PHRASE_EXEC_CYCLIC_ACK:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PHRASE_EXEC_NEXT_ACK:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_INFO_GET:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_INFO_SET:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ITEM_INFO_REFRESH_VERSION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::MISSION_PREREQ_GET:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::MISSION_PREREQ_SET:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::MISSION_ENTER_CRITICAL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::MISSION_ASK_ENTER_CRITICAL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::MISSION_CLOSE_ENTER_CRITICAL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::MISSION_WAKE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::MISSION_GROUP_WAKE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DUEL_ASK:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DUEL_ACCEPT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DUEL_REFUSE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DUEL_ABANDON:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DUEL_INVITATION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DUEL_CANCEL_INVITATION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PVP_CHALLENGE_ASK:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PVP_CHALLENGE_ACCEPT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PVP_CHALLENGE_REFUSE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PVP_CHALLENGE_ABANDON:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PVP_CHALLENGE_INVITATION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PVP_CHALLENGE_CANCEL_INVITATION:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PVP_PVP_TAG:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PVP_SET_NEUTRAL_ALLEGIANCE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PVP_SET_NEUTRAL_ALLEGIANCE_GUILD:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PVP_FACTION_PUSH_FACTION_WAR:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PVP_FACTION_POP_FACTION_WAR:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::PVP_FACTION_FACTION_WARS:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ENCYCLOPEDIA_UPDATE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::ENCYCLOPEDIA_INIT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::USER_BARS:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::USER_POPUP:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::EVENT_SET_ITEM_CUSTOM_TEXT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::EVENT_DUMMY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TOTEM_BUILD:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::TOTEM_DUMMY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::MODULE_GATEWAY_FEOPEN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::MODULE_GATEWAY_GATEWAY_MSG:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::MODULE_GATEWAY_FECLOSE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::SEASON_SET:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::SEASON_DUMMY:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DM_GIFT_BEGIN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::DM_GIFT_VALIDATE:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::RING_MISSION_MISSION_RING_SELECT:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::RING_MISSION_DSS_DOWN:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::NPC_ICON_GET_DESC:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::NPC_ICON_SET_DESC:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::NPC_ICON_SVR_EVENT_MIS_AVL:
|
|
{
|
|
break;
|
|
}
|
|
case ImpulseBase::Impulse::NPC_ICON_SET_TIMER:
|
|
{
|
|
break;
|
|
}
|
|
default:
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
#ifdef DEBUG_ENABLED
|
|
// Check if we have read all data - only on debug mode
|
|
{
|
|
uint32_t last_data;
|
|
while ( msgin->number_bit_not_read() > 0 )
|
|
{
|
|
DBG_PRINT("Read : " + itos(msgin->number_bit_not_read()));
|
|
if ( msgin->number_bit_not_read() >= 8 )
|
|
last_data = msgin->get_uint8();
|
|
else
|
|
last_data = msgin->get_serial(msgin->number_bit_not_read());
|
|
if ( last_data != 0 )
|
|
{
|
|
ERR_PRINT("Missing some data - we dont' have translate all data : " + msgin->show());
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif
|
|
}
|
|
|
|
void ActionFactory::unpack(NetworkData * data, Ref<BitStream> msgin)
|
|
{
|
|
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);
|
|
decode_message(data, tmp);
|
|
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 ++;
|
|
unpack(data, msgin);
|
|
|
|
// read next packet
|
|
next = msgin->get_bool();
|
|
DBG_PRINT("next:" + itos(next));
|
|
}
|
|
}
|
|
} |