mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-04 01:37:47 +00:00
fix self targeted actions failing target snapshot, fix player being unable to complete chasing shadows
This commit is contained in:
parent
11002097db
commit
859a4a5d68
3 changed files with 11 additions and 13 deletions
|
@ -67,6 +67,13 @@ public:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( instance.getCountEnemyBNpc() == 0 && successCalled == 0 )
|
||||||
|
{
|
||||||
|
instance.setCustomVar( SUCCESS_CALLED, 1 );
|
||||||
|
instance.success();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if( !boss || !ida || !papa )
|
if( !boss || !ida || !papa )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -141,14 +148,6 @@ public:
|
||||||
a4->hateListAdd( pPlayer, 1 );
|
a4->hateListAdd( pPlayer, 1 );
|
||||||
a5->hateListAdd( pPlayer, 1 );
|
a5->hateListAdd( pPlayer, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( instance.getCountEnemyBNpc() == 0 && successCalled == 0 )
|
|
||||||
{
|
|
||||||
instance.setCustomVar( SUCCESS_CALLED, 1 );
|
|
||||||
instance.success();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void onEnterTerritory( QuestBattle& instance, Entity::Player& player, uint32_t eventId, uint16_t param1,
|
void onEnterTerritory( QuestBattle& instance, Entity::Player& player, uint32_t eventId, uint16_t param1,
|
||||||
|
|
|
@ -491,7 +491,7 @@ bool Sapphire::Action::Action::consumeResources()
|
||||||
|
|
||||||
bool Sapphire::Action::Action::snapshotAffectedActors( std::vector< Entity::CharaPtr >& actors )
|
bool Sapphire::Action::Action::snapshotAffectedActors( std::vector< Entity::CharaPtr >& actors )
|
||||||
{
|
{
|
||||||
for( const auto& actor : m_pSource->getInRangeActors() )
|
for( const auto& actor : m_pSource->getInRangeActors( true ) )
|
||||||
{
|
{
|
||||||
// check for initial target validity based on flags in action exd (pc/enemy/etc.)
|
// check for initial target validity based on flags in action exd (pc/enemy/etc.)
|
||||||
if( !preFilterActor( *actor ) )
|
if( !preFilterActor( *actor ) )
|
||||||
|
@ -515,9 +515,8 @@ bool Sapphire::Action::Action::snapshotAffectedActors( std::vector< Entity::Char
|
||||||
player->sendDebug( "hit actor#{}", actor->getId() );
|
player->sendDebug( "hit actor#{}", actor->getId() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( actors.empty() )
|
|
||||||
return false;
|
return !actors.empty();
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sapphire::Action::Action::addActorFilter( World::Util::ActorFilterPtr filter )
|
void Sapphire::Action::Action::addActorFilter( World::Util::ActorFilterPtr filter )
|
||||||
|
|
|
@ -385,7 +385,7 @@ uint32_t Sapphire::QuestBattle::getQuestId() const
|
||||||
uint32_t Sapphire::QuestBattle::getCountEnemyBNpc()
|
uint32_t Sapphire::QuestBattle::getCountEnemyBNpc()
|
||||||
{
|
{
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
for( auto bnpcIt : m_bNpcMap )
|
for( const auto& bnpcIt : m_bNpcMap )
|
||||||
{
|
{
|
||||||
if( bnpcIt.second->getEnemyType() == 4 && bnpcIt.second->isAlive() )
|
if( bnpcIt.second->getEnemyType() == 4 && bnpcIt.second->isAlive() )
|
||||||
count++;
|
count++;
|
||||||
|
|
Loading…
Add table
Reference in a new issue