Merge commit 'origin/master' into 310

This commit is contained in:
tomrus88 2009-05-07 02:08:52 +04:00
commit 216b947002
6 changed files with 87 additions and 29 deletions

View file

@ -507,7 +507,7 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
// Gouge
else if(m_spellInfo->SpellFamilyFlags & 0x0000000000000008LL)
{
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.02f);
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.21f);
}
// Instant Poison
else if(m_spellInfo->SpellFamilyFlags & 0x0000000000002000LL)
@ -6159,7 +6159,7 @@ void Spell::EffectSummonDeadPet(uint32 /*i*/)
void Spell::EffectDestroyAllTotems(uint32 /*i*/)
{
float mana = 0;
int32 mana = 0;
for(int slot = 0; slot < MAX_TOTEM; ++slot)
{
if(!m_caster->m_TotemSlot[slot])
@ -6171,13 +6171,16 @@ void Spell::EffectDestroyAllTotems(uint32 /*i*/)
uint32 spell_id = totem->GetUInt32Value(UNIT_CREATED_BY_SPELL);
SpellEntry const* spellInfo = sSpellStore.LookupEntry(spell_id);
if(spellInfo)
mana += spellInfo->manaCost * damage / 100;
{
uint32 manacost = m_caster->GetCreateMana() * spellInfo->ManaCostPercentage / 100;
mana += manacost * damage / 100;
}
((Totem*)totem)->UnSummon();
}
}
int32 gain = m_caster->ModifyPower(POWER_MANA,int32(mana));
m_caster->SendEnergizeSpellLog(m_caster, m_spellInfo->Id, gain, POWER_MANA);
if (mana)
m_caster->CastCustomSpell(m_caster, 39104, &mana, NULL, NULL, true);
}
void Spell::EffectDurabilityDamage(uint32 i)