1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-25 14:07:46 +00:00

Simplification of packet templates

This commit is contained in:
Mordred 2017-11-21 18:43:09 +01:00
parent 0cdb94f371
commit 9825ab9e9f
35 changed files with 114 additions and 107 deletions

View file

@ -169,6 +169,8 @@ inline istream& operator>>(istream& is, FFXIVARR_IPC_HEADER& hdr)
return is.read(reinterpret_cast<char*>(&hdr), sizeof hdr);
}
} /* Packets */
} /* Network */
} /* Core */

View file

@ -22,6 +22,12 @@ class GamePacketNew;
template <typename T, typename T1>
std::ostream& operator<< ( std::ostream& os, const GamePacketNew<T, T1>& packet );
template< class T >
using ZoneChannelPacket = GamePacketNew< T, ServerZoneIpcType >;
template< class T >
using ChatChannelPacket = GamePacketNew< T, ServerChatIpcType >;
/**
* The base implementation of a game packet. Needed for parsing packets.
*/

View file

@ -50,7 +50,7 @@ void Core::Action::ActionCast::onStart()
m_pSource->getAsPlayer()->sendDebug( "onStart()" );
m_startTime = Util::getTimeMs();
GamePacketNew< FFXIVIpcActorCast, ServerZoneIpcType > castPacket( m_pSource->getId() );
ZoneChannelPacket< FFXIVIpcActorCast > castPacket( m_pSource->getId() );
castPacket.data().action_id = m_id;
castPacket.data().skillType = Common::SkillType::Normal;

View file

@ -49,7 +49,7 @@ void Core::Action::ActionMount::onStart()
m_pSource->getAsPlayer()->sendDebug( "ActionMount::onStart()" );
m_startTime = Util::getTimeMs();
GamePacketNew< FFXIVIpcActorCast, ServerZoneIpcType > castPacket( m_pSource->getId() );
ZoneChannelPacket< FFXIVIpcActorCast > castPacket( m_pSource->getId() );
castPacket.data().action_id = m_id;
castPacket.data().skillType = Common::SkillType::MountSkill;
@ -74,7 +74,7 @@ void Core::Action::ActionMount::onFinish()
pPlayer->unsetStateFlag( PlayerStateFlag::Casting );
pPlayer->sendStateFlags();
GamePacketNew< FFXIVIpcEffect, ServerZoneIpcType > effectPacket(pPlayer->getId());
ZoneChannelPacket< FFXIVIpcEffect > effectPacket(pPlayer->getId());
effectPacket.data().targetId = pPlayer->getId();
effectPacket.data().actionAnimationId = m_id;
effectPacket.data().unknown_62 = 13; // Affects displaying action name next to number in floating text

View file

@ -45,7 +45,7 @@ void Core::Action::ActionTeleport::onStart()
m_startTime = Util::getTimeMs();
GamePacketNew< FFXIVIpcActorCast, ServerZoneIpcType > castPacket( m_pSource->getId() );
ZoneChannelPacket< FFXIVIpcActorCast > castPacket( m_pSource->getId() );
castPacket.data().action_id = 5;
castPacket.data().unknown = 1;
@ -83,7 +83,7 @@ void Core::Action::ActionTeleport::onFinish()
pPlayer->setZoningType( Common::ZoneingType::Teleport );
GamePacketNew< FFXIVIpcEffect, ServerZoneIpcType > effectPacket( pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcEffect > effectPacket( pPlayer->getId() );
effectPacket.data().targetId = pPlayer->getId();
effectPacket.data().actionAnimationId = 5;
//effectPacket.data().unknown_3 = 1;

View file

@ -628,7 +628,7 @@ void Core::Entity::Actor::autoAttack( ActorPtr pTarget )
uint32_t damage = 10 + rand() % 12;
uint32_t variation = 0 + rand() % 4;
GamePacketNew< FFXIVIpcEffect, ServerZoneIpcType > effectPacket( getId() );
ZoneChannelPacket< FFXIVIpcEffect > effectPacket( getId() );
effectPacket.data().targetId = pTarget->getId();
effectPacket.data().actionAnimationId = 0x366;
effectPacket.data().unknown_2 = variation;
@ -671,7 +671,7 @@ void Core::Entity::Actor::handleScriptSkill( uint32_t type, uint32_t actionId, u
// Todo: Effect packet generator. 90% of this is basically setting params and it's basically unreadable.
// Prepare packet. This is seemingly common for all packets in the action handler.
GamePacketNew< FFXIVIpcEffect, ServerZoneIpcType > effectPacket( getId() );
ZoneChannelPacket< FFXIVIpcEffect > effectPacket( getId() );
effectPacket.data().targetId = pTarget.getId();
effectPacket.data().actionAnimationId = actionId;
effectPacket.data().unknown_62 = 1; // Affects displaying action name next to number in floating text

View file

@ -125,7 +125,7 @@ void Core::Entity::BattleNpc::spawn( Core::Entity::PlayerPtr pTarget )
//pTarget->queuePacket( spawnPacket );
GamePacketNew< FFXIVIpcNpcSpawn, ServerZoneIpcType > spawnPacket( getId(), pTarget->getId() );
ZoneChannelPacket< FFXIVIpcNpcSpawn > spawnPacket( getId(), pTarget->getId() );
spawnPacket.data().pos.x = m_pos.x;
@ -223,14 +223,14 @@ void Core::Entity::BattleNpc::setOwner( Core::Entity::PlayerPtr pPlayer )
if( pPlayer != nullptr )
{
GamePacketNew< FFXIVIpcActorOwner, ServerZoneIpcType > setOwnerPacket( getId(), pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcActorOwner > setOwnerPacket( getId(), pPlayer->getId() );
setOwnerPacket.data().type = 0x01;
setOwnerPacket.data().actorId = pPlayer->getId();
sendToInRangeSet( setOwnerPacket );
}
else
{
GamePacketNew< FFXIVIpcActorOwner, ServerZoneIpcType > setOwnerPacket(getId(), INVALID_GAME_OBJECT_ID );
ZoneChannelPacket< FFXIVIpcActorOwner > setOwnerPacket(getId(), INVALID_GAME_OBJECT_ID );
setOwnerPacket.data().type = 0x01;
setOwnerPacket.data().actorId = INVALID_GAME_OBJECT_ID;
sendToInRangeSet( setOwnerPacket );

View file

@ -200,7 +200,7 @@ uint64_t Core::Entity::Player::getOnlineStatusMask() const
void Core::Entity::Player::prepareZoning( uint16_t targetZone, bool fadeOut, uint8_t fadeOutTime, uint16_t animation )
{
GamePacketNew< FFXIVIpcPrepareZoning, ServerZoneIpcType > preparePacket( getId() );
ZoneChannelPacket< FFXIVIpcPrepareZoning > preparePacket( getId() );
preparePacket.data().targetZone = targetZone;
preparePacket.data().fadeOutTime = fadeOutTime;
preparePacket.data().animation = animation;
@ -273,7 +273,7 @@ bool Core::Entity::Player::isAutoattackOn() const
void Core::Entity::Player::sendStats()
{
GamePacketNew< FFXIVIpcPlayerStats, ServerZoneIpcType > statPacket( getId() );
ZoneChannelPacket< FFXIVIpcPlayerStats > statPacket( getId() );
statPacket.data().strength = m_baseStats.str;
statPacket.data().dexterity = m_baseStats.dex;
statPacket.data().vitality = m_baseStats.vit;
@ -390,7 +390,7 @@ void Core::Entity::Player::setZone( uint32_t zoneId )
m_pCurrentZone = pZone;
m_pCurrentZone->pushActor( shared_from_this() );
GamePacketNew< FFXIVIpcInit, ServerZoneIpcType > initPacket( getId() );
ZoneChannelPacket< FFXIVIpcInit > initPacket( getId() );
initPacket.data().charId = getId();
queuePacket( initPacket );
@ -411,7 +411,7 @@ void Core::Entity::Player::setZone( uint32_t zoneId )
// only initialize the UI if the player in fact just logged in.
if( isLogin() )
{
GamePacketNew< FFXIVIpcCFAvailableContents, ServerZoneIpcType > contentFinderList( getId() );
ZoneChannelPacket< FFXIVIpcCFAvailableContents > contentFinderList( getId() );
for( auto i = 0; i < sizeof( contentFinderList.data().contents ); i++ )
{
// unlock all contents for now
@ -422,14 +422,14 @@ void Core::Entity::Player::setZone( uint32_t zoneId )
Server::InitUIPacket initUIPacket( pPlayer );
queuePacket( initUIPacket );
GamePacketNew< FFXIVIpcPlayerClassInfo, ServerZoneIpcType > classInfoPacket( getId() );
ZoneChannelPacket< FFXIVIpcPlayerClassInfo > classInfoPacket( getId() );
classInfoPacket.data().classId = static_cast< uint8_t >( getClass() );
classInfoPacket.data().unknown = 1;
classInfoPacket.data().level = getLevel();
classInfoPacket.data().level1 = getLevel();
queuePacket( classInfoPacket );
GamePacketNew< FFXIVGCAffiliation, ServerZoneIpcType > gcAffPacket( getId() );
ZoneChannelPacket< FFXIVGCAffiliation > gcAffPacket( getId() );
gcAffPacket.data().gcId = m_gc;
gcAffPacket.data().gcRank[0] = m_gcRank[0];
gcAffPacket.data().gcRank[1] = m_gcRank[1];
@ -437,7 +437,7 @@ void Core::Entity::Player::setZone( uint32_t zoneId )
queuePacket( gcAffPacket );
}
GamePacketNew< FFXIVIpcInitZone, ServerZoneIpcType > initZonePacket( getId() );
ZoneChannelPacket< FFXIVIpcInitZone > initZonePacket( getId() );
initZonePacket.data().zoneId = getCurrentZone()->getLayoutId();
initZonePacket.data().weatherId = static_cast< uint8_t >( getCurrentZone()->getCurrentWeather() );
initZonePacket.data().bitmask = 0x1;
@ -449,10 +449,10 @@ void Core::Entity::Player::setZone( uint32_t zoneId )
if( isLogin() )
{
GamePacketNew< FFXIVARR_IPC_UNK322, ServerZoneIpcType > unk322( getId() );
ZoneChannelPacket< FFXIVARR_IPC_UNK322 > unk322( getId() );
queuePacket( unk322 );
GamePacketNew< FFXIVARR_IPC_UNK320, ServerZoneIpcType > unk320( getId() );
ZoneChannelPacket< FFXIVARR_IPC_UNK320 > unk320( getId() );
queuePacket( unk320 );
}
@ -677,7 +677,7 @@ void Core::Entity::Player::gainLevel()
m_hp = getMaxHp();
m_mp = getMaxMp();
GamePacketNew< FFXIVIpcStatusEffectList, ServerZoneIpcType > effectListPacket( getId() );
ZoneChannelPacket< FFXIVIpcStatusEffectList > effectListPacket( getId() );
effectListPacket.data().classId = static_cast< uint8_t > ( getClass() );
effectListPacket.data().classId1 = static_cast< uint8_t > ( getClass() );
effectListPacket.data().level = getLevel();
@ -692,7 +692,7 @@ void Core::Entity::Player::gainLevel()
getLevel(), getLevel() - 1 ), true );
GamePacketNew< FFXIVIpcUpdateClassInfo, ServerZoneIpcType > classInfoPacket( getId() );
ZoneChannelPacket< FFXIVIpcUpdateClassInfo > classInfoPacket( getId() );
classInfoPacket.data().classId = static_cast< uint8_t > ( getClass() );
classInfoPacket.data().classId1 = static_cast< uint8_t > ( getClass() );
classInfoPacket.data().level = getLevel();
@ -782,7 +782,7 @@ void Core::Entity::Player::setClassJob( Core::Common::ClassJob classJob )
m_tp = 0;
GamePacketNew< FFXIVIpcPlayerClassInfo, ServerZoneIpcType > classInfoPacket( getId() );
ZoneChannelPacket< FFXIVIpcPlayerClassInfo > classInfoPacket( getId() );
classInfoPacket.data().classId = static_cast< uint8_t >( getClass() );
classInfoPacket.data().level = getLevel();
queuePacket( classInfoPacket );
@ -921,7 +921,7 @@ void Core::Entity::Player::setGc( uint8_t gc )
{
m_gc = gc;
GamePacketNew< FFXIVGCAffiliation, ServerZoneIpcType > gcAffPacket( getId() );
ZoneChannelPacket< FFXIVGCAffiliation > gcAffPacket( getId() );
gcAffPacket.data().gcId = m_gc;
gcAffPacket.data().gcRank[0] = m_gcRank[0];
gcAffPacket.data().gcRank[1] = m_gcRank[1];
@ -933,7 +933,7 @@ void Core::Entity::Player::setGcRankAt( uint8_t index, uint8_t rank )
{
m_gcRank[index] = rank;
GamePacketNew< FFXIVGCAffiliation, ServerZoneIpcType > gcAffPacket( getId() );
ZoneChannelPacket< FFXIVGCAffiliation > gcAffPacket( getId() );
gcAffPacket.data().gcId = m_gc;
gcAffPacket.data().gcRank[0] = m_gcRank[0];
gcAffPacket.data().gcRank[1] = m_gcRank[1];
@ -1028,7 +1028,7 @@ void Core::Entity::Player::update( int64_t currTime )
}
else
{
GamePacketNew< FFXIVIpcActorSetPos, ServerZoneIpcType > setActorPosPacket( getId() );
ZoneChannelPacket< FFXIVIpcActorSetPos > setActorPosPacket( getId() );
setActorPosPacket.data().r16 = Math::Util::floatToUInt16Rot( m_queuedZoneing->m_targetRotation );
setActorPosPacket.data().waitForLoad = 0x04;
setActorPosPacket.data().x = targetPos.x;
@ -1109,7 +1109,7 @@ void Core::Entity::Player::freePlayerSpawnId( uint32_t actorId )
m_playerIdToSpawnIdMap.erase( actorId );
m_freeSpawnIdQueue.push( spawnId );
GamePacketNew< FFXIVIpcActorFreeSpawn, ServerZoneIpcType > freeActorSpawnPacket( getId() );
ZoneChannelPacket< FFXIVIpcActorFreeSpawn > freeActorSpawnPacket( getId() );
freeActorSpawnPacket.data().actorId = actorId;
freeActorSpawnPacket.data().spawnId = spawnId;
queuePacket( freeActorSpawnPacket );
@ -1380,7 +1380,7 @@ void Core::Entity::Player::initHateSlotQueue()
void Core::Entity::Player::sendHateList()
{
GamePacketNew< FFXIVIpcHateList, ServerZoneIpcType > hateListPacket( getId() );
ZoneChannelPacket< FFXIVIpcHateList > hateListPacket( getId() );
hateListPacket.data().numEntries = m_actorIdTohateSlotMap.size();
auto it = m_actorIdTohateSlotMap.begin();
for( int32_t i = 0; it != m_actorIdTohateSlotMap.end(); ++it, i++ )
@ -1437,7 +1437,7 @@ void Core::Entity::Player::setTitle( uint16_t titleId )
void Core::Entity::Player::setEquipDisplayFlags( uint8_t state )
{
m_equipDisplayFlags = state;
GamePacketNew< FFXIVIpcEquipDisplayFlags, ServerZoneIpcType > paramPacket( getId() );
ZoneChannelPacket< FFXIVIpcEquipDisplayFlags > paramPacket( getId() );
paramPacket.data().bitmask = m_equipDisplayFlags;
sendToInRangeSet( paramPacket, true );
}
@ -1453,7 +1453,7 @@ void Core::Entity::Player::mount( uint32_t id )
sendToInRangeSet( ActorControlPacket142( getId(), ActorControlType::SetStatus, static_cast< uint8_t >( Entity::Actor::ActorStatus::Mounted )), true );
sendToInRangeSet( ActorControlPacket143( getId(), 0x39e, 12 ), true ); //?
GamePacketNew< FFXIVIpcMount, ServerZoneIpcType > mountPacket( getId() );
ZoneChannelPacket< FFXIVIpcMount > mountPacket( getId() );
mountPacket.data().id = id;
sendToInRangeSet( mountPacket, true );
}
@ -1486,7 +1486,7 @@ void Core::Entity::Player::autoAttack( ActorPtr pTarget )
getClass() == ClassJob::Bard ||
getClass() == ClassJob::Archer )
{
GamePacketNew< FFXIVIpcEffect, ServerZoneIpcType > effectPacket(getId());
ZoneChannelPacket< FFXIVIpcEffect > effectPacket(getId());
effectPacket.data().targetId = pTarget->getId();
effectPacket.data().actionAnimationId = 8;
// effectPacket.data().unknown_2 = variation;
@ -1507,7 +1507,7 @@ void Core::Entity::Player::autoAttack( ActorPtr pTarget )
else
{
GamePacketNew< FFXIVIpcEffect, ServerZoneIpcType > effectPacket(getId());
ZoneChannelPacket< FFXIVIpcEffect > effectPacket(getId());
effectPacket.data().targetId = pTarget->getId();
effectPacket.data().actionAnimationId = 7;
// effectPacket.data().unknown_2 = variation;
@ -1576,7 +1576,7 @@ void Core::Entity::Player::setOpeningSequence( uint8_t seq )
void Core::Entity::Player::setEorzeaTimeOffset( uint64_t timestamp )
{
// TODO: maybe change to persistent?
GamePacketNew< FFXIVIpcEorzeaTimeOffset, ServerZoneIpcType > packet ( getId() );
ZoneChannelPacket< FFXIVIpcEorzeaTimeOffset > packet ( getId() );
packet.data().timestamp = timestamp;
// Send to single player

View file

@ -130,7 +130,7 @@ void Core::Entity::Player::addCurrency( uint8_t type, uint32_t amount )
if( !m_pInventory->addCurrency( static_cast< Inventory::CurrencyType >( type ), amount ) )
return;
GamePacketNew< FFXIVIpcUpdateInventorySlot, ServerZoneIpcType > invUpPacket( getId() );
ZoneChannelPacket< FFXIVIpcUpdateInventorySlot > invUpPacket( getId() );
invUpPacket.data().containerId = Inventory::InventoryType::Currency;
invUpPacket.data().catalogId = 1;
invUpPacket.data().quantity = m_pInventory->getCurrency( static_cast< Inventory::CurrencyType >( type ) );
@ -144,7 +144,7 @@ void Core::Entity::Player::removeCurrency( uint8_t type, uint32_t amount )
if( !m_pInventory->removeCurrency( static_cast< Inventory::CurrencyType >( type ), amount ) )
return;
GamePacketNew< FFXIVIpcUpdateInventorySlot, ServerZoneIpcType > invUpPacket( getId() );
ZoneChannelPacket< FFXIVIpcUpdateInventorySlot > invUpPacket( getId() );
invUpPacket.data().containerId = Inventory::InventoryType::Currency;
invUpPacket.data().catalogId = 1;
invUpPacket.data().quantity = m_pInventory->getCurrency( static_cast< Inventory::CurrencyType >( type ) );
@ -164,7 +164,7 @@ void Core::Entity::Player::addCrystal( uint8_t type, uint32_t amount )
if( !m_pInventory->addCrystal( static_cast< Inventory::CrystalType >( type ), amount ) )
return;
GamePacketNew< FFXIVIpcUpdateInventorySlot, ServerZoneIpcType > invUpPacket( getId() );
ZoneChannelPacket< FFXIVIpcUpdateInventorySlot > invUpPacket( getId() );
invUpPacket.data().containerId = Inventory::InventoryType::Crystal;
invUpPacket.data().catalogId = static_cast< uint8_t >( type ) + 1;
invUpPacket.data().quantity = m_pInventory->getCrystal( static_cast< Inventory::CrystalType >( type ) );
@ -180,7 +180,7 @@ void Core::Entity::Player::removeCrystal( uint8_t type, uint32_t amount )
if( !m_pInventory->removeCrystal( static_cast< Inventory::CrystalType >( type ), amount ) )
return;
GamePacketNew< FFXIVIpcUpdateInventorySlot, ServerZoneIpcType > invUpPacket( getId() );
ZoneChannelPacket< FFXIVIpcUpdateInventorySlot > invUpPacket( getId() );
invUpPacket.data().containerId = Inventory::InventoryType::Crystal;
invUpPacket.data().catalogId = static_cast< uint8_t >( type ) + 1;
invUpPacket.data().quantity = m_pInventory->getCrystal( static_cast< Inventory::CrystalType >( type ) );

View file

@ -44,13 +44,13 @@ void Core::Entity::Player::removeQuest( uint16_t questId )
if( ( idx != -1 ) && ( m_activeQuests[idx] != nullptr ) )
{
GamePacketNew< FFXIVIpcQuestUpdate, ServerZoneIpcType > questUpdatePacket( getId() );
ZoneChannelPacket< FFXIVIpcQuestUpdate > questUpdatePacket( getId() );
questUpdatePacket.data().slot = idx;
questUpdatePacket.data().questInfo.c.questId = 0;
questUpdatePacket.data().questInfo.c.sequence = 0xFF;
queuePacket( questUpdatePacket );
GamePacketNew< FFXIVIpcQuestFinish, ServerZoneIpcType > questFinishPacket( getId() );
ZoneChannelPacket< FFXIVIpcQuestFinish > questFinishPacket( getId() );
questFinishPacket.data().questId = questId;
questFinishPacket.data().flag1 = 1;
questFinishPacket.data().flag2 = 1;
@ -865,7 +865,7 @@ void Core::Entity::Player::updateQuest( uint16_t questId, uint8_t sequence )
{
uint8_t index = getQuestIndex( questId );
auto pNewQuest = m_activeQuests[index];
GamePacketNew< FFXIVIpcQuestUpdate, ServerZoneIpcType > pe_qa( getId() );
ZoneChannelPacket< FFXIVIpcQuestUpdate > pe_qa( getId() );
pNewQuest->c.sequence = sequence;
pe_qa.data().slot = index;
pe_qa.data().questInfo = *pNewQuest;
@ -895,7 +895,7 @@ void Core::Entity::Player::updateQuest( uint16_t questId, uint8_t sequence )
m_questIdToQuestIdx[questId] = idx;
m_questIdxToQuestId[idx] = questId;
GamePacketNew< FFXIVIpcQuestUpdate, ServerZoneIpcType > pe_qa( getId() );
ZoneChannelPacket< FFXIVIpcQuestUpdate > pe_qa( getId() );
pe_qa.data().slot = idx;
pe_qa.data().questInfo = *pNewQuest;
queuePacket( pe_qa );
@ -917,7 +917,7 @@ void Core::Entity::Player::updateQuest( uint16_t questId, uint8_t sequence )
void Core::Entity::Player::sendQuestTracker()
{
GamePacketNew< FFXIVIpcQuestTracker, ServerZoneIpcType > trackerPacket( getId() );
ZoneChannelPacket< FFXIVIpcQuestTracker > trackerPacket( getId() );
for( int32_t ii = 0; ii < 5; ii++ )
{
@ -962,7 +962,7 @@ void Core::Entity::Player::setQuestTracker( uint16_t index, int16_t flag )
void Core::Entity::Player::sendQuestInfo()
{
GamePacketNew< FFXIVIpcQuestActiveList, ServerZoneIpcType > pe_qa( getId() );
ZoneChannelPacket< FFXIVIpcQuestActiveList > pe_qa( getId() );
for( int32_t i = 0; i < 30; i++ )
{
@ -978,7 +978,7 @@ void Core::Entity::Player::sendQuestInfo()
queuePacket( pe_qa );
GamePacketNew< FFXIVIpcQuestCompleteList, ServerZoneIpcType > pe_qc( getId() );
ZoneChannelPacket< FFXIVIpcQuestCompleteList > pe_qc( getId() );
memcpy( pe_qc.data().questCompleteMask, m_questCompleteFlags, 200 );
queuePacket( pe_qc );

View file

@ -183,7 +183,7 @@ void Core::DebugCommandHandler::set( char * data, Core::Entity::PlayerPtr pPlaye
pPlayer->getPos().y + static_cast< float >( posY ),
pPlayer->getPos().z + static_cast< float >( posZ ) );
Network::Packets::GamePacketNew< Network::Packets::Server::FFXIVIpcActorSetPos, Network::Packets::ServerZoneIpcType >
Network::Packets::ZoneChannelPacket< Network::Packets::Server::FFXIVIpcActorSetPos >
setActorPosPacket( pPlayer->getId() );
setActorPosPacket.data().x = pPlayer->getPos().x;
setActorPosPacket.data().y = pPlayer->getPos().y;
@ -204,7 +204,7 @@ void Core::DebugCommandHandler::set( char * data, Core::Entity::PlayerPtr pPlaye
int32_t discover_id;
sscanf( params.c_str(), "%i %i", &map_id, &discover_id );
Network::Packets::GamePacketNew< Network::Packets::Server::FFXIVIpcDiscovery, Network::Packets::ServerZoneIpcType > discoveryPacket( pPlayer->getId() );
Network::Packets::ZoneChannelPacket< Network::Packets::Server::FFXIVIpcDiscovery > discoveryPacket( pPlayer->getId() );
discoveryPacket.data().map_id = map_id;
discoveryPacket.data().map_part_id = discover_id;
pPlayer->queuePacket( discoveryPacket );
@ -375,7 +375,7 @@ void Core::DebugCommandHandler::add( char * data, Core::Entity::PlayerPtr pPlaye
pPlayer->sendNotice( "Injecting ACTOR_CONTROL " + std::to_string( opcode ) );
Network::Packets::GamePacketNew< Network::Packets::Server::FFXIVIpcActorControl143, Network::Packets::ServerZoneIpcType > actorControl( playerId, pPlayer->getId() );
Network::Packets::ZoneChannelPacket< Network::Packets::Server::FFXIVIpcActorControl143 > actorControl( playerId, pPlayer->getId() );
actorControl.data().category = opcode;
actorControl.data().param1 = param1;
actorControl.data().param2 = param2;
@ -501,7 +501,7 @@ void Core::DebugCommandHandler::nudge( char * data, Entity::PlayerPtr pPlayer, b
}
if( offset != 0 )
{
Network::Packets::GamePacketNew< Network::Packets::Server::FFXIVIpcActorSetPos, Network::Packets::ServerZoneIpcType >
Network::Packets::ZoneChannelPacket< Network::Packets::Server::FFXIVIpcActorSetPos >
setActorPosPacket( pPlayer->getId() );
setActorPosPacket.data().x = pPlayer->getPos().x;
setActorPosPacket.data().y = pPlayer->getPos().y;

View file

@ -484,7 +484,7 @@ int16_t Core::Inventory::addItem( uint16_t inventoryId, int8_t slotId, uint32_t
" WHERE storageId = " + std::to_string( inventoryId ) +
" AND CharacterId = " + std::to_string( m_pOwner->getId() ) );
GamePacketNew< FFXIVIpcUpdateInventorySlot, ServerZoneIpcType > invUpPacket( m_pOwner->getId() );
ZoneChannelPacket< FFXIVIpcUpdateInventorySlot > invUpPacket( m_pOwner->getId() );
invUpPacket.data().containerId = inventoryId;
invUpPacket.data().catalogId = catalogId;
invUpPacket.data().quantity = item->getStackSize();
@ -605,7 +605,7 @@ void Core::Inventory::discardItem( uint16_t fromInventoryId, uint8_t fromSlotId
m_inventoryMap[fromInventoryId]->removeItem( fromSlotId );
updateContainer( fromInventoryId, fromSlotId, nullptr );
GamePacketNew< FFXIVIpcInventoryTransaction, ServerZoneIpcType > invTransPacket( m_pOwner->getId() );
ZoneChannelPacket< FFXIVIpcInventoryTransaction > invTransPacket( m_pOwner->getId() );
invTransPacket.data().transactionId = transactionId;
invTransPacket.data().ownerId = m_pOwner->getId();
invTransPacket.data().storageId = fromInventoryId;
@ -615,7 +615,7 @@ void Core::Inventory::discardItem( uint16_t fromInventoryId, uint8_t fromSlotId
invTransPacket.data().type = 7;
m_pOwner->queuePacket( invTransPacket );
GamePacketNew< FFXIVIpcInventoryTransactionFinish, ServerZoneIpcType > invTransFinPacket( m_pOwner->getId() );
ZoneChannelPacket< FFXIVIpcInventoryTransactionFinish > invTransFinPacket( m_pOwner->getId() );
invTransFinPacket.data().transactionId = transactionId;
invTransFinPacket.data().transactionId1 = transactionId;
m_pOwner->queuePacket( invTransFinPacket );
@ -793,7 +793,7 @@ void Core::Inventory::send()
if( it->second->getId() == InventoryType::Currency || it->second->getId() == InventoryType::Crystal )
{
GamePacketNew< FFXIVIpcCurrencyCrystalInfo, ServerZoneIpcType > currencyInfoPacket( m_pOwner->getId() );
ZoneChannelPacket< FFXIVIpcCurrencyCrystalInfo > currencyInfoPacket( m_pOwner->getId() );
currencyInfoPacket.data().sequence = count;
currencyInfoPacket.data().catalogId = itM->second->getId();
currencyInfoPacket.data().unknown = 1;
@ -804,7 +804,7 @@ void Core::Inventory::send()
}
else
{
GamePacketNew< FFXIVIpcItemInfo, ServerZoneIpcType > itemInfoPacket( m_pOwner->getId() );
ZoneChannelPacket< FFXIVIpcItemInfo > itemInfoPacket( m_pOwner->getId() );
itemInfoPacket.data().sequence = count;
itemInfoPacket.data().containerId = it->second->getId();
itemInfoPacket.data().slot = itM->first;
@ -817,7 +817,7 @@ void Core::Inventory::send()
}
}
GamePacketNew< FFXIVIpcContainerInfo, ServerZoneIpcType > containerInfoPacket( m_pOwner->getId() );
ZoneChannelPacket< FFXIVIpcContainerInfo > containerInfoPacket( m_pOwner->getId() );
containerInfoPacket.data().sequence = count;
containerInfoPacket.data().numItems = it->second->getEntryCount();
containerInfoPacket.data().containerId = it->second->getId();

View file

@ -126,7 +126,7 @@ void Core::Network::GameConnection::actionHandler( const Packets::GamePacket& in
}
case 0x12F: // Get title list
{
GamePacketNew< FFXIVIpcPlayerTitleList, ServerZoneIpcType > titleListPacket( pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcPlayerTitleList > titleListPacket( pPlayer->getId() );
memcpy( titleListPacket.data().titleList, pPlayer->getTitleList(), sizeof( titleListPacket.data().titleList ) );
pPlayer->queuePacket( titleListPacket );

View file

@ -27,7 +27,7 @@ using namespace Core::Network::Packets::Server;
void Core::Network::GameConnection::cfDutyInfoRequest( const Packets::GamePacket& inPacket,
Entity::PlayerPtr pPlayer )
{
GamePacketNew< FFXIVIpcCFDutyInfo, ServerZoneIpcType > dutyInfoPacket( pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcCFDutyInfo > dutyInfoPacket( pPlayer->getId() );
auto penaltyMinutes = pPlayer->getCFPenaltyMinutes();
if (penaltyMinutes > 255)
@ -39,7 +39,7 @@ void Core::Network::GameConnection::cfDutyInfoRequest( const Packets::GamePacket
queueOutPacket( dutyInfoPacket );
GamePacketNew< FFXIVIpcCFPlayerInNeed, ServerZoneIpcType > inNeedsPacket( pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcCFPlayerInNeed > inNeedsPacket( pPlayer->getId() );
queueOutPacket( inNeedsPacket );
}
@ -62,7 +62,7 @@ void Core::Network::GameConnection::cfRegisterDuty( const Packets::GamePacket& i
pPlayer->sendDebug("ContentId5" + std::to_string(contentId5));
// let's cancel it because otherwise you can't register it again
GamePacketNew< FFXIVIpcCFNotify, ServerZoneIpcType > cfCancelPacket( pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcCFNotify > cfCancelPacket( pPlayer->getId() );
cfCancelPacket.data().state1 = 3;
cfCancelPacket.data().state2 = 1; // Your registration is withdrawn.
queueOutPacket( cfCancelPacket );

View file

@ -139,7 +139,7 @@ void Core::Network::GameConnection::eventHandler( const Packets::GamePacket& inP
GamePacketNew< FFXIVIpcEventLinkshell, ServerZoneIpcType > linkshellEvent( pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcEventLinkshell > linkshellEvent( pPlayer->getId() );
linkshellEvent.data().eventId = eventId;
linkshellEvent.data().scene = static_cast< uint8_t >(subEvent);
linkshellEvent.data().param3 = 1;

View file

@ -225,11 +225,11 @@ void Core::Network::GameConnection::gm1Handler( const Packets::GamePacket& inPac
{
targetPlayer->setOnlineStatusMask( param1 );
GamePacketNew< FFXIVIpcSetOnlineStatus, ServerZoneIpcType > statusPacket( targetPlayer->getId() );
ZoneChannelPacket< FFXIVIpcSetOnlineStatus > statusPacket( targetPlayer->getId() );
statusPacket.data().onlineStatusFlags = param1;
queueOutPacket( statusPacket );
GamePacketNew< FFXIVIpcSetSearchInfo, ServerZoneIpcType > searchInfoPacket( targetPlayer->getId() );
ZoneChannelPacket< FFXIVIpcSetSearchInfo > searchInfoPacket( targetPlayer->getId() );
searchInfoPacket.data().onlineStatusFlags = param1;
searchInfoPacket.data().selectRegion = targetPlayer->getSearchSelectRegion();
strcpy( searchInfoPacket.data().searchMessage, targetPlayer->getSearchMessage() );

View file

@ -46,7 +46,7 @@ void Core::Network::GameConnection::inventoryModifyHandler( const Packets::GameP
uint16_t fromContainer = inPacket.getValAt< uint16_t >( 0x2C );
uint16_t toContainer = inPacket.getValAt< uint16_t >( 0x40 );
GamePacketNew< FFXIVIpcInventoryActionAck, ServerZoneIpcType > ackPacket( pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcInventoryActionAck > ackPacket( pPlayer->getId() );
ackPacket.data().sequence = seq;
ackPacket.data().type = 7;
pPlayer->queuePacket( ackPacket );

View file

@ -77,11 +77,11 @@ void Core::Network::GameConnection::setSearchInfoHandler( const Packets::GamePac
// mark player as new adventurer
pPlayer->setNewAdventurer( true );
GamePacketNew< FFXIVIpcSetOnlineStatus, ServerZoneIpcType > statusPacket( pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcSetOnlineStatus > statusPacket( pPlayer->getId() );
statusPacket.data().onlineStatusFlags = status;
queueOutPacket( statusPacket );
GamePacketNew< FFXIVIpcSetSearchInfo, ServerZoneIpcType > searchInfoPacket( pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcSetSearchInfo > searchInfoPacket( pPlayer->getId() );
searchInfoPacket.data().onlineStatusFlags = status;
searchInfoPacket.data().selectRegion = pPlayer->getSearchSelectRegion();
strcpy( searchInfoPacket.data().searchMessage, pPlayer->getSearchMessage() );
@ -95,7 +95,7 @@ void Core::Network::GameConnection::setSearchInfoHandler( const Packets::GamePac
void Core::Network::GameConnection::reqSearchInfoHandler( const Packets::GamePacket& inPacket,
Entity::PlayerPtr pPlayer )
{
GamePacketNew< FFXIVIpcInitSearchInfo, ServerZoneIpcType > searchInfoPacket( pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcInitSearchInfo > searchInfoPacket( pPlayer->getId() );
searchInfoPacket.data().onlineStatusFlags = pPlayer->getOnlineStatusMask();
searchInfoPacket.data().selectRegion = pPlayer->getSearchSelectRegion();
strcpy( searchInfoPacket.data().searchMessage, pPlayer->getSearchMessage() );
@ -105,7 +105,7 @@ void Core::Network::GameConnection::reqSearchInfoHandler( const Packets::GamePac
void Core::Network::GameConnection::linkshellListHandler( const Packets::GamePacket& inPacket,
Entity::PlayerPtr pPlayer )
{
GamePacketNew< FFXIVIpcLinkshellList, ServerZoneIpcType > linkshellListPacket( pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcLinkshellList > linkshellListPacket( pPlayer->getId() );
queueOutPacket( linkshellListPacket );
}
@ -311,7 +311,7 @@ void Core::Network::GameConnection::zoneLineHandler( const Packets::GamePacket&
targetZone = pLine->getTargetZoneId();
rotation = pLine->getTargetRotation();
GamePacketNew< FFXIVIpcPrepareZoning, ServerZoneIpcType > preparePacket( pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcPrepareZoning > preparePacket( pPlayer->getId() );
preparePacket.data().targetZone = targetZone;
//ActorControlPacket143 controlPacket( pPlayer, ActorControlType::DespawnZoneScreenMsg,
@ -347,7 +347,7 @@ void Core::Network::GameConnection::discoveryHandler( const Packets::GamePacket&
return;
}
GamePacketNew< FFXIVIpcDiscovery, ServerZoneIpcType > discoveryPacket( pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcDiscovery > discoveryPacket( pPlayer->getId() );
discoveryPacket.data().map_id = pQR->getUInt( 2 );
discoveryPacket.data().map_part_id = pQR->getUInt( 3 );
@ -362,7 +362,7 @@ void Core::Network::GameConnection::discoveryHandler( const Packets::GamePacket&
void Core::Network::GameConnection::playTimeHandler( const Packets::GamePacket& inPacket,
Entity::PlayerPtr pPlayer )
{
GamePacketNew< FFXIVIpcPlayTime, ServerZoneIpcType > playTimePacket( pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcPlayTime > playTimePacket( pPlayer->getId() );
playTimePacket.data().playTimeInMinutes = pPlayer->getPlayTime() / 60;
pPlayer->queuePacket( playTimePacket );
}
@ -383,7 +383,7 @@ void Core::Network::GameConnection::blackListHandler( const Packets::GamePacket&
{
uint8_t count = inPacket.getValAt< uint8_t >( 0x21 );
GamePacketNew< FFXIVIpcBlackList, ServerZoneIpcType > blackListPacket( pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcBlackList > blackListPacket( pPlayer->getId() );
blackListPacket.data().sequence = count;
// TODO: Fill with actual blacklist data
//blackListPacket.data().entry[0].contentId = 1;
@ -435,7 +435,7 @@ void Core::Network::GameConnection::socialListHandler( const Packets::GamePacket
if( type == 0x02 )
{ // party list
GamePacketNew< FFXIVIpcSocialList, ServerZoneIpcType > listPacket( pPlayer->getId() );;
ZoneChannelPacket< FFXIVIpcSocialList > listPacket( pPlayer->getId() );;
listPacket.data().type = 2;
listPacket.data().sequence = count;
@ -470,7 +470,7 @@ void Core::Network::GameConnection::socialListHandler( const Packets::GamePacket
else if( type == 0x0b )
{ // friend list
GamePacketNew< FFXIVIpcSocialList, ServerZoneIpcType > listPacket( pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcSocialList > listPacket( pPlayer->getId() );
listPacket.data().type = 0x0B;
listPacket.data().sequence = count;
memset( listPacket.data().entries, 0, sizeof( listPacket.data().entries ) );
@ -536,7 +536,7 @@ void Core::Network::GameConnection::chatHandler( const Packets::GamePacket& inPa
void Core::Network::GameConnection::logoutHandler( const Packets::GamePacket& inPacket,
Entity::PlayerPtr pPlayer )
{
GamePacketNew< FFXIVIpcLogout, ServerZoneIpcType > logoutPacket( pPlayer->getId() );
ZoneChannelPacket< FFXIVIpcLogout > logoutPacket( pPlayer->getId() );
logoutPacket.data().flags1 = 0x02;
logoutPacket.data().flags2 = 0x2000;
queueOutPacket( logoutPacket );

View file

@ -14,7 +14,7 @@ namespace Server {
* @brief The Ping response packet.
*/
class ActorControlPacket142 :
public GamePacketNew< FFXIVIpcActorControl142, ServerZoneIpcType >
public ZoneChannelPacket< FFXIVIpcActorControl142 >
{
public:
ActorControlPacket142( uint32_t actorId,
@ -24,7 +24,7 @@ public:
uint32_t param3 = 0,
uint32_t param4 = 0,
uint32_t padding1 = 0 ) :
GamePacketNew< FFXIVIpcActorControl142, ServerZoneIpcType >( actorId, actorId )
ZoneChannelPacket< FFXIVIpcActorControl142 >( actorId, actorId )
{
initialize( category, param1, param2, param3, param4 );
};

View file

@ -15,7 +15,7 @@ namespace Server {
* @brief The Ping response packet.
*/
class ActorControlPacket143 :
public GamePacketNew< FFXIVIpcActorControl143, ServerZoneIpcType >
public ZoneChannelPacket< FFXIVIpcActorControl143 >
{
public:
ActorControlPacket143( uint32_t actorId,
@ -26,7 +26,7 @@ public:
uint32_t param4 = 0,
uint32_t param5 = 0,
uint32_t padding1 = 0 ) :
GamePacketNew< FFXIVIpcActorControl143, ServerZoneIpcType >( actorId, actorId )
ZoneChannelPacket< FFXIVIpcActorControl143 >( actorId, actorId )
{
initialize( category, param1, param2, param3, param4, param5 );
};

View file

@ -13,7 +13,7 @@ namespace Server {
* @brief The Ping response packet.
*/
class ActorControlPacket144 :
public GamePacketNew< FFXIVIpcActorControl144, ServerZoneIpcType >
public ZoneChannelPacket< FFXIVIpcActorControl144 >
{
public:
ActorControlPacket144( uint32_t actorId,
@ -24,7 +24,7 @@ public:
uint32_t param4 = 0,
uint64_t targetId = 0,
uint32_t padding1 = 0 ) :
GamePacketNew< FFXIVIpcActorControl144, ServerZoneIpcType >( actorId, actorId )
ZoneChannelPacket< FFXIVIpcActorControl144 >( actorId, actorId )
{
initialize( category, param1, param2, param3, param4, targetId );
};

View file

@ -15,11 +15,11 @@ namespace Server {
* @brief The Chat packet.
*/
class ChatPacket :
public GamePacketNew< FFXIVIpcChat, ServerZoneIpcType >
public ZoneChannelPacket< FFXIVIpcChat >
{
public:
ChatPacket( Entity::PlayerPtr player, Common::ChatType chatType, const std::string& msg ) :
GamePacketNew< FFXIVIpcChat, ServerZoneIpcType >( player->getId(), player->getId() )
ZoneChannelPacket< FFXIVIpcChat >( player->getId(), player->getId() )
{
initialize( player, chatType, msg );
};

View file

@ -11,14 +11,14 @@ namespace Server {
/**
* @brief The packet sent to finish an event.
*/
class EventFinishPacket : public GamePacketNew< FFXIVIpcEventFinish, ServerZoneIpcType >
class EventFinishPacket : public ZoneChannelPacket< FFXIVIpcEventFinish >
{
public:
EventFinishPacket( uint32_t playerId,
uint32_t eventId,
uint8_t param1,
uint32_t param3 ) :
GamePacketNew< FFXIVIpcEventFinish, ServerZoneIpcType >( playerId, playerId )
ZoneChannelPacket< FFXIVIpcEventFinish >( playerId, playerId )
{
initialize( eventId, param1, param3 );
};

View file

@ -12,7 +12,7 @@ namespace Server {
/**
* @brief The packet sent to play an event.
*/
class EventPlayPacket : public GamePacketNew< FFXIVIpcEventPlay, ServerZoneIpcType >
class EventPlayPacket : public ZoneChannelPacket< FFXIVIpcEventPlay >
{
public:
EventPlayPacket( uint32_t playerId,
@ -23,7 +23,7 @@ public:
uint8_t param3,
uint32_t param4 = 0,
uint32_t param5 = 0 ) :
GamePacketNew< FFXIVIpcEventPlay, ServerZoneIpcType >( playerId, playerId )
ZoneChannelPacket< FFXIVIpcEventPlay >( playerId, playerId )
{
initialize( actorId, eventId, scene, flags, param3, param4, param5 );
};

View file

@ -12,7 +12,7 @@ namespace Server {
/**
* @brief The packet sent to start an event.
*/
class EventStartPacket : public GamePacketNew< FFXIVIpcEventStart, ServerZoneIpcType >
class EventStartPacket : public ZoneChannelPacket< FFXIVIpcEventStart >
{
public:
EventStartPacket( uint32_t playerId,
@ -21,7 +21,7 @@ public:
uint8_t param1 = 0,
uint8_t param2 = 0,
uint32_t param3 = 0 ) :
GamePacketNew< FFXIVIpcEventStart, ServerZoneIpcType >( playerId, playerId )
ZoneChannelPacket< FFXIVIpcEventStart >( playerId, playerId )
{
initialize( actorId, eventId, param1, param2, param3 );
};

View file

@ -15,11 +15,11 @@ namespace Server {
* @brief The Client UI Initialization packet. This must be sent to the client
* once upon connection to configure the UI.
*/
class InitUIPacket : public GamePacketNew< FFXIVIpcInitUI, ServerZoneIpcType >
class InitUIPacket : public ZoneChannelPacket< FFXIVIpcInitUI >
{
public:
InitUIPacket( Entity::PlayerPtr player ) :
GamePacketNew< FFXIVIpcInitUI, ServerZoneIpcType >( player->getId(), player->getId() )
ZoneChannelPacket< FFXIVIpcInitUI >( player->getId(), player->getId() )
{
initialize( player );
};

View file

@ -14,11 +14,11 @@ namespace Server {
* @brief The update model packet.
*/
class ModelEquipPacket :
public GamePacketNew< FFXIVIpcModelEquip, ServerZoneIpcType >
public ZoneChannelPacket< FFXIVIpcModelEquip >
{
public:
ModelEquipPacket( Entity::PlayerPtr player ) :
GamePacketNew< FFXIVIpcModelEquip, ServerZoneIpcType >( player->getId(), player->getId() )
ZoneChannelPacket< FFXIVIpcModelEquip >( player->getId(), player->getId() )
{
initialize( player );
};

View file

@ -18,11 +18,11 @@ namespace Server {
* once upon connection to configure the UI.
*/
class MoveActorPacket :
public GamePacketNew< FFXIVIpcActorMove, ServerZoneIpcType >
public ZoneChannelPacket< FFXIVIpcActorMove >
{
public:
MoveActorPacket( Entity::ActorPtr actor, uint8_t unk1, uint8_t unk2, uint8_t unk3, uint16_t unk4 ) :
GamePacketNew< FFXIVIpcActorMove, ServerZoneIpcType >( actor->getId(), actor->getId() )
ZoneChannelPacket< FFXIVIpcActorMove >( actor->getId(), actor->getId() )
{
initialize( actor, unk1, unk2, unk3, unk4 );
};

View file

@ -14,11 +14,11 @@ namespace Server {
* @brief The Ping response packet.
*/
class PingPacket :
public GamePacketNew< FFXIVIpcPing, ServerZoneIpcType >
public ZoneChannelPacket< FFXIVIpcPing >
{
public:
PingPacket( Entity::PlayerPtr player, int32_t inVal ) :
GamePacketNew< FFXIVIpcPing, ServerZoneIpcType >( player->getId(), player->getId() )
ZoneChannelPacket< FFXIVIpcPing >( player->getId(), player->getId() )
{
initialize( player, inVal );
};

View file

@ -14,17 +14,17 @@ namespace Server {
* @brief Packet sent to set a players state, this impacts which actions he can perform.
*/
class PlayerStateFlagsPacket :
public GamePacketNew< FFXIVIpcPlayerStateFlags, ServerZoneIpcType >
public ZoneChannelPacket< FFXIVIpcPlayerStateFlags >
{
public:
PlayerStateFlagsPacket( Entity::PlayerPtr pActor ) :
GamePacketNew< FFXIVIpcPlayerStateFlags, ServerZoneIpcType >( pActor->getId(), pActor->getId() )
ZoneChannelPacket< FFXIVIpcPlayerStateFlags >( pActor->getId(), pActor->getId() )
{
initialize( pActor->getStateFlags() );
}
PlayerStateFlagsPacket( Entity::PlayerPtr pActor, std::vector< Common::PlayerStateFlag > flags ) :
GamePacketNew< FFXIVIpcPlayerStateFlags, ServerZoneIpcType >( pActor->getId(), pActor->getId() )
ZoneChannelPacket< FFXIVIpcPlayerStateFlags >( pActor->getId(), pActor->getId() )
{
uint8_t newFlags[7];
memset( newFlags, 0, 7 );

View file

@ -14,12 +14,12 @@ namespace Server {
* @brief Packet to display a quest specific info message.
*/
class QuestMessagePacket :
public GamePacketNew< FFXIVIpcQuestMessage, ServerZoneIpcType >
public ZoneChannelPacket< FFXIVIpcQuestMessage >
{
public:
QuestMessagePacket( Entity::ActorPtr pActor, uint32_t questId, int8_t msgId,
uint8_t type = 0, uint32_t var1 = 0, uint32_t var2 = 0 ) :
GamePacketNew< FFXIVIpcQuestMessage, ServerZoneIpcType >( pActor->getId(), pActor->getId() )
ZoneChannelPacket< FFXIVIpcQuestMessage >( pActor->getId(), pActor->getId() )
{
initialize( questId, msgId, type, var1, var2 );
};

View file

@ -14,11 +14,11 @@ namespace Server {
* @brief The Ping response packet.
*/
class ServerNoticePacket :
public GamePacketNew<FFXIVIpcServerNotice, ServerZoneIpcType>
public ZoneChannelPacket< FFXIVIpcServerNotice >
{
public:
ServerNoticePacket( uint32_t playerId, const std::string& message ) :
GamePacketNew<FFXIVIpcServerNotice, ServerZoneIpcType>( playerId, playerId )
ZoneChannelPacket< FFXIVIpcServerNotice >( playerId, playerId )
{
initialize( message );
};

View file

@ -14,11 +14,11 @@ namespace Server {
* @brief The Ping response packet.
*/
class UpdateHpMpTpPacket :
public GamePacketNew< FFXIVIpcUpdateHpMpTp, ServerZoneIpcType >
public ZoneChannelPacket< FFXIVIpcUpdateHpMpTp >
{
public:
UpdateHpMpTpPacket( Entity::ActorPtr pActor ) :
GamePacketNew< FFXIVIpcUpdateHpMpTp, ServerZoneIpcType >( pActor->getId(), pActor->getId() )
ZoneChannelPacket< FFXIVIpcUpdateHpMpTp >( pActor->getId(), pActor->getId() )
{
initialize( pActor );
};

View file

@ -56,7 +56,7 @@ void Core::StatusEffect::StatusEffectContainer::addStatusEffect( StatusEffectPtr
pEffect->applyStatus();
m_effectMap[nextSlot] = pEffect;
GamePacketNew< Server::FFXIVIpcAddStatusEffect, ServerZoneIpcType > statusEffectAdd( m_pOwner->getId() );
ZoneChannelPacket< Server::FFXIVIpcAddStatusEffect > statusEffectAdd( m_pOwner->getId() );
statusEffectAdd.data().actor_id = pEffect->getTargetActorId();
statusEffectAdd.data().actor_id1 = pEffect->getSrcActorId();
statusEffectAdd.data().current_hp = m_pOwner->getHp();
@ -117,7 +117,7 @@ void Core::StatusEffect::StatusEffectContainer::sendUpdate()
{
uint64_t currentTimeMs = Util::getTimeMs();
GamePacketNew< Server::FFXIVIpcStatusEffectList, ServerZoneIpcType > statusEffectList( m_pOwner->getId() );
ZoneChannelPacket< Server::FFXIVIpcStatusEffectList > statusEffectList( m_pOwner->getId() );
statusEffectList.data().current_hp = m_pOwner->getHp();
statusEffectList.data().current_mp = m_pOwner->getMp();

View file

@ -517,8 +517,7 @@ bool Zone::runZoneLogic()
if( changedWeather )
{
Network::Packets::GamePacketNew< Network::Packets::Server::FFXIVIpcWeatherChange,
Network::Packets::ServerZoneIpcType >
Network::Packets::ZoneChannelPacket< Network::Packets::Server::FFXIVIpcWeatherChange >
weatherChangePacket( pSession->getPlayer()->getId() );
weatherChangePacket.data().weatherId = m_currentWeather;
weatherChangePacket.data().delay = 5.0f;