diff --git a/Source/Contents/Skills/PlayerSkillBundle.cpp b/Source/Contents/Skills/PlayerSkillBundle.cpp index 5233d2e08..9cab6851e 100644 --- a/Source/Contents/Skills/PlayerSkillBundle.cpp +++ b/Source/Contents/Skills/PlayerSkillBundle.cpp @@ -10,6 +10,10 @@ bool IsIndexedSkill(int id); +using SkillGroupTreeValue = std::_Tree_val>>>; +extern template std::_Tree_unchecked_const_iterator& +std::_Tree_unchecked_const_iterator::operator++() noexcept; + // INLINED std::size_t SkillIdHash::operator()(std::uint32_t id) const { return std::hash()(id); @@ -230,9 +234,10 @@ void CPlayerSkillBundle::ClearGroups() { // OFFSET: 0x00771D50 // FUNCTION: fn_08290 CSkillInfo* CPlayerSkillBundle::FindGrouped(std::uint32_t id) { - for (auto group = this->groups.begin(); group != this->groups.end(); ++group) { + const auto end = this->groups.end(); + for (auto group = this->groups.begin(); group != end; ++group) { for (CSkillInfo& value : group->second) { - if (value.id == id) { + if (id == value.id) { return &value; } } diff --git a/Source/Contents/Skills/SkillTreeScript.cpp b/Source/Contents/Skills/SkillTreeScript.cpp index f738cd2a4..a9536a7db 100644 --- a/Source/Contents/Skills/SkillTreeScript.cpp +++ b/Source/Contents/Skills/SkillTreeScript.cpp @@ -9,6 +9,9 @@ extern "C" { #include #include +template std::_Tree_unchecked_const_iterator>>>, std::_Iterator_base0>& +std::_Tree_unchecked_const_iterator>>>, std::_Iterator_base0>::operator++() noexcept; + // OFFSET: 0x00AFEE00 // FUNCTION: fn_18349 int AddSkill(lua_State* state) {