MCPcopy Create free account
hub / github.com/Norbyte/ositools / SkillBarFindSkill

Function SkillBarFindSkill

OsiInterface/Functions/PlayerFunctions.cpp:134–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132 }
133
134 bool SkillBarFindSkill(OsiArgumentDesc & args)
135 {
136 auto characterGuid = args[0].String;
137 auto skillBar = GetSkillBar(characterGuid);
138 if (skillBar == nullptr) return false;
139
140 auto skillId = ToFixedString(args[1].String);
141 for (uint32_t i = 0; i < skillBar->Set.Size; i++) {
142 auto & skill = skillBar->Set.Buf[i];
143 if (skill.Type == esv::SkillBarItem::kSkill
144 && skill.SkillOrStatId == skillId) {
145 args[2].Int32 = i;
146 return true;
147 }
148 }
149
150 return false;
151 }
152
153 bool SkillBarFindItem(OsiArgumentDesc & args)
154 {

Callers

nothing calls this directly

Calls 2

GetSkillBarFunction · 0.85
ToFixedStringFunction · 0.85

Tested by

no test coverage detected