From 799588114ebddfd8fdbde8c9ff70e9ed0823e247 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Mon, 8 Apr 2019 23:36:02 +1000 Subject: [PATCH 1/3] fix debug commands not working for questbattles, map another actrl --- src/common/Network/CommonActorControl.h | 5 +++++ src/world/Manager/DebugCommandMgr.cpp | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/common/Network/CommonActorControl.h b/src/common/Network/CommonActorControl.h index c2bf4a2c..0a7b558f 100644 --- a/src/common/Network/CommonActorControl.h +++ b/src/common/Network/CommonActorControl.h @@ -174,6 +174,11 @@ enum ActorControlType : uint16_t AetherReductionDlg = 0x17D, + /*! + * param1 = state + * param2 = actorid + */ + QuestBattleEObjState = 0x199, Unk6 = 0x19C, EObjAnimation = 0x19D, diff --git a/src/world/Manager/DebugCommandMgr.cpp b/src/world/Manager/DebugCommandMgr.cpp index f65bf4f9..a9687604 100644 --- a/src/world/Manager/DebugCommandMgr.cpp +++ b/src/world/Manager/DebugCommandMgr.cpp @@ -1084,7 +1084,7 @@ void Sapphire::World::Manager::DebugCommandMgr::questBattle( char* data, Entity: sscanf( params.c_str(), "%d %d", &index, &value ); - auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + auto instance = std::dynamic_pointer_cast< QuestBattle >( player.getCurrentZone() ); if( !instance ) return; @@ -1097,7 +1097,7 @@ void Sapphire::World::Manager::DebugCommandMgr::questBattle( char* data, Entity: sscanf( params.c_str(), "%s %hhu", objName, &state ); - auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + auto instance = std::dynamic_pointer_cast< QuestBattle >( player.getCurrentZone() ); if( !instance ) return; @@ -1115,7 +1115,7 @@ void Sapphire::World::Manager::DebugCommandMgr::questBattle( char* data, Entity: sscanf( params.c_str(), "%s %i %i", objName, &state1, &state2 ); - auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + auto instance = std::dynamic_pointer_cast< QuestBattle >( player.getCurrentZone() ); if( !instance ) return; @@ -1134,7 +1134,7 @@ void Sapphire::World::Manager::DebugCommandMgr::questBattle( char* data, Entity: sscanf( params.c_str(), "%hhu", &seq ); - auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + auto instance = std::dynamic_pointer_cast< QuestBattle >( player.getCurrentZone() ); if( !instance ) return; @@ -1146,7 +1146,7 @@ void Sapphire::World::Manager::DebugCommandMgr::questBattle( char* data, Entity: sscanf( params.c_str(), "%hhu", &branch ); - auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + auto instance = std::dynamic_pointer_cast< QuestBattle >( player.getCurrentZone() ); if( !instance ) return; @@ -1154,7 +1154,7 @@ void Sapphire::World::Manager::DebugCommandMgr::questBattle( char* data, Entity: } else if( subCommand == "qte_start" ) { - auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + auto instance = std::dynamic_pointer_cast< QuestBattle >( player.getCurrentZone() ); if( !instance ) return; @@ -1163,7 +1163,7 @@ void Sapphire::World::Manager::DebugCommandMgr::questBattle( char* data, Entity: } else if( subCommand == "event_start" ) { - auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + auto instance = std::dynamic_pointer_cast< QuestBattle >( player.getCurrentZone() ); if( !instance ) return; @@ -1172,7 +1172,7 @@ void Sapphire::World::Manager::DebugCommandMgr::questBattle( char* data, Entity: } else if( subCommand == "event_end" ) { - auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + auto instance = std::dynamic_pointer_cast< QuestBattle >( player.getCurrentZone() ); if( !instance ) return; From 457d2fa04c44fb75b08f3ac63f94c708031d4121 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Tue, 9 Apr 2019 00:03:20 +1000 Subject: [PATCH 2/3] remove questbattle prefix from eobj actor control --- src/common/Network/CommonActorControl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/Network/CommonActorControl.h b/src/common/Network/CommonActorControl.h index 0a7b558f..41de0801 100644 --- a/src/common/Network/CommonActorControl.h +++ b/src/common/Network/CommonActorControl.h @@ -178,7 +178,7 @@ enum ActorControlType : uint16_t * param1 = state * param2 = actorid */ - QuestBattleEObjState = 0x199, + EObjSetState = 0x199, Unk6 = 0x19C, EObjAnimation = 0x19D, From 3189dc78e389028061332a0f8d159d09684201c5 Mon Sep 17 00:00:00 2001 From: Biscuit Date: Tue, 9 Apr 2019 19:05:17 +1000 Subject: [PATCH 3/3] Fix festivals in InitZone def --- src/common/Network/PacketDef/Zone/ServerZoneDef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/Network/PacketDef/Zone/ServerZoneDef.h b/src/common/Network/PacketDef/Zone/ServerZoneDef.h index 29b6b883..51c0b671 100644 --- a/src/common/Network/PacketDef/Zone/ServerZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ServerZoneDef.h @@ -752,9 +752,9 @@ namespace Sapphire::Network::Packets::Server //Current instance can be confirmed at any time using the /instance text command." ( 7B F8 69 ) uint8_t unknown5; + uint32_t unknown8; uint16_t festivalId; uint16_t additionalFestivalId; - uint32_t unknown8; uint32_t unknown9; uint32_t unknown10; uint32_t unknown11;