Merge commit 'origin/master' into 320

Conflicts:
	src/game/Player.cpp
	src/game/Totem.cpp
This commit is contained in:
tomrus88 2009-07-21 08:22:30 +04:00
commit 4c709772c1
61 changed files with 912 additions and 454 deletions

View file

@ -996,9 +996,13 @@ void Aura::_AddAura()
if (IsSealSpell(m_spellProto))
m_target->ModifyAuraState(AURA_STATE_JUDGEMENT, true);
// Conflagrate aura state on Immolate
if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellProto->SpellFamilyFlags & 4)
m_target->ModifyAuraState(AURA_STATE_IMMOLATE, true);
// Conflagrate aura state on Immolate and Shadowflame
if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARLOCK &&
// Immolate
((m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000004)) ||
// Shadowflame
(m_spellProto->SpellFamilyFlags2 & 0x00000002)))
m_target->ModifyAuraState(AURA_STATE_CONFLAGRATE, true);
// Faerie Fire (druid versions)
if (m_spellProto->SpellFamilyName == SPELLFAMILY_DRUID && (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000400)))
@ -1094,6 +1098,7 @@ void Aura::_RemoveAura()
uint32 removeState = 0;
uint64 removeFamilyFlag = m_spellProto->SpellFamilyFlags;
uint32 removeFamilyFlag2 = m_spellProto->SpellFamilyFlags2;
switch(m_spellProto->SpellFamilyName)
{
case SPELLFAMILY_PALADIN:
@ -1101,8 +1106,14 @@ void Aura::_RemoveAura()
removeState = AURA_STATE_JUDGEMENT; // Update Seals information
break;
case SPELLFAMILY_WARLOCK:
if(m_spellProto->SpellFamilyFlags & UI64LIT(0x4))
removeState = AURA_STATE_IMMOLATE; // Conflagrate aura state
// Conflagrate aura state on Immolate and Shadowflame,
if ((m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000004)) ||
(m_spellProto->SpellFamilyFlags2 & 0x00000002))
{
removeFamilyFlag = UI64LIT(0x0000000000000004);
removeFamilyFlag2 = 0x00000002;
removeState = AURA_STATE_CONFLAGRATE;
}
break;
case SPELLFAMILY_DRUID:
if(m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000400))
@ -1135,7 +1146,7 @@ void Aura::_RemoveAura()
{
SpellEntry const *auraSpellInfo = (*i).second->GetSpellProto();
if(auraSpellInfo->SpellFamilyName == m_spellProto->SpellFamilyName &&
auraSpellInfo->SpellFamilyFlags & removeFamilyFlag)
(auraSpellInfo->SpellFamilyFlags & removeFamilyFlag || auraSpellInfo->SpellFamilyFlags2 & removeFamilyFlag2))
{
found = true;
break;
@ -1841,6 +1852,49 @@ void Aura::TriggerSpell()
// }
// break;
// }
case SPELLFAMILY_HUNTER:
{
switch (auraId)
{
// Sniper training
case 53302:
case 53303:
case 53304:
if (target->GetTypeId() != TYPEID_PLAYER)
return;
// Reset reapply counter at move
if (((Player*)target)->isMoving())
{
m_modifier.m_amount = 6;
return;
}
// We are standing at the moment
if (m_modifier.m_amount > 0)
{
--m_modifier.m_amount;
return;
}
// select rank of buff
switch(auraId)
{
case 53302: trigger_spell_id = 64418; break;
case 53303: trigger_spell_id = 64419; break;
case 53304: trigger_spell_id = 64420; break;
}
// If aura is active - no need to continue
if (target->HasAura(trigger_spell_id))
return;
break;
default:
break;
}
break;
}
case SPELLFAMILY_DRUID:
{
switch(auraId)
@ -2004,6 +2058,10 @@ void Aura::TriggerSpell()
caster->CastCustomSpell(target, trigger_spell_id, &m_modifier.m_amount, NULL, NULL, true, NULL, this);
return;
}
// Ground Slam
case 33525:
target->CastSpell(target, trigger_spell_id, true);
return;
}
}
@ -3927,12 +3985,22 @@ void Aura::HandleAuraModIncreaseSwimSpeed(bool /*apply*/, bool Real)
m_target->UpdateSpeed(MOVE_SWIM, true);
}
void Aura::HandleAuraModDecreaseSpeed(bool /*apply*/, bool Real)
void Aura::HandleAuraModDecreaseSpeed(bool apply, bool Real)
{
// all applied/removed only at real aura add/remove
if(!Real)
return;
if (apply)
{
// Gronn Lord's Grasp, becomes stoned
if (GetId() == 33572)
{
if (GetStackAmount() >= 5 && !m_target->HasAura(33652))
m_target->CastSpell(m_target, 33652, true);
}
}
m_target->UpdateSpeed(MOVE_RUN, true);
m_target->UpdateSpeed(MOVE_SWIM, true);
m_target->UpdateSpeed(MOVE_FLIGHT, true);
@ -4308,8 +4376,8 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
// Rake
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000001000) && m_spellProto->Effect[2]==SPELL_EFFECT_ADD_COMBO_POINTS)
{
// $AP*0.18 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 18 / 100);
// $AP*0.18/3 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 6 / 100);
return;
}
// Lacerate