DB/GameObject: Convert & update support for Shrine of the Eagle / Falcon / Hawk to SAI

Closes #24647
This commit is contained in:
offl
2020-05-21 23:52:02 +02:00
committed by Killyana
parent 626aeb5817
commit 0cfd63fd26
2 changed files with 86 additions and 58 deletions

View File

@@ -18,7 +18,6 @@
/* ContentData
go_ethereum_prison
go_ethereum_stasis
go_shrine_of_the_birds
go_southfury_moonstone
go_resonite_cask
go_tablet_of_the_seven
@@ -265,62 +264,6 @@ public:
}
};
/*######
## go_shrine_of_the_birds
######*/
enum ShrineOfTheBirds
{
NPC_HAWK_GUARD = 22992,
NPC_EAGLE_GUARD = 22993,
NPC_FALCON_GUARD = 22994,
GO_SHRINE_HAWK = 185551,
GO_SHRINE_EAGLE = 185547,
GO_SHRINE_FALCON = 185553
};
class go_shrine_of_the_birds : public GameObjectScript
{
public:
go_shrine_of_the_birds() : GameObjectScript("go_shrine_of_the_birds") { }
struct go_shrine_of_the_birdsAI : public GameObjectAI
{
go_shrine_of_the_birdsAI(GameObject* go) : GameObjectAI(go) { }
bool GossipHello(Player* player) override
{
uint32 BirdEntry = 0;
float fX, fY, fZ;
me->GetClosePoint(fX, fY, fZ, me->GetCombatReach(), INTERACTION_DISTANCE);
switch (me->GetEntry())
{
case GO_SHRINE_HAWK:
BirdEntry = NPC_HAWK_GUARD;
break;
case GO_SHRINE_EAGLE:
BirdEntry = NPC_EAGLE_GUARD;
break;
case GO_SHRINE_FALCON:
BirdEntry = NPC_FALCON_GUARD;
break;
}
if (BirdEntry)
player->SummonCreature(BirdEntry, fX, fY, fZ, me->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
return false;
}
};
GameObjectAI* GetAI(GameObject* go) const override
{
return new go_shrine_of_the_birdsAI(go);
}
};
/*######
## go_southfury_moonstone
######*/
@@ -1748,7 +1691,6 @@ public:
void AddSC_go_scripts()
{
new go_gilded_brazier();
new go_shrine_of_the_birds();
new go_southfury_moonstone();
new go_tablet_of_the_seven();
new go_ethereum_prison();