aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKudlaty <none@none>2009-08-16 02:46:55 +0200
committerKudlaty <none@none>2009-08-16 02:46:55 +0200
commit61ed8f90dfb7ebc0d3f57595acfa1429b2d4048d (patch)
treec9d1378528de3b36c7d4ed3682414f58daf15f5f
parent93709273eca3e265612ecd0ca6c04a8de94aab3e (diff)
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
-rw-r--r--sql/FULL/world_script_texts.sql2
-rw-r--r--sql/FULL/world_scripts_full.sql1
-rw-r--r--sql/updates/5071_world_scripts.sql3
-rw-r--r--src/bindings/scripts/CMakeLists.txt2
-rw-r--r--src/bindings/scripts/VC80/80ScriptDev2.vcproj24
-rw-r--r--src/bindings/scripts/VC90/90ScriptDev2.vcproj24
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp (renamed from src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp)0
-rw-r--r--src/bindings/scripts/scripts/outland/hellfire_peninsula.cpp36
-rw-r--r--src/bindings/scripts/scripts/zone/molten_core/boss_golemagg.cpp183
-rw-r--r--src/bindings/scripts/scripts/zone/molten_core/instance_molten_core.cpp2
-rw-r--r--src/bindings/scripts/system/ScriptLoader.cpp8
11 files changed, 152 insertions, 133 deletions
diff --git a/sql/FULL/world_script_texts.sql b/sql/FULL/world_script_texts.sql
index 0947c2db59b..e833bc9024d 100644
--- a/sql/FULL/world_script_texts.sql
+++ b/sql/FULL/world_script_texts.sql
@@ -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'),
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index 5cbc554d66a..24abf192482 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -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 */
diff --git a/sql/updates/5071_world_scripts.sql b/sql/updates/5071_world_scripts.sql
new file mode 100644
index 00000000000..dc085cf884e
--- /dev/null
+++ b/sql/updates/5071_world_scripts.sql
@@ -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;
diff --git a/src/bindings/scripts/CMakeLists.txt b/src/bindings/scripts/CMakeLists.txt
index fd258cd6c81..9736d172850 100644
--- a/src/bindings/scripts/CMakeLists.txt
+++ b/src/bindings/scripts/CMakeLists.txt
@@ -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
diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj
index 95469729521..2ddcba982b5 100644
--- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj
+++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj
@@ -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"
>
@@ -1326,22 +1334,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"
>
<File
diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj
index 0db7d101594..85946ca217c 100644
--- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj
+++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj
@@ -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"
>
@@ -1323,22 +1331,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"
>
<File
diff --git a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp
index 247a0084e77..247a0084e77 100644
--- a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp
diff --git a/src/bindings/scripts/scripts/outland/hellfire_peninsula.cpp b/src/bindings/scripts/scripts/outland/hellfire_peninsula.cpp
index e33f430894e..da5d0e15699 100644
--- a/src/bindings/scripts/scripts/outland/hellfire_peninsula.cpp
+++ b/src/bindings/scripts/scripts/outland/hellfire_peninsula.cpp
@@ -24,6 +24,7 @@ EndScriptData */
/* ContentData
npc_aeranas
go_haaleshi_altar
+npc_naladu
npc_wounded_blood_elf
EndContentData */
@@ -127,6 +128,35 @@ bool GOHello_go_haaleshi_altar(Player* pPlayer, GameObject* pGo)
}
/*######
+## 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
######*/
@@ -233,6 +263,12 @@ void AddSC_hellfire_peninsula()
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;
newscript->pQuestAccept = &QuestAccept_npc_wounded_blood_elf;
diff --git a/src/bindings/scripts/scripts/zone/molten_core/boss_golemagg.cpp b/src/bindings/scripts/scripts/zone/molten_core/boss_golemagg.cpp
index c9dc16b67d6..800a838aabc 100644
--- a/src/bindings/scripts/scripts/zone/molten_core/boss_golemagg.cpp
+++ b/src/bindings/scripts/scripts/zone/molten_core/boss_golemagg.cpp
@@ -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
-
-#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%
+enum
+{
+ SPELL_MAGMASPLASH = 13879,
+ SPELL_PYROBLAST = 20228,
+ SPELL_EARTHQUAKE = 19798,
+ SPELL_ENRAGE = 19953,
+ SPELL_GOLEMAGG_TRUST = 20553,
+
+ // 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_creature->CastSpell(m_creature,SPELL_MAGMASPLASH,true);
- }
+ m_uiPyroblastTimer = 7*IN_MILISECONDS; // These timers are probably wrong
+ m_uiEarthquakeTimer = 3*IN_MILISECONDS;
+ m_uiBuffTimer = 2.5*IN_MILISECONDS;
+ m_bEnraged = false;
- void EnterCombat(Unit *who)
- {
+ m_creature->CastSpell(m_creature, SPELL_MAGMASPLASH, true);
}
- void JustDied(Unit* Killer)
+ void JustDied(Unit* pKiller)
{
- if (pInstance)
- pInstance->SetData(DATA_GOLEMAGG_DEATH, 0);
+ if (m_pInstance)
+ m_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)
- {
- DoCast(m_creature->getVictim(),SPELL_MANGLE);
- Mangle_Timer = 10000;
- }else Mangle_Timer -= diff;
-
- //Cast AEGIS
- if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 50)
+ // Mangle
+ if (m_uiMangleTimer < uiDiff)
{
- 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";
diff --git a/src/bindings/scripts/scripts/zone/molten_core/instance_molten_core.cpp b/src/bindings/scripts/scripts/zone/molten_core/instance_molten_core.cpp
index 0cb6150b1aa..2ea052f0a90 100644
--- a/src/bindings/scripts/scripts/zone/molten_core/instance_molten_core.cpp
+++ b/src/bindings/scripts/scripts/zone/molten_core/instance_molten_core.cpp
@@ -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;
diff --git a/src/bindings/scripts/system/ScriptLoader.cpp b/src/bindings/scripts/system/ScriptLoader.cpp
index 1cca715eebe..8d2e4466a41 100644
--- a/src/bindings/scripts/system/ScriptLoader.cpp
+++ b/src/bindings/scripts/system/ScriptLoader.cpp
@@ -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();