350 {
352 {
355 {
358 break;
361 break;
364 break;
367 break;
370 break;
371 }
372
373
374 if (target->IsVehicle() && target->ToCreature())
375 {
377 {
379 if (
AuraEffect* aur = target->GetAuraEffectDummy(spellId))
380 {
381 if (aur->GetBase()->GetStackAmount() >= 5)
382 {
383 if (
Player* casterPlayer =
GetCaster()->GetCharmerOrOwnerPlayerOrPlayerItself())
384 {
386 }
387 }
388 }
389 }
390 }
391
392 else
393 {
395 if (
Unit* owner = ts->GetSummonerUnit())
396 if (owner->GetEntry() ==
GetCaster()->GetEntry())
397 return;
398
400 }
401 }
402
403
404 if (
Player* player =
GetCaster()->GetCharmerOrOwnerPlayerOrPlayerItself())
405 {
408 {
411 break;
414 break;
417 break;
420 break;
423 break;
424 }
425
426 if (spellId)
427 player->CastSpell(player, spellId, true);
428 }
429 }
std::uint32_t uint32
Definition: Define.h:107
@ SPELL_ACHI_PASS_PIE
Definition: pilgrims_bounty.cpp:92
@ SPELL_STORE_STUFFING
Definition: pilgrims_bounty.cpp:61
@ SPELL_STORE_CRANBERRY
Definition: pilgrims_bounty.cpp:63
@ SPELL_STORE_TURKEY
Definition: pilgrims_bounty.cpp:60
@ SPELL_STORE_SWEET_POTATO
Definition: pilgrims_bounty.cpp:64
@ SPELL_ACHI_PASS_TURKEY
Definition: pilgrims_bounty.cpp:90
@ SPELL_ACHI_PASS_CRANBERRY
Definition: pilgrims_bounty.cpp:93
@ SPELL_ACHI_PASS_STUFFING
Definition: pilgrims_bounty.cpp:91
@ SPELL_ACHI_PASS_SWEET_POTATOES
Definition: pilgrims_bounty.cpp:94
@ SPELL_STORE_PIE
Definition: pilgrims_bounty.cpp:62
@ ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2
Definition: DBCEnums.h:217
Definition: TemporarySummon.h:40
Definition: Player.h:1081
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
Definition: Unit.cpp:10616
TempSummon * ToTempSummon()
Definition: Unit.h:696
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
Definition: SpellAuraEffects.h:39
SpellInfo const * GetSpellInfo()
Definition: SpellScript.cpp:411
Unit * GetHitUnit()
Definition: SpellScript.cpp:448
Unit * GetCaster()
Definition: SpellScript.cpp:401
uint32 GetVisualThrow(uint32 passSpell, bool isPlayer)
Definition: pilgrims_bounty.cpp:311