Decompile 3 functions in Source/Contents/NavigationRequest.cpp, Source/Contents/NavigationManager.h
Batch #1728 by ragnarok-clanker: 0 byte-identical, 3 confirmed by peer review. - fn_19464 CNaviInfo::FindLink: logic confirmed by peer review - fn_19478 CNaviInfo::FindNpc: logic confirmed by peer review - fn_19479 CNaviInfo::FindNpcAt: logic confirmed by peer review Reviewed-by: ragnarok-clanker
This commit is contained in:
parent
37d909cfee
commit
3be87414c2
1 changed files with 39 additions and 0 deletions
|
|
@ -131,10 +131,49 @@ int CNaviInfo::GetIndex() const {
|
|||
}
|
||||
|
||||
// OFFSET: 0x00B8DF40
|
||||
// FUNCTION: fn_19464
|
||||
CNavi_Link* CNaviInfo::FindLink(unsigned int key, bool byId) {
|
||||
if (byId) {
|
||||
for (CNavi_Link* link : this->links) {
|
||||
if (static_cast<unsigned int>(link->id) == key) {
|
||||
return link;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
if (this->links.empty() || key >= this->links.size()) {
|
||||
return nullptr;
|
||||
}
|
||||
return this->links[key];
|
||||
}
|
||||
|
||||
// OFFSET: 0x00B8E640
|
||||
// FUNCTION: fn_19478
|
||||
CNavi_Object* CNaviInfo::FindNpc(unsigned int key, bool byId) {
|
||||
if (byId) {
|
||||
for (CNavi_Object* npc : this->npcs) {
|
||||
if (static_cast<unsigned int>(npc->id) == key) {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
if (this->npcs.empty() || key >= this->npcs.size()) {
|
||||
return nullptr;
|
||||
}
|
||||
return this->npcs[key];
|
||||
}
|
||||
|
||||
// OFFSET: 0x00B8E6F0
|
||||
// FUNCTION: fn_19479
|
||||
CNavi_Object* CNaviInfo::FindNpcAt(int cellX, int cellY) {
|
||||
for (CNavi_Object* npc : this->npcs) {
|
||||
if (npc->cellX == cellX && npc->cellY == cellY) {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00B8E750
|
||||
// FUNCTION: fn_19480
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue