mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-30 08:07:46 +00:00
Merge branch 'master' of https://github.com/DantestyleXD/Sapphire into Gridania_subquests
This commit is contained in:
commit
5a1812773d
45 changed files with 440 additions and 555 deletions
20
README.md
20
README.md
|
@ -17,25 +17,7 @@ Sapphire requires the following software:
|
|||
| Boost 1.63.0 | [Win32 precompiled binaries](https://sourceforge.net/projects/boost/files/boost-binaries/1.63.0/boost_1_63_0-msvc-14.0-32.exe/download) | Boost libraries from your distribution's package manager |
|
||||
| MySQL Server 5.7 | [Official Site](https://dev.mysql.com/downloads/mysql/) | MySQL server from your distribution's package manager |
|
||||
|
||||
**Windows**
|
||||
Set the environment variables ``BOOST_ROOT_DIR`` and ``BOOST_LIB_DIR`` to ``[boost main folder]`` and ``[boost main folder]/lib32-msvc-14.0`` respectively **or** copy your boost installation into the project's ``src/lib`` folder.
|
||||
|
||||
Visual Studio 2017 users: open `Visual Studio Installer` and ensure `Individual Components > SDKs, libraries, and frameworks > Windows Universal C Runtime` is installed. You may also need to install `Individual Components > Compilers, build tools, and runtimes > VC++ 2015.3 v140 toolset for desktop (x86, 64)`.
|
||||
|
||||
To enable [Edit and Continue](https://msdn.microsoft.com/en-us/library/esaeyddf.aspx) ensure you define `-DCMAKE_BUILD_TYPE="Debug"` when generating with CMake.
|
||||
|
||||
If you installed CMake outside of Visual Studio and have it in your `PATH` environment variable, navigate to Sapphire folder and `cmake -DCMAKE_BUILD_TYPE="Debug" && cmake --build .`.
|
||||
|
||||
Otherwise:
|
||||
* In *Visual Studio 2017*: Open the project via ``File`` > ``Open`` > ``Folder`` and wait, till CMake automatically finishes cache generation. Right click any CMakeLists.txt and select build to build a application.
|
||||
To configure debug startup parameters, select ``Debug and Launch settings``, the application you want to set up parameters for, and add a ``args`` json array containing your launch parameters in ``configurations``.
|
||||
If Visual Studio fails to generate a CMake Cache or does not show options to build, make sure that the newest version of it is installed and all environment variables are set correctly. Keep in mind that generating a cache can take a while on some machines.
|
||||
|
||||
The solution `Sapphire.sln` is also generated in the main Sapphire folder.
|
||||
|
||||
**Linux**
|
||||
`cmake . -DSAPPHIRE_BOOST_VER="your.boost.ver" && make -j JOBS` where `JOBS` is number of cores on your system.
|
||||
`-j JOBS` can be omitted if your system lacks resources (spoiler: your system probably lacks resources if running on 1GB RAM or lower, or if the build fails due to being out of memory)
|
||||
Please check the [wiki](https://github.com/SapphireMordred/Sapphire/wiki) for detailed installation/build instructions for your OS.
|
||||
|
||||
## Links
|
||||
|
||||
|
|
|
@ -553,6 +553,7 @@ namespace Common {
|
|||
AetherReductionDlg = 0x17D,
|
||||
|
||||
Unk6 = 0x19C,
|
||||
EObjAnimation = 0x19D,
|
||||
|
||||
SetTitle = 0x1F4,
|
||||
|
||||
|
@ -562,6 +563,7 @@ namespace Common {
|
|||
SetFavorite = 0x1FC,
|
||||
LearnTeleport = 0x1FD,
|
||||
|
||||
OpenRecommendationGuide = 0x200,
|
||||
ArmoryErrorMsg = 0x201,
|
||||
|
||||
AchievementPopup = 0x203,
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
/**
|
||||
* Structural definitions common to all FFXIV:ARR packets.
|
||||
*/
|
||||
#ifndef _CORE_NETWORK_PACKETS_COMMON_H
|
||||
#define _CORE_NETWORK_PACKETS_COMMON_H
|
||||
|
||||
|
@ -46,6 +43,8 @@ namespace Packets {
|
|||
*
|
||||
* 0 4 8 12 14 16
|
||||
* +-------------------------------+---------------+-------+-------+
|
||||
* | unknown_0 | unknown_8 |
|
||||
* +-------------------------------+---------------+-------+-------+
|
||||
* | timestamp | size | cType | count |
|
||||
* +---+---+-------+---------------+---------------+-------+-------+
|
||||
* | ? |CMP| ? | ? |
|
||||
|
@ -54,13 +53,10 @@ namespace Packets {
|
|||
*/
|
||||
struct FFXIVARR_PACKET_HEADER
|
||||
{
|
||||
|
||||
/** Unknown data, no actual use has been determined */
|
||||
uint64_t unknown_0;
|
||||
uint64_t unknown_8;
|
||||
/**
|
||||
* Represents the number of milliseconds since epoch that the packet was
|
||||
* sent.
|
||||
*/
|
||||
/** Represents the number of milliseconds since epoch that the packet was sent. */
|
||||
uint64_t timestamp;
|
||||
/** The size of the packet header and its payload */
|
||||
uint32_t size;
|
||||
|
@ -92,7 +88,7 @@ inline istream& operator>>(istream& is, FFXIVARR_PACKET_HEADER& hdr)
|
|||
*
|
||||
* 0 4 8 12 16
|
||||
* +---------------+---------------+---------------+-------+-------+
|
||||
* | size | source_actor | target_actor | type | ? |
|
||||
* | size | source_actor | target_actor | type | pad |
|
||||
* +---------------+---------------+---------------+-------+-------+
|
||||
* | |
|
||||
* : type-specific data of length, size, follows :
|
||||
|
@ -109,7 +105,7 @@ struct FFXIVARR_PACKET_SEGMENT_HEADER
|
|||
uint32_t target_actor;
|
||||
/** The segment type. (1, 2, 3, 7, 8, 9, 10) */
|
||||
uint16_t type;
|
||||
uint16_t _reserved_E;
|
||||
uint16_t padding;
|
||||
};
|
||||
|
||||
inline ostream& operator << ( ostream& os, const FFXIVARR_PACKET_SEGMENT_HEADER& hdr )
|
||||
|
@ -122,8 +118,6 @@ inline istream& operator>>(istream& is, FFXIVARR_PACKET_SEGMENT_HEADER& hdr)
|
|||
return is.read( reinterpret_cast< char* >( &hdr ), sizeof hdr );
|
||||
}
|
||||
|
||||
// TODO: Include structures for the individual packet segment types
|
||||
|
||||
template < int T > struct FFXIVIpcBasePacket
|
||||
{
|
||||
/** Creates a constant representing the IPC type */
|
||||
|
@ -142,7 +136,7 @@ struct FFXIVARR_PACKET_RAW
|
|||
*
|
||||
* 0 4 6 8 12 16
|
||||
* +-------+-------+------+----------+---------------+---------------+
|
||||
* | 14 00 | type | ?? | serverId | timestamp | ??? |
|
||||
* | 14 00 | type | pad | serverId | timestamp | pad1 |
|
||||
* +-------+-------+------+----------+---------------+---------------+
|
||||
* | |
|
||||
* : data :
|
||||
|
@ -153,10 +147,10 @@ struct FFXIVARR_IPC_HEADER
|
|||
{
|
||||
uint16_t reserved;
|
||||
uint16_t type;
|
||||
uint16_t unknown_2;
|
||||
uint16_t padding;
|
||||
uint16_t serverId;
|
||||
uint32_t timestamp;
|
||||
uint32_t unknown_C;
|
||||
uint32_t padding1;
|
||||
};
|
||||
|
||||
inline ostream& operator << ( ostream& os, const FFXIVARR_IPC_HEADER& hdr )
|
||||
|
@ -169,8 +163,6 @@ inline istream& operator>>(istream& is, FFXIVARR_IPC_HEADER& hdr)
|
|||
return is.read( reinterpret_cast< char* >( &hdr ), sizeof hdr );
|
||||
}
|
||||
|
||||
|
||||
|
||||
} /* Packets */
|
||||
} /* Network */
|
||||
} /* Core */
|
||||
|
|
|
@ -7,23 +7,24 @@
|
|||
#include <boost/format.hpp>
|
||||
#include "Util/Util.h"
|
||||
|
||||
Core::Network::Packets::GamePacket::GamePacket( uint16_t subType, uint16_t size, uint32_t id1, uint32_t id2, uint16_t type )
|
||||
Core::Network::Packets::GamePacket::GamePacket( uint16_t subType, uint16_t size,
|
||||
uint32_t id1, uint32_t id2, uint16_t type )
|
||||
{
|
||||
m_dataBuf = std::vector< uint8_t >( size );
|
||||
memset( &m_segHdr, 0, sizeof( m_segHdr ) );
|
||||
|
||||
setHeader( size, type, id1, id2, subType, 0x00 );
|
||||
|
||||
}
|
||||
|
||||
void Core::Network::Packets::GamePacket::setHeader( uint16_t size, uint16_t type, uint32_t id1, uint32_t id2, uint16_t subType, uint32_t unknown )
|
||||
void Core::Network::Packets::GamePacket::setHeader( uint16_t size, uint16_t type, uint32_t id1,
|
||||
uint32_t id2, uint16_t subType, uint32_t unknown )
|
||||
{
|
||||
|
||||
m_segHdr.size = size;
|
||||
m_segHdr.type = type;
|
||||
m_segHdr.source_actor = id1;
|
||||
m_segHdr.target_actor = id2;
|
||||
m_segHdr._reserved_E = 0x00;
|
||||
//m_segHdr._reserved_E = 0x00;
|
||||
m_subType = subType;
|
||||
|
||||
m_timeStamp = static_cast< uint32_t >( time( nullptr ) );
|
||||
|
@ -67,7 +68,10 @@ Core::Network::Packets::GamePacket::GamePacket( const Packets::FFXIVARR_PACKET_R
|
|||
m_segHdr = packetData.segHdr;
|
||||
m_dataBuf = std::vector< uint8_t >( m_segHdr.size );
|
||||
|
||||
memcpy( &m_dataBuf[0] + sizeof( Packets::FFXIVARR_PACKET_SEGMENT_HEADER ), &packetData.data[0], m_segHdr.size - sizeof( Packets::FFXIVARR_PACKET_SEGMENT_HEADER ) );
|
||||
memcpy( &m_dataBuf[0] + sizeof( Packets::FFXIVARR_PACKET_SEGMENT_HEADER ),
|
||||
&packetData.data[0],
|
||||
m_segHdr.size - sizeof( Packets::FFXIVARR_PACKET_SEGMENT_HEADER ) );
|
||||
|
||||
memcpy( &m_dataBuf[0], &m_segHdr, sizeof( Packets::FFXIVARR_PACKET_SEGMENT_HEADER ) );
|
||||
|
||||
m_subType = *reinterpret_cast< uint16_t* >( &m_dataBuf[0] + 0x12 );
|
||||
|
@ -88,7 +92,7 @@ Core::Network::Packets::GamePacket::~GamePacket()
|
|||
void Core::Network::Packets::GamePacket::savePacket()
|
||||
{
|
||||
char filename[20];
|
||||
sprintf( filename, "dump_0x%x.dat", m_subType );
|
||||
sprintf( filename, "dump_0x%x_%i.dat", m_subType, Util::getTimeMs() );
|
||||
FILE * fp = nullptr;
|
||||
fp = fopen( filename, "wb" );
|
||||
fwrite( &m_dataBuf[0], 1, m_segHdr.size, fp );
|
||||
|
|
|
@ -32,15 +32,15 @@ using ChatChannelPacket = GamePacketNew< T, ServerChatIpcType >;
|
|||
* The base implementation of a game packet. Needed for parsing packets.
|
||||
*/
|
||||
template < typename T1 >
|
||||
class GamePacketNewBase
|
||||
class FFXIVIpcPacketBase
|
||||
{
|
||||
public:
|
||||
virtual ~GamePacketNewBase() = default;
|
||||
virtual ~FFXIVIpcPacketBase() = default;
|
||||
/**
|
||||
* @brief Gets the IPC type of this packet. (Useful for determining the
|
||||
* type of a parsed packet.)
|
||||
*/
|
||||
virtual T1 ipcType( void ) = 0;
|
||||
virtual T1 ipcType() = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -50,7 +50,7 @@ public:
|
|||
* 32 byte header information.)
|
||||
*/
|
||||
template < typename T, typename T1 >
|
||||
class GamePacketNew : public GamePacketNewBase<T1>
|
||||
class GamePacketNew : public FFXIVIpcPacketBase< T1 >
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
@ -96,7 +96,7 @@ protected:
|
|||
};
|
||||
|
||||
public:
|
||||
virtual T1 ipcType( void )
|
||||
virtual T1 ipcType()
|
||||
{
|
||||
return static_cast< T1 >( m_data._ServerIpcType );
|
||||
};
|
||||
|
|
|
@ -5,14 +5,7 @@
|
|||
|
||||
using namespace Core::Network::Packets;
|
||||
|
||||
namespace Core
|
||||
{
|
||||
namespace Network
|
||||
{
|
||||
namespace Packets
|
||||
{
|
||||
PacketParseResult getHeader(
|
||||
const std::vector< uint8_t > &buffer,
|
||||
PacketParseResult Core::Network::Packets::getHeader( const std::vector< uint8_t > &buffer,
|
||||
const uint32_t offset,
|
||||
FFXIVARR_PACKET_HEADER &header )
|
||||
{
|
||||
|
@ -21,23 +14,18 @@ namespace Core
|
|||
// Check if we have enough bytes in the buffer.
|
||||
auto remainingBytes = buffer.size() - offset;
|
||||
if( remainingBytes < headerSize )
|
||||
{
|
||||
return Incomplete;
|
||||
}
|
||||
|
||||
// Copy packet header.
|
||||
memcpy( &header, buffer.data() + offset, headerSize );
|
||||
|
||||
if( !checkHeader(header) )
|
||||
{
|
||||
return Malformed;
|
||||
}
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
PacketParseResult getSegmentHeader(
|
||||
const std::vector< uint8_t > &buffer,
|
||||
PacketParseResult Core::Network::Packets::getSegmentHeader( const std::vector< uint8_t > &buffer,
|
||||
const uint32_t offset,
|
||||
FFXIVARR_PACKET_SEGMENT_HEADER &header )
|
||||
{
|
||||
|
@ -46,9 +34,7 @@ namespace Core
|
|||
// Check if we have enough bytes in the buffer.
|
||||
auto remainingBytes = buffer.size() - offset;
|
||||
if( remainingBytes < headerSize )
|
||||
{
|
||||
return Incomplete;
|
||||
}
|
||||
|
||||
// Copy segment header
|
||||
memcpy( &header, buffer.data() + offset, headerSize );
|
||||
|
@ -56,8 +42,7 @@ namespace Core
|
|||
return Success;
|
||||
}
|
||||
|
||||
PacketParseResult getPackets(
|
||||
const std::vector< uint8_t > &buffer,
|
||||
PacketParseResult Core::Network::Packets::getPackets( const std::vector< uint8_t > &buffer,
|
||||
const uint32_t offset,
|
||||
const FFXIVARR_PACKET_HEADER &packetHeader,
|
||||
std::vector< FFXIVARR_PACKET_RAW > &packets )
|
||||
|
@ -65,9 +50,7 @@ namespace Core
|
|||
// sanity check: check there's enough bytes in the buffer
|
||||
const auto bytesExpected = packetHeader.size - sizeof( struct FFXIVARR_PACKET_HEADER );
|
||||
if( buffer.size() - offset < bytesExpected )
|
||||
{
|
||||
return Incomplete;
|
||||
}
|
||||
|
||||
// Loop each message
|
||||
uint32_t count = 0;
|
||||
|
@ -79,9 +62,7 @@ namespace Core
|
|||
// Copy ipc packet message
|
||||
const auto packetResult = getPacket( buffer, offset + bytesProcessed, rawPacket );
|
||||
if( packetResult != Success )
|
||||
{
|
||||
return packetResult;
|
||||
}
|
||||
|
||||
// NOTE: isn't rawPacket is allocated on stack?
|
||||
// why is okay to do this?
|
||||
|
@ -95,31 +76,22 @@ namespace Core
|
|||
// sanity check: check if we processed all bytes.
|
||||
// this check can fail if size of messages don't add up to size reported from packet header.
|
||||
if( bytesExpected != bytesProcessed )
|
||||
{
|
||||
return Malformed;
|
||||
}
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
PacketParseResult getPacket(
|
||||
const std::vector< uint8_t > &buffer,
|
||||
const uint32_t offset,
|
||||
FFXIVARR_PACKET_RAW &packet
|
||||
)
|
||||
PacketParseResult Core::Network::Packets::getPacket( const std::vector< uint8_t > &buffer, const uint32_t offset,
|
||||
FFXIVARR_PACKET_RAW &packet )
|
||||
{
|
||||
// Copy segment header
|
||||
const auto headerResult = getSegmentHeader( buffer, offset, packet.segHdr );
|
||||
if( headerResult != Success )
|
||||
{
|
||||
return headerResult;
|
||||
}
|
||||
|
||||
// Check header sanity and it's size
|
||||
if( !checkSegmentHeader( packet.segHdr ) )
|
||||
{
|
||||
return Malformed;
|
||||
}
|
||||
|
||||
const auto dataOffset = offset + sizeof( struct FFXIVARR_PACKET_SEGMENT_HEADER );
|
||||
const auto dataSize = packet.segHdr.size;
|
||||
|
@ -131,33 +103,24 @@ namespace Core
|
|||
return Success;
|
||||
}
|
||||
|
||||
bool checkHeader(const FFXIVARR_PACKET_HEADER &header)
|
||||
bool Core::Network::Packets::checkHeader( const FFXIVARR_PACKET_HEADER &header )
|
||||
{
|
||||
// Max size of the packet is capped at 1MB for now.
|
||||
if( header.size > 1 * 1024 * 1024 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Max number of message is capped at 255 for now.
|
||||
if( header.count > 255 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool checkSegmentHeader(const FFXIVARR_PACKET_SEGMENT_HEADER &header)
|
||||
bool Core::Network::Packets::checkSegmentHeader( const FFXIVARR_PACKET_SEGMENT_HEADER &header )
|
||||
{
|
||||
// Max size of individual message is capped at 256KB for now.
|
||||
if( header.size > 256 * 1024 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,12 +2,10 @@
|
|||
#define _GAMEPACKETPARSER_H
|
||||
#include "CommonNetwork.h"
|
||||
|
||||
namespace Core
|
||||
{
|
||||
namespace Network
|
||||
{
|
||||
namespace Packets
|
||||
{
|
||||
namespace Core {
|
||||
namespace Network {
|
||||
namespace Packets {
|
||||
|
||||
enum PacketParseResult
|
||||
{
|
||||
/// Dissected game packet successfully
|
||||
|
@ -22,36 +20,25 @@ namespace Core
|
|||
|
||||
/// Read packet header from buffer with given offset.
|
||||
/// Buffer with given offset must be pointing to start of the new FFXIV packet.
|
||||
PacketParseResult getHeader(
|
||||
const std::vector< uint8_t > &buffer,
|
||||
const uint32_t offset,
|
||||
FFXIVARR_PACKET_HEADER &header
|
||||
);
|
||||
PacketParseResult getHeader( const std::vector< uint8_t > &buffer, const uint32_t offset,
|
||||
FFXIVARR_PACKET_HEADER &header );
|
||||
|
||||
/// Read packet header from buffer with given offset.
|
||||
/// Buffer with given offset must be pointing to start of FFXIVARR_PACKET_SEGMENT_HEADER data.
|
||||
/// Keep in mind that this function does check for data validity. Call checkSegmentHeader() if that's needed.
|
||||
PacketParseResult getSegmentHeader(
|
||||
const std::vector< uint8_t > &buffer,
|
||||
const uint32_t offset,
|
||||
FFXIVARR_PACKET_SEGMENT_HEADER &header
|
||||
);
|
||||
PacketParseResult getSegmentHeader( const std::vector< uint8_t > &buffer, const uint32_t offset,
|
||||
FFXIVARR_PACKET_SEGMENT_HEADER &header );
|
||||
|
||||
/// Read packets from the buffer with given offset.
|
||||
/// Buffer with given offset must be pointing to end of FFXIVARR_PACKET_HEADER data.
|
||||
PacketParseResult getPackets(
|
||||
const std::vector< uint8_t > &buffer,
|
||||
const uint32_t offset,
|
||||
PacketParseResult getPackets( const std::vector< uint8_t > &buffer, const uint32_t offset,
|
||||
const FFXIVARR_PACKET_HEADER &header,
|
||||
std::vector< Packets::FFXIVARR_PACKET_RAW > &packets );
|
||||
|
||||
/// Read single packet from the buffer with given offset.
|
||||
/// Buffer with an offset must be pointing to start of FFXIVARR_PACKET_SEGMENT_HEADER data.
|
||||
PacketParseResult getPacket(
|
||||
const std::vector< uint8_t > &buffer,
|
||||
const uint32_t offset,
|
||||
FFXIVARR_PACKET_RAW &packet
|
||||
);
|
||||
PacketParseResult getPacket( const std::vector< uint8_t > &buffer, const uint32_t offset,
|
||||
FFXIVARR_PACKET_RAW &packet );
|
||||
|
||||
bool checkHeader(const FFXIVARR_PACKET_HEADER &header);
|
||||
bool checkSegmentHeader(const FFXIVARR_PACKET_SEGMENT_HEADER &header);
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
#include <chrono>
|
||||
|
||||
|
||||
Core::Network::Packets::PacketContainer::PacketContainer( void )
|
||||
Core::Network::Packets::PacketContainer::PacketContainer()
|
||||
{
|
||||
memset( &m_ipcHdr, 0, sizeof( FFXIVARR_PACKET_HEADER ) );
|
||||
m_ipcHdr.size = sizeof( FFXIVARR_PACKET_HEADER );
|
||||
m_ipcHdr.count = 0;
|
||||
}
|
||||
|
||||
Core::Network::Packets::PacketContainer::~PacketContainer( void )
|
||||
Core::Network::Packets::PacketContainer::~PacketContainer()
|
||||
{
|
||||
m_entryList.clear();
|
||||
}
|
||||
|
|
|
@ -16,8 +16,8 @@ class GamePacket;
|
|||
class PacketContainer
|
||||
{
|
||||
public:
|
||||
PacketContainer( void );
|
||||
~PacketContainer( void );
|
||||
PacketContainer();
|
||||
~PacketContainer();
|
||||
|
||||
void addPacket( GamePacket pEntry );
|
||||
|
||||
|
|
|
@ -45,11 +45,10 @@ namespace Packets {
|
|||
enum ServerZoneIpcType : uint16_t
|
||||
{
|
||||
|
||||
// static opcode ( the ones that rarely if ever change )
|
||||
// static opcode ( the ones that rarely, if ever, change )
|
||||
Ping = 0x0065,
|
||||
Init = 0x0066,
|
||||
|
||||
//ActorSpawn = 0x0190, // DEPRECATED
|
||||
ActorFreeSpawn = 0x0191,
|
||||
InitZone = 0x019A,
|
||||
|
||||
|
@ -74,6 +73,7 @@ namespace Packets {
|
|||
CFRegistered = 0x00B8, // updated 4.1
|
||||
SocialRequestResponse = 0x00BB, // updated 4.1
|
||||
CancelAllianceForming = 0x00C6, // updated 4.2
|
||||
|
||||
Chat = 0x00F7, // updated 4.3
|
||||
SocialList = 0x00FD, // updated 4.3
|
||||
|
||||
|
@ -86,12 +86,13 @@ namespace Packets {
|
|||
CountdownInitiate = 0x0111, // updated 4.3
|
||||
CountdownCancel = 0x0112, // updated 4.3
|
||||
|
||||
BlackList = 0x00FF, // updated 4.2
|
||||
BlackList = 0x0115, // updated 4.3
|
||||
|
||||
LogMessage = 0x00D0,
|
||||
|
||||
LinkshellList = 0x0106, // updated 4.2
|
||||
SetCharacterFCInfo = 0x0114, // updated 4.2
|
||||
LinkshellList = 0x011C, // updated 4.3
|
||||
SetCharaFCTag = 0x013B, // updated 4.3
|
||||
SetFreeCompanyInfo = 0x013D, // updated 4.3
|
||||
|
||||
StatusEffectList = 0x014E, // updated 4.3
|
||||
Effect = 0x0151, // updated 4.3
|
||||
|
@ -106,11 +107,15 @@ namespace Packets {
|
|||
|
||||
ActorCast = 0x0178, // updated 4.3
|
||||
|
||||
PartyList = 0x017A, // updated 4.3
|
||||
HateList = 0x017B, // updated 4.3
|
||||
|
||||
ObjectSpawn = 0x017D, // updated 4.3
|
||||
ObjectDespawn = 0x017E, // updated 4.3
|
||||
UpdateClassInfo = 0x018A, // updated 4.3
|
||||
|
||||
SetLevelSync = 0x017F, // updated 4.3
|
||||
|
||||
InventoryActionAck = 0x0180, // updated 4.2 ?
|
||||
|
||||
InitUI = 0x0181, // updated 4.3
|
||||
PlayerStats = 0x0182, // updated 4.3
|
||||
|
@ -119,13 +124,14 @@ namespace Packets {
|
|||
PlayerClassInfo = 0x0185, // updated 4.3
|
||||
ModelEquip = 0x0186, // updated 4.3
|
||||
|
||||
UpdateClassInfo = 0x018A, // updated 4.3
|
||||
|
||||
ItemInfo = 0x0190, // updated 4.3
|
||||
ContainerInfo = 0x0192, // updated 4.3
|
||||
InventoryTransactionFinish = 0x0193, // updated 4.3
|
||||
InventoryTransaction = 0x0194, // updated 4.3
|
||||
CurrencyCrystalInfo = 0x0197, // updated 4.3
|
||||
|
||||
InventoryActionAck = 0x0180, // updated 4.2 ?
|
||||
UpdateInventorySlot = 0x0198, // updated 4.3
|
||||
|
||||
EventPlay = 0x01A6, // updated 4.3
|
||||
|
@ -136,21 +142,24 @@ namespace Packets {
|
|||
|
||||
EventLinkshell = 0x1169,
|
||||
|
||||
QuestMessage = 0x01CE, // updated 4.3
|
||||
QuestTracker = 0x01D3, // updated 4.3
|
||||
QuestActiveList = 0x01C3, // updated 4.3
|
||||
QuestUpdate = 0x01C4, // updated 4.3
|
||||
QuestCompleteList = 0x01C5, // updated 4.3
|
||||
|
||||
QuestFinish = 0x01C6, // updated 4.3
|
||||
MSQTrackerComplete = 0x01C7, // updated 4.3
|
||||
MSQTrackerProgress = 0x01C8, // updated 4.3
|
||||
|
||||
QuestActiveList = 0x01C3, // updated 4.3
|
||||
QuestUpdate = 0x01C4, // updated 4.3
|
||||
QuestCompleteList = 0x01C5, // updated 4.3
|
||||
QuestMessage = 0x01CE, // updated 4.3
|
||||
|
||||
QuestTracker = 0x01D3, // updated 4.3
|
||||
|
||||
Mount = 0x01E3, // updated 4.3
|
||||
|
||||
DirectorVars = 0x01E5, // updated 4.3
|
||||
|
||||
CFAvailableContents = 0x01FD, // updated 4.2
|
||||
|
||||
WeatherChange = 0x0200, // updated 4.3
|
||||
PlayerTitleList = 0x0201, // updated 4.3
|
||||
Discovery = 0x0202, // updated 4.3
|
||||
|
@ -159,13 +168,13 @@ namespace Packets {
|
|||
|
||||
EquipDisplayFlags = 0x0210, // updated 4.3
|
||||
|
||||
CFAvailableContents = 0x01FD, // updated 4.2
|
||||
DuelChallenge = 0x0277, // 4.2; this is responsible for opening the ui
|
||||
PerformNote = 0x0286, // updated 4.3
|
||||
|
||||
PrepareZoning = 0x0291, // updated 4.3
|
||||
ActorGauge = 0x0292, // updated 4.3
|
||||
|
||||
DuelChallenge = 0x0277, // 4.2; this is the responsible for opening an ui
|
||||
PerformNote = 0x0286, // updated 4.3
|
||||
|
||||
|
||||
// Unknown IPC types that still need to be sent
|
||||
// TODO: figure all these out properly
|
||||
|
@ -174,8 +183,6 @@ namespace Packets {
|
|||
|
||||
};
|
||||
|
||||
// TODO: Include structures for the individual packet segment types
|
||||
|
||||
/**
|
||||
* Client IPC Zone Type Codes.
|
||||
*/
|
||||
|
@ -199,6 +206,7 @@ namespace Packets {
|
|||
CFDutyInfoHandler = 0x0078, // updated 4.2
|
||||
|
||||
SocialReqSendHandler = 0x00AE, // updated 4.1
|
||||
CreateCrossWorldLS = 0x00AF, // updated 4.3
|
||||
|
||||
ChatHandler = 0x00D3, // updated 4.3
|
||||
|
||||
|
|
|
@ -611,7 +611,7 @@ struct FFXIVIpcInitUI : FFXIVIpcBasePacket<InitUI>
|
|||
{
|
||||
// plain C types for a bit until the packet is actually fixed.
|
||||
// makes conversion between different editors easier.
|
||||
__int64 contentId;
|
||||
uint64_t contentId;
|
||||
unsigned int unknown8;
|
||||
unsigned int unknownC;
|
||||
unsigned int charId;
|
||||
|
@ -621,137 +621,143 @@ struct FFXIVIpcInitUI : FFXIVIpcBasePacket<InitUI>
|
|||
unsigned int fishCaught;
|
||||
unsigned int useBaitCatalogId;
|
||||
unsigned int pvpWolfFoldMatches;
|
||||
unsigned __int16 pvpWolfFoldWeeklyMatches;
|
||||
unsigned __int16 pvpWolfFoldWeeklyVictories;
|
||||
unsigned __int16 pvpStats[6];
|
||||
unsigned __int16 playerCommendations;
|
||||
unsigned __int16 pvpStats1;
|
||||
unsigned __int8 frontlineCampaigns[4];
|
||||
unsigned __int16 frontlineCampaignsWeekly;
|
||||
unsigned __int8 currentRelic;
|
||||
unsigned __int8 currentBook;
|
||||
unsigned __int8 masterCrafterMask;
|
||||
unsigned __int8 unknown69;
|
||||
unsigned __int8 unknown6A;
|
||||
unsigned __int8 unknown6B;
|
||||
unsigned __int8 unknown6C[4];
|
||||
unsigned __int8 unknown50[34];
|
||||
unsigned __int16 unknown18;
|
||||
unsigned __int8 maxLevel;
|
||||
unsigned __int8 expansion;
|
||||
unsigned __int8 unknown76;
|
||||
unsigned __int8 race;
|
||||
unsigned __int8 tribe;
|
||||
unsigned __int8 gender;
|
||||
unsigned __int8 currentJob;
|
||||
unsigned __int8 currentClass;
|
||||
unsigned __int8 deity;
|
||||
unsigned __int8 namedayMonth;
|
||||
unsigned __int8 namedayDay;
|
||||
unsigned __int8 cityState;
|
||||
unsigned __int8 homepoint;
|
||||
unsigned __int8 unknown26;
|
||||
unsigned __int8 petHotBar;
|
||||
unsigned __int8 companionRank;
|
||||
unsigned __int8 companionStars;
|
||||
unsigned __int8 companionSp;
|
||||
unsigned __int8 companionUnk2B;
|
||||
unsigned __int8 companionColor;
|
||||
unsigned __int8 companionFavoFeed;
|
||||
unsigned __int8 companionUnk89;
|
||||
unsigned __int8 companionUnk90[5];
|
||||
unsigned __int16 unknown90[7];
|
||||
unsigned __int16 unknown9E;
|
||||
unsigned __int16 unknownA0;
|
||||
unsigned short pvpWolfFoldWeeklyMatches;
|
||||
unsigned short pvpWolfFoldWeeklyVictories;
|
||||
unsigned short pvpStats[6];
|
||||
unsigned short playerCommendations;
|
||||
unsigned short pvpStats1;
|
||||
unsigned char frontlineCampaigns[4];
|
||||
unsigned short frontlineCampaignsWeekly;
|
||||
unsigned char currentRelic;
|
||||
unsigned char currentBook;
|
||||
unsigned char masterCrafterMask;
|
||||
unsigned char unknown69;
|
||||
unsigned char unknown6A;
|
||||
unsigned char unknown6B;
|
||||
unsigned char unknown6C[4];
|
||||
unsigned char unknown70[34];
|
||||
unsigned short unknown18;
|
||||
unsigned char maxLevel;
|
||||
unsigned char expansion;
|
||||
unsigned char unknown;
|
||||
unsigned char race;
|
||||
unsigned char tribe;
|
||||
unsigned char gender;
|
||||
unsigned char currentJob;
|
||||
unsigned char currentClass;
|
||||
unsigned char deity;
|
||||
unsigned char namedayMonth;
|
||||
unsigned char namedayDay;
|
||||
unsigned char cityState;
|
||||
unsigned char homepoint;
|
||||
unsigned char unknown26;
|
||||
unsigned char petHotBar;
|
||||
unsigned char companionRank;
|
||||
unsigned char companionStars;
|
||||
unsigned char companionSp;
|
||||
unsigned char companionUnk2B;
|
||||
unsigned char companionColor;
|
||||
unsigned char companionFavoFeed;
|
||||
unsigned char companionUnk2E;
|
||||
unsigned char companionTimePassed[4];
|
||||
unsigned short unknown38[11];
|
||||
|
||||
unsigned int exp[25];
|
||||
unsigned __int8 unknown564[16];
|
||||
unsigned char unknown564[16];
|
||||
unsigned int pvpFrontlineOverall1st;
|
||||
unsigned int pvpFrontlineOverall2nd;
|
||||
unsigned int pvpFrontlineOverall3rd;
|
||||
unsigned __int8 relicBookCompletion1[4];
|
||||
unsigned __int16 levels[25];
|
||||
unsigned __int16 levelsPadding;
|
||||
unsigned __int16 unknown15C[8];
|
||||
unsigned __int16 fishingRecordsFish[26];
|
||||
unsigned __int16 fishingRecordsFishWeight[26];
|
||||
unsigned __int8 unknownMask554[44];
|
||||
unsigned __int8 companion_name[21];
|
||||
unsigned __int8 companionDefRank;
|
||||
unsigned __int8 companionAttRank;
|
||||
unsigned __int8 companionHealRank;
|
||||
unsigned __int8 mountGuideMask[16];
|
||||
unsigned char relicBookCompletion1[4];
|
||||
unsigned short levels[25];
|
||||
unsigned short levelsPadding;
|
||||
unsigned char unknown__[16];
|
||||
unsigned short fishingRecordsFish[26];
|
||||
unsigned short fishingRecordsFishWeight[26];
|
||||
unsigned char unknownMask554[44];
|
||||
|
||||
unsigned char companion_name[21];
|
||||
unsigned char companionDefRank;
|
||||
unsigned char companionAttRank;
|
||||
unsigned char companionHealRank;
|
||||
unsigned char mountGuideMask[16];
|
||||
char name[32];
|
||||
unsigned __int8 unknownOword[16];
|
||||
unsigned __int8 unknown258;
|
||||
unsigned __int8 unlockBitmask[64];
|
||||
unsigned __int8 aetheryte[17];
|
||||
unsigned __int8 discovery[421];
|
||||
unsigned __int8 howto[33];
|
||||
unsigned __int8 minions[38];
|
||||
unsigned __int8 chocoboTaxiMask[8];
|
||||
unsigned __int8 contentClearMask[111];
|
||||
unsigned __int8 contentClearPadding;
|
||||
unsigned __int16 unknown428[8];
|
||||
unsigned __int8 companionBardingMask[8];
|
||||
unsigned __int8 companionEquippedHead;
|
||||
unsigned __int8 companionEquippedBody;
|
||||
unsigned __int8 companionEquippedFeet;
|
||||
unsigned __int8 companionUnk4[4];
|
||||
unsigned __int8 companion_fields[11];
|
||||
unsigned __int8 fishingGuideMask[89];
|
||||
unsigned __int8 fishingSpotVisited[25];
|
||||
unsigned __int8 unknownMask4Padding;
|
||||
unsigned __int8 rankAmalJaa;
|
||||
unsigned __int8 rankSylph;
|
||||
unsigned __int8 rankKobold;
|
||||
unsigned __int8 rankSahagin;
|
||||
unsigned __int8 rankIxal;
|
||||
unsigned __int8 rankVanu;
|
||||
unsigned __int8 rankVath;
|
||||
unsigned __int8 rankMoogle;
|
||||
unsigned __int8 rankKojin;
|
||||
unsigned __int8 rankAnata;
|
||||
unsigned __int16 expAmalJaa;
|
||||
unsigned __int16 expSylph;
|
||||
unsigned __int16 expKobold;
|
||||
unsigned __int16 expSahagin;
|
||||
unsigned __int16 expIxal;
|
||||
unsigned __int16 expVanu;
|
||||
unsigned __int16 expVath;
|
||||
unsigned __int16 expMoogle;
|
||||
unsigned __int16 expKojin;
|
||||
unsigned __int16 expAnata;
|
||||
unsigned __int8 unknown596[10];
|
||||
unsigned __int16 unknown5A0[5];
|
||||
unsigned __int8 unknownMask59E[5];
|
||||
unsigned __int8 unknown5A3[18];
|
||||
unsigned __int8 unknownMask5C1[28];
|
||||
unsigned __int8 unknown_03411;
|
||||
unsigned char unknownOword[16];
|
||||
unsigned char unlockBitmask[64];
|
||||
unsigned char aetheryte[17];
|
||||
unsigned char discovery[421];
|
||||
unsigned char howto[33];
|
||||
unsigned char minions[38];
|
||||
unsigned char chocoboTaxiMask[8];
|
||||
unsigned char contentClearMask[111];
|
||||
unsigned char contentClearPadding;
|
||||
unsigned short unknown428[8];
|
||||
unsigned char companionBardingMask[8];
|
||||
unsigned char companionEquippedHead;
|
||||
unsigned char companionEquippedBody;
|
||||
unsigned char companionEquippedFeet;
|
||||
unsigned char companionUnk4[4];
|
||||
unsigned char companion_fields[11];
|
||||
|
||||
unsigned char fishingGuideMask[89];
|
||||
unsigned char fishingSpotVisited[25];
|
||||
|
||||
|
||||
unsigned char unknownMask4Padding;
|
||||
|
||||
unsigned char rankAmalJaa;
|
||||
unsigned char rankSylph;
|
||||
unsigned char rankKobold;
|
||||
unsigned char rankSahagin;
|
||||
unsigned char rankIxal;
|
||||
unsigned char rankVanu;
|
||||
unsigned char rankVath;
|
||||
unsigned char rankMoogle;
|
||||
unsigned char rankKojin;
|
||||
unsigned char rankAnata;
|
||||
unsigned short expAmalJaa;
|
||||
unsigned short expSylph;
|
||||
unsigned short expKobold;
|
||||
unsigned short expSahagin;
|
||||
unsigned short expIxal;
|
||||
unsigned short expVanu;
|
||||
unsigned short expVath;
|
||||
unsigned short expMoogle;
|
||||
unsigned short expKojin;
|
||||
unsigned short expAnata;
|
||||
unsigned char unknown596[10];
|
||||
unsigned short unknown5A0[5];
|
||||
unsigned char unknownMask59E[5];
|
||||
unsigned char unknown5A3[18];
|
||||
unsigned char unknownMask5C1[28];
|
||||
unsigned char unknown_03411;
|
||||
unsigned int unknownDword5E0;
|
||||
unsigned __int16 pvpFrontlineWeekly1st;
|
||||
unsigned __int16 pvpFrontlineWeekly2nd;
|
||||
unsigned __int16 pvpFrontlineWeekly3rd;
|
||||
unsigned __int8 relicBookCompletion2[8];
|
||||
unsigned __int8 sightseeingMask[26];
|
||||
unsigned __int16 unknown_XXX;
|
||||
unsigned __int8 unknown61E[20];
|
||||
unsigned __int8 unknown656[29];
|
||||
unsigned __int8 unknown63F[22];
|
||||
unsigned __int8 tripleTriadCards[28];
|
||||
unsigned __int8 unknown671[11];
|
||||
unsigned __int8 unknownMask67C[22];
|
||||
unsigned __int8 unknown692[3];
|
||||
unsigned __int8 orchestrionMask[40];
|
||||
unsigned __int8 hallOfNoviceCompleteMask[3];
|
||||
unsigned __int8 unknownMask6C0[11];
|
||||
unsigned __int8 unknownMask6CB[16];
|
||||
unsigned __int8 unknown6DB[14];
|
||||
unsigned __int8 unlockedRaids[28];
|
||||
unsigned __int8 unlockedDungeons[18];
|
||||
unsigned __int8 unlockedGuildhests[10];
|
||||
unsigned __int8 unlockedTrials[7];
|
||||
unsigned __int8 unlockedPvp[5];
|
||||
unsigned __int8 unknownMask72D[28];
|
||||
unsigned short pvpFrontlineWeekly1st;
|
||||
unsigned short pvpFrontlineWeekly2nd;
|
||||
unsigned short pvpFrontlineWeekly3rd;
|
||||
unsigned char relicBookCompletion2[8];
|
||||
unsigned char sightseeingMask[26];
|
||||
unsigned short unknown_XXX;
|
||||
|
||||
unsigned char unknown61E;
|
||||
unsigned char unknown61F[32];
|
||||
unsigned char unknown63F[22];
|
||||
unsigned char tripleTriadCards[28];
|
||||
unsigned char unknown671[11];
|
||||
unsigned char unknownMask67C[22];
|
||||
unsigned char unknown692[3];
|
||||
unsigned char orchestrionMask[40];
|
||||
unsigned char hallOfNoviceCompleteMask[3];
|
||||
unsigned char unknownMask6C0[11];
|
||||
unsigned char unknownMask6CB[16];
|
||||
unsigned char unknown6DB[14];
|
||||
unsigned char unlockedRaids[28];
|
||||
unsigned char unlockedDungeons[18];
|
||||
unsigned char unlockedGuildhests[10];
|
||||
unsigned char unlockedTrials[7];
|
||||
unsigned char unlockedPvp[5];
|
||||
unsigned char unknownMask72D[28];
|
||||
// unsigned char unknownMask749[18];
|
||||
//unsigned char unknown749[13];
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
#include <ScriptObject.h>
|
||||
#include <Zone/InstanceContent.h>
|
||||
|
||||
class TheWeaponsRefrainUltimate : public InstanceContentScript
|
||||
{
|
||||
public:
|
||||
TheWeaponsRefrainUltimate() : InstanceContentScript( 30067 )
|
||||
{ }
|
||||
|
||||
void onInit( InstanceContentPtr instance ) override
|
||||
{
|
||||
instance->registerEObj( "unknown_0", 2009480, 0, 4, { 94.011192f, 0.000000f, 107.700996f }, 1.000000f, 0.000000f );
|
||||
instance->registerEObj( "sgvf_w1fz_b1432", 2007457, 7372735, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, 0.000000f );
|
||||
instance->registerEObj( "unknown_1", 2007457, 7373056, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, 0.000000f );
|
||||
instance->registerEObj( "unknown_2", 2009481, 0, 4, { 101.695602f, 0.000000f, 101.959396f }, 1.000000f, 0.000000f );
|
||||
instance->registerEObj( "unknown_3", 2007457, 7237754, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, 0.000000f );
|
||||
instance->registerEObj( "unknown_4", 2007457, 7237753, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, 0.000000f );
|
||||
instance->registerEObj( "unknown_5", 2007457, 7237756, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, 0.000000f );
|
||||
instance->registerEObj( "unknown_6", 2007457, 7237755, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, 0.000000f );
|
||||
instance->registerEObj( "Entrance", 2007457, 7343478, 5, { 100.000000f, 0.000000f, 116.000000f }, 1.000000f, 0.000000f );
|
||||
// States -> vf_lock_on vf_lock_of
|
||||
instance->registerEObj( "Exit", 2000139, 0, 4, { 100.000000f, 0.000000f, 85.000000f }, 1.000000f, 0.000000f );
|
||||
instance->registerEObj( "unknown_7", 2007457, 7538258, 4, { 100.160004f, 0.000000f, 101.443398f }, 1.000000f, 0.000000f );
|
||||
}
|
||||
|
||||
void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
};
|
|
@ -9,7 +9,6 @@
|
|||
#include "Actor/Player.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
using namespace Core::Entity;
|
||||
using namespace Core::Common;
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
#define _ACTIONCOLLISION_H
|
||||
|
||||
#include <Common.h>
|
||||
#include "Action.h"
|
||||
|
||||
#include "Forwards.h"
|
||||
|
||||
namespace Core {
|
||||
namespace Data
|
||||
{
|
||||
struct Action;
|
||||
}
|
||||
|
||||
namespace Entity {
|
||||
|
||||
enum class TargetFilter
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _ACTIONMOUNT_H_
|
||||
#define _ACTIONMOUNT_H_
|
||||
|
||||
#include "../Forwards.h"
|
||||
#include "Forwards.h"
|
||||
#include "Action.h"
|
||||
|
||||
namespace Core {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _ACTIONTELEPORT_H_
|
||||
#define _ACTIONTELEPORT_H_
|
||||
|
||||
#include "../Forwards.h"
|
||||
#include "Forwards.h"
|
||||
#include "Action.h"
|
||||
|
||||
namespace Core {
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
|
||||
#include "Actor/Player.h"
|
||||
#include "Event/EventHandler.h"
|
||||
|
||||
#include "EventAction.h"
|
||||
#include "Framework.h"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include <Common.h>
|
||||
|
||||
#include "../Forwards.h"
|
||||
#include "Forwards.h"
|
||||
#include "Action.h"
|
||||
|
||||
namespace Core {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _EVENTITEMACTION_H_
|
||||
#define _EVENTITEMACTION_H_
|
||||
|
||||
#include "../Forwards.h"
|
||||
#include "Forwards.h"
|
||||
#include "Action.h"
|
||||
|
||||
namespace Core {
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
#include "Actor.h"
|
||||
|
||||
#include <Network/PacketContainer.h>
|
||||
#include <Network/GamePacket.h>
|
||||
|
||||
#include <Util/Util.h>
|
||||
#include <Util/UtilMath.h>
|
||||
|
||||
#include "Forwards.h"
|
||||
#include "Action/Action.h"
|
||||
#include "Action/ActionCollision.h"
|
||||
|
||||
|
@ -19,8 +18,6 @@
|
|||
|
||||
#include "ServerZone.h"
|
||||
#include "Session.h"
|
||||
#include "Zone/Zone.h"
|
||||
|
||||
|
||||
#include "Zone/TerritoryMgr.h"
|
||||
|
||||
|
@ -28,11 +25,6 @@
|
|||
|
||||
#include "Math/CalcBattle.h"
|
||||
|
||||
#include "ServerZone.h"
|
||||
#include "Session.h"
|
||||
#include "Actor.h"
|
||||
#include "Player.h"
|
||||
|
||||
#include "Framework.h"
|
||||
|
||||
extern Core::Framework g_fw;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#include <Util/UtilMath.h>
|
||||
#include <Network/PacketContainer.h>
|
||||
#include <Exd/ExdDataGenerated.h>
|
||||
#include <Network/GamePacket.h>
|
||||
|
||||
#include "Forwards.h"
|
||||
#include "Action/Action.h"
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
#include <Logging/Logger.h>
|
||||
#include <Network/GamePacket.h>
|
||||
#include <Network/GamePacketNew.h>
|
||||
#include <Network/CommonNetwork.h>
|
||||
#include <Network/PacketDef/Zone/ServerZoneDef.h>
|
||||
#include <Network/PacketContainer.h>
|
||||
#include <Util/UtilMath.h>
|
||||
|
||||
using namespace Core::Common;
|
||||
|
|
|
@ -10,10 +10,11 @@ namespace Entity
|
|||
class EventObject : public Actor
|
||||
{
|
||||
public:
|
||||
EventObject( uint32_t actorId, uint32_t objectId, uint32_t gimmickId, uint8_t initialState, Common::FFXIVARR_POSITION3 pos,
|
||||
float rotation, const std::string& givenName = "none" );
|
||||
EventObject( uint32_t actorId, uint32_t objectId, uint32_t gimmickId, uint8_t initialState,
|
||||
Common::FFXIVARR_POSITION3 pos, float rotation, const std::string& givenName = "none" );
|
||||
|
||||
using OnTalkEventHandler = std::function< void( Entity::Player&, Entity::EventObjectPtr, InstanceContentPtr, uint64_t ) >;
|
||||
using OnTalkEventHandler = std::function< void( Entity::Player&, Entity::EventObjectPtr,
|
||||
InstanceContentPtr, uint64_t ) >;
|
||||
|
||||
uint32_t getGimmickId() const;
|
||||
void setGimmickId( uint32_t gimmickId );
|
||||
|
|
|
@ -30,11 +30,6 @@
|
|||
|
||||
#include "Script/ScriptMgr.h"
|
||||
|
||||
#include "Inventory/Item.h"
|
||||
#include "Inventory/Inventory.h"
|
||||
|
||||
#include "Event/EventHandler.h"
|
||||
|
||||
#include "Action/Action.h"
|
||||
#include "Action/ActionTeleport.h"
|
||||
#include "Action/EventAction.h"
|
||||
|
|
|
@ -16,12 +16,7 @@
|
|||
#include "Action/EventAction.h"
|
||||
#include "Action/EventItemAction.h"
|
||||
|
||||
#include "Event/EventHandler.h"
|
||||
|
||||
#include "Zone/Zone.h"
|
||||
|
||||
#include "Player.h"
|
||||
#include "Forwards.h"
|
||||
#include "ServerZone.h"
|
||||
#include "Framework.h"
|
||||
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
#include "Network/PacketWrappers/QuestMessagePacket.h"
|
||||
|
||||
#include "Session.h"
|
||||
#include "Inventory/Inventory.h"
|
||||
#include "Player.h"
|
||||
#include "Framework.h"
|
||||
|
||||
extern Core::Framework g_fw;
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#include <set>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <Common.h>
|
||||
#include <Network/GamePacket.h>
|
||||
|
@ -19,11 +17,7 @@
|
|||
#include "Zone/TerritoryMgr.h"
|
||||
#include "Zone/Zone.h"
|
||||
|
||||
#include "Inventory/Inventory.h"
|
||||
|
||||
#include "Player.h"
|
||||
#include "ServerZone.h"
|
||||
#include "Forwards.h"
|
||||
#include "Framework.h"
|
||||
|
||||
extern Core::Framework g_fw;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include <Common.h>
|
||||
#include <Version.h>
|
||||
#include <Network/GamePacketNew.h>
|
||||
#include <Network/CommonNetwork.h>
|
||||
#include <Util/UtilMath.h>
|
||||
#include <Network/PacketContainer.h>
|
||||
#include <Logging/Logger.h>
|
||||
|
@ -25,7 +24,6 @@
|
|||
#include "Script/ScriptMgr.h"
|
||||
#include "Script/NativeScriptMgr.h"
|
||||
|
||||
#include "Actor/Player.h"
|
||||
#include "Actor/EventObject.h"
|
||||
|
||||
#include "Zone/Zone.h"
|
||||
|
@ -34,7 +32,6 @@
|
|||
|
||||
#include "ServerZone.h"
|
||||
|
||||
#include "StatusEffect/StatusEffect.h"
|
||||
#include "Session.h"
|
||||
#include "Framework.h"
|
||||
|
||||
|
|
|
@ -69,12 +69,6 @@ namespace Core
|
|||
EVENT_TABLE_GAME = 24
|
||||
};
|
||||
|
||||
enum EventFinishState
|
||||
{
|
||||
UNLOCK = 1,
|
||||
KEEPLOCK = 0
|
||||
};
|
||||
|
||||
enum DamageType
|
||||
{
|
||||
STD_DAMAGE = 0X03,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _EVENT_H
|
||||
#define _EVENT_H
|
||||
|
||||
#include "../Forwards.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
namespace Core {
|
||||
namespace Event {
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#include <Common.h>
|
||||
#include <Exd/ExdDataGenerated.h>
|
||||
#include <boost/range/algorithm/remove_if.hpp>
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
|
||||
#include "Framework.h"
|
||||
#include "EventHelper.h"
|
||||
#include "EventHandler.h"
|
||||
#include <boost/range/algorithm/remove_if.hpp>
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
|
||||
|
||||
extern Core::Framework g_fw;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <boost/algorithm/clamp.hpp>
|
||||
|
||||
#include <Network/PacketDef/Zone/ServerZoneDef.h>
|
||||
#include <Common.h>
|
||||
|
||||
#include <Exd/ExdDataGenerated.h>
|
||||
#include <Logging/Logger.h>
|
||||
#include <Database/DatabaseDef.h>
|
||||
|
@ -12,8 +12,6 @@
|
|||
#include "Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
|
||||
#include "Forwards.h"
|
||||
#include "Inventory.h"
|
||||
#include "ItemContainer.h"
|
||||
#include "Item.h"
|
||||
#include "Framework.h"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define INVENTORY_H_
|
||||
#include <map>
|
||||
#include <Common.h>
|
||||
#include "../Forwards.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
namespace Core
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include <Common.h>
|
||||
|
||||
#include "../Forwards.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
namespace Core
|
||||
{
|
||||
|
|
|
@ -4,8 +4,11 @@
|
|||
#include <Network/CommonNetwork.h>
|
||||
#include <Util/Util.h>
|
||||
#include <Logging/Logger.h>
|
||||
|
||||
#include <Network/Acceptor.h>
|
||||
#include <Network/PacketContainer.h>
|
||||
#include <Network/GamePacketParser.h>
|
||||
#include <Network/GamePacket.h>
|
||||
|
||||
#include "Zone/Zone.h"
|
||||
|
||||
|
@ -13,8 +16,6 @@
|
|||
|
||||
#include "DebugCommand/DebugCommandHandler.h"
|
||||
|
||||
#include "Actor/Player.h"
|
||||
|
||||
#include "GameConnection.h"
|
||||
#include "ServerZone.h"
|
||||
#include "Session.h"
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
#define GAMECONNECTION_H
|
||||
|
||||
#include <Network/Connection.h>
|
||||
#include <Network/Acceptor.h>
|
||||
|
||||
#include <Network/CommonNetwork.h>
|
||||
#include <Network/GamePacket.h>
|
||||
//#include <Network/GamePacket.h>
|
||||
#include <Util/LockedQueue.h>
|
||||
|
||||
#include "Forwards.h"
|
||||
|
@ -13,7 +13,9 @@
|
|||
|
||||
namespace Core {
|
||||
namespace Network {
|
||||
|
||||
namespace Packets {
|
||||
class GamePacket;
|
||||
}
|
||||
enum ConnectionType : uint8_t
|
||||
{
|
||||
Zone = 1,
|
||||
|
|
|
@ -25,10 +25,6 @@
|
|||
|
||||
#include "DebugCommand/DebugCommandHandler.h"
|
||||
|
||||
#include "Actor/Player.h"
|
||||
|
||||
#include "Inventory/Inventory.h"
|
||||
|
||||
#include "Event/EventHelper.h"
|
||||
|
||||
#include "Action/Action.h"
|
||||
|
|
|
@ -15,9 +15,6 @@
|
|||
#include "Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "Network/PacketWrappers/PlayerStateFlagsPacket.h"
|
||||
|
||||
#include "Actor/Player.h"
|
||||
|
||||
#include "Forwards.h"
|
||||
#include "Framework.h"
|
||||
#include "Session.h"
|
||||
|
||||
|
|
|
@ -19,14 +19,12 @@
|
|||
|
||||
#include "Script/ScriptMgr.h"
|
||||
|
||||
#include "Actor/Player.h"
|
||||
|
||||
#include "Event/EventHelper.h"
|
||||
|
||||
#include "Zone/InstanceContent.h"
|
||||
|
||||
#include "Session.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
#include "Framework.h"
|
||||
|
||||
extern Core::Framework g_fw;
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <Network/PacketContainer.h>
|
||||
|
||||
#include <unordered_map>
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#include "Network/GameConnection.h"
|
||||
|
||||
|
@ -16,9 +15,7 @@
|
|||
#include "Zone/TerritoryMgr.h"
|
||||
#include "Zone/Zone.h"
|
||||
#include "Zone/InstanceContent.h"
|
||||
#include "Zone/ZonePosition.h"
|
||||
|
||||
#include "Network/GameConnection.h"
|
||||
#include "Network/PacketWrappers/InitUIPacket.h"
|
||||
#include "Network/PacketWrappers/PingPacket.h"
|
||||
#include "Network/PacketWrappers/MoveActorPacket.h"
|
||||
|
@ -31,20 +28,7 @@
|
|||
#include "Network/PacketWrappers/EventFinishPacket.h"
|
||||
#include "Network/PacketWrappers/PlayerStateFlagsPacket.h"
|
||||
|
||||
#include "DebugCommand/DebugCommandHandler.h"
|
||||
|
||||
#include "Actor/Player.h"
|
||||
|
||||
#include "Inventory/Inventory.h"
|
||||
|
||||
#include "Event/EventHelper.h"
|
||||
|
||||
#include "Action/Action.h"
|
||||
#include "Action/ActionTeleport.h"
|
||||
|
||||
#include "Session.h"
|
||||
#include "ServerZone.h"
|
||||
#include "Forwards.h"
|
||||
#include "Framework.h"
|
||||
|
||||
extern Core::Framework g_fw;
|
||||
|
|
|
@ -17,11 +17,10 @@
|
|||
|
||||
#include "DebugCommand/DebugCommandHandler.h"
|
||||
#include "Actor/Player.h"
|
||||
#include "Inventory/Inventory.h"
|
||||
|
||||
#include "Session.h"
|
||||
#include "ServerZone.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
#include "Framework.h"
|
||||
|
||||
extern Core::Framework g_fw;
|
||||
|
|
|
@ -7,10 +7,7 @@
|
|||
#include <Network/PacketContainer.h>
|
||||
#include <Network/PacketDef/Chat/ServerChatDef.h>
|
||||
#include <Database/DatabaseDef.h>
|
||||
#include <Database/DbWorkerPool.h>
|
||||
#include <Database/CharaDbConnection.h>
|
||||
|
||||
#include <boost/format.hpp>
|
||||
#include <unordered_map>
|
||||
#include "Network/GameConnection.h"
|
||||
|
||||
|
@ -32,10 +29,6 @@
|
|||
|
||||
#include "DebugCommand/DebugCommandHandler.h"
|
||||
|
||||
#include "Actor/Player.h"
|
||||
|
||||
#include "Inventory/Inventory.h"
|
||||
|
||||
#include "Event/EventHelper.h"
|
||||
|
||||
#include "Action/Action.h"
|
||||
|
@ -55,9 +48,10 @@ using namespace Core::Network::Packets::Server;
|
|||
void Core::Network::GameConnection::fcInfoReqHandler( const Packets::GamePacket& inPacket,
|
||||
Entity::Player& player )
|
||||
{
|
||||
GamePacketPtr pPe( new GamePacket( 0xDD, 0x78, player.getId(), player.getId() ) );
|
||||
pPe->setValAt< uint8_t >( 0x48, 0x01 );
|
||||
queueOutPacket( pPe );
|
||||
// TODO: use new packet struct for this
|
||||
//GamePacketPtr pPe( new GamePacket( 0xDD, 0x78, player.getId(), player.getId() ) );
|
||||
//pPe->setValAt< uint8_t >( 0x48, 0x01 );
|
||||
//queueOutPacket( pPe );
|
||||
}
|
||||
|
||||
void Core::Network::GameConnection::setSearchInfoHandler( const Packets::GamePacket& inPacket,
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
|
||||
#include "DebugCommand/DebugCommandHandler.h"
|
||||
|
||||
#include "Actor/Player.h"
|
||||
|
||||
#include "Action/Action.h"
|
||||
#include "Action/ActionCast.h"
|
||||
#include "Action/ActionMount.h"
|
||||
|
@ -27,7 +25,6 @@
|
|||
#include "Script/ScriptMgr.h"
|
||||
|
||||
#include "Session.h"
|
||||
#include "Forwards.h"
|
||||
#include "Framework.h"
|
||||
|
||||
extern Core::Framework g_fw;
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include <Version.h>
|
||||
#include <Logging/Logger.h>
|
||||
#include <Config/XMLConfig.h>
|
||||
#include <Version.h>
|
||||
|
||||
#include <MySqlBase.h>
|
||||
#include <Connection.h>
|
||||
|
@ -26,15 +25,12 @@
|
|||
|
||||
#include "Zone/TerritoryMgr.h"
|
||||
|
||||
#include "DebugCommand/DebugCommandHandler.h"
|
||||
|
||||
#include "Script/ScriptMgr.h"
|
||||
#include "Linkshell/LinkshellMgr.h"
|
||||
|
||||
#include "Forwards.h"
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#include <boost/make_shared.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <thread>
|
||||
|
||||
#include "Framework.h"
|
||||
|
@ -335,15 +331,6 @@ void Core::ServerZone::removeSession( uint32_t sessionId )
|
|||
m_sessionMapById.erase( sessionId );
|
||||
}
|
||||
|
||||
void Core::ServerZone::updateSession( uint32_t id )
|
||||
{
|
||||
std::lock_guard< std::mutex > lock( m_sessionMutex );
|
||||
auto it = m_sessionMapById.find( id );
|
||||
|
||||
if( it != m_sessionMapById.end() )
|
||||
it->second->loadPlayer();
|
||||
}
|
||||
|
||||
Core::SessionPtr Core::ServerZone::getSession( uint32_t id )
|
||||
{
|
||||
//std::lock_guard<std::mutex> lock( m_sessionMutex );
|
||||
|
@ -373,14 +360,6 @@ void Core::ServerZone::removeSession( std::string playerName )
|
|||
m_sessionMapByName.erase( playerName );
|
||||
}
|
||||
|
||||
void Core::ServerZone::updateSession( std::string playerName )
|
||||
{
|
||||
std::lock_guard< std::mutex > lock( m_sessionMutex );
|
||||
auto it = m_sessionMapByName.find( playerName );
|
||||
|
||||
if( it != m_sessionMapByName.end() )
|
||||
it->second->loadPlayer();
|
||||
}
|
||||
|
||||
bool Core::ServerZone::isRunning() const
|
||||
{
|
||||
|
|
|
@ -27,8 +27,6 @@ namespace Core {
|
|||
|
||||
SessionPtr getSession( uint32_t id );
|
||||
SessionPtr getSession( std::string playerName );
|
||||
void updateSession( uint32_t id );
|
||||
void updateSession( std::string playerName );
|
||||
|
||||
size_t getSessionCount() const;
|
||||
|
||||
|
@ -38,7 +36,6 @@ namespace Core {
|
|||
|
||||
void printBanner() const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
uint16_t m_port;
|
||||
|
|
Loading…
Add table
Reference in a new issue