aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-17 14:53:30 -0600
committermegamage <none@none>2009-03-17 14:53:30 -0600
commitcb1ff8180d77a790ae3c997ee11546df92ca3d28 (patch)
treeb94f85e646e1d316f7dfd3e910657c62ed052075 /src
parent98eb343d10e0467d5b7ef58038ca5845f547ae94 (diff)
[7476] Implement druid's talent 61336. Author: Lightguard
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Spell.cpp39
-rw-r--r--src/game/SpellAuras.cpp64
2 files changed, 72 insertions, 31 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index b511cb6e20f..4ea12920ce9 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -4198,25 +4198,38 @@ SpellCastResult Spell::CheckCast(bool strict)
{
case SPELL_AURA_DUMMY:
{
- if(m_spellInfo->Id == 1515)
+ //custom check
+ switch(m_spellInfo->Id)
{
- if (!m_targets.getUnitTarget() || m_targets.getUnitTarget()->GetTypeId() == TYPEID_PLAYER)
- return SPELL_FAILED_BAD_IMPLICIT_TARGETS;
+ case 61336:
+ if(m_caster->GetTypeId()!=TYPEID_PLAYER || !((Player*)m_caster)->IsInFeralForm())
+ return SPELL_FAILED_ONLY_SHAPESHIFT;
+ break;
+ case 1515:
+ {
+ if (!m_targets.getUnitTarget() || m_targets.getUnitTarget()->GetTypeId() == TYPEID_PLAYER)
+ return SPELL_FAILED_BAD_IMPLICIT_TARGETS;
- if (m_targets.getUnitTarget()->getLevel() > m_caster->getLevel())
- return SPELL_FAILED_HIGHLEVEL;
+ if (m_targets.getUnitTarget()->getLevel() > m_caster->getLevel())
+ return SPELL_FAILED_HIGHLEVEL;
- // use SMSG_PET_TAME_FAILURE?
- if (!((Creature*)m_targets.getUnitTarget())->GetCreatureInfo()->isTameable ())
- return SPELL_FAILED_BAD_TARGETS;
+ // use SMSG_PET_TAME_FAILURE?
+ if (!((Creature*)m_targets.getUnitTarget())->GetCreatureInfo()->isTameable ())
+ return SPELL_FAILED_BAD_TARGETS;
- if(m_caster->GetPetGUID())
- return SPELL_FAILED_ALREADY_HAVE_SUMMON;
+ if(m_caster->GetPetGUID())
+ return SPELL_FAILED_ALREADY_HAVE_SUMMON;
- if(m_caster->GetCharmGUID())
- return SPELL_FAILED_ALREADY_HAVE_CHARM;
+ if(m_caster->GetCharmGUID())
+ return SPELL_FAILED_ALREADY_HAVE_CHARM;
+
+ break;
+ }
+ default:
+ break;
}
- }break;
+ break;
+ }
case SPELL_AURA_MOD_POSSESS:
case SPELL_AURA_MOD_CHARM:
{
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index ef31316b0ac..9401d1c237d 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -2172,6 +2172,44 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
}
case SPELLFAMILY_DRUID:
{
+ switch(GetId())
+ {
+ case 34246: // Idol of the Emerald Queen
+ {
+ if (m_target->GetTypeId() != TYPEID_PLAYER)
+ return;
+
+ if(apply)
+ {
+ SpellModifier *mod = new SpellModifier;
+ mod->op = SPELLMOD_DOT;
+ mod->value = m_modifier.m_amount/7;
+ mod->type = SPELLMOD_FLAT;
+ mod->spellId = GetId();
+ mod->mask[1] = 0x0010;
+
+ m_spellmod = mod;
+ }
+
+ ((Player*)m_target)->AddSpellMod(m_spellmod, apply);
+ return;
+ }
+ case 61336: // Survival Instincts
+ {
+ if(apply)
+ {
+ if (!m_target->IsInFeralForm())
+ return;
+
+ int32 bp0 = int32(m_target->GetMaxHealth() * m_modifier.m_amount / 100);
+ m_target->CastCustomSpell(m_target, 50322, &bp0, NULL, NULL, true);
+ }
+ else
+ m_target-> RemoveAurasDueToSpell(50322);
+ return;
+ }
+ }
+
// Lifebloom
if ( GetSpellProto()->SpellFamilyFlags[1] & 0x10 )
{
@@ -2215,24 +2253,6 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
((Player*)m_target)->UpdateAttackPowerAndDamage();
return;
}
- // Idol of the Emerald Queen
- if ( GetId() == 34246 && m_target->GetTypeId()==TYPEID_PLAYER )
- {
- if(apply)
- {
- SpellModifier *mod = new SpellModifier;
- mod->op = SPELLMOD_DOT;
- mod->value = m_modifier.m_amount/7;
- mod->type = SPELLMOD_FLAT;
- mod->spellId = GetId();
- mod->mask[1] = 0x0010;
-
- m_spellmod = mod;
- }
-
- ((Player*)m_target)->AddSpellMod(m_spellmod, apply);
- return;
- }
break;
}
case SPELLFAMILY_HUNTER:
@@ -4516,7 +4536,15 @@ void Aura::HandleAuraModIncreaseHealth(bool apply, bool Real)
{
if(Real)
{
+<<<<<<< HEAD:src/game/SpellAuras.cpp
if(apply)
+=======
+ case 12976: // Warrior Last Stand triggered spell
+ case 28726: // Nightmare Seed ( Nightmare Seed )
+ case 34511: // Valor (Bulwark of Kings, Bulwark of the Ancient Kings)
+ case 44055: // Tremendous Fortitude (Battlemaster's Alacrity)
+ case 50322: // Survival Instincts
+>>>>>>> 9a5e9413cef438edcbfbdc046bfa414b07c229a3:src/game/SpellAuras.cpp
{
m_target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(m_modifier.m_amount), apply);
m_target->ModifyHealth(m_modifier.m_amount);