Exemplo n.º 1
0
        void HandleDummy(SpellEffIndex /*effIndex*/)
        {
            if (Creature* creatureTarget = GetHitCreature())
                if (!creatureTarget->isPet() && creatureTarget->GetEntry() == _originalEntry)
                {
                    creatureTarget->UpdateEntry(_newEntry);
                    if (_shouldAttack && creatureTarget->IsAIEnabled)
                        creatureTarget->AI()->AttackStart(GetCaster());

                    if (_despawnTime)
                        creatureTarget->DespawnOrUnsummon(_despawnTime);
                }
        }
Exemplo n.º 2
0
 void HandleDummy(SpellEffIndex /*effIndex*/)
 {
     if (Creature* target = GetHitCreature())
     {
         if (target->HasAura(SPELL_PERMANENT_FEIGN_DEATH))
         {
             target->RemoveAurasDueToSpell(SPELL_PERMANENT_FEIGN_DEATH);
             target->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0);
             target->SetUInt32Value(UNIT_FIELD_FLAGS_2, 0);
             target->SetHealth(target->GetMaxHealth() / 2);
             target->SetPower(POWER_MANA, uint32(target->GetMaxPower(POWER_MANA) * 0.75f));
         }
     }
 }
Exemplo n.º 3
0
            void HandleScript(SpellEffIndex /*effIndex*/)
            {
                if (!(GetHitUnit() && GetHitUnit()->isAlive()))
                    return;

                if (Aura* unstable = GetCaster()->GetAura(SPELL_UNSTABLE_OOZE))
                {
                    uint8 newStack = uint8(unstable->GetStackAmount()+1);
                    unstable->SetStackAmount(newStack);

                    // explode!
                    if (newStack >= 5)
                    {
                        GetCaster()->RemoveAurasDueToSpell(SPELL_LARGE_OOZE_BUFF_COMBINE);
                        GetCaster()->RemoveAurasDueToSpell(SPELL_LARGE_OOZE_COMBINE);
                        if (InstanceScript* instance = GetCaster()->GetInstanceScript())
                            if (Creature* rotface = Unit::GetCreature(*GetCaster(), instance->GetData64(DATA_ROTFACE)))
                                if (rotface->isAlive())
                                {
                                    rotface->AI()->Talk(EMOTE_UNSTABLE_EXPLOSION);
                                    rotface->AI()->Talk(SAY_UNSTABLE_EXPLOSION);
                                }

                        if (Creature* cre = GetCaster()->ToCreature())
                            cre->AI()->DoAction(EVENT_STICKY_OOZE);
                        GetCaster()->CastSpell(GetCaster(), SPELL_UNSTABLE_OOZE_EXPLOSION, false, NULL, NULL, GetCaster()->GetGUID());
                        if (InstanceScript* instance = GetCaster()->GetInstanceScript())
                            instance->SetData(DATA_OOZE_DANCE_ACHIEVEMENT, uint32(false));
                    }
                }

                if (TempSummon* summ = GetHitUnit()->ToTempSummon())
                    summ->UnSummon();
                else if (GetHitCreature())
                    GetHitCreature()->ForcedDespawn();
            }
Exemplo n.º 4
0
            void HandleScript(SpellEffIndex /*effIndex*/)
            {
                if (!(GetHitUnit() && GetHitUnit()->isAlive()))
                    return;

                if (Aura* unstable = GetCaster()->GetAura(SPELL_UNSTABLE_OOZE))
                {
                    if (Aura* targetAura = GetHitUnit()->GetAura(SPELL_UNSTABLE_OOZE))
                        unstable->ModStackAmount(targetAura->GetStackAmount());
                    else
                        unstable->ModStackAmount(1);

                    // no idea why, but this does not trigger explosion on retail (only small+large do)
                }

                // just for safety
                GetHitUnit()->RemoveAurasDueToSpell(SPELL_LARGE_OOZE_BUFF_COMBINE);
                GetHitUnit()->RemoveAurasDueToSpell(SPELL_LARGE_OOZE_COMBINE);

                if (TempSummon* summ = GetHitUnit()->ToTempSummon())
                    summ->UnSummon();
                else if (GetHitCreature())
                    GetHitCreature()->ForcedDespawn();
            }
Exemplo n.º 5
0
            void HandleScript(SpellEffIndex /*effIndex*/)
            {
                if (!GetCaster() || !GetHitCreature() || !GetHitCreature()->isAlive())
                    return;

                Aura* unstable = NULL;

                if (!GetCaster()->GetAura(SPELL_UNSTABLE_OOZE))
                {
                    GetCaster()->CastSpell(GetCaster(), SPELL_UNSTABLE_OOZE, true);
                    if (unstable = GetCaster()->GetAura(SPELL_UNSTABLE_OOZE))
                        if (Aura* targetAura = GetHitCreature()->GetAura(SPELL_UNSTABLE_OOZE))
                            unstable->ModStackAmount(targetAura->GetStackAmount());
                }
                else if (unstable = GetCaster()->GetAura(SPELL_UNSTABLE_OOZE))
                {
                    if (Aura* targetAura = GetHitCreature()->GetAura(SPELL_UNSTABLE_OOZE))
                        unstable->ModStackAmount(targetAura->GetStackAmount());
                    else
                        unstable->ModStackAmount(1);
                }

                GetHitCreature()->DespawnOrUnsummon();
            }
Exemplo n.º 6
0
 void HandleDummy(SpellEffIndex /*effIndex*/)
 {
     if (Creature* creatureTarget = GetHitCreature())
     {
         uint32 uiNewEntry = 0;
         switch (creatureTarget->GetEntry())
         {
             case NPC_REANIMATED_FROSTWYRM:  uiNewEntry = NPC_WEAK_REANIMATED_FROSTWYRM; break;
             case NPC_TURGID:                uiNewEntry = NPC_WEAK_TURGID;               break;
             case NPC_DEATHGAZE:             uiNewEntry = NPC_WEAK_DEATHGAZE;            break;
         }
         if (uiNewEntry)
             creatureTarget->UpdateEntry(uiNewEntry);
     }
 }
Exemplo n.º 7
0
        void HandleScriptEffect(SpellEffIndex /*effIndex*/)
        {
            Unit* caster = GetCaster();
            Creature* target = GetHitCreature();
            if (!target || caster == target)
                return;

            target->CastSpell(target->GetPositionX()+irand(-10, 10), target->GetPositionY()+irand(-10, 10), target->GetPositionZ() , SPELL_RACER_DEATH_VISUAL, true);
            target->DespawnOrUnsummon(3000);
            target->CastSpell(target, SPELL_RACER_FLAMES, true);
            caster->CastSpell(caster, SPELL_RACER_KILL_COUNTER, true);

            if (Player* targetSummoner = target->GetCharmerOrOwnerPlayerOrPlayerItself())
            {
                //targetSummoner->RemoveCriteriaProgress(sAchievementCriteriaStore.LookupEntry(RACER_ACHI_CRITERIA)); !ZOMG, ADD ACCESSOR
                targetSummoner->RemoveAurasDueToSpell(SPELL_RACER_KILL_COUNTER);
            }
        }
Exemplo n.º 8
0
 void HandleDummy(SpellEffIndex /*effIndex*/)
 {
     Item* castItem = GetCastItem();
     Unit* caster = GetCaster();
     if (Creature* target = GetHitCreature())
     {
         uint32 spellId = 0;
         switch (target->GetEntry())
         {
             case NPC_SCAVENGEBOT_004A8: spellId = SPELL_SUMMON_SCAVENGEBOT_004A8;    break;
             case NPC_SENTRYBOT_57K:     spellId = SPELL_SUMMON_SENTRYBOT_57K;        break;
             case NPC_DEFENDOTANK_66D:   spellId = SPELL_SUMMON_DEFENDOTANK_66D;      break;
             case NPC_SCAVENGEBOT_005B6: spellId = SPELL_SUMMON_SCAVENGEBOT_005B6;    break;
             case NPC_55D_COLLECTATRON:  spellId = SPELL_SUMMON_55D_COLLECTATRON;     break;
             default:
                 return;
         }
         caster->CastSpell(caster, spellId, true, castItem);
         caster->CastSpell(caster, SPELL_ROBOT_KILL_CREDIT, true);
         target->DespawnOrUnsummon();
     }
 }
            void HandleScript(SpellEffIndex /*effIndex*/)
            {
                if (!(GetHitCreature() && GetHitCreature()->isAlive()))
                    return;

                if (Aura* unstable = GetCaster()->GetAura(SPELL_UNSTABLE_OOZE))
                {
                    if (Aura* targetAura = GetHitCreature()->GetAura(SPELL_UNSTABLE_OOZE))
                        unstable->ModStackAmount(targetAura->GetStackAmount());
                    else
                        unstable->ModStackAmount(1);

                }
                GetHitCreature()->RemoveAurasDueToSpell(SPELL_LARGE_OOZE_BUFF_COMBINE);
                GetHitCreature()->RemoveAurasDueToSpell(SPELL_LARGE_OOZE_COMBINE);
                GetHitCreature()->DespawnOrUnsummon();
            }
Exemplo n.º 10
0
            void HandleScript(SpellEffIndex /*effIndex*/)
            {
                if (!(GetHitCreature() && GetHitCreature()->IsAlive()))
                    return;

                Aura *unstable = GetCaster()->GetAura(SPELL_UNSTABLE_OOZE);
                if (unstable != NULL)
                {
                    Aura *targetAura = GetHitCreature()->GetAura(SPELL_UNSTABLE_OOZE);
                    if (targetAura != NULL)
                        unstable->ModStackAmount(targetAura->GetStackAmount());
                    else
                        unstable->ModStackAmount(1);

                    // no idea why, but this does not trigger explosion on retail (only small+large do)
                }

                // just for safety
                GetHitCreature()->RemoveAurasDueToSpell(SPELL_LARGE_OOZE_BUFF_COMBINE);
                GetHitCreature()->RemoveAurasDueToSpell(SPELL_LARGE_OOZE_COMBINE);
                GetHitCreature()->DespawnOrUnsummon();
            }
Exemplo n.º 11
0
 void HandleEffect(SpellEffIndex /*effIndex*/)
 {
     if (Creature* target = GetHitCreature())
         if (target->GetEntry() == NPC_SNUFFLENOSE_GOPHER)
             target->AI()->DoAction(ACTION_FIND_NEW_TUBBER);
 }
Exemplo n.º 12
0
 void HandleDummy(SpellEffIndex /*effIndex*/)
 {
     if (Creature* target = GetHitCreature())
         target->CastSpell(GetCaster(), SPELL_BUNNY_CREDIT_BEAM, false);
 }
Exemplo n.º 13
0
 void HandleScript(SpellEffIndex /*effIndex*/)
 {
     if (GetHitCreature())
         GetHitCreature()->DespawnOrUnsummon();
 }