| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 73a052e commit 8dbcfaa
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,7 +17,7 @@ | |||
| 17 | 17 | /* ScriptData | |
| 18 | 18 | SDName: Areatrigger_Scripts | |
| 19 | 19 | SD%Complete: 100 | |
| 20 | - SDComment: Quest support: 4291, 6681, 10589/10604 | ||
| 20 | + SDComment: Quest support: 4291, 6681, 7632, 10589/10604 | ||
| 21 | 21 | SDCategory: Areatrigger | |
| 22 | 22 | EndScriptData */ | |
| 23 | 23 | ||
@@ -28,6 +28,7 @@ at_ravenholdt | |||
| 28 | 28 | at_childrens_week_spot 3546,3547,3548,3552,3549,3550 | |
| 29 | 29 | at_scent_larkorwi 1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740 | |
| 30 | 30 | at_murkdeep 1966 | |
| 31 | + at_ancient_leaf 3587 | ||
| 31 | 32 | EndContentData */ | |
| 32 | 33 | ||
| 33 | 34 | #include "precompiled.h" | |
@@ -188,6 +189,54 @@ bool AreaTrigger_at_murkdeep(Player* pPlayer, AreaTriggerEntry const* /*pAt*/) | |||
| 188 | 189 | return false; | |
| 189 | 190 | } | |
| 190 | 191 | ||
| 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 | + | ||
| 191 | 240 | void AddSC_areatrigger_scripts() | |
| 192 | 241 | { | |
| 193 | 242 | Script* pNewScript; | |
@@ -221,4 +270,9 @@ void AddSC_areatrigger_scripts() | |||
| 221 | 270 | pNewScript->Name = "at_murkdeep"; | |
| 222 | 271 | pNewScript->pAreaTrigger = &AreaTrigger_at_murkdeep; | |
| 223 | 272 | pNewScript->RegisterSelf(); | |
| 273 | + | ||
| 274 | + pNewScript = new Script; | ||
| 275 | + pNewScript->Name = "at_ancient_leaf"; | ||
| 276 | + pNewScript->pAreaTrigger = &AreaTrigger_at_ancient_leaf; | ||
| 277 | + pNewScript->RegisterSelf(); | ||
| 224 | 278 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | 1 | #ifndef __SD2_REVISION_NR_H__ | |
| 2 | 2 | #define __SD2_REVISION_NR_H__ | |
| 3 | - #define SD2_REVISION_NR "s2814" | ||
| 3 | + #define SD2_REVISION_NR "s2815" | ||
| 4 | 4 | #endif // __SD2_REVISION_NR_H__ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -61,6 +61,8 @@ DELETE FROM scripted_areatrigger WHERE entry IN (4047,4052); | |||
| 61 | 61 | INSERT INTO scripted_areatrigger VALUES | |
| 62 | 62 | (4047,'at_temple_ahnqiraj'), | |
| 63 | 63 | (4052,'at_temple_ahnqiraj'); | |
| 64 | + DELETE FROM scripted_areatrigger WHERE entry=3587; | ||
| 65 | + INSERT INTO scripted_areatrigger VALUES (3587,'at_ancient_leaf'); | ||
| 64 | 66 | ||
| 65 | 67 | ||
| 66 | 68 | /* BATTLEGROUNDS */ | |
| Original file line number | Diff line number | Diff 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'); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments