Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
SpellEffectsScript.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#include "AccountMgr.h"
7#include "AreaTrigger.h"
8#include "Battleground.h"
9#include "BattlegroundMgr.h"
10#include "BattlePetMgr.h"
11#include "CellImpl.h"
12#include "Common.h"
13#include "Creature.h"
14#include "CreatureAI.h"
15#include "DatabaseEnv.h"
16#include "DynamicObject.h"
17#include "Formulas.h"
18#include "GameObject.h"
19#include "GameObjectAI.h"
20#include "GossipDef.h"
21#include "GridNotifiers.h"
22#include "GridNotifiersImpl.h"
23#include "Group.h"
24#include "Guild.h"
25#include "GuildMgr.h"
26#include "InstanceScript.h"
27#include "Language.h"
28#include "Log.h"
29#include "MapManager.h"
30#include "ObjectAccessor.h"
31#include "ObjectMgr.h"
32#include "Opcodes.h"
33#include "OutdoorPvPMgr.h"
34#include "PathGenerator.h"
35#include "Pet.h"
36#include "Player.h"
37#include "ReputationMgr.h"
38#include "ScriptMgr.h"
39#include "SharedDefines.h"
40#include "SkillDiscovery.h"
41#include "SkillExtraItems.h"
42#include "SocialMgr.h"
43#include "Spell.h"
44#include "SpellAuraEffects.h"
45#include "SpellAuras.h"
46#include "SpellEffectMetadata.h"
47#include "SpellMgr.h"
48#include "SpellValidation.h"
49#include "TemporarySummon.h"
50#include "Totem.h"
51#include "Unit.h"
52#include "UpdateData.h"
53#include "UpdateMask.h"
54#include "Util.h"
55#include "Vehicle.h"
56#include "VMapFactory.h"
57#include "World.h"
58#include "WorldPacket.h"
59
61{
63 return;
64
66 return;
67
68 uint32 spell_id = 0;
69 int32 bp = 0;
70 bool triggered = true;
71 SpellCastTargets targets;
72
73 // selection by spell family
74 switch (m_spellInfo->SpellFamilyName)
75 {
77 switch (m_spellInfo->Id)
78 {
79 case 31789: // Righteous Defense (step 1)
80 {
81 // Clear targets for eff 1
82 for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
83 ihit->effectMask &= ~(1 << 1);
84
85 // not empty (checked), copy
86 Unit::AttackerSet attackers = unitTarget->getAttackers();
87
88 // remove invalid attackers
89 for (Unit::AttackerSet::iterator aItr = attackers.begin(); aItr != attackers.end();)
90 if (!(*aItr)->IsValidAttackTarget(m_caster))
91 attackers.erase(aItr++);
92 else
93 ++aItr;
94
95 // selected from list 3
96 uint32 maxTargets = std::min<uint32>(3, attackers.size());
97 for (uint32 i = 0; i < maxTargets; ++i)
98 {
100 AddUnitTarget(attacker, 1 << 1);
101 attackers.erase(attacker);
102 }
103
104 // now let next effect cast spell at each target.
105 return;
106 }
107 }
108 break;
109 }
110
111 //spells triggered by dummy effect should not miss
112 if (spell_id)
113 {
114 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id);
115
116 if (!spellInfo)
117 {
118 SF_LOG_ERROR("spells", "EffectDummy of spell %u: triggering unknown spell id %i\n", m_spellInfo->Id, spell_id);
119 return;
120 }
121
122 targets.SetUnitTarget(unitTarget);
123 Spell* spell = new Spell(m_caster, spellInfo, triggered ? TRIGGERED_FULL_MASK : TRIGGERED_NONE, m_originalCasterGUID, true);
124 if (bp) spell->SetSpellValue(SPELLVALUE_BASE_POINT0, bp);
125 spell->prepare(&targets);
126 }
127
128 // pet auras
129 if (PetAura const* petSpell = sSpellMgr->GetPetAura(m_spellInfo->Id, effIndex))
130 {
131 m_caster->AddPetAura(petSpell);
132 return;
133 }
134
135 // normal DB scripted effect
136 SF_LOG_DEBUG("spells", "Spell ScriptStart spellid %u in EffectDummy(%u)", m_spellInfo->Id, effIndex);
137 m_caster->GetMap()->ScriptsStart(sSpellScripts, uint32(m_spellInfo->Id | (effIndex << 24)), m_caster, unitTarget);
138
139 // Script based implementation. Must be used only for not good for implementation in core spell effects
140 // So called only for not proccessed cases
141 if (gameObjTarget)
142 sScriptMgr->OnDummyEffect(m_caster, m_spellInfo->Id, effIndex, gameObjTarget);
143 else if (unitTarget && unitTarget->GetTypeId() == TypeID::TYPEID_UNIT)
144 sScriptMgr->OnDummyEffect(m_caster, m_spellInfo->Id, effIndex, unitTarget->ToCreature());
145 else if (itemTarget)
146 sScriptMgr->OnDummyEffect(m_caster, m_spellInfo->Id, effIndex, itemTarget);
147}
148
150{
152 return;
153
155
156 switch (m_spellInfo->SpellFamilyName)
157 {
159 {
160 switch (m_spellInfo->Id)
161 {
162 // Glyph of Scourge Strike
163 case 69961:
164 {
165 Unit::AuraEffectList const& mPeriodic = unitTarget->GetAuraEffectsByType(SPELL_AURA_PERIODIC_DAMAGE);
166 for (Unit::AuraEffectList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i)
167 {
168 AuraEffect const* aurEff = *i;
169 SpellInfo const* spellInfo = aurEff->GetSpellInfo();
170 // search our Blood Plague and Frost Fever on target
171 if (spellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && spellInfo->SpellFamilyFlags[2] & 0x2 &&
172 aurEff->GetCasterGUID() == m_caster->GetGUID())
173 {
174 uint32 countMin = aurEff->GetBase()->GetMaxDuration();
175 uint32 countMax = spellInfo->GetMaxDuration();
176
177 // this Glyph
178 countMax += 9000;
179 // talent Epidemic
180 if (AuraEffect const* epidemic = m_caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_DEATHKNIGHT, 234, EFFECT_0))
181 countMax += epidemic->GetAmount();
182
183 if (countMin < countMax)
184 {
185 aurEff->GetBase()->SetDuration(aurEff->GetBase()->GetDuration() + 3000);
186 aurEff->GetBase()->SetMaxDuration(countMin + 3000);
187 }
188 }
189 }
190 return;
191 }
192 case 45204: // Clone Me!
193 m_caster->CastSpell(unitTarget, damage, true);
194 break;
195 case 55693: // Remove Collapsing Cave Aura
196 if (!unitTarget)
197 return;
198 unitTarget->RemoveAurasDueToSpell(m_spellInfo->Effects[effIndex].CalcValue());
199 break;
200 // Bending Shinbone
201 case 8856:
202 {
203 if (!itemTarget && m_caster->GetTypeId() != TypeID::TYPEID_PLAYER)
204 return;
205
207
208 m_caster->CastSpell(m_caster, spell_id, true, NULL);
209 return;
210 }
211 // Brittle Armor - need remove one 24575 Brittle Armor aura
212 case 24590:
214 return;
215 // Mercurial Shield - need remove one 26464 Mercurial Shield aura
216 case 26465:
218 return;
219 // Shadow Flame (All script effects, not just end ones to prevent player from dodging the last triggered spell)
220 case 22539:
221 case 22972:
222 case 22975:
223 case 22976:
224 case 22977:
225 case 22978:
226 case 22979:
227 case 22980:
228 case 22981:
229 case 22982:
230 case 22983:
231 case 22984:
232 case 22985:
233 {
234 if (!unitTarget || !unitTarget->IsAlive())
235 return;
236
237 Skyfire::Spells::ShadowFlameScriptRule const* shadowFlameRule =
239 if (!shadowFlameRule)
240 return;
241
242 // Onyxia Scale Cloak
243 if (unitTarget->HasAura(shadowFlameRule->ProtectionAuraSpellId))
244 return;
245
246 // Shadow Flame
247 m_caster->CastSpell(unitTarget, shadowFlameRule->TriggerSpellId, true);
248 return;
249 }
250 // Decimate
251 case 28374:
252 case 54426:
253 if (unitTarget)
254 {
255 int32 damage = int32(unitTarget->GetHealth()) - int32(unitTarget->CountPctFromMaxHealth(5));
256 if (damage > 0)
257 {
258 uint32 decimateTriggerSpellId =
260 m_caster->CastCustomSpell(decimateTriggerSpellId, SPELLVALUE_BASE_POINT0, damage, unitTarget);
261 }
262 }
263 return;
264 // Mirren's Drinking Hat
265 case 29830:
266 {
267 uint32 item = 0;
268 item = Skyfire::Spells::GetMirrensDrinkingHatItemId(std::rand() % 6 + 1);
269 if (item)
270 DoCreateItem(effIndex, item);
271 break;
272 }
273 case 20589: // Escape artist
274 {
275 // Removes snares and roots.
276 unitTarget->RemoveMovementImpairingAuras();
277 break;
278 }
279 // Plant Warmaul Ogre Banner
280 case 32307:
281 if (Player* caster = m_caster->ToPlayer())
282 {
283 caster->RewardPlayerAndGroupAtEvent(Skyfire::Spells::GetPlantWarmaulOgreBannerEventId(), unitTarget);
284 if (Creature* target = unitTarget->ToCreature())
285 {
286 target->setDeathState(DeathState::CORPSE);
287 target->RemoveCorpse();
288 }
289 }
290 break;
291 // Mug Transformation
292 case 41931:
293 {
294 if (m_caster->GetTypeId() != TypeID::TYPEID_PLAYER)
295 return;
296
297 uint8 bag = 19;
298 uint8 slot = 0;
299 Item* item = NULL;
300
301 while (bag) // 256 = 0 due to var type
302 {
303 item = m_caster->ToPlayer()->GetItemByPos(bag, slot);
305 break;
306
307 ++slot;
308 if (slot == 39)
309 {
310 slot = 0;
311 ++bag;
312 }
313 }
314 if (bag)
315 {
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);
318 // Spell 42518 (Braufest - Gratisprobe des Braufest herstellen)
320 return;
321 }
322 break;
323 }
324 // Brutallus - Burn
325 case 45141:
326 case 45151:
327 {
328 //Workaround for Range ... should be global for every ScriptEffect
329 float radius = m_spellInfo->Effects[effIndex].CalcRadius();
331 if (unitTarget && unitTarget->GetTypeId() == TypeID::TYPEID_PLAYER &&
332 unitTarget->GetDistance(m_caster) >= radius && !unitTarget->HasAura(rangeAuraSpellId) &&
334 unitTarget->CastSpell(unitTarget, rangeAuraSpellId, true);
335
336 break;
337 }
338 // Goblin Weather Machine
339 case 46203:
340 {
341 if (!unitTarget)
342 return;
343
345 unitTarget->CastSpell(unitTarget, spellId, true);
346 break;
347 }
348 // 5, 000 Gold
349 case 46642:
350 {
351 if (!unitTarget || unitTarget->GetTypeId() != TypeID::TYPEID_PLAYER)
352 return;
353
354 unitTarget->ToPlayer()->ModifyMoney(Skyfire::Spells::GetGoldScriptAmount() * GOLD);
355
356 break;
357 }
358 // Roll Dice - Decahedral Dwarven Dice
359 case 47770:
360 {
361 char buf[128];
362 const char* gender = "his";
363 if (m_caster->getGender() > 0)
364 gender = "her";
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);
366 m_caster->MonsterTextEmote(buf, 0);
367 break;
368 }
369 // Roll 'dem Bones - Worn Troll Dice
370 case 47776:
371 {
372 char buf[128];
373 const char* gender = "his";
374 if (m_caster->getGender() > 0)
375 gender = "her";
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);
377 m_caster->MonsterTextEmote(buf, 0);
378 break;
379 }
380 // Emblazon Runeblade
381 case 51770:
382 {
384 return;
385 }
386
387 // Death Knight Initiate Visual
388 case 51519:
389 {
390 if (!unitTarget || unitTarget->GetTypeId() != TypeID::TYPEID_UNIT)
391 return;
392
394 if (!iTmpSpellId)
395 return;
396
397 unitTarget->CastSpell(unitTarget, iTmpSpellId, true);
398 Creature* npc = unitTarget->ToCreature();
399 npc->LoadEquipment();
400 return;
401 }
402 // Deathbolt from Thalgran Blightbringer
403 // reflected by Freya's Ward
404 // Retribution by Sevenfold Retribution
405 case 51854:
406 {
407 if (!unitTarget)
408 return;
411 else
413 break;
414 }
415 // Summon Ghouls On Scarlet Crusade
416 case 51904:
417 {
418 if (!m_targets.HasDst())
419 return;
420
421 float x, y, z;
422 float radius = m_spellInfo->Effects[effIndex].CalcRadius();
423 for (uint8 i = 0; i < 15; ++i)
424 {
425 m_caster->GetRandomPoint(*destTarget, radius, x, y, z);
427 }
428 break;
429 }
430 case 52173: // Coyote Spirit Despawn
431 case 60243: // Blood Parrot Despawn
433 unitTarget->GetTypeId() == TypeID::TYPEID_UNIT && unitTarget->ToCreature()->IsSummon())
434 unitTarget->ToTempSummon()->UnSummon();
435 return;
436 case 52479: // Gift of the Harvester
438 {
440 m_originalCaster->CastSpell(unitTarget, spellId, true);
441 }
442 return;
443 case 53110: // Devour Humanoid
444 if (unitTarget)
445 unitTarget->CastSpell(m_caster, damage, true);
446 return;
447 case 57347: // Retrieving (Wintergrasp RP-GG pickup spell)
448 {
449 if (!unitTarget || unitTarget->GetTypeId() != TypeID::TYPEID_UNIT || m_caster->GetTypeId() != TypeID::TYPEID_PLAYER)
450 return;
451
452 unitTarget->ToCreature()->DespawnOrUnsummon();
453
454 return;
455 }
456 case 57349: // Drop RP-GG (Wintergrasp RP-GG at death drop spell)
457 {
458 if (m_caster->GetTypeId() != TypeID::TYPEID_PLAYER)
459 return;
460
461 // Delete item from inventory at death
462 m_caster->ToPlayer()->DestroyItemCount(damage, Skyfire::Spells::GetWintergraspRpggDropItemCount(), true);
463
464 return;
465 }
466 case 58418: // Portal to Orgrimmar
467 case 58420: // Portal to Stormwind
468 {
469 if (!unitTarget || unitTarget->GetTypeId() != TypeID::TYPEID_PLAYER || effIndex != 0)
470 return;
471
472 uint32 spellID = m_spellInfo->Effects[EFFECT_0].CalcValue();
473 uint32 questID = m_spellInfo->Effects[EFFECT_1].CalcValue();
474
475 if (unitTarget->ToPlayer()->GetQuestStatus(questID) == QUEST_STATUS_COMPLETE)
476 unitTarget->CastSpell(unitTarget, spellID, true);
477
478 return;
479 }
480 case 58983: // Big Blizzard Bear
481 {
482 if (!unitTarget || unitTarget->GetTypeId() != TypeID::TYPEID_PLAYER)
483 return;
484
485 // Prevent stacking of mounts and client crashes upon dismounting
486 unitTarget->RemoveAurasByType(SPELL_AURA_MOUNTED);
487
488 // Triggered spell id dependent on riding skill
489 if (uint16 skillval = unitTarget->ToPlayer()->GetSkillValue(SKILL_RIDING))
490 {
491 if (skillval >= 150)
493 else
495 }
496 return;
497 }
498 case 59317: // Teleporting
499 {
500 if (!unitTarget || unitTarget->GetTypeId() != TypeID::TYPEID_PLAYER)
501 return;
502
503 // return from top
504 unitTarget->CastSpell(unitTarget,
505 Skyfire::Spells::GetTeleportingScriptSpellId(unitTarget->ToPlayer()->GetAreaId()), true);
506
507 return;
508 }
509 case 62482: // Grab Crate
510 {
511 if (unitTarget)
512 {
513 if (Unit* seat = m_caster->GetVehicleBase())
514 {
515 if (Unit* parent = seat->GetVehicleBase())
516 {
518 m_caster->CastSpell(parent, Skyfire::Spells::GetGrabCrateParentSpellId(), true);
519 unitTarget->CastSpell(parent, m_spellInfo->Effects[EFFECT_0].CalcValue());
520 }
521 }
522 }
523 return;
524 }
525 case 60123: // Lightwell
526 {
527 if (m_caster->GetTypeId() != TypeID::TYPEID_UNIT || !m_caster->ToCreature()->IsSummon())
528 return;
529
530 uint32 spell_heal;
531
532 spell_heal = Skyfire::Spells::GetLightwellHealSpellId(m_caster->GetEntry());
533 if (!spell_heal)
534 {
535 SF_LOG_ERROR("spells", "Unknown Lightwell spell caster %u", m_caster->GetEntry());
536 return;
537 }
538
539 // proc a spellcast
541 {
542 m_caster->CastSpell(unitTarget, spell_heal, true, NULL, NULL, m_caster->ToTempSummon()->GetSummonerGUID());
543 if (chargesAura->ModCharges(-1))
544 m_caster->ToTempSummon()->UnSummon();
545 }
546
547 return;
548 }
549 case 45668: // Ultra-Advanced Proto-Typical Shortening Blaster
550 {
551 if (!unitTarget || unitTarget->GetTypeId() != TypeID::TYPEID_UNIT)
552 return;
553
554 if (roll_chance_i(50)) // chance unknown, using 50
555 return;
556
561 if (casterBlasterSpells && targetBlasterSpells)
562 {
563 m_caster->CastSpell(m_caster, casterBlasterSpells->CasterSpellId, true);
564 unitTarget->CastSpell(unitTarget, targetBlasterSpells->TargetSpellId, true);
565 }
566 break;
567 }
568 }
569 break;
570 }
572 {
573 // Judgement (seal trigger)
574 if (m_spellInfo->GetCategory() == SPELLCATEGORY_JUDGEMENT)
575 {
576 if (!unitTarget || !unitTarget->IsAlive())
577 return;
578 uint32 spellId1 = 0;
579 uint32 spellId2 = 0;
580
582 if (!spellId1)
583 {
584 SF_LOG_ERROR("spells", "Unsupported Judgement (seal trigger) spell (Id: %u) in Spell::EffectScriptEffect", m_spellInfo->Id);
585 return;
586 }
587 // all seals have aura dummy in 2 effect
588 Unit::AuraApplicationMap& sealAuras = m_caster->GetAppliedAuras();
589 for (Unit::AuraApplicationMap::iterator iter = sealAuras.begin(); iter != sealAuras.end();)
590 {
591 Aura* aura = iter->second->GetBase();
593 {
594 if (AuraEffect* aureff = aura->GetEffect(2))
595 if (aureff->GetAuraType() == SPELL_AURA_DUMMY)
596 {
597 if (sSpellMgr->GetSpellInfo(aureff->GetAmount()))
598 spellId2 = aureff->GetAmount();
599 break;
600 }
601 if (!spellId2)
602 {
604 }
605 break;
606 }
607 else
608 ++iter;
609 }
610 if (spellId1)
611 m_caster->CastSpell(unitTarget, spellId1, true);
612 if (spellId2)
613 m_caster->CastSpell(unitTarget, spellId2, true);
614 return;
615 }
616 break;
617 }
619 {
620 // Pestilence
621 if (m_spellInfo->SpellFamilyFlags[1] & 0x10000)
622 {
623 // Get diseases on target of spell
624 if (m_targets.GetUnitTarget() && (m_targets.GetUnitTarget() != unitTarget))
625 {
626 // And spread them on target
627 // Blood Plague
628 if (m_targets.GetUnitTarget()->GetAura(Skyfire::Spells::GetPestilenceBloodPlagueSpellId()))
630 // Frost Fever
631 if (m_targets.GetUnitTarget()->GetAura(Skyfire::Spells::GetPestilenceFrostFeverSpellId()))
633 }
634 }
635 break;
636 }
638 {
639 switch (m_spellInfo->Id)
640 {
641 case 107574: // Avatar
642 {
643 // Removes snares and roots.
644 unitTarget->RemoveMovementImpairingAuras();
645 break;
646 }
647 break;
648 }
649 break;
650 }
652 {
653 switch (m_spellInfo->Id)
654 {
655 case 6201: //Create Healthstone
656 case 34130: //Create Healthstone
657 {
658 m_caster->CastSpell(unitTarget,
660 break;
661 }
662 break;
663 }
664 break;
665 }
666 }
667
668 // normal DB scripted effect
669 SF_LOG_DEBUG("spells", "Spell ScriptStart spellid %u in EffectScriptEffect(%u)", m_spellInfo->Id, effIndex);
670 m_caster->GetMap()->ScriptsStart(sSpellScripts, uint32(m_spellInfo->Id | (effIndex << 24)), m_caster, unitTarget);
671}
std::int32_t int32
Definition Define.h:73
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
std::uint16_t uint16
Definition Define.h:78
#define SF_LOG_DEBUG(filterType__,...)
Definition Log.h:134
#define SF_LOG_ERROR(filterType__,...)
Definition Log.h:143
@ TYPEID_PLAYER
Definition Object.h:55
@ TYPEID_UNIT
Definition Object.h:54
ScriptMapMap sSpellScripts
Definition ObjectMgr.cpp:50
@ QUEST_STATUS_COMPLETE
Definition QuestDef.h:87
#define sScriptMgr
Definition ScriptMgr.h:764
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ SPELLFAMILY_WARLOCK
@ SPELLFAMILY_GENERIC
@ SPELLFAMILY_WARRIOR
@ SPELLFAMILY_PALADIN
@ SPELLFAMILY_DEATHKNIGHT
@ GOLD
@ SKILL_RIDING
@ SPELL_EFFECT_HANDLE_HIT_TARGET
Definition Spell.h:277
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_ADD_FLAT_MODIFIER
@ SPELL_AURA_DUMMY
@ SPELL_AURA_MOUNTED
@ SPELL_SPECIFIC_SEAL
Definition SpellInfo.h:37
#define sSpellMgr
Definition SpellMgr.h:744
@ SPELLCATEGORY_JUDGEMENT
Definition SpellMgr.h:32
@ SPELLVALUE_BASE_POINT0
Definition Unit.h:114
@ CORPSE
Definition Unit.h:505
@ TRIGGERED_FULL_MASK
Will ignore most target checks (mostly DBC target checks).
Definition Unit.h:435
@ TRIGGERED_NONE
Definition Unit.h:416
bool roll_chance_i(int chance)
Definition Util.h:89
SpellInfo const * GetSpellInfo() const
Aura * GetBase() const
uint64 GetCasterGUID() const
int32 GetMaxDuration() const
Definition SpellAuras.h:115
int32 GetDuration() const
Definition SpellAuras.h:119
AuraEffect * GetEffect(uint8 effIndex) const
Definition SpellAuras.h:168
void SetDuration(int32 duration, bool withMods=false)
SpellInfo const * GetSpellInfo() const
Definition SpellAuras.h:87
void SetMaxDuration(int32 duration)
Definition SpellAuras.h:116
Definition Item.h:202
uint32 GetEntry() const
Definition Object.h:125
void SetUnitTarget(Unit *target)
Definition Spell.cpp:228
GameObject * gameObjTarget
Definition Spell.h:628
Unit * m_originalCaster
Definition Spell.h:587
SpellCastTargets m_targets
Definition Spell.h:535
int32 damage
Definition Spell.h:630
void SetSpellValue(SpellValueMod mod, int32 value)
Definition Spell.cpp:7659
void EffectDummy(SpellEffIndex effIndex)
SpellEffectHandleMode effectHandleMode
Definition Spell.h:631
Unit *const m_caster
Definition Spell.h:581
Spell(Unit *caster, SpellInfo const *info, TriggerCastFlags triggerFlags, uint64 originalCasterGUID=0, bool skipCheck=false)
Definition Spell.cpp:500
void prepare(SpellCastTargets const *targets, AuraEffect const *triggeredByAura=NULL)
Definition Spell.cpp:2939
uint64 m_originalCasterGUID
Definition Spell.h:585
Item * itemTarget
Definition Spell.h:627
std::list< TargetInfo > m_UniqueTargetInfo
Definition Spell.h:671
void AddUnitTarget(Unit *target, uint32 effectMask, bool checkIfValid=true, bool implicit=true)
Definition Spell.cpp:2136
Unit * unitTarget
Definition Spell.h:626
WorldLocation * destTarget
Definition Spell.h:629
void DoCreateItem(uint32 i, uint32 itemtype)
void EffectScriptEffect(SpellEffIndex effIndex)
SpellInfo const *const m_spellInfo
Definition Spell.h:530
SpellSpecificType GetSpellSpecific() const
int32 GetMaxDuration() const
flag128 SpellFamilyFlags
Definition SpellInfo.h:227
uint32 SpellFamilyName
Definition SpellInfo.h:226
Definition Unit.h:1367
std::multimap< uint32, AuraApplication * > AuraApplicationMap
Definition Unit.h:1376
Unit * GetVehicleBase() const
Definition Unit.cpp:7203
std::set< Unit * > AttackerSet
Definition Unit.h:1369
std::list< AuraEffect * > AuraEffectList
Definition Unit.h:1383
C::value_type const & SelectRandomContainerElement(C const &container)
Definition Containers.h:48
uint32 GetSummonGhoulsOnScarletCrusadeSpellId()
uint32 GetLightwellHealSpellId(uint32 creatureEntry)
uint32 GetEmblazonRunebladeTriggerSpellId()
uint32 GetGiftOfTheHarvesterFallbackSpellId()
uint32 GetScriptEffectStackRemovalAuraSpellId(uint32 scriptSpellId)
uint32 GetBendingShinboneTriggerSpellId(bool strongHit)
uint32 GetDecimateScriptTriggerSpellId(uint32 scriptSpellId)
uint32 GetDeathboltReflectedSpellId()
uint32 GetDeathKnightInitiateVisualSpellId(uint32 displayId)
ProtoTypicalShorteningBlasterSpells const * GetProtoTypicalShorteningBlasterSpells(uint32 roll)
uint32 GetJudgementSealTriggerSpellId(uint32 judgementSpellId)
uint32 GetPestilenceBloodPlagueSpellId()
uint32 GetMirrensDrinkingHatItemId(uint32 roll)
uint32 GetGoblinWeatherMachineSpellId(uint32 roll)
uint32 GetJudgementFallbackSealTriggerSpellId(uint32 sealSpellId)
uint32 GetWintergraspRpggDropItemCount()
uint32 GetBrutallusBurnRangeAuraSpellId()
uint32 GetPestilenceFrostFeverSpellId()
uint32 GetLightwellChargesAuraSpellId()
bool IsScriptDespawnSpell(uint32 scriptSpellId)
uint32 GetPlantWarmaulOgreBannerEventId()
ShadowFlameScriptRule const * GetShadowFlameScriptRule(uint32 scriptSpellId)
uint32 GetBigBlizzardBearMountSpellId(uint16 ridingSkill)
uint32 GetTeleportingScriptSpellId(uint32 areaId)
uint32 GetCreateHealthstoneTriggeredSpellId(uint32 createHealthstoneSpellId)