aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/FULL/world_script_texts.sql3
-rw-r--r--sql/updates/7053_world_script_texts.sql6
-rw-r--r--src/bindings/scripts/scripts/kalimdor/dustwallow_marsh.cpp58
3 files changed, 46 insertions, 21 deletions
diff --git a/sql/FULL/world_script_texts.sql b/sql/FULL/world_script_texts.sql
index 04e7a674ac3..9294373133f 100644
--- a/sql/FULL/world_script_texts.sql
+++ b/sql/FULL/world_script_texts.sql
@@ -418,6 +418,9 @@ INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`
(349,-1000466,'The Blackrock infestation is thick in these parts. I will do my best to keep the pace. Let''s go!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''),
(349,-1000467,'Marshal Marris, sir. Corporal Keeshan of the 12th Sabre Regiment returned from battle and reporting for duty!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''),
(349,-1000468,'Brave adventurer, thank you for rescuing me! I am sure Marshal Marris will reward your kind deed.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''),
+ (23861,-1000469,'It is too late for us, living one. Take yourself and your friend away from here before you both are... claimed...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''),
+ (23861,-1000470,'Go away, whoever you are! Witch Hill is mine... mine!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''),
+ (23861,-1000471,'It was... terrible... the demon...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''),
-- -1 033 000 SHADOWFANG KEEP
(0,-1033000,'Follow me and I''ll open the courtyard door for you.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,7,1,'prisoner ashcrombe SAY_FREE_AS'),
diff --git a/sql/updates/7053_world_script_texts.sql b/sql/updates/7053_world_script_texts.sql
new file mode 100644
index 00000000000..5b20f6907a6
--- /dev/null
+++ b/sql/updates/7053_world_script_texts.sql
@@ -0,0 +1,6 @@
+DELETE FROM `script_texts` WHERE entry IN (-1000469,-1000470,-1000471);
+INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
+ (23861,-1000469,'It is too late for us, living one. Take yourself and your friend away from here before you both are... claimed...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''),
+ (23861,-1000470,'Go away, whoever you are! Witch Hill is mine... mine!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''),
+ (23861,-1000471,'It was... terrible... the demon...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,'');
+
diff --git a/src/bindings/scripts/scripts/kalimdor/dustwallow_marsh.cpp b/src/bindings/scripts/scripts/kalimdor/dustwallow_marsh.cpp
index b9d574ea959..f2c17d464eb 100644
--- a/src/bindings/scripts/scripts/kalimdor/dustwallow_marsh.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/dustwallow_marsh.cpp
@@ -39,12 +39,15 @@ EndContentData */
enum eHuskSpirit
{
- QUEST_WHATS_HAUNTING_WITCH_HILL = 11180,
- SPELL_SUMMON_RESTLESS_APPARITION = 42511,
- SPELL_CONSUME_FLESH = 37933, //Risen Husk
- SPELL_INTANGIBLE_PRESENCE = 43127, //Risen Spirit
- NPC_RISEN_HUSK = 23555,
- NPC_RISEN_SPIRIT = 23554
+ QUEST_WHATS_HAUNTING_WITCH_HILL = 11180,
+
+ SPELL_SUMMON_RESTLESS_APPARITION = 42511,
+ SPELL_CONSUME_FLESH = 37933, //Risen Husk
+ SPELL_INTANGIBLE_PRESENCE = 43127, //Risen Spirit
+
+ NPC_RISEN_HUSK = 23555,
+ NPC_RISEN_SPIRIT = 23554,
+ NPC_RESTLESS_APPARITION = 23861
};
struct TRINITY_DLL_DECL mobs_risen_husk_spiritAI : public ScriptedAI
@@ -60,15 +63,6 @@ struct TRINITY_DLL_DECL mobs_risen_husk_spiritAI : public ScriptedAI
m_uiIntangiblePresence_Timer = 5000;
}
- void DamageTaken(Unit* pDoneBy, uint32 &damage)
- {
- if (pDoneBy->GetTypeId() == TYPEID_PLAYER)
- {
- if (damage >= m_creature->GetHealth() && CAST_PLR(pDoneBy)->GetQuestStatus(QUEST_WHATS_HAUNTING_WITCH_HILL) == QUEST_STATUS_INCOMPLETE)
- DoCast(pDoneBy, SPELL_SUMMON_RESTLESS_APPARITION, false);
- }
- }
-
void UpdateAI(const uint32 uiDiff)
{
if (!UpdateVictim())
@@ -96,6 +90,16 @@ struct TRINITY_DLL_DECL mobs_risen_husk_spiritAI : public ScriptedAI
DoMeleeAttackIfReady();
}
+
+ void JustDied(Unit* pKiller)
+ {
+ if (pKiller->GetTypeId() == TYPEID_PLAYER)
+ if (CAST_PLR(pKiller)->GetQuestStatus(QUEST_WHATS_HAUNTING_WITCH_HILL) == QUEST_STATUS_INCOMPLETE)
+ {
+ DoCast(pKiller, SPELL_SUMMON_RESTLESS_APPARITION, true);
+ CAST_PLR(pKiller)->KilledMonsterCredit(NPC_RESTLESS_APPARITION,0);
+ }
+ }
};
CreatureAI* GetAI_mobs_risen_husk_spirit(Creature* pCreature)
@@ -107,14 +111,26 @@ CreatureAI* GetAI_mobs_risen_husk_spirit(Creature* pCreature)
## npc_restless_apparition
######*/
-bool GossipHello_npc_restless_apparition(Player* pPlayer, Creature* pCreature)
+enum eRestlessApparition
{
- pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ SAY_RESTLESS_1 = -1000469,
+ SAY_RESTLESS_2 = -1000470,
+ SAY_RESTLESS_3 = -1000471
+};
- pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID());
- pCreature->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+struct TRINITY_DLL_DECL npc_restless_apparitionAI : public ScriptedAI
+{
+ npc_restless_apparitionAI(Creature* pCreature) : ScriptedAI(pCreature) {}
- return true;
+ void Reset()
+ {
+ DoScriptText(RAND(SAY_RESTLESS_1,SAY_RESTLESS_2,SAY_RESTLESS_3), m_creature);
+ }
+};
+
+CreatureAI* GetAI_npc_restless_apparition(Creature* pCreature)
+{
+ return new npc_restless_apparitionAI (pCreature);
}
/*######
@@ -308,7 +324,7 @@ void AddSC_dustwallow_marsh()
newscript = new Script;
newscript->Name = "npc_restless_apparition";
- newscript->pGossipHello = &GossipHello_npc_restless_apparition;
+ newscript->GetAI = &GetAI_npc_restless_apparition;
newscript->RegisterSelf();
newscript = new Script;