mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 10:37:06 +00:00
Merge commit 'origin/master' into 320
Conflicts: src/game/Player.cpp
This commit is contained in:
commit
3882772658
42 changed files with 696 additions and 487 deletions
|
|
@ -4899,11 +4899,17 @@ void Aura::HandleAuraModIncreaseHealth(bool apply, bool Real)
|
|||
case 34511: // Valor (Bulwark of Kings, Bulwark of the Ancient Kings)
|
||||
case 44055: // Tremendous Fortitude (Battlemaster's Alacrity)
|
||||
case 50322: // Survival Instincts
|
||||
case 54443: // Demonic Empowerment (Voidwalker)
|
||||
{
|
||||
if(Real)
|
||||
{
|
||||
if(apply)
|
||||
{
|
||||
// Demonic Empowerment (Voidwalker) - special case, store percent in data
|
||||
// recalculate to full amount at apply for proper remove
|
||||
if (GetId() == 54443)
|
||||
m_modifier.m_amount = m_target->GetMaxHealth() * m_modifier.m_amount / 100;
|
||||
|
||||
m_target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(m_modifier.m_amount), apply);
|
||||
m_target->ModifyHealth(m_modifier.m_amount);
|
||||
}
|
||||
|
|
@ -5486,8 +5492,6 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
|||
break;
|
||||
case FORM_MOONKIN:
|
||||
spellId1 = 24905;
|
||||
// aura from effect trigger spell
|
||||
spellId2 = 24907;
|
||||
MasterShaperSpellId = 48421;
|
||||
break;
|
||||
case FORM_FLIGHT:
|
||||
|
|
@ -5495,15 +5499,15 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
|||
spellId2 = 34764;
|
||||
break;
|
||||
case FORM_FLIGHT_EPIC:
|
||||
spellId1 = 40122;
|
||||
spellId1 = 40122;
|
||||
spellId2 = 40121;
|
||||
break;
|
||||
case FORM_METAMORPHOSIS:
|
||||
spellId1 = 54817;
|
||||
spellId1 = 54817;
|
||||
spellId2 = 54879;
|
||||
break;
|
||||
case FORM_SPIRITOFREDEMPTION:
|
||||
spellId1 = 27792;
|
||||
spellId1 = 27792;
|
||||
spellId2 = 27795; // must be second, this important at aura remove to prevent to early iterator invalidation.
|
||||
break;
|
||||
case FORM_SHADOW:
|
||||
|
|
@ -5518,14 +5522,15 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
|||
case FORM_STEALTH:
|
||||
case FORM_CREATURECAT:
|
||||
case FORM_CREATUREBEAR:
|
||||
spellId1 = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if(apply)
|
||||
{
|
||||
if (spellId1) m_target->CastSpell(m_target, spellId1, true, NULL, this );
|
||||
if (spellId2) m_target->CastSpell(m_target, spellId2, true, NULL, this);
|
||||
if (spellId1)
|
||||
m_target->CastSpell(m_target, spellId1, true, NULL, this );
|
||||
if (spellId2)
|
||||
m_target->CastSpell(m_target, spellId2, true, NULL, this);
|
||||
|
||||
if (m_target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
|
|
@ -5616,9 +5621,12 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
|||
}
|
||||
else
|
||||
{
|
||||
m_target->RemoveAurasDueToSpell(spellId1);
|
||||
m_target->RemoveAurasDueToSpell(spellId2);
|
||||
m_target->RemoveAurasDueToSpell(MasterShaperSpellId);
|
||||
if(spellId1)
|
||||
m_target->RemoveAurasDueToSpell(spellId1);
|
||||
if(spellId2)
|
||||
m_target->RemoveAurasDueToSpell(spellId2);
|
||||
if(MasterShaperSpellId)
|
||||
m_target->RemoveAurasDueToSpell(MasterShaperSpellId);
|
||||
|
||||
Unit::AuraMap& tAuras = m_target->GetAuras();
|
||||
for (Unit::AuraMap::iterator itr = tAuras.begin(); itr != tAuras.end();)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue