all spell reports
This commit is contained in:
@@ -148,6 +148,8 @@ enum HunterSpells
|
||||
SPELL_HUNTER_HUNTMASTERS_CALL_COUNTER = 459731,
|
||||
SPELL_HUNTER_HUNTMASTERS_CALL_HATI = 459738,
|
||||
SPELL_HUNTER_HUNTMASTERS_CALL_FENRYR = 459735,
|
||||
SPELL_HUNTER_WILDSPEAKER = 1232739,
|
||||
SPELL_HUNTER_WILDSPEAKER_RAGE = 1235388,
|
||||
};
|
||||
|
||||
enum MiscSpells
|
||||
@@ -1070,13 +1072,31 @@ class spell_hun_dire_beast : public SpellScript
|
||||
{
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_HUNTER_BEAST_CLEAVE_BUFF, SPELL_HUNTER_DIRE_CLEAVE });
|
||||
return ValidateSpellInfo({ SPELL_HUNTER_BEAST_CLEAVE_BUFF, SPELL_HUNTER_DIRE_CLEAVE, SPELL_HUNTER_WILDSPEAKER_RAGE });
|
||||
}
|
||||
|
||||
void HandleAfterCast()
|
||||
{
|
||||
Player* player = GetCaster()->ToPlayer();
|
||||
if (!player || !player->HasAura(SPELL_HUNTER_DIRE_CLEAVE))
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
// 1232739 - Wildspeaker: Dire Beasts summoned during a Bestial Wrath benefit from the rage at a reduced duration
|
||||
int32 reducedRageDuration = 0;
|
||||
if (player->HasAura(SPELL_HUNTER_WILDSPEAKER))
|
||||
{
|
||||
if (Aura* bwRage = player->GetAura(SPELL_HUNTER_BESTIAL_WRATH))
|
||||
{
|
||||
int32 reducedPct = 15;
|
||||
if (AuraEffect const* reduced = player->GetAuraEffect(SPELL_HUNTER_WILDSPEAKER, EFFECT_1))
|
||||
reducedPct = reduced->GetAmount();
|
||||
|
||||
if (reducedPct > 0)
|
||||
reducedRageDuration = int32(int64(bwRage->GetDuration()) * reducedPct / 100);
|
||||
}
|
||||
}
|
||||
|
||||
if (!player->HasAura(SPELL_HUNTER_DIRE_CLEAVE))
|
||||
return;
|
||||
|
||||
Aura const* direCleave = player->GetAura(SPELL_HUNTER_DIRE_CLEAVE);
|
||||
@@ -1109,6 +1129,13 @@ class spell_hun_dire_beast : public SpellScript
|
||||
continue;
|
||||
|
||||
controlled->CastSpell(controlled, SPELL_HUNTER_BEAST_CLEAVE_BUFF, args);
|
||||
|
||||
if (reducedRageDuration > 0)
|
||||
{
|
||||
CastSpellExtraArgs reducedRageArgs(TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
|
||||
reducedRageArgs.AddSpellMod(SPELLVALUE_DURATION, reducedRageDuration);
|
||||
controlled->CastSpell(controlled, SPELL_HUNTER_WILDSPEAKER_RAGE, reducedRageArgs);
|
||||
}
|
||||
}
|
||||
|
||||
// 459730 - Huntmaster's Call: summoning a Dire Beast N times summons Hati or Fenryr
|
||||
@@ -1873,6 +1900,26 @@ class spell_hun_kill_command : public SpellScript
|
||||
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
|
||||
});
|
||||
}
|
||||
|
||||
// 1232739 - Wildspeaker: Dire Beasts obey your Kill Command, dealing its damage at $s1% effectiveness
|
||||
if (kcPlayer->HasAura(SPELL_HUNTER_WILDSPEAKER))
|
||||
{
|
||||
ObjectGuid kcPetGuid = kcPlayer->GetPet() ? kcPlayer->GetPet()->GetGUID() : ObjectGuid::Empty;
|
||||
ObjectGuid kcGuardianGuid = kcPlayer->GetGuardianPet() ? kcPlayer->GetGuardianPet()->GetGUID() : ObjectGuid::Empty;
|
||||
ObjectGuid kcAcGuid = kcPlayer->GetAnimalCompanion();
|
||||
|
||||
for (Unit* controlled : kcPlayer->m_Controlled)
|
||||
{
|
||||
if (!controlled || controlled->GetTypeId() != TYPEID_UNIT || !controlled->IsAlive())
|
||||
continue;
|
||||
if (controlled->GetOwner() != caster)
|
||||
continue;
|
||||
if (controlled->GetGUID() == kcPetGuid || controlled->GetGUID() == kcGuardianGuid || controlled->GetGUID() == kcAcGuid)
|
||||
continue;
|
||||
|
||||
controlled->CastSpell(target, SPELL_HUNTER_KILL_COMMAND_TRIGGER, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1920,6 +1967,16 @@ class spell_hun_kill_command_proc : public SpellScript
|
||||
dmg = caster->SpellDamageBonusDone(target, GetSpellInfo(), dmg, SPELL_DIRECT_DAMAGE, GetEffectInfo(EFFECT_0));
|
||||
dmg = target->SpellDamageBonusTaken(caster, GetSpellInfo(), dmg, SPELL_DIRECT_DAMAGE);
|
||||
|
||||
// 1232739 - Wildspeaker: Dire Beasts deal Kill Command damage at $s1% effectiveness
|
||||
if (Player* ownerPlayer = owner ? owner->ToPlayer() : nullptr)
|
||||
{
|
||||
if (AuraEffect const* wildspeaker = ownerPlayer->GetAuraEffect(SPELL_HUNTER_WILDSPEAKER, EFFECT_0))
|
||||
{
|
||||
if (caster->IsGuardian() && ownerPlayer->GetGuardianPet() != caster && caster->GetGUID() != ownerPlayer->GetAnimalCompanion())
|
||||
dmg = CalculatePct(dmg, wildspeaker->GetAmount());
|
||||
}
|
||||
}
|
||||
|
||||
SetHitDamage(dmg);
|
||||
}
|
||||
|
||||
@@ -2123,6 +2180,36 @@ class spell_hun_bestial_wrath : public SpellScript
|
||||
player->CastSpell(player, SPELL_HUNTER_BLOODY_FRENZY_HASTE, CastSpellExtraArgsInit{
|
||||
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
|
||||
});
|
||||
|
||||
// 1232739 - Wildspeaker: Bestial Wrath sends your Dire Beasts into a rage for the Bestial Wrath duration
|
||||
if (player->HasAura(SPELL_HUNTER_WILDSPEAKER))
|
||||
{
|
||||
int32 rageDuration = 0;
|
||||
if (Aura* bwAura = player->GetAura(SPELL_HUNTER_BESTIAL_WRATH))
|
||||
rageDuration = bwAura->GetDuration();
|
||||
|
||||
if (rageDuration > 0)
|
||||
{
|
||||
CastSpellExtraArgs rageArgs(TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
|
||||
rageArgs.AddSpellMod(SPELLVALUE_DURATION, rageDuration);
|
||||
|
||||
ObjectGuid bwPetGuid = player->GetPet() ? player->GetPet()->GetGUID() : ObjectGuid::Empty;
|
||||
ObjectGuid bwGuardianGuid = player->GetGuardianPet() ? player->GetGuardianPet()->GetGUID() : ObjectGuid::Empty;
|
||||
ObjectGuid bwAcGuid = player->GetAnimalCompanion();
|
||||
|
||||
for (Unit* controlled : player->m_Controlled)
|
||||
{
|
||||
if (!controlled || controlled->GetTypeId() != TYPEID_UNIT || !controlled->IsAlive())
|
||||
continue;
|
||||
if (controlled->GetOwner() != player)
|
||||
continue;
|
||||
if (controlled->GetGUID() == bwPetGuid || controlled->GetGUID() == bwGuardianGuid || controlled->GetGUID() == bwAcGuid)
|
||||
continue;
|
||||
|
||||
controlled->CastSpell(controlled, SPELL_HUNTER_WILDSPEAKER_RAGE, rageArgs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
Reference in New Issue
Block a user