mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 05:57:45 +00:00
Massive chunk of refactoring. Mainly includes and namespaces
This commit is contained in:
parent
4d47ed478b
commit
a77772bc9d
63 changed files with 602 additions and 666 deletions
|
@ -1,6 +1,6 @@
|
|||
#include "Action.h"
|
||||
|
||||
#include <src/servers/Server_Common/Util/Util.h>
|
||||
#include <Server_Common/Util/Util.h>
|
||||
|
||||
|
||||
Core::Action::Action::Action()
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef _ACTION_H_
|
||||
#define _ACTION_H_
|
||||
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include <Server_Common/Common.h>
|
||||
#include "../Forwards.h"
|
||||
|
||||
namespace Core { namespace Action {
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
#include "ActionCast.h"
|
||||
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Util/Util.h>
|
||||
#include <src/servers/Server_Common/Util/UtilMath.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Util/Util.h>
|
||||
#include <Server_Common/Util/UtilMath.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "src/servers/Server_Zone/Script/ScriptManager.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "Actor/Player.h"
|
||||
#include "Script/ScriptManager.h"
|
||||
|
||||
using namespace Core::Common;
|
||||
using namespace Core::Network;
|
||||
|
@ -52,7 +52,8 @@ void Core::Action::ActionCast::onStart()
|
|||
castPacket.data().action_id = m_id;
|
||||
castPacket.data().skillType = Common::SkillType::Normal;
|
||||
castPacket.data().unknown_1 = m_id;
|
||||
castPacket.data().cast_time = static_cast< float >( m_castTime / 1000 ); // This is used for the cast bar above the target bar of the caster.
|
||||
// This is used for the cast bar above the target bar of the caster.
|
||||
castPacket.data().cast_time = static_cast< float >( m_castTime / 1000 );
|
||||
castPacket.data().target_id = m_pTarget->getId();
|
||||
|
||||
m_pSource->sendToInRangeSet( castPacket, true );
|
||||
|
@ -73,7 +74,7 @@ void Core::Action::ActionCast::onFinish()
|
|||
pPlayer->sendStateFlags();
|
||||
|
||||
/*auto control = ActorControlPacket143( m_pTarget->getId(), ActorControlType::Unk7,
|
||||
0x219, m_id, m_id, m_id, m_id );
|
||||
0x219, m_id, m_id, m_id, m_id );
|
||||
m_pSource->sendToInRangeSet( control, true );*/
|
||||
|
||||
g_scriptMgr.onCastFinish( *pPlayer, m_pTarget, m_id );
|
||||
|
@ -89,7 +90,7 @@ void Core::Action::ActionCast::onInterrupt()
|
|||
m_pSource->getAsPlayer()->sendStateFlags();
|
||||
|
||||
auto control = ActorControlPacket142( m_pSource->getId(), ActorControlType::CastInterrupt,
|
||||
0x219, 1, m_id, 0 );
|
||||
0x219, 1, m_id, 0 );
|
||||
|
||||
// Note: When cast interrupt from taking too much damage, set the last value to 1. This enables the cast interrupt effect. Example:
|
||||
// auto control = ActorControlPacket142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 1, m_id, 0 );
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#ifndef _ACTIONCAST_H_
|
||||
#define _ACTIONCAST_H_
|
||||
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "../Forwards.h"
|
||||
#include "Action.h"
|
||||
|
||||
namespace Core { namespace Action {
|
||||
namespace Core {
|
||||
namespace Action {
|
||||
|
||||
class ActionCast : public Action
|
||||
{
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#include <src/servers/Server_Common/Util/Util.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <src/servers/Server_Common/Util/UtilMath.h>
|
||||
#include <Server_Common/Util/Util.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Util/UtilMath.h>
|
||||
|
||||
#include "ActionCollision.h"
|
||||
#include <src/servers/Server_Zone/Actor/Actor.h>
|
||||
#include <src/servers/Server_Zone/Actor/Player.h>
|
||||
#include "Actor/Actor.h"
|
||||
#include "Actor/Player.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#ifndef _ACTIONCOLLISION_H
|
||||
#define _ACTIONCOLLISION_H
|
||||
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <Server_Common/Common.h>
|
||||
|
||||
#include <src/servers/Server_Zone/Actor/Actor.h>
|
||||
#include "Actor/Actor.h"
|
||||
#include "Action.h"
|
||||
|
||||
namespace Core {
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
#include "ActionMount.h"
|
||||
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Util/Util.h>
|
||||
#include <src/servers/Server_Common/Util/UtilMath.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Util/Util.h>
|
||||
#include <Server_Common/Util/UtilMath.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "src/servers/Server_Zone/Script/ScriptManager.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "Actor/Player.h"
|
||||
#include "Script/ScriptManager.h"
|
||||
|
||||
using namespace Core::Common;
|
||||
using namespace Core::Network;
|
||||
|
@ -23,7 +23,7 @@ extern Core::Scripting::ScriptManager g_scriptMgr;
|
|||
|
||||
Core::Action::ActionMount::ActionMount()
|
||||
{
|
||||
m_handleActionType = Common::HandleActionType::Event;
|
||||
m_handleActionType = HandleActionType::Event;
|
||||
}
|
||||
|
||||
Core::Action::ActionMount::ActionMount( Entity::ActorPtr pActor, uint16_t mountId )
|
||||
|
@ -75,19 +75,20 @@ void Core::Action::ActionMount::onFinish()
|
|||
pPlayer->unsetStateFlag( PlayerStateFlag::Casting );
|
||||
pPlayer->sendStateFlags();
|
||||
|
||||
ZoneChannelPacket< FFXIVIpcEffect > 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
|
||||
// Affects displaying action name next to number in floating text
|
||||
effectPacket.data().unknown_62 = 13;
|
||||
effectPacket.data().actionTextId = 4;
|
||||
effectPacket.data().numEffects = 1;
|
||||
effectPacket.data().rotation = Math::Util::floatToUInt16Rot(pPlayer->getRotation());
|
||||
effectPacket.data().rotation = Math::Util::floatToUInt16Rot( pPlayer->getRotation() );
|
||||
effectPacket.data().effectTarget = INVALID_GAME_OBJECT_ID;
|
||||
effectPacket.data().effects[0].effectType = ActionEffectType::Mount;
|
||||
effectPacket.data().effects[0].hitSeverity = ActionHitSeverityType::CritDamage;
|
||||
effectPacket.data().effects[0].value = m_id;
|
||||
|
||||
pPlayer->sendToInRangeSet(effectPacket, true);
|
||||
pPlayer->sendToInRangeSet( effectPacket, true );
|
||||
|
||||
pPlayer->mount( m_id );
|
||||
}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#ifndef _ACTIONMOUNT_H_
|
||||
#define _ACTIONMOUNT_H_
|
||||
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "../Forwards.h"
|
||||
#include "Action.h"
|
||||
|
||||
namespace Core { namespace Action {
|
||||
namespace Core {
|
||||
namespace Action {
|
||||
|
||||
class ActionMount : public Action
|
||||
{
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#include "ActionTeleport.h"
|
||||
|
||||
#include <src/servers/Server_Common/Util/Util.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Util/Util.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "Actor/Player.h"
|
||||
|
||||
using namespace Core::Common;
|
||||
using namespace Core::Network;
|
||||
|
@ -18,7 +18,7 @@ extern Core::Logger g_log;
|
|||
|
||||
Core::Action::ActionTeleport::ActionTeleport()
|
||||
{
|
||||
m_handleActionType = Common::HandleActionType::Event;
|
||||
m_handleActionType = HandleActionType::Event;
|
||||
}
|
||||
|
||||
Core::Action::ActionTeleport::ActionTeleport( Entity::ActorPtr pActor, uint16_t targetZone, uint16_t cost )
|
||||
|
@ -81,7 +81,7 @@ void Core::Action::ActionTeleport::onFinish()
|
|||
//auto control = Network::Packets::Server::ActorControlPacket142( m_pSource->getId(), Common::ActorControlType::TeleportDone );
|
||||
//m_pSource->sendToInRangeSet( control, false );
|
||||
|
||||
pPlayer->setZoningType( Common::ZoneingType::Teleport );
|
||||
pPlayer->setZoningType( ZoneingType::Teleport );
|
||||
|
||||
ZoneChannelPacket< FFXIVIpcEffect > effectPacket( pPlayer->getId() );
|
||||
effectPacket.data().targetId = pPlayer->getId();
|
||||
|
@ -90,7 +90,7 @@ void Core::Action::ActionTeleport::onFinish()
|
|||
effectPacket.data().actionTextId = 5;
|
||||
effectPacket.data().unknown_5 = 1;
|
||||
effectPacket.data().numEffects = 1;
|
||||
effectPacket.data().rotation = static_cast< uint16_t >( 0x8000 * ( (pPlayer->getRotation() + 3.1415926) ) / 3.1415926 );
|
||||
effectPacket.data().rotation = static_cast< uint16_t >( 0x8000 * ( ( pPlayer->getRotation() + 3.1415926 ) ) / 3.1415926 );
|
||||
effectPacket.data().effectTarget = pPlayer->getId();
|
||||
pPlayer->sendToInRangeSet( effectPacket, true );
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#ifndef _ACTIONTELEPORT_H_
|
||||
#define _ACTIONTELEPORT_H_
|
||||
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "../Forwards.h"
|
||||
#include "Action.h"
|
||||
|
||||
namespace Core { namespace Action {
|
||||
namespace Core {
|
||||
namespace Action {
|
||||
|
||||
class ActionTeleport : public Action
|
||||
{
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#include <src/servers/Server_Common/Util/Util.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Util/Util.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
|
||||
#include "EventAction.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "src/servers/Server_Zone/Event/Event.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "Server_Zone/Actor/Player.h"
|
||||
#include "Server_Zone/Event/Event.h"
|
||||
|
||||
extern Core::Logger g_log;
|
||||
extern Core::Data::ExdData g_exdData;
|
||||
|
@ -18,7 +18,7 @@ using namespace Core::Network::Packets::Server;
|
|||
|
||||
Core::Action::EventAction::EventAction()
|
||||
{
|
||||
m_handleActionType = Common::HandleActionType::Event;
|
||||
m_handleActionType = HandleActionType::Event;
|
||||
}
|
||||
|
||||
Core::Action::EventAction::EventAction( Entity::ActorPtr pActor, uint32_t eventId, uint16_t action,
|
||||
|
@ -76,7 +76,6 @@ void Core::Action::EventAction::onFinish()
|
|||
|
||||
auto control = ActorControlPacket142( m_pSource->getId(), Common::ActorControlType::CastStart, 0, m_id );
|
||||
|
||||
|
||||
if( !pEvent->hasPlayedScene() )
|
||||
m_pSource->getAsPlayer()->eventFinish( m_eventId, 1 );
|
||||
else
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#ifndef _EVENTACTION_H_
|
||||
#define _EVENTACTION_H_
|
||||
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <Server_Common/Common.h>
|
||||
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "src/servers/Server_Zone/Action/Action.h"
|
||||
#include "../Forwards.h"
|
||||
#include "Action.h"
|
||||
|
||||
namespace Core { namespace Action {
|
||||
namespace Core {
|
||||
namespace Action {
|
||||
|
||||
class EventAction : public Action
|
||||
{
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#include "EventItemAction.h"
|
||||
|
||||
#include <src/servers/Server_Common/Util/Util.h>
|
||||
#include <src/servers/Server_Common/Util/UtilMath.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Util/Util.h>
|
||||
#include <Server_Common/Util/UtilMath.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "Actor/Player.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
|
||||
extern Core::Logger g_log;
|
||||
|
||||
|
@ -19,7 +19,7 @@ using namespace Core::Network::Packets::Server;
|
|||
|
||||
Core::Action::EventItemAction::EventItemAction()
|
||||
{
|
||||
m_handleActionType = Common::HandleActionType::Event;
|
||||
m_handleActionType = HandleActionType::Event;
|
||||
}
|
||||
|
||||
Core::Action::EventItemAction::EventItemAction( Entity::ActorPtr pActor, uint32_t eventId, uint16_t action,
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#ifndef _EVENTITEMACTION_H_
|
||||
#define _EVENTITEMACTION_H_
|
||||
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "src/servers/Server_Zone/Action/Action.h"
|
||||
#include "../Forwards.h"
|
||||
#include "Action.h"
|
||||
|
||||
namespace Core { namespace Action {
|
||||
namespace Core {
|
||||
namespace Action {
|
||||
|
||||
class EventItemAction : public Action
|
||||
{
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
#include <src/servers/Server_Common/Util/Util.h>
|
||||
#include <src/servers/Server_Common/Util/UtilMath.h>
|
||||
#include <src/servers/Server_Common/Network/PacketContainer.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <src/servers/Server_Common/Network/GamePacket.h>
|
||||
#include <Server_Common/Util/Util.h>
|
||||
#include <Server_Common/Util/UtilMath.h>
|
||||
#include <Server_Common/Network/PacketContainer.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Network/GamePacket.h>
|
||||
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "src/servers/Server_Zone/Action/Action.h"
|
||||
#include "Forwards.h"
|
||||
#include "Action/Action.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Zone/Zone.h"
|
||||
#include "Zone/Zone.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/GameConnection.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/UpdateHpMpTpPacket.h"
|
||||
#include "Network/GameConnection.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "Network/PacketWrappers/UpdateHpMpTpPacket.h"
|
||||
|
||||
#include "src/servers/Server_Zone/StatusEffect/StatusEffect.h"
|
||||
#include "src/servers/Server_Zone/Action/ActionCollision.h"
|
||||
#include "src/servers/Server_Zone/ServerZone.h"
|
||||
#include "src/servers/Server_Zone/Session.h"
|
||||
#include "src/servers/Server_Zone/Math/CalcBattle.h"
|
||||
#include "StatusEffect/StatusEffect.h"
|
||||
#include "Action/ActionCollision.h"
|
||||
#include "ServerZone.h"
|
||||
#include "Session.h"
|
||||
#include "Math/CalcBattle.h"
|
||||
#include "Actor.h"
|
||||
#include "Player.h"
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "Forwards.h"
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <queue>
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
#include <stdint.h>
|
||||
#include <cmath>
|
||||
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <src/servers/Server_Common/Util/Util.h>
|
||||
#include <src/servers/Server_Common/Util/UtilMath.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Util/Util.h>
|
||||
#include <Server_Common/Util/UtilMath.h>
|
||||
|
||||
#include "Player.h"
|
||||
#include "BattleNpc.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/MoveActorPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "Network/PacketWrappers/MoveActorPacket.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
|
||||
using namespace Core::Common;
|
||||
using namespace Core::Network::Packets;
|
||||
|
@ -87,7 +87,7 @@ Core::Entity::BattleNpc::BattleNpc( uint16_t modelId, uint16_t nameid, const Com
|
|||
}
|
||||
|
||||
// spawn this player for pTarget
|
||||
void Core::Entity::BattleNpc::spawn( Core::Entity::PlayerPtr pTarget )
|
||||
void Core::Entity::BattleNpc::spawn( PlayerPtr pTarget )
|
||||
{
|
||||
//GamePacketNew< FFXIVIpcActorSpawn > spawnPacket( getId(), pTarget->getId() );
|
||||
|
||||
|
@ -149,7 +149,7 @@ void Core::Entity::BattleNpc::spawn( Core::Entity::PlayerPtr pTarget )
|
|||
}
|
||||
|
||||
// despawn
|
||||
void Core::Entity::BattleNpc::despawn( Core::Entity::ActorPtr pTarget )
|
||||
void Core::Entity::BattleNpc::despawn( ActorPtr pTarget )
|
||||
{
|
||||
|
||||
auto pPlayer = pTarget->getAsPlayer();
|
||||
|
@ -171,7 +171,7 @@ Core::Entity::StateMode Core::Entity::BattleNpc::getMode() const
|
|||
return m_mode;
|
||||
}
|
||||
|
||||
void Core::Entity::BattleNpc::setMode( Core::Entity::StateMode mode )
|
||||
void Core::Entity::BattleNpc::setMode( StateMode mode )
|
||||
{
|
||||
m_mode = mode;
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ uint8_t Core::Entity::BattleNpc::getbehavior() const
|
|||
return m_behavior;
|
||||
}
|
||||
|
||||
void Core::Entity::BattleNpc::hateListAdd( Core::Entity::ActorPtr pActor, int32_t hateAmount )
|
||||
void Core::Entity::BattleNpc::hateListAdd( ActorPtr pActor, int32_t hateAmount )
|
||||
{
|
||||
auto hateEntry = new HateListEntry();
|
||||
hateEntry->m_hateAmount = hateAmount;
|
||||
|
@ -211,7 +211,7 @@ Core::Entity::ActorPtr Core::Entity::BattleNpc::hateListGetHighest()
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
void Core::Entity::BattleNpc::setOwner( Core::Entity::PlayerPtr pPlayer )
|
||||
void Core::Entity::BattleNpc::setOwner( PlayerPtr pPlayer )
|
||||
{
|
||||
m_pOwner = pPlayer;
|
||||
|
||||
|
@ -278,7 +278,7 @@ bool Core::Entity::BattleNpc::moveTo( Common::FFXIVARR_POSITION3& pos )
|
|||
|
||||
}
|
||||
|
||||
void Core::Entity::BattleNpc::aggro( Core::Entity::ActorPtr pActor )
|
||||
void Core::Entity::BattleNpc::aggro( ActorPtr pActor )
|
||||
{
|
||||
|
||||
m_lastAttack = Util::getTimeMs();
|
||||
|
@ -296,7 +296,7 @@ void Core::Entity::BattleNpc::aggro( Core::Entity::ActorPtr pActor )
|
|||
}
|
||||
}
|
||||
|
||||
void Core::Entity::BattleNpc::deaggro( Core::Entity::ActorPtr pActor )
|
||||
void Core::Entity::BattleNpc::deaggro( ActorPtr pActor )
|
||||
{
|
||||
if( !hateListHasActor( pActor ) )
|
||||
hateListRemove( pActor );
|
||||
|
@ -322,7 +322,7 @@ void Core::Entity::BattleNpc::hateListClear()
|
|||
}
|
||||
|
||||
|
||||
void Core::Entity::BattleNpc::hateListRemove( Core::Entity::ActorPtr pActor )
|
||||
void Core::Entity::BattleNpc::hateListRemove( ActorPtr pActor )
|
||||
{
|
||||
auto it = m_hateList.begin();
|
||||
for( ; it != m_hateList.end(); ++it )
|
||||
|
@ -342,7 +342,7 @@ void Core::Entity::BattleNpc::hateListRemove( Core::Entity::ActorPtr pActor )
|
|||
}
|
||||
}
|
||||
|
||||
bool Core::Entity::BattleNpc::hateListHasActor( Core::Entity::ActorPtr pActor )
|
||||
bool Core::Entity::BattleNpc::hateListHasActor( ActorPtr pActor )
|
||||
{
|
||||
auto it = m_hateList.begin();
|
||||
for( ; it != m_hateList.end(); ++it )
|
||||
|
@ -363,7 +363,7 @@ uint32_t Core::Entity::BattleNpc::getNameId() const
|
|||
return m_nameId;
|
||||
}
|
||||
|
||||
void Core::Entity::BattleNpc::hateListUpdate( Core::Entity::ActorPtr pActor, int32_t hateAmount )
|
||||
void Core::Entity::BattleNpc::hateListUpdate( ActorPtr pActor, int32_t hateAmount )
|
||||
{
|
||||
|
||||
auto it = m_hateList.begin();
|
||||
|
@ -452,7 +452,7 @@ void Core::Entity::BattleNpc::onDeath()
|
|||
hateListClear();
|
||||
}
|
||||
|
||||
void Core::Entity::BattleNpc::onActionHostile( Core::Entity::ActorPtr pSource )
|
||||
void Core::Entity::BattleNpc::onActionHostile( ActorPtr pSource )
|
||||
{
|
||||
|
||||
if( hateListGetHighest() == nullptr )
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include "Actor.h"
|
||||
|
||||
namespace Core {
|
||||
|
||||
namespace Entity {
|
||||
|
||||
enum StateMode
|
||||
|
@ -76,7 +75,7 @@ public:
|
|||
|
||||
void onDeath() override;
|
||||
|
||||
void onActionHostile( Core::Entity::ActorPtr pSource ) override;
|
||||
void onActionHostile( ActorPtr pSource ) override;
|
||||
|
||||
ActorPtr getClaimer() const;
|
||||
|
||||
|
|
|
@ -1,46 +1,45 @@
|
|||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Util/Util.h>
|
||||
#include <src/servers/Server_Common/Util/UtilMath.h>
|
||||
#include <src/servers/Server_Common/Config/XMLConfig.h>
|
||||
#include <src/servers/Server_Common/Network/GamePacket.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <src/servers/Server_Common/Network/PacketContainer.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Util/Util.h>
|
||||
#include <Server_Common/Util/UtilMath.h>
|
||||
#include <Server_Common/Config/XMLConfig.h>
|
||||
#include <Server_Common/Network/GamePacket.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Network/PacketContainer.h>
|
||||
|
||||
#include "src/servers/Server_Zone/Session.h"
|
||||
#include "Session.h"
|
||||
#include "Player.h"
|
||||
#include "BattleNpc.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Zone/ZoneMgr.h"
|
||||
#include "src/servers/Server_Zone/Zone/Zone.h"
|
||||
#include "Zone/ZoneMgr.h"
|
||||
#include "Zone/Zone.h"
|
||||
|
||||
#include "src/servers/Server_Zone/ServerZone.h"
|
||||
#include "ServerZone.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/GameConnection.h"
|
||||
#include "Network/GameConnection.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "Network/PacketWrappers/InitUIPacket.h"
|
||||
#include "Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "Network/PacketWrappers/ChatPacket.h"
|
||||
#include "Network/PacketWrappers/ModelEquipPacket.h"
|
||||
#include "Network/PacketWrappers/ActorSpawnPacket.h"
|
||||
#include "Network/PacketWrappers/UpdateHpMpTpPacket.h"
|
||||
#include "Network/PacketWrappers/PlayerStateFlagsPacket.h"
|
||||
#include "Network/PacketWrappers/PlayerSpawnPacket.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/InitUIPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ChatPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ModelEquipPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorSpawnPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/UpdateHpMpTpPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/PlayerStateFlagsPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/PlayerSpawnPacket.h"
|
||||
#include "Script/ScriptManager.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Script/ScriptManager.h"
|
||||
#include "Inventory/Item.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Inventory/Item.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Inventory/Inventory.h"
|
||||
#include "src/servers/Server_Zone/Event/Event.h"
|
||||
#include "src/servers/Server_Zone/Action/Action.h"
|
||||
#include "src/servers/Server_Zone/Action/EventAction.h"
|
||||
#include "src/servers/Server_Zone/Action/EventItemAction.h"
|
||||
#include "src/servers/Server_Zone/Zone/ZonePosition.h"
|
||||
#include "src/servers/Server_Zone/Math/CalcStats.h"
|
||||
#include "src/servers/Server_Zone/Math/CalcBattle.h"
|
||||
#include "Inventory/Inventory.h"
|
||||
#include "Event/Event.h"
|
||||
#include "Action/Action.h"
|
||||
#include "Action/EventAction.h"
|
||||
#include "Action/EventItemAction.h"
|
||||
#include "Zone/ZonePosition.h"
|
||||
#include "Math/CalcStats.h"
|
||||
#include "Math/CalcBattle.h"
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
extern Core::Logger g_log;
|
||||
|
@ -743,7 +742,7 @@ uint8_t Core::Entity::Player::getLevel() const
|
|||
return static_cast< uint8_t >( m_classArray[classJobIndex] );
|
||||
}
|
||||
|
||||
uint8_t Core::Entity::Player::getLevelForClass( Core::Common::ClassJob pClass ) const
|
||||
uint8_t Core::Entity::Player::getLevelForClass( Common::ClassJob pClass ) const
|
||||
{
|
||||
uint8_t classJobIndex = g_exdData.m_classJobInfoMap[static_cast< uint8_t >( pClass )].exp_idx;
|
||||
return static_cast< uint8_t >( m_classArray[classJobIndex] );
|
||||
|
@ -772,7 +771,7 @@ void Core::Entity::Player::setInCombat( bool mode )
|
|||
m_bInCombat = mode;
|
||||
}
|
||||
|
||||
void Core::Entity::Player::setClassJob( Core::Common::ClassJob classJob )
|
||||
void Core::Entity::Player::setClassJob( Common::ClassJob classJob )
|
||||
{
|
||||
m_class = classJob;
|
||||
uint8_t level = getLevel();
|
||||
|
@ -801,7 +800,7 @@ void Core::Entity::Player::setLevel( uint8_t level )
|
|||
m_classArray[classJobIndex] = level;
|
||||
}
|
||||
|
||||
void Core::Entity::Player::setLevelForClass( uint8_t level, Core::Common::ClassJob classjob )
|
||||
void Core::Entity::Player::setLevelForClass( uint8_t level, Common::ClassJob classjob )
|
||||
{
|
||||
uint8_t classJobIndex = g_exdData.m_classJobInfoMap[static_cast< uint8_t >( classjob )].exp_idx;
|
||||
m_classArray[classJobIndex] = level;
|
||||
|
@ -871,7 +870,7 @@ void Core::Entity::Player::setLookAt( uint8_t index, uint8_t value )
|
|||
}
|
||||
|
||||
// spawn this player for pTarget
|
||||
void Core::Entity::Player::spawn( Core::Entity::PlayerPtr pTarget )
|
||||
void Core::Entity::Player::spawn( Entity::PlayerPtr pTarget )
|
||||
{
|
||||
g_log.debug( "[" + std::to_string( pTarget->getId() ) + "] Spawning " +
|
||||
getName() + " for " +
|
||||
|
@ -882,7 +881,7 @@ void Core::Entity::Player::spawn( Core::Entity::PlayerPtr pTarget )
|
|||
}
|
||||
|
||||
// despawn
|
||||
void Core::Entity::Player::despawn( Core::Entity::ActorPtr pTarget )
|
||||
void Core::Entity::Player::despawn( Entity::ActorPtr pTarget )
|
||||
{
|
||||
auto pPlayer = pTarget->getAsPlayer();
|
||||
|
||||
|
@ -893,7 +892,7 @@ void Core::Entity::Player::despawn( Core::Entity::ActorPtr pTarget )
|
|||
|
||||
Core::Entity::ActorPtr Core::Entity::Player::lookupTargetById( uint64_t targetId )
|
||||
{
|
||||
Core::Entity::ActorPtr targetActor;
|
||||
ActorPtr targetActor;
|
||||
auto inRange = getInRangeActors( true );
|
||||
for( auto actor : inRange )
|
||||
{
|
||||
|
@ -957,7 +956,7 @@ bool Core::Entity::Player::actionHasCastTime( uint32_t actionId ) //TODO: Add lo
|
|||
|
||||
}
|
||||
|
||||
bool Core::Entity::Player::hasStateFlag( Core::Common::PlayerStateFlag flag ) const
|
||||
bool Core::Entity::Player::hasStateFlag( Common::PlayerStateFlag flag ) const
|
||||
{
|
||||
int32_t iFlag = static_cast< uint32_t >( flag );
|
||||
|
||||
|
@ -968,7 +967,7 @@ bool Core::Entity::Player::hasStateFlag( Core::Common::PlayerStateFlag flag ) co
|
|||
return ( m_stateFlags[index] & value ) != 0;
|
||||
}
|
||||
|
||||
void Core::Entity::Player::setStateFlag( Core::Common::PlayerStateFlag flag )
|
||||
void Core::Entity::Player::setStateFlag( Common::PlayerStateFlag flag )
|
||||
{
|
||||
int32_t iFlag = static_cast< uint32_t >( flag );
|
||||
|
||||
|
@ -999,7 +998,7 @@ void Core::Entity::Player::sendStateFlags()
|
|||
queuePacket( PlayerStateFlagsPacket( *getAsPlayer() ) );
|
||||
}
|
||||
|
||||
void Core::Entity::Player::unsetStateFlag( Core::Common::PlayerStateFlag flag )
|
||||
void Core::Entity::Player::unsetStateFlag( Common::PlayerStateFlag flag )
|
||||
{
|
||||
if( !hasStateFlag( flag ) )
|
||||
return;
|
||||
|
@ -1209,7 +1208,7 @@ const uint8_t* Core::Entity::Player::getGcRankArray() const
|
|||
return m_gcRank;
|
||||
}
|
||||
|
||||
void Core::Entity::Player::queuePacket( Core::Network::Packets::GamePacketPtr pPacket )
|
||||
void Core::Entity::Player::queuePacket( Network::Packets::GamePacketPtr pPacket )
|
||||
{
|
||||
auto pSession = g_serverZone.getSession( m_id );
|
||||
|
||||
|
@ -1223,7 +1222,7 @@ void Core::Entity::Player::queuePacket( Core::Network::Packets::GamePacketPtr pP
|
|||
|
||||
}
|
||||
|
||||
void Core::Entity::Player::queueChatPacket( Core::Network::Packets::GamePacketPtr pPacket )
|
||||
void Core::Entity::Player::queueChatPacket( Network::Packets::GamePacketPtr pPacket )
|
||||
{
|
||||
auto pSession = g_serverZone.getSession( m_id );
|
||||
|
||||
|
@ -1246,7 +1245,7 @@ void Core::Entity::Player::setLoadingComplete( bool bComplete )
|
|||
m_bLoadingComplete = bComplete;
|
||||
}
|
||||
|
||||
void Core::Entity::Player::performZoning(uint16_t zoneId, const Common::FFXIVARR_POSITION3 &pos, float rotation)
|
||||
void Core::Entity::Player::performZoning( uint16_t zoneId, const Common::FFXIVARR_POSITION3 &pos, float rotation )
|
||||
{
|
||||
m_pos = pos;
|
||||
m_zoneId = zoneId;
|
||||
|
@ -1319,14 +1318,14 @@ void Core::Entity::Player::updateHowtosSeen( uint32_t howToId )
|
|||
}
|
||||
|
||||
|
||||
void Core::Entity::Player::onMobAggro( Core::Entity::BattleNpcPtr pBNpc )
|
||||
void Core::Entity::Player::onMobAggro( BattleNpcPtr pBNpc )
|
||||
{
|
||||
hateListAdd( pBNpc );
|
||||
|
||||
queuePacket( ActorControlPacket142( getId(), ToggleAggro, 1 ) );
|
||||
}
|
||||
|
||||
void Core::Entity::Player::onMobDeaggro( Core::Entity::BattleNpcPtr pBNpc )
|
||||
void Core::Entity::Player::onMobDeaggro( BattleNpcPtr pBNpc )
|
||||
{
|
||||
hateListRemove( pBNpc );
|
||||
|
||||
|
@ -1334,7 +1333,7 @@ void Core::Entity::Player::onMobDeaggro( Core::Entity::BattleNpcPtr pBNpc )
|
|||
queuePacket( ActorControlPacket142( getId(), ToggleAggro ) );
|
||||
}
|
||||
|
||||
void Core::Entity::Player::hateListAdd( Core::Entity::BattleNpcPtr pBNpc )
|
||||
void Core::Entity::Player::hateListAdd( BattleNpcPtr pBNpc )
|
||||
|
||||
{
|
||||
if( m_freeHateSlotQueue.empty() )
|
||||
|
@ -1346,7 +1345,7 @@ void Core::Entity::Player::hateListAdd( Core::Entity::BattleNpcPtr pBNpc )
|
|||
|
||||
}
|
||||
|
||||
void Core::Entity::Player::hateListRemove( Core::Entity::BattleNpcPtr pBNpc )
|
||||
void Core::Entity::Player::hateListRemove( BattleNpcPtr pBNpc )
|
||||
{
|
||||
|
||||
auto it = m_actorIdTohateSlotMap.begin();
|
||||
|
@ -1364,7 +1363,7 @@ void Core::Entity::Player::hateListRemove( Core::Entity::BattleNpcPtr pBNpc )
|
|||
}
|
||||
}
|
||||
|
||||
bool Core::Entity::Player::hateListHasMob( Core::Entity::BattleNpcPtr pBNpc )
|
||||
bool Core::Entity::Player::hateListHasMob( BattleNpcPtr pBNpc )
|
||||
{
|
||||
|
||||
auto it = m_actorIdTohateSlotMap.begin();
|
||||
|
@ -1406,7 +1405,7 @@ void Core::Entity::Player::setIsLogin( bool bIsLogin )
|
|||
m_bIsLogin = bIsLogin;
|
||||
}
|
||||
|
||||
uint8_t * Core::Entity::Player::getTitleList()
|
||||
uint8_t* Core::Entity::Player::getTitleList()
|
||||
{
|
||||
return m_titleList;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#ifndef _PLAYER_H
|
||||
#define _PLAYER_H
|
||||
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <Server_Common/Common.h>
|
||||
|
||||
#include "Actor.h"
|
||||
#include "src/servers/Server_Zone/Inventory/Inventory.h"
|
||||
#include "Inventory/Inventory.h"
|
||||
#include <map>
|
||||
#include <queue>
|
||||
|
||||
|
@ -242,7 +242,7 @@ public:
|
|||
/*! returns the level of the currently active class / job */
|
||||
uint8_t getLevel() const override;
|
||||
/*! returns the level of the provided class / job */
|
||||
uint8_t getLevelForClass( Core::Common::ClassJob pClass ) const;
|
||||
uint8_t getLevelForClass( Common::ClassJob pClass ) const;
|
||||
/*! returns the exp of the currently active class / job */
|
||||
uint32_t getExp() const;
|
||||
/*! sets the exp of the currently active class / job */
|
||||
|
@ -254,9 +254,9 @@ public:
|
|||
/*! set level on the currently active class / job to given level */
|
||||
void setLevel( uint8_t level );
|
||||
/*! set level on the provided class / job to given level */
|
||||
void setLevelForClass( uint8_t level, Core::Common::ClassJob classjob );
|
||||
void setLevelForClass( uint8_t level, Common::ClassJob classjob );
|
||||
/*! change class or job to given class / job */
|
||||
void setClassJob( Core::Common::ClassJob classJob );
|
||||
void setClassJob( Common::ClassJob classJob );
|
||||
/*! returns a pointer to the class array */
|
||||
uint16_t* getClassArray();
|
||||
/*! returns a const pointer to the class array */
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Network/GamePacket.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <src/servers/Server_Common/Network/PacketContainer.h>
|
||||
#include <src/servers/Server_Common/Config/XMLConfig.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Network/GamePacket.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Network/PacketContainer.h>
|
||||
#include <Server_Common/Config/XMLConfig.h>
|
||||
|
||||
#include "Player.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Zone/Zone.h"
|
||||
#include "Zone/Zone.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/GameConnection.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/InitUIPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/EventStartPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/EventPlayPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/EventFinishPacket.h"
|
||||
#include "Network/GameConnection.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/InitUIPacket.h"
|
||||
#include "Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "Network/PacketWrappers/EventStartPacket.h"
|
||||
#include "Network/PacketWrappers/EventPlayPacket.h"
|
||||
#include "Network/PacketWrappers/EventFinishPacket.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Action/EventAction.h"
|
||||
#include "src/servers/Server_Zone/Action/EventItemAction.h"
|
||||
#include "Action/EventAction.h"
|
||||
#include "Action/EventItemAction.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Event/Event.h"
|
||||
#include "src/servers/Server_Zone/Event/Event.h"
|
||||
#include "Server_Zone/ServerZone.h"
|
||||
#include "Event/Event.h"
|
||||
#include "Event/Event.h"
|
||||
#include "ServerZone.h"
|
||||
|
||||
extern Core::Logger g_log;
|
||||
extern Core::ServerZone g_serverZone;
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <src/servers/Server_Common/Network/GamePacket.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Network/GamePacket.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
|
||||
#include "Player.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Zone/ZoneMgr.h"
|
||||
#include "src/servers/Server_Zone/Zone/Zone.h"
|
||||
#include "Zone/ZoneMgr.h"
|
||||
#include "Zone/Zone.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Inventory/Inventory.h"
|
||||
#include "src/servers/Server_Zone/Inventory/Item.h"
|
||||
#include "Inventory/Inventory.h"
|
||||
#include "Inventory/Item.h"
|
||||
|
||||
extern Core::Logger g_log;
|
||||
|
||||
|
@ -31,7 +31,7 @@ void Core::Entity::Player::sendItemLevel()
|
|||
}
|
||||
|
||||
// TODO: This has to be redone and simplified
|
||||
void Core::Entity::Player::equipWeapon( Core::ItemPtr pItem )
|
||||
void Core::Entity::Player::equipWeapon( ItemPtr pItem )
|
||||
{
|
||||
ClassJob currentClass = static_cast< ClassJob >( getClass() );
|
||||
|
||||
|
@ -86,7 +86,7 @@ void Core::Entity::Player::equipWeapon( Core::ItemPtr pItem )
|
|||
}
|
||||
|
||||
// equip an item
|
||||
void Core::Entity::Player::equipItem( Inventory::EquipSlot equipSlotId, Core::ItemPtr pItem, bool sendUpdate )
|
||||
void Core::Entity::Player::equipItem( Inventory::EquipSlot equipSlotId, ItemPtr pItem, bool sendUpdate )
|
||||
{
|
||||
|
||||
//g_log.debug( "Equipping into slot " + std::to_string( equipSlotId ) );
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Network/PacketDef/Zone/ServerZoneDef.h>
|
||||
#include <src/servers/Server_Common/Network/GamePacket.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <src/servers/Server_Common/Network/PacketContainer.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Network/PacketDef/Zone/ServerZoneDef.h>
|
||||
#include <Server_Common/Network/GamePacket.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Network/PacketContainer.h>
|
||||
|
||||
#include "src/servers/Server_Zone/Network/GameConnection.h"
|
||||
#include "Network/GameConnection.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/QuestMessagePacket.h"
|
||||
#include "Network/PacketWrappers/QuestMessagePacket.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Session.h"
|
||||
#include "Server_Zone/Session.h"
|
||||
#include "Player.h"
|
||||
#include "src/servers/Server_Zone/Inventory/Inventory.h"
|
||||
#include "Server_Zone/Inventory/Inventory.h"
|
||||
|
||||
extern Core::Data::ExdData g_exdData;
|
||||
|
||||
|
|
|
@ -1,34 +1,32 @@
|
|||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Network/GamePacket.h>
|
||||
#include <src/servers/Server_Common/Util/Util.h>
|
||||
#include <src/servers/Server_Common/Util/UtilMath.h>
|
||||
#include <src/servers/Server_Common/Config/XMLConfig.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <src/servers/Server_Common/Network/PacketContainer.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Network/GamePacket.h>
|
||||
#include <Server_Common/Util/Util.h>
|
||||
#include <Server_Common/Util/UtilMath.h>
|
||||
#include <Server_Common/Config/XMLConfig.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Network/PacketContainer.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Database/DatabaseDef.h>
|
||||
|
||||
#include <set>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <time.h>
|
||||
|
||||
|
||||
#include <servers/Server_Common/Common.h>
|
||||
|
||||
#include "Player.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Zone/ZoneMgr.h"
|
||||
#include "src/servers/Server_Zone/Zone/Zone.h"
|
||||
#include "Zone/ZoneMgr.h"
|
||||
#include "Zone/Zone.h"
|
||||
|
||||
#include "src/servers/Server_Zone/ServerZone.h"
|
||||
#include "ServerZone.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/GameConnection.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/InitUIPacket.h"
|
||||
#include "src/servers/Server_Zone/Inventory/Inventory.h"
|
||||
#include "Network/GameConnection.h"
|
||||
#include "Network/PacketWrappers/InitUIPacket.h"
|
||||
#include "Inventory/Inventory.h"
|
||||
|
||||
#include <Server_Common/Database/DatabaseDef.h>
|
||||
|
||||
extern Core::Logger g_log;
|
||||
extern Core::ServerZone g_serverZone;
|
||||
|
@ -41,11 +39,11 @@ using namespace Core::Network::Packets;
|
|||
using namespace Core::Network::Packets::Server;
|
||||
|
||||
// load player from the db
|
||||
bool Core::Entity::Player::load( uint32_t charId, Core::SessionPtr pSession )
|
||||
bool Core::Entity::Player::load( uint32_t charId, SessionPtr pSession )
|
||||
{
|
||||
const std::string char_id_str = std::to_string( charId );
|
||||
|
||||
auto stmt = g_charaDb.getPreparedStatement( Core::Db::CharaDbStatements::CHARA_SEL );
|
||||
auto stmt = g_charaDb.getPreparedStatement( Db::CharaDbStatements::CHARA_SEL );
|
||||
|
||||
stmt->setUInt( 1, charId );
|
||||
auto res = g_charaDb.query( stmt );
|
||||
|
@ -220,7 +218,7 @@ bool Core::Entity::Player::load( uint32_t charId, Core::SessionPtr pSession )
|
|||
bool Core::Entity::Player::loadActiveQuests()
|
||||
{
|
||||
|
||||
auto stmt = g_charaDb.getPreparedStatement( Core::Db::CharaDbStatements::CHARA_QUEST_SEL );
|
||||
auto stmt = g_charaDb.getPreparedStatement( Db::CharaDbStatements::CHARA_QUEST_SEL );
|
||||
|
||||
stmt->setUInt( 1, m_id );
|
||||
auto res = g_charaDb.query( stmt );
|
||||
|
@ -257,7 +255,7 @@ bool Core::Entity::Player::loadClassData()
|
|||
{
|
||||
|
||||
// ClassIdx, Exp, Lvl
|
||||
auto stmt = g_charaDb.getPreparedStatement( Core::Db::CharaDbStatements::CHARA_CLASS_SEL );
|
||||
auto stmt = g_charaDb.getPreparedStatement( Db::CharaDbStatements::CHARA_CLASS_SEL );
|
||||
stmt->setUInt( 1, m_id );
|
||||
auto res = g_charaDb.query( stmt );
|
||||
|
||||
|
@ -276,7 +274,7 @@ bool Core::Entity::Player::loadClassData()
|
|||
|
||||
bool Core::Entity::Player::loadSearchInfo()
|
||||
{
|
||||
auto stmt = g_charaDb.getPreparedStatement( Core::Db::CharaDbStatements::CHARA_SEARCHINFO_SEL );
|
||||
auto stmt = g_charaDb.getPreparedStatement( Db::CharaDbStatements::CHARA_SEARCHINFO_SEL );
|
||||
stmt->setUInt( 1, m_id );
|
||||
auto res = g_charaDb.query( stmt );
|
||||
|
||||
|
@ -304,7 +302,7 @@ void Core::Entity::Player::updateSql()
|
|||
"EquippedMannequin 44, ConfigFlags 45, QuestCompleteFlags 46, OpeningSequence 47, "
|
||||
"QuestTracking 48, GrandCompany 49, GrandCompanyRank 50, Discovery 51, GMRank 52, Unlocks 53, "
|
||||
"CFPenaltyUntil 54"*/
|
||||
auto stmt = g_charaDb.getPreparedStatement( Core::Db::CharaDbStatements::CHARA_UP );
|
||||
auto stmt = g_charaDb.getPreparedStatement( Db::CharaDbStatements::CHARA_UP );
|
||||
|
||||
stmt->setInt( 1, getHp() );
|
||||
stmt->setInt( 2, getMp() );
|
||||
|
@ -431,7 +429,7 @@ void Core::Entity::Player::updateDbClass() const
|
|||
uint8_t classJobIndex = g_exdData.m_classJobInfoMap[static_cast< uint8_t >( getClass() )].exp_idx;
|
||||
|
||||
//Exp = ?, Lvl = ? WHERE CharacterId = ? AND ClassIdx = ?
|
||||
auto stmtS = g_charaDb.getPreparedStatement( Core::Db::CHARA_CLASS_UP );
|
||||
auto stmtS = g_charaDb.getPreparedStatement( Db::CHARA_CLASS_UP );
|
||||
stmtS->setInt( 1, getExp() );
|
||||
stmtS->setInt( 2, getLevel() );
|
||||
stmtS->setInt( 3, m_id );
|
||||
|
@ -441,17 +439,17 @@ void Core::Entity::Player::updateDbClass() const
|
|||
|
||||
void Core::Entity::Player::updateDbSearchInfo() const
|
||||
{
|
||||
auto stmtS = g_charaDb.getPreparedStatement( Core::Db::CHARA_SEARCHINFO_UP_SELECTCLASS );
|
||||
auto stmtS = g_charaDb.getPreparedStatement( Db::CHARA_SEARCHINFO_UP_SELECTCLASS );
|
||||
stmtS->setInt( 1, m_searchSelectClass );
|
||||
stmtS->setInt( 2, m_id );
|
||||
g_charaDb.execute( stmtS );
|
||||
|
||||
auto stmtS1 = g_charaDb.getPreparedStatement( Core::Db::CHARA_SEARCHINFO_UP_SELECTREGION );
|
||||
auto stmtS1 = g_charaDb.getPreparedStatement( Db::CHARA_SEARCHINFO_UP_SELECTREGION );
|
||||
stmtS1->setInt( 1, m_searchSelectRegion );
|
||||
stmtS1->setInt( 2, m_id );
|
||||
g_charaDb.execute( stmtS1 );
|
||||
|
||||
auto stmtS2 = g_charaDb.getPreparedStatement( Core::Db::CHARA_SEARCHINFO_UP_SELECTREGION );
|
||||
auto stmtS2 = g_charaDb.getPreparedStatement( Db::CHARA_SEARCHINFO_UP_SELECTREGION );
|
||||
stmtS2->setString( 1, string( m_searchMessage != nullptr ? m_searchMessage : "" ) );
|
||||
stmtS2->setInt( 2, m_id );
|
||||
g_charaDb.execute( stmtS2 );
|
||||
|
@ -465,7 +463,7 @@ void Core::Entity::Player::updateDbAllQuests() const
|
|||
if( !m_activeQuests[i] )
|
||||
continue;
|
||||
|
||||
auto stmtS3 = g_charaDb.getPreparedStatement( Core::Db::CHARA_QUEST_UP );
|
||||
auto stmtS3 = g_charaDb.getPreparedStatement( Db::CHARA_QUEST_UP );
|
||||
stmtS3->setInt( 1, m_activeQuests[i]->c.sequence );
|
||||
stmtS3->setInt( 2, m_activeQuests[i]->c.flags );
|
||||
stmtS3->setInt( 3, m_activeQuests[i]->c.UI8A );
|
||||
|
@ -484,7 +482,7 @@ void Core::Entity::Player::updateDbAllQuests() const
|
|||
|
||||
void Core::Entity::Player::deleteQuest( uint16_t questId ) const
|
||||
{
|
||||
auto stmt = g_charaDb.getPreparedStatement( Core::Db::CHARA_QUEST_DEL );
|
||||
auto stmt = g_charaDb.getPreparedStatement( Db::CHARA_QUEST_DEL );
|
||||
stmt->setInt( 1, m_id );
|
||||
stmt->setInt( 2, questId );
|
||||
g_charaDb.execute( stmt );
|
||||
|
@ -492,7 +490,7 @@ void Core::Entity::Player::deleteQuest( uint16_t questId ) const
|
|||
|
||||
void Core::Entity::Player::insertQuest( uint16_t questId, uint8_t index, uint8_t seq ) const
|
||||
{
|
||||
auto stmt = g_charaDb.getPreparedStatement( Core::Db::CHARA_QUEST_INS );
|
||||
auto stmt = g_charaDb.getPreparedStatement( Db::CHARA_QUEST_INS );
|
||||
stmt->setInt( 1, m_id );
|
||||
stmt->setInt( 2, index );
|
||||
stmt->setInt( 3, questId );
|
||||
|
|
|
@ -3,6 +3,7 @@ cmake_policy(SET CMP0015 NEW)
|
|||
cmake_policy(SET CMP0014 OLD)
|
||||
|
||||
project(Sapphire_Zone)
|
||||
include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||
|
||||
file(GLOB SERVER_PUBLIC_INCLUDE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
/*.h
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#ifndef _GAMECOMMAND_H_
|
||||
#define _GAMECOMMAND_H_
|
||||
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <Server_Common/Common.h>
|
||||
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "Actor/Player.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
namespace Core {
|
||||
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Version.h>
|
||||
#include <src/servers/Server_Common/Network/GamePacketNew.h>
|
||||
#include <src/servers/Server_Common/Network/CommonNetwork.h>
|
||||
#include <src/servers/Server_Common/Util/UtilMath.h>
|
||||
#include <src/servers/Server_Common/Network/PacketContainer.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Version.h>
|
||||
#include <Server_Common/Network/GamePacketNew.h>
|
||||
#include <Server_Common/Network/CommonNetwork.h>
|
||||
#include <Server_Common/Util/UtilMath.h>
|
||||
#include <Server_Common/Network/PacketContainer.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Database/DatabaseDef.h>
|
||||
|
||||
#include "DebugCommand.h"
|
||||
#include "DebugCommandHandler.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/InitUIPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/GameConnection.h"
|
||||
#include "src/servers/Server_Zone/Script/ScriptManager.h"
|
||||
#include "Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "Network/PacketWrappers/InitUIPacket.h"
|
||||
#include "Network/GameConnection.h"
|
||||
#include "Script/ScriptManager.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "src/servers/Server_Zone/Actor/BattleNpc.h"
|
||||
#include "Actor/Player.h"
|
||||
#include "Actor/BattleNpc.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Zone/Zone.h"
|
||||
#include "Zone/Zone.h"
|
||||
|
||||
#include "src/servers/Server_Zone/ServerZone.h"
|
||||
#include "ServerZone.h"
|
||||
|
||||
#include "src/servers/Server_Zone/StatusEffect/StatusEffect.h"
|
||||
#include "src/servers/Server_Zone/Session.h"
|
||||
#include "StatusEffect/StatusEffect.h"
|
||||
#include "Session.h"
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
#include <Server_Common/Database/DatabaseDef.h>
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
|
@ -63,14 +63,14 @@ Core::DebugCommandHandler::~DebugCommandHandler()
|
|||
}
|
||||
|
||||
// add a command set to the register map
|
||||
void Core::DebugCommandHandler::registerCommand( const std::string& n, Core::DebugCommand::pFunc functionPtr,
|
||||
void Core::DebugCommandHandler::registerCommand( const std::string& n, DebugCommand::pFunc functionPtr,
|
||||
const std::string& hText, uint8_t uLevel )
|
||||
{
|
||||
m_commandMap[std::string( n )] = boost::make_shared< DebugCommand >( n, functionPtr, hText, uLevel );
|
||||
}
|
||||
|
||||
// try to retrieve the command in question, execute if found
|
||||
void Core::DebugCommandHandler::execCommand( char * data, Core::Entity::Player& player )
|
||||
void Core::DebugCommandHandler::execCommand( char * data, Entity::Player& player )
|
||||
{
|
||||
|
||||
// define callback pointer
|
||||
|
@ -117,14 +117,14 @@ void Core::DebugCommandHandler::execCommand( char * data, Core::Entity::Player&
|
|||
// Definition of the commands
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Core::DebugCommandHandler::scriptReload( char * data, Core::Entity::Player& player,
|
||||
boost::shared_ptr<Core::DebugCommand> command )
|
||||
void Core::DebugCommandHandler::scriptReload( char * data, Entity::Player& player,
|
||||
boost::shared_ptr< DebugCommand > command )
|
||||
{
|
||||
g_scriptMgr.reload();
|
||||
player.sendDebug( "Scripts reloaded." );
|
||||
}
|
||||
|
||||
void Core::DebugCommandHandler::help( char* data, Entity::Player& player, boost::shared_ptr< Core::DebugCommand > command )
|
||||
void Core::DebugCommandHandler::help( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command )
|
||||
{
|
||||
player.sendDebug( "Registered debug commands:" );
|
||||
for ( auto cmd : m_commandMap )
|
||||
|
@ -136,7 +136,7 @@ void Core::DebugCommandHandler::help( char* data, Entity::Player& player, boost:
|
|||
}
|
||||
}
|
||||
|
||||
void Core::DebugCommandHandler::set( char * data, Core::Entity::Player& player, boost::shared_ptr< Core::DebugCommand > command )
|
||||
void Core::DebugCommandHandler::set( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command )
|
||||
{
|
||||
std::string subCommand = "";
|
||||
std::string params = "";
|
||||
|
@ -240,13 +240,13 @@ void Core::DebugCommandHandler::set( char * data, Core::Entity::Player& player,
|
|||
|
||||
sscanf( params.c_str(), "%d", &id );
|
||||
|
||||
if( player.getLevelForClass( static_cast<Core::Common::ClassJob> ( id ) ) == 0 )
|
||||
if( player.getLevelForClass( static_cast< Common::ClassJob > ( id ) ) == 0 )
|
||||
{
|
||||
player.setLevelForClass( 1, static_cast<Core::Common::ClassJob> ( id ) );
|
||||
player.setClassJob( static_cast<Core::Common::ClassJob> ( id ) );
|
||||
player.setLevelForClass( 1, static_cast< Common::ClassJob > ( id ) );
|
||||
player.setClassJob( static_cast< Common::ClassJob > ( id ) );
|
||||
}
|
||||
else
|
||||
player.setClassJob( static_cast<Core::Common::ClassJob> ( id ) );
|
||||
player.setClassJob( static_cast< Common::ClassJob > ( id ) );
|
||||
}
|
||||
else if ( subCommand == "cfpenalty" )
|
||||
{
|
||||
|
@ -269,7 +269,7 @@ void Core::DebugCommandHandler::set( char * data, Core::Entity::Player& player,
|
|||
uint32_t val;
|
||||
sscanf( params.c_str(), "%d %d", &slot, &val );
|
||||
|
||||
player.setModelForSlot( static_cast<Inventory::EquipSlot>( slot ), val );
|
||||
player.setModelForSlot( static_cast< Inventory::EquipSlot >( slot ), val );
|
||||
player.sendModel();
|
||||
player.sendDebug( "Model updated" );
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ void Core::DebugCommandHandler::set( char * data, Core::Entity::Player& player,
|
|||
|
||||
}
|
||||
|
||||
void Core::DebugCommandHandler::add( char * data, Core::Entity::Player& player, boost::shared_ptr< Core::DebugCommand > command )
|
||||
void Core::DebugCommandHandler::add( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command )
|
||||
{
|
||||
std::string subCommand;
|
||||
std::string params = "";
|
||||
|
@ -328,7 +328,7 @@ void Core::DebugCommandHandler::add( char * data, Core::Entity::Player& player,
|
|||
|
||||
player.addStatusEffect( effect );
|
||||
}
|
||||
else if ( subCommand == "title" )
|
||||
else if( subCommand == "title" )
|
||||
{
|
||||
uint32_t titleId;
|
||||
sscanf( params.c_str(), "%u", &titleId );
|
||||
|
@ -390,7 +390,7 @@ void Core::DebugCommandHandler::add( char * data, Core::Entity::Player& player,
|
|||
|
||||
Network::Packets::Server::ServerNoticePacket noticePacket( player, "Injecting ACTOR_CONTROL " + std::to_string( opcode ) );
|
||||
|
||||
player.queuePacket(noticePacket);
|
||||
player.queuePacket( noticePacket );
|
||||
|
||||
Network::Packets::Server::ActorControlPacket143 controlPacket( player, opcode,
|
||||
param1, param2, param3, param4, param5, param6, playerId );
|
||||
|
@ -405,7 +405,7 @@ void Core::DebugCommandHandler::add( char * data, Core::Entity::Player& player,
|
|||
|
||||
}
|
||||
|
||||
void Core::DebugCommandHandler::get( char * data, Core::Entity::Player& player, boost::shared_ptr< Core::DebugCommand > command )
|
||||
void Core::DebugCommandHandler::get( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command )
|
||||
{
|
||||
std::string subCommand;
|
||||
std::string params = "";
|
||||
|
@ -449,14 +449,14 @@ void Core::DebugCommandHandler::get( char * data, Core::Entity::Player& player,
|
|||
|
||||
}
|
||||
|
||||
void Core::DebugCommandHandler::injectPacket( char * data, Core::Entity::Player& player, boost::shared_ptr< Core::DebugCommand > command )
|
||||
void Core::DebugCommandHandler::injectPacket( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command )
|
||||
{
|
||||
auto pSession = g_serverZone.getSession( player.getId() );
|
||||
if( pSession )
|
||||
pSession->getZoneConnection()->injectPacket( data + 7, player );
|
||||
}
|
||||
|
||||
void Core::DebugCommandHandler::injectChatPacket( char * data, Core::Entity::Player& player, boost::shared_ptr< Core::DebugCommand > command )
|
||||
void Core::DebugCommandHandler::injectChatPacket( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command )
|
||||
{
|
||||
auto pSession = g_serverZone.getSession( player.getId() );
|
||||
if( pSession )
|
||||
|
@ -510,14 +510,14 @@ void Core::DebugCommandHandler::nudge( char * data, Entity::Player& player, boos
|
|||
}
|
||||
}
|
||||
|
||||
void Core::DebugCommandHandler::serverInfo( char * data, Core::Entity::Player& player, boost::shared_ptr< Core::DebugCommand > command )
|
||||
void Core::DebugCommandHandler::serverInfo( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command )
|
||||
{
|
||||
player.sendDebug( "SapphireServer " + Version::VERSION + "\nRev: " + Version::GIT_HASH );
|
||||
player.sendDebug( "Compiled: " __DATE__ " " __TIME__ );
|
||||
player.sendDebug( "Sessions: " + std::to_string( g_serverZone.getSessionCount() ) );
|
||||
}
|
||||
|
||||
void Core::DebugCommandHandler::unlockCharacter( char* data, Entity::Player& player, boost::shared_ptr< Core::DebugCommand > command )
|
||||
void Core::DebugCommandHandler::unlockCharacter( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command )
|
||||
{
|
||||
player.unlock( );
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
#include <map>
|
||||
|
||||
#include "DebugCommand.h"
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include <Server_Common/Common.h>
|
||||
#include "Forwards.h"
|
||||
|
||||
namespace Core {
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ Core::Scripting::EventReturnCallback Core::Event::Event::getEventReturnCallback(
|
|||
return m_callback;
|
||||
}
|
||||
|
||||
void Core::Event::Event::setEventReturnCallback( Core::Scripting::EventReturnCallback callback )
|
||||
void Core::Event::Event::setEventReturnCallback( Scripting::EventReturnCallback callback )
|
||||
{
|
||||
m_callback = callback;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#include "EventHelper.h"
|
||||
#include "Event.h"
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
|
||||
extern Core::Data::ExdData g_exdData;
|
||||
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
#include <src/servers/Server_Common/Network/PacketDef/Zone/ServerZoneDef.h>
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Network/PacketDef/Zone/ServerZoneDef.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
|
||||
#include "Inventory.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "Actor/Player.h"
|
||||
|
||||
#include "ItemContainer.h"
|
||||
#include "Item.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "Network/PacketWrappers/ServerNoticePacket.h"
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/algorithm/clamp.hpp>
|
||||
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "../Forwards.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
|
||||
#include <Server_Common/Database/DatabaseDef.h>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef INVENTORY_H_
|
||||
#define INVENTORY_H_
|
||||
#include <map>
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include <Server_Common/Common.h>
|
||||
#include "../Forwards.h"
|
||||
|
||||
namespace Core
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include "Item.h"
|
||||
|
||||
extern Core::Data::ExdData g_exdData;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _ITEM_H_
|
||||
#define _ITEM_H_
|
||||
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <Server_Common/Common.h>
|
||||
|
||||
namespace Core {
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "../Forwards.h"
|
||||
#include "ItemContainer.h"
|
||||
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Database/DatabaseDef.h>
|
||||
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "Actor/Player.h"
|
||||
|
||||
#include "Item.h"
|
||||
|
||||
#include <Server_Common/Database/DatabaseDef.h>
|
||||
|
||||
extern Core::Logger g_log;
|
||||
|
||||
|
@ -86,7 +86,7 @@ Core::ItemPtr Core::ItemContainer::getItem( uint8_t slotId )
|
|||
return m_itemMap[slotId];
|
||||
}
|
||||
|
||||
void Core::ItemContainer::setItem( uint8_t slotId, Core::ItemPtr pItem )
|
||||
void Core::ItemContainer::setItem( uint8_t slotId, ItemPtr pItem )
|
||||
{
|
||||
if( ( slotId > m_size ) )
|
||||
return;
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
#pragma once
|
||||
#ifndef _ITEMCONTAINER_H_
|
||||
#define _ITEMCONTAINER_H_
|
||||
|
||||
#include <map>
|
||||
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <Server_Common/Common.h>
|
||||
|
||||
#include "../Forwards.h"
|
||||
|
||||
|
@ -17,7 +16,7 @@ namespace Core
|
|||
{
|
||||
|
||||
public:
|
||||
ItemContainer(uint16_t locationId);
|
||||
ItemContainer( uint16_t locationId );
|
||||
~ItemContainer();
|
||||
|
||||
uint16_t getId() const;
|
||||
|
@ -30,9 +29,9 @@ namespace Core
|
|||
|
||||
const ItemMap& getItemMap() const;
|
||||
|
||||
ItemPtr getItem(uint8_t slotId);
|
||||
ItemPtr getItem( uint8_t slotId );
|
||||
|
||||
void setItem(uint8_t slotId, ItemPtr item);
|
||||
void setItem( uint8_t slotId, ItemPtr item );
|
||||
|
||||
int16_t getFreeSlot();
|
||||
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Zone/Actor/Actor.h>
|
||||
#include <Server_Zone/Actor/Player.h>
|
||||
|
||||
#include "Actor/Actor.h"
|
||||
#include "Actor/Player.h"
|
||||
#include "CalcBattle.h"
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define _CALCBATTLE_H
|
||||
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Zone/Actor/Actor.h>
|
||||
#include "Actor/Actor.h"
|
||||
|
||||
using namespace Core::Entity;
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Zone/Actor/Actor.h>
|
||||
#include <Server_Zone/Actor/Player.h>
|
||||
#include "Actor/Actor.h"
|
||||
#include "Actor/Player.h"
|
||||
|
||||
#include "CalcStats.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define _CALCSTATS_H
|
||||
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Zone/Actor/Actor.h>
|
||||
#include "Actor/Actor.h"
|
||||
|
||||
using namespace Core::Entity;
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Network/CommonNetwork.h>
|
||||
#include <src/servers/Server_Common/Util/Util.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <src/servers/Server_Common/Network/PacketContainer.h>
|
||||
#include <src/servers/Server_Common/Network/GamePacketParser.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Network/CommonNetwork.h>
|
||||
#include <Server_Common/Util/Util.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Network/PacketContainer.h>
|
||||
#include <Server_Common/Network/GamePacketParser.h>
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#include "GameConnection.h"
|
||||
|
||||
#include "src/servers/Server_Zone/ServerZone.h"
|
||||
#include "src/servers/Server_Zone/Session.h"
|
||||
#include "src/servers/Server_Zone/Zone/Zone.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/InitUIPacket.h"
|
||||
#include "src/servers/Server_Zone/DebugCommand/DebugCommandHandler.h"
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "ServerZone.h"
|
||||
#include "Session.h"
|
||||
#include "Zone/Zone.h"
|
||||
#include "Network/PacketWrappers/InitUIPacket.h"
|
||||
#include "DebugCommand/DebugCommandHandler.h"
|
||||
#include "Actor/Player.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
extern Core::DebugCommandHandler g_gameCommandMgr;
|
||||
extern Core::Logger g_log;
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
|
||||
#ifndef GAMECONNECTION_H
|
||||
#define GAMECONNECTION_H
|
||||
|
||||
#include <src/servers/Server_Common/Network/Connection.h>
|
||||
#include <src/servers/Server_Common/Network/Acceptor.h>
|
||||
#include <src/servers/Server_Common/Network/CommonNetwork.h>
|
||||
#include <Server_Common/Network/Connection.h>
|
||||
#include <Server_Common/Network/Acceptor.h>
|
||||
#include <Server_Common/Network/CommonNetwork.h>
|
||||
#include <Server_Common/Network/GamePacket.h>
|
||||
#include <Server_Common/Util/LockedQueue.h>
|
||||
|
||||
#include <src/servers/Server_Common/Network/GamePacket.h>
|
||||
|
||||
#include <src/servers/Server_Common/Util/LockedQueue.h>
|
||||
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
#define DECLARE_HANDLER( x ) void x( const Packets::GamePacket& inPacket, Entity::Player& player )
|
||||
|
||||
|
|
|
@ -1,39 +1,39 @@
|
|||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Network/CommonNetwork.h>
|
||||
#include <src/servers/Server_Common/Network/GamePacketNew.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <src/servers/Server_Common/Network/PacketContainer.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Network/CommonNetwork.h>
|
||||
#include <Server_Common/Network/GamePacketNew.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Network/PacketContainer.h>
|
||||
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#include "src/servers/Server_Zone/Network/GameConnection.h"
|
||||
#include "Network/GameConnection.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Session.h"
|
||||
#include "src/servers/Server_Zone/Zone/Zone.h"
|
||||
#include "src/servers/Server_Zone/Zone/ZonePosition.h"
|
||||
#include "src/servers/Server_Zone/ServerZone.h"
|
||||
#include "src/servers/Server_Zone/Zone/ZoneMgr.h"
|
||||
#include "Session.h"
|
||||
#include "Zone/Zone.h"
|
||||
#include "Zone/ZonePosition.h"
|
||||
#include "ServerZone.h"
|
||||
#include "Zone/ZoneMgr.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/InitUIPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/PingPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/MoveActorPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ChatPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/EventStartPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/EventFinishPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/PlayerStateFlagsPacket.h"
|
||||
#include "Network/PacketWrappers/InitUIPacket.h"
|
||||
#include "Network/PacketWrappers/PingPacket.h"
|
||||
#include "Network/PacketWrappers/MoveActorPacket.h"
|
||||
#include "Network/PacketWrappers/ChatPacket.h"
|
||||
#include "Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "Network/PacketWrappers/EventStartPacket.h"
|
||||
#include "Network/PacketWrappers/EventFinishPacket.h"
|
||||
#include "Network/PacketWrappers/PlayerStateFlagsPacket.h"
|
||||
|
||||
#include "src/servers/Server_Zone/DebugCommand/DebugCommandHandler.h"
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "src/servers/Server_Zone/Inventory/Inventory.h"
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "src/servers/Server_Zone/Event/EventHelper.h"
|
||||
#include "src/servers/Server_Zone/Action/Action.h"
|
||||
#include "src/servers/Server_Zone/Action/ActionTeleport.h"
|
||||
#include "DebugCommand/DebugCommandHandler.h"
|
||||
#include "Actor/Player.h"
|
||||
#include "Inventory/Inventory.h"
|
||||
#include "Forwards.h"
|
||||
#include "Event/EventHelper.h"
|
||||
#include "Action/Action.h"
|
||||
#include "Action/ActionTeleport.h"
|
||||
|
||||
extern Core::Logger g_log;
|
||||
extern Core::ServerZone g_serverZone;
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Network/CommonNetwork.h>
|
||||
#include <src/servers/Server_Common/Network/GamePacketNew.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <src/servers/Server_Common/Network/PacketContainer.h>
|
||||
|
||||
#include "src/servers/Server_Zone/Network/GameConnection.h"
|
||||
#include "src/servers/Server_Zone/Session.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/PlayerStateFlagsPacket.h"
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Network/CommonNetwork.h>
|
||||
#include <Server_Common/Network/GamePacketNew.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Network/PacketContainer.h>
|
||||
|
||||
#include "Network/GameConnection.h"
|
||||
#include "Session.h"
|
||||
#include "Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "Network/PacketWrappers/PlayerStateFlagsPacket.h"
|
||||
#include "Actor/Player.h"
|
||||
|
||||
#include "Forwards.h"
|
||||
|
||||
extern Core::Logger g_log;
|
||||
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Network/CommonNetwork.h>
|
||||
#include <src/servers/Server_Common/Network/GamePacketNew.h>
|
||||
#include <src/servers/Server_Common/Network/PacketContainer.h>
|
||||
#include <src/servers/Server_Common/Network/PacketDef/Zone/ServerZoneDef.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Network/CommonNetwork.h>
|
||||
#include <Server_Common/Network/GamePacketNew.h>
|
||||
#include <Server_Common/Network/PacketContainer.h>
|
||||
#include <Server_Common/Network/PacketDef/Zone/ServerZoneDef.h>
|
||||
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#include "src/servers/Server_Zone/Network/GameConnection.h"
|
||||
#include "src/servers/Server_Zone/Session.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/EventStartPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/EventFinishPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/PlayerStateFlagsPacket.h"
|
||||
#include "src/servers/Server_Zone/Script/ScriptManager.h"
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "src/servers/Server_Zone/Event/EventHelper.h"
|
||||
#include "Network/GameConnection.h"
|
||||
#include "Session.h"
|
||||
#include "Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "Network/PacketWrappers/EventStartPacket.h"
|
||||
#include "Network/PacketWrappers/EventFinishPacket.h"
|
||||
#include "Network/PacketWrappers/PlayerStateFlagsPacket.h"
|
||||
#include "Script/ScriptManager.h"
|
||||
#include "Actor/Player.h"
|
||||
#include "Forwards.h"
|
||||
#include "Event/EventHelper.h"
|
||||
|
||||
extern Core::Scripting::ScriptManager g_scriptMgr;
|
||||
|
||||
|
|
|
@ -1,39 +1,39 @@
|
|||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Network/CommonNetwork.h>
|
||||
#include <src/servers/Server_Common/Network/GamePacketNew.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <src/servers/Server_Common/Network/PacketContainer.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Network/CommonNetwork.h>
|
||||
#include <Server_Common/Network/GamePacketNew.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Network/PacketContainer.h>
|
||||
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#include "src/servers/Server_Zone/Network/GameConnection.h"
|
||||
#include "Network/GameConnection.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Session.h"
|
||||
#include "src/servers/Server_Zone/Zone/Zone.h"
|
||||
#include "src/servers/Server_Zone/Zone/ZonePosition.h"
|
||||
#include "src/servers/Server_Zone/ServerZone.h"
|
||||
#include "src/servers/Server_Zone/Zone/ZoneMgr.h"
|
||||
#include "Session.h"
|
||||
#include "Zone/Zone.h"
|
||||
#include "Zone/ZonePosition.h"
|
||||
#include "ServerZone.h"
|
||||
#include "Zone/ZoneMgr.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/InitUIPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/PingPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/MoveActorPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ChatPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/EventStartPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/EventFinishPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/PlayerStateFlagsPacket.h"
|
||||
#include "Network/PacketWrappers/InitUIPacket.h"
|
||||
#include "Network/PacketWrappers/PingPacket.h"
|
||||
#include "Network/PacketWrappers/MoveActorPacket.h"
|
||||
#include "Network/PacketWrappers/ChatPacket.h"
|
||||
#include "Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "Network/PacketWrappers/EventStartPacket.h"
|
||||
#include "Network/PacketWrappers/EventFinishPacket.h"
|
||||
#include "Network/PacketWrappers/PlayerStateFlagsPacket.h"
|
||||
|
||||
#include "src/servers/Server_Zone/DebugCommand/DebugCommandHandler.h"
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "src/servers/Server_Zone/Inventory/Inventory.h"
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "src/servers/Server_Zone/Event/EventHelper.h"
|
||||
#include "src/servers/Server_Zone/Action/Action.h"
|
||||
#include "src/servers/Server_Zone/Action/ActionTeleport.h"
|
||||
#include "DebugCommand/DebugCommandHandler.h"
|
||||
#include "Actor/Player.h"
|
||||
#include "Inventory/Inventory.h"
|
||||
#include "Forwards.h"
|
||||
#include "Event/EventHelper.h"
|
||||
#include "Action/Action.h"
|
||||
#include "Action/ActionTeleport.h"
|
||||
|
||||
extern Core::Logger g_log;
|
||||
extern Core::ServerZone g_serverZone;
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Network/CommonNetwork.h>
|
||||
#include <src/servers/Server_Common/Network/GamePacketNew.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <src/servers/Server_Common/Network/PacketContainer.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Network/CommonNetwork.h>
|
||||
#include <Server_Common/Network/GamePacketNew.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Network/PacketContainer.h>
|
||||
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#include "src/servers/Server_Zone/Network/GameConnection.h"
|
||||
#include "Network/GameConnection.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Session.h"
|
||||
#include "src/servers/Server_Zone/Zone/Zone.h"
|
||||
#include "src/servers/Server_Zone/Zone/ZonePosition.h"
|
||||
#include "src/servers/Server_Zone/ServerZone.h"
|
||||
#include "src/servers/Server_Zone/Zone/ZoneMgr.h"
|
||||
#include "Session.h"
|
||||
#include "Zone/Zone.h"
|
||||
#include "Zone/ZonePosition.h"
|
||||
#include "ServerZone.h"
|
||||
#include "Zone/ZoneMgr.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket144.h"
|
||||
|
||||
#include "src/servers/Server_Zone/DebugCommand/DebugCommandHandler.h"
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "src/servers/Server_Zone/Inventory/Inventory.h"
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "DebugCommand/DebugCommandHandler.h"
|
||||
#include "Actor/Player.h"
|
||||
#include "Inventory/Inventory.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
extern Core::Logger g_log;
|
||||
extern Core::ServerZone g_serverZone;
|
||||
|
|
|
@ -1,43 +1,42 @@
|
|||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Network/CommonNetwork.h>
|
||||
#include <src/servers/Server_Common/Network/GamePacketNew.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <src/servers/Server_Common/Network/PacketContainer.h>
|
||||
#include <src/servers/Server_Common/Network/PacketDef/Chat/ServerChatDef.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Network/CommonNetwork.h>
|
||||
#include <Server_Common/Network/GamePacketNew.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Network/PacketContainer.h>
|
||||
#include <Server_Common/Network/PacketDef/Chat/ServerChatDef.h>
|
||||
#include <Server_Common/Database/DatabaseDef.h>
|
||||
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#include "Network/GameConnection.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/GameConnection.h"
|
||||
#include "Session.h"
|
||||
#include "Zone/Zone.h"
|
||||
#include "Zone/ZonePosition.h"
|
||||
#include "ServerZone.h"
|
||||
#include "Zone/ZoneMgr.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Session.h"
|
||||
#include "src/servers/Server_Zone/Zone/Zone.h"
|
||||
#include "src/servers/Server_Zone/Zone/ZonePosition.h"
|
||||
#include "src/servers/Server_Zone/ServerZone.h"
|
||||
#include "src/servers/Server_Zone/Zone/ZoneMgr.h"
|
||||
#include "Network/PacketWrappers/InitUIPacket.h"
|
||||
#include "Network/PacketWrappers/PingPacket.h"
|
||||
#include "Network/PacketWrappers/MoveActorPacket.h"
|
||||
#include "Network/PacketWrappers/ChatPacket.h"
|
||||
#include "Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "Network/PacketWrappers/EventStartPacket.h"
|
||||
#include "Network/PacketWrappers/EventFinishPacket.h"
|
||||
#include "Network/PacketWrappers/PlayerStateFlagsPacket.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/InitUIPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/PingPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/MoveActorPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ChatPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/EventStartPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/EventFinishPacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/PlayerStateFlagsPacket.h"
|
||||
#include "DebugCommand/DebugCommandHandler.h"
|
||||
#include "Actor/Player.h"
|
||||
#include "Inventory/Inventory.h"
|
||||
#include "Forwards.h"
|
||||
#include "Event/EventHelper.h"
|
||||
#include "Action/Action.h"
|
||||
#include "Action/ActionTeleport.h"
|
||||
|
||||
#include "src/servers/Server_Zone/DebugCommand/DebugCommandHandler.h"
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "src/servers/Server_Zone/Inventory/Inventory.h"
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "src/servers/Server_Zone/Event/EventHelper.h"
|
||||
#include "src/servers/Server_Zone/Action/Action.h"
|
||||
#include "src/servers/Server_Zone/Action/ActionTeleport.h"
|
||||
|
||||
#include <Server_Common/Database/DatabaseDef.h>
|
||||
|
||||
extern Core::Logger g_log;
|
||||
extern Core::ServerZone g_serverZone;
|
||||
|
|
|
@ -1,34 +1,34 @@
|
|||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <src/servers/Server_Common/Network/CommonNetwork.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <src/servers/Server_Common/Network/GamePacketNew.h>
|
||||
#include <src/servers/Server_Common/Network/PacketContainer.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Common.h>
|
||||
#include <Server_Common/Network/CommonNetwork.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Network/GamePacketNew.h>
|
||||
#include <Server_Common/Network/PacketContainer.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#include "src/servers/Server_Zone/Network/GameConnection.h"
|
||||
#include "Network/GameConnection.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Session.h"
|
||||
#include "Session.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket144.h"
|
||||
#include "Network/PacketWrappers/MoveActorPacket.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/PlayerStateFlagsPacket.h"
|
||||
#include "Network/PacketWrappers/PlayerStateFlagsPacket.h"
|
||||
|
||||
#include "src/servers/Server_Zone/DebugCommand/DebugCommandHandler.h"
|
||||
#include "DebugCommand/DebugCommandHandler.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "Actor/Player.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Action/Action.h"
|
||||
#include "src/servers/Server_Zone/Action/ActionCast.h"
|
||||
#include "src/servers/Server_Zone/Action/ActionMount.h"
|
||||
#include "src/servers/Server_Zone/Script/ScriptManager.h"
|
||||
#include "Server_Zone/Network/PacketWrappers/MoveActorPacket.h"
|
||||
#include "Action/Action.h"
|
||||
#include "Action/ActionCast.h"
|
||||
#include "Action/ActionMount.h"
|
||||
#include "Script/ScriptManager.h"
|
||||
|
||||
|
||||
extern Core::Scripting::ScriptManager g_scriptMgr;
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <chaiscript/chaiscript.hpp>
|
||||
|
||||
#include <src/servers/Server_Common/Script/ChaiscriptStdLib.h>
|
||||
#include <Server_Common/Script/ChaiscriptStdLib.h>
|
||||
|
||||
#include "src/servers/Server_Zone/Zone/Zone.h"
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "src/servers/Server_Zone/Actor/BattleNpc.h"
|
||||
#include "src/servers/Server_Zone/ServerZone.h"
|
||||
#include "src/servers/Server_Zone/Event/Event.h"
|
||||
#include "src/servers/Server_Zone/Event/EventHelper.h"
|
||||
#include "src/servers/Server_Zone/StatusEffect/StatusEffect.h"
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "src/servers/Server_Zone/Script/ScriptManager.h"
|
||||
#include "Zone/Zone.h"
|
||||
#include "Actor/Player.h"
|
||||
#include "Actor/BattleNpc.h"
|
||||
#include "ServerZone.h"
|
||||
#include "Event/Event.h"
|
||||
#include "Event/EventHelper.h"
|
||||
#include "StatusEffect/StatusEffect.h"
|
||||
#include "Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "Script/ScriptManager.h"
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
@ -55,7 +55,7 @@ void Core::Scripting::ScriptManager::loadDir( std::string dirname, std::set<std:
|
|||
|
||||
}
|
||||
|
||||
void Core::Scripting::ScriptManager::onPlayerFirstEnterWorld( Core::Entity::Player& player )
|
||||
void Core::Scripting::ScriptManager::onPlayerFirstEnterWorld( Entity::Player& player )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -87,14 +87,14 @@ const boost::shared_ptr< chaiscript::ChaiScript >& Core::Scripting::ScriptManage
|
|||
}
|
||||
|
||||
|
||||
bool Core::Scripting::ScriptManager::onTalk( Core::Entity::Player& player, uint64_t actorId, uint32_t eventId )
|
||||
bool Core::Scripting::ScriptManager::onTalk( Entity::Player& player, uint64_t actorId, uint32_t eventId )
|
||||
{
|
||||
std::string eventName = "onTalk";
|
||||
std::string objName = Event::getEventName( eventId );
|
||||
|
||||
player.sendDebug( "Actor: " +
|
||||
std::to_string( actorId ) + " -> " +
|
||||
std::to_string( Core::Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ) ) +
|
||||
std::to_string( Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ) ) +
|
||||
" \neventId: " +
|
||||
std::to_string( eventId ) +
|
||||
" (0x" + boost::str( boost::format( "%|08X|" )
|
||||
|
@ -135,7 +135,7 @@ bool Core::Scripting::ScriptManager::onTalk( Core::Entity::Player& player, uint6
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Core::Scripting::ScriptManager::onEnterTerritory( Core::Entity::Player& player, uint32_t eventId,
|
||||
bool Core::Scripting::ScriptManager::onEnterTerritory( Entity::Player& player, uint32_t eventId,
|
||||
uint16_t param1, uint16_t param2 )
|
||||
{
|
||||
std::string eventName = "onEnterTerritory";
|
||||
|
@ -222,7 +222,7 @@ bool Core::Scripting::ScriptManager::onOutsideRange( Entity::Player& player, uin
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Core::Scripting::ScriptManager::onEmote( Core::Entity::Player& player, uint64_t actorId,
|
||||
bool Core::Scripting::ScriptManager::onEmote( Entity::Player& player, uint64_t actorId,
|
||||
uint32_t eventId, uint8_t emoteId )
|
||||
{
|
||||
std::string eventName = "onEmote";
|
||||
|
@ -260,7 +260,7 @@ bool Core::Scripting::ScriptManager::onEmote( Core::Entity::Player& player, uint
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Core::Scripting::ScriptManager::onEventHandlerReturn( Core::Entity::Player& player, uint32_t eventId,
|
||||
bool Core::Scripting::ScriptManager::onEventHandlerReturn( Entity::Player& player, uint32_t eventId,
|
||||
uint16_t subEvent, uint16_t param1, uint16_t param2,
|
||||
uint16_t param3 )
|
||||
{
|
||||
|
@ -304,7 +304,7 @@ bool Core::Scripting::ScriptManager::onEventHandlerReturn( Core::Entity::Player&
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Core::Scripting::ScriptManager::onEventHandlerTradeReturn( Core::Entity::Player& player, uint32_t eventId,
|
||||
bool Core::Scripting::ScriptManager::onEventHandlerTradeReturn( Entity::Player& player, uint32_t eventId,
|
||||
uint16_t subEvent, uint16_t param, uint32_t catalogId )
|
||||
{
|
||||
std::string eventName = Event::getEventName( eventId ) + "_TRADE";
|
||||
|
@ -446,7 +446,7 @@ bool Core::Scripting::ScriptManager::onStatusTick( Entity::ActorPtr pActor, Core
|
|||
pActor->getAsPlayer()->sendDebug( "Calling: " + objName + "." + eventName );
|
||||
|
||||
auto fn = m_pChaiHandler->eval< std::function< void( chaiscript::Boxed_Value &, Entity::Actor&,
|
||||
Core::StatusEffect::StatusEffect& ) > >( eventName );
|
||||
StatusEffect::StatusEffect& ) > >( eventName );
|
||||
fn( obj, *pActor, effect );
|
||||
}
|
||||
catch( std::exception& e )
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#include <mutex>
|
||||
#include <set>
|
||||
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include "../Forwards.h"
|
||||
#include <Server_Common/Common.h>
|
||||
#include "Forwards.h"
|
||||
|
||||
|
||||
namespace chaiscript
|
||||
|
|
|
@ -4,18 +4,17 @@
|
|||
#include <Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Script/ChaiscriptStdLib.h>
|
||||
|
||||
#include "src/servers/Server_Zone/ServerZone.h"
|
||||
#include "ServerZone.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Script/ScriptManager.h"
|
||||
#include "Script/ScriptManager.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Zone/Zone.h"
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "src/servers/Server_Zone/Actor/BattleNpc.h"
|
||||
#include "src/servers/Server_Zone/Event/Event.h"
|
||||
#include "src/servers/Server_Zone/Event/EventHelper.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "src/servers/Server_Zone/StatusEffect/StatusEffect.h"
|
||||
#include "Zone/Zone.h"
|
||||
#include "Actor/Player.h"
|
||||
#include "Actor/BattleNpc.h"
|
||||
#include "Event/Event.h"
|
||||
#include "Event/EventHelper.h"
|
||||
#include "Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "StatusEffect/StatusEffect.h"
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#include "ServerZone.h"
|
||||
|
||||
#include <src/servers/Server_Common/Version.h>
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <src/servers/Server_Common/Config/XMLConfig.h>
|
||||
#include <src/servers/Server_Common/Version.h>
|
||||
#include <Server_Common/Version.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Config/XMLConfig.h>
|
||||
#include <Server_Common/Version.h>
|
||||
|
||||
#include <MySqlBase.h>
|
||||
#include <Connection.h>
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#ifndef __GAMESERVER_H
|
||||
#define __GAMESERVER_H
|
||||
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <Server_Common/Common.h>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <mutex>
|
||||
#include <map>
|
||||
|
||||
#include "Forwards.h"
|
||||
#include "src/servers/Server_Zone/Actor/BattleNpcTemplate.h"
|
||||
#include "Actor/BattleNpcTemplate.h"
|
||||
|
||||
namespace Core {
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#include <time.h>
|
||||
|
||||
#include <src/servers/Server_Common/Util/Util.h>
|
||||
#include <src/servers/Server_Common/Network/PacketContainer.h>
|
||||
#include "src/servers/Server_Zone/Network/GameConnection.h"
|
||||
#include <Server_Common/Util/Util.h>
|
||||
#include <Server_Common/Network/PacketContainer.h>
|
||||
#include "Network/GameConnection.h"
|
||||
#include "Session.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "Actor/Player.h"
|
||||
|
||||
Core::Session::Session( uint32_t sessionId )
|
||||
: m_sessionId( sessionId )
|
||||
|
@ -23,13 +23,13 @@ Core::Session::~Session()
|
|||
{
|
||||
}
|
||||
|
||||
void Core::Session::setZoneConnection( Core::Network::GameConnectionPtr pZoneCon )
|
||||
void Core::Session::setZoneConnection( Network::GameConnectionPtr pZoneCon )
|
||||
{
|
||||
pZoneCon->m_conType = Network::ConnectionType::Zone;
|
||||
m_pZoneConnection = pZoneCon;
|
||||
}
|
||||
|
||||
void Core::Session::setChatConnection( Core::Network::GameConnectionPtr pChatCon )
|
||||
void Core::Session::setChatConnection( Network::GameConnectionPtr pChatCon )
|
||||
{
|
||||
pChatCon->m_conType = Network::ConnectionType::Chat;
|
||||
m_pChatConnection = pChatCon;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
|
||||
#include "Cell.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Actor/Actor.h"
|
||||
#include "src/servers/Server_Zone/Actor/BattleNpc.h"
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "Actor/Actor.h"
|
||||
#include "Actor/BattleNpc.h"
|
||||
#include "Forwards.h"
|
||||
#include "Zone.h"
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "Forwards.h"
|
||||
#include <set>
|
||||
|
||||
namespace Core {
|
||||
|
|
|
@ -1,36 +1,35 @@
|
|||
#include <stdio.h>
|
||||
#include <vector>
|
||||
|
||||
#include <src/servers/Server_Common/Logging/Logger.h>
|
||||
#include <src/servers/Server_Common/Util/Util.h>
|
||||
#include <src/servers/Server_Common/Util/UtilMath.h>
|
||||
#include <src/servers/Server_Common/Network/GamePacket.h>
|
||||
#include <src/servers/Server_Common/Network/GamePacketNew.h>
|
||||
#include <src/servers/Server_Common/Exd/ExdData.h>
|
||||
#include <src/servers/Server_Common/Network/CommonNetwork.h>
|
||||
#include <src/servers/Server_Common/Network/PacketDef/Zone/ServerZoneDef.h>
|
||||
#include <src/servers/Server_Common/Network/PacketContainer.h>
|
||||
#include <Server_Common/Logging/Logger.h>
|
||||
#include <Server_Common/Util/Util.h>
|
||||
#include <Server_Common/Util/UtilMath.h>
|
||||
#include <Server_Common/Network/GamePacket.h>
|
||||
#include <Server_Common/Network/GamePacketNew.h>
|
||||
#include <Server_Common/Exd/ExdData.h>
|
||||
#include <Server_Common/Network/CommonNetwork.h>
|
||||
#include <Server_Common/Network/PacketDef/Zone/ServerZoneDef.h>
|
||||
#include <Server_Common/Network/PacketContainer.h>
|
||||
#include <Server_Common/Database/DatabaseDef.h>
|
||||
|
||||
#include "Zone.h"
|
||||
#include "ZoneMgr.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Session.h"
|
||||
#include "src/servers/Server_Zone/Actor/Actor.h"
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "src/servers/Server_Zone/Actor/BattleNpc.h"
|
||||
#include "Session.h"
|
||||
#include "Actor/Actor.h"
|
||||
#include "Actor/Player.h"
|
||||
#include "Actor/BattleNpc.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Network/GameConnection.h"
|
||||
#include "src/servers/Server_Zone/ServerZone.h"
|
||||
#include "src/servers/Server_Zone/Script/ScriptManager.h"
|
||||
#include "Network/GameConnection.h"
|
||||
#include "ServerZone.h"
|
||||
#include "Script/ScriptManager.h"
|
||||
|
||||
#include "CellHandler.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include <Server_Common/Database/DatabaseDef.h>
|
||||
|
||||
extern Core::Logger g_log;
|
||||
extern Core::ServerZone g_serverZone;
|
||||
extern Core::Data::ExdData g_exdData;
|
||||
|
@ -180,16 +179,10 @@ void Zone::loadCellCache()
|
|||
pos.x = posX;
|
||||
pos.y = posY;
|
||||
pos.z = posZ;
|
||||
Entity::BattleNpcPtr pBNpc( new Entity::BattleNpc( modelId, nameId,
|
||||
pos,
|
||||
Entity::BattleNpcPtr pBNpc( new Entity::BattleNpc( modelId, nameId, pos,
|
||||
sizeId, type, level, behaviour, mobType ) );
|
||||
pBNpc->setRotation( static_cast< float >( rotation ) );
|
||||
cache.push_back( pBNpc );
|
||||
|
||||
//pushActor( pBNpc );
|
||||
|
||||
//m_zonePositionMap[id] = ZonePositionPtr( new ZonePosition( id, targetZoneId, Position( posX, posY, posZ, posO ), radius ) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -290,9 +283,6 @@ void Zone::pushActor( Entity::ActorPtr pActor )
|
|||
g_log.debug( "[Zone:" + m_zoneCode + "] Adding player [" + std::to_string( pActor->getId() ) + "]" );
|
||||
auto pPlayer = pActor->getAsPlayer();
|
||||
|
||||
// fire the onEnter Lua event
|
||||
//LuaManager->onRegionEnter(this, pPlayer);
|
||||
|
||||
auto pSession = g_serverZone.getSession( pPlayer->getId() );
|
||||
if( pSession )
|
||||
m_sessionSet.insert( pSession );
|
||||
|
@ -343,7 +333,7 @@ void Zone::removeActor( Entity::ActorPtr pActor )
|
|||
{
|
||||
Entity::ActorPtr pCurAct;
|
||||
|
||||
for( auto iter = pActor->m_inRangeActors.begin(); iter != pActor->m_inRangeActors.end();)
|
||||
for( auto iter = pActor->m_inRangeActors.begin(); iter != pActor->m_inRangeActors.end(); )
|
||||
{
|
||||
pCurAct = *iter;
|
||||
auto iter2 = iter++;
|
||||
|
@ -368,7 +358,7 @@ void Zone::queueOutPacketForRange( Entity::Player& sourcePlayer, uint32_t range,
|
|||
if( ( distance < range ) && sourcePlayer.getId() != ( *it ).second->getId() )
|
||||
{
|
||||
auto pSession = g_serverZone.getSession( ( *it ).second->getId() );
|
||||
pPacketEntry->setValAt<uint32_t>( 0x08, ( *it ).second->getId() );
|
||||
pPacketEntry->setValAt< uint32_t >( 0x08, ( *it ).second->getId() );
|
||||
if( pSession )
|
||||
pSession->getZoneConnection()->queueOutPacket( pPacketEntry );
|
||||
}
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
#define _ZONE_H
|
||||
|
||||
#include <unordered_map>
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <Server_Common/Common.h>
|
||||
|
||||
#include "Cell.h"
|
||||
#include "CellHandler.h"
|
||||
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
#include <set>
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
|
@ -15,11 +15,10 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
namespace Core {
|
||||
|
||||
namespace Entity
|
||||
{
|
||||
class Actor;
|
||||
class Player;
|
||||
class Actor;
|
||||
class Player;
|
||||
}
|
||||
|
||||
class Session;
|
||||
|
@ -39,8 +38,8 @@ protected:
|
|||
|
||||
bool m_bPrivate;
|
||||
|
||||
std::unordered_map<int32_t, Entity::PlayerPtr > m_playerMap;
|
||||
std::unordered_map<int32_t, Entity::BattleNpcPtr > m_BattleNpcMap;
|
||||
std::unordered_map< int32_t, Entity::PlayerPtr > m_playerMap;
|
||||
std::unordered_map< int32_t, Entity::BattleNpcPtr > m_BattleNpcMap;
|
||||
|
||||
std::set< Entity::BattleNpcPtr > m_BattleNpcDeadMap;
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "ZoneMgr.h"
|
||||
#include "Zone.h"
|
||||
|
||||
#include "ZonePosition.h"
|
||||
|
||||
#include <Server_Common/Database/DatabaseDef.h>
|
||||
|
@ -65,51 +64,6 @@ namespace Core {
|
|||
m_zoneMap[info.id] = pZone;
|
||||
}
|
||||
|
||||
//do
|
||||
//{
|
||||
// Db::Field *field = pQR->fetch();
|
||||
// uint16_t id = field[0].getUInt16();
|
||||
// std::string inName = field[1].getString();
|
||||
// std::string name = field[2].getString();
|
||||
// uint32_t layoutId = field[3].getUInt32();
|
||||
// bool isPrivate = field[4].getBool();
|
||||
|
||||
// if(!isPrivate)
|
||||
// {
|
||||
// g_log.Log(LoggingSeverity::info, std::to_string(id) + "\t" + inName + " - " + name);
|
||||
|
||||
// ZonePtr pZone( new Zone( id, layoutId, name, inName, isPrivate ) );
|
||||
|
||||
// m_zoneMap[id] = pZone;
|
||||
|
||||
// // start the region worker
|
||||
// // ThreadPool->executeTask(pRegion);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //Console->outTime(" --> %s", inName.c_str());
|
||||
// //Console->outTime("\tCached private instance...", name.c_str());
|
||||
|
||||
// //// write the instance data into the instance cache for later use
|
||||
// //InstanceCacheEntry * pICE = new InstanceCacheEntry();
|
||||
// //pICE->id = id;
|
||||
// //pICE->inName = inName;
|
||||
// //pICE->minX = minX;
|
||||
// //pICE->maxX = maxX;
|
||||
// //pICE->minY = minY;
|
||||
// //pICE->maxY = maxY;
|
||||
// //pICE->name = name;
|
||||
// //pICE->layoutId = layoutId;
|
||||
// //pICE->isPrivate = isPrivate;
|
||||
|
||||
// //m_instanceCache[pICE->id] = pICE;
|
||||
// //m_instanceCacheName[inName] = pICE;
|
||||
|
||||
// //createInstance(pICE);
|
||||
// }
|
||||
|
||||
//} while(pQR->nextRow());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include <unordered_map>
|
||||
#include <map>
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
namespace Core {
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ Core::ZonePosition::ZonePosition()
|
|||
{
|
||||
}
|
||||
|
||||
Core::ZonePosition::ZonePosition( uint32_t id, uint32_t targetZoneId, const Core::Common::FFXIVARR_POSITION3& targetPosition, uint32_t radius, float rotation )
|
||||
Core::ZonePosition::ZonePosition( uint32_t id, uint32_t targetZoneId, const Common::FFXIVARR_POSITION3& targetPosition, uint32_t radius, float rotation )
|
||||
{
|
||||
m_id = id;
|
||||
m_targetZoneId = targetZoneId;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _ZONELINE_H
|
||||
#define _ZONELINE_H
|
||||
|
||||
#include <src/servers/Server_Common/Common.h>
|
||||
#include <Server_Common/Common.h>
|
||||
|
||||
namespace Core {
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue