mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 06:27:45 +00:00
Even more cleanup
This commit is contained in:
parent
a02e58fd35
commit
409dc173c5
14 changed files with 9 additions and 47 deletions
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "Manager/ActionMgr.h"
|
||||
#include "Manager/PlayerMgr.h"
|
||||
#include "Manager/EventMgr.h"
|
||||
|
||||
using namespace Sapphire::Common;
|
||||
using namespace Sapphire::World::Manager;
|
||||
|
@ -33,7 +32,6 @@ void Sapphire::Network::GameConnection::actionRequest( const Packets::FFXIVARR_P
|
|||
|
||||
auto& exdData = Common::Service< Data::ExdData >::ref();
|
||||
auto& actionMgr = Common::Service< World::Manager::ActionMgr >::ref();
|
||||
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||
|
||||
switch( type )
|
||||
{
|
||||
|
|
|
@ -3,17 +3,14 @@
|
|||
#include <Network/GamePacket.h>
|
||||
|
||||
#include <Network/PacketContainer.h>
|
||||
#include <Exd/ExdData.h>
|
||||
#include <Service.h>
|
||||
#include <Network/PacketDef/Zone/ClientZoneDef.h>
|
||||
#include <Network/PacketDef/Zone/ServerZoneDef.h>
|
||||
|
||||
#include "Manager/BlacklistMgr.h"
|
||||
|
||||
#include "Network/GameConnection.h"
|
||||
|
||||
#include "Actor/Player.h"
|
||||
#include "WorldServer.h"
|
||||
|
||||
using namespace Sapphire::Common;
|
||||
using namespace Sapphire::Network::Packets;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include <Common.h>
|
||||
#include <Network/CommonNetwork.h>
|
||||
#include <Network/GamePacket.h>
|
||||
#include <Logging/Logger.h>
|
||||
#include <Network/PacketContainer.h>
|
||||
#include <Exd/ExdData.h>
|
||||
#include <Service.h>
|
||||
|
@ -44,7 +43,6 @@ void Sapphire::Network::GameConnection::cfRequestPenalties( const Packets::FFXIV
|
|||
void Sapphire::Network::GameConnection::findContent( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player )
|
||||
{
|
||||
auto& teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto& exdData = Common::Service< Data::ExdData >::ref();
|
||||
auto& contentFinder = Common::Service< World::ContentFinder >::ref();
|
||||
|
||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcFindContent >( inPacket );
|
||||
|
@ -62,7 +60,6 @@ void Sapphire::Network::GameConnection::findContent( const Packets::FFXIVARR_PAC
|
|||
|
||||
void Sapphire::Network::GameConnection::find5Contents( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player )
|
||||
{
|
||||
auto& teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto& exdData = Common::Service< Data::ExdData >::ref();
|
||||
auto& contentFinder = Common::Service< World::ContentFinder >::ref();
|
||||
|
||||
|
@ -70,9 +67,9 @@ void Sapphire::Network::GameConnection::find5Contents( const Packets::FFXIVARR_P
|
|||
|
||||
std::set< uint16_t > selectedContent;
|
||||
|
||||
for( std::size_t i = 0; i < 5; ++i )
|
||||
if( packet.data().territoryTypes[ i ] != 0 )
|
||||
selectedContent.insert( packet.data().territoryTypes[ i ] );
|
||||
for( auto territoryType : packet.data().territoryTypes )
|
||||
if( territoryType != 0 )
|
||||
selectedContent.insert( territoryType );
|
||||
|
||||
auto contentListIds = exdData.getIdList< Excel::InstanceContent >();
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include <Network/CommonNetwork.h>
|
||||
#include <Network/GamePacket.h>
|
||||
#include <Network/PacketContainer.h>
|
||||
#include <Exd/ExdData.h>
|
||||
#include <Service.h>
|
||||
#include <Network/PacketDef/Zone/ClientZoneDef.h>
|
||||
#include <Network/PacketDef/Zone/ServerZoneDef.h>
|
||||
|
@ -9,7 +8,6 @@
|
|||
|
||||
#include "Manager/LinkshellMgr.h"
|
||||
#include "Manager/PartyMgr.h"
|
||||
#include "Territory/InstanceContent.h"
|
||||
|
||||
#include "Network/GameConnection.h"
|
||||
|
||||
|
@ -19,7 +17,6 @@
|
|||
|
||||
#include "Session.h"
|
||||
#include "WorldServer.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
using namespace Sapphire::Common;
|
||||
using namespace Sapphire::Network::Packets;
|
||||
|
@ -214,7 +211,7 @@ void Sapphire::Network::GameConnection::getCommonlistHandler( const Packets::FFX
|
|||
|
||||
for( const auto& id : memberVec )
|
||||
{
|
||||
Common::HierarchyData hierarchy;
|
||||
Common::HierarchyData hierarchy{};
|
||||
if( lsPtr->getMasterId() == id )
|
||||
{
|
||||
hierarchy.data.type = Ls::LinkshellHierarchy::Master;
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
#include <Common.h>
|
||||
#include <Logging/Logger.h>
|
||||
#include <Exd/ExdData.h>
|
||||
#include <Network/CommonNetwork.h>
|
||||
#include <Network/GamePacket.h>
|
||||
#include <Network/PacketContainer.h>
|
||||
#include <Network/PacketDef/Zone/ServerZoneDef.h>
|
||||
#include <Network/PacketDef/Zone/ClientZoneDef.h>
|
||||
|
||||
#include "Network/GameConnection.h"
|
||||
|
@ -17,7 +15,6 @@
|
|||
#include "Manager/EventMgr.h"
|
||||
#include "Manager/PlayerMgr.h"
|
||||
#include "Manager/TerritoryMgr.h"
|
||||
#include "WorldServer.h"
|
||||
|
||||
#include "Territory/InstanceContent.h"
|
||||
#include "Territory/QuestBattle.h"
|
||||
|
@ -40,8 +37,6 @@ void Sapphire::Network::GameConnection::eventHandlerTalk( const Packets::FFXIVAR
|
|||
const auto actorId = packet.data().actorId;
|
||||
const auto eventId = packet.data().eventId;
|
||||
|
||||
auto eventType = static_cast< uint16_t >( eventId >> 16 );
|
||||
|
||||
std::string eventName = "onTalk";
|
||||
std::string objName = eventMgr.getEventName( eventId );
|
||||
|
||||
|
@ -402,7 +397,6 @@ void Sapphire::Network::GameConnection::yieldEventScene255( const Packets::FFXIV
|
|||
|
||||
void Sapphire::Network::GameConnection::yieldEventString( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player )
|
||||
{
|
||||
auto& server = Common::Service< World::WorldServer >::ref();
|
||||
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||
|
||||
std::string inString;
|
||||
|
@ -438,7 +432,6 @@ void Sapphire::Network::GameConnection::yieldEventString( const Packets::FFXIVAR
|
|||
|
||||
void Sapphire::Network::GameConnection::yieldEventSceneIntAndString( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player )
|
||||
{
|
||||
auto &server = Common::Service< World::WorldServer >::ref();
|
||||
auto &eventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||
|
||||
std::string inString;
|
||||
|
@ -459,8 +452,6 @@ void Sapphire::Network::GameConnection::startEventSayHandler( const Packets::FFX
|
|||
const auto eventId = packet.data().handlerId;
|
||||
const auto sayId = packet.data().sayId;
|
||||
|
||||
auto eventType = static_cast< uint16_t >( eventId >> 16 );
|
||||
|
||||
std::string eventName = "onSay";
|
||||
std::string objName = eventMgr.getEventName( eventId );
|
||||
|
||||
|
@ -483,12 +474,8 @@ void Sapphire::Network::GameConnection::startUiEvent( const Packets::FFXIVARR_PA
|
|||
auto& scriptMgr = Common::Service< Scripting::ScriptMgr >::ref();
|
||||
|
||||
const auto packet = ZoneChannelPacket< FFXIVIpcShopEventHandler >( inPacket );
|
||||
|
||||
|
||||
const auto eventId = packet.data().eventId;
|
||||
|
||||
auto eventType = static_cast< uint16_t >( eventId >> 16 );
|
||||
|
||||
std::string eventName = "onOpen";
|
||||
std::string objName = eventMgr.getEventName( eventId );
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#include <Common.h>
|
||||
#include <Network/CommonNetwork.h>
|
||||
#include <Network/GamePacket.h>
|
||||
|
||||
#include <Network/PacketContainer.h>
|
||||
#include <Exd/ExdData.h>
|
||||
#include <Service.h>
|
||||
#include <Network/PacketDef/Zone/ClientZoneDef.h>
|
||||
#include <Network/PacketDef/Zone/ServerZoneDef.h>
|
||||
|
|
|
@ -137,7 +137,7 @@ void Sapphire::Network::GameConnection::gmCommandHandler( const Packets::FFXIVAR
|
|||
PlayerMgr::sendServerNotice( player, "Race for {0} was set to {1}", targetPlayer->getName(), param1 );
|
||||
targetPlayer->spawn( targetPlayer );
|
||||
auto inRange = targetPlayer->getInRangeActors();
|
||||
for( auto actor : inRange )
|
||||
for( const auto& actor : inRange )
|
||||
{
|
||||
if( actor->isPlayer() )
|
||||
{
|
||||
|
@ -153,7 +153,7 @@ void Sapphire::Network::GameConnection::gmCommandHandler( const Packets::FFXIVAR
|
|||
PlayerMgr::sendServerNotice( player, "Tribe for {0} was set to ", targetPlayer->getName(), param1 );
|
||||
targetPlayer->spawn( targetPlayer );
|
||||
auto inRange = targetPlayer->getInRangeActors();
|
||||
for( auto actor : inRange )
|
||||
for( const auto& actor : inRange )
|
||||
{
|
||||
if( actor->isPlayer() )
|
||||
{
|
||||
|
@ -169,7 +169,7 @@ void Sapphire::Network::GameConnection::gmCommandHandler( const Packets::FFXIVAR
|
|||
PlayerMgr::sendServerNotice( player, "Sex for {0} was set to ", targetPlayer->getName(), param1 );
|
||||
targetPlayer->spawn( targetPlayer );
|
||||
auto inRange = targetActor->getInRangeActors();
|
||||
for( auto actor : inRange )
|
||||
for( const auto& actor : inRange )
|
||||
{
|
||||
if( actor->isPlayer() )
|
||||
{
|
||||
|
@ -239,7 +239,7 @@ void Sapphire::Network::GameConnection::gmCommandHandler( const Packets::FFXIVAR
|
|||
player.setGmInvis( !player.getGmInvis() );
|
||||
PlayerMgr::sendServerNotice( player, "Invisibility flag for {0} was toggled to {1}", player.getName(), !player.getGmInvis());
|
||||
|
||||
for( auto actor : player.getInRangeActors() )
|
||||
for( const auto& actor : player.getInRangeActors() )
|
||||
{
|
||||
if( actor->isPlayer() )
|
||||
{
|
||||
|
@ -476,7 +476,6 @@ void Sapphire::Network::GameConnection::gmCommandHandler( const Packets::FFXIVAR
|
|||
}
|
||||
case GmCommand::Teri:
|
||||
{
|
||||
auto& teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto& warpMgr = Common::Service< WarpMgr >::ref();
|
||||
if( auto instance = teriMgr.getTerritoryByGuId( param1 ) )
|
||||
{
|
||||
|
@ -538,7 +537,6 @@ void Sapphire::Network::GameConnection::gmCommandHandler( const Packets::FFXIVAR
|
|||
}
|
||||
else
|
||||
{
|
||||
auto& warpMgr = Common::Service< WarpMgr >::ref();
|
||||
warpMgr.requestMoveTerritory( *targetPlayer, WarpType::WARP_TYPE_GM, teriMgr.getZoneByTerritoryTypeId( param1 )->getGuId(), targetPlayer->getPos(), 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
#include <Network/GamePacket.h>
|
||||
#include <Network/CommonActorControl.h>
|
||||
#include <Network/PacketContainer.h>
|
||||
#include <Database/DatabaseDef.h>
|
||||
|
||||
#include <datReader/DatCategories/bg/LgbTypes.h>
|
||||
#include <Network/PacketDef/Zone/ClientZoneDef.h>
|
||||
|
||||
|
@ -12,7 +10,6 @@
|
|||
|
||||
#include "Network/GameConnection.h"
|
||||
|
||||
#include "Territory/Territory.h"
|
||||
#include "Territory/HousingZone.h"
|
||||
#include "Territory/Land.h"
|
||||
#include "Territory/House.h"
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "Network/GameConnection.h"
|
||||
#include "Network/PacketWrappers/ServerNoticePacket.h"
|
||||
|
||||
#include "Territory/Territory.h"
|
||||
#include "Actor/Player.h"
|
||||
|
||||
#include "Session.h"
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
#include <Common.h>
|
||||
#include <Network/CommonNetwork.h>
|
||||
#include <Network/GamePacket.h>
|
||||
#include <Network/CommonActorControl.h>
|
||||
#include <Logging/Logger.h>
|
||||
#include <Network/PacketContainer.h>
|
||||
#include <Database/DatabaseDef.h>
|
||||
|
||||
#include <datReader/DatCategories/bg/LgbTypes.h>
|
||||
|
||||
|
@ -15,7 +13,6 @@
|
|||
#include "Session.h"
|
||||
|
||||
#include "Territory/Territory.h"
|
||||
#include "Territory/Land.h"
|
||||
|
||||
#include "Network/PacketWrappers/PlayerSetupPacket.h"
|
||||
#include "Network/PacketWrappers/InviteUpdatePacket.h"
|
||||
|
@ -34,7 +31,6 @@ using namespace Sapphire::Network::Packets;
|
|||
using namespace Sapphire::Network::Packets::WorldPackets::Server;
|
||||
using namespace Sapphire::Network::Packets::WorldPackets::Client;
|
||||
using namespace Sapphire::Network::Packets::WorldPackets;
|
||||
using namespace Sapphire::Network::ActorControl;
|
||||
using namespace Sapphire::World::Manager;
|
||||
|
||||
|
||||
|
|
|
@ -83,7 +83,6 @@ void Sapphire::Network::GameConnection::linkshellDeclineLeaderHandler( const Pac
|
|||
{
|
||||
const auto lsDeclineLeaderPacket = ZoneChannelPacket< Client::FFXIVIpcLinkshellDeclineLeader >( inPacket );
|
||||
auto& lsMgr = Common::Service< LinkshellMgr >::ref();
|
||||
auto& server = Common::Service< World::WorldServer >::ref();
|
||||
|
||||
lsMgr.declineLeader( player, lsDeclineLeaderPacket.data().LinkshellID );
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <Network/CommonActorControl.h>
|
||||
#include <Network/PacketDef/Zone/ClientZoneDef.h>
|
||||
|
||||
#include "Territory/Territory.h"
|
||||
#include "Manager/HousingMgr.h"
|
||||
#include "Manager/WarpMgr.h"
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include <Network/GamePacket.h>
|
||||
|
||||
#include <Network/PacketContainer.h>
|
||||
#include <Exd/ExdData.h>
|
||||
#include <Service.h>
|
||||
#include <Network/PacketDef/Zone/ClientZoneDef.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
#include <Network/GamePacket.h>
|
||||
#include "Actor/Player.h"
|
||||
#include <Network/PacketDef/Zone/ServerZoneDef.h>
|
||||
#include "Forwards.h"
|
||||
|
||||
namespace Sapphire::Network::Packets::WorldPackets::Server
|
||||
|
|
Loading…
Add table
Reference in a new issue