aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-07-12 04:52:26 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-07-12 04:52:26 +0200
commit2f03e04b877c1430aa1ccb0461f366a2e00e431f (patch)
tree03ae877a700033066d0c3873a2d21fe0b90cb637 /src
parent1bc482d3d6be2fb2db22ad47049d80ae5d625269 (diff)
Core/Player:
- Fix merge fail - Fix SkillRaceClassInfo structure
Diffstat (limited to 'src')
-rw-r--r--src/server/game/DataStores/DBCStructure.h8
-rw-r--r--src/server/game/DataStores/DBCfmt.h2
-rw-r--r--src/server/game/Entities/Player/Player.cpp16
3 files changed, 20 insertions, 6 deletions
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index 26a35457bc3..91733168f50 100644
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -1717,10 +1717,10 @@ struct SkillRaceClassInfoEntry
uint32 RaceMask; // 2 m_raceMask
uint32 ClassMask; // 3 m_classMask
uint32 Flags; // 4 m_flags
- //uint32 MinLevel; // 5 m_minLevel
- uint32 SkillTier; // 6 m_skillTierID
- //uint32 SkillCostType; // 7 m_skillCostIndex
- //uint32 Unk; // 8 m_unk
+ //uint32 Unk; // 5 m_unk
+ //uint32 MinLevel; // 6 m_minLevel
+ uint32 SkillTier; // 7 m_skillTierID
+ //uint32 SkillCostType; // 8 m_skillCostIndex
};
#define MAX_SKILL_STEP 16
diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
index bea6d0bdd9a..83f18050710 100644
--- a/src/server/game/DataStores/DBCfmt.h
+++ b/src/server/game/DataStores/DBCfmt.h
@@ -122,7 +122,7 @@ char const ScalingStatDistributionfmt[] = "niiiiiiiiiiiiiiiiiiiixi";
char const ScalingStatValuesfmt[] = "iniiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii";
char const SkillLinefmt[] = "nisxixi";
char const SkillLineAbilityfmt[] = "niiiixxiiiiiii";
-char const SkillRaceClassInfofmt[] = "diiiixixx";
+char const SkillRaceClassInfofmt[] = "diiiixxix";
char const SkillTiersfmt[] = "nxxxxxxxxxxxxxxxxiiiiiiiiiiiiiiii";
char const SoundEntriesfmt[] = "nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
char const SpellCastTimefmt[] = "nixx";
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index ab9d7c40f7d..bf182f3b0bc 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -3869,7 +3869,7 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent
}
// add dependent skills
- uint16 maxskill = GetMaxSkillValueForLevel();
+ uint16 maxskill = GetMaxSkillValueForLevel();
SpellLearnSkillNode const* spellLearnSkill = sSpellMgr->GetSpellLearnSkill(spellId);
@@ -3891,6 +3891,20 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent
SetSkill(spellLearnSkill->skill, spellLearnSkill->step, skill_value, skill_max_value);
}
+ else
+ {
+ // not ranked skills
+ for (SkillLineAbilityMap::const_iterator _spell_idx = skill_bounds.first; _spell_idx != skill_bounds.second; ++_spell_idx)
+ {
+ SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(_spell_idx->second->skillId);
+ if (!pSkill)
+ continue;
+
+ if (!HasSkill(pSkill->id))
+ LearnDefaultSkill(pSkill->id, 0);
+ }
+ }
+
// learn dependent spells
SpellLearnSpellMapBounds spell_bounds = sSpellMgr->GetSpellLearnSpellMapBounds(spellId);