diff --git a/src/game/GridNotifiers.h b/src/game/GridNotifiers.h index b04c7818c..11b5cd467 100644 --- a/src/game/GridNotifiers.h +++ b/src/game/GridNotifiers.h @@ -953,11 +953,11 @@ namespace MaNGOS return false; } private: - bool i_targetForUnit; - bool i_targetForPlayer; WorldObject const* i_obj; WorldObject const* i_originalCaster; float i_range; + bool i_targetForUnit; + bool i_targetForPlayer; }; class AnyAoETargetUnitInObjectRangeCheck @@ -985,9 +985,9 @@ namespace MaNGOS } private: - bool i_targetForPlayer; WorldObject const* i_obj; float i_range; + bool i_targetForPlayer; }; // do attack at call of help to friendly crearture diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 6201bdbef..105b641f3 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -3226,8 +3226,8 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen { PlayerTalent talent; talent.currentRank = talentPos->rank; - talent.m_talentEntry = sTalentStore.LookupEntry(talentPos->talent_id); - talent.state = IsInWorld() ? PLAYERSPELL_NEW : PLAYERSPELL_UNCHANGED; + talent.talentEntry = sTalentStore.LookupEntry(talentPos->talent_id); + talent.state = IsInWorld() ? PLAYERSPELL_NEW : PLAYERSPELL_UNCHANGED; m_talents[m_activeSpec][talentPos->talent_id] = talent; } @@ -3803,14 +3803,14 @@ bool Player::resetTalents(bool no_cost, bool all_specs) continue; } - TalentEntry const *talentInfo = (*iter).second.m_talentEntry; + TalentEntry const* talentInfo = iter->second.talentEntry; if (!talentInfo) { m_talents[m_activeSpec].erase(iter++); continue; } - TalentTabEntry const *talentTabInfo = sTalentTabStore.LookupEntry( talentInfo->TalentTab ); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); if (!talentTabInfo) { @@ -16665,7 +16665,7 @@ void Player::_LoadTalents(QueryResult *result) Field *fields = result->Fetch(); uint32 talent_id = fields[0].GetUInt32(); - TalentEntry const *talentInfo = sTalentStore.LookupEntry( talent_id ); + TalentEntry const* talentInfo = sTalentStore.LookupEntry(talent_id); if (!talentInfo) { @@ -16674,7 +16674,7 @@ void Player::_LoadTalents(QueryResult *result) continue; } - TalentTabEntry const *talentTabInfo = sTalentTabStore.LookupEntry( talentInfo->TalentTab ); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); if (!talentTabInfo) { @@ -16722,8 +16722,8 @@ void Player::_LoadTalents(QueryResult *result) { PlayerTalent talent; talent.currentRank = currentRank; - talent.m_talentEntry = talentInfo; - talent.state = PLAYERSPELL_UNCHANGED; + talent.talentEntry = talentInfo; + talent.state = PLAYERSPELL_UNCHANGED; m_talents[spec][talentInfo->TalentID] = talent; } } @@ -16731,6 +16731,7 @@ void Player::_LoadTalents(QueryResult *result) delete result; } } + void Player::_LoadGroup(QueryResult *result) { //QueryResult *result = CharacterDatabase.PQuery("SELECT groupId FROM group_member WHERE memberGuid='%u'", GetGUIDLow()); @@ -21818,7 +21819,7 @@ PlayerTalent const* Player::GetKnownTalentById(int32 talentId) const SpellEntry const* Player::GetKnownTalentRankById(int32 talentId) const { if (PlayerTalent const* talent = GetKnownTalentById(talentId)) - return sSpellStore.LookupEntry(talent->m_talentEntry->RankID[talent->currentRank]); + return sSpellStore.LookupEntry(talent->talentEntry->RankID[talent->currentRank]); else return NULL; } @@ -21833,12 +21834,12 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank) if (talentRank >= MAX_TALENT_RANK) return; - TalentEntry const *talentInfo = sTalentStore.LookupEntry( talentId ); + TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentId); if(!talentInfo) return; - TalentTabEntry const *talentTabInfo = sTalentTabStore.LookupEntry( talentInfo->TalentTab ); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); if(!talentTabInfo) return; @@ -21886,7 +21887,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank) if (talentInfo->Row > 0) { for (PlayerTalentMap::const_iterator iter = m_talents[m_activeSpec].begin(); iter != m_talents[m_activeSpec].end(); ++iter) - if (iter->second.state != PLAYERSPELL_REMOVED && iter->second.m_talentEntry->TalentTab == tTab) + if (iter->second.state != PLAYERSPELL_REMOVED && iter->second.talentEntry->TalentTab == tTab) spentPoints += iter->second.currentRank + 1; } @@ -22132,10 +22133,10 @@ void Player::BuildPlayerTalentsInfoData(WorldPacket *data) continue; // skip another tab talents - if(talent.m_talentEntry->TalentTab != talentTabId) + if (talent.talentEntry->TalentTab != talentTabId) continue; - *data << uint32(talent.m_talentEntry->TalentID); // Talent.dbc + *data << uint32(talent.talentEntry->TalentID); // Talent.dbc *data << uint8(talent.currentRank); // talentMaxRank (0-4) ++talentIdCount; @@ -22485,7 +22486,7 @@ void Player::ActivateSpec(uint8 specNum) // remove all talent spells that don't exist in next spec but exist in old for (PlayerTalentMap::iterator specIter = m_talents[m_activeSpec].begin(); specIter != m_talents[m_activeSpec].end();) { - PlayerTalent& talent = (*specIter).second; + PlayerTalent& talent = specIter->second; if (talent.state == PLAYERSPELL_REMOVED) { @@ -22498,7 +22499,7 @@ void Player::ActivateSpec(uint8 specNum) // remove any talent rank if talent not listed in temp spec if (iterTempSpec == tempSpec.end() || iterTempSpec->second.state == PLAYERSPELL_REMOVED) { - TalentEntry const *talentInfo = talent.m_talentEntry; + TalentEntry const *talentInfo = talent.talentEntry; for(int r = 0; r < MAX_TALENT_RANK; ++r) if (talentInfo->RankID[r]) @@ -22513,7 +22514,7 @@ void Player::ActivateSpec(uint8 specNum) // now new spec data have only talents (maybe different rank) as in temp spec data, sync ranks then. for (PlayerTalentMap::const_iterator tempIter = tempSpec.begin(); tempIter != tempSpec.end(); ++tempIter) { - PlayerTalent const& talent = (*tempIter).second; + PlayerTalent const& talent = tempIter->second; // removed state talent already unlearned in prev. loop // but we need restore it if it deleted for finish removed-marked data in DB @@ -22523,7 +22524,7 @@ void Player::ActivateSpec(uint8 specNum) continue; } - uint32 talentSpellId = talent.m_talentEntry->RankID[talent.currentRank]; + uint32 talentSpellId = talent.talentEntry->RankID[talent.currentRank]; // learn talent spells if they not in new spec (old spec copy) // and if they have different rank @@ -22538,7 +22539,7 @@ void Player::ActivateSpec(uint8 specNum) // sync states - original state is changed in addSpell that learnSpell calls PlayerTalentMap::iterator specIter = m_talents[m_activeSpec].find(tempIter->first); if (specIter != m_talents[m_activeSpec].end()) - (*specIter).second.state = talent.state; + specIter->second.state = talent.state; else { sLog.outError("ActivateSpec: Talent spell %u expected to learned at spec switch but not listed in talents at final check!", talentSpellId); diff --git a/src/game/Player.h b/src/game/Player.h index 0e0d38cb2..a7b3a9f20 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -106,9 +106,9 @@ struct PlayerSpell struct PlayerTalent { - PlayerSpellState state; - TalentEntry const *m_talentEntry; + TalentEntry const *talentEntry; uint32 currentRank; + PlayerSpellState state; }; typedef UNORDERED_MAP PlayerSpellMap; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 9bd1eaa9b..590fa7fb8 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11481" + #define REVISION_NR "11482" #endif // __REVISION_NR_H__