aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChaz Brown <iamparadox@netscape.net>2009-09-10 01:48:09 -0400
committerChaz Brown <iamparadox@netscape.net>2009-09-10 01:48:09 -0400
commitce0a56b25523f5e8a2db21a6361c40d03667cc29 (patch)
tree2a388651aa2152e9ed02e8804887b0497a259595
parenta67246587a47da04d95f367ec279615ba9a0c67a (diff)
Add forgotten change to world.sql and update script for scarlet ghouls (quest 12698) so they are in defensive mode. Also make it so, if you abandon the quest, you don't get to keep your minions... Still need some official info on these, if anyone can help.
--HG-- branch : trunk
-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)