Dustwallow Marsh: Implemented basic support for quest "Cleansing Witch Hill" (11183).

--HG--
branch : trunk
This commit is contained in:
_manuel_
2010-01-16 02:40:18 -03:00
parent 4a1276e3d3
commit d728effd10
5 changed files with 83 additions and 1 deletions
+2
View File
@@ -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'),
+1
View File
@@ -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);
+6
View File
@@ -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,'');
+2
View File
@@ -0,0 +1,2 @@
UPDATE `creature_template` SET `ScriptName`='npc_zelfrax' WHERE `entry`=23864;
@@ -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();
}