fix(Script) Quest "Deactivating the Spire" (#9874)

* fix(Script) Quest "Deactivating the Spire"

* Update go_scripts.cpp

* Update go_scripts.cpp

Co-authored-by: acidmanifesto <joshua.lee.betts@gmail.com>
This commit is contained in:
Malcrom
2021-12-25 07:50:52 -04:00
committed by GitHub
parent 0917bc8f53
commit 5abfe27365
2 changed files with 28 additions and 0 deletions

View File

@@ -1928,6 +1928,30 @@ public:
}
};
/*########
#### go_duskwither_spire_power_source
#####*/
enum DuskwitherSpirePowersource
{
NPC_POWER_SOURCE_INVISIBLE_BUNNY = 17984
};
class go_duskwither_spire_power_source : public GameObjectScript
{
public:
go_duskwither_spire_power_source() : GameObjectScript("go_duskwither_spire_power_source") {}
bool OnGossipHello(Player* /*player*/, GameObject* go) override
{
if (Creature* bunny = go->FindNearestCreature(NPC_POWER_SOURCE_INVISIBLE_BUNNY, 1.0f))
{
bunny->DespawnOrUnsummon(0ms, 10s);
}
return false;
}
};
void AddSC_go_scripts()
{
// Ours
@@ -1943,6 +1967,7 @@ void AddSC_go_scripts()
new go_flames();
new go_heat();
new go_bear_trap();
new go_duskwither_spire_power_source();
// Theirs
new go_brewfest_music();