Code
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index f98c6d8..f38ee1a 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -19492,12 +19492,36 @@ void Player::resetSpells()
void Player::learnDefaultSpells()
{
+ std::vector<uint32> spellToLearn;
+
+ if(getRace() == RACE_WORGEN)
+ {
+ spellToLearn.push_back(68996);
+ spellToLearn.push_back(72792);
+ spellToLearn.push_back(68992);
+ spellToLearn.push_back(69270);
+ }
+
+ if(getRace() == RACE_GOBLIN)
+ {
+ spellToLearn.push_back(69044);
+ spellToLearn.push_back(69045);
+ spellToLearn.push_back(69046);
+ spellToLearn.push_back(69041);
+ spellToLearn.push_back(69070);
+ spellToLearn.push_back(69042);
+ spellToLearn.push_back(69269);
+ }
+
// learn default race/class spells
PlayerInfo const *info = sObjectMgr.GetPlayerInfo(getRace(),getClass());
- for (PlayerCreateInfoSpells::const_iterator itr = info->spell.begin(); itr!=info->spell.end(); ++itr)
+ for (PlayerCreateInfoSpells::const_iterator itr = info->spell.begin(); itr!=info->spell.end(); ++itr)
+ spellToLearn.push_back(*itr);
+
+ for (std::vector<uint32>::iterator itr = spellToLearn.begin(); itr != spellToLearn.end(); itr++)
{
uint32 tspell = *itr;
- DEBUG_LOG("PLAYER (Class: %u Race: %u): Adding initial spell, id = %u",uint32(getClass()),uint32(getRace()), tspell);
+ sLog.outDebug("PLAYER (Class: %u Race: %u): Adding initial spell, id = %u",uint32(getClass()),uint32(getRace()), tspell);
if(!IsInWorld()) // will send in INITIAL_SPELLS in list anyway at map add
addSpell(tspell, true, true, true, false);
else // but send in normal spell in game learn case
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 4ab460b..3cf8f4c 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -4149,6 +4149,10 @@ void Aura::HandleAuraModRoot(bool apply, bool Real)
if(!Real)
return;
+ if(m_spellProto->Id == 69001)
+ if(!m_target->HasFlag(UNIT_FIELD_FLAGS_2,0x80000))
+ m_target->SetFlag(UNIT_FIELD_FLAGS_2,0x80000);
+
if (apply)
{
// Frost root aura -> freeze/unfreeze target
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index b41dbee..10f0275 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -782,6 +782,14 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
if (!unitTarget && !gameObjTarget && !itemTarget)
return;
+ if(m_spellInfo->Id == 68996)
+ {
+ if(!m_caster->HasFlag(UNIT_FIELD_FLAGS_2,0x80000))
+ m_caster->CastSpell(m_caster, 69001, true);
+ else
+ m_caster->RemoveFlag(UNIT_FIELD_FLAGS_2,0x80000);
+ }
+
// selection by spell family
switch(m_spellInfo->SpellFamilyName)
{
@@ -2894,6 +2902,14 @@ void Spell::EffectApplyAura(SpellEffectIndex eff_idx)
return;
}
+ //Darkflight
+ if(m_spellInfo->Id == 68992)
+ {
+ if(unitTarget->HasFlag(UNIT_FIELD_FLAGS_2,0x80000))
+ return;
+ unitTarget->CastSpell(unitTarget, 69001, true);
+ }
+
DEBUG_LOG("Spell: Aura is: %u", m_spellInfo->EffectApplyAuraName[eff_idx]);
Aura* Aur = CreateAura(m_spellInfo, eff_idx, &m_currentBasePoints[eff_idx], unitTarget, caster, m_CastItem);