aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/kalimdor/zulfarrak/zulfarrak.cpp34
1 files changed, 32 insertions, 2 deletions
diff --git a/src/bindings/scripts/scripts/kalimdor/zulfarrak/zulfarrak.cpp b/src/bindings/scripts/scripts/kalimdor/zulfarrak/zulfarrak.cpp
index 4e630368db1..8c6442ade4f 100644
--- a/src/bindings/scripts/scripts/kalimdor/zulfarrak/zulfarrak.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/zulfarrak/zulfarrak.cpp
@@ -38,7 +38,7 @@ EndContentData */
#define SPELL_SHIELD_BASH 11972
#define SPELL_REVENGE 12170
-#define GOSSIP_BLY "[PH] In that case, i will take my reward!"
+#define GOSSIP_BLY "[PH] In that case, I will take my reward!"
struct TRINITY_DLL_DECL npc_sergeant_blyAI : public ScriptedAI
{
@@ -202,6 +202,32 @@ bool GossipSelect_npc_weegli_blastfuse(Player* pPlayer, Creature* pCreature, uin
return true;
}
+/*######
+## go_shallow_grave
+######*/
+
+enum {
+ ZOMBIE = 7286,
+ DEAD_HERO = 7276,
+ ZOMBIE_CHANCE = 65,
+ DEAD_HERO_CHANCE = 10
+};
+
+bool GOHello_go_shallow_grave(Player* pPlayer, GameObject* pGo)
+{
+ // randomly summon a zombie or dead hero the first time a grave is used
+ if (pGo->GetUseCount() == 0)
+ {
+ uint32 randomchance = urand(0,100);
+ if (randomchance < ZOMBIE_CHANCE)
+ pGo->SummonCreature(ZOMBIE, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
+ else if ((randomchance-ZOMBIE_CHANCE) < DEAD_HERO_CHANCE)
+ pGo->SummonCreature(DEAD_HERO, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
+ }
+ pGo->AddUse();
+ return false;
+}
+
void AddSC_zulfarrak()
{
Script *newscript;
@@ -219,5 +245,9 @@ void AddSC_zulfarrak()
newscript->pGossipHello = &GossipHello_npc_weegli_blastfuse;
newscript->pGossipSelect = &GossipSelect_npc_weegli_blastfuse;
newscript->RegisterSelf();
-}
+ newscript = new Script;
+ newscript->Name="go_shallow_grave";
+ newscript->pGOHello = &GOHello_go_shallow_grave;
+ newscript->RegisterSelf();
+}