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 )
|
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 );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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,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.
|
// 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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
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 )
|
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() );
|
//performZoning( zoneId, Common::ZoneingType::None, getPos() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Add table
Reference in a new issue