MCPcopy Create free account
hub / github.com/crossuo/crossuo / LoadSkills

Method LoadSkills

xuocore/uodata.cpp:2315–2335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2313}
2314
2315void CFileManager::LoadSkills()
2316{
2317 if (m_SkillsIdx.Size == 0 || m_SkillsMul.Size == 0)
2318 return;
2319
2320 m_Skills.clear();
2321 auto &idx = m_SkillsIdx;
2322 auto &mul = m_SkillsMul;
2323 while (!idx.IsEOF())
2324 {
2325 const auto idxBlock = (SkillIdxBlock *)idx.Ptr;
2326 idx.Move(sizeof(SkillIdxBlock));
2327 if (idxBlock->Size != 0 && idxBlock->Position != ~0 && idxBlock->Size != ~0)
2328 {
2329 mul.Ptr = mul.Start + idxBlock->Position;
2330 const bool haveButton = (mul.ReadUInt8() != 0);
2331 SkillData data = { mul.ReadString(idxBlock->Size - 1), haveButton };
2332 m_Skills.emplace_back(data);
2333 }
2334 }
2335}
2336
2337void CFileManager::LoadHues()
2338{

Callers

nothing calls this directly

Calls 6

ReadUInt8Method · 0.80
ReadStringMethod · 0.80
emplace_backMethod · 0.80
clearMethod · 0.45
IsEOFMethod · 0.45
MoveMethod · 0.45

Tested by

no test coverage detected