Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4

Conflicts:
	src/server/game/AI/CoreAI/TotemAI.cpp
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Handlers/ItemHandler.cpp
	src/server/game/Spells/Spell.cpp
	src/server/game/Spells/SpellEffects.cpp
	src/server/scripts/Spells/spell_shaman.cpp
	src/server/scripts/Spells/spell_warlock.cpp
This commit is contained in:
Vincent-Michael
2013-07-23 02:03:35 +02:00
27 changed files with 241 additions and 264 deletions
+10 -8
View File
@@ -589,13 +589,15 @@ class spell_pri_penance : public SpellScriptLoader
bool Validate(SpellInfo const* spellInfo) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_PENANCE_R1))
return false;
// can't use other spell than this penance due to spell_ranks dependency
if (sSpellMgr->GetFirstSpellInChain(SPELL_PRIEST_PENANCE_R1) != sSpellMgr->GetFirstSpellInChain(spellInfo->Id))
SpellInfo const* firstRankSpellInfo = sSpellMgr->GetSpellInfo(SPELL_PRIEST_PENANCE_R1);
if (!firstRankSpellInfo)
return false;
uint8 rank = sSpellMgr->GetSpellRank(spellInfo->Id);
// can't use other spell than this penance due to spell_ranks dependency
if (!spellInfo->IsRankOf(firstRankSpellInfo))
return false;
uint8 rank = spellInfo->GetRank();
if (!sSpellMgr->GetSpellWithRank(SPELL_PRIEST_PENANCE_R1_DAMAGE, rank, true))
return false;
if (!sSpellMgr->GetSpellWithRank(SPELL_PRIEST_PENANCE_R1_HEAL, rank, true))
@@ -612,12 +614,12 @@ class spell_pri_penance : public SpellScriptLoader
if (!unitTarget->IsAlive())
return;
uint8 rank = sSpellMgr->GetSpellRank(GetSpellInfo()->Id);
uint8 rank = GetSpellInfo()->GetRank();
if (caster->IsFriendlyTo(unitTarget))
caster->CastSpell(unitTarget, sSpellMgr->GetSpellWithRank(SPELL_PRIEST_PENANCE_R1_HEAL, rank), false, 0);
caster->CastSpell(unitTarget, sSpellMgr->GetSpellWithRank(SPELL_PRIEST_PENANCE_R1_HEAL, rank), false);
else
caster->CastSpell(unitTarget, sSpellMgr->GetSpellWithRank(SPELL_PRIEST_PENANCE_R1_DAMAGE, rank), false, 0);
caster->CastSpell(unitTarget, sSpellMgr->GetSpellWithRank(SPELL_PRIEST_PENANCE_R1_DAMAGE, rank), false);
}
}