mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 22:37:45 +00:00
fix the loading of some quest battles
This commit is contained in:
parent
d05f72fe99
commit
0fe75c373e
1 changed files with 20 additions and 1 deletions
|
@ -302,7 +302,26 @@ Sapphire::TerritoryPtr Sapphire::World::Manager::TerritoryMgr::createQuestBattle
|
|||
if( !pQuestBattleInfo )
|
||||
return nullptr;
|
||||
|
||||
auto pQuestInfo = exdData.get< Sapphire::Data::Quest >( pQuestBattleInfo->quest );
|
||||
auto questId = pQuestBattleInfo->quest;
|
||||
|
||||
if( questId > 0x1FFFF )
|
||||
{
|
||||
auto arrayEventHandler = exdData.get< Sapphire::Data::ArrayEventHandler >( questId );
|
||||
if( arrayEventHandler )
|
||||
{
|
||||
int i = 0;
|
||||
while( i < arrayEventHandler->data.size() )
|
||||
{
|
||||
auto nextId = arrayEventHandler->data[ i ];
|
||||
if( nextId == 0 )
|
||||
break;
|
||||
questId = nextId;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto pQuestInfo = exdData.get< Sapphire::Data::Quest >( questId );
|
||||
if( !pQuestInfo )
|
||||
return nullptr;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue