Decompile 10 functions in Source/Contents/Effects/Core/EffectAttachments.cpp, Source/Contents/Items/ClientItemLists.cpp, ...

Batch #16925 by KWDev: 10 byte-identical, 0 confirmed by peer review.

- fn_21062 EffectActor::HasId: byte-identical
- fn_23341 CSession::RemoveMerchantShopItem: byte-identical
- fn_23351 CSession::RemoveCartItem: byte-identical
- fn_19438 CNaviInfo::AddNpc: byte-identical
- fn_19439 CNaviInfo::AddLink: byte-identical
- fn_19440 CNaviInfo::AddMob: byte-identical
- fn_19596 CNavigationManager::IsCurrentTarget: byte-identical
- fn_10265 CBmpObjWnd::Paint: byte-identical
- fn_10266 CSignBoardWnd::Paint: byte-identical
- fn_17668 CWorld::GetGameActorByAID: byte-identical

Merged automatically: every function is byte-identical to the original.
This commit is contained in:
ragnarok-clanker 2026-11-11 11:26:00 +00:00
commit 82ecdee22f
6 changed files with 29 additions and 17 deletions

View file

@ -4,8 +4,8 @@
// OFFSET: 0x00CADBE0
// FUNCTION: fn_21062
bool EffectActor::HasId(int id) const {
for (const CRagEffect* effect : this->state.effects) {
if (effect && effect->state.type == id) {
for (auto it = this->state.effects.begin(); it != this->state.effects.end(); ++it) {
if (*it && (*it)->state.type == id) {
return true;
}
}

View file

@ -1546,8 +1546,9 @@ bool CSession::RemoveMerchantShopItem(const ITEM_INFO& item) {
if (it->quantity <= 0) {
this->merchantShopItems.erase(it);
}
const std::uint32_t index = item.identity[1];
for (auto it2 = this->merchantShopItems.begin(); it2 != this->merchantShopItems.end(); ++it2) {
if (it2->identity[1] == item.identity[1]) {
if (it2->identity[1] == index) {
it2->flags[2] = 0;
break;
}
@ -1677,8 +1678,9 @@ bool CSession::RemoveCartItem(const ITEM_INFO& item) {
if (it->quantity <= 0) {
this->cartItems.erase(it);
}
const std::uint32_t index = item.identity[1];
for (auto it2 = this->cartItems.begin(); it2 != this->cartItems.end(); ++it2) {
if (it2->identity[1] == item.identity[1]) {
if (it2->identity[1] == index) {
it2->flags[2] = 0;
break;
}

View file

@ -84,11 +84,12 @@ void CNavi_Link::SetDepth(int depth) {
bool CNaviInfo::AddNpc(CNavi_Object* npc) {
std::vector<CNavi_Object*>& npcs = this->npcs;
if (npc == nullptr) {
CNavi_Object* object = npc;
if (object == nullptr) {
return false;
}
npcs.push_back(npc);
npcs.push_back(object);
return true;
}
@ -97,11 +98,12 @@ bool CNaviInfo::AddNpc(CNavi_Object* npc) {
bool CNaviInfo::AddLink(CNavi_Link* link) {
std::vector<CNavi_Link*>& links = this->links;
if (link == nullptr) {
CNavi_Link* object = link;
if (object == nullptr) {
return false;
}
links.push_back(link);
links.push_back(object);
return true;
}
@ -110,11 +112,12 @@ bool CNaviInfo::AddLink(CNavi_Link* link) {
bool CNaviInfo::AddMob(CNavi_Object* mob) {
std::vector<CNavi_Object*>& mobs = this->mobs;
if (mob == nullptr) {
CNavi_Object* object = mob;
if (object == nullptr) {
return false;
}
mobs.push_back(mob);
mobs.push_back(object);
return true;
}

View file

@ -91,7 +91,11 @@ bool CNavigationManager::IsCurrentTarget(const char* name) const {
}
const std::string resolved = ResourceMgr::Instance().ResolveMapName(name);
return std::strcmp(info->GetName(), resolved.c_str()) == 0;
if (std::strcmp(info->GetName(), resolved.c_str()) == 0) {
return true;
}
return false;
}
// OFFSET: 0x00B971D0

View file

@ -270,15 +270,18 @@ void CSignBoardWnd::OnCreate(int width, int height) {
// OFFSET: 0x00821C50
// FUNCTION: fn_10265
void CBmpObjWnd::Paint() {
this->DrawBitmap(0, 0, static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(this->path.c_str()))), false);
CBitmapRes* bitmap = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(this->path.c_str())));
this->DrawBitmap(0, 0, bitmap, false);
}
// OFFSET: 0x00821C90
// FUNCTION: fn_10266
void CSignBoardWnd::Paint() {
this->ClearSurface(0xFFFF00FF);
this->DrawBitmap(0, 0, static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\signboard\\bg_signboard.bmp"))), false);
this->DrawBitmap(5, 5, static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(this->iconPath.c_str()))), true);
CBitmapRes* background = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\signboard\\bg_signboard.bmp")));
this->DrawBitmap(0, 0, background, false);
CBitmapRes* icon = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(this->iconPath.c_str())));
this->DrawBitmap(5, 5, icon, true);
}
// OFFSET: 0x00821D10

View file

@ -5,9 +5,9 @@
// OFFSET: 0x00AC8260
// FUNCTION: fn_17668
CRenderObject* CWorld::GetGameActorByAID(std::uint32_t aid) const {
for (CRenderObject* actor : this->actors) {
if (actor->render.accountId == aid) {
return actor;
for (auto it = this->actors.begin(); it != this->actors.end(); ++it) {
if ((*it)->render.accountId == aid) {
return *it;
}
}