349 {
351 {
354 {
357 break;
360 break;
363 break;
366 break;
369 break;
370 }
371
372
373 if (target->IsVehicle() && target->ToCreature())
374 {
376 {
378 if (
AuraEffect* aur = target->GetAuraEffectDummy(spellId))
379 {
380 if (aur->GetBase()->GetStackAmount() >= 5)
381 {
382 if (
Player* casterPlayer =
GetCaster()->GetCharmerOrOwnerPlayerOrPlayerItself())
383 {
385 }
386 }
387 }
388 }
389 }
390
391 else
392 {
394 if (
Unit* owner = ts->GetSummonerUnit())
395 if (owner->GetEntry() ==
GetCaster()->GetEntry())
396 return;
397
399 }
400 }
401
402
403 if (
Player* player =
GetCaster()->GetCharmerOrOwnerPlayerOrPlayerItself())
404 {
407 {
410 break;
413 break;
416 break;
419 break;
422 break;
423 }
424
425 if (spellId)
426 player->CastSpell(player, spellId, true);
427 }
428 }
std::uint32_t uint32
Definition: Define.h:107
@ SPELL_ACHI_PASS_PIE
Definition: pilgrims_bounty.cpp:91
@ SPELL_STORE_STUFFING
Definition: pilgrims_bounty.cpp:60
@ SPELL_STORE_CRANBERRY
Definition: pilgrims_bounty.cpp:62
@ SPELL_STORE_TURKEY
Definition: pilgrims_bounty.cpp:59
@ SPELL_STORE_SWEET_POTATO
Definition: pilgrims_bounty.cpp:63
@ SPELL_ACHI_PASS_TURKEY
Definition: pilgrims_bounty.cpp:89
@ SPELL_ACHI_PASS_CRANBERRY
Definition: pilgrims_bounty.cpp:92
@ SPELL_ACHI_PASS_STUFFING
Definition: pilgrims_bounty.cpp:90
@ SPELL_ACHI_PASS_SWEET_POTATOES
Definition: pilgrims_bounty.cpp:93
@ SPELL_STORE_PIE
Definition: pilgrims_bounty.cpp:61
@ ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2
Definition: DBCEnums.h:217
Definition: TemporarySummon.h:40
Definition: Player.h:1064
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
Definition: Unit.cpp:10578
TempSummon * ToTempSummon()
Definition: Unit.h:1716
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:1168
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:310