mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-22 10:07:44 +00:00
Fixed housing opcodes
This commit is contained in:
parent
ee5c7179e9
commit
71e7ef982c
7 changed files with 26 additions and 7 deletions
|
@ -6673,7 +6673,7 @@ Sapphire::Data::Warp::Warp( uint32_t row_id, Sapphire::Data::ExdDataGenerated* e
|
||||||
{
|
{
|
||||||
auto row = exdData->m_WarpDat.get_row( row_id );
|
auto row = exdData->m_WarpDat.get_row( row_id );
|
||||||
level = exdData->getField< uint32_t >( row, 0 );
|
level = exdData->getField< uint32_t >( row, 0 );
|
||||||
placeName = exdData->getField< uint16_t >( row, 1 );
|
territoryType = exdData->getField< uint16_t >( row, 1 );
|
||||||
conditionSuccessEvent = exdData->getField< uint32_t >( row, 2 );
|
conditionSuccessEvent = exdData->getField< uint32_t >( row, 2 );
|
||||||
conditionFailEvent = exdData->getField< uint32_t >( row, 3 );
|
conditionFailEvent = exdData->getField< uint32_t >( row, 3 );
|
||||||
confirmEvent = exdData->getField< uint32_t >( row, 4 );
|
confirmEvent = exdData->getField< uint32_t >( row, 4 );
|
||||||
|
|
|
@ -5432,7 +5432,7 @@ struct VFX
|
||||||
struct Warp
|
struct Warp
|
||||||
{
|
{
|
||||||
uint32_t level;
|
uint32_t level;
|
||||||
uint16_t placeName;
|
uint16_t territoryType;
|
||||||
uint32_t conditionSuccessEvent;
|
uint32_t conditionSuccessEvent;
|
||||||
uint32_t conditionFailEvent;
|
uint32_t conditionFailEvent;
|
||||||
uint32_t confirmEvent;
|
uint32_t confirmEvent;
|
||||||
|
|
|
@ -330,14 +330,14 @@ namespace Sapphire::Network::Packets
|
||||||
InventoryEquipRecommendedItems = 0x0149, // updated 5.0
|
InventoryEquipRecommendedItems = 0x0149, // updated 5.0
|
||||||
|
|
||||||
ReqPlaceHousingItem = 0x014B, // updated 5.0
|
ReqPlaceHousingItem = 0x014B, // updated 5.0
|
||||||
BuildPresetHandler = 0x014F, // updated 5.0
|
BuildPresetHandler = 0x0150, // updated 5.0
|
||||||
|
|
||||||
TalkEventHandler = 0x0151, // updated 5.0
|
TalkEventHandler = 0x0151, // updated 5.0
|
||||||
EmoteEventHandler = 0x0152, // updated 5.0
|
EmoteEventHandler = 0x0152, // updated 5.0
|
||||||
WithinRangeEventHandler = 0x0153, // updated 5.0
|
WithinRangeEventHandler = 0x0153, // updated 5.0
|
||||||
OutOfRangeEventHandler = 0x0154, // updated 5.0
|
OutOfRangeEventHandler = 0x0154, // updated 5.0
|
||||||
EnterTeriEventHandler = 0x0155, // updated 5.0
|
EnterTeriEventHandler = 0x0155, // updated 5.0
|
||||||
ShopEventHandler = 0x0156, // updated 5.0
|
ShopEventHandler = 0x0157, // updated 5.0
|
||||||
|
|
||||||
ReturnEventHandler = 0x015A, // updated 5.0?
|
ReturnEventHandler = 0x015A, // updated 5.0?
|
||||||
TradeReturnEventHandler = 0x015B, // updated 5.0?
|
TradeReturnEventHandler = 0x015B, // updated 5.0?
|
||||||
|
|
|
@ -39,7 +39,7 @@ public:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// todo: this needs to be done properly and used queued zoning + aethernet animation
|
// todo: this needs to be done properly and used queued zoning + aethernet animation
|
||||||
// moving a player inside an event will crash the game so we end it hre
|
// moving a player inside an event will crash the game so we end it here
|
||||||
player.eventFinish( eventId, 1 );
|
player.eventFinish( eventId, 1 );
|
||||||
|
|
||||||
auto playerMgr = framework()->get< Sapphire::World::Manager::PlayerMgr >();
|
auto playerMgr = framework()->get< Sapphire::World::Manager::PlayerMgr >();
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
#include <ScriptObject.h>
|
#include <ScriptObject.h>
|
||||||
#include <Actor/Player.h>
|
#include <Actor/Player.h>
|
||||||
|
|
||||||
|
#include <datReader/DatCategories/bg/LgbTypes.h>
|
||||||
|
#include <datReader/DatCategories/bg/Lgb.h>
|
||||||
|
|
||||||
|
#include "Territory/InstanceObjectCache.h"
|
||||||
|
|
||||||
#include <Exd/ExdDataGenerated.h>
|
#include <Exd/ExdDataGenerated.h>
|
||||||
#include <Framework.h>
|
#include <Framework.h>
|
||||||
#include <Manager/PlayerMgr.h>
|
#include <Manager/PlayerMgr.h>
|
||||||
|
@ -28,11 +33,25 @@ public:
|
||||||
player.eventFinish( getId(), 1 );
|
player.eventFinish( getId(), 1 );
|
||||||
|
|
||||||
auto exdData = framework()->get< Sapphire::Data::ExdDataGenerated >();
|
auto exdData = framework()->get< Sapphire::Data::ExdDataGenerated >();
|
||||||
|
auto pPopRange = framework()->get< Sapphire::InstanceObjectCache >();
|
||||||
|
|
||||||
auto warp = exdData->get< Sapphire::Data::Warp >( getId() );
|
auto warp = exdData->get< Sapphire::Data::Warp >( getId() );
|
||||||
if( !warp )
|
if( !warp )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto playerMgr = framework()->get< Sapphire::World::Manager::PlayerMgr >();
|
auto playerMgr = framework()->get< Sapphire::World::Manager::PlayerMgr >();
|
||||||
|
|
||||||
|
auto pPop = pPopRange->getPopRange( warp->level, warp->level );
|
||||||
|
|
||||||
|
if( !pPop )
|
||||||
|
{
|
||||||
|
std::cout << "not found...";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cout << "found!!";
|
||||||
|
}
|
||||||
|
|
||||||
playerMgr->movePlayerToLandDestination( player, warp->level, result.param3 );
|
playerMgr->movePlayerToLandDestination( player, warp->level, result.param3 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -369,7 +369,7 @@ void Sapphire::Entity::Player::teleport( uint16_t aetheryteId, uint8_t type )
|
||||||
pos.x = pop->header.transform.translation.x;
|
pos.x = pop->header.transform.translation.x;
|
||||||
pos.y = pop->header.transform.translation.y;
|
pos.y = pop->header.transform.translation.y;
|
||||||
pos.z = pop->header.transform.translation.z;
|
pos.z = pop->header.transform.translation.z;
|
||||||
rot = pop->header.transform.rotation.y * -1;
|
rot = pop->header.transform.rotation.y;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -299,7 +299,7 @@ void Sapphire::Network::GameConnection::zoneLineHandler( FrameworkPtr pFw,
|
||||||
if( pPopRange )
|
if( pPopRange )
|
||||||
{
|
{
|
||||||
targetZone = pExitRange->data.destTerritoryType;
|
targetZone = pExitRange->data.destTerritoryType;
|
||||||
rotation = pPopRange->header.transform.rotation.y * -1.f;
|
rotation = pPopRange->header.transform.rotation.y;
|
||||||
targetPos = Common::FFXIVARR_POSITION3 { pPopRange->header.transform.translation.x,
|
targetPos = Common::FFXIVARR_POSITION3 { pPopRange->header.transform.translation.x,
|
||||||
pPopRange->header.transform.translation.y,
|
pPopRange->header.transform.translation.y,
|
||||||
pPopRange->header.transform.translation.z };
|
pPopRange->header.transform.translation.z };
|
||||||
|
|
Loading…
Add table
Reference in a new issue