1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 22:57:45 +00:00

Merge pull request #904 from Skyliegirl33/fix-itemaction

[3.x] Fix ItemAction arg
This commit is contained in:
Mordred 2023-02-26 11:47:10 +01:00 committed by GitHub
commit 5a73cfe4a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View file

@ -93,9 +93,8 @@ void ItemAction::handleCompanionItem()
{
auto player = getSourceChara()->getAsPlayer();
Logger::debug( "Companion arg: {0}", m_itemAction->data().Calcu0Arg[ 0 ] );
player->unlockCompanion( m_itemAction->data().Calcu0Arg[ 0 ] );
player->dropInventoryItem( static_cast< Common::InventoryType >( m_itemSourceContainer ), m_itemSourceSlot );
}
void ItemAction::handleMountItem()
@ -103,5 +102,5 @@ void ItemAction::handleMountItem()
auto player = getSourceChara()->getAsPlayer();
player->unlockMount( m_itemAction->data().Calcu0Arg[ 0 ] );
player->discardItem( m_itemSourceContainer, m_itemSourceSlot );
player->dropInventoryItem( static_cast< Common::InventoryType >( m_itemSourceContainer ), m_itemSourceSlot );
}

View file

@ -25,8 +25,8 @@ void Sapphire::Network::GameConnection::actionRequest( const Packets::FFXIVARR_P
const auto actionId = packet.data().ActionKey;
const auto sequence = packet.data().RequestId;
const auto targetId = packet.data().Target;
const auto itemSourceSlot = packet.data().Arg & 0xFFFF0000;
const auto itemSourceContainer = packet.data().Arg & 0x0000FFFF;
const auto itemSourceSlot = packet.data().Arg & 0x0000FFFF;
const auto itemSourceContainer = packet.data().Arg & 0xFFFF0000;
PlayerMgr::sendDebug( player, "Skill type: {0}, sequence: {1}, actionId: {2}, targetId: {3}", type, sequence, actionId, targetId );