mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-01 00:27:44 +00:00
add festival support
This commit is contained in:
parent
8f52a024ea
commit
6e12c74e78
6 changed files with 35 additions and 1 deletions
|
@ -635,6 +635,8 @@ namespace Common {
|
||||||
|
|
||||||
GearSetEquipMsg = 0x321,
|
GearSetEquipMsg = 0x321,
|
||||||
|
|
||||||
|
DisableCurrentFestival = 0x386,
|
||||||
|
|
||||||
ToggleOrchestrionUnlock = 0x396,
|
ToggleOrchestrionUnlock = 0x396,
|
||||||
Dismount = 0x3a0
|
Dismount = 0x3a0
|
||||||
};
|
};
|
||||||
|
|
|
@ -600,7 +600,7 @@ struct FFXIVIpcInitZone : FFXIVIpcBasePacket<InitZone>
|
||||||
uint8_t weatherId;
|
uint8_t weatherId;
|
||||||
uint8_t bitmask;
|
uint8_t bitmask;
|
||||||
uint16_t unknown5;
|
uint16_t unknown5;
|
||||||
uint16_t unknown6;
|
uint16_t festivalId;
|
||||||
uint16_t unknown7;
|
uint16_t unknown7;
|
||||||
uint32_t unknown8;
|
uint32_t unknown8;
|
||||||
Common::FFXIVARR_POSITION3 pos;
|
Common::FFXIVARR_POSITION3 pos;
|
||||||
|
|
|
@ -1632,6 +1632,7 @@ void Player::sendZonePackets()
|
||||||
initZonePacket.data().weatherId = static_cast< uint8_t >( getCurrentZone()->getCurrentWeather() );
|
initZonePacket.data().weatherId = static_cast< uint8_t >( getCurrentZone()->getCurrentWeather() );
|
||||||
initZonePacket.data().bitmask = 0x1;
|
initZonePacket.data().bitmask = 0x1;
|
||||||
initZonePacket.data().unknown5 = 0x2A;
|
initZonePacket.data().unknown5 = 0x2A;
|
||||||
|
initZonePacket.data().festivalId = getCurrentZone()->getCurrentFestival();
|
||||||
initZonePacket.data().pos.x = getPos().x;
|
initZonePacket.data().pos.x = getPos().x;
|
||||||
initZonePacket.data().pos.y = getPos().y;
|
initZonePacket.data().pos.y = getPos().y;
|
||||||
initZonePacket.data().pos.z = getPos().z;
|
initZonePacket.data().pos.z = getPos().z;
|
||||||
|
|
|
@ -762,4 +762,19 @@ void Core::DebugCommandHandler::instance( char* data, Entity::Player &player, bo
|
||||||
{
|
{
|
||||||
player.exitInstance();
|
player.exitInstance();
|
||||||
}
|
}
|
||||||
|
else if( subCommand == "festival" )
|
||||||
|
{
|
||||||
|
uint32_t festivalId;
|
||||||
|
sscanf( params.c_str(), "%d", &festivalId );
|
||||||
|
|
||||||
|
player.getCurrentZone()->setCurrentFestival( static_cast< uint16_t >( festivalId ) );
|
||||||
|
}
|
||||||
|
else if( subCommand == "disablefestival" )
|
||||||
|
{
|
||||||
|
Network::Packets::ZoneChannelPacket< Network::Packets::Server::FFXIVIpcActorControl143 > actorControl( player.getId() );
|
||||||
|
actorControl.data().category = Core::Common::ActorControlType::DisableCurrentFestival;
|
||||||
|
player.queuePacket( actorControl );
|
||||||
|
|
||||||
|
player.getCurrentZone()->setCurrentFestival( 0 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,7 @@ Zone::Zone()
|
||||||
, m_currentWeather( static_cast< uint8_t >( Common::Weather::FairSkies ) )
|
, m_currentWeather( static_cast< uint8_t >( Common::Weather::FairSkies ) )
|
||||||
, m_weatherOverride( 0 )
|
, m_weatherOverride( 0 )
|
||||||
, m_lastMobUpdate( 0 )
|
, m_lastMobUpdate( 0 )
|
||||||
|
, m_currentFestivalId( 0 )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,6 +100,16 @@ uint8_t Zone::getCurrentWeather() const
|
||||||
return m_currentWeather;
|
return m_currentWeather;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint16_t Zone::getCurrentFestival() const
|
||||||
|
{
|
||||||
|
return m_currentFestivalId;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Zone::setCurrentFestival( uint16_t festivalId )
|
||||||
|
{
|
||||||
|
m_currentFestivalId = festivalId;
|
||||||
|
}
|
||||||
|
|
||||||
CellCache* Zone::getCellCacheList( uint32_t cellx, uint32_t celly )
|
CellCache* Zone::getCellCacheList( uint32_t cellx, uint32_t celly )
|
||||||
{
|
{
|
||||||
assert( cellx < _sizeX );
|
assert( cellx < _sizeX );
|
||||||
|
|
|
@ -50,6 +50,8 @@ protected:
|
||||||
|
|
||||||
uint64_t m_lastMobUpdate;
|
uint64_t m_lastMobUpdate;
|
||||||
|
|
||||||
|
uint16_t m_currentFestivalId;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Zone();
|
Zone();
|
||||||
|
|
||||||
|
@ -65,6 +67,9 @@ public:
|
||||||
|
|
||||||
uint8_t getCurrentWeather() const;
|
uint8_t getCurrentWeather() const;
|
||||||
|
|
||||||
|
uint16_t getCurrentFestival() const;
|
||||||
|
void setCurrentFestival( uint16_t festivalId );
|
||||||
|
|
||||||
CellCache* getCellCacheList( uint32_t cellx, uint32_t celly );
|
CellCache* getCellCacheList( uint32_t cellx, uint32_t celly );
|
||||||
|
|
||||||
CellCache* getCellCacheAndCreate( uint32_t cellx, uint32_t celly );
|
CellCache* getCellCacheAndCreate( uint32_t cellx, uint32_t celly );
|
||||||
|
|
Loading…
Add table
Reference in a new issue