mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[8715] Fixed possible crashes and some typos
This commit is contained in:
parent
b1888bb343
commit
f286a2e64e
5 changed files with 17 additions and 17 deletions
|
|
@ -457,7 +457,7 @@ void BattleGroundAB::Reset()
|
|||
//call parent's class reset
|
||||
BattleGround::Reset();
|
||||
|
||||
for (uint8 i = 0; i <= BG_TEAMS_COUNT; ++i)
|
||||
for (uint8 i = 0; i < BG_TEAMS_COUNT; ++i)
|
||||
{
|
||||
m_TeamScores[i] = 0;
|
||||
m_lastTick[i] = 0;
|
||||
|
|
|
|||
|
|
@ -1817,19 +1817,21 @@ void Spell::EffectDummy(uint32 i)
|
|||
// Cleansing Totem
|
||||
if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000004000000)) && m_spellInfo->SpellIconID==1673)
|
||||
{
|
||||
if (unitTarget)
|
||||
m_caster->CastSpell(unitTarget, 52025, true);
|
||||
return;
|
||||
}
|
||||
// Healing Stream Totem
|
||||
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000002000))
|
||||
{
|
||||
if (unitTarget)
|
||||
m_caster->CastCustomSpell(unitTarget, 52042, &damage, 0, 0, true, 0, 0, m_originalCasterGUID);
|
||||
return;
|
||||
}
|
||||
// Mana Spring Totem
|
||||
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000004000))
|
||||
{
|
||||
if (unitTarget->getPowerType()!=POWER_MANA)
|
||||
if (!unitTarget || unitTarget->getPowerType()!=POWER_MANA)
|
||||
return;
|
||||
m_caster->CastCustomSpell(unitTarget, 52032, &damage, 0, 0, true, 0, 0, m_originalCasterGUID);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -100,21 +100,19 @@ uint16 GetSpellAuraMaxTicks(SpellEntry const* spellInfo)
|
|||
if(DotDuration > 30000)
|
||||
DotDuration = 30000;
|
||||
|
||||
int j = 0;
|
||||
for( ; j < 3; j++)
|
||||
for (int j = 0; j < 3; ++j)
|
||||
{
|
||||
if (spellInfo->Effect[j] == SPELL_EFFECT_APPLY_AURA && (
|
||||
spellInfo->EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_DAMAGE ||
|
||||
spellInfo->EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_HEAL ||
|
||||
spellInfo->EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_LEECH) )
|
||||
{
|
||||
if (spellInfo->EffectAmplitude[j] != 0)
|
||||
return DotDuration / spellInfo->EffectAmplitude[j];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(spellInfo->EffectAmplitude[j] != 0)
|
||||
return DotDuration / spellInfo->EffectAmplitude[j];
|
||||
|
||||
return 6;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1568,17 +1568,17 @@ void Unit::HandleEmoteCommand(uint32 anim_id)
|
|||
uint32 Unit::CalcNotIgnoreAbsorbDamage( uint32 damage, SpellSchoolMask damageSchoolMask, SpellEntry const* spellInfo /*= NULL*/)
|
||||
{
|
||||
float absorb_affected_rate = 1.0f;
|
||||
Unit::AuraList const& ignoreAbsorb = GetAurasByType(SPELL_AURA_MOD_IGNORE_ABSORB_SCHOOL);
|
||||
for(Unit::AuraList::const_iterator i = ignoreAbsorb.begin(); i != ignoreAbsorb.end(); ++i)
|
||||
Unit::AuraList const& ignoreAbsorbSchool = GetAurasByType(SPELL_AURA_MOD_IGNORE_ABSORB_SCHOOL);
|
||||
for(Unit::AuraList::const_iterator i = ignoreAbsorbSchool.begin(); i != ignoreAbsorbSchool.end(); ++i)
|
||||
if ((*i)->GetMiscValue() & damageSchoolMask)
|
||||
absorb_affected_rate *= (100.0f - (*i)->GetModifier()->m_amount)/100.0f;
|
||||
|
||||
if(spellInfo)
|
||||
{
|
||||
Unit::AuraList const& ignoreAbsorb = GetAurasByType(SPELL_AURA_MOD_IGNORE_ABSORB_FOR_SPELL);
|
||||
for(Unit::AuraList::const_iterator i = ignoreAbsorb.begin(); i != ignoreAbsorb.end(); ++i)
|
||||
if ((*i)->isAffectedOnSpell(spellInfo))
|
||||
absorb_affected_rate *= (100.0f - (*i)->GetModifier()->m_amount)/100.0f;
|
||||
Unit::AuraList const& ignoreAbsorbForSpell = GetAurasByType(SPELL_AURA_MOD_IGNORE_ABSORB_FOR_SPELL);
|
||||
for(Unit::AuraList::const_iterator citr = ignoreAbsorbForSpell.begin(); citr != ignoreAbsorbForSpell.end(); ++citr)
|
||||
if ((*citr)->isAffectedOnSpell(spellInfo))
|
||||
absorb_affected_rate *= (100.0f - (*citr)->GetModifier()->m_amount)/100.0f;
|
||||
}
|
||||
|
||||
return absorb_affected_rate <= 0.0f ? 0 : (absorb_affected_rate < 1.0f ? uint32(damage * absorb_affected_rate) : damage);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8714"
|
||||
#define REVISION_NR "8715"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue