aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/world.sql4
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp26
2 files changed, 20 insertions, 10 deletions
diff --git a/sql/world.sql b/sql/world.sql
index e96ffb4388e..48f52900ef4 100644
--- a/sql/world.sql
+++ b/sql/world.sql
@@ -2599,6 +2599,7 @@ DROP TABLE IF EXISTS `script_texts`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `script_texts` (
+ `npc_entry` mediumint(8) NOT NULL default '0' COMMENT 'creature_template entry',
`entry` mediumint(8) NOT NULL,
`content_default` text NOT NULL,
`content_loc1` text,
@@ -2614,10 +2615,11 @@ CREATE TABLE `script_texts` (
`language` tinyint(3) unsigned NOT NULL default '0',
`emote` smallint(5) unsigned NOT NULL default '0',
`comment` text,
- PRIMARY KEY (`entry`)
+ PRIMARY KEY (`npc_entry`,`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Script Texts';
SET character_set_client = @saved_cs_client;
+
--
-- Table structure for table `script_waypoint`
--
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp
index eaf3992dabd..d68c0e3c6b8 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp
@@ -709,18 +709,26 @@ CreatureAI* GetAI_npc_dkc1_gothik(Creature* pCreature)
struct TRINITY_DLL_DECL npc_scarlet_ghoulAI : public ScriptedAI
{
- npc_scarlet_ghoulAI(Creature *c) : ScriptedAI(c) {}
-
- void MoveInLineOfSight(Unit *target)
+ npc_scarlet_ghoulAI(Creature *c) : ScriptedAI(c)
{
- EnterEvadeMode();
- return;
+ me->SetReactState(REACT_DEFENSIVE);
}
- void Aggro(Unit *who)
+
+ void UpdateAI(const uint32 diff)
{
- EnterEvadeMode();
- return;
- }
+ if (Unit *owner = m_creature->GetOwner())
+ {
+ if (owner->GetTypeId() == TYPEID_PLAYER)
+ {
+ if (CAST_PLR(owner)->GetQuestStatus(12698) != QUEST_STATUS_INCOMPLETE)
+ {
+ m_creature->ForcedDespawn();
+ m_creature->GetOwner()->RemoveAllMinionsByEntry(28845);
+ }
+ }
+ }
+ ScriptedAI::UpdateAI(diff);
+ }
};
CreatureAI* GetAI_npc_scarlet_ghoul(Creature* pCreature)