From 69ea353c1ec1221215c3afdcd6230223a15092b6 Mon Sep 17 00:00:00 2001 From: collett Date: Sun, 15 Aug 2021 23:56:10 +0900 Subject: [PATCH 1/5] scene 2 --- .../instances/wedding/SanctumOfTheTwelve.cpp | 216 ++++++++++++++++-- 1 file changed, 193 insertions(+), 23 deletions(-) diff --git a/src/scripts/instances/wedding/SanctumOfTheTwelve.cpp b/src/scripts/instances/wedding/SanctumOfTheTwelve.cpp index 0587ad59..7927810d 100644 --- a/src/scripts/instances/wedding/SanctumOfTheTwelve.cpp +++ b/src/scripts/instances/wedding/SanctumOfTheTwelve.cpp @@ -24,10 +24,9 @@ public: 0: current time 1: main actor 1 id 2: main actor 2 id - 3: seq 3 start time - 4: seq 3 internal sequence - 5: seq 3 remaining unfinished player count - 6: seq 4 internal sequence + 3: internal sequence start time + 4: internal sequence + 5: remaining unfinished player count 101: questBL 102: questBH 103: questCL @@ -46,20 +45,20 @@ public: auto mainBookHandler = [ & ]( Entity::Player& player, Entity::EventObjectPtr eobj, TerritoryPtr terri, uint32_t eventId, uint64_t actorId ) { + auto v1 = instance.getCustomVar( 1 ); + auto v2 = instance.getCustomVar( 2 ); + if( v1 == 0 ) + { + player.sendUrgent( "The host of this ceremony is not determined yet, become the host as the first one to join the instance with quest 67114 at seq 12." ); + return; + } + if( v1 != player.getId() ) + { + player.sendUrgent( "You are not the host of this ceremony." ); + return; + } if( instance.getSequence() == 1 ) { - auto v1 = instance.getCustomVar( 1 ); - if( v1 == 0 ) - { - player.sendUrgent( "The host of this ceremony is not determined yet, become the host as the first one to join the instance with quest 67114 at seq 12." ); - return; - } - if( v1 != player.getId() ) - { - player.sendUrgent( "You are not the host of this ceremony." ); - return; - } - auto v2 = instance.getCustomVar( 2 ); if( v2 > 0 ) { auto p1 = instance.getPlayer( v1 ); @@ -95,6 +94,39 @@ public: } } else if( instance.getSequence() == 4 ) + { + if( instance.getCustomVar( 4 ) == 5 ) + { + auto p1 = instance.getPlayer( v1 ); + auto p2 = instance.getPlayer( v2 ); + if( p1 && p2 ) + { + auto seq4Callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param1 != 512 || result.param2 != 0 ) + return; + instance.setCustomVar( 3, 0 ); + instance.setCustomVar( 4, 0 ); + instance.setSequence( 5 ); + instance.foreachPlayer( [ &instance ]( auto p ) + { + p->queuePacket( makeActorControlSelf( p->getId(), DirectorUpdate, instance.getDirectorId(), 0x80000001, 1 ) ); + }); + }; + // event item workaround + player.eventFinish( eventId, 1 ); + player.eventStart( player.getId(), instance.getDirectorId(), Event::EventHandler::Item, 0, 2001464 ); + player.playScene( instance.getDirectorId(), 32, 134225921, 0, 1, 1086, seq4Callback ); + } + else + { + player.sendUrgent( "Two main characters must be in the instance to continue the ceremony." ); + } + } + else + player.sendUrgent( "Waiting for the cutscene and popup messages to finish..." ); + } + else if( instance.getSequence() == 6 ) { player.sendUrgent( "WIP..." ); } @@ -135,7 +167,7 @@ public: case 1: case 2: { - if( dt >= 1 + v4 * 6 ) + if( dt >= 1 + v4 * 7 ) { instance.setCustomVar( 4, v4 + 1 ); FFXIVIpcDirectorPopUp packetData = {}; @@ -158,9 +190,8 @@ public: } case 3: { - if( dt < 20 ) + if( dt < 23 ) return; - instance.setCustomVar( 4, 255 ); auto p1 = instance.getPlayer( instance.getCustomVar( 1 ) ); auto p2 = instance.getPlayer( instance.getCustomVar( 2 ) ); if( !p1 || !p2 ) @@ -244,20 +275,159 @@ public: instance.setCustomVar( 5, v5 ); if( v5 == 0 ) { - player.sendDebug( "all players finished scene" ); + instance.setCustomVar( 3, 0 ); + instance.setCustomVar( 4, 1 ); } }; p->playScene16( instance.getDirectorId(), 3, 9219, 0, paramList, seq3Callback ); }); + instance.setCustomVar( 3, 0 ); + instance.setCustomVar( 4, 0 ); instance.setCustomVar( 5, instance.getPopCount() ); - instance.setCustomVar( 6, 0 ); instance.setSequence( 4 ); break; } } + break; + } + case 4: + { + if( instance.getCustomVar( 3 ) == 0 ) + instance.setCustomVar( 3, tickCount ); + auto dt = std::difftime( tickCount, instance.getCustomVar( 3 ) ) / 1000.f; + auto v4 = instance.getCustomVar( 4 ); + switch( v4 ) + { + case 1: + case 2: + case 3: + { + if( dt >= 6 + ( v4 - 1 ) * 7 ) + { + instance.setCustomVar( 4, v4 + 1 ); + FFXIVIpcDirectorPopUp packetData = {}; + packetData.directorId = instance.getDirectorId(); + packetData.flags = 3; + packetData.bNPCName = 1010505; + packetData.textId = v4 == 1 ? 1008: ( v4 == 2 ? 1091 : 1097 ); + packetData.popupTimeMs = 6000; + packetData.param[ 0 ] = 1024; + packetData.param[ 1 ] = instance.getCustomVar( 1 ); + packetData.param[ 2 ] = instance.getCustomVar( 2 ); + instance.foreachPlayer( [ &instance, &packetData ]( auto p ) + { + auto packet = makeZonePacket< FFXIVIpcDirectorPopUp >( p->getId() ); + memcpy( &packet->data(), &packetData, sizeof( packetData ) ); + p->queuePacket( packet ); + }); + } + break; + } + case 4: + { + if( dt >= 28 ) + { + instance.setCustomVar( 4, 5 ); + instance.foreachPlayer( [ &instance ]( auto p ) + { + auto packet = makeZonePacket< FFXIVDirectorUnk4 >( p->getId() ); + packet->data().param[0] = instance.getDirectorId(); + packet->data().param[1] = 4353; + packet->data().param[2] = 1; + packet->data().param[3] = 0; + p->queuePacket( packet ); + }); + } + } + } + break; + } + case 5: + { + if( instance.getCustomVar( 3 ) == 0 ) + instance.setCustomVar( 3, tickCount ); + auto dt = std::difftime( tickCount, instance.getCustomVar( 3 ) ) / 1000.f; + auto v4 = instance.getCustomVar( 4 ); + switch( v4 ) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + { + if( dt >= 1 + v4 * 7 ) + { + instance.setCustomVar( 4, v4 + 1 ); + FFXIVIpcDirectorPopUp packetData = {}; + packetData.directorId = instance.getDirectorId(); + packetData.flags = 3; + packetData.bNPCName = 1010505; + packetData.textId = v4 == 0 ? 1010 : + ( v4 == 1 ? 1011 : + ( v4 == 2 ? 1015 : + ( v4 == 3 ? 1103 : + ( v4 == 4 ? 1019 : + ( v4 == 5 ? 1107 : + ( v4 == 6 ? 1020 : + ( v4 == 7 ? 1021 : + ( v4 == 8 ? 1125 : + ( v4 == 9 ? 1126 : 1127 ) ) ) ) ) ) ) ) ); + packetData.popupTimeMs = 6000; + packetData.param[ 0 ] = 1024; + packetData.param[ 1 ] = instance.getCustomVar( 1 ); + packetData.param[ 2 ] = instance.getCustomVar( 2 ); + instance.foreachPlayer( [ &instance, &packetData ]( auto p ) + { + auto packet = makeZonePacket< FFXIVIpcDirectorPopUp >( p->getId() ); + memcpy( &packet->data(), &packetData, sizeof( packetData ) ); + p->queuePacket( packet ); + }); + } + break; + } + case 11: + { + if( dt >= 78 ) + { + auto qBH = instance.getCustomVar( 102 ); + instance.foreachPlayer( [ &instance, qBH ]( auto p ) + { + p->eventStart( p->getId(), instance.getDirectorId(), Event::EventHandler::GameProgress, 1, 1 ); + std::vector< uint32_t > paramList; + paramList.push_back( 665 + qBH ); + + auto seq5Callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + auto v5 = instance.getCustomVar( 5 ); + v5--; + instance.setCustomVar( 5, v5 ); + if( v5 == 0 ) + { + instance.setCustomVar( 3, 0 ); + instance.setCustomVar( 4, 1 ); + } + }; + + p->playScene16( instance.getDirectorId(), 3, 9219, 0, paramList, seq5Callback ); + }); + instance.setCustomVar( 3, 0 ); + instance.setCustomVar( 4, 0 ); + instance.setCustomVar( 5, instance.getPopCount() ); + instance.setSequence( 6 ); + } + break; + } + } + break; } - break; } instance.setCustomVar( 0, tickCount ); } @@ -323,7 +493,7 @@ public: { player.setPosAndNotifyClient( 0, 750, -50, -3.14f ); } - //player.queuePacket( makeActorControlSelf( getId(), DirectorUpdate, instance.getDirectorId(), 0x80000003, 1200 ) ); // timer + //player.queuePacket( makeActorControlSelf( getId(), DirectorUpdate, instance.getDirectorId(), 0x80000003, 1200 ) ); // timer, we dont need it for now player.playScene( instance.getDirectorId(), 1, HIDE_HOTBAR, 0, 2, 4, callback ); } From f1210d6deb9c47e6a528ea83ea854f67cdc3d764 Mon Sep 17 00:00:00 2001 From: collett Date: Sun, 15 Aug 2021 23:58:58 +0900 Subject: [PATCH 2/5] update code --- src/world/Actor/Player.cpp | 50 +++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/world/Actor/Player.cpp b/src/world/Actor/Player.cpp index e376ee9c..b674a8d9 100644 --- a/src/world/Actor/Player.cpp +++ b/src/world/Actor/Player.cpp @@ -538,34 +538,34 @@ bool Sapphire::Entity::Player::exitInstance() { auto& teriMgr = Common::Service< TerritoryMgr >::ref(); - if( auto d = getCurrentTerritory()->getAsDirector() ) - if( d->getContentFinderConditionId() > 0 ) + auto d = getCurrentTerritory()->getAsDirector(); + if( d && d->getContentFinderConditionId() > 0 ) + { + auto p = makeZonePacket< FFXIVDirectorUnk4 >( getId() ); + p->data().param[0] = d->getDirectorId(); + p->data().param[1] = 1534; + p->data().param[2] = 1; + p->data().param[3] = d->getContentFinderConditionId(); + queuePacket( p ); + + struct UNK038D : FFXIVIpcBasePacket< 0x038D > { - auto p = makeZonePacket< FFXIVDirectorUnk4 >( getId() ); - p->data().param[0] = d->getDirectorId(); - p->data().param[1] = 1534; - p->data().param[2] = 1; - p->data().param[3] = d->getContentFinderConditionId(); - queuePacket( p ); + uint32_t unknown[2]; + }; + auto p3 = makeZonePacket< UNK038D >( getId() ); + queuePacket( p3 ); - struct UNK038D : FFXIVIpcBasePacket< 0x038D > - { - uint32_t unknown[2]; - }; - auto p3 = makeZonePacket< UNK038D >( getId() ); - queuePacket( p3 ); + struct UNK00EA : FFXIVIpcBasePacket< 0x00EA > + { + uint32_t unknown[4]; + }; + auto p2 = makeZonePacket< UNK00EA >( getId() ); + p2->data().unknown[0] = d->getContentFinderConditionId(); + p2->data().unknown[1] = 5; + queuePacket( p2 ); - struct UNK00EA : FFXIVIpcBasePacket< 0x00EA > - { - uint32_t unknown[4]; - }; - auto p2 = makeZonePacket< UNK00EA >( getId() ); - p2->data().unknown[0] = d->getContentFinderConditionId(); - p2->data().unknown[1] = 5; - queuePacket( p2 ); - - prepareZoning( 0, 1, 1, 0, 0, 1, 9 ); - } + prepareZoning( 0, 1, 1, 0, 0, 1, 9 ); + } resetHp(); resetMp(); From 800bf5618f81748c61e250fcc4f80f8f1e7ffd77 Mon Sep 17 00:00:00 2001 From: collett Date: Mon, 16 Aug 2021 02:20:43 +0900 Subject: [PATCH 3/5] oops, that was not the right scene --- src/scripts/instances/wedding/SanctumOfTheTwelve.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/scripts/instances/wedding/SanctumOfTheTwelve.cpp b/src/scripts/instances/wedding/SanctumOfTheTwelve.cpp index 7927810d..6bba767c 100644 --- a/src/scripts/instances/wedding/SanctumOfTheTwelve.cpp +++ b/src/scripts/instances/wedding/SanctumOfTheTwelve.cpp @@ -379,7 +379,7 @@ public: ( v4 == 6 ? 1020 : ( v4 == 7 ? 1021 : ( v4 == 8 ? 1125 : - ( v4 == 9 ? 1126 : 1127 ) ) ) ) ) ) ) ) ); + ( v4 == 9 ? 1126 : 1127 ) ) ) ) ) ) ) ) ); //FIX THIS SHIT BEFORE PR packetData.popupTimeMs = 6000; packetData.param[ 0 ] = 1024; packetData.param[ 1 ] = instance.getCustomVar( 1 ); @@ -397,12 +397,11 @@ public: { if( dt >= 78 ) { - auto qBH = instance.getCustomVar( 102 ); - instance.foreachPlayer( [ &instance, qBH ]( auto p ) + instance.foreachPlayer( [ &instance ]( auto p ) { p->eventStart( p->getId(), instance.getDirectorId(), Event::EventHandler::GameProgress, 1, 1 ); std::vector< uint32_t > paramList; - paramList.push_back( 665 + qBH ); + paramList.push_back( 50002 ); auto seq5Callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) { From 2e66c5837c094676dc9efde9a63768f8d15d0ff6 Mon Sep 17 00:00:00 2001 From: collett Date: Mon, 16 Aug 2021 04:34:13 +0900 Subject: [PATCH 4/5] all wedding sequence done --- .../instances/wedding/SanctumOfTheTwelve.cpp | 232 ++++++++++++++++-- 1 file changed, 206 insertions(+), 26 deletions(-) diff --git a/src/scripts/instances/wedding/SanctumOfTheTwelve.cpp b/src/scripts/instances/wedding/SanctumOfTheTwelve.cpp index 6bba767c..59c3b6e0 100644 --- a/src/scripts/instances/wedding/SanctumOfTheTwelve.cpp +++ b/src/scripts/instances/wedding/SanctumOfTheTwelve.cpp @@ -126,9 +126,33 @@ public: else player.sendUrgent( "Waiting for the cutscene and popup messages to finish..." ); } + else if( instance.getSequence() == 5 ) + { + player.sendUrgent( "Waiting for the cutscene and popup messages to finish..." ); + } else if( instance.getSequence() == 6 ) { - player.sendUrgent( "WIP..." ); + auto p1 = instance.getPlayer( v1 ); + auto p2 = instance.getPlayer( v2 ); + if( p1 && p2 ) + { + auto seq4Callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param1 != 512 || result.param2 != 0 ) + return; + instance.setCustomVar( 3, 0 ); + instance.setCustomVar( 4, 0 ); + instance.setSequence( 7 ); + }; + // event item workaround + player.eventFinish( eventId, 1 ); + player.eventStart( player.getId(), instance.getDirectorId(), Event::EventHandler::Item, 0, 2001464 ); + player.playScene( instance.getDirectorId(), 32, 134225921, 0, 1, 1087, seq4Callback ); + } + else + { + player.sendUrgent( "Two main characters must be in the instance to continue the ceremony." ); + } } }; @@ -153,14 +177,14 @@ public: void onUpdate( PublicContent& instance, uint64_t tickCount ) override { + if( instance.getCustomVar( 3 ) == 0 ) + instance.setCustomVar( 3, tickCount ); + auto dt = std::difftime( tickCount, instance.getCustomVar( 3 ) ) / 1000.f; + auto v4 = instance.getCustomVar( 4 ); switch( instance.getSequence() ) { case 3: { - if( instance.getCustomVar( 3 ) == 0 ) - instance.setCustomVar( 3, tickCount ); - auto dt = std::difftime( tickCount, instance.getCustomVar( 3 ) ) / 1000.f; - auto v4 = instance.getCustomVar( 4 ); switch( v4 ) { case 0: @@ -197,7 +221,7 @@ public: if( !p1 || !p2 ) { instance.setSequence( 1 ); - instance.foreachPlayer( [ &instance ]( auto p ) + instance.foreachPlayer( []( auto p ) { p->sendUrgent( "Failed to start the scene, missing main actors." ); }); @@ -280,7 +304,7 @@ public: } }; - p->playScene16( instance.getDirectorId(), 3, 9219, 0, paramList, seq3Callback ); + p->playScene16( instance.getDirectorId(), 3, 139469827, 0, paramList, seq3Callback ); }); instance.setCustomVar( 3, 0 ); instance.setCustomVar( 4, 0 ); @@ -293,10 +317,6 @@ public: } case 4: { - if( instance.getCustomVar( 3 ) == 0 ) - instance.setCustomVar( 3, tickCount ); - auto dt = std::difftime( tickCount, instance.getCustomVar( 3 ) ) / 1000.f; - auto v4 = instance.getCustomVar( 4 ); switch( v4 ) { case 1: @@ -339,16 +359,14 @@ public: p->queuePacket( packet ); }); } + break; } } break; } case 5: { - if( instance.getCustomVar( 3 ) == 0 ) - instance.setCustomVar( 3, tickCount ); - auto dt = std::difftime( tickCount, instance.getCustomVar( 3 ) ) / 1000.f; - auto v4 = instance.getCustomVar( 4 ); + //first half of sec5 switch( v4 ) { case 0: @@ -401,25 +419,109 @@ public: { p->eventStart( p->getId(), instance.getDirectorId(), Event::EventHandler::GameProgress, 1, 1 ); std::vector< uint32_t > paramList; - paramList.push_back( 50002 ); - + paramList.push_back( 671 ); auto seq5Callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) { - auto v5 = instance.getCustomVar( 5 ); - v5--; - instance.setCustomVar( 5, v5 ); - if( v5 == 0 ) + auto seq5Callback2 = [ & ]( Entity::Player& player, const Event::SceneResult& result ) { - instance.setCustomVar( 3, 0 ); - instance.setCustomVar( 4, 1 ); - } + auto v5 = instance.getCustomVar( 5 ); + v5--; + instance.setCustomVar( 5, v5 ); + if( v5 == 0 ) + { + instance.setCustomVar( 3, 0 ); + instance.setCustomVar( 4, 101 ); + } + }; + std::vector< uint32_t > paramList; + paramList.push_back( 665 + instance.getCustomVar( 102 ) ); + player.playScene16( instance.getDirectorId(), 3, 139469827, 0, paramList, seq5Callback2 ); }; - p->playScene16( instance.getDirectorId(), 3, 9219, 0, paramList, seq5Callback ); + p->playScene16( instance.getDirectorId(), 3, 139469827, 0, paramList, seq5Callback ); + }); + instance.setCustomVar( 4, 100 ); + instance.setCustomVar( 5, instance.getPopCount() ); + } + break; + } + } + //second half of seq5 + const uint16_t textIds[ 4 ] = { 1022, 1023, 1131, 1025 }; + switch( v4 ) + { + case 101: + case 102: + case 103: + case 104: + { + if( dt >= 6 + ( v4 - 101 ) * 7 ) + { + instance.setCustomVar( 4, v4 + 1 ); + FFXIVIpcDirectorPopUp packetData = {}; + packetData.directorId = instance.getDirectorId(); + packetData.flags = 3; + packetData.bNPCName = 1010505; + packetData.textId = textIds[ v4 - 101 ]; + packetData.popupTimeMs = 6000; + packetData.param[ 0 ] = 1024; + packetData.param[ 1 ] = instance.getCustomVar( 1 ); + packetData.param[ 2 ] = instance.getCustomVar( 2 ); + instance.foreachPlayer( [ &instance, &packetData ]( auto p ) + { + auto packet = makeZonePacket< FFXIVIpcDirectorPopUp >( p->getId() ); + memcpy( &packet->data(), &packetData, sizeof( packetData ) ); + p->queuePacket( packet ); + }); + } + break; + } + case 105: + { + if( dt >= 34 ) + { + instance.setCustomVar( 4, 106 ); + instance.foreachPlayer( [ &instance ]( auto p ) + { + auto packet = makeZonePacket< FFXIVDirectorUnk4 >( p->getId() ); + packet->data().param[0] = instance.getDirectorId(); + packet->data().param[1] = 4363; + packet->data().param[2] = 1; + packet->data().param[3] = 0; + p->queuePacket( packet ); + }); + } + break; + } + case 106: + { + if( dt >= 40 ) + { + instance.setCustomVar( 4, 107 ); + instance.foreachPlayer( [ &instance ]( auto p ) + { + auto packet = makeZonePacket< FFXIVDirectorUnk4 >( p->getId() ); + packet->data().param[0] = instance.getDirectorId(); + packet->data().param[1] = 4373; + packet->data().param[2] = 25591553; + packet->data().param[3] = 0; + p->queuePacket( packet ); + }); + } + break; + } + case 107: + { + if( dt >= 46 ) + { + // quest update here on retail + // set invisible wall state to 7 + instance.foreachPlayer( [ &instance ]( auto p ) + { + p->queuePacket( makeActorControlSelf( p->getId(), DirectorUpdate, instance.getDirectorId(), 0x80000001, 89 ) ); // bgm, how to map id from questDH? }); instance.setCustomVar( 3, 0 ); instance.setCustomVar( 4, 0 ); - instance.setCustomVar( 5, instance.getPopCount() ); instance.setSequence( 6 ); } break; @@ -427,6 +529,84 @@ public: } break; } + case 7: + { + const uint16_t textIds[ 5 ] = { 1026, 1027, 1141, 1028, 1134 }; + switch( v4 ) + { + case 0: + case 1: + case 2: + case 3: + case 4: + { + if( dt >= 1 + v4 * 7 ) + { + instance.setCustomVar( 4, v4 + 1 ); + FFXIVIpcDirectorPopUp packetData = {}; + packetData.directorId = instance.getDirectorId(); + packetData.flags = 3; + packetData.bNPCName = 1010505; + packetData.textId = textIds[ v4 ]; + packetData.popupTimeMs = 6000; + packetData.param[ 0 ] = 1024; + packetData.param[ 1 ] = instance.getCustomVar( 1 ); + packetData.param[ 2 ] = instance.getCustomVar( 2 ); + instance.foreachPlayer( [ &instance, &packetData ]( auto p ) + { + auto packet = makeZonePacket< FFXIVIpcDirectorPopUp >( p->getId() ); + memcpy( &packet->data(), &packetData, sizeof( packetData ) ); + p->queuePacket( packet ); + }); + } + break; + } + case 5: + { + if( dt >= 35 ) + { + instance.setCustomVar( 4, 6 ); + instance.foreachPlayer( [ &instance ]( auto p ) + { + auto packet = makeZonePacket< FFXIVDirectorUnk4 >( p->getId() ); + packet->data().param[0] = instance.getDirectorId(); + packet->data().param[1] = 4360; + packet->data().param[2] = 1; + packet->data().param[3] = 0; + p->queuePacket( packet ); + }); + } + break; + } + case 6: + { + if( dt >= 41 ) + { + instance.foreachPlayer( [ &instance ]( auto p ) + { + p->eventStart( p->getId(), instance.getDirectorId(), Event::EventHandler::GameProgress, 1, 1 ); + std::vector< uint32_t > paramList; + paramList.push_back( 50006 ); + auto seq5Callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.prepareZoning( 152, true, 1, 0, 0, 1, 8 ); + p->queuePacket( makeActorControlSelf( p->getId(), DirectorUpdate, instance.getDirectorId(), 0x80000001, 1 ) ); + if( player.getId() == instance.getCustomVar( 1 ) || player.getId() == instance.getCustomVar( 2 ) ) + { + player.updateQuest( 67114, 255 ); + } + player.eventFinish( instance.getDirectorId(), 1 ); + player.exitInstance(); + }; + p->playScene16( instance.getDirectorId(), 3, 139469827, 0, paramList, seq5Callback ); + }); + instance.setCustomVar( 4, 255 ); + } + break; + } + } + break; + } } instance.setCustomVar( 0, tickCount ); } From 1fb2fe881e17a41911aeb3f99ddc05e948804f16 Mon Sep 17 00:00:00 2001 From: collett Date: Mon, 16 Aug 2021 04:39:51 +0900 Subject: [PATCH 5/5] copy paste derp --- src/scripts/instances/wedding/SanctumOfTheTwelve.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/instances/wedding/SanctumOfTheTwelve.cpp b/src/scripts/instances/wedding/SanctumOfTheTwelve.cpp index 59c3b6e0..8a1ed0ce 100644 --- a/src/scripts/instances/wedding/SanctumOfTheTwelve.cpp +++ b/src/scripts/instances/wedding/SanctumOfTheTwelve.cpp @@ -590,7 +590,7 @@ public: auto seq5Callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) { player.prepareZoning( 152, true, 1, 0, 0, 1, 8 ); - p->queuePacket( makeActorControlSelf( p->getId(), DirectorUpdate, instance.getDirectorId(), 0x80000001, 1 ) ); + player.queuePacket( makeActorControlSelf( player.getId(), DirectorUpdate, instance.getDirectorId(), 0x80000001, 1 ) ); if( player.getId() == instance.getCustomVar( 1 ) || player.getId() == instance.getCustomVar( 2 ) ) { player.updateQuest( 67114, 255 );