Skip to content
Permalink
Browse files

Server/Spells: Update Shapeshift boosts for cat and bear.

Signed-off-by: AriDEV <aridev666@gmail.com>
  • Loading branch information
AriDEV committed Feb 14, 2020
1 parent 5288a0c commit 0cff0935d150f1faa279395d79fdc3df9c9dc62f
Showing with 29 additions and 66 deletions.
  1. +29 −66 src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -1214,14 +1214,16 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
{
uint32 spellId = 0;
uint32 spellId2 = 0;
uint32 spellId3 = 0;
uint32 spellId4 = 0;

switch (GetMiscValue())
{
case FORM_CAT:
spellId = 3025;
break;
case FORM_TREE:
spellId = 34123;
spellId2 = 48629;
spellId3 = 106840;
spellId4 = 113636;
break;
case FORM_TRAVEL:
spellId = 5419;
@@ -1232,6 +1234,8 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
case FORM_BEAR:
spellId = 1178;
spellId2 = 21178;
spellId3 = 106829;
spellId4 = 106899;
break;
case FORM_BATTLESTANCE:
spellId = 21156;
@@ -1265,9 +1269,6 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
case FORM_SHADOW:
spellId = 49868;
break;
case FORM_GHOSTWOLF:
spellId = 67116;
break;
case FORM_GHOUL:
case FORM_AMBIENT:
case FORM_STEALTH:
@@ -1295,6 +1296,20 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
target->CastSpell(target, spellId2, true, NULL, this);
}

if (spellId3)
{
if (target->GetTypeId() == TYPEID_PLAYER)
target->ToPlayer()->RemoveSpellCooldown(spellId3);
target->CastSpell(target, spellId3, true, NULL, this);
}

if (spellId4)
{
if (target->GetTypeId() == TYPEID_PLAYER)
target->ToPlayer()->RemoveSpellCooldown(spellId4);
target->CastSpell(target, spellId4, true, NULL, this);
}

if (target->GetTypeId() == TYPEID_PLAYER)
{
Player* plrTarget = target->ToPlayer();
@@ -1305,7 +1320,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
if (itr->second->state == PLAYERSPELL_REMOVED || itr->second->disabled)
continue;

if (itr->first == spellId || itr->first == spellId2)
if (itr->first == spellId || itr->first == spellId2 || itr->first == spellId3 || itr->first == spellId4)
continue;

SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
@@ -1344,30 +1359,6 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
target->CastSpell(target, 24932, true, NULL, this);
}

// Heart of the Wild
if (AuraEffect const* heartOfTheWild = target->GetAuraEffectOfRankedSpell(17003, EFFECT_0))
{
uint32 heartOfTheWildSpellId = 0;
int32 heartOfTheWildAmount = 0;

switch (GetMiscValue())
{
case FORM_CAT:
heartOfTheWildSpellId = 24900;
heartOfTheWildAmount = heartOfTheWild->GetSpellInfo()->Effects[EFFECT_1].CalcValue();
break;
case FORM_BEAR:
heartOfTheWildSpellId = 24899;
heartOfTheWildAmount = heartOfTheWild->GetSpellInfo()->Effects[EFFECT_2].CalcValue();
break;
default:
break;
}

if (heartOfTheWildSpellId)
target->CastCustomSpell(target, heartOfTheWildSpellId, &heartOfTheWildAmount, NULL, NULL, true, NULL, this);
}

switch (GetMiscValue())
{
case FORM_CAT:
@@ -1377,47 +1368,15 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
// Nurturing Instinct
if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, SPELLFAMILY_DRUID, 2254, EFFECT_0))
{
uint32 spellId3 = 0;
uint32 spellId5 = 0;
switch (aurEff->GetId())
{
case 33872:
spellId3 = 47179;
break;
case 33873:
spellId3 = 47180;
spellId5 = 47180;
break;
}
target->CastSpell(target, spellId3, true, NULL, this);
}
// Master Shapeshifter - Cat
if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_MOD_HEALING_DONE_PERCENT, SPELLFAMILY_GENERIC, 2851, EFFECT_0))
{
int32 bp = aurEff->GetAmount();
target->CastCustomSpell(target, 48420, &bp, NULL, NULL, true);
}
break;
case FORM_BEAR:
// Master Shapeshifter - Bear
if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_MOD_HEALING_DONE_PERCENT, SPELLFAMILY_GENERIC, 2851, EFFECT_0))
{
int32 bp = aurEff->GetAmount();
target->CastCustomSpell(target, 48418, &bp, NULL, NULL, true);
}
// Survival of the Fittest
if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, SPELLFAMILY_DRUID, 961, EFFECT_0))
{
int32 bp = aurEff->GetSpellInfo()->Effects[EFFECT_2].CalcValue(GetCaster());
target->CastCustomSpell(target, 62069, &bp, NULL, NULL, true, 0, this);
target->CastSpell(target, spellId5, true, NULL, this);
}
break;
case FORM_MOONKIN:
// Master Shapeshifter - Moonkin
if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_MOD_HEALING_DONE_PERCENT, SPELLFAMILY_GENERIC, 2851, EFFECT_0))
{
int32 bp = aurEff->GetAmount();
target->CastCustomSpell(target, 48421, &bp, NULL, NULL, true);
}
break;
default:
break;
}
@@ -1429,6 +1388,10 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
target->RemoveOwnedAura(spellId, target->GetGUID());
if (spellId2)
target->RemoveOwnedAura(spellId2, target->GetGUID());
if (spellId3)
target->RemoveOwnedAura(spellId3, target->GetGUID());
if (spellId4)
target->RemoveOwnedAura(spellId4, target->GetGUID());

Unit::AuraEffectList const& shapeshifts = target->GetAuraEffectsByType(SPELL_AURA_MOD_SHAPESHIFT);
AuraEffect* newAura = NULL;

0 comments on commit 0cff093

Please sign in to comment.
You can’t perform that action at this time.