From b7bd70ab06dbb1f75a62d186613b335b99cfd8a5 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 28 Oct 2026 20:12:56 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/PetTalk.cpp, Source/Contents/EnemyMonsterTalk.cpp, ... Batch #1692 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_23805 CSession::GetPetTalkActionName: logic confirmed by peer review - fn_23834 CSession::GetMonsterTalkEventName: logic confirmed by peer review Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). Adds to the build: Source/Contents/PetTalk.cpp, Source/Contents/EnemyMonsterTalk.cpp --- Source/Client/Session.h | 2 ++ Source/Contents/EnemyMonsterTalk.cpp | 24 +++++++++++++++++++++ Source/Contents/PetTalk.cpp | 32 ++++++++++++++++++++++++++++ data/compile.json | 2 ++ 4 files changed, 60 insertions(+) create mode 100644 Source/Contents/EnemyMonsterTalk.cpp create mode 100644 Source/Contents/PetTalk.cpp diff --git a/Source/Client/Session.h b/Source/Client/Session.h index 1e345f1..646760c 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -175,6 +175,8 @@ public: int GetPetJobByEggItem(int eggItemId); const char* GetPetString(int id); const char* GetPetTalkName(int job); + const char* GetPetTalkActionName(int action); + const char* GetMonsterTalkEventName(int event); bool UpdateHomunSkill(const CSkillInfo& value, unsigned char notify); bool UpdateMercSkill(const CSkillInfo& value, unsigned char notify); void AddUnknownId(int id); diff --git a/Source/Contents/EnemyMonsterTalk.cpp b/Source/Contents/EnemyMonsterTalk.cpp new file mode 100644 index 0000000..df091e0 --- /dev/null +++ b/Source/Contents/EnemyMonsterTalk.cpp @@ -0,0 +1,24 @@ +#include "Client/Session.h" + +// OFFSET: 0x00E19090 +// FUNCTION: fn_23834 +const char* CSession::GetMonsterTalkEventName(int event) { + switch (event) { + case 0: + return "attack"; + case 1: + return "castskill"; + case 2: + return "useskill"; + case 3: + return "skillattacked"; + case 4: + return "hp50"; + case 5: + return "hp25"; + case 6: + return "dead"; + default: + return nullptr; + } +} diff --git a/Source/Contents/PetTalk.cpp b/Source/Contents/PetTalk.cpp new file mode 100644 index 0000000..d3c6492 --- /dev/null +++ b/Source/Contents/PetTalk.cpp @@ -0,0 +1,32 @@ +#include "Client/Session.h" + +// OFFSET: 0x00E0AD10 +// FUNCTION: fn_23805 +const char* CSession::GetPetTalkActionName(int action) { + switch (action) { + case 0: + return "feeding"; + case 1: + return "hunting"; + case 2: + return "danger"; + case 3: + return "dead"; + case 4: + return "stand"; + case 10: + return "connect"; + case 6: + return "levelup"; + case 7: + return "perfor_1"; + case 8: + return "perfor_2"; + case 9: + return "perfor_3"; + case 5: + return "perfor_s"; + default: + return "normal"; + } +} diff --git a/data/compile.json b/data/compile.json index f831b03..7d478af 100644 --- a/data/compile.json +++ b/data/compile.json @@ -320,6 +320,7 @@ "Source/Contents/Emblems/EmblemDownload.cpp": 4, "Source/Contents/Emblems/EmblemUpload.cpp": 2, "Source/Contents/Emblems/GuildEmblemReqBundle.cpp": 4, + "Source/Contents/EnemyMonsterTalk.cpp": 4, "Source/Contents/EquipmentResources.cpp": 4, "Source/Contents/ForbiddenWords.cpp": 4, "Source/Contents/Ground/GroundDecals.cpp": 3, @@ -401,6 +402,7 @@ "Source/Contents/Pathfinding.cpp": 4, "Source/Contents/PetStatus.cpp": 4, "Source/Contents/PetStrings.cpp": 4, + "Source/Contents/PetTalk.cpp": 4, "Source/Contents/PetTalkNames.cpp": 4, "Source/Contents/PlayerNameDictionary.cpp": 4, "Source/Contents/RobeOpacity.cpp": 4,