41 if (!creatureTarget->IsPet() && creatureTarget->GetEntry() ==
_originalEntry)
45 creatureTarget->AI()->AttackStart(
GetCaster());
151 caster->
CastSpell(caster, spellId,
true, NULL);
212 creatureTarget->UpdateEntry(uiNewEntry);
418 caster->
CastSpell(caster, spellId,
true);
480 switch (target->GetEntry())
490 caster->
CastSpell(caster, spellId,
true, castItem);
492 target->DespawnOrUnsummon();
536 switch (creatureTarget->GetEntry())
543 creatureTarget->UpdateEntry(uiNewEntry);
588 switch (std::rand() % 3)
630 caster->
CastSpell(caster, spellId,
true, NULL);
743 target->DespawnOrUnsummon();
828 target->SetHealth(target->GetMaxHealth() / 2);
872 target->DespawnOrUnsummon();
919 target->DespawnOrUnsummon(60000);
963 target->DespawnOrUnsummon(2000);
1104#define SAY_1 "Sons of Hodir! I humbly present to you..."
1105#define SAY_2 "The Helm of Hodir!"
1126 target->MonsterWhisper(
SAY_1, target,
true);
1128 target->MonsterWhisper(
SAY_2, target,
true);
1172 switch (unitTarget->GetEntry())
1338 if (
Vehicle* vehicle = caster->GetVehicleKit())
1339 if (
Unit* passenger = vehicle->GetPassenger(0))
1497 std::list<Player*> playerList;
1501 for (std::list<Player*>::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr)
1579 basilisk->DespawnOrUnsummon();
1608 Position offset = { 0.0f, 0.0f, 20.0f, 0.0f };
1725 Position offset = { 0.0f, 0.0f, 20.0f, 0.0f };
1756 Position offset = { 0.0f, 0.0f, 2.5f, 0.0f };
1805 bool failed =
RAND(0, 1);
1812 creature->
AI()->
Talk(0, player);
1926 if ((count % 20) == 0)
2004 float angle = ((std::rand() % 1) ? -1 : 1) * (
frand(0.75f, 1.0f) *
M_PI);
2213 passenger->ExitVehicle();
2259 injuredStormwindInfantry->SetCreatorGUID(caster->
GetGUID());
2260 injuredStormwindInfantry->CastSpell(injuredStormwindInfantry,
SPELL_RENEWED_LIFE,
true);
const T & RAND(const T &v1, const T &v2)
@ QUEST_STATUS_INCOMPLETE
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_KNOCK_BACK
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
@ SPELL_AURA_PERIODIC_HEAL
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK
@ AURA_EFFECT_HANDLE_REAL
#define SpellCheckCastFn(F)
#define SpellEffectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
@ TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE
Will ignore caster aura states including combat requirements and death state.
@ OBJECT_FIELD_DYNAMIC_FLAGS
float frand(float min, float max)
bool roll_chance_i(int chance)
@ SPELL_PERMANENT_FEIGN_DEATH
uint32 GetEffIndex() const
void PreventDefaultAction()
HookList< EffectPeriodicHandler > OnEffectPeriodic
SpellInfo const * GetSpellInfo() const
HookList< EffectApplyHandler > AfterEffectApply
HookList< EffectApplyHandler > OnEffectRemove
HookList< EffectApplyHandler > OnEffectApply
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
void DespawnOrUnsummon(uint32 msTimeToDespawn=0)
void SetFlag(uint16 index, uint32 newFlag)
void RemoveFlag(uint16 index, uint32 oldFlag)
bool AddItem(uint32 itemId, uint32 count)
void KilledMonsterCredit(uint32 entry, uint64 guid=0)
float CalcRadius(Unit *caster=NULL, Spell *=NULL) const
int32 CalcValue(Unit const *caster=NULL, int32 const *basePoints=NULL, Unit const *target=NULL) const
SpellEffectInfo Effects[MAX_SPELL_EFFECTS]
Creature * GetHitCreature()
Unit * GetExplTargetUnit()
HookList< CheckCastHandler > OnCheckCast
WorldLocation const * GetExplTargetDest()
void SetExplTargetDest(WorldLocation &loc)
SpellInfo const * GetSpellInfo()
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
HookList< EffectHandler > OnEffectHitTarget
HookList< CastHandler > OnCast
WorldLocation * GetHitDest()
Unit * GetOriginalCaster()
SpellScriptLoader(const char *name)
bool HasAuraEffect(uint32 spellId, uint8 effIndex, uint64 caster=0) const
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
void RemoveAurasDueToSpell(uint32 spellId, uint64 casterGUID=0, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
void SetHealth(uint32 val)
bool HasAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
void AddUnitState(uint32 f)
bool HasAuraType(AuraType auraType) const
void CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
uint32 CountPctFromMaxHealth(int32 pct) const
Vehicle * GetVehicleKit() const
Unit * GetPassenger(int8 seatId) const
Gets a passenger on specified seat.
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
void VisitNearbyWorldObject(float const &radius, NOTIFIER ¬ifier) const
void GetNearPosition(Position &pos, float dist, float angle)
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TempSummonType::TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
PrepareSpellScript(spell_generic_quest_update_entry_SpellScript)
void HandleDummy(SpellEffIndex)
spell_generic_quest_update_entry_SpellScript(uint16 spellEffect, uint8 effIndex, uint32 originalEntry, uint32 newEntry, bool shouldAttack, uint32 despawnTime=0)
bool Validate(SpellInfo const *) OVERRIDE
PrepareSpellScript(spell_q10041_q10040_who_are_they_SpellScript)
void HandleScript(SpellEffIndex effIndex)
spell_q10041_q10040_who_are_they()
SpellScript * GetSpellScript() const OVERRIDE
spell_q10255_administer_antidote()
SpellScript * GetSpellScript() const OVERRIDE
PrepareAuraScript(spell_q11010_q11102_q11023_aggro_burst_AuraScript)
void HandleEffectPeriodic(AuraEffect const *)
spell_q11010_q11102_q11023_aggro_burst()
AuraScript * GetAuraScript() const OVERRIDE
PrepareSpellScript(spell_q11010_q11102_q11023_aggro_check_SpellScript)
void HandleDummy(SpellEffIndex)
PrepareAuraScript(spell_q11010_q11102_q11023_aggro_check_aura_AuraScript)
void HandleTriggerSpell(AuraEffect const *)
AuraScript * GetAuraScript() const OVERRIDE
spell_q11010_q11102_q11023_aggro_check_aura()
SpellScript * GetSpellScript() const OVERRIDE
spell_q11010_q11102_q11023_aggro_check()
PrepareSpellScript(spell_q11010_q11102_q11023_choose_loc_SpellScript)
void HandleDummy(SpellEffIndex)
SpellScript * GetSpellScript() const OVERRIDE
spell_q11010_q11102_q11023_choose_loc()
PrepareSpellScript(spell_q11010_q11102_q11023_q11008_check_fly_mount_SpellScript)
SpellCastResult CheckRequirement()
spell_q11010_q11102_q11023_q11008_check_fly_mount()
SpellScript * GetSpellScript() const OVERRIDE
PrepareAuraScript(spell_q11396_11399_force_shield_arcane_purple_x3_AuraScript)
void HandleEffectRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
AuraScript * GetAuraScript() const OVERRIDE
spell_q11396_11399_force_shield_arcane_purple_x3()
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_q11396_11399_scourging_crystal_controller_SpellScript)
bool Validate(SpellInfo const *) OVERRIDE
bool Validate(SpellInfo const *) OVERRIDE
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_q11396_11399_scourging_crystal_controller_dummy_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
spell_q11396_11399_scourging_crystal_controller_dummy()
spell_q11396_11399_scourging_crystal_controller()
SpellScript * GetSpellScript() const OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
spell_q11515_fel_siphon_dummy()
bool Validate(SpellInfo const *) OVERRIDE
PrepareSpellScript(spell_q11587_arcane_prisoner_rescue_SpellScript)
void HandleDummy(SpellEffIndex)
SpellScript * GetSpellScript() const OVERRIDE
spell_q11587_arcane_prisoner_rescue()
bool Validate(SpellInfo const *) OVERRIDE
PrepareSpellScript(spell_q11730_ultrasonic_screwdriver_SpellScript)
void HandleDummy(SpellEffIndex)
SpellScript * GetSpellScript() const OVERRIDE
spell_q11730_ultrasonic_screwdriver()
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_q12066_bunny_kill_credit_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
spell_q12066_bunny_kill_credit()
PrepareSpellScript(spell_q12277_wintergarde_mine_explosion_SpellScript)
void HandleDummy(SpellEffIndex)
spell_q12277_wintergarde_mine_explosion()
SpellScript * GetSpellScript() const OVERRIDE
bool Validate(SpellInfo const *) OVERRIDE
PrepareSpellScript(spell_q12308_escape_from_silverbrook_SpellScript)
void HandleDummy(SpellEffIndex)
void ModDest(SpellEffIndex effIndex)
PrepareSpellScript(spell_q12308_escape_from_silverbrook_summon_worgen_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
spell_q12308_escape_from_silverbrook_summon_worgen()
SpellScript * GetSpellScript() const OVERRIDE
spell_q12308_escape_from_silverbrook()
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_q12372_azure_on_death_force_whisper_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
spell_q12372_azure_on_death_force_whisper()
PrepareSpellScript(spell_q12372_cast_from_gossip_trigger_SpellScript)
void HandleScript(SpellEffIndex)
spell_q12372_cast_from_gossip_trigger()
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_q12372_destabilize_azure_dragonshrine_dummy_SpellScript)
void HandleDummy(SpellEffIndex)
spell_q12372_destabilize_azure_dragonshrine_dummy()
SpellScript * GetSpellScript() const OVERRIDE
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_q12459_seeds_of_natures_wrath_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
spell_q12459_seeds_of_natures_wrath()
bool Validate(SpellInfo const *) OVERRIDE
PrepareSpellScript(spell_q12527_zuldrak_rat_SpellScript)
void HandleScriptEffect(SpellEffIndex)
spell_q12527_zuldrak_rat()
SpellScript * GetSpellScript() const OVERRIDE
PrepareAuraScript(spell_q12619_emblazon_runeblade_AuraScript)
void HandleEffectPeriodic(AuraEffect const *aurEff)
PrepareSpellScript(spell_q12619_emblazon_runeblade_effect_SpellScript)
void HandleScript(SpellEffIndex)
SpellScript * GetSpellScript() const OVERRIDE
spell_q12619_emblazon_runeblade_effect()
spell_q12619_emblazon_runeblade()
AuraScript * GetAuraScript() const OVERRIDE
PrepareSpellScript(spell_q12634_despawn_fruit_tosser_SpellScript)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
spell_q12634_despawn_fruit_tosser()
PrepareSpellScript(spell_q12641_death_comes_from_on_high_SpellScript)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
spell_q12641_death_comes_from_on_high()
PrepareSpellScript(spell_q12659_ahunaes_knife_SpellScript)
void HandleDummy(SpellEffIndex)
spell_q12659_ahunaes_knife()
SpellScript * GetSpellScript() const OVERRIDE
void ChangeSummonPos(SpellEffIndex)
PrepareSpellScript(spell_q12661_q12669_q12676_q12677_q12713_summon_stefan_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
spell_q12661_q12669_q12676_q12677_q12713_summon_stefan()
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_q12683_take_sputum_sample_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
spell_q12683_take_sputum_sample()
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) OVERRIDE
PrepareSpellScript(spell_q12690_burst_at_the_seams_SpellScript)
void HandleKnockBack(SpellEffIndex)
spell_q12690_burst_at_the_seams()
SpellScript * GetSpellScript() const OVERRIDE
bool Validate(SpellInfo const *) OVERRIDE
void HandleEffectPeriodic(AuraEffect const *)
PrepareAuraScript(spell_q12730_quenching_mist_AuraScript)
AuraScript * GetAuraScript() const OVERRIDE
spell_q12730_quenching_mist()
PrepareSpellScript(spell_q12735_song_of_cleansing_SpellScript)
void HandleScript(SpellEffIndex)
SpellScript * GetSpellScript() const OVERRIDE
spell_q12735_song_of_cleansing()
PrepareSpellScript(spell_q12805_lifeblood_dummy_SpellScript)
void HandleScript(SpellEffIndex)
SpellScript * GetSpellScript() const OVERRIDE
spell_q12805_lifeblood_dummy()
PrepareSpellScript(spell_q12847_summon_soul_moveto_bunny_SpellScript)
void ChangeSummonPos(SpellEffIndex)
spell_q12847_summon_soul_moveto_bunny()
SpellScript * GetSpellScript() const
PrepareAuraScript(spell_q12851_going_bearback_AuraScript)
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
spell_q12851_going_bearback()
AuraScript * GetAuraScript() const OVERRIDE
bool Validate(SpellInfo const *) OVERRIDE
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_q12919_gymers_grab_SpellScript)
spell_q12919_gymers_grab()
SpellScript * GetSpellScript() const OVERRIDE
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_q12919_gymers_throw_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
spell_q12919_gymers_throw()
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) OVERRIDE
PrepareSpellScript(spell_q12937_relief_for_the_fallen_SpellScript)
spell_q12937_relief_for_the_fallen()
SpellScript * GetSpellScript() const OVERRIDE
PrepareAuraScript(spell_q12987_read_pronouncement_AuraScript)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
AuraScript * GetAuraScript() const OVERRIDE
spell_q12987_read_pronouncement()
PrepareSpellScript(spell_q13011_bear_flank_master_SpellScript)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) OVERRIDE
spell_q13011_bear_flank_master()
SpellScript * GetSpellScript() const OVERRIDE
void HandleEffectDummy(SpellEffIndex)
bool Validate(SpellInfo const *spellInfo) OVERRIDE
PrepareSpellScript(spell_q13086_cannons_target_SpellScript)
spell_q13086_cannons_target()
SpellScript * GetSpellScript() const OVERRIDE
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_q13280_13283_plant_battle_standard_SpellScript)
spell_q13280_13283_plant_battle_standard()
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon_SpellScript)
void ChangeSummonPos(SpellEffIndex)
spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon()
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy_SpellScript)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy()
PrepareSpellScript(spell_q14112_14145_chum_the_water_SpellScript)
void HandleScriptEffect(SpellEffIndex)
bool Validate(SpellInfo const *) OVERRIDE
spell_q14112_14145_chum_the_water()
SpellScript * GetSpellScript() const OVERRIDE
bool Validate(SpellInfo const *) OVERRIDE
PrepareAuraScript(spell_q2203_thaumaturgy_channel_AuraScript)
void HandleEffectPeriodic(AuraEffect const *)
spell_q2203_thaumaturgy_channel()
AuraScript * GetAuraScript() const OVERRIDE
PrepareSpellScript(spell_q28813_get_our_boys_back_dummy_SpellScript)
bool Validate(SpellInfo const *) OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
spell_q28813_get_our_boys_back_dummy()
PrepareSpellScript(spell_q28813_set_health_random_SpellScript)
SpellScript * GetSpellScript() const override
spell_q28813_set_health_random()
bool Validate(SpellInfo const *) OVERRIDE
PrepareSpellScript(spell_q5206_test_fetid_skull_SpellScript)
void HandleDummy(SpellEffIndex)
SpellScript * GetSpellScript() const OVERRIDE
spell_q5206_test_fetid_skull()
SpellScript * GetSpellScript() const OVERRIDE
spell_q55_sacred_cleansing()
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_q6124_6129_apply_salve_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
spell_q6124_6129_apply_salve()
PrepareSpellScript(spell_q9452_cast_net_SpellScript)
void HandleDummy(SpellEffIndex)
SpellScript * GetSpellScript() const OVERRIDE
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_q9874_liquid_fire_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
spell_q9874_liquid_fire()
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_symbol_of_life_dummy_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
spell_symbol_of_life_dummy()
@ SPELL_BUNNY_CREDIT_BEAM
Quest13291_13292_13239_13261Data
@ SPELL_PERMANENT_FEIGN_DEATH
@ NPC_REANIMATED_FROSTWYRM
@ NPC_WEAK_REANIMATED_FROSTWYRM
@ SPELL_CREATE_RESONATING_SKULL
@ SPELL_SUMMON_WYRMREST_DEFENDER
@ NPC_WYRMREST_TEMPLE_CREDIT
@ WHISPER_ON_HIT_BY_FORCE_WHISPER
@ SPELL_SUMMON_SENTRYBOT_57K
@ SPELL_SUMMON_SCAVENGEBOT_004A8
@ SPELL_SUMMON_55D_COLLECTATRON
@ SPELL_SUMMON_SCAVENGEBOT_005B6
@ SPELL_SUMMON_DEFENDOTANK_66D
@ SPELL_ROBOT_KILL_CREDIT
Quest_The_Storm_King_Throw
@ NPC_KING_OF_THE_MOUNTAINT_KC
@ SPELL_SUMMON_GORGED_LURKING_BASILISK
@ SPELL_FROSTGIANT_CREDIT
@ SPELL_FLICKERING_FLAMES
@ SPELL_SUMMON_ADVENTUROUS_DWARF
@ SPELL_ORANGE_FALLS_TO_GROUND
@ SPELL_PAPAYA_FALLS_TO_GROUND
@ SPELL_BANANAS_FALL_TO_GROUND
@ NPC_NEW_AVALON_TOWN_HALL
@ NPC_CHAPEL_OF_THE_CRIMSON_FLAME
@ SPELL_SCARLET_HOLD_CREDIT
@ NPC_VILLAGER_KILL_CREDIT
Quest11010_11102_11023Data
@ SPELL_FLAK_CANNON_TRIGGER
@ SUMMON_NORTH_SEA_THRESHER
@ SUMMON_NORTH_SEA_BLUE_SHARK
@ SPELL_SUMMON_SPIRIT_HAKHALAN
@ SPELL_SUMMON_SPIRIT_KOOSU
@ SPELL_SUMMON_SPIRIT_ATAH
@ SPELL_BURST_AT_THE_SEAMS_BONE
@ SPELL_DRAKKARI_CHIEFTAINK_KILL_CREDIT
@ QUEST_BURST_AT_THE_SEAMS
@ SPELL_BURST_AT_THE_SEAMS_DMG
@ SPELL_BURST_AT_THE_SEAMS_BMEAT
@ NPC_DRAKKARI_CHIEFTAINK
@ SPELL_SUMMON_DRAKKARI_CHIEFTAIN
@ SPELL_BURST_AT_THE_SEAMS_DMG_2
@ SPELL_DRAKKARI_SKULLCRUSHER_CREDIT
@ SPELL_BURST_AT_THE_SEAMS
@ SPELL_BURST_AT_THE_SEAMS_MEAT
@ NPC_INJURED_STORMWIND_INFANTRY
@ SPELL_UPPER_MINE_SHAFT_CREDIT
@ SPELL_LOWER_MINE_SHAFT_CREDIT
@ SPELL_BEAR_FLANK_MASTER
@ SPELL_CREATE_BEAR_FLANK
@ NPC_FALLEN_EARTHEN_DEFENDER
@ SPELL_TRIGGER_AID_OF_THE_EARTHEN
@ SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3
@ SPELL_SCOURGING_CRYSTAL_CONTROLLER
void AddSC_quest_spell_scripts()
@ SPELL_THAUMATURGY_CHANNEL
@ SPELL_ARCANE_PRISONER_KILL_CREDIT
@ SPELL_SUMMON_ARCANE_PRISONER_FEMALE
@ SPELL_SUMMON_ARCANE_PRISONER_MALE
void RelocateOffset(Position const &offset)
void Relocate(float x, float y)