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).
This commit is contained in:
ragnarok-clanker 2026-10-31 14:18:36 +00:00
commit cee583cb0d
4 changed files with 33 additions and 4 deletions

View file

@ -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);

View file

@ -160,6 +160,7 @@ extern int g_modalImmediate;
extern bool g_pingLogEnabled;
extern std::uint32_t g_pingLogFirstTick;
extern std::list<std::uint32_t> g_pingLogTicks;
extern char g_zoneServerIp[16];
int GetClientType();
std::string GetMacAddress();

View file

@ -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 <algorithm>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <map>
#include <string>
@ -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

View file

@ -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<int>(aid), static_cast<int>(aid) >> 31, target, target >> 31, reinterpret_cast<int>(&flag),
reinterpret_cast<int>(&flag) >> 31, 0, 0, 0, 0, 0, 0);
effect->SendMsg(nullptr, 64, 0, reinterpret_cast<int>(source), reinterpret_cast<int>(source) >> 31, reinterpret_cast<int>(target),
reinterpret_cast<int>(target) >> 31, reinterpret_cast<int>(&speed), reinterpret_cast<int>(&speed) >> 31, 0, 0, 0, 0, 0, 0);
}
}