aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/FULL/world_script_texts.sql2
-rw-r--r--sql/FULL/world_scripts_full.sql1
-rw-r--r--sql/updates/7054_world_script_texts.sql6
-rw-r--r--sql/updates/7054_world_scriptname.sql2
-rw-r--r--src/bindings/scripts/scripts/kalimdor/dustwallow_marsh.cpp73
5 files changed, 83 insertions, 1 deletions
diff --git a/sql/FULL/world_script_texts.sql b/sql/FULL/world_script_texts.sql
index 9294373133f..7ffd4e5d7c6 100644
--- a/sql/FULL/world_script_texts.sql
+++ b/sql/FULL/world_script_texts.sql
@@ -421,6 +421,8 @@ INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`
(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,''),
+ (23864,-1000472,'This land was mine long before your wretched kind set foot here.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''),
+ (23864,-1000473,'All who venture here belong to me, including you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,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/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index 8a7170b05ae..3529cc224f1 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -542,6 +542,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_lady_jaina_proudmoore' WHERE `e
UPDATE `creature_template` SET `ScriptName`='npc_nat_pagle' WHERE `entry`=12919;
UPDATE `creature_template` SET `ScriptName`='npc_restless_apparition' WHERE `entry`=23861;
UPDATE `creature_template` SET `ScriptName`='npc_private_hendel' WHERE `entry`=4966;
+UPDATE `creature_template` SET `ScriptName`='npc_zelfrax' WHERE `entry`=23864;
/* EASTERN PLAGUELANDS */
UPDATE `creature_template` SET `ScriptName`='mobs_ghoul_flayer' WHERE `entry` IN (8530,8531,8532);
diff --git a/sql/updates/7054_world_script_texts.sql b/sql/updates/7054_world_script_texts.sql
new file mode 100644
index 00000000000..255b9a4bd2d
--- /dev/null
+++ b/sql/updates/7054_world_script_texts.sql
@@ -0,0 +1,6 @@
+DELETE FROM `script_texts` WHERE `entry` IN (-1000471,-1000472,-1000473);
+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,-1000471,'It was... terrible... the demon...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''),
+ (23864,-1000472,'This land was mine long before your wretched kind set foot here.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''),
+ (23864,-1000473,'All who venture here belong to me, including you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'');
+
diff --git a/sql/updates/7054_world_scriptname.sql b/sql/updates/7054_world_scriptname.sql
new file mode 100644
index 00000000000..9ac294e19cd
--- /dev/null
+++ b/sql/updates/7054_world_scriptname.sql
@@ -0,0 +1,2 @@
+UPDATE `creature_template` SET `ScriptName`='npc_zelfrax' WHERE `entry`=23864;
+
diff --git a/src/bindings/scripts/scripts/kalimdor/dustwallow_marsh.cpp b/src/bindings/scripts/scripts/kalimdor/dustwallow_marsh.cpp
index f2c17d464eb..7b0bd8f13d0 100644
--- a/src/bindings/scripts/scripts/kalimdor/dustwallow_marsh.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/dustwallow_marsh.cpp
@@ -310,9 +310,75 @@ CreatureAI* GetAI_npc_private_hendel(Creature* pCreature)
}
/*######
-##
+## npc_zelfrax
######*/
+const Position MovePosition = {-2967.030,-3872.1799,35.620};
+
+enum eZelfrax
+{
+ SAY_ZELFRAX = -1000472,
+ SAY_ZELFRAX_2 = -1000473
+};
+
+struct TRINITY_DLL_DECL npc_zelfraxAI : public ScriptedAI
+{
+ npc_zelfraxAI(Creature* pCreature) : ScriptedAI(pCreature)
+ {
+ MoveToDock();
+ }
+
+ void AttackStart(Unit* pWho)
+ {
+ if (!pWho)
+ return;
+
+ if (m_creature->Attack(pWho, true))
+ {
+ m_creature->SetInCombatWith(pWho);
+ pWho->SetInCombatWith(m_creature);
+
+ if (IsCombatMovement())
+ m_creature->GetMotionMaster()->MoveChase(pWho);
+ }
+ }
+
+ void MovementInform(uint32 uiType, uint32 uiId)
+ {
+ if (uiType != POINT_MOTION_TYPE)
+ return;
+
+ m_creature->SetHomePosition(m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation());
+ m_creature->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ SetCombatMovement(true);
+
+ if (m_creature->isInCombat())
+ if (Unit* pUnit = m_creature->getVictim())
+ m_creature->GetMotionMaster()->MoveChase(pUnit);
+ }
+
+ void MoveToDock()
+ {
+ SetCombatMovement(false);
+ m_creature->GetMotionMaster()->MovePoint(0,MovePosition);
+ DoScriptText(SAY_ZELFRAX,m_creature);
+ DoScriptText(SAY_ZELFRAX_2,m_creature);
+ }
+
+ void UpdateAI(uint32 const uiDiff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+CreatureAI* GetAI_npc_zelfrax(Creature* pCreature)
+{
+ return new npc_zelfraxAI(pCreature);
+}
+
void AddSC_dustwallow_marsh()
{
Script *newscript;
@@ -350,5 +416,10 @@ void AddSC_dustwallow_marsh()
newscript->GetAI = &GetAI_npc_private_hendel;
newscript->pQuestAccept = &QuestAccept_npc_private_hendel;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_zelfrax";
+ newscript->GetAI = &GetAI_npc_zelfrax;
+ newscript->RegisterSelf();
}