mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-30 16:17:46 +00:00
Merge pull request #895 from pinapelz/master
Fixed bugs with some existing quests
This commit is contained in:
commit
fd7ff989e9
3 changed files with 12 additions and 13 deletions
|
@ -113,7 +113,7 @@ private:
|
|||
|
||||
void Scene00001( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 1, HIDE_HOTBAR | CONDITION_CUTSCENE, bindSceneReturn( &ManFst005::Scene00001Return ) );
|
||||
eventMgr().playQuestScene( player, getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &ManFst005::Scene00001Return ) );
|
||||
}
|
||||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
|
|
|
@ -145,18 +145,18 @@ public:
|
|||
private:
|
||||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player, uint32_t varIdx )
|
||||
{
|
||||
if( varIdx == 1 )
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 0, 0, 0 );
|
||||
else if( varIdx == 2 )
|
||||
eventMgr().sendEventNotice( player, getId(), 2, 0, 0, 0 );
|
||||
else
|
||||
eventMgr().sendEventNotice( player, getId(), 3, 0, 0, 0 );
|
||||
|
||||
auto QUEST_ONKILL_37 = quest.getUI8AL();
|
||||
auto QUEST_ONKILL_49 = quest.getUI8BH();
|
||||
auto QUEST_ONKILL_47 = quest.getUI8BL();
|
||||
|
||||
if( QUEST_ONKILL_37 >= 3 && QUEST_ONKILL_49 >= 3 && QUEST_ONKILL_47 >= 3 )
|
||||
if( varIdx == 1 && QUEST_ONKILL_37 <= 3 )
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 0, 0, 0 );
|
||||
else if( varIdx == 2 && QUEST_ONKILL_49 <= 3 )
|
||||
eventMgr().sendEventNotice( player, getId(), 2, 0, 0, 0 );
|
||||
else if( varIdx == 3 && QUEST_ONKILL_47 <= 3 )
|
||||
eventMgr().sendEventNotice( player, getId(), 3, 0, 0, 0 );
|
||||
|
||||
if( QUEST_ONKILL_37 + 1 >= 3 && QUEST_ONKILL_49 + 1 >= 3 && QUEST_ONKILL_47 + 1 >= 3 )
|
||||
{
|
||||
quest.setSeq( SeqFinish );
|
||||
}
|
||||
|
|
|
@ -103,13 +103,12 @@ public:
|
|||
|
||||
void onBNpcKill( World::Quest& quest, Sapphire::Entity::BNpc& bnpc, Sapphire::Entity::Player& player ) override
|
||||
{
|
||||
if( bnpc.getLayoutId() != Enemy0 && bnpc.getLayoutId() != Enemy1 )
|
||||
if( bnpc.getBNpcNameId() != Enemy0 && bnpc.getBNpcNameId() != Enemy1 )
|
||||
return;
|
||||
|
||||
auto currentKC39 = quest.getUI8AL() + 1;
|
||||
auto currentKC12 = quest.getUI8BH() + 1;
|
||||
|
||||
switch( bnpc.getLayoutId() )
|
||||
switch( bnpc.getBNpcNameId() )
|
||||
{
|
||||
case Enemy0:
|
||||
{
|
||||
|
@ -569,7 +568,7 @@ private:
|
|||
|
||||
void Scene00026Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
//Empty
|
||||
quest.setSeq( Seq4 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Reference in a new issue