Decompile fn_02972 (CCashEmotionMgr::SetOwnedPack)

Batch #18280 by eAthena: 0 byte-identical, 1 confirmed by peer review.

- fn_02972 CCashEmotionMgr::SetOwnedPack: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, cremane, 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:
ragnarok-clanker 2026-11-12 14:28:57 +00:00
commit dd0fdf9bfb

View file

@ -1226,12 +1226,7 @@ void CCashEmotionMgr::SetOwnedPack(int packId, unsigned int expiry) {
if (owned.end() == std::find(owned.begin(), owned.end(), packId)) {
owned.push_back(packId);
auto unowned = this->m_unownedPacks.begin();
for (; this->m_unownedPacks.end() != unowned; ++unowned) {
if (*unowned == packId) {
break;
}
}
auto unowned = std::find(this->m_unownedPacks.begin(), this->m_unownedPacks.end(), packId);
if (this->m_unownedPacks.end() != unowned) {
this->m_unownedPacks.erase(unowned);