1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-09 12:17:45 +00:00

fix eventplay opcodes/names

This commit is contained in:
NotAdam 2020-01-02 14:42:58 +11:00
parent fa10458bce
commit 0d3e73e531
3 changed files with 25 additions and 12 deletions

View file

@ -180,8 +180,13 @@ namespace Sapphire::Network::Packets
HuntingLogEntry = 0x01B3, // updated 5.0
EventPlay = 0x0279, // updated 5.18
DirectorPlayScene = 0x01B9, // updated 5.0
EventOpenGilShop = 0x01B1, // updated 5.18
EventPlay4 = 0x02F7, // updated 5.18
EventPlay8 = 0x0119, // updated 5.18
EventPlay16 = 0x01FB, // updated 5.18
EventPlay32 = 0x0364, // updated 5.18
EventPlay64 = 0x00E5, // updated 5.18
EventPlay128 = 0x02BE, // updated 5.18
EventPlay255 = 0x01B1, // updated 5.18
EventStart = 0x0230, // updated 5.18
EventFinish = 0x01E4, // updated 5.18

View file

@ -1421,11 +1421,24 @@ namespace Sapphire::Network::Packets::Server
uint8_t unknown[8];
};
template< int ArgCount >
struct FFXIVIpcEventPlayN
{
uint64_t actorId;
uint32_t eventId;
uint16_t scene;
uint16_t padding;
uint32_t sceneFlags;
uint8_t paramCount;
uint8_t padding2[3];
uint32_t params[ArgCount];
};
/**
* Structural representation of the packet sent by the server
* to play an event
*/
struct FFXIVIpcDirectorPlayScene : FFXIVIpcBasePacket< DirectorPlayScene >
struct FFXIVIpcDirectorPlayScene : FFXIVIpcBasePacket< EventPlay32 >
{
uint64_t actorId;
uint32_t eventId;
@ -1454,15 +1467,10 @@ namespace Sapphire::Network::Packets::Server
/* 000C */ uint32_t padding1;
};
struct FFXIVIpcEventOpenGilShop : FFXIVIpcBasePacket< EventOpenGilShop >
struct FFXIVIpcEventPlay255 :
FFXIVIpcBasePacket< EventPlay255 >,
FFXIVIpcEventPlayN< 255 >
{
uint64_t actorId;
uint32_t eventId;
uint16_t scene;
uint16_t padding;
uint32_t sceneFlags;
uint32_t unknown_wtf[0x101];
};

View file

@ -141,7 +141,7 @@ void Sapphire::Entity::Player::playGilShop( uint32_t eventId, uint32_t flags,
pEvent->setEventReturnCallback( eventCallback );
pEvent->setSceneChainCallback( nullptr );
auto openGilShopPacket = makeZonePacket< Server::FFXIVIpcEventOpenGilShop >( getId() );
auto openGilShopPacket = makeZonePacket< Server::FFXIVIpcEventPlay255 >( getId() );
openGilShopPacket->data().eventId = eventId;
openGilShopPacket->data().sceneFlags = flags;
openGilShopPacket->data().actorId = getId();