mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
fix(Scripts/DB): Improve Demon Portals and convert to SAI (#6140)
This commit is contained in:
@@ -13,7 +13,6 @@ EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_aged_dying_ancient_kodo
|
||||
go_demon_portal
|
||||
EndContentData */
|
||||
|
||||
#include "Player.h"
|
||||
@@ -495,33 +494,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## go_demon_portal
|
||||
######*/
|
||||
|
||||
enum DemonPortal
|
||||
{
|
||||
NPC_DEMON_GUARDIAN = 11937,
|
||||
QUEST_PORTAL_OF_THE_LEGION = 5581
|
||||
};
|
||||
|
||||
class go_demon_portal : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_demon_portal() : GameObjectScript("go_demon_portal") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_PORTAL_OF_THE_LEGION) == QUEST_STATUS_INCOMPLETE && !go->FindNearestCreature(NPC_DEMON_GUARDIAN, 5.0f, true))
|
||||
{
|
||||
if (Creature* guardian = player->SummonCreature(NPC_DEMON_GUARDIAN, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0))
|
||||
guardian->AI()->AttackStart(player);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_desolace()
|
||||
{
|
||||
// Ours
|
||||
@@ -529,5 +501,4 @@ void AddSC_desolace()
|
||||
|
||||
// Theirs
|
||||
new npc_aged_dying_ancient_kodo();
|
||||
new go_demon_portal();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user