2017-08-08 13:53:47 +02:00
|
|
|
#include "Action.h"
|
2019-07-25 22:46:10 +10:00
|
|
|
#include "EffectBuilder.h"
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2019-07-27 00:37:40 +10:00
|
|
|
#include <Inventory/Item.h>
|
|
|
|
|
2019-02-08 22:09:48 +11:00
|
|
|
#include <Exd/ExdDataGenerated.h>
|
2018-03-06 22:22:19 +01:00
|
|
|
#include <Util/Util.h>
|
2019-02-08 22:09:48 +11:00
|
|
|
#include "Framework.h"
|
|
|
|
#include "Script/ScriptMgr.h"
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2019-03-23 11:48:49 +11:00
|
|
|
#include <Math/CalcStats.h>
|
|
|
|
|
2019-02-08 22:09:48 +11:00
|
|
|
#include "Actor/Player.h"
|
2019-02-11 10:36:17 +11:00
|
|
|
#include "Actor/BNpc.h"
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2019-07-21 22:33:33 +10:00
|
|
|
#include "Territory/Territory.h"
|
2019-02-11 11:47:04 +11:00
|
|
|
|
2019-02-08 22:09:48 +11:00
|
|
|
#include <Network/CommonActorControl.h>
|
2019-10-09 18:14:53 +02:00
|
|
|
#include "Network/PacketWrappers/ActorControlPacket.h"
|
|
|
|
#include "Network/PacketWrappers/ActorControlSelfPacket.h"
|
|
|
|
#include "Network/PacketWrappers/ActorControlTargetPacket.h"
|
2019-07-25 22:46:10 +10:00
|
|
|
|
2019-04-07 16:04:36 +10:00
|
|
|
#include <Logging/Logger.h>
|
2019-07-25 22:46:10 +10:00
|
|
|
|
2019-04-07 16:04:36 +10:00
|
|
|
#include <Util/ActorFilter.h>
|
2019-07-26 23:20:13 +10:00
|
|
|
#include <Util/UtilMath.h>
|
2019-02-08 22:09:48 +11:00
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
using namespace Sapphire;
|
2019-02-08 22:09:48 +11:00
|
|
|
using namespace Sapphire::Common;
|
|
|
|
using namespace Sapphire::Network;
|
|
|
|
using namespace Sapphire::Network::Packets;
|
|
|
|
using namespace Sapphire::Network::Packets::Server;
|
|
|
|
using namespace Sapphire::Network::ActorControl;
|
2019-06-03 00:39:02 +10:00
|
|
|
using namespace Sapphire::World;
|
2019-02-08 22:09:48 +11:00
|
|
|
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
Action::Action::Action() = default;
|
|
|
|
Action::Action::~Action() = default;
|
2019-02-08 22:09:48 +11:00
|
|
|
|
2019-07-26 20:28:01 +10:00
|
|
|
Action::Action::Action( Entity::CharaPtr caster, uint32_t actionId, uint16_t sequence, FrameworkPtr fw ) :
|
|
|
|
Action( std::move( caster ), actionId, sequence, nullptr, std::move( fw ) )
|
2019-03-07 21:58:12 +11:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-07-26 20:28:01 +10:00
|
|
|
Action::Action::Action( Entity::CharaPtr caster, uint32_t actionId, uint16_t sequence,
|
|
|
|
Data::ActionPtr actionData, FrameworkPtr fw ) :
|
2019-06-02 20:45:18 +10:00
|
|
|
m_pSource( std::move( caster ) ),
|
|
|
|
m_pFw( std::move( fw ) ),
|
|
|
|
m_actionData( std::move( actionData ) ),
|
|
|
|
m_id( actionId ),
|
|
|
|
m_targetId( 0 ),
|
|
|
|
m_startTime( 0 ),
|
2019-07-26 20:28:01 +10:00
|
|
|
m_interruptType( Common::ActionInterruptType::None ),
|
|
|
|
m_sequence( sequence )
|
2019-03-07 21:58:12 +11:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
uint32_t Action::Action::getId() const
|
2019-03-07 21:58:12 +11:00
|
|
|
{
|
|
|
|
return m_id;
|
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
bool Action::Action::init()
|
2017-08-08 13:53:47 +02:00
|
|
|
{
|
2019-03-07 21:58:12 +11:00
|
|
|
if( !m_actionData )
|
|
|
|
{
|
|
|
|
// need to get actionData
|
|
|
|
auto exdData = m_pFw->get< Data::ExdDataGenerated >();
|
|
|
|
assert( exdData );
|
|
|
|
|
|
|
|
auto actionData = exdData->get< Data::Action >( m_id );
|
|
|
|
assert( actionData );
|
|
|
|
|
|
|
|
m_actionData = actionData;
|
|
|
|
}
|
2019-03-07 20:27:45 +11:00
|
|
|
|
2019-07-26 20:28:01 +10:00
|
|
|
m_effectBuilder = make_EffectBuilder( m_pSource, getId(), m_sequence );
|
2019-07-25 22:46:10 +10:00
|
|
|
|
2019-03-08 00:26:41 +11:00
|
|
|
m_castTimeMs = static_cast< uint32_t >( m_actionData->cast100ms * 100 );
|
|
|
|
m_recastTimeMs = static_cast< uint32_t >( m_actionData->recast100ms * 100 );
|
2019-03-07 21:58:12 +11:00
|
|
|
m_cooldownGroup = m_actionData->cooldownGroup;
|
|
|
|
m_range = m_actionData->range;
|
|
|
|
m_effectRange = m_actionData->effectRange;
|
2019-04-07 16:04:36 +10:00
|
|
|
m_castType = static_cast< Common::CastType >( m_actionData->castType );
|
2019-03-07 21:58:12 +11:00
|
|
|
m_aspect = static_cast< Common::ActionAspect >( m_actionData->aspect );
|
2019-02-11 01:50:41 +11:00
|
|
|
|
2019-04-07 16:04:36 +10:00
|
|
|
// todo: move this to bitset
|
|
|
|
m_canTargetSelf = m_actionData->canTargetSelf;
|
|
|
|
m_canTargetParty = m_actionData->canTargetParty;
|
|
|
|
m_canTargetFriendly = m_actionData->canTargetFriendly;
|
|
|
|
m_canTargetHostile = m_actionData->canTargetHostile;
|
|
|
|
// todo: this one doesn't look right based on whats in that col, probably has shifted
|
|
|
|
m_canTargetDead = m_actionData->canTargetDead;
|
|
|
|
|
2019-02-11 01:50:41 +11:00
|
|
|
// a default range is set by the game for the class/job
|
|
|
|
if( m_range == -1 )
|
|
|
|
{
|
2019-03-07 21:58:12 +11:00
|
|
|
switch( static_cast< Common::ClassJob >( m_actionData->classJob ) )
|
2019-02-11 01:50:41 +11:00
|
|
|
{
|
|
|
|
case Common::ClassJob::Bard:
|
|
|
|
case Common::ClassJob::Archer:
|
|
|
|
m_range = 25;
|
|
|
|
|
2019-03-07 21:58:12 +11:00
|
|
|
// anything that isnt ranged
|
2019-02-11 01:50:41 +11:00
|
|
|
default:
|
|
|
|
m_range = 3;
|
|
|
|
}
|
|
|
|
}
|
2019-02-09 18:01:39 +11:00
|
|
|
|
2019-06-15 20:56:19 +10:00
|
|
|
m_primaryCostType = static_cast< Common::ActionPrimaryCostType >( m_actionData->primaryCostType );
|
|
|
|
m_primaryCost = m_actionData->primaryCostValue;
|
2019-02-09 20:49:22 +11:00
|
|
|
|
2019-04-28 23:34:43 +02:00
|
|
|
/*if( !m_actionData->targetArea )
|
2019-04-07 16:31:09 +10:00
|
|
|
{
|
|
|
|
// override pos to target position
|
|
|
|
// todo: this is kinda dirty
|
|
|
|
for( auto& actor : m_pSource->getInRangeActors() )
|
|
|
|
{
|
|
|
|
if( actor->getId() == m_targetId )
|
|
|
|
{
|
|
|
|
m_pos = actor->getPos();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2019-04-28 23:34:43 +02:00
|
|
|
}*/
|
2019-04-07 16:31:09 +10:00
|
|
|
|
2019-03-07 20:27:45 +11:00
|
|
|
// todo: add missing rows for secondaryCostType/secondaryCostType and rename the current rows to primaryCostX
|
2019-02-09 23:14:30 +11:00
|
|
|
|
2020-01-05 17:09:27 +09:00
|
|
|
if( ActionLut::validEntryExists( static_cast< uint16_t >( getId() ) ) )
|
|
|
|
{
|
|
|
|
m_lutEntry = ActionLut::getEntry( static_cast< uint16_t >( getId() ) );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
std::memset( &m_lutEntry, 0, sizeof( ActionEntry ) );
|
|
|
|
}
|
|
|
|
|
2019-04-07 16:04:36 +10:00
|
|
|
addDefaultActorFilters();
|
|
|
|
|
2019-03-07 21:58:12 +11:00
|
|
|
return true;
|
2019-02-09 15:39:05 +11:00
|
|
|
}
|
2019-02-08 22:09:48 +11:00
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
void Action::Action::setPos( Sapphire::Common::FFXIVARR_POSITION3 pos )
|
2019-02-09 18:32:10 +11:00
|
|
|
{
|
|
|
|
m_pos = pos;
|
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
Sapphire::Common::FFXIVARR_POSITION3 Action::Action::getPos() const
|
2019-02-09 18:32:10 +11:00
|
|
|
{
|
|
|
|
return m_pos;
|
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
void Action::Action::setTargetId( uint64_t targetId )
|
2019-02-10 22:13:47 +11:00
|
|
|
{
|
|
|
|
m_targetId = targetId;
|
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
uint64_t Action::Action::getTargetId() const
|
2019-02-10 22:13:47 +11:00
|
|
|
{
|
2019-03-07 21:58:12 +11:00
|
|
|
return m_targetId;
|
2019-02-10 22:13:47 +11:00
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
bool Action::Action::hasClientsideTarget() const
|
2017-08-08 13:53:47 +02:00
|
|
|
{
|
2019-03-07 21:58:12 +11:00
|
|
|
return m_targetId > 0xFFFFFFFF;
|
2017-08-08 13:53:47 +02:00
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
bool Action::Action::isInterrupted() const
|
2017-08-08 13:53:47 +02:00
|
|
|
{
|
2019-02-10 21:21:34 +11:00
|
|
|
return m_interruptType != Common::ActionInterruptType::None;
|
2017-08-08 13:53:47 +02:00
|
|
|
}
|
|
|
|
|
2020-01-05 17:09:27 +09:00
|
|
|
Common::ActionInterruptType Action::Action::getInterruptType() const
|
|
|
|
{
|
|
|
|
return m_interruptType;
|
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
void Action::Action::setInterrupted( Common::ActionInterruptType type )
|
2017-08-08 13:53:47 +02:00
|
|
|
{
|
2019-02-10 21:12:22 +11:00
|
|
|
m_interruptType = type;
|
2017-08-08 13:53:47 +02:00
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
uint32_t Action::Action::getCastTime() const
|
2017-08-08 13:53:47 +02:00
|
|
|
{
|
2019-03-08 00:26:41 +11:00
|
|
|
return m_castTimeMs;
|
2017-08-08 13:53:47 +02:00
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
void Action::Action::setCastTime( uint32_t castTime )
|
2017-08-08 13:53:47 +02:00
|
|
|
{
|
2019-03-08 00:26:41 +11:00
|
|
|
m_castTimeMs = castTime;
|
2017-08-08 13:53:47 +02:00
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
bool Action::Action::hasCastTime() const
|
2019-02-08 22:09:48 +11:00
|
|
|
{
|
2019-03-08 00:26:41 +11:00
|
|
|
return m_castTimeMs > 0;
|
2019-02-08 22:09:48 +11:00
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
Sapphire::Entity::CharaPtr Action::Action::getSourceChara() const
|
2017-08-08 13:53:47 +02:00
|
|
|
{
|
2018-08-29 21:40:59 +02:00
|
|
|
return m_pSource;
|
2017-08-08 13:53:47 +02:00
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
bool Action::Action::update()
|
2017-08-08 13:53:47 +02:00
|
|
|
{
|
2018-08-29 21:40:59 +02:00
|
|
|
// action has not been started yet
|
|
|
|
if( m_startTime == 0 )
|
|
|
|
return false;
|
|
|
|
|
2019-02-10 21:12:22 +11:00
|
|
|
if( isInterrupted() )
|
2018-08-29 21:40:59 +02:00
|
|
|
{
|
2019-03-07 20:33:14 +11:00
|
|
|
interrupt();
|
2018-08-29 21:40:59 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2019-03-07 21:58:12 +11:00
|
|
|
if( !hasClientsideTarget() )
|
2019-02-10 22:13:47 +11:00
|
|
|
{
|
|
|
|
// todo: check if the target is still in range
|
|
|
|
}
|
|
|
|
|
2019-06-02 00:34:22 +10:00
|
|
|
uint64_t tickCount = Common::Util::getTimeMs();
|
2018-08-29 21:40:59 +02:00
|
|
|
|
2019-12-26 11:09:15 +03:00
|
|
|
if( !hasCastTime() || std::difftime( static_cast< time_t >( tickCount ), static_cast< time_t >( m_startTime ) ) > m_castTimeMs )
|
2018-08-29 21:40:59 +02:00
|
|
|
{
|
2019-03-07 20:33:14 +11:00
|
|
|
execute();
|
2018-08-29 21:40:59 +02:00
|
|
|
return true;
|
|
|
|
}
|
2019-02-10 21:01:04 +11:00
|
|
|
|
2020-01-05 17:09:27 +09:00
|
|
|
if( m_pTarget == nullptr && m_targetId != 0 )
|
|
|
|
{
|
|
|
|
// try to search for the target actor
|
|
|
|
for( auto actor : m_pSource->getInRangeActors( true ) )
|
|
|
|
{
|
|
|
|
if( actor->getId() == m_targetId )
|
|
|
|
{
|
|
|
|
m_pTarget = actor->getAsChara();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if( m_pTarget != nullptr )
|
|
|
|
{
|
|
|
|
if( !m_pTarget->isAlive() )
|
|
|
|
{
|
|
|
|
// interrupt the cast if target died
|
|
|
|
setInterrupted( Common::ActionInterruptType::RegularInterrupt );
|
|
|
|
interrupt();
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
return false;
|
2017-08-08 13:53:47 +02:00
|
|
|
}
|
2019-02-08 22:09:48 +11:00
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
void Action::Action::start()
|
2019-02-08 22:09:48 +11:00
|
|
|
{
|
|
|
|
assert( m_pSource );
|
|
|
|
|
2019-06-02 00:34:22 +10:00
|
|
|
m_startTime = Common::Util::getTimeMs();
|
2019-02-11 00:40:00 +11:00
|
|
|
|
2019-02-10 22:13:47 +11:00
|
|
|
auto player = m_pSource->getAsPlayer();
|
|
|
|
|
2019-02-11 00:40:00 +11:00
|
|
|
if( hasCastTime() )
|
2019-02-08 22:09:48 +11:00
|
|
|
{
|
2019-07-29 22:22:45 +10:00
|
|
|
auto castPacket = makeZonePacket< Server::FFXIVIpcActorCast >( getId() );
|
2019-07-26 23:20:13 +10:00
|
|
|
auto& data = castPacket->data();
|
2019-02-08 22:09:48 +11:00
|
|
|
|
2019-07-26 23:20:13 +10:00
|
|
|
data.action_id = static_cast< uint16_t >( m_id );
|
|
|
|
data.skillType = Common::SkillType::Normal;
|
|
|
|
data.unknown_1 = m_id;
|
2019-02-08 22:09:48 +11:00
|
|
|
// This is used for the cast bar above the target bar of the caster.
|
2019-07-26 23:20:13 +10:00
|
|
|
data.cast_time = m_castTimeMs / 1000.f;
|
|
|
|
data.target_id = static_cast< uint32_t >( m_targetId );
|
|
|
|
|
|
|
|
auto pos = m_pSource->getPos();
|
|
|
|
data.posX = Common::Util::floatToUInt16( pos.x );
|
|
|
|
data.posY = Common::Util::floatToUInt16( pos.y );
|
|
|
|
data.posZ = Common::Util::floatToUInt16( pos.z );
|
|
|
|
data.rotation = m_pSource->getRot();
|
2019-02-08 22:09:48 +11:00
|
|
|
|
|
|
|
m_pSource->sendToInRangeSet( castPacket, true );
|
2019-02-10 21:18:03 +11:00
|
|
|
|
2019-02-10 22:13:47 +11:00
|
|
|
if( player )
|
2019-02-10 21:18:03 +11:00
|
|
|
{
|
|
|
|
player->setStateFlag( PlayerStateFlag::Casting );
|
|
|
|
}
|
2019-02-08 22:09:48 +11:00
|
|
|
}
|
2019-02-10 23:34:05 +11:00
|
|
|
|
2019-03-08 00:26:41 +11:00
|
|
|
// todo: m_recastTimeMs needs to be adjusted for player sks/sps
|
2019-10-09 18:42:25 +02:00
|
|
|
auto actionStartPkt = makeActorControlSelf( m_pSource->getId(), ActorControlType::ActionStart, 1, getId(),
|
|
|
|
m_recastTimeMs / 10 );
|
2019-03-08 00:26:41 +11:00
|
|
|
player->queuePacket( actionStartPkt );
|
|
|
|
|
2019-02-10 23:34:05 +11:00
|
|
|
auto pScriptMgr = m_pFw->get< Scripting::ScriptMgr >();
|
2019-06-02 00:34:22 +10:00
|
|
|
|
2019-06-02 02:30:54 +10:00
|
|
|
// check the lut too and see if we have something usable, otherwise cancel the cast
|
2019-12-26 11:09:15 +03:00
|
|
|
if( !pScriptMgr->onStart( *this ) && !ActionLut::validEntryExists( static_cast< uint16_t >( getId() ) ) )
|
2019-06-02 02:30:54 +10:00
|
|
|
{
|
|
|
|
// script not implemented and insufficient lut data (no potencies)
|
2019-03-07 20:33:14 +11:00
|
|
|
interrupt();
|
2019-02-11 00:40:00 +11:00
|
|
|
|
|
|
|
if( player )
|
|
|
|
{
|
2019-06-02 02:30:54 +10:00
|
|
|
player->sendUrgent( "Action not implemented, missing script/lut entry for action#{0}", getId() );
|
2019-02-11 00:40:00 +11:00
|
|
|
player->setCurrentAction( nullptr );
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// instantly finish cast if there's no cast time
|
|
|
|
if( !hasCastTime() )
|
2019-03-07 20:33:14 +11:00
|
|
|
execute();
|
2019-02-08 22:09:48 +11:00
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
void Action::Action::interrupt()
|
2019-02-08 22:09:48 +11:00
|
|
|
{
|
|
|
|
assert( m_pSource );
|
|
|
|
|
2019-02-10 21:01:04 +11:00
|
|
|
// things that aren't players don't care about cooldowns and state flags
|
|
|
|
if( m_pSource->isPlayer() )
|
2019-02-08 22:09:48 +11:00
|
|
|
{
|
2019-02-10 21:01:04 +11:00
|
|
|
auto player = m_pSource->getAsPlayer();
|
|
|
|
|
|
|
|
// todo: reset cooldown for actual player
|
|
|
|
|
|
|
|
// reset state flag
|
2019-02-10 21:18:03 +11:00
|
|
|
//player->unsetStateFlag( PlayerStateFlag::Occupied1 );
|
2019-02-10 21:01:04 +11:00
|
|
|
player->unsetStateFlag( PlayerStateFlag::Casting );
|
|
|
|
}
|
|
|
|
|
2019-02-11 00:40:00 +11:00
|
|
|
if( hasCastTime() )
|
2019-02-10 21:01:04 +11:00
|
|
|
{
|
2019-02-10 21:12:22 +11:00
|
|
|
uint8_t interruptEffect = 0;
|
|
|
|
if( m_interruptType == ActionInterruptType::DamageInterrupt )
|
|
|
|
interruptEffect = 1;
|
|
|
|
|
|
|
|
// Note: When cast interrupt from taking too much damage, set the last value to 1.
|
|
|
|
// This enables the cast interrupt effect.
|
2019-10-09 18:42:25 +02:00
|
|
|
auto control = makeActorControl( m_pSource->getId(), ActorControlType::CastInterrupt,
|
|
|
|
0x219, 1, m_id, interruptEffect );
|
2019-02-08 22:09:48 +11:00
|
|
|
|
|
|
|
m_pSource->sendToInRangeSet( control, true );
|
|
|
|
}
|
2019-02-10 23:34:05 +11:00
|
|
|
|
|
|
|
auto pScriptMgr = m_pFw->get< Scripting::ScriptMgr >();
|
2019-03-07 20:27:45 +11:00
|
|
|
pScriptMgr->onInterrupt( *this );
|
2019-02-08 22:09:48 +11:00
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
void Action::Action::execute()
|
2019-02-08 22:09:48 +11:00
|
|
|
{
|
|
|
|
assert( m_pSource );
|
|
|
|
|
2019-04-04 21:56:59 +11:00
|
|
|
// subtract costs first, if somehow the caster stops meeting those requirements cancel the cast
|
2019-04-04 22:16:00 +11:00
|
|
|
if( !consumeResources() )
|
2019-04-04 21:56:59 +11:00
|
|
|
{
|
|
|
|
interrupt();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2019-02-08 22:09:48 +11:00
|
|
|
auto pScriptMgr = m_pFw->get< Scripting::ScriptMgr >();
|
|
|
|
|
2019-02-11 00:40:00 +11:00
|
|
|
if( hasCastTime() )
|
2019-02-08 22:09:48 +11:00
|
|
|
{
|
2019-03-07 20:27:45 +11:00
|
|
|
// todo: what's this?
|
2019-10-09 18:14:53 +02:00
|
|
|
/*auto control = ActorControlSelfPacket( m_pTarget->getId(), ActorControlType::Unk7,
|
2019-02-08 22:09:48 +11:00
|
|
|
0x219, m_id, m_id, m_id, m_id );
|
|
|
|
m_pSource->sendToInRangeSet( control, true );*/
|
|
|
|
|
2019-03-07 22:41:05 +11:00
|
|
|
if( auto player = m_pSource->getAsPlayer() )
|
|
|
|
{
|
|
|
|
player->unsetStateFlag( PlayerStateFlag::Casting );
|
|
|
|
}
|
2019-02-10 22:13:47 +11:00
|
|
|
}
|
|
|
|
|
2020-01-05 17:09:27 +09:00
|
|
|
if( isCorrectCombo() )
|
2019-03-23 20:59:41 +11:00
|
|
|
{
|
|
|
|
auto player = m_pSource->getAsPlayer();
|
|
|
|
|
|
|
|
player->sendDebug( "action combo success from action#{0}", player->getLastComboActionId() );
|
|
|
|
}
|
|
|
|
|
2019-07-25 22:46:10 +10:00
|
|
|
if( !hasClientsideTarget() )
|
2019-02-10 22:13:47 +11:00
|
|
|
{
|
2019-07-25 22:46:10 +10:00
|
|
|
buildEffects();
|
2019-02-08 22:09:48 +11:00
|
|
|
}
|
2019-02-11 14:51:56 +11:00
|
|
|
else if( auto player = m_pSource->getAsPlayer() )
|
2019-02-10 22:13:47 +11:00
|
|
|
{
|
2019-03-19 00:01:34 +11:00
|
|
|
pScriptMgr->onEObjHit( *player, m_targetId, getId() );
|
2019-02-10 22:13:47 +11:00
|
|
|
}
|
2019-03-23 20:59:41 +11:00
|
|
|
|
|
|
|
// set currently casted action as the combo action if it interrupts a combo
|
|
|
|
// ignore it otherwise (ogcds, etc.)
|
|
|
|
if( !m_actionData->preservesCombo )
|
|
|
|
{
|
2020-01-06 00:25:42 +09:00
|
|
|
// potential combo starter or correct combo from last action, must hit something to progress combo
|
|
|
|
if( !m_hitActors.empty() && ( !isComboAction() || isCorrectCombo() ) )
|
2020-01-05 17:09:27 +09:00
|
|
|
{
|
|
|
|
m_pSource->setLastComboActionId( getId() );
|
|
|
|
}
|
|
|
|
else // clear last combo action if the combo breaks
|
|
|
|
{
|
|
|
|
m_pSource->setLastComboActionId( 0 );
|
|
|
|
}
|
2019-03-23 20:59:41 +11:00
|
|
|
}
|
2019-02-08 22:09:48 +11:00
|
|
|
}
|
2019-02-09 17:36:44 +11:00
|
|
|
|
2019-07-27 00:37:40 +10:00
|
|
|
std::pair< uint32_t, Common::ActionHitSeverityType > Action::Action::calcDamage( uint32_t potency )
|
|
|
|
{
|
|
|
|
// todo: what do for npcs?
|
|
|
|
auto wepDmg = 1.f;
|
|
|
|
|
|
|
|
if( auto player = m_pSource->getAsPlayer() )
|
|
|
|
{
|
|
|
|
auto item = player->getEquippedWeapon();
|
|
|
|
assert( item );
|
|
|
|
|
|
|
|
auto role = player->getRole();
|
|
|
|
if( role == Common::Role::RangedMagical || role == Common::Role::Healer )
|
|
|
|
{
|
|
|
|
wepDmg = item->getMagicalDmg();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
wepDmg = item->getPhysicalDmg();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
auto dmg = Math::CalcStats::calcActionDamage( *m_pSource, potency, wepDmg );
|
|
|
|
|
|
|
|
return std::make_pair( dmg, Common::ActionHitSeverityType::NormalDamage );
|
|
|
|
}
|
|
|
|
|
2019-07-25 22:46:10 +10:00
|
|
|
void Action::Action::buildEffects()
|
|
|
|
{
|
|
|
|
snapshotAffectedActors( m_hitActors );
|
|
|
|
|
|
|
|
auto pScriptMgr = m_pFw->get< Scripting::ScriptMgr >();
|
2020-01-05 17:09:27 +09:00
|
|
|
auto hasLutEntry = hasValidLutEntry();
|
2019-07-25 22:46:10 +10:00
|
|
|
|
2020-01-02 01:52:20 +09:00
|
|
|
if( !pScriptMgr->onExecute( *this ) && !hasLutEntry )
|
2019-07-25 22:46:10 +10:00
|
|
|
{
|
|
|
|
if( auto player = m_pSource->getAsPlayer() )
|
|
|
|
{
|
|
|
|
player->sendUrgent( "missing lut entry for action#{}", getId() );
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2020-01-02 01:52:20 +09:00
|
|
|
if( !hasLutEntry || m_hitActors.empty() )
|
2019-07-25 22:46:10 +10:00
|
|
|
return;
|
|
|
|
|
|
|
|
// no script exists but we have a valid lut entry
|
|
|
|
if( auto player = getSourceChara()->getAsPlayer() )
|
|
|
|
{
|
2020-01-05 17:09:27 +09:00
|
|
|
player->sendDebug( "Hit target: pot: {} (c: {}, f: {}, r: {}), heal pot: {}, mpp: {}",
|
|
|
|
m_lutEntry.potency, m_lutEntry.comboPotency, m_lutEntry.flankPotency, m_lutEntry.rearPotency,
|
|
|
|
m_lutEntry.curePotency, m_lutEntry.restoreMPPercentage );
|
2019-07-25 22:46:10 +10:00
|
|
|
}
|
|
|
|
|
2020-01-05 17:09:27 +09:00
|
|
|
// when aoe, these effects are in the target whatever is hit first
|
|
|
|
bool shouldRestoreMP = true;
|
2020-01-05 21:31:54 +09:00
|
|
|
bool shouldApplyComboSucceedEffect = true;
|
2020-01-05 17:09:27 +09:00
|
|
|
|
2019-07-25 22:46:10 +10:00
|
|
|
for( auto& actor : m_hitActors )
|
|
|
|
{
|
2020-01-05 17:09:27 +09:00
|
|
|
if( m_lutEntry.potency > 0 )
|
2019-07-27 00:37:40 +10:00
|
|
|
{
|
2020-01-05 17:09:27 +09:00
|
|
|
auto dmg = calcDamage( isCorrectCombo() ? m_lutEntry.comboPotency : m_lutEntry.potency );
|
2020-01-05 20:49:50 +09:00
|
|
|
m_effectBuilder->damage( actor, actor, dmg.first, dmg.second );
|
2020-01-05 17:09:27 +09:00
|
|
|
|
|
|
|
if( dmg.first > 0 )
|
|
|
|
actor->onActionHostile( m_pSource );
|
|
|
|
|
2020-01-05 21:31:54 +09:00
|
|
|
if( isCorrectCombo() && shouldApplyComboSucceedEffect )
|
2020-01-05 17:09:27 +09:00
|
|
|
{
|
2020-01-05 20:49:50 +09:00
|
|
|
m_effectBuilder->comboSucceed( actor );
|
2020-01-05 21:31:54 +09:00
|
|
|
shouldApplyComboSucceedEffect = false;
|
2020-01-05 17:09:27 +09:00
|
|
|
}
|
2019-07-27 00:37:40 +10:00
|
|
|
|
2020-01-05 17:09:27 +09:00
|
|
|
if( !isComboAction() || isCorrectCombo() )
|
|
|
|
{
|
|
|
|
if( m_lutEntry.curePotency > 0 ) // actions with self heal
|
|
|
|
{
|
2020-01-05 20:49:50 +09:00
|
|
|
m_effectBuilder->heal( actor, m_pSource, m_lutEntry.curePotency, Common::ActionHitSeverityType::NormalHeal, Common::ActionEffectResultFlag::EffectOnSource );
|
2020-01-05 17:09:27 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
if( m_lutEntry.restoreMPPercentage > 0 && shouldRestoreMP )
|
|
|
|
{
|
2020-01-05 20:49:50 +09:00
|
|
|
m_effectBuilder->restoreMP( actor, m_pSource, m_pSource->getMaxMp() * m_lutEntry.restoreMPPercentage / 100, Common::ActionEffectResultFlag::EffectOnSource );
|
2020-01-05 17:09:27 +09:00
|
|
|
shouldRestoreMP = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( !m_actionData->preservesCombo ) // we need something like m_actionData->hasNextComboAction
|
|
|
|
{
|
|
|
|
m_effectBuilder->startCombo( actor, getId() ); // this is on all targets hit
|
|
|
|
}
|
|
|
|
}
|
2019-07-27 00:37:40 +10:00
|
|
|
}
|
2020-01-05 17:09:27 +09:00
|
|
|
else if( m_lutEntry.curePotency > 0 )
|
|
|
|
{
|
|
|
|
// todo: calcHealing()
|
2020-01-05 20:49:50 +09:00
|
|
|
m_effectBuilder->heal( actor, actor, m_lutEntry.curePotency );
|
2019-07-25 22:46:10 +10:00
|
|
|
|
2020-01-05 17:09:27 +09:00
|
|
|
if( m_lutEntry.restoreMPPercentage > 0 && shouldRestoreMP )
|
|
|
|
{
|
2020-01-05 20:49:50 +09:00
|
|
|
m_effectBuilder->restoreMP( actor, m_pSource, m_pSource->getMaxMp() * m_lutEntry.restoreMPPercentage / 100, Common::ActionEffectResultFlag::EffectOnSource );
|
2020-01-05 17:09:27 +09:00
|
|
|
shouldRestoreMP = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if( m_lutEntry.restoreMPPercentage > 0 && shouldRestoreMP )
|
2019-07-27 00:37:40 +10:00
|
|
|
{
|
2020-01-05 20:49:50 +09:00
|
|
|
m_effectBuilder->restoreMP( actor, m_pSource, m_pSource->getMaxMp() * m_lutEntry.restoreMPPercentage / 100, Common::ActionEffectResultFlag::EffectOnSource );
|
2020-01-05 17:09:27 +09:00
|
|
|
shouldRestoreMP = false;
|
2019-07-27 00:37:40 +10:00
|
|
|
}
|
2019-07-25 22:46:10 +10:00
|
|
|
}
|
|
|
|
|
|
|
|
m_effectBuilder->buildAndSendPackets();
|
|
|
|
|
|
|
|
// at this point we're done with it and no longer need it
|
|
|
|
m_effectBuilder.reset();
|
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
bool Action::Action::preCheck()
|
2019-03-07 20:27:45 +11:00
|
|
|
{
|
|
|
|
if( auto player = m_pSource->getAsPlayer() )
|
|
|
|
{
|
2019-06-02 02:30:54 +10:00
|
|
|
if( !playerPreCheck( *player ) )
|
2019-03-07 20:27:45 +11:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
bool Action::Action::playerPreCheck( Entity::Player& player )
|
2019-03-07 20:27:45 +11:00
|
|
|
{
|
|
|
|
// lol
|
|
|
|
if( !player.isAlive() )
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// npc actions/non player actions
|
|
|
|
if( m_actionData->classJob == -1 )
|
|
|
|
return false;
|
|
|
|
|
|
|
|
if( player.getLevel() < m_actionData->classJobLevel )
|
|
|
|
return false;
|
|
|
|
|
|
|
|
auto currentClass = player.getClass();
|
|
|
|
auto actionClass = static_cast< Common::ClassJob >( m_actionData->classJob );
|
|
|
|
|
|
|
|
if( actionClass != Common::ClassJob::Adventurer && currentClass != actionClass )
|
|
|
|
{
|
|
|
|
// check if not a base class action
|
|
|
|
auto exdData = m_pFw->get< Data::ExdDataGenerated >();
|
|
|
|
assert( exdData );
|
|
|
|
|
|
|
|
auto classJob = exdData->get< Data::ClassJob >( static_cast< uint8_t >( currentClass ) );
|
|
|
|
if( !classJob )
|
|
|
|
return false;
|
|
|
|
|
|
|
|
if( classJob->classJobParent != m_actionData->classJob )
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-06-02 02:30:54 +10:00
|
|
|
if( !m_actionData->canTargetSelf && getTargetId() == m_pSource->getId() )
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// todo: does this need to check for party/alliance stuff or it's just same type?
|
|
|
|
// todo: m_pTarget doesn't exist at this stage because we only fill it when we snapshot targets
|
|
|
|
// if( !m_actionData->canTargetFriendly && m_pSource->getObjKind() == m_pTarget->getObjKind() )
|
|
|
|
// return false;
|
|
|
|
//
|
|
|
|
// if( !m_actionData->canTargetHostile && m_pSource->getObjKind() != m_pTarget->getObjKind() )
|
|
|
|
// return false;
|
|
|
|
|
|
|
|
// todo: party/dead validation
|
2019-03-07 20:27:45 +11:00
|
|
|
|
|
|
|
// validate range
|
|
|
|
|
|
|
|
|
2019-04-04 22:16:00 +11:00
|
|
|
if( !hasResources() )
|
2019-04-04 21:56:59 +11:00
|
|
|
return false;
|
2019-03-07 21:58:12 +11:00
|
|
|
|
2019-03-07 20:27:45 +11:00
|
|
|
return true;
|
2019-03-07 21:58:12 +11:00
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
uint32_t Action::Action::getAdditionalData() const
|
2019-03-07 21:58:12 +11:00
|
|
|
{
|
|
|
|
return m_additionalData;
|
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
void Action::Action::setAdditionalData( uint32_t data )
|
2019-03-07 21:58:12 +11:00
|
|
|
{
|
|
|
|
m_additionalData = data;
|
2019-03-23 20:59:41 +11:00
|
|
|
}
|
|
|
|
|
2020-01-05 17:09:27 +09:00
|
|
|
bool Action::Action::isCorrectCombo() const
|
2019-03-23 20:59:41 +11:00
|
|
|
{
|
|
|
|
auto lastActionId = m_pSource->getLastComboActionId();
|
|
|
|
|
|
|
|
if( lastActionId == 0 )
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return m_actionData->actionCombo == lastActionId;
|
2019-04-04 21:56:59 +11:00
|
|
|
}
|
|
|
|
|
2020-01-05 17:09:27 +09:00
|
|
|
bool Action::Action::isComboAction() const
|
|
|
|
{
|
|
|
|
return m_actionData->actionCombo != 0;
|
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
bool Action::Action::primaryCostCheck( bool subtractCosts )
|
2019-04-04 21:56:59 +11:00
|
|
|
{
|
|
|
|
switch( m_primaryCostType )
|
|
|
|
{
|
|
|
|
case Common::ActionPrimaryCostType::TacticsPoints:
|
|
|
|
{
|
|
|
|
auto curTp = m_pSource->getTp();
|
|
|
|
|
|
|
|
if( curTp < m_primaryCost )
|
|
|
|
return false;
|
|
|
|
|
|
|
|
if( subtractCosts )
|
|
|
|
m_pSource->setTp( curTp - m_primaryCost );
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
case Common::ActionPrimaryCostType::MagicPoints:
|
|
|
|
{
|
|
|
|
auto curMp = m_pSource->getMp();
|
|
|
|
|
2019-06-30 19:51:18 +10:00
|
|
|
auto cost = m_primaryCost * 100;
|
2019-04-04 21:56:59 +11:00
|
|
|
|
2019-12-26 11:09:15 +03:00
|
|
|
if( curMp < static_cast< uint32_t >( cost ) )
|
2019-04-04 21:56:59 +11:00
|
|
|
return false;
|
|
|
|
|
|
|
|
if( subtractCosts )
|
2019-12-26 11:09:15 +03:00
|
|
|
m_pSource->setMp( curMp - static_cast< uint32_t >( cost ) );
|
2019-04-04 21:56:59 +11:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2019-04-04 22:00:36 +11:00
|
|
|
// free casts, likely just pure ogcds
|
2019-04-04 21:56:59 +11:00
|
|
|
case Common::ActionPrimaryCostType::None:
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
bool Action::Action::secondaryCostCheck( bool subtractCosts )
|
2019-04-04 21:56:59 +11:00
|
|
|
{
|
|
|
|
// todo: these need to be mapped
|
|
|
|
return true;
|
2019-04-04 22:16:00 +11:00
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
bool Action::Action::hasResources()
|
2019-04-04 22:16:00 +11:00
|
|
|
{
|
|
|
|
return primaryCostCheck( false ) && secondaryCostCheck( false );
|
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
bool Action::Action::consumeResources()
|
2019-04-04 22:16:00 +11:00
|
|
|
{
|
|
|
|
return primaryCostCheck( true ) && secondaryCostCheck( true );
|
2019-04-07 16:04:36 +10:00
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
bool Action::Action::snapshotAffectedActors( std::vector< Entity::CharaPtr >& actors )
|
2019-04-07 16:04:36 +10:00
|
|
|
{
|
2019-05-28 22:03:55 +10:00
|
|
|
for( const auto& actor : m_pSource->getInRangeActors( true ) )
|
2019-04-07 16:04:36 +10:00
|
|
|
{
|
|
|
|
// check for initial target validity based on flags in action exd (pc/enemy/etc.)
|
|
|
|
if( !preFilterActor( *actor ) )
|
|
|
|
continue;
|
|
|
|
|
|
|
|
for( const auto& filter : m_actorFilters )
|
|
|
|
{
|
|
|
|
if( filter->conditionApplies( *actor ) )
|
|
|
|
{
|
|
|
|
actors.push_back( actor->getAsChara() );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if( auto player = m_pSource->getAsPlayer() )
|
|
|
|
{
|
|
|
|
player->sendDebug( "Hit {} actors with {} filters", actors.size(), m_actorFilters.size() );
|
|
|
|
for( const auto& actor : actors )
|
|
|
|
{
|
|
|
|
player->sendDebug( "hit actor#{}", actor->getId() );
|
|
|
|
}
|
|
|
|
}
|
2019-05-28 22:03:55 +10:00
|
|
|
|
|
|
|
return !actors.empty();
|
2019-04-07 16:04:36 +10:00
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
void Action::Action::addActorFilter( World::Util::ActorFilterPtr filter )
|
2019-04-07 16:04:36 +10:00
|
|
|
{
|
|
|
|
m_actorFilters.push_back( std::move( filter ) );
|
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
void Action::Action::addDefaultActorFilters()
|
2019-04-07 16:04:36 +10:00
|
|
|
{
|
|
|
|
switch( m_castType )
|
|
|
|
{
|
|
|
|
case Common::CastType::SingleTarget:
|
|
|
|
{
|
|
|
|
auto filter = std::make_shared< World::Util::ActorFilterSingleTarget >( static_cast< uint32_t >( m_targetId ) );
|
|
|
|
|
|
|
|
addActorFilter( filter );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case Common::CastType::CircularAOE:
|
|
|
|
{
|
|
|
|
auto filter = std::make_shared< World::Util::ActorFilterInRange >( m_pos, m_effectRange );
|
|
|
|
|
|
|
|
addActorFilter( filter );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
// case Common::CastType::RectangularAOE:
|
|
|
|
// {
|
|
|
|
// break;
|
|
|
|
// }
|
|
|
|
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
Logger::error( "[{}] Action#{} has CastType#{} but that cast type is unhandled. Cancelling cast.",
|
|
|
|
m_pSource->getId(), getId(), m_castType );
|
|
|
|
|
|
|
|
interrupt();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
bool Action::Action::preFilterActor( Sapphire::Entity::Actor& actor ) const
|
2019-04-07 16:04:36 +10:00
|
|
|
{
|
|
|
|
auto kind = actor.getObjKind();
|
2020-01-05 17:09:27 +09:00
|
|
|
auto chara = actor.getAsChara();
|
2019-04-07 16:04:36 +10:00
|
|
|
|
|
|
|
// todo: are there any server side eobjs that players can hit?
|
|
|
|
if( kind != ObjKind::BattleNpc && kind != ObjKind::Player )
|
|
|
|
return false;
|
|
|
|
|
2020-01-05 20:49:50 +09:00
|
|
|
if( m_lutEntry.potency > 0 && chara->getId() == m_pSource->getId() )
|
2020-01-05 17:09:27 +09:00
|
|
|
{
|
|
|
|
// damage action shouldn't hit self
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( ( m_lutEntry.potency > 0 || m_lutEntry.curePotency > 0 ) && !chara->isAlive() )
|
|
|
|
{
|
|
|
|
// can't deal damage or heal a dead entity
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-04-07 16:04:36 +10:00
|
|
|
// todo: handle things such based on canTargetX
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
std::vector< Sapphire::Entity::CharaPtr >& Action::Action::getHitCharas()
|
2019-04-07 16:04:36 +10:00
|
|
|
{
|
|
|
|
return m_hitActors;
|
|
|
|
}
|
|
|
|
|
2019-06-03 00:39:02 +10:00
|
|
|
Sapphire::Entity::CharaPtr Action::Action::getHitChara()
|
2019-04-07 16:04:36 +10:00
|
|
|
{
|
|
|
|
if( !m_hitActors.empty() )
|
|
|
|
{
|
|
|
|
return m_hitActors.at( 0 );
|
|
|
|
}
|
|
|
|
|
|
|
|
return nullptr;
|
2020-01-05 17:09:27 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
bool Action::Action::hasValidLutEntry() const
|
|
|
|
{
|
|
|
|
return m_lutEntry.potency != 0 || m_lutEntry.comboPotency != 0 || m_lutEntry.flankPotency != 0 || m_lutEntry.frontPotency != 0 ||
|
|
|
|
m_lutEntry.rearPotency != 0 || m_lutEntry.curePotency != 0 || m_lutEntry.restoreMPPercentage != 0;
|
2019-02-09 23:14:30 +11:00
|
|
|
}
|