mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
[7476] Implement druid's talent 61336. Author: Lightguard
--HG-- branch : trunk
This commit is contained in:
@@ -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:
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user