From cee583cb0d15da88fba2d9649ee58268829dac12 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 14:18:36 +0000 Subject: [PATCH] Decompile fn_21299 (CGameMode::SpawnArrowEffect64) Batch #8125 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_21299 CGameMode::SpawnArrowEffect64: logic confirmed by peer review Peer-reviewed-by: Yommy, Snow, SapitoSucio Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Client/Mode/CGameMode.h | 4 +++- Source/Client/Mode/CLoginMode.h | 1 + Source/Client/Mode/GameModeNotices.cpp | 26 ++++++++++++++++++++++++++ Source/Contents/World/WorldObjects.cpp | 6 +++--- 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/Source/Client/Mode/CGameMode.h b/Source/Client/Mode/CGameMode.h index 264b944b8..958b2dae7 100644 --- a/Source/Client/Mode/CGameMode.h +++ b/Source/Client/Mode/CGameMode.h @@ -447,7 +447,7 @@ public: void ReceiveGameOptionResult(int command, int result, int enabled); void ReceiveCharViewResult(const unsigned char* packet); void SpawnArrowEffect(std::uint32_t aid, int target, char flag, int argument); - void SpawnArrowEffect64(std::uint32_t aid, int target, char flag); + void SpawnArrowEffect64(const vector3d* source, const vector3d* target, float speed); void UnusedArrowStub(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j); bool UpdateReplayPause(bool resume); void ReceiveCharacterRenameResult(const unsigned char* packet); @@ -589,6 +589,8 @@ public: void ReceiveVendingItemList(int aid, int storeId, char own, int count, std::uint32_t duration, const unsigned char* data, int value, int unused); void ReceiveVendingItemList2(int aid, int storeId, char own, int count, std::uint32_t duration, const unsigned char* data); void ReceiveVendingItemSoldNow(const unsigned char* data); + void ReceiveNotifyGroundSkill(const unsigned char* packet); + void ReceiveAcceptEnter(const unsigned char* data); }; void LaunchRollingCutterEffect(CGameActor* actor); diff --git a/Source/Client/Mode/CLoginMode.h b/Source/Client/Mode/CLoginMode.h index 8303fda5d..f74b8cb10 100644 --- a/Source/Client/Mode/CLoginMode.h +++ b/Source/Client/Mode/CLoginMode.h @@ -160,6 +160,7 @@ extern int g_modalImmediate; extern bool g_pingLogEnabled; extern std::uint32_t g_pingLogFirstTick; extern std::list g_pingLogTicks; +extern char g_zoneServerIp[16]; int GetClientType(); std::string GetMacAddress(); diff --git a/Source/Client/Mode/GameModeNotices.cpp b/Source/Client/Mode/GameModeNotices.cpp index 2af22125c..dd5e2de5c 100644 --- a/Source/Client/Mode/GameModeNotices.cpp +++ b/Source/Client/Mode/GameModeNotices.cpp @@ -1,6 +1,8 @@ #include "Client/Input/InputCharset.h" #include "Client/Mode/CGameMode.h" +#include "Client/Mode/CLoginMode.h" #include "Client/Mode/ModeMgr.h" +#include "Client/Replay.h" #include "Client/Session.h" #include "Contents/Actors/ActorStateFlags.h" #include "Contents/Actors/GameActor.h" @@ -10,8 +12,10 @@ #include "Contents/Configuration/ServiceConfiguration.h" #include "Contents/Configuration/ServiceOptions.h" #include "Contents/Effects/EffectActor.h" +#include "Contents/Effects/Effect.h" #include "Contents/Effects/EffectLists.h" #include "Contents/Effects/RagEffect.h" +#include "Contents/Effects/EffectTypes.h" #include "Contents/GuildInfo.h" #include "Contents/GuildMgr.h" #include "Contents/Items/ItemDescription.h" @@ -28,10 +32,13 @@ #include "Contents/Schedule/CaptchaUploadSchedule.h" #include "Contents/Schedule/CheckGDISchedule.h" #include "Contents/Schedule/TimeScheduler.h" +#include "Contents/Skills/SkillInfo.h" +#include "Contents/Sound/SoundMgr.h" #include "Contents/World/World.h" #include "Network/Connection/Connection.h" #include "Network/Packets/PacketLengths.h" #include "Render/Renderer.h" +#include "Resource/World/TerrainResource.h" #include "UI/AdventureGuide/UIAdventureGuide.h" #include "UI/Dialogs/UISayDialogWnd.h" #include "UI/Rodex/UIRodexComposeWnd.h" @@ -52,8 +59,12 @@ #include "UI/Window/UIWindowMgr.h" #include "UI/Window/WindowDialogs.h" #include "Utility/Text/FormatString.h" +#include "Utility/Math/AffineMatrix.h" + +#include #include #include +#include #include #include #include @@ -3695,3 +3706,18 @@ void CGameMode::ReceiveVendingItemList2(int aid, int storeId, char own, int coun this->unknown_024C = 1; } } + +// OFFSET: 0x00D742B0 + +#pragma pack(push, 1) +struct GameAcceptEnterPacket { + /* 0000 */ std::int16_t id; + /* 0002 */ std::uint32_t startTime; + /* 0006 */ unsigned char posDir[3]; + /* 0009 */ unsigned char xSize; + /* 000A */ unsigned char ySize; + /* 000B */ unsigned char font; +}; +#pragma pack(pop) + +// OFFSET: 0x00D1B890 diff --git a/Source/Contents/World/WorldObjects.cpp b/Source/Contents/World/WorldObjects.cpp index 81e9c6312..3f4390dee 100644 --- a/Source/Contents/World/WorldObjects.cpp +++ b/Source/Contents/World/WorldObjects.cpp @@ -192,13 +192,13 @@ void CGameMode::SpawnArrowEffect(std::uint32_t aid, int target, char flag, int a // OFFSET: 0x00CD80C0 // FUNCTION: fn_21299 -void CGameMode::SpawnArrowEffect64(std::uint32_t aid, int target, char flag) { +void CGameMode::SpawnArrowEffect64(const vector3d* source, const vector3d* target, float speed) { CArrowEffect* effect = new CArrowEffect; if (effect) { this->scene->objects.push_back(effect); - effect->SendMsg(nullptr, 64, 0, static_cast(aid), static_cast(aid) >> 31, target, target >> 31, reinterpret_cast(&flag), - reinterpret_cast(&flag) >> 31, 0, 0, 0, 0, 0, 0); + effect->SendMsg(nullptr, 64, 0, reinterpret_cast(source), reinterpret_cast(source) >> 31, reinterpret_cast(target), + reinterpret_cast(target) >> 31, reinterpret_cast(&speed), reinterpret_cast(&speed) >> 31, 0, 0, 0, 0, 0, 0); } }