From 9e142061372eb7339ed37e18f0d88a9407ba0976 Mon Sep 17 00:00:00 2001 From: collett Date: Sat, 7 Aug 2021 21:30:33 +0900 Subject: [PATCH] more testing code for SubCts999 --- .../quest/subquest/gridania/SubCts999.cpp | 45 +++++++++++++++++-- src/world/Manager/TerritoryMgr.cpp | 2 +- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/src/scripts/quest/subquest/gridania/SubCts999.cpp b/src/scripts/quest/subquest/gridania/SubCts999.cpp index bd5d72ed..f31048fc 100644 --- a/src/scripts/quest/subquest/gridania/SubCts999.cpp +++ b/src/scripts/quest/subquest/gridania/SubCts999.cpp @@ -496,6 +496,22 @@ public: onProgress( player, param1, param2, 4, 0 ); } + void onSaveData( Sapphire::Entity::Player& player, const Common::EventSaveData& data ) override + { + if( data.scene == 69 ) + { + player.setQuestUI8AH( getId(), data.params[0] ); + player.setQuestUI8AL( getId(), data.params[1] ); + player.setQuestUI8BH( getId(), data.params[2] ); + player.setQuestUI8BL( getId(), data.params[3] ); + player.setQuestUI8CH( getId(), data.params[4] ); + player.setQuestUI8CL( getId(), data.params[5] ); + player.setQuestUI8DH( getId(), data.params[6] ); + player.setQuestUI8DL( getId(), data.params[7] ); + player.sendDebug( "Ceremony settings saved." ); + } + } + private: void checkProgressSeq0( Entity::Player& player ) { @@ -1255,8 +1271,29 @@ private: { if( result.param1 > 0 && result.param2 == 1 ) { - player.setQuestUI8AH( getId(), 18 ); - player.setQuestUI8AL( getId(), 7 ); + uint8_t plan = 3; // standard = 1, golden = 2, platinum = 3 + player.setQuestUI8AH( getId(), 1 ); + switch( plan ) + { + case 1: + player.setQuestUI8AL( getId(), 1 ); + break; + case 2: + player.setQuestUI8AL( getId(), 2 ); + break; + case 3: + player.setQuestUI8AL( getId(), 5 ); + break; + } + player.setQuestUI8BH( getId(), 1 ); + player.setQuestUI8BL( getId(), 1 ); + player.setQuestUI8CH( getId(), 1 ); + player.setQuestUI8CL( getId(), 1 ); + player.setQuestUI8DH( getId(), 1 ); + player.setQuestUI8DL( getId(), 0 ); + + player.setQuestUI8EH( getId(), plan ); + player.eventFinish( getId(), 1 ); player.enterPredefinedPrivateInstance( 393 ); } @@ -1325,7 +1362,7 @@ private: player.enterPredefinedPrivateInstance( 393 ); } }; - player.playScene( getId(), 71, NONE, callback ); + player.playScene( getId(), 71, HIDE_HOTBAR, callback ); } void Scene00072( Entity::Player& player ) @@ -1344,7 +1381,7 @@ private: { //checkProgressSeq12( player ); }; - player.playScene( getId(), 73, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, callback ); + player.playScene( getId(), 73, HIDE_HOTBAR, callback ); } void Scene00074( Entity::Player& player ) diff --git a/src/world/Manager/TerritoryMgr.cpp b/src/world/Manager/TerritoryMgr.cpp index 37a52b43..2c5e68a5 100644 --- a/src/world/Manager/TerritoryMgr.cpp +++ b/src/world/Manager/TerritoryMgr.cpp @@ -736,7 +736,7 @@ std::unordered_map< uint32_t, Sapphire::World::Manager::TerritoryMgr::InstanceSp { 880, { { 100, 0, 100 }, 3.14 } }, { 881, { { 100, 0, 100 }, 0 } }, { 918, { { 0, -200, -410 }, -3.1415 } }, - { 393, { { 0, 0, 0 }, -3.1415 } }, + { 393, { { 3, 2.64, -95 }, -3.1415 } }, }; std::unordered_map< uint32_t, uint32_t > Sapphire::World::Manager::TerritoryMgr::instanceExitEvent =