mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 22:17:45 +00:00
fix a crash where m_pTarget was invalid
This commit is contained in:
parent
370261591e
commit
d53fd384e3
2 changed files with 3 additions and 3 deletions
|
@ -127,14 +127,14 @@ void Sapphire::Action::Action::onStart()
|
|||
{
|
||||
m_pSource->getAsPlayer()->sendDebug( "onStart()" );
|
||||
|
||||
auto castPacket = makeZonePacket< FFXIVIpcActorCast >( getId() );
|
||||
auto castPacket = makeZonePacket< Server::FFXIVIpcActorCast >( getId() );
|
||||
|
||||
castPacket->data().action_id = m_id;
|
||||
castPacket->data().skillType = Common::SkillType::Normal;
|
||||
castPacket->data().unknown_1 = m_id;
|
||||
// This is used for the cast bar above the target bar of the caster.
|
||||
castPacket->data().cast_time = m_castTime / 1000.f;
|
||||
castPacket->data().target_id = m_pTarget->getId();
|
||||
castPacket->data().target_id = m_targetId;
|
||||
|
||||
m_pSource->sendToInRangeSet( castPacket, true );
|
||||
m_pSource->getAsPlayer()->setStateFlag( PlayerStateFlag::Casting );
|
||||
|
|
|
@ -27,7 +27,7 @@ void World::Manager::ActionMgr::handleTargetedPlayerAction( Entity::Player& play
|
|||
{
|
||||
player.sendDebug( "got act: {0}", actionData->name );
|
||||
|
||||
auto action = Action::make_Action( player.getAsPlayer(), nullptr, actionId, actionData, framework() );
|
||||
auto action = Action::make_Action( player.getAsPlayer(), actionId, actionData, framework() );
|
||||
action->setType( static_cast< Common::ActionType >( type ) );
|
||||
|
||||
bootstrapAction( player, action, *actionData );
|
||||
|
|
Loading…
Add table
Reference in a new issue