update network
This commit is contained in:
parent
b29218ffff
commit
4611d9a3b0
18 changed files with 2524 additions and 2395 deletions
19
README.md
19
README.md
|
@ -21,8 +21,13 @@ for file in ../../../modules/*
|
|||
do
|
||||
if [ -d $file ]
|
||||
then
|
||||
echo "$file"
|
||||
ln -s $file .
|
||||
if [ -L $file ]
|
||||
then
|
||||
echo "Create link $(basename $file)"
|
||||
ln -s $file .
|
||||
else
|
||||
echo "Link $(basename $file) exist"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
cd ..
|
||||
|
@ -36,6 +41,11 @@ scons -j$(nproc) platform=x11 target=debug
|
|||
scons -j$(nproc) platform=x11 target=release_debug
|
||||
# or build release -> becarefull, this version works on root project and impossible to launch editor
|
||||
scons -j$(nproc) platform=x11 target=release tools=no
|
||||
|
||||
# Build optimized with GCC
|
||||
scons -j$(nproc) platform=x11 target=release_debug use_lto=yes
|
||||
# Build optimized with CLang
|
||||
scons -j$(nproc) platform=x11 target=release_debug use_llvm=yes use_lld=yes
|
||||
cd ../..
|
||||
```
|
||||
|
||||
|
@ -284,4 +294,7 @@ Action code :
|
|||
TargetOrPickup (2 bits unsigned)
|
||||
ACTION_DUMMY_CODE = 99 : 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 )
|
||||
Dummy2 ( 32 bits unsigned )
|
||||
|
||||
|
||||
Impulse : (include on ACTION_GENERIC_CODE or ACTION_GENERIC_MULTI_PART_CODE)
|
File diff suppressed because it is too large
Load diff
|
@ -5,10 +5,10 @@
|
|||
#include "core/class_db.h"
|
||||
#include "action_factory.h"
|
||||
|
||||
void register_command_types() {
|
||||
// ClassDB::register_class<ActionFactory>();
|
||||
void register_action_types() {
|
||||
//ClassDB::register_class<ActionFactory>();
|
||||
}
|
||||
|
||||
void unregister_command_types() {
|
||||
void unregister_action_types() {
|
||||
// Nothing to do here in this example.
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/* register_types.h */
|
||||
|
||||
void register_command_types();
|
||||
void unregister_command_types();
|
||||
void register_action_types();
|
||||
void unregister_action_types();
|
||||
/* yes, the word in the middle must be the same as the module folder name */
|
5
modules/impulse/SCsub
Normal file
5
modules/impulse/SCsub
Normal file
|
@ -0,0 +1,5 @@
|
|||
# SCsub
|
||||
|
||||
Import('env')
|
||||
|
||||
env.add_source_files(env.modules_sources, "*.cpp") # Add all cpp files to the build
|
15
modules/impulse/config.py
Normal file
15
modules/impulse/config.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
# config.py
|
||||
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
pass
|
||||
|
||||
def get_doc_classes():
|
||||
return [
|
||||
"ImpulseBase",
|
||||
]
|
||||
|
||||
def get_doc_path():
|
||||
return "doc_classes"
|
1716
modules/impulse/impulsebase.cpp
Normal file
1716
modules/impulse/impulsebase.cpp
Normal file
File diff suppressed because it is too large
Load diff
382
modules/impulse/impulsebase.h
Normal file
382
modules/impulse/impulsebase.h
Normal file
|
@ -0,0 +1,382 @@
|
|||
/*
|
||||
Header Impulse
|
||||
|
||||
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/>.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef IMPULSE_BASE_H
|
||||
#define IMPULSE_BASE_H
|
||||
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
|
||||
class ImpulseBase : public Reference
|
||||
{
|
||||
GDCLASS(ImpulseBase, Reference)
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
public:
|
||||
|
||||
ImpulseBase() {}
|
||||
~ImpulseBase() {}
|
||||
|
||||
enum Impulse {
|
||||
TARGET_PARTY,
|
||||
TARGET_INVENTORY,
|
||||
TARGET_FOLLOW,
|
||||
TARGET_NO_FOLLOW,
|
||||
CONNECTION_USER_CHAR,
|
||||
CONNECTION_NO_USER_CHAR,
|
||||
CONNECTION_USER_CHARS,
|
||||
CONNECTION_CREATE_CHAR,
|
||||
CONNECTION_SELECT_CHAR,
|
||||
CONNECTION_DELETE_CHAR,
|
||||
CONNECTION_RENAME_CHAR,
|
||||
CONNECTION_ENTER,
|
||||
CONNECTION_READY,
|
||||
CONNECTION_TIME_DATE_SYNCHRO,
|
||||
CONNECTION_ASK_NAME,
|
||||
CONNECTION_VALID_NAME,
|
||||
CONNECTION_CREATE_CHAR_ERROR,
|
||||
CONNECTION_RECONNECT,
|
||||
CONNECTION_SERVER_RECONNECT_OK,
|
||||
CONNECTION_SHARD_ID,
|
||||
CONNECTION_SERVER_QUIT_OK,
|
||||
CONNECTION_SERVER_QUIT_ABORT,
|
||||
CONNECTION_CLIENT_QUIT_REQUEST,
|
||||
CONNECTION_MAIL_AVAILABLE,
|
||||
CONNECTION_GUILD_MESSAGE_AVAILABLE,
|
||||
CONNECTION_PERMANENT_BAN,
|
||||
CONNECTION_UNBAN,
|
||||
CONNECTION_FAR_TP,
|
||||
CONNECTION_RET_MAINLAND,
|
||||
DB_UPD_PLR,
|
||||
DB_UPD_INV,
|
||||
DB_INIT_PLR,
|
||||
DB_INIT_INV,
|
||||
DB_GROUP_UPDATE_BANK,
|
||||
DB_GROUP_INIT_BANK,
|
||||
DB_GROUP_RESET_BANK,
|
||||
POSITION,
|
||||
HARVEST_DEPOSIT,
|
||||
HARVEST_CORPSE,
|
||||
HARVEST_INTERRUPT,
|
||||
HARVEST_CLOSE_TEMP_INVENTORY,
|
||||
TRAINING,
|
||||
JOB_SET_JOB_STATUS,
|
||||
JOB_SWAP_JOB_STATUS,
|
||||
CASTING_BEGIN,
|
||||
CASTING_INTERRUPT,
|
||||
FABER_OPEN,
|
||||
FABER_CLOSE,
|
||||
FABER_EXECUTE,
|
||||
FABER_SET_NUM_ITEM,
|
||||
FABER_START_CREATE,
|
||||
FABER_START_REPAIR,
|
||||
FABER_START_REFINE,
|
||||
FABER_SET_MP_QUALITY,
|
||||
FABER_SET_MP_REFINE,
|
||||
FABER_SET_TOOL,
|
||||
FABER_RESET_TOOL,
|
||||
FABER_INTERRUPT,
|
||||
COMBAT_ENGAGE,
|
||||
COMBAT_DISENGAGE,
|
||||
COMBAT_DEFAULT_ATTACK,
|
||||
COMBAT_ENGAGE_FAILED,
|
||||
COMBAT_VALIDATE_MELEE,
|
||||
COMBAT_PARRY,
|
||||
COMBAT_DODGE,
|
||||
COMBAT_PROTECTED_SLOT,
|
||||
COMBAT_FLYING_ChaScore1_DELTA,
|
||||
COMBAT_FLYING_TEXT_ISE,
|
||||
COMBAT_FLYING_TEXT,
|
||||
STRING_TELL,
|
||||
STRING_FAR_TELL,
|
||||
STRING_CHAT,
|
||||
STRING_CHAT_TEAM,
|
||||
STRING_ADD_DYN_STR,
|
||||
STRING_FILTER,
|
||||
STRING_CHAT_MODE,
|
||||
STRING_CHAT2,
|
||||
STRING_TELL2,
|
||||
STRING_DYN_STRING,
|
||||
STRING_DYN_STRING_GROUP,
|
||||
STRING_AFK_TXT,
|
||||
STUN_STUN,
|
||||
STUN_WAKE_UP,
|
||||
SENTENCE_EXECUTE,
|
||||
SENTENCE_CANCEL,
|
||||
SENTENCE_CANCEL_CURRENT,
|
||||
SENTENCE_CANCEL_ALL,
|
||||
SENTENCE_CLEAR,
|
||||
SENTENCE_MEMORIZE,
|
||||
SENTENCE_FORGET,
|
||||
SENTENCE_EVALUATE,
|
||||
SENTENCE_ADD_BRICK,
|
||||
SENTENCE_REMOVE_BRICK,
|
||||
SENTENCE_START,
|
||||
SENTENCE_STOP,
|
||||
TEAM_JOIN,
|
||||
TEAM_LEAVE,
|
||||
TEAM_INVITATION,
|
||||
TEAM_JOIN_PROPOSAL,
|
||||
TEAM_JOIN_PROPOSAL_DECLINE,
|
||||
TEAM_KICK,
|
||||
TEAM_SET_SUCCESSOR,
|
||||
TEAM_SHARE_OPEN,
|
||||
TEAM_SHARE_VALID_ITEM,
|
||||
TEAM_SHARE_INVALID_ITEM,
|
||||
TEAM_SHARE_VALID,
|
||||
TEAM_SHARE_INVALID,
|
||||
TEAM_SHARE_CLOSE,
|
||||
TEAM_CONTACT_INIT,
|
||||
TEAM_CONTACT_ADD,
|
||||
TEAM_CONTACT_DEL,
|
||||
TEAM_CONTACT_MOVE,
|
||||
TEAM_CONTACT_CREATE,
|
||||
TEAM_CONTACT_STATUS,
|
||||
TEAM_CONTACT_REMOVE,
|
||||
ITEM_DROP,
|
||||
ITEM_PICK_UP,
|
||||
ITEM_PICK_UP_CLOSE,
|
||||
ITEM_SWAP,
|
||||
ITEM_ACTIVATE_SHEATH,
|
||||
ITEM_HARVEST,
|
||||
ITEM_HARVEST_CLOSE,
|
||||
ITEM_GIVE,
|
||||
ITEM_DESTROY,
|
||||
ITEM_EQUIP,
|
||||
ITEM_UNEQUIP,
|
||||
ITEM_TEMP_TO_BAG,
|
||||
ITEM_ALL_TEMP,
|
||||
ITEM_NO_TEMP,
|
||||
ITEM_ENCHANT,
|
||||
ITEM_OPEN_ROOM_INVENTORY,
|
||||
ITEM_CLOSE_ROOM_INVENTORY,
|
||||
ITEM_USE_ITEM,
|
||||
ITEM_STOP_USE_XP_CAT,
|
||||
TP_RESPAWN,
|
||||
TP_BOT,
|
||||
TP_WANTED,
|
||||
TP_DEST,
|
||||
TP_DEST_WITH_SEASON,
|
||||
TP_ACK,
|
||||
TP_CORRECT,
|
||||
DEATH_RESPAWN_POINT,
|
||||
DEATH_ASK_RESPAWN,
|
||||
DEATH_RESPAWN,
|
||||
ANIMALS_BEAST,
|
||||
ANIMALS_MOUNT_ABORT,
|
||||
EXCHANGE_INVITATION,
|
||||
EXCHANGE_CLOSE_INVITATION,
|
||||
EXCHANGE_PROPOSAL,
|
||||
EXCHANGE_ACCEPT_INVITATION,
|
||||
EXCHANGE_DECLINE_INVITATION,
|
||||
EXCHANGE_VALIDATE,
|
||||
EXCHANGE_INVALIDATE,
|
||||
EXCHANGE_END,
|
||||
EXCHANGE_SEEDS,
|
||||
EXCHANGE_ADD,
|
||||
EXCHANGE_REMOVE,
|
||||
DEBUG_WHERE,
|
||||
DEBUG_WHO,
|
||||
DEBUG_REPLY_WHERE,
|
||||
DEBUG_SERVICES,
|
||||
DEBUG_CMD,
|
||||
DEBUG_PING,
|
||||
DEBUG_COUNTER,
|
||||
COMMAND_EMOTE,
|
||||
COMMAND_CUSTOM_EMOTE,
|
||||
COMMAND_WHERE,
|
||||
COMMAND_ADMIN,
|
||||
COMMAND_ADMIN_OFFLINE,
|
||||
COMMAND_REMOTE_ADMIN,
|
||||
COMMAND_REMOTE_ADMIN_ANSWER,
|
||||
COMMAND_SIT,
|
||||
COMMAND_AFK,
|
||||
COMMAND_RANDOM,
|
||||
COMMAND_GUILDMOTD,
|
||||
MP_EVAL_SET_MP,
|
||||
MP_EVAL_SET_MP_LEVEL,
|
||||
MP_EVAL_SET_MARKET,
|
||||
MP_EVAL_EXECUTE,
|
||||
BOTCHAT_NEXT_PAGE_ITEM,
|
||||
BOTCHAT_NEXT_PAGE_MISSION,
|
||||
BOTCHAT_START_TRADE_ITEM,
|
||||
BOTCHAT_START_TRADE_TELEPORT,
|
||||
BOTCHAT_START_TRADE_FACTION,
|
||||
BOTCHAT_START_TRADE_SKILL,
|
||||
BOTCHAT_START_TRADE_PACT,
|
||||
BOTCHAT_START_TRADE_ACTION,
|
||||
BOTCHAT_BUY,
|
||||
BOTCHAT_SELL,
|
||||
BOTCHAT_DESTROY_ITEM,
|
||||
BOTCHAT_REFRESH_TRADE_LIST,
|
||||
BOTCHAT_SET_FILTERS,
|
||||
BOTCHAT_START_CHOOSE_MISSION,
|
||||
BOTCHAT_START_DYNAMIC_MISSION,
|
||||
BOTCHAT_CONTINUE_MISSION,
|
||||
BOTCHAT_VALIDATE_PLAYER_GIFT,
|
||||
BOTCHAT_PICK_MISSION,
|
||||
BOTCHAT_DM_CHOICE,
|
||||
BOTCHAT_DM_ACCEPT,
|
||||
BOTCHAT_START_NEWS,
|
||||
BOTCHAT_START_CREATE_GUILD,
|
||||
BOTCHAT_END,
|
||||
BOTCHAT_FORCE_END,
|
||||
BOTCHAT_START_CHOOSE_DUTY,
|
||||
BOTCHAT_NEXT_PAGE_DUTY,
|
||||
BOTCHAT_DUTY_APPLY,
|
||||
BOTCHAT_DUTY_CANCEL_APPLY,
|
||||
BOTCHAT_START_TRADE_GUILD_OPTIONS,
|
||||
BOTCHAT_BUY_GUILD_OPTION,
|
||||
BOTCHAT_START_GUILD_RESEARCH,
|
||||
BOTCHAT_DESTROY_BUILDING,
|
||||
BOTCHAT_DYNCHAT_OPEN,
|
||||
BOTCHAT_DYNCHAT_CLOSE,
|
||||
BOTCHAT_DYNCHAT_SEND,
|
||||
JOURNAL_INIT_COMPLETED_MISSIONS,
|
||||
JOURNAL_UPDATE_COMPLETED_MISSIONS,
|
||||
JOURNAL_MISSION_ABANDON,
|
||||
JOURNAL_GROUP_MISSION_ABANDON,
|
||||
JOURNAL_ADD_COMPASS,
|
||||
JOURNAL_ADD_COMPASS_BOT,
|
||||
JOURNAL_REMOVE_COMPASS,
|
||||
JOURNAL_REMOVE_COMPASS_BOT,
|
||||
STRING_MANAGER_SET_LANGUAGE,
|
||||
STRING_MANAGER_PHRASE_SEND,
|
||||
STRING_MANAGER_STRING_RQ,
|
||||
STRING_MANAGER_STRING_RESP,
|
||||
STRING_MANAGER_RELOAD_CACHE,
|
||||
GUILD_CREATE,
|
||||
GUILD_ABORT_CREATION,
|
||||
GUILD_OPEN_GUILD_WINDOW,
|
||||
GUILD_INVITATION,
|
||||
GUILD_ACCEPT_INVITATION,
|
||||
GUILD_REFUSE_INVITATION,
|
||||
GUILD_JOIN_PROPOSAL,
|
||||
GUILD_SET_GRADE,
|
||||
GUILD_SET_LEADER,
|
||||
GUILD_KICK_MEMBER,
|
||||
GUILD_TELEPORT,
|
||||
GUILD_ASCENSOR,
|
||||
GUILD_FIRST_ASCENSOR_PAGE,
|
||||
GUILD_NEXT_ASCENSOR_PAGE,
|
||||
GUILD_LEAVE_ASCENSOR,
|
||||
GUILD_QUIT,
|
||||
GUILD_SET_PLAYER_TITLE,
|
||||
GUILD_UPDATE_PLAYER_TITLE,
|
||||
GUILD_USE_FEMALE_TITLES,
|
||||
GUILD_PUT_MONEY,
|
||||
GUILD_TAKE_MONEY,
|
||||
GUILD_OPEN_INVENTORY,
|
||||
GUILD_CLOSE_INVENTORY,
|
||||
OUTPOST_GIVEUP_OUTPOST,
|
||||
OUTPOST_SELECT,
|
||||
OUTPOST_UNSELECT,
|
||||
OUTPOST_DECLARE_WAR_START,
|
||||
OUTPOST_DECLARE_WAR_ACK,
|
||||
OUTPOST_DECLARE_WAR_VALIDATE,
|
||||
OUTPOST_SET_DEF_PERIOD,
|
||||
OUTPOST_SET_SQUAD,
|
||||
OUTPOST_SET_SQUAD_SPAWN,
|
||||
OUTPOST_INSERT_SQUAD,
|
||||
OUTPOST_REMOVE_SQUAD,
|
||||
OUTPOST_SET_SQUAD_CAPITAL,
|
||||
OUTPOST_CHOOSE_SIDE,
|
||||
OUTPOST_SIDE_CHOSEN,
|
||||
OUTPOST_BANISH_PLAYER,
|
||||
OUTPOST_BANISH_GUILD,
|
||||
OUTPOST_BUY_BUILDING,
|
||||
OUTPOST_DESTROY_BUILDING,
|
||||
PHRASE_DELETE,
|
||||
PHRASE_LEARN,
|
||||
PHRASE_MEMORIZE,
|
||||
PHRASE_FORGET,
|
||||
PHRASE_EXECUTE,
|
||||
PHRASE_EXECUTE_CYCLIC,
|
||||
PHRASE_EXECUTE_FABER,
|
||||
PHRASE_DOWNLOAD,
|
||||
PHRASE_BUY,
|
||||
PHRASE_CONFIRM_BUY,
|
||||
PHRASE_BUY_SHEET,
|
||||
PHRASE_CANCEL_LINK,
|
||||
PHRASE_CANCEL_TOP,
|
||||
PHRASE_CANCEL_ALL,
|
||||
PHRASE_CRISTALIZE,
|
||||
PHRASE_EXEC_CYCLIC_ACK,
|
||||
PHRASE_EXEC_NEXT_ACK,
|
||||
ITEM_INFO_GET,
|
||||
ITEM_INFO_SET,
|
||||
ITEM_INFO_REFRESH_VERSION,
|
||||
MISSION_PREREQ_GET,
|
||||
MISSION_PREREQ_SET,
|
||||
MISSION_ENTER_CRITICAL,
|
||||
MISSION_ASK_ENTER_CRITICAL,
|
||||
MISSION_CLOSE_ENTER_CRITICAL,
|
||||
MISSION_WAKE,
|
||||
MISSION_GROUP_WAKE,
|
||||
DUEL_ASK,
|
||||
DUEL_ACCEPT,
|
||||
DUEL_REFUSE,
|
||||
DUEL_ABANDON,
|
||||
DUEL_INVITATION,
|
||||
DUEL_CANCEL_INVITATION,
|
||||
PVP_CHALLENGE_ASK,
|
||||
PVP_CHALLENGE_ACCEPT,
|
||||
PVP_CHALLENGE_REFUSE,
|
||||
PVP_CHALLENGE_ABANDON,
|
||||
PVP_CHALLENGE_INVITATION,
|
||||
PVP_CHALLENGE_CANCEL_INVITATION,
|
||||
PVP_PVP_TAG,
|
||||
PVP_SET_NEUTRAL_ALLEGIANCE,
|
||||
PVP_SET_NEUTRAL_ALLEGIANCE_GUILD,
|
||||
PVP_FACTION_PUSH_FACTION_WAR,
|
||||
PVP_FACTION_POP_FACTION_WAR,
|
||||
PVP_FACTION_FACTION_WARS,
|
||||
ENCYCLOPEDIA_UPDATE,
|
||||
ENCYCLOPEDIA_INIT,
|
||||
USER_BARS,
|
||||
USER_POPUP,
|
||||
EVENT_SET_ITEM_CUSTOM_TEXT,
|
||||
EVENT_DUMMY,
|
||||
TOTEM_BUILD,
|
||||
TOTEM_DUMMY,
|
||||
MODULE_GATEWAY_FEOPEN,
|
||||
MODULE_GATEWAY_GATEWAY_MSG,
|
||||
MODULE_GATEWAY_FECLOSE,
|
||||
SEASON_SET,
|
||||
SEASON_DUMMY,
|
||||
DM_GIFT_BEGIN,
|
||||
DM_GIFT_VALIDATE,
|
||||
RING_MISSION_MISSION_RING_SELECT,
|
||||
RING_MISSION_DSS_DOWN,
|
||||
NPC_ICON_GET_DESC,
|
||||
NPC_ICON_SET_DESC,
|
||||
NPC_ICON_SVR_EVENT_MIS_AVL,
|
||||
NPC_ICON_SET_TIMER,
|
||||
__LAST_ELEMENT
|
||||
};
|
||||
|
||||
static int get_command(String name);
|
||||
static String get_command_name(uint32_t id);
|
||||
};
|
||||
|
||||
|
||||
VARIANT_ENUM_CAST(ImpulseBase::Impulse);
|
||||
|
||||
#endif
|
14
modules/impulse/register_types.cpp
Normal file
14
modules/impulse/register_types.cpp
Normal file
|
@ -0,0 +1,14 @@
|
|||
/* register_types.cpp */
|
||||
|
||||
#include "register_types.h"
|
||||
|
||||
#include "core/class_db.h"
|
||||
#include "impulsebase.h"
|
||||
|
||||
void register_impulse_types() {
|
||||
ClassDB::register_class<ImpulseBase>();
|
||||
}
|
||||
|
||||
void unregister_impulse_types() {
|
||||
// Nothing to do here in this example.
|
||||
}
|
5
modules/impulse/register_types.h
Normal file
5
modules/impulse/register_types.h
Normal file
|
@ -0,0 +1,5 @@
|
|||
/* register_types.h */
|
||||
|
||||
void register_impulse_types();
|
||||
void unregister_impulse_types();
|
||||
/* yes, the word in the middle must be the same as the module folder name */
|
|
@ -5,12 +5,18 @@
|
|||
#include "core/class_db.h"
|
||||
#include "network_connection.h"
|
||||
#include "network_connection_core.h"
|
||||
#include "modules/debug/debug.h"
|
||||
|
||||
void register_networkconnection_types() {
|
||||
ClassDB::register_class<NetworkConnection>();
|
||||
ClassDB::register_class<NetworkConnectionCore>();
|
||||
// Initialize singleton
|
||||
DBG_PRINT("register_networkconnection_types");
|
||||
NetworkConnectionCore::get_singleton();
|
||||
}
|
||||
|
||||
void unregister_networkconnection_types() {
|
||||
// Nothing to do here in this example.
|
||||
// Delete singleton
|
||||
DBG_PRINT("unregister_networkconnection_types");
|
||||
NetworkConnectionCore::terminate_connexion();
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "network_connection_core.h"
|
||||
#include "modules/debug/debug.h"
|
||||
#include "modules/networkconnection/network_data.h"
|
||||
#include "modules/command/action_factory.h"
|
||||
#include "modules/action/action_factory.h"
|
||||
|
||||
inline uint32_t diff_uint32_circulate(uint32_t a, uint32_t b)
|
||||
{
|
||||
|
@ -502,9 +502,9 @@ void StateConnectionConnected::send_message()
|
|||
{
|
||||
if ( this->_data->_server_sync != this->_data->_client_sync )
|
||||
this->send_system_ack_sync();
|
||||
if (this->_data->_latest_probes.size() != 0 )
|
||||
else if (this->_data->_latest_probes.size() != 0 )
|
||||
this->send_system_ack_probe();
|
||||
if (this->_data->_recieved_new_server_tick == true)
|
||||
else if (this->_data->_recieved_new_server_tick == true)
|
||||
this->send_system_ask_tick();
|
||||
}
|
||||
/*
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -25,8 +25,7 @@
|
|||
#include "core/dictionary.h"
|
||||
#include "modules/bitstream/bitstream.h"
|
||||
#include "modules/debug/debug.h"
|
||||
|
||||
String get_command_name(uint32_t id);
|
||||
#include "modules/impulse/impulsebase.h"
|
||||
|
||||
inline uint32_t getPowerOf2(uint32_t v)
|
||||
{
|
||||
|
@ -67,343 +66,6 @@ class ReferentialMessageCore : public Reference
|
|||
protected:
|
||||
static void _bind_methods();
|
||||
public:
|
||||
enum Command {
|
||||
TARGET_PARTY,
|
||||
TARGET_INVENTORY,
|
||||
TARGET_FOLLOW,
|
||||
TARGET_NO_FOLLOW,
|
||||
CONNECTION_USER_CHAR,
|
||||
CONNECTION_NO_USER_CHAR,
|
||||
CONNECTION_USER_CHARS,
|
||||
CONNECTION_CREATE_CHAR,
|
||||
CONNECTION_SELECT_CHAR,
|
||||
CONNECTION_DELETE_CHAR,
|
||||
CONNECTION_RENAME_CHAR,
|
||||
CONNECTION_ENTER,
|
||||
CONNECTION_READY,
|
||||
CONNECTION_TIME_DATE_SYNCHRO,
|
||||
CONNECTION_ASK_NAME,
|
||||
CONNECTION_VALID_NAME,
|
||||
CONNECTION_CREATE_CHAR_ERROR,
|
||||
CONNECTION_RECONNECT,
|
||||
CONNECTION_SERVER_RECONNECT_OK,
|
||||
CONNECTION_SHARD_ID,
|
||||
CONNECTION_SERVER_QUIT_OK,
|
||||
CONNECTION_SERVER_QUIT_ABORT,
|
||||
CONNECTION_CLIENT_QUIT_REQUEST,
|
||||
CONNECTION_MAIL_AVAILABLE,
|
||||
CONNECTION_GUILD_MESSAGE_AVAILABLE,
|
||||
CONNECTION_PERMANENT_BAN,
|
||||
CONNECTION_UNBAN,
|
||||
CONNECTION_FAR_TP,
|
||||
CONNECTION_RET_MAINLAND,
|
||||
DB_UPD_PLR,
|
||||
DB_UPD_INV,
|
||||
DB_INIT_PLR,
|
||||
DB_INIT_INV,
|
||||
DB_GROUP_UPDATE_BANK,
|
||||
DB_GROUP_INIT_BANK,
|
||||
DB_GROUP_RESET_BANK,
|
||||
POSITION,
|
||||
HARVEST_DEPOSIT,
|
||||
HARVEST_CORPSE,
|
||||
HARVEST_INTERRUPT,
|
||||
HARVEST_CLOSE_TEMP_INVENTORY,
|
||||
TRAINING,
|
||||
JOB_SET_JOB_STATUS,
|
||||
JOB_SWAP_JOB_STATUS,
|
||||
CASTING_BEGIN,
|
||||
CASTING_INTERRUPT,
|
||||
FABER_OPEN,
|
||||
FABER_CLOSE,
|
||||
FABER_EXECUTE,
|
||||
FABER_SET_NUM_ITEM,
|
||||
FABER_START_CREATE,
|
||||
FABER_START_REPAIR,
|
||||
FABER_START_REFINE,
|
||||
FABER_SET_MP_QUALITY,
|
||||
FABER_SET_MP_REFINE,
|
||||
FABER_SET_TOOL,
|
||||
FABER_RESET_TOOL,
|
||||
FABER_INTERRUPT,
|
||||
COMBAT_ENGAGE,
|
||||
COMBAT_DISENGAGE,
|
||||
COMBAT_DEFAULT_ATTACK,
|
||||
COMBAT_ENGAGE_FAILED,
|
||||
COMBAT_VALIDATE_MELEE,
|
||||
COMBAT_PARRY,
|
||||
COMBAT_DODGE,
|
||||
COMBAT_PROTECTED_SLOT,
|
||||
COMBAT_FLYING_ChaScore1_DELTA,
|
||||
COMBAT_FLYING_TEXT_ISE,
|
||||
COMBAT_FLYING_TEXT,
|
||||
STRING_TELL,
|
||||
STRING_FAR_TELL,
|
||||
STRING_CHAT,
|
||||
STRING_CHAT_TEAM,
|
||||
STRING_ADD_DYN_STR,
|
||||
STRING_FILTER,
|
||||
STRING_CHAT_MODE,
|
||||
STRING_CHAT2,
|
||||
STRING_TELL2,
|
||||
STRING_DYN_STRING,
|
||||
STRING_DYN_STRING_GROUP,
|
||||
STRING_AFK_TXT,
|
||||
STUN_STUN,
|
||||
STUN_WAKE_UP,
|
||||
SENTENCE_EXECUTE,
|
||||
SENTENCE_CANCEL,
|
||||
SENTENCE_CANCEL_CURRENT,
|
||||
SENTENCE_CANCEL_ALL,
|
||||
SENTENCE_CLEAR,
|
||||
SENTENCE_MEMORIZE,
|
||||
SENTENCE_FORGET,
|
||||
SENTENCE_EVALUATE,
|
||||
SENTENCE_ADD_BRICK,
|
||||
SENTENCE_REMOVE_BRICK,
|
||||
SENTENCE_START,
|
||||
SENTENCE_STOP,
|
||||
TEAM_JOIN,
|
||||
TEAM_LEAVE,
|
||||
TEAM_INVITATION,
|
||||
TEAM_JOIN_PROPOSAL,
|
||||
TEAM_JOIN_PROPOSAL_DECLINE,
|
||||
TEAM_KICK,
|
||||
TEAM_SET_SUCCESSOR,
|
||||
TEAM_SHARE_OPEN,
|
||||
TEAM_SHARE_VALID_ITEM,
|
||||
TEAM_SHARE_INVALID_ITEM,
|
||||
TEAM_SHARE_VALID,
|
||||
TEAM_SHARE_INVALID,
|
||||
TEAM_SHARE_CLOSE,
|
||||
TEAM_CONTACT_INIT,
|
||||
TEAM_CONTACT_ADD,
|
||||
TEAM_CONTACT_DEL,
|
||||
TEAM_CONTACT_MOVE,
|
||||
TEAM_CONTACT_CREATE,
|
||||
TEAM_CONTACT_STATUS,
|
||||
TEAM_CONTACT_REMOVE,
|
||||
ITEM_DROP,
|
||||
ITEM_PICK_UP,
|
||||
ITEM_PICK_UP_CLOSE,
|
||||
ITEM_SWAP,
|
||||
ITEM_ACTIVATE_SHEATH,
|
||||
ITEM_HARVEST,
|
||||
ITEM_HARVEST_CLOSE,
|
||||
ITEM_GIVE,
|
||||
ITEM_DESTROY,
|
||||
ITEM_EQUIP,
|
||||
ITEM_UNEQUIP,
|
||||
ITEM_TEMP_TO_BAG,
|
||||
ITEM_ALL_TEMP,
|
||||
ITEM_NO_TEMP,
|
||||
ITEM_ENCHANT,
|
||||
ITEM_OPEN_ROOM_INVENTORY,
|
||||
ITEM_CLOSE_ROOM_INVENTORY,
|
||||
ITEM_USE_ITEM,
|
||||
ITEM_STOP_USE_XP_CAT,
|
||||
TP_RESPAWN,
|
||||
TP_BOT,
|
||||
TP_WANTED,
|
||||
TP_DEST,
|
||||
TP_DEST_WITH_SEASON,
|
||||
TP_ACK,
|
||||
TP_CORRECT,
|
||||
DEATH_RESPAWN_POINT,
|
||||
DEATH_ASK_RESPAWN,
|
||||
DEATH_RESPAWN,
|
||||
ANIMALS_BEAST,
|
||||
ANIMALS_MOUNT_ABORT,
|
||||
EXCHANGE_INVITATION,
|
||||
EXCHANGE_CLOSE_INVITATION,
|
||||
EXCHANGE_PROPOSAL,
|
||||
EXCHANGE_ACCEPT_INVITATION,
|
||||
EXCHANGE_DECLINE_INVITATION,
|
||||
EXCHANGE_VALIDATE,
|
||||
EXCHANGE_INVALIDATE,
|
||||
EXCHANGE_END,
|
||||
EXCHANGE_SEEDS,
|
||||
EXCHANGE_ADD,
|
||||
EXCHANGE_REMOVE,
|
||||
DEBUG_WHERE,
|
||||
DEBUG_WHO,
|
||||
DEBUG_REPLY_WHERE,
|
||||
DEBUG_SERVICES,
|
||||
DEBUG_CMD,
|
||||
DEBUG_PING,
|
||||
DEBUG_COUNTER,
|
||||
COMMAND_EMOTE,
|
||||
COMMAND_CUSTOM_EMOTE,
|
||||
COMMAND_WHERE,
|
||||
COMMAND_ADMIN,
|
||||
COMMAND_ADMIN_OFFLINE,
|
||||
COMMAND_REMOTE_ADMIN,
|
||||
COMMAND_REMOTE_ADMIN_ANSWER,
|
||||
COMMAND_SIT,
|
||||
COMMAND_AFK,
|
||||
COMMAND_RANDOM,
|
||||
COMMAND_GUILDMOTD,
|
||||
MP_EVAL_SET_MP,
|
||||
MP_EVAL_SET_MP_LEVEL,
|
||||
MP_EVAL_SET_MARKET,
|
||||
MP_EVAL_EXECUTE,
|
||||
BOTCHAT_NEXT_PAGE_ITEM,
|
||||
BOTCHAT_NEXT_PAGE_MISSION,
|
||||
BOTCHAT_START_TRADE_ITEM,
|
||||
BOTCHAT_START_TRADE_TELEPORT,
|
||||
BOTCHAT_START_TRADE_FACTION,
|
||||
BOTCHAT_START_TRADE_SKILL,
|
||||
BOTCHAT_START_TRADE_PACT,
|
||||
BOTCHAT_START_TRADE_ACTION,
|
||||
BOTCHAT_BUY,
|
||||
BOTCHAT_SELL,
|
||||
BOTCHAT_DESTROY_ITEM,
|
||||
BOTCHAT_REFRESH_TRADE_LIST,
|
||||
BOTCHAT_SET_FILTERS,
|
||||
BOTCHAT_START_CHOOSE_MISSION,
|
||||
BOTCHAT_START_DYNAMIC_MISSION,
|
||||
BOTCHAT_CONTINUE_MISSION,
|
||||
BOTCHAT_VALIDATE_PLAYER_GIFT,
|
||||
BOTCHAT_PICK_MISSION,
|
||||
BOTCHAT_DM_CHOICE,
|
||||
BOTCHAT_DM_ACCEPT,
|
||||
BOTCHAT_START_NEWS,
|
||||
BOTCHAT_START_CREATE_GUILD,
|
||||
BOTCHAT_END,
|
||||
BOTCHAT_FORCE_END,
|
||||
BOTCHAT_START_CHOOSE_DUTY,
|
||||
BOTCHAT_NEXT_PAGE_DUTY,
|
||||
BOTCHAT_DUTY_APPLY,
|
||||
BOTCHAT_DUTY_CANCEL_APPLY,
|
||||
BOTCHAT_START_TRADE_GUILD_OPTIONS,
|
||||
BOTCHAT_BUY_GUILD_OPTION,
|
||||
BOTCHAT_START_GUILD_RESEARCH,
|
||||
BOTCHAT_DESTROY_BUILDING,
|
||||
BOTCHAT_DYNCHAT_OPEN,
|
||||
BOTCHAT_DYNCHAT_CLOSE,
|
||||
BOTCHAT_DYNCHAT_SEND,
|
||||
JOURNAL_INIT_COMPLETED_MISSIONS,
|
||||
JOURNAL_UPDATE_COMPLETED_MISSIONS,
|
||||
JOURNAL_MISSION_ABANDON,
|
||||
JOURNAL_GROUP_MISSION_ABANDON,
|
||||
JOURNAL_ADD_COMPASS,
|
||||
JOURNAL_ADD_COMPASS_BOT,
|
||||
JOURNAL_REMOVE_COMPASS,
|
||||
JOURNAL_REMOVE_COMPASS_BOT,
|
||||
STRING_MANAGER_SET_LANGUAGE,
|
||||
STRING_MANAGER_PHRASE_SEND,
|
||||
STRING_MANAGER_STRING_RQ,
|
||||
STRING_MANAGER_STRING_RESP,
|
||||
STRING_MANAGER_RELOAD_CACHE,
|
||||
GUILD_CREATE,
|
||||
GUILD_ABORT_CREATION,
|
||||
GUILD_OPEN_GUILD_WINDOW,
|
||||
GUILD_INVITATION,
|
||||
GUILD_ACCEPT_INVITATION,
|
||||
GUILD_REFUSE_INVITATION,
|
||||
GUILD_JOIN_PROPOSAL,
|
||||
GUILD_SET_GRADE,
|
||||
GUILD_SET_LEADER,
|
||||
GUILD_KICK_MEMBER,
|
||||
GUILD_TELEPORT,
|
||||
GUILD_ASCENSOR,
|
||||
GUILD_FIRST_ASCENSOR_PAGE,
|
||||
GUILD_NEXT_ASCENSOR_PAGE,
|
||||
GUILD_LEAVE_ASCENSOR,
|
||||
GUILD_QUIT,
|
||||
GUILD_SET_PLAYER_TITLE,
|
||||
GUILD_UPDATE_PLAYER_TITLE,
|
||||
GUILD_USE_FEMALE_TITLES,
|
||||
GUILD_PUT_MONEY,
|
||||
GUILD_TAKE_MONEY,
|
||||
GUILD_OPEN_INVENTORY,
|
||||
GUILD_CLOSE_INVENTORY,
|
||||
OUTPOST_GIVEUP_OUTPOST,
|
||||
OUTPOST_SELECT,
|
||||
OUTPOST_UNSELECT,
|
||||
OUTPOST_DECLARE_WAR_START,
|
||||
OUTPOST_DECLARE_WAR_ACK,
|
||||
OUTPOST_DECLARE_WAR_VALIDATE,
|
||||
OUTPOST_SET_DEF_PERIOD,
|
||||
OUTPOST_SET_SQUAD,
|
||||
OUTPOST_SET_SQUAD_SPAWN,
|
||||
OUTPOST_INSERT_SQUAD,
|
||||
OUTPOST_REMOVE_SQUAD,
|
||||
OUTPOST_SET_SQUAD_CAPITAL,
|
||||
OUTPOST_CHOOSE_SIDE,
|
||||
OUTPOST_SIDE_CHOSEN,
|
||||
OUTPOST_BANISH_PLAYER,
|
||||
OUTPOST_BANISH_GUILD,
|
||||
OUTPOST_BUY_BUILDING,
|
||||
OUTPOST_DESTROY_BUILDING,
|
||||
PHRASE_DELETE,
|
||||
PHRASE_LEARN,
|
||||
PHRASE_MEMORIZE,
|
||||
PHRASE_FORGET,
|
||||
PHRASE_EXECUTE,
|
||||
PHRASE_EXECUTE_CYCLIC,
|
||||
PHRASE_EXECUTE_FABER,
|
||||
PHRASE_DOWNLOAD,
|
||||
PHRASE_BUY,
|
||||
PHRASE_CONFIRM_BUY,
|
||||
PHRASE_BUY_SHEET,
|
||||
PHRASE_CANCEL_LINK,
|
||||
PHRASE_CANCEL_TOP,
|
||||
PHRASE_CANCEL_ALL,
|
||||
PHRASE_CRISTALIZE,
|
||||
PHRASE_EXEC_CYCLIC_ACK,
|
||||
PHRASE_EXEC_NEXT_ACK,
|
||||
ITEM_INFO_GET,
|
||||
ITEM_INFO_SET,
|
||||
ITEM_INFO_REFRESH_VERSION,
|
||||
MISSION_PREREQ_GET,
|
||||
MISSION_PREREQ_SET,
|
||||
MISSION_ENTER_CRITICAL,
|
||||
MISSION_ASK_ENTER_CRITICAL,
|
||||
MISSION_CLOSE_ENTER_CRITICAL,
|
||||
MISSION_WAKE,
|
||||
MISSION_GROUP_WAKE,
|
||||
DUEL_ASK,
|
||||
DUEL_ACCEPT,
|
||||
DUEL_REFUSE,
|
||||
DUEL_ABANDON,
|
||||
DUEL_INVITATION,
|
||||
DUEL_CANCEL_INVITATION,
|
||||
PVP_CHALLENGE_ASK,
|
||||
PVP_CHALLENGE_ACCEPT,
|
||||
PVP_CHALLENGE_REFUSE,
|
||||
PVP_CHALLENGE_ABANDON,
|
||||
PVP_CHALLENGE_INVITATION,
|
||||
PVP_CHALLENGE_CANCEL_INVITATION,
|
||||
PVP_PVP_TAG,
|
||||
PVP_SET_NEUTRAL_ALLEGIANCE,
|
||||
PVP_SET_NEUTRAL_ALLEGIANCE_GUILD,
|
||||
PVP_FACTION_PUSH_FACTION_WAR,
|
||||
PVP_FACTION_POP_FACTION_WAR,
|
||||
PVP_FACTION_FACTION_WARS,
|
||||
ENCYCLOPEDIA_UPDATE,
|
||||
ENCYCLOPEDIA_INIT,
|
||||
USER_BARS,
|
||||
USER_POPUP,
|
||||
EVENT_SET_ITEM_CUSTOM_TEXT,
|
||||
EVENT_DUMMY,
|
||||
TOTEM_BUILD,
|
||||
TOTEM_DUMMY,
|
||||
MODULE_GATEWAY_FEOPEN,
|
||||
MODULE_GATEWAY_GATEWAY_MSG,
|
||||
MODULE_GATEWAY_FECLOSE,
|
||||
SEASON_SET,
|
||||
SEASON_DUMMY,
|
||||
DM_GIFT_BEGIN,
|
||||
DM_GIFT_VALIDATE,
|
||||
RING_MISSION_MISSION_RING_SELECT,
|
||||
RING_MISSION_DSS_DOWN,
|
||||
NPC_ICON_GET_DESC,
|
||||
NPC_ICON_SET_DESC,
|
||||
NPC_ICON_SVR_EVENT_MIS_AVL,
|
||||
NPC_ICON_SET_TIMER,
|
||||
__LAST_ELEMENT
|
||||
};
|
||||
class ElementHead
|
||||
{
|
||||
private:
|
||||
|
@ -423,9 +85,8 @@ public:
|
|||
};
|
||||
private:
|
||||
static ReferentialMessageCore *singleton;
|
||||
BitStream _encoder[Command::__LAST_ELEMENT];
|
||||
BitStream _encoder[ImpulseBase::Impulse::__LAST_ELEMENT];
|
||||
Ref<ElementReferential> _decoder;
|
||||
int get_command(String name);
|
||||
void read_referential_step(Dictionary step, Vector<ElementHead> head, Ref<ElementReferential> root);
|
||||
public:
|
||||
|
||||
|
@ -441,6 +102,4 @@ public:
|
|||
int read_command(Ref<BitStream> msgin);
|
||||
};
|
||||
|
||||
VARIANT_ENUM_CAST(ReferentialMessageCore::Command);
|
||||
|
||||
#endif
|
|
@ -8,8 +8,11 @@
|
|||
void register_referentialmessage_types() {
|
||||
ClassDB::register_class<ReferentialMessage>();
|
||||
ClassDB::register_class<ReferentialMessageCore>();
|
||||
// Initialize singleton
|
||||
ReferentialMessageCore::get_singleton();
|
||||
}
|
||||
|
||||
void unregister_referentialmessage_types() {
|
||||
// Nothing to do here in this example.
|
||||
// Delete singleton
|
||||
ReferentialMessageCore::clear_session();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue