2025 {
2026 bool failed =
RAND(0, 1);
2029 {
2030 if (failed)
2031 {
2033 creature->
AI()->
Talk(0, player);
2034 }
2035 else
2037 }
2038 }
@ SPELL_BEAR_FLANK_FAIL
Definition: spell_quest.cpp:2007
@ SPELL_CREATE_BEAR_FLANK
Definition: spell_quest.cpp:2006
static First const & RAND(First const &first, Second const &second, Rest const &... rest)
Definition: CreatureAIImpl.h:25
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
Definition: CreatureAI.cpp:50
Definition: Creature.h:43
CreatureAI * AI() const
Definition: Creature.h:140
Creature * ToCreature()
Definition: Object.h:205
Definition: Player.h:1081
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1167
Player * GetHitPlayer()
Definition: SpellScript.cpp:471
Unit * GetCaster()
Definition: SpellScript.cpp:401