Decompile fn_03500 (CActorNameCardHolder::Lookup)
Batch #1636 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_03500 CActorNameCardHolder::Lookup: logic confirmed by peer review Reviewed-by: ragnarok-clanker Adds to the build: Source/Contents/ActorNameRequests.cpp
This commit is contained in:
parent
5b61d1ac08
commit
9e40d3d7a7
3 changed files with 22 additions and 0 deletions
|
|
@ -53,6 +53,7 @@ public:
|
|||
virtual ~CActorNameCardHolder();
|
||||
std::string Name(std::uint32_t id);
|
||||
void SetName(std::uint32_t id, std::string name);
|
||||
const CActorNameCard& Lookup(std::uint32_t id);
|
||||
void Set(std::uint32_t id, std::string name, std::string value1, std::string value2, std::string value3, std::string value4, std::string value5,
|
||||
std::uint32_t value);
|
||||
std::uint32_t FindId(std::string name);
|
||||
|
|
|
|||
20
Source/Contents/ActorNameRequests.cpp
Normal file
20
Source/Contents/ActorNameRequests.cpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#include "Contents/ActorNameCard.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
// OFFSET: 0x005BFD10
|
||||
// FUNCTION: fn_03500
|
||||
const CActorNameCard& CActorNameCardHolder::Lookup(std::uint32_t id) {
|
||||
const auto found = this->cards.find(id);
|
||||
if (found != this->cards.end() && found->second.received == 1) {
|
||||
return found->second;
|
||||
}
|
||||
|
||||
if (std::find(this->pending.begin(), this->pending.end(), id) == this->pending.end()) {
|
||||
this->pending.push_back(id);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_24526
|
||||
static CActorNameCard empty;
|
||||
return empty;
|
||||
}
|
||||
|
|
@ -271,6 +271,7 @@
|
|||
"Source/Contents/ActorMovementRoute.cpp": 4,
|
||||
"Source/Contents/ActorNameCard.cpp": 4,
|
||||
"Source/Contents/ActorNameDirectory.cpp": 4,
|
||||
"Source/Contents/ActorNameRequests.cpp": 4,
|
||||
"Source/Contents/Actors/AttackMotion.cpp": 4,
|
||||
"Source/Contents/Actors/GameObject.cpp": 4,
|
||||
"Source/Contents/Actors/MercenaryAI.cpp": 4,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue