mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 05:57:45 +00:00
Fixed teleports instantly fading out without showing any animation on finish
This commit is contained in:
parent
a6ee31eb11
commit
0eeeb020eb
4 changed files with 14 additions and 10 deletions
|
@ -113,7 +113,7 @@ class ManSea001Def
|
|||
if( param2 == 1 )
|
||||
{
|
||||
player.questUpdate( ManSea001.id, ManSea001.SEQ_FINISH );
|
||||
player.prepareZoning( player.getZoneId(), true );
|
||||
player.prepareZoning( player.getZoneId(), true, 1, 0 );
|
||||
player.changePos( 9, 40, 14, 2 );
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1192,12 +1192,14 @@ struct FFXIVIpcPrepareZoning : FFXIVIpcBasePacket<PrepareZoning>
|
|||
{
|
||||
uint32_t logMessage;
|
||||
uint16_t targetZone;
|
||||
uint16_t param3;
|
||||
uint16_t animation;
|
||||
uint8_t param4;
|
||||
uint8_t hideChar;
|
||||
uint8_t fadeOut;
|
||||
uint8_t param7;
|
||||
uint32_t padding;
|
||||
uint8_t fadeOutTime;
|
||||
uint8_t unknown;
|
||||
uint16_t padding;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -176,10 +176,12 @@ uint64_t Core::Entity::Player::getOnlineStatusMask() const
|
|||
return m_onlineStatus;
|
||||
}
|
||||
|
||||
void Core::Entity::Player::prepareZoning( uint16_t targetZone, bool fadeOut )
|
||||
void Core::Entity::Player::prepareZoning( uint16_t targetZone, bool fadeOut, uint8_t fadeOutTime, uint16_t animation )
|
||||
{
|
||||
GamePacketNew< FFXIVIpcPrepareZoning, ServerZoneIpcType > preparePacket( getId() );
|
||||
preparePacket.data().targetZone = targetZone;
|
||||
preparePacket.data().fadeOutTime = fadeOutTime;
|
||||
preparePacket.data().animation = animation;
|
||||
preparePacket.data().fadeOut = fadeOut == true ? 1 : 0;
|
||||
queuePacket( preparePacket );
|
||||
}
|
||||
|
@ -307,31 +309,31 @@ void Core::Entity::Player::teleport( uint16_t aetheryteId, uint8_t type )
|
|||
// TODO: this should be simplified and a type created in server_common/common.h.
|
||||
if( type == 1 ) // teleport
|
||||
{
|
||||
prepareZoning( data->target_zone, true );
|
||||
prepareZoning( data->target_zone, true, 1, 112 );
|
||||
sendToInRangeSet( ActorControlPacket142( getId(), ActorDespawnEffect, 0x04 ) );
|
||||
setZoningType( Common::ZoneingType::Teleport );
|
||||
}
|
||||
else if( type == 2 ) // aethernet
|
||||
{
|
||||
prepareZoning( data->target_zone, true );
|
||||
prepareZoning( data->target_zone, true, 1, 112 );
|
||||
sendToInRangeSet( ActorControlPacket142( getId(), ActorDespawnEffect, 0x04 ) );
|
||||
setZoningType( Common::ZoneingType::Teleport );
|
||||
}
|
||||
else if( type == 3 ) // return
|
||||
{
|
||||
prepareZoning( data->target_zone, true );
|
||||
prepareZoning( data->target_zone, true, 1, 111 );
|
||||
sendToInRangeSet( ActorControlPacket142( getId(), ActorDespawnEffect, 0x03 ) );
|
||||
setZoningType( Common::ZoneingType::Return );
|
||||
}
|
||||
|
||||
m_queuedZoneing = boost::make_shared<QueuedZoning>( data->target_zone, pos, Util::getTimeMs(), rot );
|
||||
m_queuedZoneing = boost::make_shared< QueuedZoning >( data->target_zone, pos, Util::getTimeMs(), rot );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void Core::Entity::Player::forceZoneing( uint32_t zoneId )
|
||||
{
|
||||
m_queuedZoneing = boost::make_shared<QueuedZoning>( zoneId, getPos(), Util::getTimeMs(), 0 );
|
||||
m_queuedZoneing = boost::make_shared< QueuedZoning >( zoneId, getPos(), Util::getTimeMs(), 0 );
|
||||
//performZoning( zoneId, Common::ZoneingType::None, getPos() );
|
||||
}
|
||||
|
||||
|
|
|
@ -325,7 +325,7 @@ public:
|
|||
/*! perform a teleport of a specified type ( teleport,return,aethernet ) */
|
||||
void teleport( uint16_t aetheryteId, uint8_t type = 1 );
|
||||
/*! prepares zoning / fades out the screen */
|
||||
void prepareZoning( uint16_t targetZone, bool fadeOut );
|
||||
void prepareZoning( uint16_t targetZone, bool fadeOut, uint8_t fadoutTime = 0, uint16_t animation = 0 );
|
||||
|
||||
void calculateStats() override;
|
||||
void sendStats();
|
||||
|
|
Loading…
Add table
Reference in a new issue