mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 03:12:09 +01:00
DB/Quest: Move Ulag the Cleaver to SAI
This commit is contained in:
@@ -144,85 +144,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## go_mausoleum_door
|
||||
## go_mausoleum_trigger
|
||||
######*/
|
||||
|
||||
enum Mausoleum
|
||||
{
|
||||
QUEST_ULAG = 1819,
|
||||
NPC_ULAG = 6390,
|
||||
GO_TRIGGER = 104593,
|
||||
GO_DOOR = 176594
|
||||
};
|
||||
|
||||
class go_mausoleum_door : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_mausoleum_door() : GameObjectScript("go_mausoleum_door") { }
|
||||
|
||||
struct go_mausoleum_doorAI : public GameObjectAI
|
||||
{
|
||||
go_mausoleum_doorAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_ULAG) != QUEST_STATUS_INCOMPLETE)
|
||||
return false;
|
||||
|
||||
if (!player->FindNearestCreature(NPC_ULAG, 50.0f))
|
||||
{
|
||||
if (GameObject* pTrigger = player->FindNearestGameObject(GO_TRIGGER, 30.0f))
|
||||
{
|
||||
pTrigger->SetGoState(GO_STATE_READY);
|
||||
player->SummonCreature(NPC_ULAG, 2390.26f, 336.47f, 40.01f, 2.26f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
GameObjectAI* GetAI(GameObject* go) const override
|
||||
{
|
||||
return new go_mausoleum_doorAI(go);
|
||||
}
|
||||
};
|
||||
|
||||
class go_mausoleum_trigger : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_mausoleum_trigger() : GameObjectScript("go_mausoleum_trigger") { }
|
||||
|
||||
struct go_mausoleum_triggerAI : public GameObjectAI
|
||||
{
|
||||
go_mausoleum_triggerAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_ULAG) != QUEST_STATUS_INCOMPLETE)
|
||||
return false;
|
||||
|
||||
if (GameObject* pDoor = player->FindNearestGameObject(GO_DOOR, 30.0f))
|
||||
{
|
||||
me->SetGoState(GO_STATE_ACTIVE);
|
||||
pDoor->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
GameObjectAI* GetAI(GameObject* go) const override
|
||||
{
|
||||
return new go_mausoleum_triggerAI(go);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_tirisfal_glades()
|
||||
{
|
||||
new npc_calvin_montague();
|
||||
new go_mausoleum_door();
|
||||
new go_mausoleum_trigger();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user