Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Player::_LoadSkills(PreparedQueryResult result)
- {
- // 0 1 2
- // SetPQuery(PLAYER_LOGIN_QUERY_LOADSKILLS, "SELECT skill, value, max FROM character_skills WHERE guid = '%u'", GUID_LOPART(m_guid));
- uint32 count = 0;
- std::unordered_map<uint32, uint32> loadedSkillValues;
- if (result)
- {
- do
- {
- Field* fields = result->Fetch();
- uint16 skill = fields[0].GetUInt16();
- uint16 value = fields[1].GetUInt16();
- uint16 max = fields[2].GetUInt16();
- SkillRaceClassInfoEntry const* rcEntry = GetSkillRaceClassInfo(skill, GetRace(), GetClass());
- if (!rcEntry)
- {
- TC_LOG_ERROR("entities.player", "Player::_LoadSkills: Player '%s' (%s, Race: %u, Class: %u) has forbidden skill %u for his race/class combination",
- GetName().c_str(), GetGUID().ToString().c_str(), uint32(GetRace()), uint32(GetClass()), skill);
- mSkillStatus.insert(SkillStatusMap::value_type(skill, SkillStatusData(0, SKILL_DELETED)));
- continue;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement