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
20 lines
514 B
C++
20 lines
514 B
C++
#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;
|
|
}
|