Advertisement
WIXXZI

Untitled

Feb 18th, 2023
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. void Player::_LoadSkills(PreparedQueryResult result)
  2. {
  3. // 0 1 2
  4. // SetPQuery(PLAYER_LOGIN_QUERY_LOADSKILLS, "SELECT skill, value, max FROM character_skills WHERE guid = '%u'", GUID_LOPART(m_guid));
  5.  
  6. uint32 count = 0;
  7. std::unordered_map<uint32, uint32> loadedSkillValues;
  8. if (result)
  9. {
  10. do
  11. {
  12. Field* fields = result->Fetch();
  13. uint16 skill = fields[0].GetUInt16();
  14. uint16 value = fields[1].GetUInt16();
  15. uint16 max = fields[2].GetUInt16();
  16.  
  17. SkillRaceClassInfoEntry const* rcEntry = GetSkillRaceClassInfo(skill, GetRace(), GetClass());
  18. if (!rcEntry)
  19. {
  20. TC_LOG_ERROR("entities.player", "Player::_LoadSkills: Player '%s' (%s, Race: %u, Class: %u) has forbidden skill %u for his race/class combination",
  21. GetName().c_str(), GetGUID().ToString().c_str(), uint32(GetRace()), uint32(GetClass()), skill);
  22.  
  23. mSkillStatus.insert(SkillStatusMap::value_type(skill, SkillStatusData(0, SKILL_DELETED)));
  24. continue;
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement