aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKudlaty <none@none>2009-06-17 09:39:50 +0200
committerKudlaty <none@none>2009-06-17 09:39:50 +0200
commit0085745c42eb7e4a483614e5038860c31638123f (patch)
tree5de0817fc1a49ff101c64372a3e07400d820a6c4 /src
parentfb26b41e330726ec0c726d2da5817d6c10f91afd (diff)
Merge [SD2]
r1026 Added save/load to blood furnace instance script. r1027 Remove manual summons and teleport for boss morogrim, replace with proper spells. Apply sd2 code style. r1028 Replace SetUInt32Value for display id with function SetDisplayId. r1029 Simplify spawn of adds for hydross and use combatStartPosition instead of hard coded values for radius check. SD2 code style applied. r1030 Remove call Aggro in AttackStart and start use EnterCombat AI function. Note Aggro will still be called like normal, but no longer required defined in scripts. --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/npc/npc_escortAI.cpp12
-rw-r--r--src/bindings/scripts/scripts/npc/npc_escortAI.h4
-rw-r--r--src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp14
-rw-r--r--src/bindings/scripts/scripts/zone/black_temple/illidari_council.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/blackrock_spire/boss_gyth.cpp6
-rw-r--r--src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_archimonde.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp424
-rw-r--r--src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp12
-rw-r--r--src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp408
-rw-r--r--src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp40
-rw-r--r--src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/maraudon/boss_noxxion.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp6
-rw-r--r--src/bindings/scripts/scripts/zone/stratholme/boss_dathrohan_balnazzar.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/stratholme/boss_magistrate_barthilas.cpp6
-rw-r--r--src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp12
-rw-r--r--src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_astromancer.cpp6
-rw-r--r--src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/zulgurub/boss_arlokk.cpp10
-rw-r--r--src/bindings/scripts/scripts/zone/zulgurub/boss_jeklik.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp2
29 files changed, 474 insertions, 534 deletions
diff --git a/src/bindings/scripts/scripts/npc/npc_escortAI.cpp b/src/bindings/scripts/scripts/npc/npc_escortAI.cpp
index 681cf05e272..87b49856b87 100644
--- a/src/bindings/scripts/scripts/npc/npc_escortAI.cpp
+++ b/src/bindings/scripts/scripts/npc/npc_escortAI.cpp
@@ -33,6 +33,18 @@ void npc_escortAI::AttackStart(Unit *who)
}
}
+void npc_escortAI::EnterCombat(Unit* pEnemy)
+{
+ if (!pEnemy)
+ return;
+
+ Aggro(pEnemy);
+}
+
+void npc_escortAI::Aggro(Unit* pEnemy)
+{
+}
+
void npc_escortAI::MoveInLineOfSight(Unit *who)
{
if (IsBeingEscorted && !Attack)
diff --git a/src/bindings/scripts/scripts/npc/npc_escortAI.h b/src/bindings/scripts/scripts/npc/npc_escortAI.h
index 3431e84c6f8..3f5af2e99d3 100644
--- a/src/bindings/scripts/scripts/npc/npc_escortAI.h
+++ b/src/bindings/scripts/scripts/npc/npc_escortAI.h
@@ -34,12 +34,16 @@ struct TRINITY_DLL_DECL npc_escortAI : public ScriptedAI
// Pure Virtual Functions
virtual void WaypointReached(uint32) = 0;
+ virtual void Aggro(Unit*);
+
// CreatureAI functions
npc_escortAI(Creature *c) : ScriptedAI(c), IsBeingEscorted(false), PlayerTimer(1000), MaxPlayerDistance(DEFAULT_MAX_PLAYER_DISTANCE), CanMelee(true), DespawnAtEnd(true), DespawnAtFar(true)
{}
void AttackStart(Unit* who);
+ void EnterCombat(Unit*);
+
void MoveInLineOfSight(Unit* who);
void JustRespawned();
diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp
index 9e0ee3ad8c7..c18a9dc52b9 100644
--- a/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp
+++ b/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp
@@ -37,7 +37,7 @@ struct TRINITY_DLL_DECL instance_sethekk_halls : public ScriptedInstance
m_uiIkissDoorGUID = 0;
}
- void OnObjectCreate(GameObject* pGo)
+ void OnGameObjectCreate(GameObject *pGo, bool add)
{
if (pGo->GetEntry() == IKISS_DOOR)
m_uiIkissDoorGUID = pGo->GetGUID();
diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp
index a045218f00a..897c4937230 100644
--- a/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp
+++ b/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp
@@ -565,7 +565,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
{
GlaiveGUID[i] = Glaive->GetGUID();
Glaive->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- Glaive->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686);
+ Glaive->SetDisplayId(11686);
Glaive->setFaction(m_creature->getFaction());
DoCast(Glaive, SPELL_THROW_GLAIVE2);
}
@@ -581,7 +581,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
{
GlaiveGUID[i] = Glaive->GetGUID();
Glaive->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- Glaive->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686);
+ Glaive->SetDisplayId(11686);
Glaive->setFaction(m_creature->getFaction());
DoCast(Glaive, SPELL_THROW_GLAIVE, true);
}
@@ -609,7 +609,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
if(Glaive)
{
Glaive->CastSpell(m_creature, SPELL_GLAIVE_RETURNS, false); // Make it look like the Glaive flies back up to us
- Glaive->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686); // disappear but not die for now
+ Glaive->SetDisplayId(11686); // disappear but not die for now
}
}
}
@@ -654,7 +654,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
DoCast(m_creature, DemonTransformation[TransformCount].aura, true);
if(DemonTransformation[TransformCount].displayid)
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, DemonTransformation[TransformCount].displayid); // It's morphin time!
+ m_creature->SetDisplayId(DemonTransformation[TransformCount].displayid); // It's morphin time!
if(DemonTransformation[TransformCount].equip)
{
@@ -1100,7 +1100,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
if(Creature* Channel = m_creature->SummonCreature(ILLIDAN_DOOR_TRIGGER, x, y, z+5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000))
{
ChannelGUID = Channel->GetGUID();
- Channel->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686); // Invisible but spell visuals can still be seen.
+ Channel->SetDisplayId(11686); // Invisible but spell visuals can still be seen.
m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
DoCast(Channel, SPELL_AKAMA_DOOR_FAIL);
}
@@ -1793,7 +1793,7 @@ struct TRINITY_DLL_DECL blade_of_azzinothAI : public NullCreatureAI
void SpellHit(Unit *caster, const SpellEntry *spell)
{
if(spell->Id == SPELL_THROW_GLAIVE2 || spell->Id == SPELL_THROW_GLAIVE)
- me->SetUInt32Value(UNIT_FIELD_DISPLAYID, 21431);//appear when hit by Illidan's glaive
+ me->SetDisplayId(21431);//appear when hit by Illidan's glaive
}
};
@@ -1834,7 +1834,7 @@ void boss_illidan_stormrageAI::Reset()
FlightCount = 0;
TransformCount = 0;
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, 21135);
+ m_creature->SetDisplayId(21135);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
diff --git a/src/bindings/scripts/scripts/zone/black_temple/illidari_council.cpp b/src/bindings/scripts/scripts/zone/black_temple/illidari_council.cpp
index ae8c6ece29f..e045c02bda8 100644
--- a/src/bindings/scripts/scripts/zone/black_temple/illidari_council.cpp
+++ b/src/bindings/scripts/scripts/zone/black_temple/illidari_council.cpp
@@ -240,7 +240,7 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686);
+ m_creature->SetDisplayId(11686);
}
void EnterCombat(Unit *who) {}
diff --git a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_gyth.cpp b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_gyth.cpp
index e48c832e3b0..196077a1292 100644
--- a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_gyth.cpp
+++ b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_gyth.cpp
@@ -72,7 +72,7 @@ struct TRINITY_DLL_DECL boss_gythAI : public ScriptedAI
Line2Count = 2;
//Invisible for event start
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686);
+ m_creature->SetDisplayId(11686);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
@@ -112,7 +112,7 @@ struct TRINITY_DLL_DECL boss_gythAI : public ScriptedAI
{
bAggro = true;
// Visible now!
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, 9723);
+ m_creature->SetDisplayId(9723);
m_creature->setFaction(14);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
} else Aggro_Timer -= diff;
@@ -180,7 +180,7 @@ struct TRINITY_DLL_DECL boss_gythAI : public ScriptedAI
//Inturrupt any spell casting
m_creature->InterruptNonMeleeSpells(false);
//Gyth model
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, 9806);
+ m_creature->SetDisplayId(9806);
m_creature->SummonCreature(10429, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000);
SummonedRend = true;
}
diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_archimonde.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_archimonde.cpp
index 92195cc73b6..9f15b45a3ac 100644
--- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_archimonde.cpp
+++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_archimonde.cpp
@@ -458,7 +458,7 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public hyjal_trashAI
if (Unit *Nordrassil = Unit::GetUnit(*m_creature, WorldTreeGUID))
{
Nordrassil->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- Nordrassil->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686);
+ Nordrassil->SetDisplayId(11686);
DoCast(Nordrassil, SPELL_DRAIN_WORLD_TREE);
IsChanneling = true;
}
diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.cpp
index 0ece895ec8d..cb833ba77fe 100644
--- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.cpp
+++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.cpp
@@ -381,7 +381,7 @@ struct mob_giant_infernalAI : public hyjal_trashAI
Delay = rand()%30000;
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_INVIS);
+ m_creature->SetDisplayId(MODEL_INVIS);
go = false;
pos = 0;
Reset();
@@ -447,7 +447,7 @@ struct mob_giant_infernalAI : public hyjal_trashAI
{
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, m_creature->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
+ m_creature->SetDisplayId(m_creature->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
CanMove = true;
if (pInstance)
{
diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp
index 04550ec624e..6607c7c7939 100644
--- a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp
+++ b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp
@@ -209,7 +209,7 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
//m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+3, 1038);
break;
case 10:
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, THRALL_MODEL_EQUIPPED);
+ m_creature->SetDisplayId(THRALL_MODEL_EQUIPPED);
break;
case 11:
SetRun();
@@ -375,7 +375,7 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
HadMount = false;
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0);
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, THRALL_MODEL_UNEQUIPPED);
+ m_creature->SetDisplayId(THRALL_MODEL_UNEQUIPPED);
}
if( IsBeingEscorted )
{
diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp
index 2de639ad0bb..5fdb461a9b0 100644
--- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp
+++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp
@@ -6,381 +6,321 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: Boss_Hydross_The_Unstable
SD%Complete: 90
-SDComment: Some details and adjustments left to do, probably nothing major. Spawns may be spawned in different way/location.
+SDComment: Some details and adjustments left to do, probably nothing major. Spawns may be spawned in different way/location. code cleanup needed
SDCategory: Coilfang Resevoir, Serpent Shrine Cavern
EndScriptData */
#include "precompiled.h"
#include "def_serpent_shrine.h"
-#define SAY_AGGRO -1548000
-#define SAY_SWITCH_TO_CLEAN -1548001
-#define SAY_CLEAN_SLAY1 -1548002
-#define SAY_CLEAN_SLAY2 -1548003
-#define SAY_CLEAN_DEATH -1548004
-#define SAY_SWITCH_TO_CORRUPT -1548005
-#define SAY_CORRUPT_SLAY1 -1548006
-#define SAY_CORRUPT_SLAY2 -1548007
-#define SAY_CORRUPT_DEATH -1548008
-
-#define SWITCH_RADIUS 18
-
-#define MODEL_CORRUPT 20609
-#define MODEL_CLEAN 20162
-
-#define SPELL_WATER_TOMB 38235
-#define SPELL_MARK_OF_HYDROSS1 38215
-#define SPELL_MARK_OF_HYDROSS2 38216
-#define SPELL_MARK_OF_HYDROSS3 38217
-#define SPELL_MARK_OF_HYDROSS4 38218
-#define SPELL_MARK_OF_HYDROSS5 38231
-#define SPELL_MARK_OF_HYDROSS6 40584
-#define SPELL_MARK_OF_CORRUPTION1 38219
-#define SPELL_MARK_OF_CORRUPTION2 38220
-#define SPELL_MARK_OF_CORRUPTION3 38221
-#define SPELL_MARK_OF_CORRUPTION4 38222
-#define SPELL_MARK_OF_CORRUPTION5 38230
-#define SPELL_MARK_OF_CORRUPTION6 40583
-#define SPELL_VILE_SLUDGE 38246
-#define SPELL_ENRAGE 27680 //this spell need verification
-#define SPELL_SUMMON_WATER_ELEMENT 36459 //not in use yet(in use ever?)
-#define SPELL_ELEMENTAL_SPAWNIN 25035
-#define SPELL_BLUE_BEAM /*40227*/40227 //channeled Hydross Beam Helper (not in use yet)
-
-#define ENTRY_PURE_SPAWN 22035
-#define ENTRY_TAINTED_SPAWN 22036
-#define ENTRY_BEAM_DUMMY 21934
-
-#define HYDROSS_X -239.439
-#define HYDROSS_Y -363.481
-
-#define SPAWN_X_DIFF1 6.934003
-#define SPAWN_Y_DIFF1 -11.255012
-#define SPAWN_X_DIFF2 -6.934003
-#define SPAWN_Y_DIFF2 11.255012
-#define SPAWN_X_DIFF3 -12.577011
-#define SPAWN_Y_DIFF3 -4.72702
-#define SPAWN_X_DIFF4 12.577011
-#define SPAWN_Y_DIFF4 4.72702
+enum
+{
+ SAY_AGGRO = -1548000,
+ SAY_SWITCH_TO_CLEAN = -1548001,
+ SAY_CLEAN_SLAY1 = -1548002,
+ SAY_CLEAN_SLAY2 = -1548003,
+ SAY_CLEAN_DEATH = -1548004,
+ SAY_SWITCH_TO_CORRUPT = -1548005,
+ SAY_CORRUPT_SLAY1 = -1548006,
+ SAY_CORRUPT_SLAY2 = -1548007,
+ SAY_CORRUPT_DEATH = -1548008,
+
+ SWITCH_RADIUS = 18,
+
+ MODEL_CORRUPT = 20609,
+ MODEL_CLEAN = 20162,
+
+ SPELL_WATER_TOMB = 38235,
+ SPELL_MARK_OF_HYDROSS1 = 38215,
+ SPELL_MARK_OF_HYDROSS2 = 38216,
+ SPELL_MARK_OF_HYDROSS3 = 38217,
+ SPELL_MARK_OF_HYDROSS4 = 38218,
+ SPELL_MARK_OF_HYDROSS5 = 38231,
+ SPELL_MARK_OF_HYDROSS6 = 40584,
+ SPELL_MARK_OF_CORRUPTION1 = 38219,
+ SPELL_MARK_OF_CORRUPTION2 = 38220,
+ SPELL_MARK_OF_CORRUPTION3 = 38221,
+ SPELL_MARK_OF_CORRUPTION4 = 38222,
+ SPELL_MARK_OF_CORRUPTION5 = 38230,
+ SPELL_MARK_OF_CORRUPTION6 = 40583,
+ SPELL_VILE_SLUDGE = 38246,
+ SPELL_ENRAGE = 27680, //this spell need verification
+ SPELL_SUMMON_WATER_ELEMENT = 36459, //not in use yet(in use ever?)
+ SPELL_ELEMENTAL_SPAWNIN = 25035,
+ SPELL_BLUE_BEAM = 38015, //channeled Hydross Beam Helper (not in use yet)
+
+ NPC_PURE_SPAWN = 22035,
+ NPC_TAINTED_SPAWN = 22036
+};
+
+const float afSpawnDiffs[4][2] =
+{
+ {6.934003f , -11.255012f}, // diff 1
+ {-6.934003f , 11.255012f }, // diff 2
+ {-12.577011f, -4.72702f }, // diff 3
+ {12.577011f , 4.72702f } // diff 4
+};
struct TRINITY_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI
{
- boss_hydross_the_unstableAI(Creature *c) : ScriptedAI(c), Summons(m_creature)
+ boss_hydross_the_unstableAI(Creature *c) : ScriptedAI(c)
{
- pInstance = c->GetInstanceData();
+ m_pInstance = c->GetInstanceData();
}
- ScriptedInstance* pInstance;
- uint64 beams[2];
- uint32 PosCheck_Timer;
- uint32 MarkOfHydross_Timer;
- uint32 MarkOfCorruption_Timer;
- uint32 WaterTomb_Timer;
- uint32 VileSludge_Timer;
- uint32 MarkOfHydross_Count;
- uint32 MarkOfCorruption_Count;
- uint32 EnrageTimer;
- bool CorruptedForm;
- bool beam;
- SummonList Summons;
+ ScriptedInstance* m_pInstance; // the instance
+
+ uint32 m_uiPosCheck_Timer;
+ uint32 m_uiMarkOfHydross_Timer;
+ uint32 m_uiMarkOfCorruption_Timer;
+ uint32 m_uiWaterTomb_Timer;
+ uint32 m_uiVileSludge_Timer;
+ uint32 m_uiMarkOfHydross_Count;
+ uint32 m_uiMarkOfCorruption_Count;
+ uint32 m_uiEnrageTimer;
+ bool m_bCorruptedForm;
void Reset()
{
- DeSummonBeams();
- beams[0] = 0;
- beams[1] = 0;
- PosCheck_Timer = 2500;
- MarkOfHydross_Timer = 15000;
- MarkOfCorruption_Timer = 15000;
- WaterTomb_Timer = 7000;
- VileSludge_Timer = 7000;
- MarkOfHydross_Count = 0;
- MarkOfCorruption_Count = 0;
- EnrageTimer = 600000;
-
- CorruptedForm = false;
+ m_uiPosCheck_Timer = 2500;
+ m_uiMarkOfHydross_Timer = 15000;
+ m_uiMarkOfCorruption_Timer = 15000;
+ m_uiWaterTomb_Timer = 7000;
+ m_uiVileSludge_Timer = 7000;
+ m_uiMarkOfHydross_Count = 0;
+ m_uiMarkOfCorruption_Count = 0;
+ m_uiEnrageTimer = 600000;
+
+ m_bCorruptedForm = false;
+
m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_FROST);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_CLEAN);
+ m_creature->SetDisplayId(MODEL_CLEAN);
- if (pInstance)
- pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, NOT_STARTED);
- beam = false;
- Summons.DespawnAll();
+ if (m_pInstance)
+ m_pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, NOT_STARTED);
}
- void SummonBeams()
- {
- Creature* beamer = m_creature->SummonCreature(ENTRY_BEAM_DUMMY,-258.333,-356.34,22.0499,5.90835,TEMPSUMMON_CORPSE_DESPAWN,0);
- if(beamer)
- {
- beamer->CastSpell(m_creature,SPELL_BLUE_BEAM,true);
- beamer->SetUInt32Value(UNIT_FIELD_DISPLAYID , 11686); //invisible
- beamer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- beams[0]=beamer->GetGUID();
- }
- beamer = beamer = m_creature->SummonCreature(ENTRY_BEAM_DUMMY,-219.918,-371.308,22.0042,2.73072,TEMPSUMMON_CORPSE_DESPAWN,0);
- if(beamer)
- {
- beamer->CastSpell(m_creature,SPELL_BLUE_BEAM,true);
- beamer->SetUInt32Value(UNIT_FIELD_DISPLAYID , 11686); //invisible
- beamer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- beams[1]=beamer->GetGUID();
- }
- }
- void DeSummonBeams()
- {
- for(uint8 i=0;i<2;i++)
- {
- Creature* mob = Unit::GetCreature(*m_creature,beams[i]);
- if(mob)
- {
- mob->setDeathState(DEAD);
- mob->RemoveCorpse();
- }
- }
- }
- void EnterCombat(Unit *who)
+ void Aggro(Unit* pWho)
{
DoScriptText(SAY_AGGRO, m_creature);
- if (pInstance)
- pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, IN_PROGRESS);
+ if (m_pInstance)
+ m_pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, IN_PROGRESS);
}
- void KilledUnit(Unit *victim)
+ void KilledUnit(Unit* pVictim)
{
- if (CorruptedForm)
- {
- switch(rand()%2)
- {
- case 0: DoScriptText(SAY_CORRUPT_SLAY1, m_creature); break;
- case 1: DoScriptText(SAY_CORRUPT_SLAY2, m_creature); break;
- }
- }
+ if (m_bCorruptedForm)
+ DoScriptText(urand(0,1) ? SAY_CORRUPT_SLAY1 : SAY_CORRUPT_SLAY2, m_creature);
else
- {
- switch(rand()%2)
- {
- case 0: DoScriptText(SAY_CLEAN_SLAY1, m_creature); break;
- case 1: DoScriptText(SAY_CLEAN_SLAY2, m_creature); break;
- }
- }
+ DoScriptText(urand(0,1) ? SAY_CLEAN_SLAY1 : SAY_CLEAN_SLAY2, m_creature);
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* pSummoned)
{
- if (summoned->GetEntry() == ENTRY_PURE_SPAWN)
- {
- summoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
- summoned->CastSpell(summoned,SPELL_ELEMENTAL_SPAWNIN,true);
- Summons.Summon(summoned);
- }
- if (summoned->GetEntry() == ENTRY_TAINTED_SPAWN)
- {
- summoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
- summoned->CastSpell(summoned,SPELL_ELEMENTAL_SPAWNIN,true);
- Summons.Summon(summoned);
- }
+ if (pSummoned->GetEntry() == NPC_PURE_SPAWN)
+ pSummoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
+ else if (pSummoned->GetEntry() == NPC_TAINTED_SPAWN)
+ pSummoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
+
+ pSummoned->CastSpell(pSummoned, SPELL_ELEMENTAL_SPAWNIN, true);
}
- void SummonedCreatureDespawn(Creature *summon)
+ void JustDied(Unit* pVictim)
{
- Summons.Despawn(summon);
+ DoScriptText(m_bCorruptedForm ? SAY_CORRUPT_DEATH : SAY_CLEAN_DEATH, m_creature);
+
+ if (m_pInstance)
+ m_pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, NOT_STARTED);
}
- void JustDied(Unit *victim)
+ void SpawnAdds()
{
- if (CorruptedForm)
- DoScriptText(SAY_CORRUPT_DEATH, m_creature);
+ uint32 uiAdd = 0;
+
+ if (m_bCorruptedForm)
+ uiAdd = NPC_TAINTED_SPAWN;
else
- DoScriptText(SAY_CLEAN_DEATH, m_creature);
+ uiAdd = NPC_PURE_SPAWN;
- if (pInstance)
- pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, DONE);
- Summons.DespawnAll();
+ for(uint8 i = 0; i < 4; i++)
+ DoSpawnCreature(uiAdd, afSpawnDiffs[i][0], afSpawnDiffs[i][1], 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
}
- void UpdateAI(const uint32 diff)
+ void UpdateAI(const uint32 uiDiff)
{
- if(!beam)
- {
- SummonBeams();
- beam=true;
- }
//Return since we have no target
- if (!UpdateVictim() )
+ if (!UpdateVictim())
return;
// corrupted form
- if (CorruptedForm)
+ if (m_bCorruptedForm)
{
//MarkOfCorruption_Timer
- if (MarkOfCorruption_Timer < diff)
+ if (m_uiMarkOfCorruption_Timer < uiDiff)
{
- if (MarkOfCorruption_Count <= 5)
+ if (m_uiMarkOfCorruption_Count <= 5)
{
- uint32 mark_spell;
+ uint32 uiMarkSpell = 0;
- switch(MarkOfCorruption_Count)
+ switch(m_uiMarkOfCorruption_Count)
{
- case 0: mark_spell = SPELL_MARK_OF_CORRUPTION1; break;
- case 1: mark_spell = SPELL_MARK_OF_CORRUPTION2; break;
- case 2: mark_spell = SPELL_MARK_OF_CORRUPTION3; break;
- case 3: mark_spell = SPELL_MARK_OF_CORRUPTION4; break;
- case 4: mark_spell = SPELL_MARK_OF_CORRUPTION5; break;
- case 5: mark_spell = SPELL_MARK_OF_CORRUPTION6; break;
+ case 0: uiMarkSpell = SPELL_MARK_OF_CORRUPTION1; break;
+ case 1: uiMarkSpell = SPELL_MARK_OF_CORRUPTION2; break;
+ case 2: uiMarkSpell = SPELL_MARK_OF_CORRUPTION3; break;
+ case 3: uiMarkSpell = SPELL_MARK_OF_CORRUPTION4; break;
+ case 4: uiMarkSpell = SPELL_MARK_OF_CORRUPTION5; break;
+ case 5: uiMarkSpell = SPELL_MARK_OF_CORRUPTION6; break;
}
- DoCast(m_creature->getVictim(), mark_spell);
+ DoCast(m_creature->getVictim(), uiMarkSpell);
- if (MarkOfCorruption_Count < 5)
- MarkOfCorruption_Count++;
+ if (m_uiMarkOfCorruption_Count < 5)
+ ++m_uiMarkOfCorruption_Count;
}
- MarkOfCorruption_Timer = 15000;
- }else MarkOfCorruption_Timer -= diff;
+ m_uiMarkOfCorruption_Timer = 15000;
+ }else m_uiMarkOfCorruption_Timer -= uiDiff;
//VileSludge_Timer
- if (VileSludge_Timer < diff)
+ if (m_uiVileSludge_Timer < uiDiff)
{
- Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0);
- if (target)
- DoCast(target, SPELL_VILE_SLUDGE);
+ if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ DoCast(pTarget, SPELL_VILE_SLUDGE);
- VileSludge_Timer = 15000;
- }else VileSludge_Timer -= diff;
+ m_uiVileSludge_Timer = 15000;
+ }else m_uiVileSludge_Timer -= uiDiff;
//PosCheck_Timer
- if (PosCheck_Timer < diff)
+ if (m_uiPosCheck_Timer < uiDiff)
{
- if (m_creature->GetDistance2d(HYDROSS_X, HYDROSS_Y) < SWITCH_RADIUS)
- {
- // switch to clean form
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_CLEAN);
- CorruptedForm = false;
- MarkOfHydross_Count = 0;
+ float fPosX, fPosY, fPosZ, fPosO;
+ m_creature->GetHomePosition(fPosX, fPosY, fPosZ, fPosO);
+ if (m_creature->GetDistance2d(fPosX, fPosY) < SWITCH_RADIUS)
+ {
DoScriptText(SAY_SWITCH_TO_CLEAN, m_creature);
+
+ // switch to clean form
+ m_creature->SetDisplayId(MODEL_CLEAN);
+ m_uiMarkOfHydross_Count = 0;
DoResetThreat();
- SummonBeams();
// spawn 4 adds
- DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF1, SPAWN_Y_DIFF1, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
- DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF2, SPAWN_Y_DIFF2, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
- DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF3, SPAWN_Y_DIFF3, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
- DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF4, SPAWN_Y_DIFF4, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
+ SpawnAdds();
m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_FROST);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
+
+ m_bCorruptedForm = false;
}
- PosCheck_Timer = 2500;
- }else PosCheck_Timer -=diff;
+ m_uiPosCheck_Timer = 2500;
+ }else m_uiPosCheck_Timer -=uiDiff;
}
// clean form
else
{
//MarkOfHydross_Timer
- if (MarkOfHydross_Timer < diff)
+ if (m_uiMarkOfHydross_Timer < uiDiff)
{
- if (MarkOfHydross_Count <= 5)
+ if (m_uiMarkOfHydross_Count <= 5)
{
- uint32 mark_spell;
+ uint32 uiMarkSpell;
- switch(MarkOfHydross_Count)
+ switch(m_uiMarkOfHydross_Count)
{
- case 0: mark_spell = SPELL_MARK_OF_HYDROSS1; break;
- case 1: mark_spell = SPELL_MARK_OF_HYDROSS2; break;
- case 2: mark_spell = SPELL_MARK_OF_HYDROSS3; break;
- case 3: mark_spell = SPELL_MARK_OF_HYDROSS4; break;
- case 4: mark_spell = SPELL_MARK_OF_HYDROSS5; break;
- case 5: mark_spell = SPELL_MARK_OF_HYDROSS6; break;
+ case 0: uiMarkSpell = SPELL_MARK_OF_HYDROSS1; break;
+ case 1: uiMarkSpell = SPELL_MARK_OF_HYDROSS2; break;
+ case 2: uiMarkSpell = SPELL_MARK_OF_HYDROSS3; break;
+ case 3: uiMarkSpell = SPELL_MARK_OF_HYDROSS4; break;
+ case 4: uiMarkSpell = SPELL_MARK_OF_HYDROSS5; break;
+ case 5: uiMarkSpell = SPELL_MARK_OF_HYDROSS6; break;
}
- DoCast(m_creature->getVictim(), mark_spell);
+ DoCast(m_creature->getVictim(), uiMarkSpell);
- if (MarkOfHydross_Count < 5)
- MarkOfHydross_Count++;
+ if (m_uiMarkOfHydross_Count < 5)
+ ++m_uiMarkOfHydross_Count;
}
- MarkOfHydross_Timer = 15000;
- }else MarkOfHydross_Timer -= diff;
+ m_uiMarkOfHydross_Timer = 15000;
+ }else m_uiMarkOfHydross_Timer -= uiDiff;
//WaterTomb_Timer
- if (WaterTomb_Timer < diff)
+ if (m_uiWaterTomb_Timer < uiDiff)
{
- Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0);
- if (target)
- DoCast(target, SPELL_WATER_TOMB);
+ if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ DoCast(pTarget, SPELL_WATER_TOMB);
- WaterTomb_Timer = 7000;
- }else WaterTomb_Timer -= diff;
+ m_uiWaterTomb_Timer = 7000;
+ }else m_uiWaterTomb_Timer -= uiDiff;
//PosCheck_Timer
- if (PosCheck_Timer < diff)
+ if (m_uiPosCheck_Timer < uiDiff)
{
- if (m_creature->GetDistance2d(HYDROSS_X, HYDROSS_Y) >= SWITCH_RADIUS)
- {
- // switch to corrupted form
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_CORRUPT);
- MarkOfCorruption_Count = 0;
- CorruptedForm = true;
+ float fPosX, fPosY, fPosZ, fPosO;
+ m_creature->GetHomePosition(fPosX, fPosY, fPosZ, fPosO);
+ if (m_creature->GetDistance2d(fPosX, fPosY) >= SWITCH_RADIUS)
+ {
DoScriptText(SAY_SWITCH_TO_CORRUPT, m_creature);
+
+ // switch to corrupted form
+ m_creature->SetDisplayId(MODEL_CORRUPT);
+ m_uiMarkOfCorruption_Count = 0;
DoResetThreat();
- DeSummonBeams();
// spawn 4 adds
- DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF1, SPAWN_Y_DIFF1, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
- DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF2, SPAWN_Y_DIFF2, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
- DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF3, SPAWN_Y_DIFF3, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
- DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF4, SPAWN_Y_DIFF4, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
+ SpawnAdds();
m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_NATURE);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false);
+
+ m_bCorruptedForm = true;
}
- PosCheck_Timer = 2500;
- }else PosCheck_Timer -=diff;
+ m_uiPosCheck_Timer = 2500;
+ }else m_uiPosCheck_Timer -=uiDiff;
}
//EnrageTimer
- if (EnrageTimer < diff)
+ if (m_uiEnrageTimer < uiDiff)
{
DoCast(m_creature, SPELL_ENRAGE);
- EnrageTimer = 60000;
- }else EnrageTimer -= diff;
+ m_uiEnrageTimer = 60000;
+ }else m_uiEnrageTimer -= uiDiff;
DoMeleeAttackIfReady();
}
};
-CreatureAI* GetAI_boss_hydross_the_unstable(Creature *_Creature)
+
+CreatureAI* GetAI_boss_hydross_the_unstable(Creature* pCreature)
{
- return new boss_hydross_the_unstableAI (_Creature);
+ return new boss_hydross_the_unstableAI(pCreature);
}
void AddSC_boss_hydross_the_unstable()
{
Script *newscript;
newscript = new Script;
- newscript->Name="boss_hydross_the_unstable";
+ newscript->Name = "boss_hydross_the_unstable";
newscript->GetAI = &GetAI_boss_hydross_the_unstable;
newscript->RegisterSelf();
}
-
diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
index 2481e6d858f..e1fdcf5ab15 100644
--- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
+++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
@@ -890,7 +890,7 @@ struct TRINITY_DLL_DECL mob_shield_generator_channelAI : public ScriptedAI
{
Check_Timer = 0;
Casted = false;
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID , 11686); //invisible
+ m_creature->SetDisplayId(11686); //invisible
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp
index 020e3d09074..70190662516 100644
--- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp
+++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp
@@ -187,7 +187,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
EnrageUsed = false;
InnderDemon_Count = 0;
m_creature->SetSpeed( MOVE_RUN, 2.0f, true);
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_NIGHTELF);
+ m_creature->SetDisplayId(MODEL_NIGHTELF);
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, true);
@@ -270,7 +270,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
m_creature->ApplySpellImmune(AURA_BANISH, IMMUNITY_MECHANIC, MECHANIC_BANISH, true);
// changing model to bloodelf
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_NIGHTELF);
+ m_creature->SetDisplayId(MODEL_NIGHTELF);
// and reseting equipment
m_creature->LoadEquipment(m_creature->GetEquipmentId());
@@ -292,7 +292,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
DoCast(m_creature, AURA_BANISH);
// changing model
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_DEMON);
+ m_creature->SetDisplayId(MODEL_DEMON);
// and removing weapons
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
@@ -457,7 +457,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
{
//switch to demon form
m_creature->RemoveAurasDueToSpell(SPELL_WHIRLWIND,0);
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_DEMON);
+ m_creature->SetDisplayId(MODEL_DEMON);
DoScriptText(SAY_SWITCH_TO_DEMON, m_creature);
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
@@ -534,7 +534,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
if(SwitchToHuman_Timer < diff)
{
//switch to nightelf form
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_NIGHTELF);
+ m_creature->SetDisplayId(MODEL_NIGHTELF);
m_creature->LoadEquipment(m_creature->GetEquipmentId());
CastConsumingMadness();
@@ -563,7 +563,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
DemonForm = false;
DoScriptText(SAY_FINAL_FORM, m_creature);
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_NIGHTELF);
+ m_creature->SetDisplayId(MODEL_NIGHTELF);
m_creature->LoadEquipment(m_creature->GetEquipmentId());
}
}
diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp
index b014b4b1e45..0225773652f 100644
--- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp
+++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp
@@ -1,289 +1,240 @@
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
/* ScriptData
SDName: Boss_Morogrim_Tidewalker
SD%Complete: 90
-SDComment: Water globules don't explode properly, remove hacks
+SDComment:
SDCategory: Coilfang Resevoir, Serpent Shrine Cavern
EndScriptData */
#include "precompiled.h"
#include "def_serpent_shrine.h"
-#define SAY_AGGRO -1548030
-#define SAY_SUMMON1 -1548031
-#define SAY_SUMMON2 -1548032
-#define SAY_SUMMON_BUBL1 -1548033
-#define SAY_SUMMON_BUBL2 -1548034
-#define SAY_SLAY1 -1548035
-#define SAY_SLAY2 -1548036
-#define SAY_SLAY3 -1548037
-#define SAY_DEATH -1548038
-#define EMOTE_WATERY_GRAVE -1548039
-#define EMOTE_EARTHQUAKE -1548040
-#define EMOTE_WATERY_GLOBULES -1548041
-
-#define SPELL_TIDAL_WAVE 37730
-#define SPELL_WATERY_GRAVE 38049
-#define SPELL_EARTHQUAKE 37764
-#define SPELL_WATERY_GRAVE_EXPLOSION 37852
-
-#define WATERY_GRAVE_X1 334.64
-#define WATERY_GRAVE_Y1 -728.89
-#define WATERY_GRAVE_Z1 -14.42
-#define WATERY_GRAVE_X2 365.51
-#define WATERY_GRAVE_Y2 -737.14
-#define WATERY_GRAVE_Z2 -14.44
-#define WATERY_GRAVE_X3 366.19
-#define WATERY_GRAVE_Y3 -709.59
-#define WATERY_GRAVE_Z3 -14.36
-#define WATERY_GRAVE_X4 372.93
-#define WATERY_GRAVE_Y4 -690.96
-#define WATERY_GRAVE_Z4 -14.44
-
-#define SPELL_WATERY_GRAVE_1 38023
-#define SPELL_WATERY_GRAVE_2 38024
-#define SPELL_WATERY_GRAVE_3 38025
-#define SPELL_WATERY_GRAVE_4 37850
-
-#define SPELL_SUMMON_WATER_GLOBULE_1 37854
-#define SPELL_SUMMON_WATER_GLOBULE_2 37858
-#define SPELL_SUMMON_WATER_GLOBULE_3 37860
-#define SPELL_SUMMON_WATER_GLOBULE_4 37861
-
-/*#define SPELL_SUMMON_MURLOC_A6 39813
-#define SPELL_SUMMON_MURLOC_A7 39814
-#define SPELL_SUMMON_MURLOC_A8 39815
-#define SPELL_SUMMON_MURLOC_A9 39816
-#define SPELL_SUMMON_MURLOC_A10 39817
-
-#define SPELL_SUMMON_MURLOC_B6 39818
-#define SPELL_SUMMON_MURLOC_B7 39819
-#define SPELL_SUMMON_MURLOC_B8 39820
-#define SPELL_SUMMON_MURLOC_B9 39821
-#define SPELL_SUMMON_MURLOC_B10 39822*/
-
-float MurlocCords[10][5] =
+enum
{
- {21920, 424.36, -715.4, -7.14, 0.124},
- {21920, 425.13, -719.3, -7.14, 0.124},
- {21920, 425.05, -724.23, -7.14, 0.124},
- {21920, 424.91, -728.68, -7.14, 0.124},
- {21920, 424.84, -732.18, -7.14, 0.124},
- {21920, 321.05, -734.2, -13.15, 0.124},
- {21920, 321.05, -729.4, -13.15, 0.124},
- {21920, 321.05, -724.03, -13.15, 0.124},
- {21920, 321.05, -718.73, -13.15, 0.124},
- {21920, 321.05, -714.24, -13.15, 0.124}
+ SAY_AGGRO = -1548030,
+ SAY_SUMMON1 = -1548031,
+ SAY_SUMMON2 = -1548032,
+ SAY_SUMMON_BUBL1 = -1548033,
+ SAY_SUMMON_BUBL2 = -1548034,
+ SAY_SLAY1 = -1548035,
+ SAY_SLAY2 = -1548036,
+ SAY_SLAY3 = -1548037,
+ SAY_DEATH = -1548038,
+ EMOTE_WATERY_GRAVE = -1548039,
+ EMOTE_EARTHQUAKE = -1548040,
+ EMOTE_WATERY_GLOBULES = -1548041,
+
+ SPELL_TIDAL_WAVE = 37730,
+ SPELL_EARTHQUAKE = 37764,
+
+ SPELL_WATERY_GRAVE_1 = 37850,
+ SPELL_WATERY_GRAVE_2 = 38023,
+ SPELL_WATERY_GRAVE_3 = 38024,
+ SPELL_WATERY_GRAVE_4 = 38025,
+
+ SPELL_SUMMON_MURLOC_A6 = 39813,
+ SPELL_SUMMON_MURLOC_A7 = 39814,
+ SPELL_SUMMON_MURLOC_A8 = 39815,
+ SPELL_SUMMON_MURLOC_A9 = 39816,
+ SPELL_SUMMON_MURLOC_A10 = 39817,
+
+ SPELL_SUMMON_MURLOC_B6 = 39818,
+ SPELL_SUMMON_MURLOC_B7 = 39819,
+ SPELL_SUMMON_MURLOC_B8 = 39820,
+ SPELL_SUMMON_MURLOC_B9 = 39821,
+ SPELL_SUMMON_MURLOC_B10 = 39822,
+
+ SPELL_SUMMON_GLOBULE_1 = 37854,
+ SPELL_SUMMON_GLOBULE_2 = 37858,
+ SPELL_SUMMON_GLOBULE_3 = 37860,
+ SPELL_SUMMON_GLOBULE_4 = 37861,
+
+ NPC_WATER_GLOBULE = 21913,
+ NPC_TIDEWALKER_LURKER = 21920
};
-//Creatures
-#define WATER_GLOBULE 21913
-#define TIDEWALKER_LURKER 21920
-
//Morogrim Tidewalker AI
struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
{
- boss_morogrim_tidewalkerAI(Creature *c) : ScriptedAI(c)
+ boss_morogrim_tidewalkerAI(Creature* pCreature) : ScriptedAI(pCreature)
{
- pInstance = c->GetInstanceData();
+ m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData());
}
- ScriptedInstance* pInstance;
- Map::PlayerList const *PlayerList;
+ ScriptedInstance* m_pInstance; // the instance
- uint32 TidalWave_Timer;
- uint32 WateryGrave_Timer;
- uint32 Earthquake_Timer;
- uint32 WateryGlobules_Timer;
- uint32 globulespell[4];
- int8 Playercount;
- int8 counter;
+ // timers
+ uint32 m_uiTidalWave_Timer;
+ uint32 m_uiWateryGrave_Timer;
+ uint32 m_uiEarthquake_Timer;
+ uint32 m_uiWateryGlobules_Timer;
- bool Earthquake;
- bool Phase2;
+ bool m_bEarthquake;
+ bool m_bPhase2;
void Reset()
{
- TidalWave_Timer = 10000;
- WateryGrave_Timer = 30000;
- Earthquake_Timer = 40000;
- WateryGlobules_Timer = 0;
- globulespell[0] = SPELL_SUMMON_WATER_GLOBULE_1;
- globulespell[1] = SPELL_SUMMON_WATER_GLOBULE_2;
- globulespell[2] = SPELL_SUMMON_WATER_GLOBULE_3;
- globulespell[3] = SPELL_SUMMON_WATER_GLOBULE_4;
-
- Earthquake = false;
- Phase2 = false;
-
- if (pInstance)
- pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, NOT_STARTED);
- }
+ m_uiTidalWave_Timer = 10000;
+ m_uiWateryGrave_Timer = 30000;
+ m_uiEarthquake_Timer = 40000;
+ m_uiWateryGlobules_Timer = 0;
- void StartEvent()
- {
- DoScriptText(SAY_AGGRO, m_creature);
+ m_bEarthquake = false;
+ m_bPhase2 = false;
- if (pInstance)
- pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, IN_PROGRESS);
+ if (m_pInstance)
+ m_pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, NOT_STARTED);
}
- void KilledUnit(Unit *victim)
+ void KilledUnit(Unit* pVictim)
{
switch(rand()%3)
{
- case 0: DoScriptText(SAY_SLAY1, m_creature); break;
- case 1: DoScriptText(SAY_SLAY2, m_creature); break;
- case 2: DoScriptText(SAY_SLAY3, m_creature); break;
+ case 0: DoScriptText(SAY_SLAY1, m_creature); break;
+ case 1: DoScriptText(SAY_SLAY2, m_creature); break;
+ case 2: DoScriptText(SAY_SLAY3, m_creature); break;
}
}
- void JustDied(Unit *victim)
+ void JustDied(Unit* pVictim)
{
DoScriptText(SAY_DEATH, m_creature);
- if (pInstance)
- pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, DONE);
+ if (m_pInstance)
+ m_pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, NOT_STARTED);
}
- void EnterCombat(Unit *who)
+ void Aggro(Unit* pWho)
{
- PlayerList = &m_creature->GetMap()->GetPlayers();
- Playercount = PlayerList->getSize();
- StartEvent();
+ DoScriptText(SAY_AGGRO, m_creature);
+
+ if (m_pInstance)
+ m_pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, IN_PROGRESS);
}
- void ApplyWateryGrave(Unit *player, uint8 i)
+ void JustSummoned(Creature* pSummoned)
{
- switch(i)
+ if (pSummoned->GetEntry() == NPC_TIDEWALKER_LURKER)
{
- case 0: player->CastSpell(player, SPELL_WATERY_GRAVE_1, true); break;
- case 1: player->CastSpell(player, SPELL_WATERY_GRAVE_2, true); break;
- case 2: player->CastSpell(player, SPELL_WATERY_GRAVE_3, true); break;
- case 3: player->CastSpell(player, SPELL_WATERY_GRAVE_4, true); break;
+ if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ pSummoned->AI()->AttackStart(pTarget);
+ }
+
+ if (pSummoned->GetEntry() == NPC_WATER_GLOBULE)
+ {
+ if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ pSummoned->GetMotionMaster()->MoveFollow(pTarget, 0.0f, 0.0f);
}
}
- void UpdateAI(const uint32 diff)
+ void UpdateAI(const uint32 uiDiff)
{
//Return since we have no target
- if (!UpdateVictim() )
+ if (!UpdateVictim())
return;
- //Earthquake_Timer
- if (Earthquake_Timer < diff)
+ //m_uiEarthquake_Timer
+ if (m_uiEarthquake_Timer < uiDiff)
{
- if (!Earthquake)
+ if (!m_bEarthquake)
{
DoCast(m_creature->getVictim(), SPELL_EARTHQUAKE);
- Earthquake = true;
- Earthquake_Timer = 10000;
+ m_bEarthquake = true;
+ m_uiEarthquake_Timer = 5000;
}
else
{
- switch(rand()%2)
- {
- case 0: DoScriptText(SAY_SUMMON1, m_creature); break;
- case 1: DoScriptText(SAY_SUMMON2, m_creature); break;
- }
+ DoScriptText(urand(0,1) ? SAY_SUMMON1 : SAY_SUMMON2, m_creature);
+
+ //north
+ m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A6,true);
+ m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A7,true);
+ m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A8,true);
+ m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A9,true);
+ m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A10,true);
+
+ //south
+ m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B6,true);
+ m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B7,true);
+ m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B8,true);
+ m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B9,true);
+ m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B10,true);
- for(uint8 i = 0; i < 10; i++)
- {
- Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0);
- Creature* Murloc = m_creature->SummonCreature(MurlocCords[i][0],MurlocCords[i][1],MurlocCords[i][2],MurlocCords[i][3],MurlocCords[i][4], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
- if(target && Murloc)
- Murloc->AI()->AttackStart(target);
- }
DoScriptText(EMOTE_EARTHQUAKE, m_creature);
- Earthquake = false;
- Earthquake_Timer = 40000+rand()%5000;
+
+ m_bEarthquake = false;
+ m_uiEarthquake_Timer = 40000+rand()%5000;
}
- }else Earthquake_Timer -= diff;
+ }else m_uiEarthquake_Timer -= uiDiff;
- //TidalWave_Timer
- if (TidalWave_Timer < diff)
+ //m_uiTidalWave_Timer
+ if (m_uiTidalWave_Timer < uiDiff)
{
DoCast(m_creature->getVictim(), SPELL_TIDAL_WAVE);
- TidalWave_Timer = 20000;
- }else TidalWave_Timer -= diff;
+ m_uiTidalWave_Timer = 20000;
+ }else m_uiTidalWave_Timer -= uiDiff;
- if (!Phase2)
+ if (!m_bPhase2)
{
- //WateryGrave_Timer
- if (WateryGrave_Timer < diff)
+ //m_uiWateryGrave_Timer
+ if (m_uiWateryGrave_Timer < uiDiff)
{
//Teleport 4 players under the waterfalls
- Unit *target;
- using std::set;
- set<int>list;
- set<int>::iterator itr;
for(uint8 i = 0; i < 4; i++)
{
- counter = 0;
- do{target = SelectTarget(SELECT_TARGET_RANDOM, 1, 50, true); //target players only
- if(counter < Playercount)
- break;
- if(target) itr = list.find(target->GetGUID());
- counter++;
- }while(itr != list.end());
- if(target){list.insert(target->GetGUID());
- ApplyWateryGrave(target, i);
+ Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
+
+ if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER && !pTarget->HasAuraType(SPELL_AURA_MOD_STUN) && pTarget->IsWithinDistInMap(m_creature, 45.0f))
+ {
+ switch(i)
+ {
+ case 0: m_creature->CastSpell(pTarget,SPELL_WATERY_GRAVE_1,false); break;
+ case 1: m_creature->CastSpell(pTarget,SPELL_WATERY_GRAVE_2,false); break;
+ case 2: m_creature->CastSpell(pTarget,SPELL_WATERY_GRAVE_3,false); break;
+ case 3: m_creature->CastSpell(pTarget,SPELL_WATERY_GRAVE_4,false); break;
+ }
}
}
- switch(rand()%2)
- {
- case 0: DoScriptText(SAY_SUMMON_BUBL1, m_creature); break;
- case 1: DoScriptText(SAY_SUMMON_BUBL2, m_creature); break;
- }
-
+ DoScriptText(urand(0,1) ? SAY_SUMMON_BUBL1 : SAY_SUMMON_BUBL2, m_creature);
DoScriptText(EMOTE_WATERY_GRAVE, m_creature);
- WateryGrave_Timer = 30000;
- }else WateryGrave_Timer -= diff;
+
+ m_uiWateryGrave_Timer = 30000;
+ }else m_uiWateryGrave_Timer -= uiDiff;
//Start Phase2
if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25)
- Phase2 = true;
+ m_bPhase2 = true;
}
else
{
- //WateryGlobules_Timer
- if (WateryGlobules_Timer < diff)
+ //m_uiWateryGlobules_Timer
+ if (m_uiWateryGlobules_Timer < uiDiff)
{
- Unit* globuletarget;
- using std::set;
- set<int>globulelist;
- set<int>::iterator itr;
- for (int8 g = 0; g < 4; g++) //one unit cant cast more than one spell per update, so some players have to cast for us XD
- {
- counter = 0;
- do {globuletarget = SelectTarget(SELECT_TARGET_RANDOM, 0,50,true);
- if(globuletarget) itr = globulelist.find(globuletarget->GetGUID());
- if (counter > Playercount)
- break;
- counter++;
- } while (itr != globulelist.end());
- if(globuletarget)globulelist.insert(globuletarget->GetGUID());
- globuletarget->CastSpell(globuletarget, globulespell[g], true);
- }
DoScriptText(EMOTE_WATERY_GLOBULES, m_creature);
- WateryGlobules_Timer = 25000;
- }else WateryGlobules_Timer -= diff;
+
+ m_creature->CastSpell(m_creature,SPELL_SUMMON_GLOBULE_1,true);
+ m_creature->CastSpell(m_creature,SPELL_SUMMON_GLOBULE_2,true);
+ m_creature->CastSpell(m_creature,SPELL_SUMMON_GLOBULE_3,true);
+ m_creature->CastSpell(m_creature,SPELL_SUMMON_GLOBULE_4,false);
+
+ m_uiWateryGlobules_Timer = 25000;
+ }else m_uiWateryGlobules_Timer -= uiDiff;
}
DoMeleeAttackIfReady();
@@ -291,67 +242,63 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
};
//Water Globule AI
-#define SPELL_GLOBULE_EXPLOSION 37871
-
struct TRINITY_DLL_DECL mob_water_globuleAI : public ScriptedAI
{
- mob_water_globuleAI(Creature *c) : ScriptedAI(c) {}
+ mob_water_globuleAI(Creature* c) : ScriptedAI(c) { }
- uint32 Check_Timer;
+ // timers
+ uint32 m_uiCheck_Timer;
void Reset()
{
- Check_Timer = 1000;
-
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ m_uiCheck_Timer = 1000;
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->setFaction(14);
}
- void EnterCombat(Unit *who) {}
+ void Aggro(Unit* pWho) {}
- void MoveInLineOfSight(Unit *who)
+ void MoveInLineOfSight(Unit* pWho)
{
- if (!who || m_creature->getVictim())
+ if (!pWho || m_creature->getVictim())
return;
- if (who->isTargetableForAttack() && who->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(who))
+ if (pWho->isTargetableForAttack() && pWho->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(pWho))
{
//no attack radius check - it attacks the first target that moves in his los
- //who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
- AttackStart(who);
+ //pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
+ AttackStart(pWho);
}
}
- void UpdateAI(const uint32 diff)
+ void UpdateAI(const uint32 uiDiff)
{
//Return since we have no target
- if (!UpdateVictim() )
+ if (!UpdateVictim())
return;
- if (Check_Timer < diff)
+ if (m_uiCheck_Timer < uiDiff)
{
if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 5))
{
- DoCast(m_creature->getVictim(), SPELL_GLOBULE_EXPLOSION);
+ m_creature->DealDamage(m_creature->getVictim(), 4000+rand()%2000, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_FROST, NULL, false);
//despawn
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
}
- Check_Timer = 500;
- }else Check_Timer -= diff;
+ m_uiCheck_Timer = 500;
+ }else m_uiCheck_Timer -= uiDiff;
//do NOT deal any melee damage to the target.
}
};
-CreatureAI* GetAI_boss_morogrim_tidewalker(Creature *_Creature)
+CreatureAI* GetAI_boss_morogrim_tidewalker(Creature* pCreature)
{
- return new boss_morogrim_tidewalkerAI (_Creature);
+ return new boss_morogrim_tidewalkerAI (pCreature);
}
-CreatureAI* GetAI_mob_water_globule(Creature *_Creature)
+CreatureAI* GetAI_mob_water_globule(Creature* pCreature)
{
- return new mob_water_globuleAI (_Creature);
+ return new mob_water_globuleAI (pCreature);
}
void AddSC_boss_morogrim_tidewalker()
@@ -359,13 +306,12 @@ void AddSC_boss_morogrim_tidewalker()
Script *newscript;
newscript = new Script;
- newscript->Name="boss_morogrim_tidewalker";
+ newscript->Name = "boss_morogrim_tidewalker";
newscript->GetAI = &GetAI_boss_morogrim_tidewalker;
newscript->RegisterSelf();
newscript = new Script;
- newscript->Name="mob_water_globule";
+ newscript->Name = "mob_water_globule";
newscript->GetAI = &GetAI_mob_water_globule;
newscript->RegisterSelf();
}
-
diff --git a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
index 3e7137094d2..2cb9954c868 100644
--- a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
+++ b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
@@ -148,7 +148,7 @@ struct TRINITY_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI
m_creature->setFaction(7);
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 8);
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, m_creature->GetNativeDisplayId());
+ m_creature->SetDisplayId(m_creature->GetNativeDisplayId());
event_starter = 0;
event_startet = false;
@@ -183,7 +183,7 @@ struct TRINITY_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI
}
}
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, modelid_dk_armor[model_counter]);
+ m_creature->SetDisplayId(modelid_dk_armor[model_counter]);
m_creature->LoadEquipment(m_creature->GetEquipmentId());
}
diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp
index 2cefb3fee4c..b754247b4a4 100644
--- a/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp
+++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp
@@ -53,6 +53,7 @@ struct TRINITY_DLL_DECL instance_blood_furnace : public ScriptedInstance
uint64 PrisonCell8GUID;
uint32 Encounter[ENCOUNTERS];
+ std::string str_data;
void Initialize()
{
@@ -158,6 +159,19 @@ struct TRINITY_DLL_DECL instance_blood_furnace : public ScriptedInstance
case TYPE_BROGGOK_EVENT: Encounter[1] = data; break;
case TYPE_KELIDAN_THE_BREAKER_EVENT: Encounter[2] = data; break;
}
+
+ if (data == DONE)
+ {
+ OUT_SAVE_INST_DATA;
+
+ std::ostringstream saveStream;
+ saveStream << Encounter[0] << " " << Encounter[1] << " " << Encounter[2];
+
+ str_data = saveStream.str();
+
+ SaveToDB();
+ OUT_SAVE_INST_DATA_COMPLETE;
+ }
}
uint32 GetData(uint32 data)
@@ -171,7 +185,31 @@ struct TRINITY_DLL_DECL instance_blood_furnace : public ScriptedInstance
return 0;
}
-
+
+ const char* Save()
+ {
+ return str_data.c_str();
+ }
+
+ void Load(const char* in)
+ {
+ if (!in)
+ {
+ OUT_LOAD_INST_DATA_FAIL;
+ return;
+ }
+
+ OUT_LOAD_INST_DATA(in);
+
+ std::istringstream loadStream(in);
+ loadStream >> Encounter[0] >> Encounter[1] >> Encounter[2];
+
+ for(uint8 i = 0; i < ENCOUNTERS; ++i)
+ if (Encounter[i] == IN_PROGRESS || Encounter[i] == FAIL)
+ Encounter[i] = NOT_STARTED;
+
+ OUT_LOAD_INST_DATA_COMPLETE;
+ }
};
diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp
index 08df637eb04..bbfdcf0f862 100644
--- a/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp
+++ b/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp
@@ -111,7 +111,7 @@ struct TRINITY_DLL_DECL boss_midnightAI : public ScriptedAI
m_creature->GetMotionMaster()->MoveIdle();
if (Unit *pAttumen = Unit::GetUnit(*m_creature, Attumen))
{
- pAttumen->SetUInt32Value(UNIT_FIELD_DISPLAYID, MOUNTED_DISPLAYID);
+ pAttumen->SetDisplayId(MOUNTED_DISPLAYID);
pAttumen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
if(pAttumen->getVictim())
{
diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp
index 4775ed79a70..0501a6b6436 100644
--- a/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp
+++ b/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp
@@ -137,7 +137,7 @@ struct TRINITY_DLL_DECL netherspite_infernalAI : public ScriptedAI
{
if(spell->Id == SPELL_INFERNAL_RELAY)
{
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, m_creature->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
+ m_creature->SetDisplayId(m_creature->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
HellfireTimer = 4000;
CleanupTimer = 170000;
@@ -368,7 +368,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
if (Infernal)
{
- Infernal->SetUInt32Value(UNIT_FIELD_DISPLAYID, INFERNAL_MODEL_INVISIBLE);
+ Infernal->SetDisplayId(INFERNAL_MODEL_INVISIBLE);
Infernal->setFaction(m_creature->getFaction());
if(point)
CAST_AI(netherspite_infernalAI, Infernal->AI())->point=point;
diff --git a/src/bindings/scripts/scripts/zone/maraudon/boss_noxxion.cpp b/src/bindings/scripts/scripts/zone/maraudon/boss_noxxion.cpp
index 00b6d28d6b0..bd2b2096432 100644
--- a/src/bindings/scripts/scripts/zone/maraudon/boss_noxxion.cpp
+++ b/src/bindings/scripts/scripts/zone/maraudon/boss_noxxion.cpp
@@ -82,7 +82,7 @@ struct TRINITY_DLL_DECL boss_noxxionAI : public ScriptedAI
m_creature->setFaction(14);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
//Noxxion model
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,11172);
+ m_creature->SetDisplayId(11172);
Invisible = false;
//m_creature->m_canMove = true;
} else if (Invisible)
@@ -119,7 +119,7 @@ struct TRINITY_DLL_DECL boss_noxxionAI : public ScriptedAI
m_creature->setFaction(35);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
// Invisible Model
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,11686);
+ m_creature->SetDisplayId(11686);
SummonAdds(m_creature->getVictim());
SummonAdds(m_creature->getVictim());
SummonAdds(m_creature->getVictim());
diff --git a/src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp b/src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp
index faa7efa53a5..aee7fa3e896 100644
--- a/src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp
+++ b/src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp
@@ -83,7 +83,7 @@ struct TRINITY_DLL_DECL boss_jandicebarovAI : public ScriptedAI
//Become visible again
m_creature->setFaction(14);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,11073); //Jandice Model
+ m_creature->SetDisplayId(11073); //Jandice Model
Invisible = false;
} else if (Invisible)
{
@@ -114,7 +114,7 @@ struct TRINITY_DLL_DECL boss_jandicebarovAI : public ScriptedAI
m_creature->InterruptNonMeleeSpells(false);
m_creature->setFaction(35);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,11686); // Invisible Model
+ m_creature->SetDisplayId(11686); // Invisible Model
DoModifyThreatPercent(m_creature->getVictim(),-99);
//Summon 10 Illusions attacking random gamers
diff --git a/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp b/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
index f7ec954f282..de8da72593d 100644
--- a/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
+++ b/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
@@ -1470,17 +1470,17 @@ struct TRINITY_DLL_DECL npc_lord_illidan_stormrageAI : public ScriptedAI
{
if(rand()%3 == 1 && FelguardCount<2)
{
- Spawn->SetUInt32Value(UNIT_FIELD_DISPLAYID,18654);
+ Spawn->SetDisplayId(18654);
++FelguardCount;
}
else if(DreadlordCount < 3)
{
- Spawn->SetUInt32Value(UNIT_FIELD_DISPLAYID,19991);
+ Spawn->SetDisplayId(19991);
++DreadlordCount;
}
else if(FelguardCount<2)
{
- Spawn->SetUInt32Value(UNIT_FIELD_DISPLAYID,18654);
+ Spawn->SetDisplayId(18654);
++FelguardCount;
}
}
diff --git a/src/bindings/scripts/scripts/zone/stratholme/boss_dathrohan_balnazzar.cpp b/src/bindings/scripts/scripts/zone/stratholme/boss_dathrohan_balnazzar.cpp
index 8372393f2f7..30c8eb0ae2c 100644
--- a/src/bindings/scripts/scripts/zone/stratholme/boss_dathrohan_balnazzar.cpp
+++ b/src/bindings/scripts/scripts/zone/stratholme/boss_dathrohan_balnazzar.cpp
@@ -112,7 +112,7 @@ struct TRINITY_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI
// MindControl_Timer = 10000;
Transformed = false;
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,10545);
+ m_creature->SetDisplayId(10545);
m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.00f);
}
@@ -207,7 +207,7 @@ struct TRINITY_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI
{
//Cast
DoCast(m_creature,SPELL_BALNAZZARTRANSFORM); //restore hp, mana and stun
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,10691); //then change disaply id
+ m_creature->SetDisplayId(10691); //then change disaply id
m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 3.00f); //then, change size
Transformed = true;
}
diff --git a/src/bindings/scripts/scripts/zone/stratholme/boss_magistrate_barthilas.cpp b/src/bindings/scripts/scripts/zone/stratholme/boss_magistrate_barthilas.cpp
index d65390ab6d7..670b7bc75a2 100644
--- a/src/bindings/scripts/scripts/zone/stratholme/boss_magistrate_barthilas.cpp
+++ b/src/bindings/scripts/scripts/zone/stratholme/boss_magistrate_barthilas.cpp
@@ -56,9 +56,9 @@ struct TRINITY_DLL_DECL boss_magistrate_barthilasAI : public ScriptedAI
AngerCount = 0;
if (m_creature->isAlive())
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_NORMAL);
+ m_creature->SetDisplayId(MODEL_NORMAL);
else
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_HUMAN);
+ m_creature->SetDisplayId(MODEL_HUMAN);
}
void MoveInLineOfSight(Unit *who)
@@ -70,7 +70,7 @@ struct TRINITY_DLL_DECL boss_magistrate_barthilasAI : public ScriptedAI
void JustDied(Unit* Killer)
{
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_HUMAN);
+ m_creature->SetDisplayId(MODEL_HUMAN);
}
void EnterCombat(Unit *who)
diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp
index 69abca68dff..f789cb8a75f 100644
--- a/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp
+++ b/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp
@@ -55,7 +55,7 @@ struct TRINITY_DLL_DECL boss_lajAI : public ScriptedAI
void Reset()
{
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,MODEL_DEFAULT);
+ m_creature->SetDisplayId(MODEL_DEFAULT);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false);
@@ -74,7 +74,7 @@ struct TRINITY_DLL_DECL boss_lajAI : public ScriptedAI
switch(rand()%5)
{
case 0:
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,MODEL_DEFAULT);
+ m_creature->SetDisplayId(MODEL_DEFAULT);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false);
@@ -82,7 +82,7 @@ struct TRINITY_DLL_DECL boss_lajAI : public ScriptedAI
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
break;
case 1:
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,MODEL_ARCANE);
+ m_creature->SetDisplayId(MODEL_ARCANE);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, true);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false);
@@ -90,7 +90,7 @@ struct TRINITY_DLL_DECL boss_lajAI : public ScriptedAI
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
break;
case 2:
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,MODEL_FIRE);
+ m_creature->SetDisplayId(MODEL_FIRE);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
@@ -98,7 +98,7 @@ struct TRINITY_DLL_DECL boss_lajAI : public ScriptedAI
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
break;
case 3:
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,MODEL_FROST);
+ m_creature->SetDisplayId(MODEL_FROST);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false);
@@ -106,7 +106,7 @@ struct TRINITY_DLL_DECL boss_lajAI : public ScriptedAI
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
break;
case 4:
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,MODEL_NATURE);
+ m_creature->SetDisplayId(MODEL_NATURE);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false);
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false);
diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_astromancer.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_astromancer.cpp
index 12dbe8ad55e..533d67d70be 100644
--- a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_astromancer.cpp
+++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_astromancer.cpp
@@ -129,7 +129,7 @@ struct TRINITY_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
m_creature->SetVisibility(VISIBILITY_ON);
m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize);
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_HUMAN);
+ m_creature->SetDisplayId(MODEL_HUMAN);
Summons.DespawnAll();
}
@@ -155,7 +155,7 @@ struct TRINITY_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI
void JustDied(Unit *victim)
{
m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize);
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_HUMAN);
+ m_creature->SetDisplayId(MODEL_HUMAN);
DoScriptText(SAY_DEATH, m_creature);
if(pInstance)
@@ -381,7 +381,7 @@ struct TRINITY_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI
DoScriptText(SAY_VOIDA, m_creature);
DoScriptText(SAY_VOIDB, m_creature);
m_creature->SetArmor(WV_ARMOR);
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_VOIDWALKER);
+ m_creature->SetDisplayId(MODEL_VOIDWALKER);
m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize*2.5f);
}
diff --git a/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp b/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp
index b8a1ca21f45..06f1b9efe1a 100644
--- a/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp
+++ b/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp
@@ -89,7 +89,7 @@ struct TRINITY_DLL_DECL boss_ingvar_the_plundererAI : public ScriptedAI
void Reset()
{
if(undead) // Visual Hack
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_INGVAR_HUMAN);
+ m_creature->SetDisplayId(MODEL_INGVAR_HUMAN);
undead = false;
event_inProgress = false;
@@ -362,7 +362,7 @@ struct TRINITY_DLL_DECL mob_annhylde_the_callerAI : public ScriptedAI
{
ingvar->RemoveAurasDueToSpell(SPELL_SCOURG_RESURRECTION_DUMMY);
//ingvar->CastSpell(ingvar,SPELL_INGVAR_TRANSFORM,false);
- ingvar->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_INGVAR_UNDEAD); // Visual Hack - when he dies he becomes human model -> wrong
+ ingvar->SetDisplayId(MODEL_INGVAR_UNDEAD); // Visual Hack - when he dies he becomes human model -> wrong
Creature* c_ingvar = ingvar;
CAST_AI(boss_ingvar_the_plundererAI, (c_ingvar->AI()))->StartZombiePhase();
diff --git a/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp b/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp
index 2e93b685120..a87543725e2 100644
--- a/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp
+++ b/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp
@@ -392,7 +392,7 @@ struct TRINITY_DLL_DECL boss_hex_lord_malacrassAI : public ScriptedAI
}
else
{
- trigger->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686);
+ trigger->SetDisplayId(11686);
trigger->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
trigger->CastSpell(target, SPELL_SIPHON_SOUL, true);
trigger->GetMotionMaster()->MoveChase(m_creature);
diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_arlokk.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_arlokk.cpp
index 018f33cf2bf..9789d362ab9 100644
--- a/src/bindings/scripts/scripts/zone/zulgurub/boss_arlokk.cpp
+++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_arlokk.cpp
@@ -73,7 +73,7 @@ struct TRINITY_DLL_DECL boss_arlokkAI : public ScriptedAI
PhaseTwo = false;
VanishedOnce = false;
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,15218);
+ m_creature->SetDisplayId(15218);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
@@ -85,7 +85,7 @@ struct TRINITY_DLL_DECL boss_arlokkAI : public ScriptedAI
void JustDied(Unit* Killer)
{
DoScriptText(SAY_DEATH, m_creature);
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,15218);
+ m_creature->SetDisplayId(15218);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
if(pInstance)
@@ -143,7 +143,7 @@ struct TRINITY_DLL_DECL boss_arlokkAI : public ScriptedAI
if (Vanish_Timer < diff)
{
//Invisble Model
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,11686);
+ m_creature->SetDisplayId(11686);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
//m_creature->CombatStop();
DoResetThreat();
@@ -159,7 +159,7 @@ struct TRINITY_DLL_DECL boss_arlokkAI : public ScriptedAI
Unit* target = NULL;
target = SelectUnit(SELECT_TARGET_RANDOM,0);
//The Panther Model
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,15215);
+ m_creature->SetDisplayId(15215);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
const CreatureInfo *cinfo = m_creature->GetCreatureInfo();
@@ -169,7 +169,7 @@ struct TRINITY_DLL_DECL boss_arlokkAI : public ScriptedAI
if(target)
AttackStart(target);
//The Panther Model
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,15215);
+ m_creature->SetDisplayId(15215);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
PhaseTwo = true;
}else Visible_Timer -= diff;
diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_jeklik.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_jeklik.cpp
index 1abac285389..d1ef25a03a8 100644
--- a/src/bindings/scripts/scripts/zone/zulgurub/boss_jeklik.cpp
+++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_jeklik.cpp
@@ -196,7 +196,7 @@ struct TRINITY_DLL_DECL boss_jeklikAI : public ScriptedAI
}
else
{
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,15219);
+ m_creature->SetDisplayId(15219);
DoResetThreat();
PhaseTwo = true;
}
diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp
index ff5785418fc..b3b92cbc2c7 100644
--- a/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp
+++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp
@@ -187,7 +187,7 @@ struct TRINITY_DLL_DECL boss_marliAI : public ScriptedAI
if (TransformBack_Timer < diff)
{
- m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,15220);
+ m_creature->SetDisplayId(15220);
const CreatureInfo *cinfo = m_creature->GetCreatureInfo();
m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 1)));
m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 1)));