Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quest https://www.wowhead.com/quest=14485/ticker-required #152

Closed
Elgrimm opened this issue Sep 1, 2023 · 4 comments
Closed

Quest https://www.wowhead.com/quest=14485/ticker-required #152

Elgrimm opened this issue Sep 1, 2023 · 4 comments

Comments

@Elgrimm
Copy link

Elgrimm commented Sep 1, 2023

The item itself, which is supposed to cause a subversive command, does not work.
https://www.wowhead.com/item=49629/gob-squad-flare Does not call for a subversive team... Also, this item is used in the task "Snake Head"
You can fix it by giving the gameobject script that needs to be blown up by the quest https://www.wowhead.com/quest=14485/ticker-required

@Elgrimm
Copy link
Author

Elgrimm commented Sep 1, 2023

class npc_killcredit_ticker : public CreatureScript
{
public:
npc_killcredit_ticker () : CreatureScript("npc_killcredit_ticker ") { }
struct npc_killcredit_ticker AI : public ScriptedAI
{
npc_killcredit_ticker AI(Creature* creature) : ScriptedAI(creature) { }
void MoveInLineOfSight(Unit* who) override
{
if (Player* player = who->ToPlayer())
{
if (player->GetQuestStatus(14485) == QUEST_STATUS_INCOMPLETE)
{
if (GameObject* go = player->FindNearestGameObject(199333, 20,f))
{
if (player->CastSpell(go, 69310, true))
{
player->KilledMonsterCredit(credit);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
}
}
}
}
};
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_killcredit_ticker AI(creature);
}
};

@Elgrimm
Copy link
Author

Elgrimm commented Sep 1, 2023

or
spell script

class spell_gob_squad_flare : public SpellScriptLoader
{
public:
spell_gob_squad_flare() : SpellScriptLoader("spell_gob_squad_flare") { }

class spell_gob_squad_flare_SpellScript : public SpellScript
{
    PrepareSpellScript(spell_gob_squad_flare_SpellScript);

    void HandleDummy(SpellEffIndex /*effIndex*/)
    {
          if (Unit* caster = GetCaster())
          {
            if (GameObject* go = caster->FindNearestGameObject(199333, 25,f))
            {
                caster->ToPlayer()->KilledMonsterCredit(69310);
                go->SetGoState(GO_STATE_READY);
            }
          }
    }

    void Register() override
    {
        OnEffectHitTarget += SpellEffectFn(spell_gob_squad_flarer_SpellScript::HandleDummy, EFFECT_24, SPELL_EFFECT_DUMMY);
    }
};

SpellScript* GetSpellScript() const
{
    return new spell_gob_squad_flare_SpellScript();
}

};

@Elgrimm
Copy link
Author

Elgrimm commented Sep 1, 2023

But this does not solve the problem with the quest https://www.wowhead.com/quest=14484/head-of-the-snake . This item is also used there, and the demolition team should help kill the mini boss.

@Elgrimm
Copy link
Author

Elgrimm commented Sep 1, 2023

hm maybe
void HandleDummy(SpellEffIndex /effIndex/)
{
if (Unit* caster = GetCaster())
{
if (GameObject* go = caster->FindNearestGameObject(199333, 25,f))
{
caster->ToPlayer()->KilledMonsterCredit(69310);
go->SetGoState(GO_STATE_READY);
}
if (Creature* creature = caster->FindNearestCreature(36822, 30,f))
{
caster->ToPlayer()->SummonCreature///
}
}
}

@Elgrimm Elgrimm closed this as completed Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant