1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-25 14:07:46 +00:00

Fixed teleports instantly fading out without showing any animation on finish

This commit is contained in:
Mordred 2017-08-30 23:08:10 +02:00
parent a6ee31eb11
commit 0eeeb020eb
4 changed files with 14 additions and 10 deletions

View file

@ -113,7 +113,7 @@ class ManSea001Def
if( param2 == 1 ) if( param2 == 1 )
{ {
player.questUpdate( ManSea001.id, ManSea001.SEQ_FINISH ); 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 ); player.changePos( 9, 40, 14, 2 );
} }
}); });

View file

@ -1192,12 +1192,14 @@ struct FFXIVIpcPrepareZoning : FFXIVIpcBasePacket<PrepareZoning>
{ {
uint32_t logMessage; uint32_t logMessage;
uint16_t targetZone; uint16_t targetZone;
uint16_t param3; uint16_t animation;
uint8_t param4; uint8_t param4;
uint8_t hideChar; uint8_t hideChar;
uint8_t fadeOut; uint8_t fadeOut;
uint8_t param7; uint8_t param7;
uint32_t padding; uint8_t fadeOutTime;
uint8_t unknown;
uint16_t padding;
}; };
/** /**

View file

@ -176,10 +176,12 @@ uint64_t Core::Entity::Player::getOnlineStatusMask() const
return m_onlineStatus; 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() ); GamePacketNew< FFXIVIpcPrepareZoning, ServerZoneIpcType > preparePacket( getId() );
preparePacket.data().targetZone = targetZone; preparePacket.data().targetZone = targetZone;
preparePacket.data().fadeOutTime = fadeOutTime;
preparePacket.data().animation = animation;
preparePacket.data().fadeOut = fadeOut == true ? 1 : 0; preparePacket.data().fadeOut = fadeOut == true ? 1 : 0;
queuePacket( preparePacket ); queuePacket( preparePacket );
} }
@ -307,19 +309,19 @@ 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. // TODO: this should be simplified and a type created in server_common/common.h.
if( type == 1 ) // teleport if( type == 1 ) // teleport
{ {
prepareZoning( data->target_zone, true ); prepareZoning( data->target_zone, true, 1, 112 );
sendToInRangeSet( ActorControlPacket142( getId(), ActorDespawnEffect, 0x04 ) ); sendToInRangeSet( ActorControlPacket142( getId(), ActorDespawnEffect, 0x04 ) );
setZoningType( Common::ZoneingType::Teleport ); setZoningType( Common::ZoneingType::Teleport );
} }
else if( type == 2 ) // aethernet else if( type == 2 ) // aethernet
{ {
prepareZoning( data->target_zone, true ); prepareZoning( data->target_zone, true, 1, 112 );
sendToInRangeSet( ActorControlPacket142( getId(), ActorDespawnEffect, 0x04 ) ); sendToInRangeSet( ActorControlPacket142( getId(), ActorDespawnEffect, 0x04 ) );
setZoningType( Common::ZoneingType::Teleport ); setZoningType( Common::ZoneingType::Teleport );
} }
else if( type == 3 ) // return else if( type == 3 ) // return
{ {
prepareZoning( data->target_zone, true ); prepareZoning( data->target_zone, true, 1, 111 );
sendToInRangeSet( ActorControlPacket142( getId(), ActorDespawnEffect, 0x03 ) ); sendToInRangeSet( ActorControlPacket142( getId(), ActorDespawnEffect, 0x03 ) );
setZoningType( Common::ZoneingType::Return ); setZoningType( Common::ZoneingType::Return );
} }

View file

@ -325,7 +325,7 @@ public:
/*! perform a teleport of a specified type ( teleport,return,aethernet ) */ /*! perform a teleport of a specified type ( teleport,return,aethernet ) */
void teleport( uint16_t aetheryteId, uint8_t type = 1 ); void teleport( uint16_t aetheryteId, uint8_t type = 1 );
/*! prepares zoning / fades out the screen */ /*! 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 calculateStats() override;
void sendStats(); void sendStats();