1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 22:57:45 +00:00

Merge remote-tracking branch 'upstream/develop' into develop

This commit is contained in:
NotAdam 2018-07-08 19:45:37 +10:00
commit ae895ccfc0
9 changed files with 29 additions and 27 deletions

View file

@ -203,7 +203,7 @@ namespace Common {
Walking = 0x02, Walking = 0x02,
Strafing = 0x04, Strafing = 0x04,
Jumping = 0x10, Jumping = 0x10,
BackWalk = Walking | Strafing, BackWalk = 0x06,
}; };
enum MoveState : uint8_t enum MoveState : uint8_t

View file

@ -10,6 +10,7 @@
#include <boost/make_shared.hpp> #include <boost/make_shared.hpp>
#include <string.h> #include <string.h>
#include <memory> #include <memory>
#include <Util/Util.h>
#include "CommonNetwork.h" #include "CommonNetwork.h"
#include "PacketDef/Ipcs.h" #include "PacketDef/Ipcs.h"
@ -238,6 +239,7 @@ protected:
// The IPC type itself. // The IPC type itself.
m_ipcHdr.type = static_cast< ServerZoneIpcType >( m_data._ServerIpcType ); m_ipcHdr.type = static_cast< ServerZoneIpcType >( m_data._ServerIpcType );
m_ipcHdr.timestamp = Util::getTimeSeconds();
m_segHdr.size = sizeof( T ) + sizeof( FFXIVARR_IPC_HEADER ) + sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ); m_segHdr.size = sizeof( T ) + sizeof( FFXIVARR_IPC_HEADER ) + sizeof( FFXIVARR_PACKET_SEGMENT_HEADER );
}; };

View file

@ -91,7 +91,7 @@ struct FFXIVIpcCharList : FFXIVIpcBasePacket<LobbyCharList>
char nameChara[32]; char nameChara[32];
char nameServer[32]; char nameServer[32];
char nameServer1[32]; char nameServer1[32];
char charDetailJson[1030]; char charDetailJson[1028];
} charaDetails[2]; } charaDetails[2];
}; };

View file

@ -624,18 +624,20 @@ struct FFXIVIpcInitUI : FFXIVIpcBasePacket<InitUI>
unsigned short pvpWolfFoldWeeklyMatches; unsigned short pvpWolfFoldWeeklyMatches;
unsigned short pvpWolfFoldWeeklyVictories; unsigned short pvpWolfFoldWeeklyVictories;
unsigned short pvpStats[6]; unsigned short pvpStats[6];
unsigned short playerCommendations; unsigned short unknown74;
unsigned short pvpStats1; unsigned short pvpStats1;
unsigned char frontlineCampaigns[4]; unsigned char frontlineCampaigns[4];
unsigned short frontlineCampaignsWeekly; unsigned short frontlineCampaignsWeekly;
unsigned char currentRelic; unsigned char currentRelic;
unsigned char currentBook; unsigned char currentBook;
unsigned char masterCrafterMask; unsigned char masterCrafterMask;
unsigned char unknown69; unsigned char unknown81;
unsigned char unknown6A; unsigned char unknown82;
unsigned char unknown6B; unsigned char unknown83;
unsigned char unknown6C[4]; unsigned char unknown84[4];
unsigned char unknown70[34]; unsigned char unknown88[10];
unsigned short playerCommendations;
unsigned char unknown94[22];
unsigned short unknown18; unsigned short unknown18;
unsigned char maxLevel; unsigned char maxLevel;
unsigned char expansion; unsigned char expansion;

View file

@ -191,7 +191,6 @@ void Core::Network::GameConnection::getCharList( FFXIVARR_PACKET_RAW& packet, ui
charListPacket->data().counter = ( i * 4 ) + 1; charListPacket->data().counter = ( i * 4 ) + 1;
charListPacket->data().unknown4 = 128; charListPacket->data().unknown4 = 128;
} }
Packets::LobbyPacketContainer pRP( m_encKey ); Packets::LobbyPacketContainer pRP( m_encKey );
pRP.addPacket( charListPacket ); pRP.addPacket( charListPacket );
sendPacket( pRP ); sendPacket( pRP );

View file

@ -34,7 +34,8 @@ using namespace Core::Network::Packets::Server;
using namespace Core::Network::ActorControl; using namespace Core::Network::ActorControl;
Core::Entity::Chara::Chara( ObjKind type ) : Core::Entity::Chara::Chara( ObjKind type ) :
Actor( type ) Actor( type ),
m_targetId( INVALID_GAME_OBJECT_ID )
{ {
// initialize the free slot queue // initialize the free slot queue
for( uint8_t i = 0; i < MAX_STATUS_EFFECTS; i++ ) for( uint8_t i = 0; i < MAX_STATUS_EFFECTS; i++ )

View file

@ -68,8 +68,7 @@ Core::Entity::Player::Player() :
m_markedForRemoval( false ), m_markedForRemoval( false ),
m_mount( 0 ), m_mount( 0 ),
m_directorInitialized( false ), m_directorInitialized( false ),
m_onEnterEventDone( false ), m_onEnterEventDone( false )
m_bJumping( false )
{ {
m_id = 0; m_id = 0;
m_currentStance = Stance::Passive; m_currentStance = Stance::Passive;

View file

@ -595,13 +595,10 @@ public:
/*! checks if a spawn index is valid */ /*! checks if a spawn index is valid */
bool isObjSpawnIndexValid( uint8_t index ); bool isObjSpawnIndexValid( uint8_t index );
uint64_t m_lastMoveTime; uint64_t m_lastMoveTime;
uint8_t m_lastMoveflag; uint8_t m_lastMoveflag;
bool m_bJumping;
private: private:
uint32_t m_lastWrite; uint32_t m_lastWrite;
uint32_t m_lastPing; uint32_t m_lastPing;

View file

@ -190,13 +190,21 @@ void Core::Network::GameConnection::updatePositionHandler( const Core::Network::
//pLog->debug( std::to_string( moveState ) + " -- moveState " ); //pLog->debug( std::to_string( moveState ) + " -- moveState " );
//pLog->debug( std::to_string( moveType ) + " -- moveType " ); //pLog->debug( std::to_string( moveType ) + " -- moveType " );
if( moveType & MoveType::Running )
{
unk1 = 0x7F;
unk2 = 0x00;
unk4 = 0x3C;
}
if( moveType & MoveType::Strafing ) if( moveType & MoveType::Strafing )
{ {
unk2 = 0x40; unk2 = 0x40;
if( IPC_OP_019A.strafeRight == 1 ) unk1 = 0x7F;
unk1 = 0xbf; //if( IPC_OP_019A.strafeRight == 1 )
else // unk1 = 0xbf;
unk1 = 0x5f; //else
// unk1 = 0x5f;
unk4 = 0x3C; unk4 = 0x3C;
} }
@ -205,22 +213,16 @@ void Core::Network::GameConnection::updatePositionHandler( const Core::Network::
unk1 = 0x7F; unk1 = 0x7F;
unk2 = 0x02; unk2 = 0x02;
unk3 = 0x00; unk3 = 0x00;
unk4 = 0x0518; unk4 = 0x18;
} }
if( moveType & MoveType::BackWalk ) if( moveType & MoveType::Walking && moveType & MoveType::Strafing )
{ {
unk2 = 0x06; unk2 = 0x06;
unk1 = 0xFF; unk1 = 0xFF;
unk4 = 0x18; unk4 = 0x18;
} }
if( moveType & MoveType::Running )
{
unk1 = 0x7F;
unk4 = 0x3C;
}
if( moveType & MoveType::Jumping ) if( moveType & MoveType::Jumping )
{ {