From 29da401de77cf4a1734a2a90f1dcb071a0f12eef Mon Sep 17 00:00:00 2001 From: collett Date: Thu, 23 Jan 2020 22:43:16 +0900 Subject: [PATCH] Fix moundId type. --- src/world/Action/MountAction.cpp | 2 +- src/world/Action/MountAction.h | 4 ++-- src/world/Manager/ActionMgr.cpp | 2 +- src/world/Manager/ActionMgr.h | 2 +- src/world/Network/Handlers/ActionHandler.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/world/Action/MountAction.cpp b/src/world/Action/MountAction.cpp index 94d13202..1c0170b7 100644 --- a/src/world/Action/MountAction.cpp +++ b/src/world/Action/MountAction.cpp @@ -15,7 +15,7 @@ using namespace Sapphire::Network::Packets::Server; using namespace Sapphire::Network::ActorControl; using namespace Sapphire::World::Action; -MountAction::MountAction( Sapphire::Entity::CharaPtr source, uint32_t mountId, uint16_t sequence, Data::ActionPtr actionData, Sapphire::FrameworkPtr fw ) : +MountAction::MountAction( Sapphire::Entity::CharaPtr source, uint16_t mountId, uint16_t sequence, Data::ActionPtr actionData, Sapphire::FrameworkPtr fw ) : Action::Action( source, 4, sequence, actionData, fw ), m_mountId( mountId ) { diff --git a/src/world/Action/MountAction.h b/src/world/Action/MountAction.h index 37c0595a..1b095b47 100644 --- a/src/world/Action/MountAction.h +++ b/src/world/Action/MountAction.h @@ -8,7 +8,7 @@ namespace Sapphire::World::Action class MountAction : public Action { public: - MountAction( Entity::CharaPtr source, uint32_t mountId, uint16_t sequence, Data::ActionPtr actionData, FrameworkPtr fw ); + MountAction( Entity::CharaPtr source, uint16_t mountId, uint16_t sequence, Data::ActionPtr actionData, FrameworkPtr fw ); virtual ~MountAction() = default; bool preCheck() override; @@ -18,7 +18,7 @@ namespace Sapphire::World::Action void execute() override; private: - uint32_t m_mountId; + uint16_t m_mountId; }; } diff --git a/src/world/Manager/ActionMgr.cpp b/src/world/Manager/ActionMgr.cpp index f9859170..aaa723c9 100644 --- a/src/world/Manager/ActionMgr.cpp +++ b/src/world/Manager/ActionMgr.cpp @@ -79,7 +79,7 @@ void World::Manager::ActionMgr::handleItemAction( Sapphire::Entity::Player& play action->start(); } -void World::Manager::ActionMgr::handleMountAction( Entity::Player& player, uint32_t mountId, +void World::Manager::ActionMgr::handleMountAction( Entity::Player& player, uint16_t mountId, Data::ActionPtr actionData, uint64_t targetId, uint16_t sequence ) { diff --git a/src/world/Manager/ActionMgr.h b/src/world/Manager/ActionMgr.h index a8cf49df..dd1d5f40 100644 --- a/src/world/Manager/ActionMgr.h +++ b/src/world/Manager/ActionMgr.h @@ -29,7 +29,7 @@ namespace Sapphire::World::Manager void handleItemAction( Entity::Player& player, uint32_t itemId, Data::ItemActionPtr itemActionData, uint16_t itemSourceSlot, uint16_t itemSourceContainer ); - void handleMountAction( Entity::Player& player, uint32_t mountId, + void handleMountAction( Entity::Player& player, uint16_t mountId, Data::ActionPtr actionData, uint64_t targetId, uint16_t sequence ); private: diff --git a/src/world/Network/Handlers/ActionHandler.cpp b/src/world/Network/Handlers/ActionHandler.cpp index 78bf55d8..2b9f81dd 100644 --- a/src/world/Network/Handlers/ActionHandler.cpp +++ b/src/world/Network/Handlers/ActionHandler.cpp @@ -74,7 +74,7 @@ void Sapphire::Network::GameConnection::actionHandler( FrameworkPtr pFw, { auto action = exdData->get< Data::Action >( 4 ); assert( action ); - actionMgr->handleMountAction( player, actionId, action, targetId, sequence ); + actionMgr->handleMountAction( player, static_cast< uint16_t >( actionId ), action, targetId, sequence ); break; } }