56 {
"cast", castCommandTable },
168 target->
CastSpell(target, spell->
Id, *triggerFlags);
@ LANG_SELECTED_TARGET_NOT_HAVE_VICTIM
@ LANG_COMMAND_NOSPELLFOUND
@ LANG_SELECT_CHAR_OR_CREATURE
@ LANG_COMMAND_SPELL_BROKEN
std::optional< T > Optional
Optional helper class to wrap optional values within.
Role Based Access Control related classes definition.
@ TRIGGERED_NONE
Not triggered.
@ TRIGGERED_FULL_DEBUG_MASK
bool StringStartsWith(std::string_view haystack, std::string_view needle)
WorldSession * GetSession()
void PSendSysMessage(const char *fmt, Args &&... args)
Creature * getSelectedCreature()
void SetSentErrorMessage(bool val)
virtual void SendSysMessage(std::string_view str, bool escapeCharacters=false)
static bool IsSpellValid(SpellInfo const *spellInfo, Player *player=nullptr, bool msg=true)
Some checks for spells, to prevent adding deprecated/broken spells for trainers, spell book,...
void GetClosePoint(float &x, float &y, float &z, float size, float distance2d=0, float relAngle=0) const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Player * GetPlayer() const
static bool CheckSpellExistsAndIsValid(ChatHandler *handler, SpellInfo const *spell)
static bool HandleCastDestCommand(ChatHandler *handler, SpellInfo const *spell, float x, float y, float z, Optional< std::string > triggeredStr)
static Optional< TriggerCastFlags > GetTriggerFlags(Optional< std::string > triggeredStr)
static bool HandleCastSelfCommand(ChatHandler *handler, SpellInfo const *spell, Optional< std::string > triggeredStr)
static bool HandleCastBackCommand(ChatHandler *handler, SpellInfo const *spell, Optional< std::string > triggeredStr)
static bool HandleCastTargetCommad(ChatHandler *handler, SpellInfo const *spell, Optional< std::string > triggeredStr)
static bool HandleCastDistCommand(ChatHandler *handler, SpellInfo const *spell, float dist, Optional< std::string > triggeredStr)
ChatCommandTable GetCommands() const override
static bool HandleCastCommand(ChatHandler *handler, SpellInfo const *spell, Optional< std::string > triggeredStr)
void AddSC_cast_commandscript()
std::vector< ChatCommandBuilder > ChatCommandTable
@ RBAC_PERM_COMMAND_CAST_SELF
@ RBAC_PERM_COMMAND_CAST_DEST
@ RBAC_PERM_COMMAND_CAST_TARGET
@ RBAC_PERM_COMMAND_CAST_BACK
@ RBAC_PERM_COMMAND_CAST_DIST