change CRLF files to LF This needs to be done in the main TC2 repo too

--HG--
branch : trunk
This commit is contained in:
2009-02-26 11:11:57 -05:00
parent 64540eff85
commit 2376e04a3a
8 changed files with 3281 additions and 3281 deletions
@@ -1,189 +1,189 @@
DROP TABLE IF EXISTS `achievement_reward`; DROP TABLE IF EXISTS `achievement_reward`;
CREATE TABLE `achievement_reward` ( CREATE TABLE `achievement_reward` (
`entry` mediumint(8) unsigned NOT NULL default '0', `entry` mediumint(8) unsigned NOT NULL default '0',
`title_A` mediumint(8) unsigned NOT NULL default '0', `title_A` mediumint(8) unsigned NOT NULL default '0',
`title_H` mediumint(8) unsigned NOT NULL default '0', `title_H` mediumint(8) unsigned NOT NULL default '0',
`item` mediumint(8) unsigned NOT NULL default '0', `item` mediumint(8) unsigned NOT NULL default '0',
`sender` mediumint(8) unsigned NOT NULL default '0', `sender` mediumint(8) unsigned NOT NULL default '0',
`subject` varchar(255) default NULL, `subject` varchar(255) default NULL,
`text` text, `text` text,
PRIMARY KEY (`entry`) PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System'; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
DROP TABLE IF EXISTS `locales_achievement_reward`; DROP TABLE IF EXISTS `locales_achievement_reward`;
CREATE TABLE `locales_achievement_reward` ( CREATE TABLE `locales_achievement_reward` (
`entry` mediumint(8) unsigned NOT NULL default '0', `entry` mediumint(8) unsigned NOT NULL default '0',
`subject_loc1` varchar(100) NOT NULL default '', `subject_loc1` varchar(100) NOT NULL default '',
`subject_loc2` varchar(100) NOT NULL default '', `subject_loc2` varchar(100) NOT NULL default '',
`subject_loc3` varchar(100) NOT NULL default '', `subject_loc3` varchar(100) NOT NULL default '',
`subject_loc4` varchar(100) NOT NULL default '', `subject_loc4` varchar(100) NOT NULL default '',
`subject_loc5` varchar(100) NOT NULL default '', `subject_loc5` varchar(100) NOT NULL default '',
`subject_loc6` varchar(100) NOT NULL default '', `subject_loc6` varchar(100) NOT NULL default '',
`subject_loc7` varchar(100) NOT NULL default '', `subject_loc7` varchar(100) NOT NULL default '',
`subject_loc8` varchar(100) NOT NULL default '', `subject_loc8` varchar(100) NOT NULL default '',
`text_loc1` text default NULL, `text_loc1` text default NULL,
`text_loc2` text default NULL, `text_loc2` text default NULL,
`text_loc3` text default NULL, `text_loc3` text default NULL,
`text_loc4` text default NULL, `text_loc4` text default NULL,
`text_loc5` text default NULL, `text_loc5` text default NULL,
`text_loc6` text default NULL, `text_loc6` text default NULL,
`text_loc7` text default NULL, `text_loc7` text default NULL,
`text_loc8` text default NULL, `text_loc8` text default NULL,
PRIMARY KEY (`entry`) PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
TRUNCATE `creature_equip_template`; TRUNCATE `creature_equip_template`;
ALTER TABLE `creature_equip_template` ALTER TABLE `creature_equip_template`
DROP COLUMN `equipinfo1`, DROP COLUMN `equipinfo1`,
DROP COLUMN `equipinfo2`, DROP COLUMN `equipinfo2`,
DROP COLUMN `equipinfo3`, DROP COLUMN `equipinfo3`,
DROP COLUMN `equipslot1`, DROP COLUMN `equipslot1`,
DROP COLUMN `equipslot2`, DROP COLUMN `equipslot2`,
DROP COLUMN `equipslot3`, DROP COLUMN `equipslot3`,
CHANGE COLUMN `equipmodel1` `equipentry1` mediumint(8) UNSIGNED default '0' NOT NULL, CHANGE COLUMN `equipmodel1` `equipentry1` mediumint(8) UNSIGNED default '0' NOT NULL,
CHANGE COLUMN `equipmodel2` `equipentry2` mediumint(8) UNSIGNED default '0' NOT NULL, CHANGE COLUMN `equipmodel2` `equipentry2` mediumint(8) UNSIGNED default '0' NOT NULL,
CHANGE COLUMN `equipmodel3` `equipentry3` mediumint(8) UNSIGNED default '0' NOT NULL; CHANGE COLUMN `equipmodel3` `equipentry3` mediumint(8) UNSIGNED default '0' NOT NULL;
UPDATE `creature_template` set equipment_id = 0; UPDATE `creature_template` set equipment_id = 0;
ALTER TABLE `item_template` ALTER TABLE `item_template`
ADD COLUMN `ScalingStatDistribution` smallint(6) DEFAULT '0' NOT NULL after `stat_value10`, ADD COLUMN `ScalingStatDistribution` smallint(6) DEFAULT '0' NOT NULL after `stat_value10`,
ADD COLUMN `ScalingStatValue` smallint(6) DEFAULT '0' NOT NULL after `ScalingStatDistribution`, ADD COLUMN `ScalingStatValue` smallint(6) DEFAULT '0' NOT NULL after `ScalingStatDistribution`,
ADD COLUMN `ItemLimitCategory` smallint(6) DEFAULT '0' NOT NULL after `ArmorDamageModifier`, ADD COLUMN `ItemLimitCategory` smallint(6) DEFAULT '0' NOT NULL after `ArmorDamageModifier`,
CHANGE COLUMN `Duration` `Duration` int(11) NOT NULL default '0' COMMENT 'Duration in seconds. Negative value means realtime, postive value ingame time' after ArmorDamageModifier, CHANGE COLUMN `Duration` `Duration` int(11) NOT NULL default '0' COMMENT 'Duration in seconds. Negative value means realtime, postive value ingame time' after ArmorDamageModifier,
ADD COLUMN `StatsCount` tinyint(3) UNSIGNED DEFAULT '0' NOT NULL after `ContainerSlots`, ADD COLUMN `StatsCount` tinyint(3) UNSIGNED DEFAULT '0' NOT NULL after `ContainerSlots`,
CHANGE COLUMN `TotemCategory` `TotemCategory` mediumint(9) NOT NULL default '0'; CHANGE COLUMN `TotemCategory` `TotemCategory` mediumint(9) NOT NULL default '0';
UPDATE `item_template` UPDATE `item_template`
SET `maxcount`=0 WHERE `maxcount` > 32000; SET `maxcount`=0 WHERE `maxcount` > 32000;
UPDATE `item_template` UPDATE `item_template`
SET `stackable`=0 WHERE `stackable` > 32000; SET `stackable`=0 WHERE `stackable` > 32000;
ALTER TABLE `item_template` ALTER TABLE `item_template`
CHANGE COLUMN `maxcount` `maxcount` smallint(5) NOT NULL default '-1', CHANGE COLUMN `maxcount` `maxcount` smallint(5) NOT NULL default '-1',
CHANGE COLUMN `stackable` `stackable` smallint(5) NOT NULL default '1'; CHANGE COLUMN `stackable` `stackable` smallint(5) NOT NULL default '1';
UPDATE `item_template` UPDATE `item_template`
SET `stackable`=-1 WHERE `stackable` = 0; SET `stackable`=-1 WHERE `stackable` = 0;
ALTER TABLE `quest_template` ALTER TABLE `quest_template`
ADD COLUMN `PlayersSlain` tinyint(3) UNSIGNED DEFAULT '0' NOT NULL after `CharTitleId`, ADD COLUMN `PlayersSlain` tinyint(3) UNSIGNED DEFAULT '0' NOT NULL after `CharTitleId`,
ADD COLUMN `BonusTalents` tinyint(3) UNSIGNED DEFAULT '0' NOT NULL after `PlayersSlain`, ADD COLUMN `BonusTalents` tinyint(3) UNSIGNED DEFAULT '0' NOT NULL after `PlayersSlain`,
CHANGE COLUMN `RewHonorableKills` `RewHonorableKills` int unsigned NOT NULL default '0'; CHANGE COLUMN `RewHonorableKills` `RewHonorableKills` int unsigned NOT NULL default '0';
DROP TABLE IF EXISTS `milling_loot_template`; DROP TABLE IF EXISTS `milling_loot_template`;
CREATE TABLE `milling_loot_template` ( CREATE TABLE `milling_loot_template` (
`entry` mediumint(8) unsigned NOT NULL default '0', `entry` mediumint(8) unsigned NOT NULL default '0',
`item` mediumint(8) unsigned NOT NULL default '0', `item` mediumint(8) unsigned NOT NULL default '0',
`ChanceOrQuestChance` float NOT NULL default '100', `ChanceOrQuestChance` float NOT NULL default '100',
`groupid` tinyint(3) unsigned NOT NULL default '0', `groupid` tinyint(3) unsigned NOT NULL default '0',
`mincountOrRef` mediumint(9) NOT NULL default '1', `mincountOrRef` mediumint(9) NOT NULL default '1',
`maxcount` tinyint(3) unsigned NOT NULL default '1', `maxcount` tinyint(3) unsigned NOT NULL default '1',
`lootcondition` tinyint(3) unsigned NOT NULL default '0', `lootcondition` tinyint(3) unsigned NOT NULL default '0',
`condition_value1` mediumint(8) unsigned NOT NULL default '0', `condition_value1` mediumint(8) unsigned NOT NULL default '0',
`condition_value2` mediumint(8) unsigned NOT NULL default '0', `condition_value2` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`entry`,`item`) PRIMARY KEY (`entry`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System'; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
DROP TABLE IF EXISTS `spell_affect`; DROP TABLE IF EXISTS `spell_affect`;
CREATE TABLE `spell_affect` ( CREATE TABLE `spell_affect` (
`entry` smallint(5) unsigned NOT NULL default '0', `entry` smallint(5) unsigned NOT NULL default '0',
`effectId` tinyint(3) unsigned NOT NULL default '0', `effectId` tinyint(3) unsigned NOT NULL default '0',
`SpellClassMask0` int(5) unsigned NOT NULL default '0', `SpellClassMask0` int(5) unsigned NOT NULL default '0',
`SpellClassMask1` int(5) unsigned NOT NULL default '0', `SpellClassMask1` int(5) unsigned NOT NULL default '0',
`SpellClassMask2` int(5) unsigned NOT NULL default '0', `SpellClassMask2` int(5) unsigned NOT NULL default '0',
PRIMARY KEY (`entry`,`effectId`) PRIMARY KEY (`entry`,`effectId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
ALTER TABLE `skill_discovery_template` ALTER TABLE `skill_discovery_template`
DROP PRIMARY KEY, DROP PRIMARY KEY,
ADD PRIMARY KEY (`spellId`,`reqSpell`), ADD PRIMARY KEY (`spellId`,`reqSpell`),
ADD COLUMN `reqClass` tinyint(2) unsigned NOT NULL default '0' COMMENT 'class requirement' AFTER reqSpell; ADD COLUMN `reqClass` tinyint(2) unsigned NOT NULL default '0' COMMENT 'class requirement' AFTER reqSpell;
ALTER TABLE skill_discovery_template ALTER TABLE skill_discovery_template
DROP COLUMN `reqClass`, DROP COLUMN `reqClass`,
ADD COLUMN `reqSkillValue` smallint(5) unsigned NOT NULL default '0' COMMENT 'skill points requirement' AFTER reqSpell; ADD COLUMN `reqSkillValue` smallint(5) unsigned NOT NULL default '0' COMMENT 'skill points requirement' AFTER reqSpell;
DROP TABLE IF EXISTS `player_classlevelstats`; DROP TABLE IF EXISTS `player_classlevelstats`;
CREATE TABLE `player_classlevelstats` ( CREATE TABLE `player_classlevelstats` (
`class` tinyint(3) unsigned NOT NULL, `class` tinyint(3) unsigned NOT NULL,
`level` tinyint(3) unsigned NOT NULL, `level` tinyint(3) unsigned NOT NULL,
`basehp` smallint(5) unsigned NOT NULL, `basehp` smallint(5) unsigned NOT NULL,
`basemana` smallint(5) unsigned NOT NULL, `basemana` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`class`,`level`) PRIMARY KEY (`class`,`level`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0 COMMENT='Stores levels stats.'; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0 COMMENT='Stores levels stats.';
DROP TABLE IF EXISTS `player_levelstats`; DROP TABLE IF EXISTS `player_levelstats`;
CREATE TABLE `player_levelstats` ( CREATE TABLE `player_levelstats` (
`race` tinyint(3) unsigned NOT NULL, `race` tinyint(3) unsigned NOT NULL,
`class` tinyint(3) unsigned NOT NULL, `class` tinyint(3) unsigned NOT NULL,
`level` tinyint(3) unsigned NOT NULL, `level` tinyint(3) unsigned NOT NULL,
`str` tinyint(3) unsigned NOT NULL, `str` tinyint(3) unsigned NOT NULL,
`agi` tinyint(3) unsigned NOT NULL, `agi` tinyint(3) unsigned NOT NULL,
`sta` tinyint(3) unsigned NOT NULL, `sta` tinyint(3) unsigned NOT NULL,
`inte` tinyint(3) unsigned NOT NULL, `inte` tinyint(3) unsigned NOT NULL,
`spi` tinyint(3) unsigned NOT NULL, `spi` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`race`,`class`,`level`) PRIMARY KEY (`race`,`class`,`level`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0 COMMENT='Stores levels stats.'; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0 COMMENT='Stores levels stats.';
DROP TABLE IF EXISTS `playercreateinfo_spell`; DROP TABLE IF EXISTS `playercreateinfo_spell`;
CREATE TABLE `playercreateinfo_spell` ( CREATE TABLE `playercreateinfo_spell` (
`race` tinyint(3) unsigned NOT NULL default '0', `race` tinyint(3) unsigned NOT NULL default '0',
`class` tinyint(3) unsigned NOT NULL default '0', `class` tinyint(3) unsigned NOT NULL default '0',
`Spell` mediumint(8) unsigned NOT NULL default '0', `Spell` mediumint(8) unsigned NOT NULL default '0',
`Note` varchar(255) default NULL, `Note` varchar(255) default NULL,
PRIMARY KEY (`race`,`class`,`Spell`) PRIMARY KEY (`race`,`class`,`Spell`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `playercreateinfo_action`; DROP TABLE IF EXISTS `playercreateinfo_action`;
CREATE TABLE `playercreateinfo_action` ( CREATE TABLE `playercreateinfo_action` (
`race` tinyint(3) unsigned NOT NULL default '0', `race` tinyint(3) unsigned NOT NULL default '0',
`class` tinyint(3) unsigned NOT NULL default '0', `class` tinyint(3) unsigned NOT NULL default '0',
`button` smallint(5) unsigned NOT NULL default '0', `button` smallint(5) unsigned NOT NULL default '0',
`action` smallint(5) unsigned NOT NULL default '0', `action` smallint(5) unsigned NOT NULL default '0',
`type` smallint(5) unsigned NOT NULL default '0', `type` smallint(5) unsigned NOT NULL default '0',
`misc` smallint(5) unsigned NOT NULL default '0', `misc` smallint(5) unsigned NOT NULL default '0',
KEY `playercreateinfo_race_class_index` (`race`,`class`) KEY `playercreateinfo_race_class_index` (`race`,`class`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `spell_learn_spell`; DROP TABLE IF EXISTS `spell_learn_spell`;
CREATE TABLE `spell_learn_spell` ( CREATE TABLE `spell_learn_spell` (
`entry` smallint(5) unsigned NOT NULL default '0', `entry` smallint(5) unsigned NOT NULL default '0',
`SpellID` smallint(5) unsigned NOT NULL default '0', `SpellID` smallint(5) unsigned NOT NULL default '0',
`Active` tinyint(3) unsigned NOT NULL default '1', `Active` tinyint(3) unsigned NOT NULL default '1',
PRIMARY KEY (`entry`,`SpellID`) PRIMARY KEY (`entry`,`SpellID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Item System'; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Item System';
DROP TABLE IF EXISTS `spell_proc_event`; DROP TABLE IF EXISTS `spell_proc_event`;
CREATE TABLE `spell_proc_event` ( CREATE TABLE `spell_proc_event` (
`entry` smallint(5) unsigned NOT NULL default '0', `entry` smallint(5) unsigned NOT NULL default '0',
`SchoolMask` tinyint(4) NOT NULL default '0', `SchoolMask` tinyint(4) NOT NULL default '0',
`SpellFamilyName` smallint(5) unsigned NOT NULL default '0', `SpellFamilyName` smallint(5) unsigned NOT NULL default '0',
`SpellFamilyMask0` int(10) unsigned NOT NULL default '0', `SpellFamilyMask0` int(10) unsigned NOT NULL default '0',
`SpellFamilyMask1` int(10) unsigned NOT NULL default '0', `SpellFamilyMask1` int(10) unsigned NOT NULL default '0',
`SpellFamilyMask2` int(10) unsigned NOT NULL default '0', `SpellFamilyMask2` int(10) unsigned NOT NULL default '0',
`procFlags` int(10) unsigned NOT NULL default '0', `procFlags` int(10) unsigned NOT NULL default '0',
`procEx` int(10) unsigned NOT NULL default '0', `procEx` int(10) unsigned NOT NULL default '0',
`ppmRate` float NOT NULL default '0', `ppmRate` float NOT NULL default '0',
`CustomChance` float NOT NULL default '0', `CustomChance` float NOT NULL default '0',
`Cooldown` int(10) unsigned NOT NULL default '0', `Cooldown` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`entry`) PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `player_xp_for_level`; DROP TABLE IF EXISTS `player_xp_for_level`;
CREATE TABLE `player_xp_for_level` ( CREATE TABLE `player_xp_for_level` (
`lvl` int(3) unsigned NOT NULL, `lvl` int(3) unsigned NOT NULL,
`xp_for_next_level` int(10) unsigned NOT NULL, `xp_for_next_level` int(10) unsigned NOT NULL,
PRIMARY KEY (`lvl`) PRIMARY KEY (`lvl`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `spell_loot_template`; DROP TABLE IF EXISTS `spell_loot_template`;
CREATE TABLE `spell_loot_template` ( CREATE TABLE `spell_loot_template` (
`entry` mediumint(8) unsigned NOT NULL default '0', `entry` mediumint(8) unsigned NOT NULL default '0',
`item` mediumint(8) unsigned NOT NULL default '0', `item` mediumint(8) unsigned NOT NULL default '0',
`ChanceOrQuestChance` float NOT NULL default '100', `ChanceOrQuestChance` float NOT NULL default '100',
`groupid` tinyint(3) unsigned NOT NULL default '0', `groupid` tinyint(3) unsigned NOT NULL default '0',
`mincountOrRef` mediumint(9) NOT NULL default '1', `mincountOrRef` mediumint(9) NOT NULL default '1',
`maxcount` tinyint(3) unsigned NOT NULL default '1', `maxcount` tinyint(3) unsigned NOT NULL default '1',
`lootcondition` tinyint(3) unsigned NOT NULL default '0', `lootcondition` tinyint(3) unsigned NOT NULL default '0',
`condition_value1` mediumint(8) unsigned NOT NULL default '0', `condition_value1` mediumint(8) unsigned NOT NULL default '0',
`condition_value2` mediumint(8) unsigned NOT NULL default '0', `condition_value2` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`entry`,`item`) PRIMARY KEY (`entry`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System'; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
File diff suppressed because it is too large Load Diff
@@ -1,450 +1,450 @@
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/>
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * 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. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * 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 /* ScriptData
SDName: Blades_Edge_Mountains SDName: Blades_Edge_Mountains
SD%Complete: 90 SD%Complete: 90
SDComment: Quest support: 10503, 10504, 10556, 10609, 10682, 10821, 10980. Ogri'la->Skettis Flight. (npc_daranelle needs bit more work before consider complete) SDComment: Quest support: 10503, 10504, 10556, 10609, 10682, 10821, 10980. Ogri'la->Skettis Flight. (npc_daranelle needs bit more work before consider complete)
SDCategory: Blade's Edge Mountains SDCategory: Blade's Edge Mountains
EndScriptData */ EndScriptData */
/* ContentData /* ContentData
mobs_bladespire_ogre mobs_bladespire_ogre
mobs_nether_drake mobs_nether_drake
npc_daranelle npc_daranelle
npc_overseer_nuaar npc_overseer_nuaar
npc_saikkal_the_elder npc_saikkal_the_elder
npc_skyguard_handler_irena npc_skyguard_handler_irena
go_legion_obelisk go_legion_obelisk
EndContentData */ EndContentData */
#include "precompiled.h" #include "precompiled.h"
//Support for quest: You're Fired! (10821) //Support for quest: You're Fired! (10821)
bool obelisk_one, obelisk_two, obelisk_three, obelisk_four, obelisk_five; bool obelisk_one, obelisk_two, obelisk_three, obelisk_four, obelisk_five;
#define LEGION_OBELISK_ONE 185193 #define LEGION_OBELISK_ONE 185193
#define LEGION_OBELISK_TWO 185195 #define LEGION_OBELISK_TWO 185195
#define LEGION_OBELISK_THREE 185196 #define LEGION_OBELISK_THREE 185196
#define LEGION_OBELISK_FOUR 185197 #define LEGION_OBELISK_FOUR 185197
#define LEGION_OBELISK_FIVE 185198 #define LEGION_OBELISK_FIVE 185198
/*###### /*######
## mobs_bladespire_ogre ## mobs_bladespire_ogre
######*/ ######*/
//TODO: add support for quest 10512 + creature abilities //TODO: add support for quest 10512 + creature abilities
struct TRINITY_DLL_DECL mobs_bladespire_ogreAI : public ScriptedAI struct TRINITY_DLL_DECL mobs_bladespire_ogreAI : public ScriptedAI
{ {
mobs_bladespire_ogreAI(Creature *c) : ScriptedAI(c) {Reset();} mobs_bladespire_ogreAI(Creature *c) : ScriptedAI(c) {Reset();}
void Reset() void Reset()
{ {
} }
void Aggro(Unit* who) void Aggro(Unit* who)
{ {
} }
void JustDied(Unit* Killer) void JustDied(Unit* Killer)
{ {
if (Killer->GetTypeId() == TYPEID_PLAYER) if (Killer->GetTypeId() == TYPEID_PLAYER)
((Player*)Killer)->KilledMonster(19995, m_creature->GetGUID()); ((Player*)Killer)->KilledMonster(19995, m_creature->GetGUID());
} }
}; };
CreatureAI* GetAI_mobs_bladespire_ogre(Creature *_Creature) CreatureAI* GetAI_mobs_bladespire_ogre(Creature *_Creature)
{ {
return new mobs_bladespire_ogreAI (_Creature); return new mobs_bladespire_ogreAI (_Creature);
} }
/*###### /*######
## mobs_nether_drake ## mobs_nether_drake
######*/ ######*/
#define SAY_NIHIL_1 -1000396 #define SAY_NIHIL_1 -1000396
#define SAY_NIHIL_2 -1000397 #define SAY_NIHIL_2 -1000397
#define SAY_NIHIL_3 -1000398 #define SAY_NIHIL_3 -1000398
#define SAY_NIHIL_4 -1000399 #define SAY_NIHIL_4 -1000399
#define SAY_NIHIL_INTERRUPT -1000400 #define SAY_NIHIL_INTERRUPT -1000400
#define ENTRY_WHELP 20021 #define ENTRY_WHELP 20021
#define ENTRY_PROTO 21821 #define ENTRY_PROTO 21821
#define ENTRY_ADOLE 21817 #define ENTRY_ADOLE 21817
#define ENTRY_MATUR 21820 #define ENTRY_MATUR 21820
#define ENTRY_NIHIL 21823 #define ENTRY_NIHIL 21823
#define SPELL_T_PHASE_MODULATOR 37573 #define SPELL_T_PHASE_MODULATOR 37573
#define SPELL_ARCANE_BLAST 38881 #define SPELL_ARCANE_BLAST 38881
#define SPELL_MANA_BURN 38884 #define SPELL_MANA_BURN 38884
#define SPELL_INTANGIBLE_PRESENCE 36513 #define SPELL_INTANGIBLE_PRESENCE 36513
struct TRINITY_DLL_DECL mobs_nether_drakeAI : public ScriptedAI struct TRINITY_DLL_DECL mobs_nether_drakeAI : public ScriptedAI
{ {
mobs_nether_drakeAI(Creature *c) : ScriptedAI(c) {Reset();} mobs_nether_drakeAI(Creature *c) : ScriptedAI(c) {Reset();}
bool IsNihil; bool IsNihil;
uint32 NihilSpeech_Timer; uint32 NihilSpeech_Timer;
uint32 NihilSpeech_Phase; uint32 NihilSpeech_Phase;
uint32 ArcaneBlast_Timer; uint32 ArcaneBlast_Timer;
uint32 ManaBurn_Timer; uint32 ManaBurn_Timer;
uint32 IntangiblePresence_Timer; uint32 IntangiblePresence_Timer;
void Reset() void Reset()
{ {
IsNihil = false; IsNihil = false;
NihilSpeech_Timer = 3000; NihilSpeech_Timer = 3000;
NihilSpeech_Phase = 0; NihilSpeech_Phase = 0;
ArcaneBlast_Timer = 7500; ArcaneBlast_Timer = 7500;
ManaBurn_Timer = 10000; ManaBurn_Timer = 10000;
IntangiblePresence_Timer = 15000; IntangiblePresence_Timer = 15000;
} }
void Aggro(Unit* who) { } void Aggro(Unit* who) { }
void MoveInLineOfSight(Unit *who) void MoveInLineOfSight(Unit *who)
{ {
if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return; return;
ScriptedAI::MoveInLineOfSight(who); ScriptedAI::MoveInLineOfSight(who);
} }
//in case creature was not summoned (not expected) //in case creature was not summoned (not expected)
void MovementInform(uint32 type, uint32 id) void MovementInform(uint32 type, uint32 id)
{ {
if (type != POINT_MOTION_TYPE) if (type != POINT_MOTION_TYPE)
return; return;
if (id == 0) if (id == 0)
{ {
m_creature->setDeathState(JUST_DIED); m_creature->setDeathState(JUST_DIED);
m_creature->RemoveCorpse(); m_creature->RemoveCorpse();
m_creature->SetHealth(0); m_creature->SetHealth(0);
} }
} }
void SpellHit(Unit *caster, const SpellEntry *spell) void SpellHit(Unit *caster, const SpellEntry *spell)
{ {
if (spell->Id == SPELL_T_PHASE_MODULATOR && caster->GetTypeId() == TYPEID_PLAYER) if (spell->Id == SPELL_T_PHASE_MODULATOR && caster->GetTypeId() == TYPEID_PLAYER)
{ {
const uint32 entry_list[4] = {ENTRY_PROTO, ENTRY_ADOLE, ENTRY_MATUR, ENTRY_NIHIL}; const uint32 entry_list[4] = {ENTRY_PROTO, ENTRY_ADOLE, ENTRY_MATUR, ENTRY_NIHIL};
int cid = rand()%(4-1); int cid = rand()%(4-1);
if (entry_list[cid] == m_creature->GetEntry()) if (entry_list[cid] == m_creature->GetEntry())
++cid; ++cid;
//we are nihil, so say before transform //we are nihil, so say before transform
if (m_creature->GetEntry() == ENTRY_NIHIL) if (m_creature->GetEntry() == ENTRY_NIHIL)
{ {
DoScriptText(SAY_NIHIL_INTERRUPT, m_creature); DoScriptText(SAY_NIHIL_INTERRUPT, m_creature);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
IsNihil = false; IsNihil = false;
} }
if (m_creature->UpdateEntry(entry_list[cid])) if (m_creature->UpdateEntry(entry_list[cid]))
{ {
if (entry_list[cid] == ENTRY_NIHIL) if (entry_list[cid] == ENTRY_NIHIL)
{ {
EnterEvadeMode(); EnterEvadeMode();
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
IsNihil = true; IsNihil = true;
}else }else
AttackStart(caster); AttackStart(caster);
} }
} }
} }
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
{ {
if (IsNihil) if (IsNihil)
{ {
if (NihilSpeech_Timer <= diff) if (NihilSpeech_Timer <= diff)
{ {
switch(NihilSpeech_Phase) switch(NihilSpeech_Phase)
{ {
case 0: case 0:
DoScriptText(SAY_NIHIL_1, m_creature); DoScriptText(SAY_NIHIL_1, m_creature);
++NihilSpeech_Phase; ++NihilSpeech_Phase;
break; break;
case 1: case 1:
DoScriptText(SAY_NIHIL_2, m_creature); DoScriptText(SAY_NIHIL_2, m_creature);
++NihilSpeech_Phase; ++NihilSpeech_Phase;
break; break;
case 2: case 2:
DoScriptText(SAY_NIHIL_3, m_creature); DoScriptText(SAY_NIHIL_3, m_creature);
++NihilSpeech_Phase; ++NihilSpeech_Phase;
break; break;
case 3: case 3:
DoScriptText(SAY_NIHIL_4, m_creature); DoScriptText(SAY_NIHIL_4, m_creature);
++NihilSpeech_Phase; ++NihilSpeech_Phase;
break; break;
case 4: case 4:
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
//take off to location above //take off to location above
m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX()+50.0f, m_creature->GetPositionY(), m_creature->GetPositionZ()+50.0f); m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX()+50.0f, m_creature->GetPositionY(), m_creature->GetPositionZ()+50.0f);
++NihilSpeech_Phase; ++NihilSpeech_Phase;
break; break;
} }
NihilSpeech_Timer = 5000; NihilSpeech_Timer = 5000;
}else NihilSpeech_Timer -=diff; }else NihilSpeech_Timer -=diff;
//anything below here is not interesting for Nihil, so skip it //anything below here is not interesting for Nihil, so skip it
return; return;
} }
if (!UpdateVictim() ) if (!UpdateVictim() )
return; return;
if (IntangiblePresence_Timer <= diff) if (IntangiblePresence_Timer <= diff)
{ {
DoCast(m_creature->getVictim(),SPELL_INTANGIBLE_PRESENCE); DoCast(m_creature->getVictim(),SPELL_INTANGIBLE_PRESENCE);
IntangiblePresence_Timer = 15000+rand()%15000; IntangiblePresence_Timer = 15000+rand()%15000;
}else IntangiblePresence_Timer -= diff; }else IntangiblePresence_Timer -= diff;
if (ManaBurn_Timer <= diff) if (ManaBurn_Timer <= diff)
{ {
Unit* target = m_creature->getVictim(); Unit* target = m_creature->getVictim();
if (target && target->getPowerType() == POWER_MANA) if (target && target->getPowerType() == POWER_MANA)
DoCast(target,SPELL_MANA_BURN); DoCast(target,SPELL_MANA_BURN);
ManaBurn_Timer = 8000+rand()%8000; ManaBurn_Timer = 8000+rand()%8000;
}else ManaBurn_Timer -= diff; }else ManaBurn_Timer -= diff;
if (ArcaneBlast_Timer <= diff) if (ArcaneBlast_Timer <= diff)
{ {
DoCast(m_creature->getVictim(),SPELL_ARCANE_BLAST); DoCast(m_creature->getVictim(),SPELL_ARCANE_BLAST);
ArcaneBlast_Timer = 2500+rand()%5000; ArcaneBlast_Timer = 2500+rand()%5000;
}else ArcaneBlast_Timer -= diff; }else ArcaneBlast_Timer -= diff;
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
}; };
CreatureAI* GetAI_mobs_nether_drake(Creature *_Creature) CreatureAI* GetAI_mobs_nether_drake(Creature *_Creature)
{ {
return new mobs_nether_drakeAI (_Creature); return new mobs_nether_drakeAI (_Creature);
} }
/*###### /*######
## npc_daranelle ## npc_daranelle
######*/ ######*/
#define SAY_SPELL_INFLUENCE -1000174 #define SAY_SPELL_INFLUENCE -1000174
struct TRINITY_DLL_DECL npc_daranelleAI : public ScriptedAI struct TRINITY_DLL_DECL npc_daranelleAI : public ScriptedAI
{ {
npc_daranelleAI(Creature *c) : ScriptedAI(c) {Reset();} npc_daranelleAI(Creature *c) : ScriptedAI(c) {Reset();}
void Reset() { } void Reset() { }
void Aggro(Unit* who) { } void Aggro(Unit* who) { }
void MoveInLineOfSight(Unit *who) void MoveInLineOfSight(Unit *who)
{ {
if (who->GetTypeId() == TYPEID_PLAYER) if (who->GetTypeId() == TYPEID_PLAYER)
{ {
if (who->HasAura(36904,0) && m_creature->IsWithinDistInMap(who, 10.0f)) if (who->HasAura(36904,0) && m_creature->IsWithinDistInMap(who, 10.0f))
{ {
DoScriptText(SAY_SPELL_INFLUENCE, m_creature, who); DoScriptText(SAY_SPELL_INFLUENCE, m_creature, who);
//TODO: Move the below to updateAI and run if this statement == true //TODO: Move the below to updateAI and run if this statement == true
((Player*)who)->KilledMonster(21511, m_creature->GetGUID()); ((Player*)who)->KilledMonster(21511, m_creature->GetGUID());
((Player*)who)->RemoveAurasDueToSpell(36904); ((Player*)who)->RemoveAurasDueToSpell(36904);
} }
} }
ScriptedAI::MoveInLineOfSight(who); ScriptedAI::MoveInLineOfSight(who);
} }
}; };
CreatureAI* GetAI_npc_daranelle(Creature *_Creature) CreatureAI* GetAI_npc_daranelle(Creature *_Creature)
{ {
return new npc_daranelleAI (_Creature); return new npc_daranelleAI (_Creature);
} }
/*###### /*######
## npc_overseer_nuaar ## npc_overseer_nuaar
######*/ ######*/
bool GossipHello_npc_overseer_nuaar(Player *player, Creature *_Creature) bool GossipHello_npc_overseer_nuaar(Player *player, Creature *_Creature)
{ {
if (player->GetQuestStatus(10682) == QUEST_STATUS_INCOMPLETE) if (player->GetQuestStatus(10682) == QUEST_STATUS_INCOMPLETE)
player->ADD_GOSSIP_ITEM( 0, "Overseer, I am here to negotiate on behalf of the Cenarion Expedition.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->ADD_GOSSIP_ITEM( 0, "Overseer, I am here to negotiate on behalf of the Cenarion Expedition.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(10532, _Creature->GetGUID()); player->SEND_GOSSIP_MENU(10532, _Creature->GetGUID());
return true; return true;
} }
bool GossipSelect_npc_overseer_nuaar(Player *player, Creature *_Creature, uint32 sender, uint32 action) bool GossipSelect_npc_overseer_nuaar(Player *player, Creature *_Creature, uint32 sender, uint32 action)
{ {
if (action == GOSSIP_ACTION_INFO_DEF+1) if (action == GOSSIP_ACTION_INFO_DEF+1)
{ {
player->SEND_GOSSIP_MENU(10533, _Creature->GetGUID()); player->SEND_GOSSIP_MENU(10533, _Creature->GetGUID());
player->AreaExploredOrEventHappens(10682); player->AreaExploredOrEventHappens(10682);
} }
return true; return true;
} }
/*###### /*######
## npc_saikkal_the_elder ## npc_saikkal_the_elder
######*/ ######*/
bool GossipHello_npc_saikkal_the_elder(Player *player, Creature *_Creature) bool GossipHello_npc_saikkal_the_elder(Player *player, Creature *_Creature)
{ {
if (player->GetQuestStatus(10980) == QUEST_STATUS_INCOMPLETE) if (player->GetQuestStatus(10980) == QUEST_STATUS_INCOMPLETE)
player->ADD_GOSSIP_ITEM( 0, "Yes... yes, it's me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->ADD_GOSSIP_ITEM( 0, "Yes... yes, it's me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(10794, _Creature->GetGUID()); player->SEND_GOSSIP_MENU(10794, _Creature->GetGUID());
return true; return true;
} }
bool GossipSelect_npc_saikkal_the_elder(Player *player, Creature *_Creature, uint32 sender, uint32 action) bool GossipSelect_npc_saikkal_the_elder(Player *player, Creature *_Creature, uint32 sender, uint32 action)
{ {
switch (action) switch (action)
{ {
case GOSSIP_ACTION_INFO_DEF+1: case GOSSIP_ACTION_INFO_DEF+1:
player->ADD_GOSSIP_ITEM( 0, "Yes elder. Tell me more of the book.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); player->ADD_GOSSIP_ITEM( 0, "Yes elder. Tell me more of the book.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
player->SEND_GOSSIP_MENU(10795, _Creature->GetGUID()); player->SEND_GOSSIP_MENU(10795, _Creature->GetGUID());
break; break;
case GOSSIP_ACTION_INFO_DEF+2: case GOSSIP_ACTION_INFO_DEF+2:
player->TalkedToCreature(_Creature->GetEntry(), _Creature->GetGUID()); player->TalkedToCreature(_Creature->GetEntry(), _Creature->GetGUID());
player->SEND_GOSSIP_MENU(10796, _Creature->GetGUID()); player->SEND_GOSSIP_MENU(10796, _Creature->GetGUID());
break; break;
} }
return true; return true;
} }
/*###### /*######
## npc_skyguard_handler_irena ## npc_skyguard_handler_irena
######*/ ######*/
#define GOSSIP_SKYGUARD "Fly me to Skettis please" #define GOSSIP_SKYGUARD "Fly me to Skettis please"
bool GossipHello_npc_skyguard_handler_irena(Player *player, Creature *_Creature ) bool GossipHello_npc_skyguard_handler_irena(Player *player, Creature *_Creature )
{ {
if (_Creature->isQuestGiver()) if (_Creature->isQuestGiver())
player->PrepareQuestMenu( _Creature->GetGUID() ); player->PrepareQuestMenu( _Creature->GetGUID() );
if (player->GetReputationRank(1031) >= REP_HONORED) if (player->GetReputationRank(1031) >= REP_HONORED)
player->ADD_GOSSIP_ITEM( 2, GOSSIP_SKYGUARD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->ADD_GOSSIP_ITEM( 2, GOSSIP_SKYGUARD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID()); player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
return true; return true;
} }
bool GossipSelect_npc_skyguard_handler_irena(Player *player, Creature *_Creature, uint32 sender, uint32 action ) bool GossipSelect_npc_skyguard_handler_irena(Player *player, Creature *_Creature, uint32 sender, uint32 action )
{ {
if (action == GOSSIP_ACTION_INFO_DEF+1) if (action == GOSSIP_ACTION_INFO_DEF+1)
{ {
player->CLOSE_GOSSIP_MENU(); player->CLOSE_GOSSIP_MENU();
player->CastSpell(player,41278,true); //TaxiPath 706 player->CastSpell(player,41278,true); //TaxiPath 706
} }
return true; return true;
} }
/*###### /*######
## go_legion_obelisk ## go_legion_obelisk
######*/ ######*/
bool GOHello_go_legion_obelisk(Player *player, GameObject* _GO) bool GOHello_go_legion_obelisk(Player *player, GameObject* _GO)
{ {
if ( player->GetQuestStatus(10821) == QUEST_STATUS_INCOMPLETE ) if ( player->GetQuestStatus(10821) == QUEST_STATUS_INCOMPLETE )
{ {
switch( _GO->GetEntry() ) switch( _GO->GetEntry() )
{ {
case LEGION_OBELISK_ONE: case LEGION_OBELISK_ONE:
obelisk_one = true; obelisk_one = true;
break; break;
case LEGION_OBELISK_TWO: case LEGION_OBELISK_TWO:
obelisk_two = true; obelisk_two = true;
break; break;
case LEGION_OBELISK_THREE: case LEGION_OBELISK_THREE:
obelisk_three = true; obelisk_three = true;
break; break;
case LEGION_OBELISK_FOUR: case LEGION_OBELISK_FOUR:
obelisk_four = true; obelisk_four = true;
break; break;
case LEGION_OBELISK_FIVE: case LEGION_OBELISK_FIVE:
obelisk_five = true; obelisk_five = true;
break; break;
} }
if ( obelisk_one == true && obelisk_two == true && obelisk_three == true && obelisk_four == true && obelisk_five == true ) if ( obelisk_one == true && obelisk_two == true && obelisk_three == true && obelisk_four == true && obelisk_five == true )
{ {
_GO->SummonCreature(19963,2943.40f,4778.20f,284.49f,0.94f,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,120000); _GO->SummonCreature(19963,2943.40f,4778.20f,284.49f,0.94f,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,120000);
//reset global var //reset global var
obelisk_one = false; obelisk_one = false;
obelisk_two = false; obelisk_two = false;
obelisk_three = false; obelisk_three = false;
obelisk_four = false; obelisk_four = false;
obelisk_five = false; obelisk_five = false;
} }
} }
return true; return true;
} }
/*###### /*######
## AddSC ## AddSC
######*/ ######*/
void AddSC_blades_edge_mountains() void AddSC_blades_edge_mountains()
{ {
Script *newscript; Script *newscript;
newscript = new Script; newscript = new Script;
newscript->Name="mobs_bladespire_ogre"; newscript->Name="mobs_bladespire_ogre";
newscript->GetAI = &GetAI_mobs_bladespire_ogre; newscript->GetAI = &GetAI_mobs_bladespire_ogre;
newscript->RegisterSelf(); newscript->RegisterSelf();
newscript = new Script; newscript = new Script;
newscript->Name="mobs_nether_drake"; newscript->Name="mobs_nether_drake";
newscript->GetAI = &GetAI_mobs_nether_drake; newscript->GetAI = &GetAI_mobs_nether_drake;
newscript->RegisterSelf(); newscript->RegisterSelf();
newscript = new Script; newscript = new Script;
newscript->Name="npc_daranelle"; newscript->Name="npc_daranelle";
newscript->GetAI = &GetAI_npc_daranelle; newscript->GetAI = &GetAI_npc_daranelle;
newscript->RegisterSelf(); newscript->RegisterSelf();
newscript = new Script; newscript = new Script;
newscript->Name="npc_overseer_nuaar"; newscript->Name="npc_overseer_nuaar";
newscript->pGossipHello = &GossipHello_npc_overseer_nuaar; newscript->pGossipHello = &GossipHello_npc_overseer_nuaar;
newscript->pGossipSelect = &GossipSelect_npc_overseer_nuaar; newscript->pGossipSelect = &GossipSelect_npc_overseer_nuaar;
newscript->RegisterSelf(); newscript->RegisterSelf();
newscript = new Script; newscript = new Script;
newscript->Name="npc_saikkal_the_elder"; newscript->Name="npc_saikkal_the_elder";
newscript->pGossipHello = &GossipHello_npc_saikkal_the_elder; newscript->pGossipHello = &GossipHello_npc_saikkal_the_elder;
newscript->pGossipSelect = &GossipSelect_npc_saikkal_the_elder; newscript->pGossipSelect = &GossipSelect_npc_saikkal_the_elder;
newscript->RegisterSelf(); newscript->RegisterSelf();
newscript = new Script; newscript = new Script;
newscript->Name="go_legion_obelisk"; newscript->Name="go_legion_obelisk";
newscript->pGOHello = &GOHello_go_legion_obelisk; newscript->pGOHello = &GOHello_go_legion_obelisk;
newscript->RegisterSelf(); newscript->RegisterSelf();
newscript = new Script; newscript = new Script;
newscript->Name="npc_skyguard_handler_irena"; newscript->Name="npc_skyguard_handler_irena";
newscript->pGossipHello = &GossipHello_npc_skyguard_handler_irena; newscript->pGossipHello = &GossipHello_npc_skyguard_handler_irena;
newscript->pGossipSelect = &GossipSelect_npc_skyguard_handler_irena; newscript->pGossipSelect = &GossipSelect_npc_skyguard_handler_irena;
newscript->RegisterSelf(); newscript->RegisterSelf();
} }
File diff suppressed because it is too large Load Diff
@@ -1,121 +1,121 @@
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * 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. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * 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 /* ScriptData
SDName: Boss_Broggok SDName: Boss_Broggok
SD%Complete: 70 SD%Complete: 70
SDComment: pre-event not made SDComment: pre-event not made
SDCategory: Hellfire Citadel, Blood Furnace SDCategory: Hellfire Citadel, Blood Furnace
EndScriptData */ EndScriptData */
#include "precompiled.h" #include "precompiled.h"
#define SAY_AGGRO -1542008 #define SAY_AGGRO -1542008
#define SPELL_SLIME_SPRAY 30913 #define SPELL_SLIME_SPRAY 30913
#define SPELL_POISON_CLOUD 30916 #define SPELL_POISON_CLOUD 30916
#define SPELL_POISON_BOLT 30917 #define SPELL_POISON_BOLT 30917
#define SPELL_POISON 30914 #define SPELL_POISON 30914
struct TRINITY_DLL_DECL boss_broggokAI : public ScriptedAI struct TRINITY_DLL_DECL boss_broggokAI : public ScriptedAI
{ {
boss_broggokAI(Creature *c) : ScriptedAI(c) {Reset();} boss_broggokAI(Creature *c) : ScriptedAI(c) {Reset();}
uint32 AcidSpray_Timer; uint32 AcidSpray_Timer;
uint32 PoisonSpawn_Timer; uint32 PoisonSpawn_Timer;
uint32 PoisonBolt_Timer; uint32 PoisonBolt_Timer;
void Reset() void Reset()
{ {
AcidSpray_Timer = 10000; AcidSpray_Timer = 10000;
PoisonSpawn_Timer = 5000; PoisonSpawn_Timer = 5000;
PoisonBolt_Timer = 7000; PoisonBolt_Timer = 7000;
} }
void Aggro(Unit *who) void Aggro(Unit *who)
{ {
DoScriptText(SAY_AGGRO, m_creature); DoScriptText(SAY_AGGRO, m_creature);
} }
void JustSummoned(Creature *summoned) void JustSummoned(Creature *summoned)
{ {
summoned->setFaction(16); summoned->setFaction(16);
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
summoned->CastSpell(summoned,SPELL_POISON,false,0,0,m_creature->GetGUID()); summoned->CastSpell(summoned,SPELL_POISON,false,0,0,m_creature->GetGUID());
} }
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
{ {
if (!UpdateVictim() ) if (!UpdateVictim() )
return; return;
if (AcidSpray_Timer < diff) if (AcidSpray_Timer < diff)
{ {
DoCast(m_creature->getVictim(),SPELL_SLIME_SPRAY); DoCast(m_creature->getVictim(),SPELL_SLIME_SPRAY);
AcidSpray_Timer = 4000+rand()%8000; AcidSpray_Timer = 4000+rand()%8000;
}else AcidSpray_Timer -=diff; }else AcidSpray_Timer -=diff;
if (PoisonBolt_Timer < diff) if (PoisonBolt_Timer < diff)
{ {
DoCast(m_creature->getVictim(),SPELL_POISON_BOLT); DoCast(m_creature->getVictim(),SPELL_POISON_BOLT);
PoisonBolt_Timer = 4000+rand()%8000; PoisonBolt_Timer = 4000+rand()%8000;
}else PoisonBolt_Timer -=diff; }else PoisonBolt_Timer -=diff;
if (PoisonSpawn_Timer < diff) if (PoisonSpawn_Timer < diff)
{ {
DoCast(m_creature,SPELL_POISON_CLOUD); DoCast(m_creature,SPELL_POISON_CLOUD);
PoisonSpawn_Timer = 20000; PoisonSpawn_Timer = 20000;
}else PoisonSpawn_Timer -=diff; }else PoisonSpawn_Timer -=diff;
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
}; };
struct TRINITY_DLL_DECL mob_broggok_poisoncloudAI : public ScriptedAI struct TRINITY_DLL_DECL mob_broggok_poisoncloudAI : public ScriptedAI
{ {
mob_broggok_poisoncloudAI(Creature *c) : ScriptedAI(c) {Reset();} mob_broggok_poisoncloudAI(Creature *c) : ScriptedAI(c) {Reset();}
void Reset() { } void Reset() { }
void MoveInLineOfSight(Unit *who) { } void MoveInLineOfSight(Unit *who) { }
void AttackStart(Unit *who) { } void AttackStart(Unit *who) { }
void Aggro(Unit* who) { } void Aggro(Unit* who) { }
}; };
CreatureAI* GetAI_boss_broggok(Creature *_Creature) CreatureAI* GetAI_boss_broggok(Creature *_Creature)
{ {
return new boss_broggokAI (_Creature); return new boss_broggokAI (_Creature);
} }
CreatureAI* GetAI_mob_broggok_poisoncloud(Creature *_Creature) CreatureAI* GetAI_mob_broggok_poisoncloud(Creature *_Creature)
{ {
return new mob_broggok_poisoncloudAI (_Creature); return new mob_broggok_poisoncloudAI (_Creature);
} }
void AddSC_boss_broggok() void AddSC_boss_broggok()
{ {
Script *newscript; Script *newscript;
newscript = new Script; newscript = new Script;
newscript->Name = "boss_broggok"; newscript->Name = "boss_broggok";
newscript->GetAI = &GetAI_boss_broggok; newscript->GetAI = &GetAI_boss_broggok;
newscript->RegisterSelf(); newscript->RegisterSelf();
newscript = new Script; newscript = new Script;
newscript->Name = "mob_broggok_poisoncloud"; newscript->Name = "mob_broggok_poisoncloud";
newscript->GetAI = &GetAI_mob_broggok_poisoncloud; newscript->GetAI = &GetAI_mob_broggok_poisoncloud;
newscript->RegisterSelf(); newscript->RegisterSelf();
} }
@@ -1,201 +1,201 @@
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * 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. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * 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 /* ScriptData
SDName: Boss_Curator SDName: Boss_Curator
SD%Complete: 100 SD%Complete: 100
SDComment: SDComment:
SDCategory: Karazhan SDCategory: Karazhan
EndScriptData */ EndScriptData */
#include "precompiled.h" #include "precompiled.h"
#define SAY_AGGRO -1532057 #define SAY_AGGRO -1532057
#define SAY_SUMMON1 -1532058 #define SAY_SUMMON1 -1532058
#define SAY_SUMMON2 -1532059 #define SAY_SUMMON2 -1532059
#define SAY_EVOCATE -1532060 #define SAY_EVOCATE -1532060
#define SAY_ENRAGE -1532061 #define SAY_ENRAGE -1532061
#define SAY_KILL1 -1532062 #define SAY_KILL1 -1532062
#define SAY_KILL2 -1532063 #define SAY_KILL2 -1532063
#define SAY_DEATH -1532064 #define SAY_DEATH -1532064
//Flare spell info //Flare spell info
#define SPELL_ASTRAL_FLARE_PASSIVE 30234 //Visual effect + Flare damage #define SPELL_ASTRAL_FLARE_PASSIVE 30234 //Visual effect + Flare damage
//Curator spell info //Curator spell info
#define SPELL_HATEFUL_BOLT 30383 #define SPELL_HATEFUL_BOLT 30383
#define SPELL_EVOCATION 30254 #define SPELL_EVOCATION 30254
#define SPELL_ENRAGE 30403 //Arcane Infusion: Transforms Curator and adds damage. #define SPELL_ENRAGE 30403 //Arcane Infusion: Transforms Curator and adds damage.
#define SPELL_BERSERK 26662 #define SPELL_BERSERK 26662
struct TRINITY_DLL_DECL boss_curatorAI : public ScriptedAI struct TRINITY_DLL_DECL boss_curatorAI : public ScriptedAI
{ {
boss_curatorAI(Creature *c) : ScriptedAI(c) {Reset();} boss_curatorAI(Creature *c) : ScriptedAI(c) {Reset();}
uint32 AddTimer; uint32 AddTimer;
uint32 HatefulBoltTimer; uint32 HatefulBoltTimer;
uint32 BerserkTimer; uint32 BerserkTimer;
bool Enraged; bool Enraged;
bool Evocating; bool Evocating;
void Reset() void Reset()
{ {
AddTimer = 10000; AddTimer = 10000;
HatefulBoltTimer = 15000; //This time may be wrong HatefulBoltTimer = 15000; //This time may be wrong
BerserkTimer = 720000; //12 minutes BerserkTimer = 720000; //12 minutes
Enraged = false; Enraged = false;
Evocating = false; Evocating = false;
} }
void KilledUnit(Unit *victim) void KilledUnit(Unit *victim)
{ {
switch(rand()%2) switch(rand()%2)
{ {
case 0: DoScriptText(SAY_KILL1, m_creature); break; case 0: DoScriptText(SAY_KILL1, m_creature); break;
case 1: DoScriptText(SAY_KILL2, m_creature); break; case 1: DoScriptText(SAY_KILL2, m_creature); break;
} }
} }
void JustDied(Unit *victim) void JustDied(Unit *victim)
{ {
DoScriptText(SAY_DEATH, m_creature); DoScriptText(SAY_DEATH, m_creature);
} }
void Aggro(Unit *who) void Aggro(Unit *who)
{ {
DoScriptText(SAY_AGGRO, m_creature); DoScriptText(SAY_AGGRO, m_creature);
} }
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
{ {
if (!UpdateVictim() ) if (!UpdateVictim() )
return; return;
//always decrease BerserkTimer //always decrease BerserkTimer
if (BerserkTimer < diff) if (BerserkTimer < diff)
{ {
//if evocate, then break evocate //if evocate, then break evocate
if (Evocating) if (Evocating)
{ {
if (m_creature->HasAura(SPELL_EVOCATION)) if (m_creature->HasAura(SPELL_EVOCATION))
m_creature->RemoveAurasDueToSpell(SPELL_EVOCATION); m_creature->RemoveAurasDueToSpell(SPELL_EVOCATION);
Evocating = false; Evocating = false;
} }
//may not be correct SAY (generic hard enrage) //may not be correct SAY (generic hard enrage)
DoScriptText(SAY_ENRAGE, m_creature); DoScriptText(SAY_ENRAGE, m_creature);
m_creature->InterruptNonMeleeSpells(true); m_creature->InterruptNonMeleeSpells(true);
DoCast(m_creature, SPELL_BERSERK); DoCast(m_creature, SPELL_BERSERK);
//don't know if he's supposed to do summon/evocate after hard enrage (probably not) //don't know if he's supposed to do summon/evocate after hard enrage (probably not)
Enraged = true; Enraged = true;
}else BerserkTimer -= diff; }else BerserkTimer -= diff;
if (Evocating) if (Evocating)
{ {
//not supposed to do anything while evocate //not supposed to do anything while evocate
if (m_creature->HasAura(SPELL_EVOCATION)) if (m_creature->HasAura(SPELL_EVOCATION))
return; return;
else else
Evocating = false; Evocating = false;
} }
if (!Enraged) if (!Enraged)
{ {
if (AddTimer < diff) if (AddTimer < diff)
{ {
//Summon Astral Flare //Summon Astral Flare
Creature* AstralFlare = DoSpawnCreature(17096, rand()%37, rand()%37, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); Creature* AstralFlare = DoSpawnCreature(17096, rand()%37, rand()%37, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
Unit* target = NULL; Unit* target = NULL;
target = SelectUnit(SELECT_TARGET_RANDOM, 0); target = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (AstralFlare && target) if (AstralFlare && target)
{ {
AstralFlare->CastSpell(AstralFlare, SPELL_ASTRAL_FLARE_PASSIVE, false); AstralFlare->CastSpell(AstralFlare, SPELL_ASTRAL_FLARE_PASSIVE, false);
AstralFlare->AI()->AttackStart(target); AstralFlare->AI()->AttackStart(target);
AstralFlare->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); AstralFlare->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
AstralFlare->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); AstralFlare->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
} }
//Reduce Mana by 10% of max health //Reduce Mana by 10% of max health
if (int32 mana = m_creature->GetMaxPower(POWER_MANA)) if (int32 mana = m_creature->GetMaxPower(POWER_MANA))
{ {
mana /= 10; mana /= 10;
m_creature->ModifyPower(POWER_MANA, -mana); m_creature->ModifyPower(POWER_MANA, -mana);
//if this get's us below 10%, then we evocate (the 10th should be summoned now) //if this get's us below 10%, then we evocate (the 10th should be summoned now)
if (m_creature->GetPower(POWER_MANA)*100 / m_creature->GetMaxPower(POWER_MANA) < 10) if (m_creature->GetPower(POWER_MANA)*100 / m_creature->GetMaxPower(POWER_MANA) < 10)
{ {
DoScriptText(SAY_EVOCATE, m_creature); DoScriptText(SAY_EVOCATE, m_creature);
m_creature->InterruptNonMeleeSpells(false); m_creature->InterruptNonMeleeSpells(false);
DoCast(m_creature, SPELL_EVOCATION); DoCast(m_creature, SPELL_EVOCATION);
Evocating = true; Evocating = true;
//no AddTimer cooldown, this will make first flare appear instantly after evocate end, like expected //no AddTimer cooldown, this will make first flare appear instantly after evocate end, like expected
return; return;
} }
else else
{ {
switch(rand()%4) switch(rand()%4)
{ {
case 0: DoScriptText(SAY_SUMMON1, m_creature); break; case 0: DoScriptText(SAY_SUMMON1, m_creature); break;
case 1: DoScriptText(SAY_SUMMON2, m_creature); break; case 1: DoScriptText(SAY_SUMMON2, m_creature); break;
} }
} }
} }
AddTimer = 10000; AddTimer = 10000;
}else AddTimer -= diff; }else AddTimer -= diff;
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 15) if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 15)
{ {
Enraged = true; Enraged = true;
DoCast(m_creature, SPELL_ENRAGE); DoCast(m_creature, SPELL_ENRAGE);
DoScriptText(SAY_ENRAGE, m_creature); DoScriptText(SAY_ENRAGE, m_creature);
} }
} }
if (HatefulBoltTimer < diff) if (HatefulBoltTimer < diff)
{ {
if (Enraged) if (Enraged)
HatefulBoltTimer = 7000; HatefulBoltTimer = 7000;
else else
HatefulBoltTimer = 15000; HatefulBoltTimer = 15000;
if (Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO, 1)) if (Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO, 1))
DoCast(target, SPELL_HATEFUL_BOLT); DoCast(target, SPELL_HATEFUL_BOLT);
}else HatefulBoltTimer -= diff; }else HatefulBoltTimer -= diff;
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
}; };
CreatureAI* GetAI_boss_curator(Creature *_Creature) CreatureAI* GetAI_boss_curator(Creature *_Creature)
{ {
return new boss_curatorAI (_Creature); return new boss_curatorAI (_Creature);
} }
void AddSC_boss_curator() void AddSC_boss_curator()
{ {
Script *newscript; Script *newscript;
newscript = new Script; newscript = new Script;
newscript->Name = "boss_curator"; newscript->Name = "boss_curator";
newscript->GetAI = &GetAI_boss_curator; newscript->GetAI = &GetAI_boss_curator;
newscript->RegisterSelf(); newscript->RegisterSelf();
} }
@@ -1,227 +1,227 @@
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * 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. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * 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 /* ScriptData
SDName: Boss_Vexallus SDName: Boss_Vexallus
SD%Complete: 90 SD%Complete: 90
SDComment: Heroic and Normal support. Needs further testing. SDComment: Heroic and Normal support. Needs further testing.
SDCategory: Magister's Terrace SDCategory: Magister's Terrace
EndScriptData */ EndScriptData */
#include "precompiled.h" #include "precompiled.h"
#include "def_magisters_terrace.h" #include "def_magisters_terrace.h"
#define SAY_AGGRO -1585007 #define SAY_AGGRO -1585007
#define SAY_ENERGY -1585008 #define SAY_ENERGY -1585008
#define SAY_OVERLOAD -1585009 #define SAY_OVERLOAD -1585009
#define SAY_KILL -1585010 #define SAY_KILL -1585010
#define EMOTE_DISCHARGE_ENERGY -1585011 #define EMOTE_DISCHARGE_ENERGY -1585011
//is this text for real? //is this text for real?
//#define SAY_DEATH "What...happen...ed." //#define SAY_DEATH "What...happen...ed."
//Pure energy spell info //Pure energy spell info
#define SPELL_ENERGY_BOLT 46156 #define SPELL_ENERGY_BOLT 46156
#define SPELL_ENERGY_FEEDBACK 44335 #define SPELL_ENERGY_FEEDBACK 44335
//Vexallus spell info //Vexallus spell info
#define SPELL_CHAIN_LIGHTNING 44318 #define SPELL_CHAIN_LIGHTNING 44318
#define SPELL_OVERLOAD 44353 #define SPELL_OVERLOAD 44353
#define SPELL_ARCANE_SHOCK 44319 #define SPELL_ARCANE_SHOCK 44319
#define SPELL_SUMMON_PURE_ENERGY 44322 //mod scale -10 #define SPELL_SUMMON_PURE_ENERGY 44322 //mod scale -10
#define H_SPELL_SUMMON_PURE_ENERGY1 46154 //mod scale -5 #define H_SPELL_SUMMON_PURE_ENERGY1 46154 //mod scale -5
#define H_SPELL_SUMMON_PURE_ENERGY2 46159 //mod scale -5 #define H_SPELL_SUMMON_PURE_ENERGY2 46159 //mod scale -5
//Creatures //Creatures
#define CREATURE_PURE_ENERGY 24745 #define CREATURE_PURE_ENERGY 24745
struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
{ {
boss_vexallusAI(Creature *c) : ScriptedAI(c) boss_vexallusAI(Creature *c) : ScriptedAI(c)
{ {
pInstance = ((ScriptedInstance*)c->GetInstanceData()); pInstance = ((ScriptedInstance*)c->GetInstanceData());
Heroic = c->GetMap()->IsHeroic(); Heroic = c->GetMap()->IsHeroic();
Reset(); Reset();
} }
ScriptedInstance* pInstance; ScriptedInstance* pInstance;
bool Heroic; bool Heroic;
uint32 ChainLightningTimer; uint32 ChainLightningTimer;
uint32 ArcaneShockTimer; uint32 ArcaneShockTimer;
uint32 OverloadTimer; uint32 OverloadTimer;
uint32 SpawnAddInterval; uint32 SpawnAddInterval;
uint32 AlreadySpawnedAmount; uint32 AlreadySpawnedAmount;
bool Enraged; bool Enraged;
void Reset() void Reset()
{ {
ChainLightningTimer = 10000; ChainLightningTimer = 10000;
ArcaneShockTimer = 8000; ArcaneShockTimer = 8000;
OverloadTimer = 2200; OverloadTimer = 2200;
SpawnAddInterval = 15; SpawnAddInterval = 15;
AlreadySpawnedAmount = 0; AlreadySpawnedAmount = 0;
Enraged = false; Enraged = false;
if (pInstance) if (pInstance)
pInstance->SetData(DATA_VEXALLUS_EVENT, NOT_STARTED); pInstance->SetData(DATA_VEXALLUS_EVENT, NOT_STARTED);
} }
void KilledUnit(Unit *victim) void KilledUnit(Unit *victim)
{ {
DoScriptText(SAY_KILL, m_creature); DoScriptText(SAY_KILL, m_creature);
} }
void JustDied(Unit *victim) void JustDied(Unit *victim)
{ {
if (pInstance) if (pInstance)
{ {
pInstance->SetData(DATA_VEXALLUS_EVENT, DONE); pInstance->SetData(DATA_VEXALLUS_EVENT, DONE);
if (GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_VEXALLUS_DOOR))) if (GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_VEXALLUS_DOOR)))
Door->SetGoState(0); Door->SetGoState(0);
} }
} }
void Aggro(Unit *who) void Aggro(Unit *who)
{ {
DoScriptText(SAY_AGGRO, m_creature); DoScriptText(SAY_AGGRO, m_creature);
if (pInstance) if (pInstance)
pInstance->SetData(DATA_VEXALLUS_EVENT, IN_PROGRESS); pInstance->SetData(DATA_VEXALLUS_EVENT, IN_PROGRESS);
} }
void JustSummoned(Creature *summoned) void JustSummoned(Creature *summoned)
{ {
if (Unit *temp = SelectUnit(SELECT_TARGET_RANDOM, 0)) if (Unit *temp = SelectUnit(SELECT_TARGET_RANDOM, 0))
summoned->GetMotionMaster()->MoveFollow(temp,0,0); summoned->GetMotionMaster()->MoveFollow(temp,0,0);
//spells are SUMMON_TYPE_GUARDIAN, so using setOwner should be ok //spells are SUMMON_TYPE_GUARDIAN, so using setOwner should be ok
summoned->SetOwnerGUID(m_creature->GetGUID()); summoned->SetOwnerGUID(m_creature->GetGUID());
summoned->CastSpell(summoned,SPELL_ENERGY_BOLT,false,0,0,m_creature->GetGUID()); summoned->CastSpell(summoned,SPELL_ENERGY_BOLT,false,0,0,m_creature->GetGUID());
} }
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
{ {
if (!UpdateVictim() ) if (!UpdateVictim() )
return; return;
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 10) if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 10)
{ {
Enraged = true; Enraged = true;
} }
if (!Enraged) if (!Enraged)
{ {
//used for check, when Vexallus cast adds 85%, 70%, 55%, 40%, 25% //used for check, when Vexallus cast adds 85%, 70%, 55%, 40%, 25%
if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < (100-(SpawnAddInterval*(AlreadySpawnedAmount+1)))) if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < (100-(SpawnAddInterval*(AlreadySpawnedAmount+1))))
{ {
DoScriptText(SAY_ENERGY, m_creature); DoScriptText(SAY_ENERGY, m_creature);
DoScriptText(EMOTE_DISCHARGE_ENERGY, m_creature); DoScriptText(EMOTE_DISCHARGE_ENERGY, m_creature);
if (Heroic) if (Heroic)
{ {
m_creature->CastSpell(m_creature,H_SPELL_SUMMON_PURE_ENERGY1,false); m_creature->CastSpell(m_creature,H_SPELL_SUMMON_PURE_ENERGY1,false);
m_creature->CastSpell(m_creature,H_SPELL_SUMMON_PURE_ENERGY2,false); m_creature->CastSpell(m_creature,H_SPELL_SUMMON_PURE_ENERGY2,false);
} }
else else
m_creature->CastSpell(m_creature,SPELL_SUMMON_PURE_ENERGY,false); m_creature->CastSpell(m_creature,SPELL_SUMMON_PURE_ENERGY,false);
//below are workaround summons, remove when summoning spells w/implicitTarget 73 implemented in Mangos //below are workaround summons, remove when summoning spells w/implicitTarget 73 implemented in Mangos
DoSpawnCreature(CREATURE_PURE_ENERGY, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); DoSpawnCreature(CREATURE_PURE_ENERGY, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
if (Heroic) if (Heroic)
DoSpawnCreature(CREATURE_PURE_ENERGY, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); DoSpawnCreature(CREATURE_PURE_ENERGY, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
++AlreadySpawnedAmount; ++AlreadySpawnedAmount;
} }
if (ChainLightningTimer < diff) if (ChainLightningTimer < diff)
{ {
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_CHAIN_LIGHTNING); DoCast(target, SPELL_CHAIN_LIGHTNING);
ChainLightningTimer = 10000; ChainLightningTimer = 10000;
}else ChainLightningTimer -= diff; }else ChainLightningTimer -= diff;
if (ArcaneShockTimer < diff) if (ArcaneShockTimer < diff)
{ {
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_ARCANE_SHOCK); DoCast(target, SPELL_ARCANE_SHOCK);
ArcaneShockTimer = 8000; ArcaneShockTimer = 8000;
}else ArcaneShockTimer -= diff; }else ArcaneShockTimer -= diff;
} }
else else
{ {
if (OverloadTimer < diff) if (OverloadTimer < diff)
{ {
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_OVERLOAD); DoCast(target, SPELL_OVERLOAD);
OverloadTimer = 2200; OverloadTimer = 2200;
}else OverloadTimer -= diff; }else OverloadTimer -= diff;
} }
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
}; };
CreatureAI* GetAI_boss_vexallus(Creature *_Creature) CreatureAI* GetAI_boss_vexallus(Creature *_Creature)
{ {
return new boss_vexallusAI (_Creature); return new boss_vexallusAI (_Creature);
}; };
struct TRINITY_DLL_DECL mob_pure_energyAI : public ScriptedAI struct TRINITY_DLL_DECL mob_pure_energyAI : public ScriptedAI
{ {
mob_pure_energyAI(Creature *c) : ScriptedAI(c) {Reset();} mob_pure_energyAI(Creature *c) : ScriptedAI(c) {Reset();}
void Reset() { } void Reset() { }
void JustDied(Unit* slayer) void JustDied(Unit* slayer)
{ {
if (Unit *temp = m_creature->GetOwner()) if (Unit *temp = m_creature->GetOwner())
{ {
if (temp && temp->isAlive()) if (temp && temp->isAlive())
slayer->CastSpell(slayer, SPELL_ENERGY_FEEDBACK, true, 0, 0, temp->GetGUID()); slayer->CastSpell(slayer, SPELL_ENERGY_FEEDBACK, true, 0, 0, temp->GetGUID());
} }
} }
void Aggro(Unit *who) { } void Aggro(Unit *who) { }
void MoveInLineOfSight(Unit *who) { } void MoveInLineOfSight(Unit *who) { }
void AttackStart(Unit *who) { } void AttackStart(Unit *who) { }
}; };
CreatureAI* GetAI_mob_pure_energy(Creature *_Creature) CreatureAI* GetAI_mob_pure_energy(Creature *_Creature)
{ {
return new mob_pure_energyAI (_Creature); return new mob_pure_energyAI (_Creature);
}; };
void AddSC_boss_vexallus() void AddSC_boss_vexallus()
{ {
Script *newscript; Script *newscript;
newscript = new Script; newscript = new Script;
newscript->Name = "boss_vexallus"; newscript->Name = "boss_vexallus";
newscript->GetAI = &GetAI_boss_vexallus; newscript->GetAI = &GetAI_boss_vexallus;
newscript->RegisterSelf(); newscript->RegisterSelf();
newscript = new Script; newscript = new Script;
newscript->Name = "mob_pure_energy"; newscript->Name = "mob_pure_energy";
newscript->GetAI = &GetAI_mob_pure_energy; newscript->GetAI = &GetAI_mob_pure_energy;
newscript->RegisterSelf(); newscript->RegisterSelf();
} }
File diff suppressed because it is too large Load Diff