mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-25 19:17:45 +00:00
Merge remote-tracking branch 'remotes/origin/develop' into develop_5.35u
This commit is contained in:
commit
d469227a12
3 changed files with 153 additions and 144 deletions
|
@ -264,7 +264,7 @@ namespace Sapphire::Network::ActorControl
|
||||||
|
|
||||||
ToggleOrchestrionUnlock = 0x396,
|
ToggleOrchestrionUnlock = 0x396,
|
||||||
|
|
||||||
EventBattleDialog = 0x39C,
|
EventBattleDialog = 0x39D,
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* param1 = mountSpeed
|
* param1 = mountSpeed
|
||||||
|
|
|
@ -491,7 +491,7 @@ void Sapphire::Network::GameConnection::clientTriggerHandler( const Packets::FFX
|
||||||
auto packet = makeActorControlSelf( player.getId(), ActorControl::EventBattleDialog, 0, param12, param2 );
|
auto packet = makeActorControlSelf( player.getId(), ActorControl::EventBattleDialog, 0, param12, param2 );
|
||||||
player.queuePacket( packet );
|
player.queuePacket( packet );
|
||||||
|
|
||||||
player.sendDebug( "event battle level sync: {0}, ilevel sync?: {1}", param12, param2 );
|
player.sendDebug( "event battle p1: {0}, p11: {1}, p12: {2}, p2: {3}, p3: {4}, p4: {5}, p5: {6}", param1, param11, param12, param2, param3, param4, param5 );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ClientTriggerType::CameraMode:
|
case ClientTriggerType::CameraMode:
|
||||||
|
|
|
@ -768,7 +768,58 @@ void Sapphire::Network::GameConnection::worldInteractionhandler( const Packets::
|
||||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcWorldInteractionHandler >( inPacket );
|
const auto packet = ZoneChannelPacket< Client::FFXIVIpcWorldInteractionHandler >( inPacket );
|
||||||
auto action = packet.data().action;
|
auto action = packet.data().action;
|
||||||
player.sendDebug( "WorldInteraction {}", action );
|
player.sendDebug( "WorldInteraction {}", action );
|
||||||
if( action == 0x1F5 )
|
switch( action )
|
||||||
|
{
|
||||||
|
case 0xD4: // enter dwarf house
|
||||||
|
{
|
||||||
|
if( player.getRace() != 3 ) // lalafell
|
||||||
|
break;
|
||||||
|
// looks like shit but IT WORKS.
|
||||||
|
auto x = packet.data().position.x;
|
||||||
|
auto z = packet.data().position.z;
|
||||||
|
if( x < -448 && x > -453 )
|
||||||
|
{
|
||||||
|
// west
|
||||||
|
if( x > -451 )
|
||||||
|
{
|
||||||
|
// enter
|
||||||
|
auto p = makeActorControl( player.getId(), 242, 1174189454, 817758208, 67, 0 );
|
||||||
|
queueOutPacket( p );
|
||||||
|
player.addStatusEffectById( 1945, 0, player, 0, true );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// exit
|
||||||
|
auto p = makeActorControl( player.getId(), 242, 1182315916, 827392000, 68, 0 );
|
||||||
|
queueOutPacket( p );
|
||||||
|
player.removeSingleStatusEffectById( 1945 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( x > 637 && x < 641 )
|
||||||
|
{
|
||||||
|
// east
|
||||||
|
if( z > -188 )
|
||||||
|
{
|
||||||
|
// enter
|
||||||
|
auto p = makeActorControl( player.getId(), 242, 3521816124, 1737687040, 69, 0 );
|
||||||
|
queueOutPacket( p );
|
||||||
|
player.addStatusEffectById( 1945, 0, player, 0, true );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// exit
|
||||||
|
auto p = makeActorControl( player.getId(), 242, 3517228601, 1749483520, 70, 0 );
|
||||||
|
queueOutPacket( p );
|
||||||
|
player.removeSingleStatusEffectById( 1945 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player.sendDebug( "Unknown dwarf house." );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 0x1F5: // emote
|
||||||
{
|
{
|
||||||
auto emote = packet.data().param1;
|
auto emote = packet.data().param1;
|
||||||
if( emote == 0x32 || emote == 0x33 ) // "/sit"
|
if( emote == 0x32 || emote == 0x33 ) // "/sit"
|
||||||
|
@ -778,7 +829,7 @@ void Sapphire::Network::GameConnection::worldInteractionhandler( const Packets::
|
||||||
auto emoteData = exdData.get< Data::Emote >( emote );
|
auto emoteData = exdData.get< Data::Emote >( emote );
|
||||||
|
|
||||||
if( !emoteData )
|
if( !emoteData )
|
||||||
return;
|
break;
|
||||||
|
|
||||||
player.setPos( packet.data().position );
|
player.setPos( packet.data().position );
|
||||||
if( emote == 0x32 && player.hasInRangeActor() )
|
if( emote == 0x32 && player.hasInRangeActor() )
|
||||||
|
@ -802,8 +853,9 @@ void Sapphire::Network::GameConnection::worldInteractionhandler( const Packets::
|
||||||
player.setStatus( Common::ActorStatus::EmoteMode );
|
player.setStatus( Common::ActorStatus::EmoteMode );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if( action == 0x1F8 )
|
case 0x1F8:
|
||||||
{
|
{
|
||||||
if( player.getPersistentEmote() > 0 )
|
if( player.getPersistentEmote() > 0 )
|
||||||
{
|
{
|
||||||
|
@ -828,9 +880,10 @@ void Sapphire::Network::GameConnection::worldInteractionhandler( const Packets::
|
||||||
auto pSetStatusPacket = makeActorControl( player.getId(), SetStatus, static_cast< uint8_t >( Common::ActorStatus::Idle ) );
|
auto pSetStatusPacket = makeActorControl( player.getId(), SetStatus, static_cast< uint8_t >( Common::ActorStatus::Idle ) );
|
||||||
player.sendToInRangeSet( pSetStatusPacket );
|
player.sendToInRangeSet( pSetStatusPacket );
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if ( action == 0x25E || // coming out from water
|
case 0x25E: // coming out from water
|
||||||
action == 0xD1 ) // underwater town portal
|
case 0xD1: // underwater town portal
|
||||||
{
|
{
|
||||||
auto p = makeZonePacket< FFXIVIpcPrepareZoning >( player.getId() );
|
auto p = makeZonePacket< FFXIVIpcPrepareZoning >( player.getId() );
|
||||||
p->data().targetZone = player.getCurrentTerritory()->getTerritoryTypeId();
|
p->data().targetZone = player.getCurrentTerritory()->getTerritoryTypeId();
|
||||||
|
@ -887,51 +940,7 @@ void Sapphire::Network::GameConnection::worldInteractionhandler( const Packets::
|
||||||
setPos->data().waitForLoad = action == 0xD1 ? 24 : 25;
|
setPos->data().waitForLoad = action == 0xD1 ? 24 : 25;
|
||||||
setPos->data().unknown1 = 0;
|
setPos->data().unknown1 = 0;
|
||||||
player.queuePacket( setPos ); // this packet needs a delay of 0.8 second to wait for the client finishing its water animation otherwise it looks odd.
|
player.queuePacket( setPos ); // this packet needs a delay of 0.8 second to wait for the client finishing its water animation otherwise it looks odd.
|
||||||
}
|
break;
|
||||||
else if( action == 0xD4 && player.getRace() == 3 ) // enter dwarf house lalafell only of course
|
|
||||||
{
|
|
||||||
// looks like shit but IT WORKS.
|
|
||||||
auto x = packet.data().position.x;
|
|
||||||
auto z = packet.data().position.z;
|
|
||||||
if( x < -448 && x > -453 )
|
|
||||||
{
|
|
||||||
// west
|
|
||||||
if( x > -451 )
|
|
||||||
{
|
|
||||||
// enter
|
|
||||||
auto p = makeActorControl( player.getId(), 242, 1174189454, 817758208, 67, 0 );
|
|
||||||
queueOutPacket( p );
|
|
||||||
player.addStatusEffectById( 1945, 0, player, 0, true );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// exit
|
|
||||||
auto p = makeActorControl( player.getId(), 242, 1182315916, 827392000, 68, 0 );
|
|
||||||
queueOutPacket( p );
|
|
||||||
player.removeSingleStatusEffectById( 1945 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ( x > 637 && x < 641 )
|
|
||||||
{
|
|
||||||
// east
|
|
||||||
if( z > -188 )
|
|
||||||
{
|
|
||||||
// enter
|
|
||||||
auto p = makeActorControl( player.getId(), 242, 3521816124, 1737687040, 69, 0 );
|
|
||||||
queueOutPacket( p );
|
|
||||||
player.addStatusEffectById( 1945, 0, player, 0, true );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// exit
|
|
||||||
auto p = makeActorControl( player.getId(), 242, 3517228601, 1749483520, 70, 0 );
|
|
||||||
queueOutPacket( p );
|
|
||||||
player.removeSingleStatusEffectById( 1945 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player.sendDebug( "Unknown dwarf house." );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue