TrinityCore
Loading...
Searching...
No Matches
spell_warrior.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18/*
19 * Scripts for spells with SPELLFAMILY_WARRIOR and SPELLFAMILY_GENERIC spells used by warrior players.
20 * Ordered alphabetically using scriptname.
21 * Scriptnames of files in this file should be prefixed with "spell_warr_".
22 */
23
24#include "ScriptMgr.h"
25#include "ItemTemplate.h"
26#include "Optional.h"
27#include "Player.h"
28#include "Random.h"
29#include "SpellAuraEffects.h"
30#include "SpellHistory.h"
31#include "SpellMgr.h"
32#include "SpellScript.h"
33
35{
76};
77
82
91
92// 23881 - Bloodthirst
117
118// 23880 - Bloodthirst (Heal)
120{
122
123 bool Validate(SpellInfo const* /*spellInfo*/) override
124 {
126 }
127
128 void HandleHeal(SpellEffIndex /*effIndex*/)
129 {
130 SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(SPELL_WARRIOR_BLOODTHIRST_DAMAGE);
131 int32 const healPct = spellInfo->GetEffect(EFFECT_1).CalcValue(GetCaster());
132 SetEffectValue(GetCaster()->CountPctFromMaxHealth(healPct));
133 }
134
139};
140
141// -100 - Charge
168
169// 12809 - Concussion Blow
184
185// -58872 - Damage Shield
187{
189
190 bool Validate(SpellInfo const* /*spellInfo*/) override
191 {
193 }
194
195 void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
196 {
198
199 // % of amount blocked
200 int32 damage = CalculatePct(int32(eventInfo.GetActionTarget()->GetShieldBlockValue()), aurEff->GetAmount());
201 CastSpellExtraArgs args(aurEff);
202 args.AddSpellBP0(damage);
204 }
205
210};
211
212// -12162 - Deep Wounds
214{
216
227
228 void HandleDummy(SpellEffIndex /*effIndex*/)
229 {
230 int32 damage = GetEffectValue();
231 Unit* caster = GetCaster();
232 if (Unit* target = GetHitUnit())
233 {
234 ApplyPct(damage, 16 * GetSpellInfo()->GetRank());
235
236 SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(SPELL_WARRIOR_DEEP_WOUNDS_PERIODIC);
237
238 ASSERT(spellInfo->GetMaxTicks() > 0);
239 damage /= spellInfo->GetMaxTicks();
240
242 args.AddSpellBP0(damage);
243 caster->CastSpell(target, SPELL_WARRIOR_DEEP_WOUNDS_PERIODIC, args);
244 }
245 }
246
251};
252
253// -12834 - Deep Wounds Aura
255{
257
258 bool Validate(SpellInfo const* spellInfo) override
259 {
260 return ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_0).TriggerSpell });
261 }
262
263 bool CheckProc(ProcEventInfo& eventInfo)
264 {
265 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
266 if (!damageInfo)
267 return false;
268
269 return eventInfo.GetActor()->GetTypeId() == TYPEID_PLAYER;
270 }
271
272 void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
273 {
275
276 Unit* actor = eventInfo.GetActor();
277 float damage = 0.f;
278
279 if (eventInfo.GetDamageInfo()->GetAttackType() == OFF_ATTACK)
281 else
282 damage = (actor->GetFloatValue(UNIT_FIELD_MINDAMAGE) + actor->GetFloatValue(UNIT_FIELD_MAXDAMAGE)) / 2.f;
283
284 CastSpellExtraArgs args(aurEff);
285 args.AddSpellBP0(damage);
286 actor->CastSpell(eventInfo.GetActionTarget(), GetEffectInfo(EFFECT_0).TriggerSpell, args);
287 }
288
294};
295
296// -5308 - Execute
298{
300
301 bool Validate(SpellInfo const* /*spellInfo*/) override
302 {
304 }
305
306 void HandleEffect(SpellEffIndex /*effIndex*/)
307 {
308 Unit* caster = GetCaster();
309 if (Unit* target = GetHitUnit())
310 {
311 SpellInfo const* spellInfo = GetSpellInfo();
312 int32 rageUsed = std::min<int32>(300 - spellInfo->CalcPowerCost(caster, SpellSchoolMask(spellInfo->SchoolMask)), caster->GetPower(POWER_RAGE));
313 int32 newRage = std::max<int32>(0, caster->GetPower(POWER_RAGE) - rageUsed);
314
315 // Sudden Death rage save
317 {
318 int32 ragesave = aurEff->GetSpellInfo()->GetEffect(EFFECT_1).CalcValue() * 10;
319 newRage = std::max(newRage, ragesave);
320 }
321
322 caster->SetPower(POWER_RAGE, uint32(newRage));
323 // Glyph of Execution bonus
325 rageUsed += aurEff->GetAmount() * 10;
326
327 int32 bp = GetEffectValue() + int32(rageUsed * GetEffectInfo().ChainAmplitude + caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.2f);
328 CastSpellExtraArgs args(GetOriginalCaster()->GetGUID());
329 args.AddSpellBP0(bp);
330 caster->CastSpell(target, SPELL_WARRIOR_EXECUTE, args);
331 }
332 }
333
338};
339
340// -29723 - Sudden Death
341// -46913 - Bloodsurge
343{
345
356
357 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
358 {
359 Unit* target = GetTarget();
361 if (!bonusAurEff)
362 return;
363
364 if (!roll_chance_i(bonusAurEff->GetAmount()))
365 return;
366
367 target->CastSpell(nullptr, SPELL_WARRIOR_EXTRA_CHARGE, aurEff);
368
369 SpellInfo const* auraInfo = aurEff->GetSpellInfo();
370 if (auraInfo->IsRankOf(sSpellMgr->AssertSpellInfo(SPELL_WARRIOR_BLOODSURGE_R1)))
371 target->CastSpell(nullptr, SPELL_WARRIOR_SLAM_GCD_REDUCED, aurEff);
372 else if (auraInfo->IsRankOf(sSpellMgr->AssertSpellInfo(SPELL_WARRIOR_SUDDEN_DEATH_R1)))
373 target->CastSpell(nullptr, SPELL_WARRIOR_EXECUTE_GCD_REDUCED, aurEff);
374 }
375
380};
381
382// 58375 - Glyph of Blocking
384{
386
387 bool Validate(SpellInfo const* /*spellInfo*/) override
388 {
390 }
391
392 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
393 {
395 Unit* caster = eventInfo.GetActor();
396 caster->CastSpell(caster, SPELL_WARRIOR_GLYPH_OF_BLOCKING, aurEff);
397 }
398
403};
404
405// 58387 - Glyph of Sunder Armor
407{
409
410 void HandleEffectCalcSpellMod(AuraEffect const* aurEff, SpellModifier*& spellMod)
411 {
412 if (!spellMod)
413 {
414 spellMod = new SpellModifier(aurEff->GetBase());
415 spellMod->op = SpellModOp(aurEff->GetMiscValue());
416 spellMod->type = SPELLMOD_FLAT;
417 spellMod->spellId = GetId();
418 spellMod->mask = aurEff->GetSpellEffectInfo().SpellClassMask;
419 }
420
421 spellMod->value = aurEff->GetAmount();
422 }
423
428};
429
430// -59088 - Improved Spell Reflection
454
455// 3411 - Intervene
457{
459
460 bool Validate(SpellInfo const* /*spellInfo*/) override
461 {
463 }
464
465 void HandleThreat(SpellEffIndex /*effIndex*/)
466 {
467 Unit* target = GetHitUnit();
468 target->CastSpell(target, SPELL_WARRIOR_INTERVENE_THREAT, true);
469 }
470
475};
476
477// 5246 - Intimidating Shout
493
494// 70844 - Item - Warrior T10 Protection 4P Bonus
496{
498
499 bool Validate(SpellInfo const* /*spellInfo*/) override
500 {
502 }
503
504 void HandleProc(ProcEventInfo& eventInfo)
505 {
507
508 Unit* target = eventInfo.GetActionTarget();
509 int32 bp0 = CalculatePct(target->GetMaxHealth(), GetEffectInfo(EFFECT_1).CalcValue());
511 args.AddSpellBP0(bp0);
512 target->CastSpell(nullptr, SPELL_WARRIOR_STOICISM, args);
513 }
514
519};
520
521// 12975 - Last Stand
523{
525
526 bool Validate(SpellInfo const* /*spellInfo*/) override
527 {
529 }
530
531 void HandleDummy(SpellEffIndex /*effIndex*/)
532 {
533 Unit* caster = GetCaster();
536 caster->CastSpell(caster, SPELL_WARRIOR_LAST_STAND_TRIGGERED, args);
537 }
538
543};
544
545// 7384, 7887, 11584, 11585 - Overpower
547{
549
550 void HandleEffect(SpellEffIndex /*effIndex*/)
551 {
552 uint32 spellId = 0;
557
558 if (!spellId)
559 return;
560
561 if (Player* target = GetHitPlayer())
562 if (target->IsNonMeleeSpellCast(false, false, true)) // UNIT_STATE_CASTING should not be used here, it's present during a tick for instant casts
563 target->CastSpell(target, spellId, true);
564 }
565
570};
571
572// -772 - Rend
574{
576
577 void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& canBeRecalculated)
578 {
579 if (Unit* caster = GetCaster())
580 {
581 canBeRecalculated = false;
582
583 // $0.2 * (($MWB + $mwb) / 2 + $AP / 14 * $MWS) bonus per tick
584 float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
585 int32 mws = caster->GetAttackTime(BASE_ATTACK);
586 float mwbMin = 0.f;
587 float mwbMax = 0.f;
588 for (uint8 i = 0; i < MAX_ITEM_PROTO_DAMAGES; ++i)
589 {
590 mwbMin += caster->GetWeaponDamageRange(BASE_ATTACK, MINDAMAGE, i);
591 mwbMax += caster->GetWeaponDamageRange(BASE_ATTACK, MAXDAMAGE, i);
592 }
593
594 float mwb = ((mwbMin + mwbMax) / 2 + ap * mws / 14000) * 0.2f;
595 amount += int32(caster->ApplyEffectModifiers(GetSpellInfo(), aurEff->GetEffIndex(), mwb));
596
597 // "If used while your target is above 75% health, Rend does 35% more damage."
598 // as for 3.1.3 only ranks above 9 (wrong tooltip?)
599 if (GetSpellInfo()->GetRank() >= 9)
600 {
601 if (GetUnitOwner()->HasAuraState(AURA_STATE_HEALTH_ABOVE_75_PERCENT, GetSpellInfo(), caster))
602 AddPct(amount, GetEffectInfo(EFFECT_2).CalcValue(caster));
603 }
604 }
605 }
606
611};
612
613// 20230 - Retaliation
615{
617
618 bool Validate(SpellInfo const* /*spellInfo*/) override
619 {
621 }
622
623 bool CheckProc(ProcEventInfo& eventInfo)
624 {
625 // check attack comes not from behind and warrior is not stunned
626 return eventInfo.GetActionTarget()->isInFront(eventInfo.GetActor(), float(M_PI)) && !GetTarget()->HasUnitState(UNIT_STATE_STUNNED);
627 }
628
629 void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
630 {
632 eventInfo.GetActionTarget()->CastSpell(eventInfo.GetActor(), SPELL_WARRIOR_RETALIATION_DAMAGE, aurEff);
633 }
634
640};
641
642// -29834 - Second Wind
644{
646
647 bool Validate(SpellInfo const* /*spellInfo*/) override
648 {
649 return ValidateSpellInfo(
650 {
653 });
654 }
655
656 bool CheckProc(ProcEventInfo& eventInfo)
657 {
658 SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
659 if (!spellInfo)
660 return false;
661
662 return (spellInfo->GetAllEffectsMechanicMask() & ((1 << MECHANIC_ROOT) | (1 << MECHANIC_STUN))) != 0;
663 }
664
665 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
666 {
668
670 Unit* caster = eventInfo.GetActionTarget();
671 uint32 spellId = triggeredSpells[GetSpellInfo()->GetRank() - 1];
672 caster->CastSpell(caster, spellId, aurEff);
673 }
674
680};
681
682// 64380, 65941 - Shattering Throw
684{
686
688 {
689 PreventHitDefaultEffect(effIndex);
690
691 // remove shields, will still display immune to damage part
692 if (Unit* target = GetHitUnit())
693 target->RemoveAurasWithMechanic(1 << MECHANIC_IMMUNE_SHIELD, AURA_REMOVE_BY_ENEMY_SPELL);
694 }
695
700};
701
702// -1464 - Slam
704{
706
707 bool Validate(SpellInfo const* /*spellInfo*/) override
708 {
710 }
711
712 void HandleDummy(SpellEffIndex /*effIndex*/)
713 {
714 if (!GetHitUnit())
715 return;
719 }
720
725};
726
727// 12328, 18765, 35429 - Sweeping Strikes
729{
731
736
737 bool CheckProc(ProcEventInfo& eventInfo)
738 {
739 _procTarget = eventInfo.GetActor()->SelectNearbyTarget(eventInfo.GetActionTarget());
740 return _procTarget != nullptr;
741 }
742
743 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
744 {
746 if (DamageInfo* damageInfo = eventInfo.GetDamageInfo())
747 {
748 SpellInfo const* spellInfo = damageInfo->GetSpellInfo();
750 {
751 // If triggered by Execute (while target is not under 20% hp) or Bladestorm deals normalized weapon damage
753 }
754 else
755 {
756 CastSpellExtraArgs args(aurEff);
757 args.AddSpellBP0(damageInfo->GetDamage());
759 }
760 }
761 }
762
768
769 Unit* _procTarget = nullptr;
770};
771
772// -46951 - Sword and Board
774{
776
777 void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
778 {
779 // Remove cooldown on Shield Slam
780 GetTarget()->GetSpellHistory()->ResetCooldowns([](SpellHistory::CooldownStorageType::iterator itr) -> bool
781 {
782 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
783 return spellInfo && spellInfo->GetCategory() == SPELL_CATEGORY_SHIELD_SLAM;
784 }, true);
785 }
786
791};
792
793// 28845 - Cheat Death
795{
797
798 bool CheckProc(ProcEventInfo& eventInfo)
799 {
800 if (eventInfo.GetActionTarget()->HealthBelowPct(20))
801 return true;
802
803 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
804 if (damageInfo && damageInfo->GetDamage())
805 if (GetTarget()->HealthBelowPctDamaged(20, damageInfo->GetDamage()))
806 return true;
807
808 return false;
809 }
810
815};
816
817// 50720 - Vigilance
819{
821
832
833 void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
834 {
835 Unit* target = GetTarget();
836 target->CastSpell(target, SPELL_GEN_DAMAGE_REDUCTION_AURA, true);
837
838 if (Unit* caster = GetCaster())
840 }
841
855
856 bool CheckProc(ProcEventInfo& /*eventInfo*/)
857 {
859 return _procTarget != nullptr;
860 }
861
862 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
863 {
866 }
867
875
876 Unit* _procTarget = nullptr;
877};
878
879// 59665 - Vigilance (Redirect Threat)
896
897// 50725 - Vigilance (Reset Taunt Cooldown)
899{
901
903 {
904 PreventHitDefaultEffect(effIndex);
905
906 // Remove Taunt cooldown
907 if (Player* target = GetHitPlayer())
908 target->GetSpellHistory()->ResetCooldown(SPELL_WARRIOR_TAUNT, true);
909 }
910
915};
916
917// 21977 - Warrior's Wrath
937
939{
969}
#define M_PI
Definition Common.h:72
uint8_t uint8
Definition Define.h:135
int32_t int32
Definition Define.h:129
uint32_t uint32
Definition Define.h:133
#define ASSERT
Definition Errors.h:68
#define MAX_ITEM_PROTO_DAMAGES
@ TYPEID_PLAYER
Definition ObjectGuid.h:39
@ SPELLMOD_FLAT
Definition Player.h:122
bool roll_chance_i(int chance)
Definition Random.h:59
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ EFFECT_2
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_HEAL
@ SPELL_EFFECT_REDIRECT_THREAT
@ SPELL_EFFECT_CHARGE
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ TARGET_UNIT_SRC_AREA_ENEMY
SpellSchoolMask
@ OFF_ATTACK
@ BASE_ATTACK
@ MECHANIC_STUN
@ MECHANIC_ROOT
@ MECHANIC_IMMUNE_SHIELD
@ SPELLFAMILY_GENERIC
@ POWER_RAGE
@ AURA_STATE_HEALTH_ABOVE_75_PERCENT
@ AURA_STATE_HEALTHLESS_20_PERCENT
@ AURA_REMOVE_BY_ENEMY_SPELL
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS
@ SPELL_AURA_DUMMY
SpellModOp
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
@ SPELLVALUE_MAX_TARGETS
#define sSpellMgr
Definition SpellMgr.h:738
#define AuraProcFn(F)
#define AuraEffectProcFn(F, I, N)
#define SpellEffectFn(F, I, N)
#define AuraEffectCalcAmountFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define SPELL_EFFECT_ANY
Definition SpellScript.h:52
#define AuraEffectApplyFn(F, I, N, M)
#define AuraCheckProcFn(F)
#define AuraEffectCalcSpellModFn(F, I, N)
#define AuraEffectRemoveFn(F, I, N, M)
@ MINDAMAGE
Definition Unit.h:152
@ MAXDAMAGE
Definition Unit.h:153
@ UNIT_STATE_STUNNED
Definition Unit.h:223
@ UNIT_FIELD_MINDAMAGE
@ UNIT_FIELD_MAXDAMAGE
@ UNIT_FIELD_MAXOFFHANDDAMAGE
@ UNIT_FIELD_MINOFFHANDDAMAGE
T AddPct(T &base, U pct)
Definition Util.h:77
T ApplyPct(T &base, U pct)
Definition Util.h:83
T CalculatePct(T base, U pct)
Definition Util.h:71
SpellInfo const * GetSpellInfo() const
SpellEffIndex GetEffIndex() const
SpellEffectInfo const & GetSpellEffectInfo() const
int32 GetMiscValue() const
Aura * GetBase() const
int32 GetAmount() const
void PreventDefaultAction()
SpellInfo const * GetSpellInfo() const
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
Unit * GetCaster() const
HookList< EffectCalcSpellModHandler > DoEffectCalcSpellMod
SpellEffectInfo const & GetEffectInfo(SpellEffIndex effIndex) const
Unit * GetTarget() const
ObjectGuid GetCasterGUID() const
HookList< CheckProcHandler > DoCheckProc
HookList< EffectApplyHandler > OnEffectRemove
HookList< EffectProcHandler > OnEffectProc
Unit * GetUnitOwner() const
HookList< AuraProcHandler > OnProc
HookList< EffectApplyHandler > OnEffectApply
uint32 GetId() const
WeaponAttackType GetAttackType() const
Definition Unit.h:463
uint32 GetDamage() const
Definition Unit.h:464
TypeID GetTypeId() const
Definition Object.h:93
float GetFloatValue(uint16 index) const
Definition Object.cpp:261
Unit * GetActionTarget() const
Definition Unit.h:509
SpellInfo const * GetSpellInfo() const
Definition Unit.cpp:268
Unit * GetActor()
Definition Unit.h:508
DamageInfo * GetDamageInfo() const
Definition Unit.h:519
flag96 SpellClassMask
Definition SpellInfo.h:229
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr) const
void ResetCooldowns(Predicate predicate, bool update=false)
bool IsRankOf(SpellInfo const *spellInfo) const
uint32 GetMaxTicks() const
uint32 GetCategory() const
uint32 Id
Definition SpellInfo.h:289
uint8 GetRank() const
uint32 SchoolMask
Definition SpellInfo.h:361
int32 CalcPowerCost(WorldObject const *caster, SpellSchoolMask schoolMask, Spell *spell=nullptr) const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:483
uint32 GetAllEffectsMechanicMask() const
Player * GetHitPlayer() const
void SetEffectValue(int32 value)
Unit * GetCaster() const
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
int32 GetEffectValue() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
WorldObject * GetExplTargetWorldObject() const
HookList< EffectHandler > OnEffectLaunchTarget
SpellInfo const * GetSpellInfo() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Unit * GetOriginalCaster() const
void UnregisterRedirectThreat(uint32 spellId)
Definition Unit.h:769
ThreatManager & GetThreatManager()
Definition Unit.h:1155
Unit * SelectNearbyTarget(Unit *exclude=nullptr, float dist=NOMINAL_MELEE_RANGE) const
Definition Unit.cpp:10591
uint32 GetMaxHealth() const
Definition Unit.h:914
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
Definition Unit.cpp:4359
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:4535
bool HealthBelowPct(int32 pct) const
Definition Unit.h:917
void SetPower(Powers power, uint32 val, bool withPowerUpdate=true, bool force=false)
Definition Unit.cpp:9421
bool HasAuraState(AuraStateType flag, SpellInfo const *spellProto=nullptr, Unit const *Caster=nullptr) const
Definition Unit.cpp:5815
virtual uint32 GetShieldBlockValue() const =0
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3784
bool HasUnitState(const uint32 f) const
Definition Unit.h:876
uint32 CountPctFromMaxHealth(int32 pct) const
Definition Unit.h:922
SpellHistory * GetSpellHistory()
Definition Unit.h:1484
uint32 GetPower(Powers power) const
Definition Unit.h:934
float GetTotalAttackPowerValue(WeaponAttackType attType) const
Definition Unit.cpp:9312
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
bool isInFront(WorldObject const *target, float arc=float(M_PI)) const
Definition Object.cpp:1366
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
void HandleHeal(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_warr_bloodthirst_heal)
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_warr_bloodthirst)
void HandleDamage(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
void Register() override
PrepareSpellScript(spell_warr_charge)
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_warr_concussion_blow)
PrepareAuraScript(spell_warr_damage_shield)
void OnProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_warr_deep_wounds_aura)
void OnProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *spellInfo) override
bool CheckProc(ProcEventInfo &eventInfo)
PrepareSpellScript(spell_warr_deep_wounds)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_warr_execute)
void Register() override
bool Validate(SpellInfo const *) override
void HandleEffect(SpellEffIndex)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &)
PrepareAuraScript(spell_warr_extra_proc)
bool Validate(SpellInfo const *) override
void Register() override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_warr_glyph_of_blocking)
void HandleEffectCalcSpellMod(AuraEffect const *aurEff, SpellModifier *&spellMod)
PrepareAuraScript(spell_warr_glyph_of_sunder_armor)
PrepareAuraScript(spell_warr_improved_spell_reflection)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
void HandleThreat(SpellEffIndex)
bool Validate(SpellInfo const *) override
void Register() override
PrepareSpellScript(spell_warr_intervene)
PrepareSpellScript(spell_warr_intimidating_shout)
void FilterTargets(std::list< WorldObject * > &unitList)
void HandleProc(ProcEventInfo &eventInfo)
PrepareAuraScript(spell_warr_item_t10_prot_4p_bonus)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_warr_last_stand)
void Register() override
bool Validate(SpellInfo const *) override
void Register() override
PrepareSpellScript(spell_warr_overpower)
void HandleEffect(SpellEffIndex)
PrepareAuraScript(spell_warr_rend)
void CalculateAmount(AuraEffect const *aurEff, int32 &amount, bool &canBeRecalculated)
void Register() override
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_warr_retaliation)
void HandleEffectProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool CheckProc(ProcEventInfo &eventInfo)
PrepareAuraScript(spell_warr_second_wind)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_warr_shattering_throw)
void HandleScript(SpellEffIndex effIndex)
PrepareSpellScript(spell_warr_slam)
void Register() override
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool CheckProc(ProcEventInfo &eventInfo)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_warr_sweeping_strikes)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_warr_sword_and_board)
void HandleProc(AuraEffect const *, ProcEventInfo &)
PrepareAuraScript(spell_warr_t3_prot_8p_bonus)
bool CheckProc(ProcEventInfo &eventInfo)
PrepareSpellScript(spell_warr_vigilance_redirect_threat)
PrepareSpellScript(spell_warr_vigilance_trigger)
void HandleScript(SpellEffIndex effIndex)
bool Validate(SpellInfo const *) override
void HandleRemove(AuraEffect const *, AuraEffectHandleModes)
void Register() override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &)
void HandleApply(AuraEffect const *, AuraEffectHandleModes)
bool CheckProc(ProcEventInfo &)
PrepareAuraScript(spell_warr_vigilance)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_warr_warriors_wrath)
@ SPELL_PALADIN_BLESSING_OF_SANCTUARY
@ SPELL_CATEGORY_SHIELD_SLAM
@ SPELL_PALADIN_GREATER_BLESSING_OF_SANCTUARY
@ SPELL_PRIEST_RENEWED_HOPE
@ SPELL_GEN_DAMAGE_REDUCTION_AURA
@ SPELL_WARRIOR_DEEP_WOUNDS_RANK_1
@ SPELL_WARRIOR_RETALIATION_DAMAGE
@ SPELL_WARRIOR_SLAM_GCD_REDUCED
@ SPELL_WARRIOR_WARRIORS_WRATH
@ SPELL_WARRIOR_BLOODTHIRST
@ SPELL_WARRIOR_UNRELENTING_ASSAULT_TRIGGER_1
@ SPELL_WARRIOR_GLYPH_OF_EXECUTION
@ SPELL_WARRIOR_VIGILANCE_REDIRECT_THREAT
@ SPELL_WARRIOR_SWEEPING_STRIKES_EXTRA_ATTACK_1
@ SPELL_WARRIOR_SECOND_WIND_TRIGGER_1
@ SPELL_WARRIOR_DEEP_WOUNDS_RANK_2
@ SPELL_WARRIOR_TAUNT
@ SPELL_WARRIOR_VIGILANCE_PROC
@ SPELL_WARRIOR_DEEP_WOUNDS_RANK_3
@ SPELL_WARRIOR_UNRELENTING_ASSAULT_RANK_1
@ SPELL_WARRIOR_DAMAGE_SHIELD_DAMAGE
@ SPELL_WARRIOR_SUDDEN_DEATH_R1
@ SPELL_WARRIOR_SECOND_WIND_TRIGGER_2
@ SPELL_WARRIOR_BLOODSURGE_R1
@ SPELL_WARRIOR_LAST_STAND_TRIGGERED
@ SPELL_WARRIOR_CHARGE
@ SPELL_WARRIOR_GLYPH_OF_BLOCKING
@ SPELL_WARRIOR_EXTRA_CHARGE
@ SPELL_WARRIOR_DEEP_WOUNDS_PERIODIC
@ SPELL_WARRIOR_STOICISM
@ SPELL_WARRIOR_JUGGERNAUT_CRIT_BONUS_TALENT
@ SPELL_WARRIOR_IMPROVED_SPELL_REFLECTION_TRIGGER
@ SPELL_WARRIOR_EXECUTE
@ SPELL_WARRIOR_GLYPH_OF_VIGILANCE
@ SPELL_WARRIOR_UNRELENTING_ASSAULT_TRIGGER_2
@ SPELL_WARRIOR_BLOODTHIRST_DAMAGE
@ SPELL_WARRIOR_EXECUTE_GCD_REDUCED
@ SPELL_WARRIOR_UNRELENTING_ASSAULT_RANK_2
@ SPELL_WARRIOR_SLAM
@ SPELL_WARRIOR_INTERVENE_THREAT
@ SPELL_WARRIOR_BLADESTORM_PERIODIC_WHIRLWIND
@ SPELL_WARRIOR_SUNDER_ARMOR
@ SPELL_WARRIOR_T10_MELEE_4P_BONUS
@ SPELL_WARRIOR_SWEEPING_STRIKES_EXTRA_ATTACK_2
@ SPELL_WARRIOR_JUGGERNAUT_CRIT_BONUS_BUFF
void AddSC_warrior_spell_scripts()
WarriorSpellIcons
@ WARRIOR_ICON_ID_SUDDEN_DEATH
CastSpellExtraArgs & AddSpellBP0(int32 val)
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
SpellModOp op
Definition Player.h:168
SpellModType type
Definition Player.h:169
int32 value
Definition Player.h:171
uint32 spellId
Definition Player.h:173
flag96 mask
Definition Player.h:172
MiscSpells