diff options
-rw-r--r-- | src/game/Level3.cpp | 2 | ||||
-rw-r--r-- | src/game/Player.cpp | 19 | ||||
-rw-r--r-- | src/game/SharedDefines.h | 4 | ||||
-rw-r--r-- | src/game/Spell.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 4 |
5 files changed, 15 insertions, 16 deletions
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 5e8ca3f3c30..30a646ee4b4 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -5290,7 +5290,7 @@ bool ChatHandler::HandleResetTalentsCommand(const char * args) return true; } - // Try reset talenents as Hunter Pet + // Try reset talents as Hunter Pet Creature* creature = getSelectedCreature(); if (creature && creature->isPet() && ((Pet *)creature)->getPetType() == HUNTER_PET) { diff --git a/src/game/Player.cpp b/src/game/Player.cpp index e6772a5fa8f..09468436aa9 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -426,7 +426,7 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa m_lastPotionId = 0; m_activeSpec = 0; - m_specsCount = 0; + m_specsCount = 1; for (uint8 i = 0; i < BASEMOD_END; ++i) { @@ -2438,7 +2438,8 @@ void Player::InitTalentForLevel() SetFreeTalentPoints(talentPointsForLevel-m_usedTalentCount); } - SendTalentsInfoData(false); // update at client + if(!GetSession()->PlayerLoading()) + SendTalentsInfoData(false); // update at client } void Player::InitStatsForLevel(bool reapplyMods) @@ -3367,7 +3368,6 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool update_action_bar_ } } - void Player::RemoveSpellCooldown( uint32 spell_id, bool update /* = false */ ) { m_spellCooldowns.erase(spell_id); @@ -20813,14 +20813,13 @@ bool Player::canSeeSpellClickOn(Creature const *c) const void Player::BuildPlayerTalentsInfoData(WorldPacket *data) { *data << uint32(GetFreeTalentPoints()); // unspentTalentPoints - uint8 talentGroupCount = 1; - *data << uint8(talentGroupCount); // talent group count (0, 1 or 2) - *data << uint8(0); // talent group index (0 or 1) + *data << uint8(m_specsCount); // talent group count (0, 1 or 2) + *data << uint8(m_activeSpec); // talent group index (0 or 1) - if(talentGroupCount) + if(m_specsCount) { // loop through all specs (only 1 for now) - for(uint8 groups = 0; groups < talentGroupCount; ++groups) + for(uint32 specIdx = 0; specIdx < m_specsCount; ++specIdx) { uint8 talentIdCount = 0; size_t pos = data->wpos(); @@ -20845,7 +20844,7 @@ void Player::BuildPlayerTalentsInfoData(WorldPacket *data) // find max talent rank int32 curtalent_maxrank = -1; - for(int32 k = 4; k > -1; --k) + for(int32 k = MAX_TALENT_RANK-1; k > -1; --k) { if(talentInfo->RankID[k] && HasSpell(talentInfo->RankID[k])) { @@ -21119,4 +21118,4 @@ void Player::ActivateSpec(uint32 specNum) return; resetTalents(true); -}
\ No newline at end of file +} diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 639bc5f5e81..e958f911440 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -695,8 +695,8 @@ enum SpellEffects SPELL_EFFECT_MILLING = 158, SPELL_EFFECT_ALLOW_RENAME_PET = 159, SPELL_EFFECT_160 = 160, - SPELL_EFFECT_161 = 161, - SPELL_EFFECT_162 = 162, + SPELL_EFFECT_TALENT_SPEC_COUNT = 161, + SPELL_EFFECT_TALENT_SPEC_SELECT = 162, TOTAL_SPELL_EFFECTS = 163 }; diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index fe42dec9a4f..89eb18f2486 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -6335,4 +6335,4 @@ void Spell::FillRaidOrPartyHealthPriorityTargets( UnitList &TagUnitMap, Unit* ta TagUnitMap.push_back(healthQueue.top().getUnit()); healthQueue.pop(); } -}
\ No newline at end of file +} diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 8f23f5e6f81..2aa9413ede9 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -225,8 +225,8 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]= &Spell::EffectMilling, //158 SPELL_EFFECT_MILLING milling &Spell::EffectRenamePet, //159 SPELL_EFFECT_ALLOW_RENAME_PET allow rename pet once again &Spell::EffectNULL, //160 SPELL_EFFECT_160 unused - &Spell::EffectNULL, //161 SPELL_EFFECT_161 second talent spec (learn/revert) - &Spell::EffectNULL //162 SPELL_EFFECT_162 activate primary/secondary spec + &Spell::EffectNULL, //161 SPELL_EFFECT_TALENT_SPEC_COUNT second talent spec (learn/revert) + &Spell::EffectNULL, //162 SPELL_EFFECT_TALENT_SPEC_SELECT activate primary/secondary spec }; void Spell::EffectNULL(uint32 /*i*/) |