Decompile fn_23851 (CSession::HasTrackedAchievement)
Batch #17868 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_23851 CSession::HasTrackedAchievement: logic confirmed by peer review Peer-reviewed-by: Yommy, codeplay, bibinir Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
fae61aeb77
commit
e2c01faac9
2 changed files with 9 additions and 7 deletions
|
|
@ -6,9 +6,13 @@
|
|||
#include "Contents/Actors/Pc.h"
|
||||
#include "Contents/World/World.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
|
||||
template __declspec(noinline) SessionRecord6178Entry* std::allocator<SessionRecord6178Entry>::allocate(std::size_t);
|
||||
template __declspec(noinline) std::vector<SessionRecord6178Entry>::~vector() noexcept;
|
||||
|
||||
// OFFSET: 0x00E1D6B0
|
||||
// FUNCTION: fn_23850
|
||||
int CSession::IsState291To303(int state) const {
|
||||
|
|
@ -34,13 +38,9 @@ int CSession::IsState291To303(int state) const {
|
|||
// OFFSET: 0x00E1D700
|
||||
// FUNCTION: fn_23851
|
||||
bool CSession::HasTrackedAchievement(int id) const {
|
||||
auto it = this->trackedAchievements.begin();
|
||||
for (; it != this->trackedAchievements.end(); ++it) {
|
||||
const SessionRecord6178 record = *it;
|
||||
if (id == record.id) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
const auto it = std::find_if(this->trackedAchievements.begin(), this->trackedAchievements.end(), [id](SessionRecord6178 record) {
|
||||
return id == record.id;
|
||||
});
|
||||
return it != this->trackedAchievements.end();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue