mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
fix(Core/Scripts) Add respawn timer to wind stones (#9392)
This commit is contained in:
@@ -1010,6 +1010,11 @@ public:
|
||||
{
|
||||
go_wind_stoneAI(GameObject* go) : GameObjectAI(go) {}
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
me->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
bool GossipHello(Player* player, bool reportUse) override
|
||||
{
|
||||
if (reportUse)
|
||||
@@ -1048,10 +1053,13 @@ public:
|
||||
|
||||
bool GossipSelect(Player* player, uint32 sender, uint32 action) override
|
||||
{
|
||||
Seconds respawnTimer = 0s;
|
||||
player->PlayerTalkClass->SendCloseGossip();
|
||||
|
||||
if (sender == GOSSIPID_LESSER_WS)
|
||||
{
|
||||
respawnTimer = 300s; // Lesser Windstone respawn in 5 minutes
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case 0:
|
||||
@@ -1075,6 +1083,8 @@ public:
|
||||
}
|
||||
else if (sender == GOSSIPID_WS)
|
||||
{
|
||||
respawnTimer = 900s; // Windstone respawn in 15 minutes
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case 0:
|
||||
@@ -1098,6 +1108,8 @@ public:
|
||||
}
|
||||
else if (sender == GOSSIPID_GREATER_WS)
|
||||
{
|
||||
respawnTimer = 10800s; // Greater Windstone respawn in 3 hours
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case 0:
|
||||
@@ -1119,6 +1131,10 @@ public:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
me->DespawnOrUnsummon(5000ms, respawnTimer); // Despawn in 5 Seconds for respawnTimer value
|
||||
me->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
CloseGossipMenuFor(player);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user