FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[s2815] Implement script support for quest 7632 · scriptdev2/scriptdev2-tbc@8dbcfaa · GitHub

Commit 8dbcfaa

Browse files
authored andcommitted
[s2815] Implement script support for quest 7632
Signed-off-by: Xfurry <xfurry@scriptdev2.com> (based on commit SD2[3070] - 69d70e5) Signed-off-by: Xfurry <xfurry@scriptdev2.com>
1 parent 73a052e commit 8dbcfaa

4 files changed

Lines changed: 61 additions & 2 deletions

File tree

‎scripts/world/areatrigger_scripts.cpp‎

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/* ScriptData
1818
SDName: Areatrigger_Scripts
1919
SD%Complete: 100
20-
SDComment: Quest support: 4291, 6681, 10589/10604
20+
SDComment: Quest support: 4291, 6681, 7632, 10589/10604
2121
SDCategory: Areatrigger
2222
EndScriptData */
2323

@@ -28,6 +28,7 @@ at_ravenholdt
2828
at_childrens_week_spot 3546,3547,3548,3552,3549,3550
2929
at_scent_larkorwi 1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740
3030
at_murkdeep 1966
31+
at_ancient_leaf 3587
3132
EndContentData */
3233

3334
#include "precompiled.h"
@@ -188,6 +189,54 @@ bool AreaTrigger_at_murkdeep(Player* pPlayer, AreaTriggerEntry const* /*pAt*/)
188189
return false;
189190
}
190191

192+
193+
/*######
194+
## at_ancient_leaf
195+
######*/
196+
197+
enum
198+
{
199+
QUEST_ANCIENT_LEAF = 7632,
200+
201+
NPC_VARTRUS = 14524,
202+
NPC_STOMA = 14525,
203+
NPC_HASTAT = 14526,
204+
205+
MAX_ANCIENTS = 3,
206+
};
207+
208+
struct AncientSpawn
209+
{
210+
uint32 uiEntry;
211+
float fX, fY, fZ, fO;
212+
};
213+
214+
static const AncientSpawn afSpawnLocations[MAX_ANCIENTS] =
215+
{
216+
{ NPC_VARTRUS, 6204.051758f, -1172.575684f, 370.079224f, 0.86052f }, // Vartus the Ancient
217+
{ NPC_STOMA, 6246.953613f, -1155.985718f, 366.182953f, 2.90269f }, // Stoma the Ancient
218+
{ NPC_HASTAT, 6193.449219f, -1137.834106f, 366.260529f, 5.77332f }, // Hastat the Ancient
219+
};
220+
221+
bool AreaTrigger_at_ancient_leaf(Player* pPlayer, AreaTriggerEntry const* pAt)
222+
{
223+
if (pPlayer->isGameMaster() || !pPlayer->isAlive())
224+
return false;
225+
226+
// Handle Call Ancients event start - The area trigger summons 3 ancients
227+
if (pPlayer->GetQuestStatus(QUEST_ANCIENT_LEAF) == QUEST_STATUS_COMPLETE)
228+
{
229+
// If ancients are already spawned, skip the rest
230+
if (GetClosestCreatureWithEntry(pPlayer, NPC_VARTRUS, 50.0f) || GetClosestCreatureWithEntry(pPlayer, NPC_STOMA, 50.0f) || GetClosestCreatureWithEntry(pPlayer, NPC_HASTAT, 50.0f))
231+
return true;
232+
233+
for (uint8 i = 0; i < MAX_ANCIENTS; ++i)
234+
pPlayer->SummonCreature(afSpawnLocations[i].uiEntry, afSpawnLocations[i].fX, afSpawnLocations[i].fY, afSpawnLocations[i].fZ, afSpawnLocations[i].fO, TEMPSUMMON_TIMED_DESPAWN, 5 * MINUTE * IN_MILLISECONDS);
235+
}
236+
237+
return false;
238+
}
239+
191240
void AddSC_areatrigger_scripts()
192241
{
193242
Script* pNewScript;
@@ -221,4 +270,9 @@ void AddSC_areatrigger_scripts()
221270
pNewScript->Name = "at_murkdeep";
222271
pNewScript->pAreaTrigger = &AreaTrigger_at_murkdeep;
223272
pNewScript->RegisterSelf();
273+
274+
pNewScript = new Script;
275+
pNewScript->Name = "at_ancient_leaf";
276+
pNewScript->pAreaTrigger = &AreaTrigger_at_ancient_leaf;
277+
pNewScript->RegisterSelf();
224278
}

‎sd2_revision_nr.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#ifndef __SD2_REVISION_NR_H__
22
#define __SD2_REVISION_NR_H__
3-
#define SD2_REVISION_NR "s2814"
3+
#define SD2_REVISION_NR "s2815"
44
#endif // __SD2_REVISION_NR_H__

‎sql/mangos_scriptname_full.sql‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ DELETE FROM scripted_areatrigger WHERE entry IN (4047,4052);
6161
INSERT INTO scripted_areatrigger VALUES
6262
(4047,'at_temple_ahnqiraj'),
6363
(4052,'at_temple_ahnqiraj');
64+
DELETE FROM scripted_areatrigger WHERE entry=3587;
65+
INSERT INTO scripted_areatrigger VALUES (3587,'at_ancient_leaf');
6466

6567

6668
/* BATTLEGROUNDS */

‎sql/updates/r2815_mangos.sql‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
DELETE FROM scripted_areatrigger WHERE entry=3587;
2+
INSERT INTO scripted_areatrigger VALUES
3+
(3587,'at_ancient_leaf');

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL