TrinityCore
CastSpellExtraArgs Struct Reference

#include <SpellDefines.h>

Public Member Functions

 CastSpellExtraArgs ()
 
 CastSpellExtraArgs (bool triggered)
 
 CastSpellExtraArgs (TriggerCastFlags trigger)
 
 CastSpellExtraArgs (Item *item)
 
 CastSpellExtraArgs (Spell const *triggeringSpell)
 
 CastSpellExtraArgs (AuraEffect const *eff)
 
 CastSpellExtraArgs (Difficulty castDifficulty)
 
 CastSpellExtraArgs (SpellValueMod mod, int32 val)
 
 CastSpellExtraArgs (CastSpellExtraArgs const &other)
 
 CastSpellExtraArgs (CastSpellExtraArgs &&other) noexcept
 
CastSpellExtraArgsoperator= (CastSpellExtraArgs const &other)
 
CastSpellExtraArgsoperator= (CastSpellExtraArgs &&other) noexcept
 
 ~CastSpellExtraArgs ()
 
CastSpellExtraArgsSetTriggerFlags (TriggerCastFlags flag)
 
CastSpellExtraArgsSetCastItem (Item *item)
 
CastSpellExtraArgsSetTriggeringSpell (Spell const *triggeringSpell)
 
CastSpellExtraArgsSetTriggeringAura (AuraEffect const *triggeringAura)
 
CastSpellExtraArgsSetOriginalCaster (ObjectGuid const &guid)
 
CastSpellExtraArgsSetCastDifficulty (Difficulty castDifficulty)
 
CastSpellExtraArgsSetOriginalCastId (ObjectGuid const &castId)
 
CastSpellExtraArgsAddSpellMod (SpellValueMod mod, int32 val)
 
CastSpellExtraArgsAddSpellBP0 (int32 val)
 
CastSpellExtraArgsSetCustomArg (std::any customArg)
 

Public Attributes

TriggerCastFlags TriggerFlags = TRIGGERED_NONE
 
ItemCastItem = nullptr
 
Spell const * TriggeringSpell = nullptr
 
AuraEffect const * TriggeringAura = nullptr
 
ObjectGuid OriginalCaster = ObjectGuid::Empty
 
Difficulty CastDifficulty = Difficulty(0)
 
ObjectGuid OriginalCastId = ObjectGuid::Empty
 
Optional< int32OriginalCastItemLevel
 
struct {
   std::vector< std::pair< SpellValueMod, int32 > >   data
 
   struct   CastSpellExtraArgs
 
   class   WorldObject
 
SpellValueOverrides
 
std::any CustomArg
 

Detailed Description

Definition at line 448 of file SpellDefines.h.

Constructor & Destructor Documentation

◆ CastSpellExtraArgs() [1/10]

CastSpellExtraArgs::CastSpellExtraArgs ( )

◆ CastSpellExtraArgs() [2/10]

CastSpellExtraArgs::CastSpellExtraArgs ( bool  triggered)
inline

Definition at line 451 of file SpellDefines.h.

@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
Definition: SpellDefines.h:266
@ TRIGGERED_NONE
Not triggered.
Definition: SpellDefines.h:246
TriggerCastFlags TriggerFlags
Definition: SpellDefines.h:478

◆ CastSpellExtraArgs() [3/10]

CastSpellExtraArgs::CastSpellExtraArgs ( TriggerCastFlags  trigger)
inline

Definition at line 452 of file SpellDefines.h.

452: TriggerFlags(trigger) {}

◆ CastSpellExtraArgs() [4/10]

CastSpellExtraArgs::CastSpellExtraArgs ( Item item)
inline

Definition at line 453 of file SpellDefines.h.

◆ CastSpellExtraArgs() [5/10]

CastSpellExtraArgs::CastSpellExtraArgs ( Spell const *  triggeringSpell)
inline

Definition at line 454 of file SpellDefines.h.

CastSpellExtraArgs & SetTriggeringSpell(Spell const *triggeringSpell)
Definition: Spell.cpp:9396

◆ CastSpellExtraArgs() [6/10]

CastSpellExtraArgs::CastSpellExtraArgs ( AuraEffect const *  eff)
inline

Definition at line 455 of file SpellDefines.h.

CastSpellExtraArgs & SetTriggeringAura(AuraEffect const *triggeringAura)
Definition: Spell.cpp:9407

◆ CastSpellExtraArgs() [7/10]

CastSpellExtraArgs::CastSpellExtraArgs ( Difficulty  castDifficulty)
inline

Definition at line 456 of file SpellDefines.h.

456: CastDifficulty(castDifficulty) {}
Difficulty CastDifficulty
Definition: SpellDefines.h:483

◆ CastSpellExtraArgs() [8/10]

CastSpellExtraArgs::CastSpellExtraArgs ( SpellValueMod  mod,
int32  val 
)
inline

Definition at line 457 of file SpellDefines.h.

457{ SpellValueOverrides.AddMod(mod, val); }
struct CastSpellExtraArgs::@334 SpellValueOverrides

◆ CastSpellExtraArgs() [9/10]

CastSpellExtraArgs::CastSpellExtraArgs ( CastSpellExtraArgs const &  other)
default

◆ CastSpellExtraArgs() [10/10]

CastSpellExtraArgs::CastSpellExtraArgs ( CastSpellExtraArgs &&  other)
defaultnoexcept

◆ ~CastSpellExtraArgs()

CastSpellExtraArgs::~CastSpellExtraArgs ( )
default

Member Function Documentation

◆ AddSpellBP0()

CastSpellExtraArgs & CastSpellExtraArgs::AddSpellBP0 ( int32  val)
inline

Definition at line 475 of file SpellDefines.h.

475{ return AddSpellMod(SPELLVALUE_BASE_POINT0, val); } // because i don't want to type SPELLVALUE_BASE_POINT0 300 times
@ SPELLVALUE_BASE_POINT0
Definition: SpellDefines.h:196
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
Definition: SpellDefines.h:474
+ Here is the caller graph for this function:

◆ AddSpellMod()

CastSpellExtraArgs & CastSpellExtraArgs::AddSpellMod ( SpellValueMod  mod,
int32  val 
)
inline

Definition at line 474 of file SpellDefines.h.

474{ SpellValueOverrides.AddMod(mod, val); return *this; }
+ Here is the caller graph for this function:

◆ operator=() [1/2]

CastSpellExtraArgs & CastSpellExtraArgs::operator= ( CastSpellExtraArgs &&  other)
defaultnoexcept

◆ operator=() [2/2]

CastSpellExtraArgs & CastSpellExtraArgs::operator= ( CastSpellExtraArgs const &  other)
default

◆ SetCastDifficulty()

CastSpellExtraArgs & CastSpellExtraArgs::SetCastDifficulty ( Difficulty  castDifficulty)
inline

Definition at line 472 of file SpellDefines.h.

472{ CastDifficulty = castDifficulty; return *this; }
+ Here is the caller graph for this function:

◆ SetCastItem()

CastSpellExtraArgs & CastSpellExtraArgs::SetCastItem ( Item item)
inline

Definition at line 468 of file SpellDefines.h.

468{ CastItem = item; return *this; }
+ Here is the caller graph for this function:

◆ SetCustomArg()

CastSpellExtraArgs & CastSpellExtraArgs::SetCustomArg ( std::any  customArg)
inline

Definition at line 476 of file SpellDefines.h.

476{ CustomArg = std::move(customArg); return *this; }
+ Here is the caller graph for this function:

◆ SetOriginalCaster()

CastSpellExtraArgs & CastSpellExtraArgs::SetOriginalCaster ( ObjectGuid const &  guid)
inline

Definition at line 471 of file SpellDefines.h.

471{ OriginalCaster = guid; return *this; }
ObjectGuid OriginalCaster
Definition: SpellDefines.h:482
+ Here is the caller graph for this function:

◆ SetOriginalCastId()

CastSpellExtraArgs & CastSpellExtraArgs::SetOriginalCastId ( ObjectGuid const &  castId)
inline

Definition at line 473 of file SpellDefines.h.

473{ OriginalCastId = castId; return *this; }
ObjectGuid OriginalCastId
Definition: SpellDefines.h:484
+ Here is the caller graph for this function:

◆ SetTriggerFlags()

CastSpellExtraArgs & CastSpellExtraArgs::SetTriggerFlags ( TriggerCastFlags  flag)
inline

Definition at line 467 of file SpellDefines.h.

467{ TriggerFlags = flag; return *this; }
+ Here is the caller graph for this function:

◆ SetTriggeringAura()

CastSpellExtraArgs & CastSpellExtraArgs::SetTriggeringAura ( AuraEffect const *  triggeringAura)

Definition at line 9407 of file Spell.cpp.

9408{
9409 TriggeringAura = triggeringAura;
9410 if (triggeringAura)
9411 OriginalCastId = triggeringAura->GetBase()->GetCastId();
9412
9413 return *this;
9414}
AuraEffect const * TriggeringAura
Definition: SpellDefines.h:481
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetTriggeringSpell()

CastSpellExtraArgs & CastSpellExtraArgs::SetTriggeringSpell ( Spell const *  triggeringSpell)

Definition at line 9396 of file Spell.cpp.

9397{
9398 TriggeringSpell = triggeringSpell;
9399 if (triggeringSpell)
9400 {
9401 OriginalCastItemLevel = triggeringSpell->m_castItemLevel;
9402 OriginalCastId = triggeringSpell->m_castId;
9403 }
9404 return *this;
9405}
Optional< int32 > OriginalCastItemLevel
Definition: SpellDefines.h:485
Spell const * TriggeringSpell
Definition: SpellDefines.h:480
+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ CastSpellExtraArgs

CastSpellExtraArgs::CastSpellExtraArgs
friend

Definition at line 488 of file SpellDefines.h.

◆ WorldObject

friend class WorldObject
friend

Definition at line 489 of file SpellDefines.h.

Member Data Documentation

◆ CastDifficulty

Difficulty CastSpellExtraArgs::CastDifficulty = Difficulty(0)

Definition at line 483 of file SpellDefines.h.

◆ CastItem

Item* CastSpellExtraArgs::CastItem = nullptr

Definition at line 479 of file SpellDefines.h.

◆ CustomArg

std::any CastSpellExtraArgs::CustomArg

Definition at line 499 of file SpellDefines.h.

◆ data

std::vector<std::pair<SpellValueMod, int32> > CastSpellExtraArgs::data
private

Definition at line 497 of file SpellDefines.h.

◆ OriginalCaster

ObjectGuid CastSpellExtraArgs::OriginalCaster = ObjectGuid::Empty

Definition at line 482 of file SpellDefines.h.

◆ OriginalCastId

ObjectGuid CastSpellExtraArgs::OriginalCastId = ObjectGuid::Empty

Definition at line 484 of file SpellDefines.h.

◆ OriginalCastItemLevel

Optional<int32> CastSpellExtraArgs::OriginalCastItemLevel

Definition at line 485 of file SpellDefines.h.

◆ 

struct { ... } CastSpellExtraArgs::SpellValueOverrides

◆ TriggerFlags

TriggerCastFlags CastSpellExtraArgs::TriggerFlags = TRIGGERED_NONE

Definition at line 478 of file SpellDefines.h.

◆ TriggeringAura

AuraEffect const* CastSpellExtraArgs::TriggeringAura = nullptr

Definition at line 481 of file SpellDefines.h.

◆ TriggeringSpell

Spell const* CastSpellExtraArgs::TriggeringSpell = nullptr

Definition at line 480 of file SpellDefines.h.


The documentation for this struct was generated from the following files: