70 bool triggered =
true;
83 ihit->effectMask &= ~(1 << 1);
89 for (Unit::AttackerSet::iterator aItr = attackers.begin(); aItr != attackers.end();)
90 if (!(*aItr)->IsValidAttackTarget(
m_caster))
91 attackers.erase(aItr++);
96 uint32 maxTargets = std::min<uint32>(3, attackers.size());
97 for (
uint32 i = 0; i < maxTargets; ++i)
101 attackers.erase(attacker);
118 SF_LOG_ERROR(
"spells",
"EffectDummy of spell %u: triggering unknown spell id %i\n",
m_spellInfo->Id, spell_id);
166 for (Unit::AuraEffectList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i)
181 countMax += epidemic->GetAmount();
183 if (countMin < countMax)
239 if (!shadowFlameRule)
258 uint32 decimateTriggerSpellId =
287 target->RemoveCorpse();
303 item =
m_caster->ToPlayer()->GetItemByPos(bag, slot);
316 if (
m_caster->ToPlayer()->GetItemByPos(bag, slot)->GetCount() == 1)
m_caster->ToPlayer()->RemoveItem(bag, slot,
true);
317 else m_caster->ToPlayer()->GetItemByPos(bag, slot)->SetCount(
m_caster->ToPlayer()->GetItemByPos(bag, slot)->GetCount() - 1);
329 float radius =
m_spellInfo->Effects[effIndex].CalcRadius();
362 const char* gender =
"his";
365 snprintf(buf,
sizeof(buf),
"%s rubs %s [Decahedral Dwarven Dice] between %s hands and rolls. One %u and one %u.",
m_caster->GetName().c_str(), gender, gender, std::rand() % 10 + 1, std::rand() % 10 + 1);
373 const char* gender =
"his";
376 snprintf(buf,
sizeof(buf),
"%s causually tosses %s [Worn Troll Dice]. One %u and one %u.",
m_caster->GetName().c_str(), gender, std::rand() % 6 + 1, std::rand() % 6 + 1);
399 npc->LoadEquipment();
422 float radius =
m_spellInfo->Effects[effIndex].CalcRadius();
423 for (
uint8 i = 0; i < 15; ++i)
452 unitTarget->ToCreature()->DespawnOrUnsummon();
543 if (chargesAura->ModCharges(-1))
544 m_caster->ToTempSummon()->UnSummon();
561 if (casterBlasterSpells && targetBlasterSpells)
584 SF_LOG_ERROR(
"spells",
"Unsupported Judgement (seal trigger) spell (Id: %u) in Spell::EffectScriptEffect",
m_spellInfo->Id);
589 for (Unit::AuraApplicationMap::iterator iter = sealAuras.begin(); iter != sealAuras.end();)
591 Aura* aura = iter->second->GetBase();
597 if (
sSpellMgr->GetSpellInfo(aureff->GetAmount()))
598 spellId2 = aureff->GetAmount();
#define SF_LOG_DEBUG(filterType__,...)
#define SF_LOG_ERROR(filterType__,...)
ScriptMapMap sSpellScripts
@ SPELLFAMILY_DEATHKNIGHT
@ SPELL_EFFECT_HANDLE_HIT_TARGET
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_ADD_FLAT_MODIFIER
@ SPELLCATEGORY_JUDGEMENT
@ TRIGGERED_FULL_MASK
Will ignore most target checks (mostly DBC target checks).
bool roll_chance_i(int chance)
SpellInfo const * GetSpellInfo() const
uint64 GetCasterGUID() const
int32 GetMaxDuration() const
int32 GetDuration() const
AuraEffect * GetEffect(uint8 effIndex) const
void SetDuration(int32 duration, bool withMods=false)
SpellInfo const * GetSpellInfo() const
void SetMaxDuration(int32 duration)
void SetUnitTarget(Unit *target)
GameObject * gameObjTarget
SpellCastTargets m_targets
void SetSpellValue(SpellValueMod mod, int32 value)
void EffectDummy(SpellEffIndex effIndex)
SpellEffectHandleMode effectHandleMode
Spell(Unit *caster, SpellInfo const *info, TriggerCastFlags triggerFlags, uint64 originalCasterGUID=0, bool skipCheck=false)
void prepare(SpellCastTargets const *targets, AuraEffect const *triggeredByAura=NULL)
uint64 m_originalCasterGUID
std::list< TargetInfo > m_UniqueTargetInfo
void AddUnitTarget(Unit *target, uint32 effectMask, bool checkIfValid=true, bool implicit=true)
WorldLocation * destTarget
void DoCreateItem(uint32 i, uint32 itemtype)
void EffectScriptEffect(SpellEffIndex effIndex)
SpellInfo const *const m_spellInfo
SpellSpecificType GetSpellSpecific() const
int32 GetMaxDuration() const
std::multimap< uint32, AuraApplication * > AuraApplicationMap
Unit * GetVehicleBase() const
std::set< Unit * > AttackerSet
std::list< AuraEffect * > AuraEffectList
C::value_type const & SelectRandomContainerElement(C const &container)
uint32 GetSummonGhoulsOnScarletCrusadeSpellId()
uint32 GetLightwellHealSpellId(uint32 creatureEntry)
uint32 GetGoldScriptAmount()
uint32 GetEmblazonRunebladeTriggerSpellId()
uint32 GetGiftOfTheHarvesterFallbackSpellId()
uint32 GetScriptEffectStackRemovalAuraSpellId(uint32 scriptSpellId)
uint32 GetBendingShinboneTriggerSpellId(bool strongHit)
uint32 GetGrabCrateParentSpellId()
uint32 GetDecimateScriptTriggerSpellId(uint32 scriptSpellId)
uint32 GetDeathboltReflectedSpellId()
uint32 GetDeathKnightInitiateVisualSpellId(uint32 displayId)
ProtoTypicalShorteningBlasterSpells const * GetProtoTypicalShorteningBlasterSpells(uint32 roll)
uint32 GetBrewfestSampleSpellId()
uint32 GetJudgementSealTriggerSpellId(uint32 judgementSpellId)
uint32 GetPestilenceBloodPlagueSpellId()
uint32 GetMugTransformationItemId()
uint32 GetMirrensDrinkingHatItemId(uint32 roll)
uint32 GetGoblinWeatherMachineSpellId(uint32 roll)
uint32 GetDeathboltDirectSpellId()
uint32 GetJudgementFallbackSealTriggerSpellId(uint32 sealSpellId)
uint32 GetWintergraspRpggDropItemCount()
uint32 GetBrutallusBurnRangeAuraSpellId()
uint32 GetPestilenceFrostFeverSpellId()
uint32 GetLightwellChargesAuraSpellId()
bool IsScriptDespawnSpell(uint32 scriptSpellId)
uint32 GetPlantWarmaulOgreBannerEventId()
uint32 GetDeathboltWardAuraSpellId()
ShadowFlameScriptRule const * GetShadowFlameScriptRule(uint32 scriptSpellId)
uint32 GetBigBlizzardBearMountSpellId(uint16 ridingSkill)
uint32 GetTeleportingScriptSpellId(uint32 areaId)
uint32 GetCreateHealthstoneTriggeredSpellId(uint32 createHealthstoneSpellId)
uint32 ProtectionAuraSpellId