diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 7f12be3..1c820d3 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -2018,11 +2018,31 @@ void Aura::HandleAuraDummy(bool apply, bool Real) return; } + case 46607: // Drake Harpoon + if (target->GetTypeId() != TYPEID_UNIT) + return; + + if (Unit* caster = GetCaster()) + if (caster->GetTypeId() == TYPEID_PLAYER && !target->HasAura(46620) && !target->HasAura(46675)) + // Red Dragonblood + caster->CastSpell(target, 46620, true, NULL, this); + + return; case 46699: // Requires No Ammo if (target->GetTypeId() == TYPEID_PLAYER) // not use ammo and not allow use ((Player*)target)->RemoveAmmo(); return; + case 46703: // Complete Immolation + { + if (target->GetTypeId() != TYPEID_UNIT) + return; + + target->HandleEmote(EMOTE_ONESHOT_WOUNDCRITICAL); + // Subdued + target->RemoveAurasDueToSpell(46675); + return; + } case 47190: // Toalu'u's Spiritual Incense target->CastSpell(target, 47189, true, NULL, this); // allow script to process further (text) @@ -8735,6 +8755,76 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply) { switch(GetId()) { + case 46620: // Red Dragonblood + { + if (Unit* caster = GetCaster()) + if (caster->GetTypeId() == TYPEID_PLAYER && caster->isAlive() && m_target->GetTypeId() == TYPEID_UNIT && m_target->isAlive()) + if (apply) + ((Creature*)m_target)->AI()->AttackStart(caster); + else + { + int32 bp = 1; + // Capture Trigger + caster->CastCustomSpell(m_target, 46673, &bp, NULL, NULL, true, NULL, NULL); + } + return; + } + case 46675: // Subdued + { + if (m_target->GetTypeId() != TYPEID_UNIT) + return; + + if (apply) + { + m_target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_target->CombatStop(true); + m_target->DeleteThreatList(); + m_target->getHostileRefManager().deleteReferences(); + m_target->setFaction(35); + for (Unit::SpellAuraHolderMap::const_iterator itr = m_target->GetSpellAuraHolderMap().begin(); itr != m_target->GetSpellAuraHolderMap().end(); ++itr) + { + if (!itr->second->IsPositive()) + m_target->RemoveAurasDueToSpell(itr->second->GetId()); + } + m_target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + else + { + if (m_target->GetMotionMaster()->GetCurrentMovementGeneratorType() == FOLLOW_MOTION_TYPE) + { + m_target->StopMoving(); + m_target->GetMotionMaster()->Clear(); + m_target->GetMotionMaster()->MoveIdle(); + } + m_target->setFaction(m_target->getFactionTemplateEntry()->faction); + m_target->SetChannelObjectGuid(ObjectGuid()); + m_target->SetUInt32Value(UNIT_CHANNEL_SPELL,0); + ((Creature*)m_target)->ForcedDespawn(100); + } + return; + } + case 46691: // Drake Hatchling Subdued + { + if (m_target->GetTypeId() != TYPEID_PLAYER) + return; + + if (apply) + { + if (Unit* caster = GetCaster()) + if (caster->GetTypeId() == TYPEID_UNIT) + { + int32 bp = 1; + // Rope Beam + caster->CastCustomSpell(m_target, 46674, &bp, NULL, NULL, true, NULL, NULL); + } + } + else + { + // Rope Beam + m_target->RemoveAurasDueToSpell(46674); + } + return; + } case 50720: // Vigilance (warrior spell but not have warrior family) { spellId1 = 68066; // Damage Reduction diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index eb05cee..8d08cc3 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1520,6 +1520,32 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx) unitTarget->SetHealth(0); return; } + case 46673: // Capture Trigger + { + if (!m_caster || !unitTarget || m_caster->GetTypeId() != TYPEID_PLAYER || unitTarget->GetTypeId() != TYPEID_UNIT) + return; + + //// Subdued + //unitTarget->CastSpell(unitTarget, 46675, true); + // Drake Vomit, Periodic + unitTarget->CastSpell(unitTarget, 46678, true); + // Drake Hatchling Subdued + unitTarget->CastSpell(m_caster, 46691, true); + // Subdued + unitTarget->CastSpell(unitTarget, 46675, true); + // allow script for the process of returning the NPC + break; + } + case 46702: // Drake Completion Ping + { + if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT) + return; + + // Raelorasz Fireball + unitTarget->CastSpell(unitTarget, 46704, false); + // allow script to process further (text) + break; + } case 46797: // Quest - Borean Tundra - Set Explosives Cart { if (!unitTarget) @@ -6504,6 +6530,17 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx) ((Player*)unitTarget)->ModifyMoney(50000000); break; } + case 46693: // Strip Auras + { + if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) + return; + + // Drake Hatchling Subdued + if (unitTarget->HasAura(46691)) + unitTarget->RemoveAura(46691, EFFECT_INDEX_0); + + return; + } case 47097: // Surge Needle Teleporter { if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)