Merge [SD2]

r1296 Fix typo and check for IN_PROGRESS instead of NOT_STARTED and also return after force EnterEvadeMode in UpdateAI - skip
r1297 Set sysconfdir path in different way for linux compile, to avoid possible DOTCONF++ error at start. Patch by Saeldur - skip
r1298 Fix typo in MC instance script.
r1299 Clean up one MC boss script and remove old workarounds. Patch by Reve
r1300 Add gossip to npc_naladu. Patch by hoshie
r1301 Some minor cleanup and move one folder+source file

--HG--
branch : trunk
This commit is contained in:
Kudlaty
2009-08-16 02:46:55 +02:00
parent 93709273ec
commit 61ed8f90df
11 changed files with 151 additions and 132 deletions

View File

@@ -568,7 +568,7 @@ INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content
INSERT INTO `script_texts` (`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
(-1409000,'%s performs one last service for Ragnaros.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0,'geddon EMOTE_SERVICE'),
(-1409001,'%s goes into a killing frenzy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0,'magmadar EMOTE_FRENZY'),
(-1409002,'%s refuses to die while its master is in trouble.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0,'core rager EMOTE_AEGIS'),
(-1409002,'%s refuses to die while its master is in trouble.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0,'core rager EMOTE_LOWHP'),
(-1409003,'Reckless mortals, none may challenge the sons of the living flame!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8035, 1, 0, 0,'majordomo SAY_AGGRO'),
(-1409004,'The runes of warding have been destroyed! Hunt down the infedels my bretheren.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8039, 1, 0, 0,'majordomo SAY_SPAWN'),
(-1409005,'Ashes to Ashes!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8037, 1, 0, 0,'majordomo SAY_SLAY'),

View File

@@ -546,6 +546,7 @@ UPDATE `creature_template` SET `ScriptName`='boss_doomlord_kazzak' WHERE `entry`
UPDATE `creature_template` SET `ScriptName`='npc_wounded_blood_elf' WHERE `entry`=16993;
UPDATE `creature_template` SET `ScriptName`='npc_aeranas' WHERE `entry`=17085;
UPDATE `gameobject_template` SET `ScriptName`='go_haaleshi_altar' WHERE `entry`=181606;
UPDATE `creature_template` SET `ScriptName`='npc_naladu' WHERE `entry`=19361;
/* HILLSBRAD FOOTHILLS */

View File

@@ -0,0 +1,3 @@
UPDATE script_texts SET comment='core rager EMOTE_LOWHP' WHERE entry=-1409002;
UPDATE creature_template SET ScriptName='npc_naladu' WHERE entry=19361;

View File

@@ -16,6 +16,7 @@ SET(trinityscript_LIB_SRCS
include/sc_creature.h
include/sc_gossip.h
include/sc_instance.h
scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp
scripts/eastern_kingdoms/alterac_mountains.cpp
scripts/eastern_kingdoms/arathi_highlands.cpp
scripts/eastern_kingdoms/blasted_lands.cpp
@@ -184,7 +185,6 @@ SET(trinityscript_LIB_SRCS
scripts/zone/coilfang_resevoir/underbog/boss_the_black_stalker.cpp
scripts/zone/deadmines/def_deadmines.h
scripts/zone/deadmines/deadmines.cpp
scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
scripts/zone/gruuls_lair/boss_gruul.cpp
scripts/zone/gruuls_lair/boss_high_king_maulgar.cpp
scripts/zone/gruuls_lair/def_gruuls_lair.h

View File

@@ -394,6 +394,14 @@
<Filter
Name="eastern_kingdoms"
>
<Filter
Name="scarlet_enclave"
>
<File
RelativePath="..\scripts\eastern_kingdoms\scarlet_enclave\the_scarlet_enclave.cpp"
>
</File>
</Filter>
<File
RelativePath="..\scripts\eastern_kingdoms\alterac_mountains.cpp"
>
@@ -1325,22 +1333,6 @@
>
</File>
</Filter>
<Filter
Name="Duskwood"
>
</Filter>
<Filter
Name="Eastern Plaguelands"
>
<File
RelativePath="..\scripts\zone\eastern_plaguelands\the_scarlet_enclave.cpp"
>
</File>
</Filter>
<Filter
Name="Redridge Mountains"
>
</Filter>
<Filter
Name="Scarlet Monastery"
>

View File

@@ -391,6 +391,14 @@
<Filter
Name="eastern_kingdoms"
>
<Filter
Name="scarlet_enclave"
>
<File
RelativePath="..\scripts\eastern_kingdoms\scarlet_enclave\the_scarlet_enclave.cpp"
>
</File>
</Filter>
<File
RelativePath="..\scripts\eastern_kingdoms\alterac_mountains.cpp"
>
@@ -1322,22 +1330,6 @@
>
</File>
</Filter>
<Filter
Name="Duskwood"
>
</Filter>
<Filter
Name="Eastern Plaguelands"
>
<File
RelativePath="..\scripts\zone\eastern_plaguelands\the_scarlet_enclave.cpp"
>
</File>
</Filter>
<Filter
Name="Redridge Mountains"
>
</Filter>
<Filter
Name="Scarlet Monastery"
>

View File

@@ -24,6 +24,7 @@ EndScriptData */
/* ContentData
npc_aeranas
go_haaleshi_altar
npc_naladu
npc_wounded_blood_elf
EndContentData */
@@ -126,6 +127,35 @@ bool GOHello_go_haaleshi_altar(Player* pPlayer, GameObject* pGo)
return false;
}
/*######
## npc_naladu
######*/
#define GOSSIP_NALADU_ITEM1 "Why don't you escape?"
enum
{
GOSSIP_TEXTID_NALADU1 = 9788
};
bool GossipHello_npc_naladu(Player* pPlayer, Creature* pCreature)
{
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_NALADU_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
return true;
}
bool GossipSelect_npc_naladu(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_NALADU1, pCreature->GetGUID());
return true;
}
/*######
## npc_wounded_blood_elf
######*/
@@ -232,6 +262,12 @@ void AddSC_hellfire_peninsula()
newscript->pGOHello = &GOHello_go_haaleshi_altar;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "npc_naladu";
newscript->pGossipHello = &GossipHello_npc_naladu;
newscript->pGossipSelect = &GossipSelect_npc_naladu;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name="npc_wounded_blood_elf";
newscript->GetAI = &GetAI_npc_wounded_blood_elf;

View File

@@ -17,98 +17,101 @@
/* ScriptData
SDName: Boss_Golemagg
SD%Complete: 90
SDComment:
SDComment: Timers need to be confirmed, Golemagg's Trust need to be checked
SDCategory: Molten Core
EndScriptData */
#include "precompiled.h"
#include "def_molten_core.h"
#define EMOTE_AEGIS -1409002
enum
{
SPELL_MAGMASPLASH = 13879,
SPELL_PYROBLAST = 20228,
SPELL_EARTHQUAKE = 19798,
SPELL_ENRAGE = 19953,
SPELL_GOLEMAGG_TRUST = 20553,
#define SPELL_MAGMASPLASH 13879
#define SPELL_PYROBLAST 20228
#define SPELL_EARTHQUAKE 19798
#define SPELL_ENRAGE 19953
#define SPELL_BUFF 20553
//-- CoreRager Spells --
#define SPELL_MANGLE 19820
#define SPELL_AEGIS 20620 //This is self casted whenever we are below 50%
// Core Rager
EMOTE_LOWHP = -1409002,
SPELL_MANGLE = 19820
};
struct TRINITY_DLL_DECL boss_golemaggAI : public ScriptedAI
{
boss_golemaggAI(Creature *c) : ScriptedAI(c)
boss_golemaggAI(Creature* pCreature) : ScriptedAI(pCreature)
{
pInstance = c->GetInstanceData();
m_pInstance = pCreature->GetInstanceData();
}
ScriptedInstance *pInstance;
uint32 Pyroblast_Timer;
uint32 EarthQuake_Timer;
uint32 Enrage_Timer;
uint32 Buff_Timer;
ScriptedInstance* m_pInstance;
uint32 m_uiPyroblastTimer;
uint32 m_uiEarthquakeTimer;
uint32 m_uiBuffTimer;
bool m_bEnraged;
void Reset()
{
Pyroblast_Timer = 7000; //These times are probably wrong
EarthQuake_Timer = 3000;
Buff_Timer = 2500;
Enrage_Timer = 0;
m_uiPyroblastTimer = 7*IN_MILISECONDS; // These timers are probably wrong
m_uiEarthquakeTimer = 3*IN_MILISECONDS;
m_uiBuffTimer = 2.5*IN_MILISECONDS;
m_bEnraged = false;
m_creature->CastSpell(m_creature,SPELL_MAGMASPLASH,true);
m_creature->CastSpell(m_creature, SPELL_MAGMASPLASH, true);
}
void EnterCombat(Unit *who)
void JustDied(Unit* pKiller)
{
if (m_pInstance)
m_pInstance->SetData(DATA_GOLEMAGG_DEATH, 0);
}
void JustDied(Unit* Killer)
{
if (pInstance)
pInstance->SetData(DATA_GOLEMAGG_DEATH, 0);
}
void UpdateAI(const uint32 diff)
void UpdateAI(const uint32 uiDiff)
{
if (!UpdateVictim())
return;
//Pyroblast_Timer
if (Pyroblast_Timer < diff)
//Pyroblast
if (m_uiPyroblastTimer < uiDiff)
{
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
DoCast(target,SPELL_PYROBLAST);
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_PYROBLAST);
Pyroblast_Timer = 7000;
}else Pyroblast_Timer -= diff;
m_uiPyroblastTimer = 7*IN_MILISECONDS;
}
else
m_uiPyroblastTimer -= uiDiff;
//Enrage_Timer
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 11)
// Enrage
if (!m_bEnraged && m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*10)
{
if (Enrage_Timer < diff)
{
DoCast(m_creature,SPELL_ENRAGE);
Enrage_Timer = 62000;
}else Enrage_Timer -= diff;
DoCast(m_creature, SPELL_ENRAGE);
m_bEnraged = true;
}
//EarthQuake_Timer
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 11)
// Earthquake
if (m_bEnraged)
{
if (EarthQuake_Timer < diff)
if (m_uiEarthquakeTimer < uiDiff)
{
DoCast(m_creature->getVictim(),SPELL_EARTHQUAKE);
EarthQuake_Timer = 3000;
}else EarthQuake_Timer -= diff;
DoCast(m_creature->getVictim(), SPELL_EARTHQUAKE);
m_uiEarthquakeTimer = 3*IN_MILISECONDS;
}
else
m_uiEarthquakeTimer -= uiDiff;
}
//Casting Buff for Coreragers. Spell is not working right. Players get the buff...
// if (Buff_Timer < diff)
// {
// DoCast(m_creature, SPELL_BUFF);
// Buff_Timer = 2500;
// }else Buff_Timer -= diff;
/*
// Golemagg's Trust
if (m_uiBuffTimer < uiDiff)
{
DoCast(m_creature, SPELL_GOLEMAGG_TRUST);
m_uiBuffTimer = 2.5*IN_MILISECONDS;
}
else
m_uiBuffTimer -= uiDiff;
*/
DoMeleeAttackIfReady();
}
@@ -118,60 +121,56 @@ struct TRINITY_DLL_DECL mob_core_ragerAI : public ScriptedAI
{
mob_core_ragerAI(Creature *c) : ScriptedAI(c)
{
pInstance = c->GetInstanceData();
m_pInstance = c->GetInstanceData();
}
uint32 Mangle_Timer;
uint32 Check_Timer;
ScriptedInstance *pInstance;
ScriptedInstance* m_pInstance;
uint32 m_uiMangleTimer;
void Reset()
{
Mangle_Timer = 7000; //These times are probably wrong
Check_Timer = 1000;
m_uiMangleTimer = 7*IN_MILISECONDS; // These times are probably wrong
}
void EnterCombat(Unit *who)
void DamageTaken(Unit* pDoneBy, uint32& uiDamage)
{
if (m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*50)
{
if (m_pInstance)
{
if (Creature* pGolemagg = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_GOLEMAGG)))
{
if (pGolemagg->isAlive())
{
DoScriptText(EMOTE_LOWHP, m_creature);
m_creature->SetHealth(m_creature->GetMaxHealth());
}
else
uiDamage = m_creature->GetHealth();
}
}
}
}
void UpdateAI(const uint32 diff)
void UpdateAI(const uint32 uiDiff)
{
if (!UpdateVictim())
return;
//Mangle_Timer
if (Mangle_Timer < diff)
// Mangle
if (m_uiMangleTimer < uiDiff)
{
DoCast(m_creature->getVictim(),SPELL_MANGLE);
Mangle_Timer = 10000;
}else Mangle_Timer -= diff;
//Cast AEGIS
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 50)
{
DoCast(m_creature,SPELL_AEGIS);
DoScriptText(EMOTE_AEGIS, m_creature);
DoCast(m_creature->getVictim(), SPELL_MANGLE);
m_uiMangleTimer = 10*IN_MILISECONDS;
}
//Check_Timer
if (Check_Timer < diff)
{
if (pInstance)
{
Unit *pGolemagg = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_GOLEMAGG));
if (!pGolemagg || !pGolemagg->isAlive())
{
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, true);
}
}
Check_Timer = 1000;
}else Check_Timer -= diff;
else
m_uiMangleTimer -= uiDiff;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI_boss_golemagg(Creature* pCreature)
{
return new boss_golemaggAI (pCreature);
@@ -184,7 +183,7 @@ CreatureAI* GetAI_mob_core_rager(Creature* pCreature)
void AddSC_boss_golemagg()
{
Script *newscript;
Script* newscript;
newscript = new Script;
newscript->Name="boss_golemagg";

View File

@@ -183,7 +183,7 @@ struct TRINITY_DLL_DECL instance_molten_core : public ScriptedInstance
case DATA_SULFURON:
return Sulfuron;
case DATA_GOLEMAGG:
return Sulfuron;
return Golemagg;
case DATA_FLAMEWAKERPRIEST:
return FlamewakerPriest;

View File

@@ -26,6 +26,7 @@ extern void AddSC_npcs_special();
extern void AddSC_npc_taxi();
//eastern kingdoms
extern void AddSC_the_scarlet_enclave();
//extern void AddSC_alterac_mountains();
extern void AddSC_arathi_highlands();
extern void AddSC_blasted_lands();
@@ -226,9 +227,6 @@ extern void AddSC_boss_the_black_stalker();
//Deadmines
extern void AddSC_instance_deadmines();
//Scarlet Enclave
extern void AddSC_the_scarlet_enclave();
//Gruul's Lair
extern void AddSC_boss_gruul();
extern void AddSC_boss_high_king_maulgar();
@@ -539,6 +537,7 @@ void AddScripts()
AddSC_npc_taxi();
//eastern kingdoms
AddSC_the_scarlet_enclave();
//AddSC_alterac_mountains();
AddSC_arathi_highlands();
AddSC_blasted_lands();
@@ -739,9 +738,6 @@ void AddScripts()
//Deadmines
AddSC_instance_deadmines();
//Scarlet Enclave
AddSC_the_scarlet_enclave();
//Gruul's Lair
AddSC_boss_gruul();
AddSC_boss_high_king_maulgar();