From f481e7b14db88700631c01c58b23a1a2f7f4efb6 Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 23 Jul 2009 09:30:05 +0800 Subject: [8191] Drop code related to use long time empty `spell_affect` table. Author: XTZGZoReX After switch to 3.x.x all data get explcitly from ClassMask fields in spell.dbc and no need in custom values. --HG-- branch : trunk --- sql/FULL/world_spell_full.sql | 8 -------- sql/mangos.sql | 25 +------------------------ sql/updates/4542_8191_world_spell_affect.sql | 3 +++ 3 files changed, 4 insertions(+), 32 deletions(-) create mode 100644 sql/updates/4542_8191_world_spell_affect.sql (limited to 'sql') diff --git a/sql/FULL/world_spell_full.sql b/sql/FULL/world_spell_full.sql index 006373cddf1..667b2346950 100644 --- a/sql/FULL/world_spell_full.sql +++ b/sql/FULL/world_spell_full.sql @@ -1923,14 +1923,6 @@ INSERT INTO `spell_elixir` (`entry`, `mask`) VALUES (60347, 0x2), (62380, 0x3); --- -------- --- SPELL AFFECT --- -------- - -TRUNCATE TABLE `spell_affect`; -INSERT INTO `spell_affect` (`entry`, `effectId`, `SpellClassMask0`, `SpellClassMask1`, `SpellClassMask2`) VALUES -(44544,0,685904631,1151048,0); -- Fingers of frost - -- -------- -- Death Knight -- -------- diff --git a/sql/mangos.sql b/sql/mangos.sql index 7d551217827..ed429442af9 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -23,7 +23,7 @@ DROP TABLE IF EXISTS `db_version`; CREATE TABLE `db_version` ( `version` varchar(120) default NULL, `creature_ai_version` varchar(120) default NULL, - `required_8190_01_mangos_creature_template` bit(1) default NULL + `required_8191_01_mangos_spell_affect` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -13541,29 +13541,6 @@ LOCK TABLES `skinning_loot_template` WRITE; /*!40000 ALTER TABLE `skinning_loot_template` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `spell_affect` --- - -DROP TABLE IF EXISTS `spell_affect`; -CREATE TABLE `spell_affect` ( - `entry` smallint(5) unsigned NOT NULL default '0', - `effectId` tinyint(3) unsigned NOT NULL default '0', - `SpellClassMask0` int(5) unsigned NOT NULL default '0', - `SpellClassMask1` int(5) unsigned NOT NULL default '0', - `SpellClassMask2` int(5) unsigned NOT NULL default '0', - PRIMARY KEY (`entry`,`effectId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- --- Dumping data for table `spell_affect` --- - -LOCK TABLES `spell_affect` WRITE; -/*!40000 ALTER TABLE `spell_affect` DISABLE KEYS */; -/*!40000 ALTER TABLE `spell_affect` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `spell_area` -- diff --git a/sql/updates/4542_8191_world_spell_affect.sql b/sql/updates/4542_8191_world_spell_affect.sql new file mode 100644 index 00000000000..74e28a00b59 --- /dev/null +++ b/sql/updates/4542_8191_world_spell_affect.sql @@ -0,0 +1,3 @@ +-- ALTER TABLE db_version CHANGE COLUMN required_8190_01_mangos_creature_template required_8191_01_mangos_spell_affect bit; + +DROP TABLE IF EXISTS `spell_affect`; -- cgit v1.2.3 From 1eef9f86f63ce0c61635c059681845a3a953744a Mon Sep 17 00:00:00 2001 From: QAston Date: Thu, 23 Jul 2009 15:13:17 +0200 Subject: *Script for Plug the Sinkholes - by Drethek. --HG-- branch : trunk --- sql/FULL/world_scripts_full.sql | 4 +- sql/FULL/world_tmp_full.sql | 1 + sql/updates/4544_world.sql | 3 + src/bindings/scripts/scripts/item/item_scripts.cpp | 22 ++++ .../scripts/zone/borean_tundra/borean_tundra.cpp | 115 +++++++++++++++++++++ src/game/Unit.cpp | 2 +- 6 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 sql/updates/4544_world.sql (limited to 'sql') diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql index c4cdeab90a7..fbbbf44c77f 100644 --- a/sql/FULL/world_scripts_full.sql +++ b/sql/FULL/world_scripts_full.sql @@ -81,6 +81,7 @@ UPDATE `item_template` SET `ScriptName`='item_yehkinyas_bramble' WHERE `entry`=1 UPDATE `item_template` SET `ScriptName`='item_zezzaks_shard' WHERE `entry`=31463; UPDATE `item_template` SET `ScriptName`='item_only_for_flight' WHERE `entry` IN (34475, 34489, 24538); UPDATE `item_template` SET `ScriptName`='item_inoculating_crystal' WHERE `entry`=22962; +UPDATE `item_template` SET `ScriptName`='item_incendiary_explosives' WHERE (`entry`=35704); /* NPC (usually creatures to be found in more than one specific zone) */ UPDATE `creature_template` SET `ScriptName`='npc_air_force_bots' WHERE `entry` IN (2614, 2615, 21974, 21993, 21996, 21997, 21999, 22001, 22002, 22003, 22063, 22065, 22066, 22068, 22069, 22070, 22071, 22078, 22079, 22080, 22086, 22087, 22088, 22090, 22124, 22125, 22126); @@ -115,6 +116,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_dkc1_gothik' WHERE `entry`=2865 UPDATE `creature_template` SET `ScriptName`='npc_a_special_surprise' WHERE `entry` IN (29032, 29061, 29065, 29067, 29068, 29070, 29074, 29072, 29073, 29071); UPDATE `creature_template` SET `ScriptName`='npc_demolisher_engineerer' WHERE `entry` IN (30400, 30499); UPDATE `creature_template` SET `ScriptName`='npc_valkyr_battle_maiden' WHERE `entry`=28534; +UPDATE `creature_template` SET `ScriptName`='npc_mirror_image' WHERE `entry`=31216; /* */ /* ZONE */ @@ -309,6 +311,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_captured_sunhawk_agent' WHERE ` /* BOREAN TUNDRA */ UPDATE `creature_template` SET `ScriptName`='npc_surristrasz' WHERE `entry`=24795; UPDATE `creature_template` SET `ScriptName`='npc_tiare' WHERE `entry`=30051; +UPDATE `creature_template` SET `ScriptName`='npc_sinkhole_kill_credit' WHERE `entry` IN (26248,26249); /* BURNING STEPPES */ UPDATE `creature_template` SET `ScriptName`='npc_ragged_john' WHERE `entry`=9563; @@ -1092,7 +1095,6 @@ UPDATE `creature_template` SET `ScriptName`='mob_spawn_of_marli' WHERE `entry`=1 UPDATE `creature_template` SET `ScriptName`='mob_batrider' WHERE `entry`=14965; UPDATE `creature_template` SET `ScriptName`='mob_shade_of_jindo' WHERE `entry`=14986; UPDATE `creature_template` SET `ScriptName`='mob_ohgan' WHERE `entry`=14988; -UPDATE `creature_template` SET `ScriptName`='npc_mirror_image' WHERE `entry`=31216; UPDATE `creature_template` SET `ScriptName`='EventAI', `modelid_A` = 16925,`modelid_H` = 16925, `minmana` = 1000000,`maxmana` = 1000000, `unit_flags` = 33554434 WHERE `entry` IN(29998, 33753, 33752, 33751, 33750); DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (29998, 33753, 33752, 33751, 33750); diff --git a/sql/FULL/world_tmp_full.sql b/sql/FULL/world_tmp_full.sql index 9931dc50ee3..8b9e65d3f65 100644 --- a/sql/FULL/world_tmp_full.sql +++ b/sql/FULL/world_tmp_full.sql @@ -179,6 +179,7 @@ spell6 = VALUES(spell6), spell7 = VALUES(spell7), spell8 = VALUES(spell8); +UPDATE `creature_template` SET `flags_extra`=2 WHERE (`entry`=26250); # Plug the Sinkholes - worm UPDATE `creature_template` SET `spell1`=59638, `spell2` = 59637 WHERE `entry`=31216; # Mirror Image # Spore diff --git a/sql/updates/4544_world.sql b/sql/updates/4544_world.sql new file mode 100644 index 00000000000..90f7e193f15 --- /dev/null +++ b/sql/updates/4544_world.sql @@ -0,0 +1,3 @@ +UPDATE `creature_template` SET `ScriptName`='npc_sinkhole_kill_credit' WHERE (`entry`='26248') or (`entry`='26249'); +UPDATE `item_template` SET `ScriptName`='item_incendiary_explosives' WHERE (`entry`='35704'); +UPDATE `creature_template` SET `flags_extra`='2' WHERE (`entry`='26250'); diff --git a/src/bindings/scripts/scripts/item/item_scripts.cpp b/src/bindings/scripts/scripts/item/item_scripts.cpp index f577d0fed9c..d30efdae89f 100644 --- a/src/bindings/scripts/scripts/item/item_scripts.cpp +++ b/src/bindings/scripts/scripts/item/item_scripts.cpp @@ -489,6 +489,23 @@ bool ItemUse_item_zezzak_shard(Player *player, Item* _Item, SpellCastTargets con return true; } +/*##### +# item_incendiary_explosives +#####*/ + +bool ItemUse_item_incendiary_explosives(Player *player, Item* _Item, SpellCastTargets const& targets) +{ + if ( player->FindNearestCreature(26248,15) || player->FindNearestCreature(26249,15) ) + { + return false; + } + else + { + player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE,_Item,NULL); + return true; + } +} + void AddSC_item_scripts() { Script *newscript; @@ -592,5 +609,10 @@ void AddSC_item_scripts() newscript->Name="item_zezzaks_shard"; newscript->pItemUse = &ItemUse_item_zezzak_shard; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="item_incendiary_explosives"; + newscript->pItemUse = &ItemUse_item_incendiary_explosives; + newscript->RegisterSelf(); } diff --git a/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp b/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp index 94c93c8e449..c45ef53a81a 100644 --- a/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp +++ b/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp @@ -87,6 +87,116 @@ bool GossipSelect_npc_surristrasz(Player *player, Creature *_Creature, uint32 se return true; } +/*###### +## npc_sinkhole_kill_credit +######*/ + +enum +{ + SPELL_SET_CART = 46797, + SPELL_EXPLODE_CART = 46799, + SPELL_SUMMON_CART = 46798, + SPELL_SUMMON_WORM = 46800, +}; + +struct TRINITY_DLL_DECL npc_sinkhole_kill_creditAI : public ScriptedAI +{ + npc_sinkhole_kill_creditAI(Creature* c) : ScriptedAI(c){} + + uint32 Phase_Timer; + uint8 Phase; + Unit* Caster; + + void Reset() + { + Phase_Timer = 500; + Phase = 0; + Caster = NULL; + } + + void SpellHit(Unit *caster, const SpellEntry *spell) + { + if (Phase) + return; + + if (spell->Id == SPELL_SET_CART && CAST_PLR(caster)->GetQuestStatus(11897) == QUEST_STATUS_INCOMPLETE) + { + Phase = 1; + Caster = caster; + } + } + + void EnterCombat(Unit* who) { } + + void UpdateAI(const uint32 diff) + { + if (!Phase) + return; + + if (Phase_Timer < diff) + { + switch (Phase) + { + case 1: + DoCast(m_creature, SPELL_EXPLODE_CART, true); + DoCast(m_creature, SPELL_SUMMON_CART, true); + if (GameObject* cart = m_creature->FindNearestGameObject(188160,3)) + cart->SetUInt32Value(GAMEOBJECT_FACTION, 14); + Phase_Timer = 3000; + Phase = 2; + break; + case 2: + if (GameObject* cart = m_creature->FindNearestGameObject(188160,3)) + cart->UseDoorOrButton(); + DoCast(m_creature, SPELL_EXPLODE_CART, true); + Phase_Timer = 3000; + Phase = 3; + break; + case 3: + DoCast(m_creature, SPELL_EXPLODE_CART, true); + Phase_Timer = 2000; + Phase = 4; + case 5: + DoCast(m_creature, SPELL_SUMMON_WORM, true); + if (Unit* worm = m_creature->FindNearestCreature(26250, 3)) + { + worm->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + worm->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE); + } + Phase_Timer = 1000; + Phase = 6; + break; + case 6: + DoCast(m_creature, SPELL_EXPLODE_CART, true); + if (Unit* worm = m_creature->FindNearestCreature(26250, 3)) + { + m_creature->DealDamage(worm, worm->GetHealth()); + worm->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + Phase_Timer = 2000; + Phase = 7; + break; + case 7: + DoCast(m_creature, SPELL_EXPLODE_CART, true); + CAST_PLR(Caster)->KilledMonster(m_creature->GetCreatureInfo(),m_creature->GetGUID()); + Phase_Timer = 5000; + Phase = 8; + break; + case 8: + EnterEvadeMode(); + break; + } + } else Phase_Timer -= diff; + + } + +}; + +CreatureAI* GetAI_npc_sinkhole_kill_credit(Creature* pCreature) +{ + return new npc_sinkhole_kill_creditAI(pCreature); +} + void AddSC_borean_tundra() { Script *newscript; @@ -102,4 +212,9 @@ void AddSC_borean_tundra() newscript->pGossipHello = &GossipHello_npc_surristrasz; newscript->pGossipSelect = &GossipSelect_npc_surristrasz; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_sinkhole_kill_credit"; + newscript->GetAI = &GetAI_npc_sinkhole_kill_credit; + newscript->RegisterSelf(); } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 308d510e5ae..882a599466e 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1412,7 +1412,7 @@ void Unit::CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *da damageInfo->procEx = PROC_EX_NONE; damageInfo->hitOutCome = MELEE_HIT_EVADE; - if(!this || !pVictim) + if(!pVictim) return; if(!this->isAlive() || !pVictim->isAlive()) return; -- cgit v1.2.3 From 81e6f06680ce85989df27c2c34cdcd74932ab9ad Mon Sep 17 00:00:00 2001 From: Kudlaty Date: Thu, 23 Jul 2009 19:30:25 +0200 Subject: Add script for quest 12861. Author: Drethek. --HG-- branch : trunk --- sql/updates/4547_world_scripts.sql | 5 + src/bindings/scripts/CMakeLists.txt | 1 + src/bindings/scripts/ScriptMgr.cpp | 6 + src/bindings/scripts/VC80/80ScriptDev2.vcproj | 8 + src/bindings/scripts/VC90/90ScriptDev2.vcproj | 8 + .../scripts/scripts/zone/zuldrak/zuldrak.cpp | 187 +++++++++++++++++++++ 6 files changed, 215 insertions(+) create mode 100644 sql/updates/4547_world_scripts.sql create mode 100644 src/bindings/scripts/scripts/zone/zuldrak/zuldrak.cpp (limited to 'sql') diff --git a/sql/updates/4547_world_scripts.sql b/sql/updates/4547_world_scripts.sql new file mode 100644 index 00000000000..82f682e482e --- /dev/null +++ b/sql/updates/4547_world_scripts.sql @@ -0,0 +1,5 @@ +UPDATE `creature_template` SET `ScriptName`='npc_captured_rageclaw' WHERE (`entry`='29686'); +UPDATE `creature_template` SET `ScriptName`='npc_drakuru_shackles' WHERE (`entry`='29700'); + +DELETE FROM `spell_script_target` WHERE `entry` IN (55083,55223,59951,59952); +INSERT INTO `spell_script_target` VALUES (55083, 1, 29700),(55223, 1, 29686),(59951, 1, 29686),(59952, 1, 29686); diff --git a/src/bindings/scripts/CMakeLists.txt b/src/bindings/scripts/CMakeLists.txt index 3f86535f5e3..3dcd38fa256 100644 --- a/src/bindings/scripts/CMakeLists.txt +++ b/src/bindings/scripts/CMakeLists.txt @@ -380,6 +380,7 @@ SET(trinityscript_LIB_SRCS scripts/zone/zulaman/def_zulaman.h scripts/zone/zulaman/instance_zulaman.cpp scripts/zone/zulaman/zulaman.cpp + scripts/zone/zuldrak/zuldrak.cpp scripts/zone/zulfarrak/zulfarrak.cpp scripts/zone/zulgurub/boss_arlokk.cpp scripts/zone/zulgurub/boss_gahzranka.cpp diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index 217752b340e..3dbdd4899a1 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -636,6 +636,9 @@ extern void AddSC_boss_zuljin(); extern void AddSC_instance_zulaman(); extern void AddSC_zulaman(); +//Zul'Drak +extern void AddSC_zuldrak(); + //Northrend //Dungeon //Vault of Archavon @@ -1534,6 +1537,9 @@ void ScriptsInit(char const* cfg_file = "trinitycore.conf") AddSC_instance_zulaman(); AddSC_zulaman(); + //Zul'Drak + AddSC_zuldrak(); + //Northrend //Dungeon //Vault of Archavon diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj index 76167df9ae1..a615d579f4c 100644 --- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj +++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj @@ -1835,6 +1835,14 @@ > + + + + diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj index 4edd104a1c6..effb6e84d13 100644 --- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj +++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj @@ -1836,6 +1836,14 @@ > + + + + diff --git a/src/bindings/scripts/scripts/zone/zuldrak/zuldrak.cpp b/src/bindings/scripts/scripts/zone/zuldrak/zuldrak.cpp new file mode 100644 index 00000000000..bcb2d1f4957 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/zuldrak/zuldrak.cpp @@ -0,0 +1,187 @@ +/* + * Copyright (C) 2009 Trinity + * + * 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 + */ + +#include "precompiled.h" + +/*#### +## npc_drakuru_shackles +####*/ + +enum +{ + SPELL_LEFT_CHAIN = 59951, + SPELL_RIGHT_CHAIN = 59952, + SPELL_UNLOCK_SHACKLE = 55083, + SPELL_FREE_RAGECLAW = 55223, + + NPC_RAGECLAW = 29686 +}; + +struct TRINITY_DLL_DECL npc_drakuru_shacklesAI : public ScriptedAI +{ + npc_drakuru_shacklesAI(Creature *c) : ScriptedAI(c) {} + + Unit* Rageclaw; + + void Reset() + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + float x, y, z; + Rageclaw = NULL; + m_creature->GetClosePoint(x, y, z, m_creature->GetObjectSize()/3,0.1); + if (Unit* summon = m_creature->SummonCreature(NPC_RAGECLAW,x,y,z,0,TEMPSUMMON_DEAD_DESPAWN,1000)) + DoActionOnRageclaw(true,summon); + } + + void DoActionOnRageclaw(bool locking, Unit *who) + { + if (!who) + return; + + if (locking) + { + if (who) + { + Rageclaw = who; + + m_creature->SetInFront(Rageclaw); + Rageclaw->SetInFront(m_creature); + + m_creature->CastSpell(Rageclaw, SPELL_LEFT_CHAIN, true); + m_creature->CastSpell(Rageclaw, SPELL_RIGHT_CHAIN, true); + } + } + else + { + DoCast(Rageclaw, SPELL_FREE_RAGECLAW, true); + CAST_PLR(who)->KilledMonsterCredit(NPC_RAGECLAW, Rageclaw->GetGUID()); + m_creature->setDeathState(DEAD); + } + } + + void SpellHit(Unit *caster, const SpellEntry *spell) + { + if (spell->Id == SPELL_UNLOCK_SHACKLE) + { + if (Rageclaw) + DoActionOnRageclaw(false,caster); + else + m_creature->setDeathState(JUST_DIED); + + } + } +}; + +CreatureAI* GetAI_npc_drakuru_shackles(Creature *_Creature) +{ + return new npc_drakuru_shacklesAI (_Creature); +} + + +/*#### +## npc_captured_rageclaw +####*/ + +enum +{ + SPELL_UNSHACKLED = 55085, + SPELL_KNEEL = 39656 +}; + +const char * SAY_RAGECLAW_1 = "I poop on you, trollses!"; +const char * SAY_RAGECLAW_2 = "ARRRROOOOGGGGAAAA!"; +const char * SAY_RAGECLAW_3 = "No more mister nice wolvar!"; +#define SAY_RAGECLAW RAND(SAY_RAGECLAW_1,SAY_RAGECLAW_2,SAY_RAGECLAW_3) + +struct TRINITY_DLL_DECL npc_captured_rageclawAI : public ScriptedAI +{ + npc_captured_rageclawAI(Creature *c) : ScriptedAI(c) {} + + uint32 DespawnTimer; + bool Despawn; + + void Reset() + { + Despawn = false; + DespawnTimer = 0; + m_creature->setFaction(35); + m_creature->CastSpell(m_creature, SPELL_KNEEL, true); // Little Hack for kneel - Thanks Illy :P + } + + void MoveInLineOfSight(Unit *who){} + + void SpellHit(Unit *caster, const SpellEntry *spell) + { + if (spell->Id == SPELL_FREE_RAGECLAW) + { + if (m_creature->GetDummyAura(SPELL_LEFT_CHAIN)) + m_creature->RemoveAurasDueToSpell(SPELL_LEFT_CHAIN); + + if (m_creature->GetDummyAura(SPELL_RIGHT_CHAIN)) + m_creature->RemoveAurasDueToSpell(SPELL_RIGHT_CHAIN); + + if (m_creature->GetDummyAura(SPELL_KNEEL)) + m_creature->RemoveAurasDueToSpell(SPELL_KNEEL); + + m_creature->setFaction(m_creature->GetCreatureInfo()->faction_H); + + DoCast(m_creature, SPELL_UNSHACKLED, true); + DoSay(SAY_RAGECLAW, LANG_UNIVERSAL, NULL); + m_creature->GetMotionMaster()->MoveRandom(10); + + DespawnTimer = 10000; + Despawn = true; + } + } + + void UpdateAI(const uint32 diff) + { + if (m_creature->getVictim()) + { + DoMeleeAttackIfReady(); + return; + } + + if (!Despawn) + return; + + if (DespawnTimer < diff) + m_creature->setDeathState(JUST_DIED); + else DespawnTimer-=diff; + } +}; + +CreatureAI* GetAI_npc_captured_rageclaw(Creature *_Creature) +{ + return new npc_captured_rageclawAI (_Creature); +} + +void AddSC_zuldrak() +{ + Script *newscript; + + newscript = new Script; + newscript->Name="npc_drakuru_shackles"; + newscript->GetAI = &GetAI_npc_drakuru_shackles; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_captured_rageclaw"; + newscript->GetAI = &GetAI_npc_captured_rageclaw; + newscript->RegisterSelf(); +} -- cgit v1.2.3 From a7832a632b79965bfa0e18686dd03ce8201c9a85 Mon Sep 17 00:00:00 2001 From: Kudlaty Date: Thu, 23 Jul 2009 20:04:58 +0200 Subject: Script for quest 11878. Author: Drethek Missing update of *full.sql --HG-- branch : trunk --- sql/FULL/world_scripts_full.sql | 5 +++ sql/FULL/world_spell_full.sql | 4 +++ sql/FULL/world_tmp_full.sql | 3 ++ sql/updates/4549_world_script.sql | 4 +++ .../scripts/zone/borean_tundra/borean_tundra.cpp | 39 ++++++++++++++++++++++ 5 files changed, 55 insertions(+) create mode 100644 sql/updates/4549_world_script.sql (limited to 'sql') diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql index fbbbf44c77f..1ff50664213 100644 --- a/sql/FULL/world_scripts_full.sql +++ b/sql/FULL/world_scripts_full.sql @@ -312,6 +312,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_captured_sunhawk_agent' WHERE ` UPDATE `creature_template` SET `ScriptName`='npc_surristrasz' WHERE `entry`=24795; UPDATE `creature_template` SET `ScriptName`='npc_tiare' WHERE `entry`=30051; UPDATE `creature_template` SET `ScriptName`='npc_sinkhole_kill_credit' WHERE `entry` IN (26248,26249); +UPDATE `creature_template` SET `ScriptName`='npc_khunok_the_behemoth' WHERE (`entry`='25862'); /* BURNING STEPPES */ UPDATE `creature_template` SET `ScriptName`='npc_ragged_john' WHERE `entry`=9563; @@ -1069,6 +1070,10 @@ UPDATE `creature_template` SET `ScriptName`='do_nothing' WHERE `entry`=24187; UPDATE `creature_template` SET `ScriptName`='mob_zuljin_vortex' WHERE `entry`=24136; UPDATE `creature_template` SET `ScriptName`='npc_zulaman_hostage' WHERE `entry` IN (23790, 23999, 24024, 24001); +/* ZUL'DRAK */ +UPDATE `creature_template` SET `ScriptName`='npc_captured_rageclaw' WHERE (`entry`='29686'); +UPDATE `creature_template` SET `ScriptName`='npc_drakuru_shackles' WHERE (`entry`='29700'); + /* ZUL'FARRAK */ UPDATE `creature_template` SET `ScriptName`='npc_sergeant_bly' WHERE `entry`=7604; UPDATE `creature_template` SET `ScriptName`='npc_weegli_blastfuse' WHERE `entry`=7607; diff --git a/sql/FULL/world_spell_full.sql b/sql/FULL/world_spell_full.sql index 667b2346950..bf8c94b7227 100644 --- a/sql/FULL/world_spell_full.sql +++ b/sql/FULL/world_spell_full.sql @@ -483,6 +483,10 @@ INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('48714', '2', '27236'), ('57806', '2', '31043'); +--- Zul'Drak +DELETE FROM `spell_script_target` WHERE `entry` IN (55083,55223,59951,59952); +INSERT INTO `spell_script_target` VALUES (55083, 1, 29700),(55223, 1, 29686),(59951, 1, 29686),(59952, 1, 29686); + -- -------- -- POSITION -- -------- diff --git a/sql/FULL/world_tmp_full.sql b/sql/FULL/world_tmp_full.sql index 8b9e65d3f65..71e7749f201 100644 --- a/sql/FULL/world_tmp_full.sql +++ b/sql/FULL/world_tmp_full.sql @@ -1,3 +1,6 @@ +--- Khunok Will Know ---- +UPDATE `quest_template` SET `SrcSpell`='46232' WHERE (`entry`='11878'); + -- -------- -- TRIGGER -- -------- diff --git a/sql/updates/4549_world_script.sql b/sql/updates/4549_world_script.sql new file mode 100644 index 00000000000..88c24c3659d --- /dev/null +++ b/sql/updates/4549_world_script.sql @@ -0,0 +1,4 @@ +UPDATE `creature_template` SET `ScriptName`='npc_khunok_the_behemoth' WHERE (`entry`='25862'); + +--- DB CONTENT ---- +UPDATE `quest_template` SET `SrcSpell`='46232' WHERE (`entry`='11878'); diff --git a/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp b/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp index c45ef53a81a..7a8a2de4a39 100644 --- a/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp +++ b/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp @@ -197,6 +197,40 @@ CreatureAI* GetAI_npc_sinkhole_kill_credit(Creature* pCreature) return new npc_sinkhole_kill_creditAI(pCreature); } +/*###### +## npc_khunok_the_behemoth +######*/ + +struct TRINITY_DLL_DECL npc_khunok_the_behemothAI : public ScriptedAI +{ + npc_khunok_the_behemothAI(Creature *c) : ScriptedAI(c) {} + + void MoveInLineOfSight(Unit *who) + { + ScriptedAI::MoveInLineOfSight(who); + + if(who->GetTypeId() != TYPEID_UNIT) + return; + + if(who->GetEntry() == 25861 && me->IsWithinDistInMap(who, 10.0f)) + { + if(Unit *owner = who->GetOwner()) + { + if(owner->GetTypeId() == TYPEID_PLAYER) + { + DoCast(owner, 46231, true); + ((Creature*)who)->ForcedDespawn(); + } + } + } + } +}; + +CreatureAI* GetAI_npc_khunok_the_behemoth(Creature *_Creature) +{ + return new npc_khunok_the_behemothAI(_Creature); +} + void AddSC_borean_tundra() { Script *newscript; @@ -217,4 +251,9 @@ void AddSC_borean_tundra() newscript->Name="npc_sinkhole_kill_credit"; newscript->GetAI = &GetAI_npc_sinkhole_kill_credit; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_khunok_the_behemoth"; + newscript->GetAI = &GetAI_npc_khunok_the_behemoth; + newscript->RegisterSelf(); } -- cgit v1.2.3 From 8b256915414ca3d6c0d74ad36fd2cfef6909cfbf Mon Sep 17 00:00:00 2001 From: Anubisss Date: Thu, 23 Jul 2009 21:16:37 +0200 Subject: *Fix a typo. --HG-- branch : trunk --- sql/updates/4549_world_script.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql') diff --git a/sql/updates/4549_world_script.sql b/sql/updates/4549_world_script.sql index 88c24c3659d..b020a560cec 100644 --- a/sql/updates/4549_world_script.sql +++ b/sql/updates/4549_world_script.sql @@ -1,4 +1,4 @@ UPDATE `creature_template` SET `ScriptName`='npc_khunok_the_behemoth' WHERE (`entry`='25862'); ---- DB CONTENT ---- +-- DB CONTENT -- UPDATE `quest_template` SET `SrcSpell`='46232' WHERE (`entry`='11878'); -- cgit v1.2.3 From 3539bfc0327de41e3676aeef556de554c30c23b8 Mon Sep 17 00:00:00 2001 From: Kudlaty Date: Thu, 23 Jul 2009 21:34:24 +0200 Subject: Fix another two typos. sorry --HG-- branch : trunk --- sql/FULL/world_spell_full.sql | 2 +- sql/FULL/world_tmp_full.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sql') diff --git a/sql/FULL/world_spell_full.sql b/sql/FULL/world_spell_full.sql index bf8c94b7227..980c29c9fd8 100644 --- a/sql/FULL/world_spell_full.sql +++ b/sql/FULL/world_spell_full.sql @@ -483,7 +483,7 @@ INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('48714', '2', '27236'), ('57806', '2', '31043'); ---- Zul'Drak +-- Zul'Drak DELETE FROM `spell_script_target` WHERE `entry` IN (55083,55223,59951,59952); INSERT INTO `spell_script_target` VALUES (55083, 1, 29700),(55223, 1, 29686),(59951, 1, 29686),(59952, 1, 29686); diff --git a/sql/FULL/world_tmp_full.sql b/sql/FULL/world_tmp_full.sql index 71e7749f201..19e1276d4ea 100644 --- a/sql/FULL/world_tmp_full.sql +++ b/sql/FULL/world_tmp_full.sql @@ -1,4 +1,4 @@ ---- Khunok Will Know ---- +-- Khunok Will Know -- UPDATE `quest_template` SET `SrcSpell`='46232' WHERE (`entry`='11878'); -- -------- -- cgit v1.2.3 From 0c4c487df0f9e52179249af805260d024c46334d Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 24 Jul 2009 09:04:25 +0800 Subject: [8195] Add spell check data for dummy effect tail... Author: VladimirMangos --HG-- branch : trunk --- sql/mangos_spell_check.sql | 65 ++++++++++++++++++++++++++++++++++++++++++++-- src/game/SpellEffects.cpp | 11 ++++---- 2 files changed, 68 insertions(+), 8 deletions(-) (limited to 'sql') diff --git a/sql/mangos_spell_check.sql b/sql/mangos_spell_check.sql index 60d2d8dcd7c..d8c9c33eca0 100644 --- a/sql/mangos_spell_check.sql +++ b/sql/mangos_spell_check.sql @@ -16,7 +16,7 @@ /* re-adding before command use. So need just adding new line to file. */ /* Current table fill progress state: */ -/* SpellEffect.cpp from start until end of SPELLFAMILY_DRUID case of Spell::EffectDummy */ +/* SpellEffect.cpp from start until end of Spell::EffectDummy */ DROP TABLE IF EXISTS spell_check; CREATE TABLE `spell_check` ( @@ -42,6 +42,11 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (1455, 5,0x0000000000040000,0x00000000, -1, -1, -1, 3, -1,-1,'Life Tap', 'Spell::EffectDummy'), (1456, 5,0x0000000000040000,0x00000000, -1, -1, -1, 3, -1,-1,'Life Tap', 'Spell::EffectDummy'), (4073, -1, -1, -1, -1, -1, -1, -1, -1,-1,'Mechanical Dragonling', 'Spell::EffectDummy'), +(5938, 8, -1, -1, -1, -1, -1, 3, -1,-1,'Shiv', 'Spell::EffectDummy'), +(5940, -1, -1, -1, -1, -1, -1, -1, -1,-1,'Shiv', 'Spell::EffectDummy'), +(8017, 11,0x0000000000400000,0x00000000, -1, -1, -1, 3, -1,-1,'Rockbiter Weapon', 'Spell::EffectDummy'), +(8018, 11,0x0000000000400000,0x00000000, -1, -1, -1, 3, -1,-1,'Rockbiter Weapon', 'Spell::EffectDummy'), +(8019, 11,0x0000000000400000,0x00000000, -1, -1, -1, 3, -1,-1,'Rockbiter Weapon', 'Spell::EffectDummy'), (8063, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Deviate Fish', 'Spell::EffectDummy'), (8064, -1, -1, -1, -1, -1, -1, -1, -1,-1,'Sleepy', 'Spell::EffectDummy'), (8065, -1, -1, -1, -1, -1, -1, -1, -1,-1,'Invigorate', 'Spell::EffectDummy'), @@ -54,6 +59,7 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (8221, -1, -1, -1, -1, -1, -1, -1, -1,-1,'Yaaarrrr', 'Spell::EffectDummy'), (8222, -1, -1, -1, -1, -1, -1, -1, -1,-1,'Yaaarrrr', 'Spell::EffectDummy'), (8593, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Symbol of life', 'Spell::EffectDummy'), +(10399,11,0x0000000000400000,0x00000000, -1, -1, -1, 3, -1,-1,'Rockbiter Weapon', 'Spell::EffectDummy'), (11687, 5,0x0000000000040000,0x00000000, -1, -1, -1, 3, -1,-1,'Life Tap', 'Spell::EffectDummy'), (11688, 5,0x0000000000040000,0x00000000, -1, -1, -1, 3, -1,-1,'Life Tap', 'Spell::EffectDummy'), (11689, 5,0x0000000000040000,0x00000000, -1, -1, -1, 3, -1,-1,'Life Tap', 'Spell::EffectDummy'), @@ -70,6 +76,7 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (13120, 0, -1, -1, -1, -1, -1, 3, -1,-1,'net-o-matic', 'Spell::EffectDummy'), (13166,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Gnomish Battle Chicken', 'Spell::EffectDummy'), (13567, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Dummy Trigger', 'Spell::EffectDummy'), +(14185, 8, -1, -1, -1, -1, -1, 3, -1,-1,'Preparation', 'Spell::EffectDummy'), (15998, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Capture Worg Pup', 'Spell::EffectDummy'), (16566,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Net-o-Matic', 'Spell::EffectDummy'), (16589, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Noggenfogger Elixir', 'Spell::EffectDummy'), @@ -86,10 +93,14 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (18791,-1, -1, -1, -1, -1, -1, -1, -1,-1,'', 'Spell::EffectInstaKill'), (18792,-1, -1, -1, -1, -1, -1, -1, -1,-1,'', 'Spell::EffectInstaKill'), (19804,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Arcanite Dragonling', 'Spell::EffectDummy'), +(20187,10, -1, -1, -1, -1, -1, 3, -1,-1,'Judgement of Righteousness', 'Spell::EffectDummy'), (20253, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Intercept', 'Spell::EffectSchoolDMG'), +(20473,10, -1, -1, 156, -1, -1, 3, -1,-1,'Holy Shock', 'Spell::EffectDummy'), (20577, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Cannibalize', 'Spell::EffectDummy'), (20578,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Cannibalize', 'Spell::EffectDummy'), (20647,-1, -1, -1, -1, -1, -1, 2, -1, 0,'Execute', 'Spell::EffectDummy'), +(20929,10, -1, -1, 156, -1, -1, 3, -1,-1,'Holy Shock', 'Spell::EffectDummy'), +(20930,10, -1, -1, 156, -1, -1, 3, -1,-1,'Holy Shock', 'Spell::EffectDummy'), (21887,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Warrior\'s Wrath', 'Spell::EffectDummy'), (21977, 4, -1, -1, -1, -1, -1, 3, -1,-1,'Warrior\'s Wrath', 'Spell::EffectDummy'), (23019, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Crystal Prison Dummy DND', 'Spell::EffectDummy'), @@ -110,11 +121,18 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (23783,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Gift of Life', 'Spell::EffectDummy'), (23881, 4, -1, -1, -1, -1, -1, 3, -1,-1,'Bloodthirst', 'Spell::EffectDummy'), (23885,-1, -1, -1, -1, -1, -1, 6, 42, 0,'Bloodthirst', 'Spell::EffectDummy'), +(23989, 9, -1, -1, -1, -1, -1, 3, -1,-1,'Readiness', 'Spell::EffectDummy'), (24340, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Meteor', 'Spell::EffectSchoolDMG'), (25599, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Thundercrash', 'Spell::EffectSchoolDMG'), (25858,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Reindeer', 'Spell::EffectDummy'), (25859,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Reindeer', 'Spell::EffectDummy'), (25860, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Reindeer Transformation', 'Spell::EffectDummy'), +(25902,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Holy Shock', 'Spell::EffectDummy'), +(25903,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Holy Shock', 'Spell::EffectDummy'), +(25911,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Holy Shock', 'Spell::EffectDummy'), +(25912,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Holy Shock', 'Spell::EffectDummy'), +(25913,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Holy Shock', 'Spell::EffectDummy'), +(25914,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Holy Shock', 'Spell::EffectDummy'), (26074, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Holiday Cheer', 'Spell::EffectDummy'), (26467,-1, -1, -1, -1, -1, -1, 6, 42, 0,'Persistent Shield', 'Spell::EffectDummy'), (26558, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Meteor', 'Spell::EffectSchoolDMG'), @@ -122,6 +140,9 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (26635,-1, -1, -1, -1, -1, -1, 6, -1, 1,'Berserking', 'Spell::EffectDummy'), (26635,-1, -1, -1, -1, -1, -1, 6, -1, 2,'Berserking', 'Spell::EffectDummy'), (26789, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Shard of the Fallen Star', 'Spell::EffectSchoolDMG'), +(27174,10, -1, -1, 156, -1, -1, 3, -1,-1,'Holy Shock', 'Spell::EffectDummy'), +(27175,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Holy Shock', 'Spell::EffectDummy'), +(27176,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Holy Shock', 'Spell::EffectDummy'), (27222, 5,0x0000000000040000,0x00000000, -1, -1, -1, 3, -1,-1,'Life Tap', 'Spell::EffectDummy'), (28006, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Arcane Cloaking', 'Spell::EffectDummy'), (28884, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Meteor', 'Spell::EffectSchoolDMG'), @@ -139,7 +160,9 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (30504,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Poultryized!', 'Spell::EffectDummy'), (30507, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Poultryizer', 'Spell::EffectDummy'), (31225, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Shimmering Vessel', 'Spell::EffectDummy'), +(31231, 8, -1, -1, -1, -1, -1, 3, -1,-1,'Cheat Death', 'Spell::EffectDummy'), (31436, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Malevolent Cleave', 'Spell::EffectSchoolDMG'), +(31789,10, -1, -1, -1, -1, -1, 3, -1, 0,'Righteous Defense', 'Spell::EffectDummy'), (31803,-1, -1, -1, -1, -1, -1, 6, 3,-1,'Holy Vengeance', 'Spell::EffectSchoolDMG'), (31818,-1, -1, -1, -1, -1, -1, 30, -1, 0,'Life Tap', 'Spell::EffectDummy'), (32409,-1, -1, -1, -1, -1, -1, 6, 3,-1,'Shadow Word: Death', 'Spell::EffectSchoolDMG'), @@ -158,6 +181,9 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (33060, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Make a Wish', 'Spell::EffectDummy'), (33062,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Tiny Magical Crawdad', 'Spell::EffectDummy'), (33064,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Mr. Pinchy\'s Gift', 'Spell::EffectDummy'), +(33072,10, -1, -1, 156, -1, -1, 3, -1,-1,'Holy Shock', 'Spell::EffectDummy'), +(33073,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Holy Shock', 'Spell::EffectDummy'), +(33074,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Holy Shock', 'Spell::EffectDummy'), (34665, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Administer Antidote', 'Spell::EffectDummy'), (34846,-1, -1, -1, -1, -1, -1, 30, -1, 0,'Charge', 'Spell::EffectDummy'), (35181, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Dive Bomb', 'Spell::EffectSchoolDMG'), @@ -166,13 +192,25 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (35744,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Socrethar Portal', 'Spell::EffectDummy'), (35745, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Socrethar\'s Stone', 'Spell::EffectDummy'), (36032,-1, -1, -1, -1, -1, -1, -1, -1,-1,'', 'Spell::EffectSchoolDMG'), +(36494,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Rockbiter Weapon', 'Spell::EffectDummy'), +(36750,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Rockbiter Weapon', 'Spell::EffectDummy'), +(36755,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Rockbiter Weapon', 'Spell::EffectDummy'), +(36759,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Rockbiter Weapon', 'Spell::EffectDummy'), (36837, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Meteor', 'Spell::EffectSchoolDMG'), (36902,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Transporter Malfunction', 'Spell::EffectDummy'), (37169,-1, -1, -1, -1, -1, -1, 6, 4,-1,'Eviscerate and Envenom Bonus Damage','Spell::EffectSchoolDMG'), +(37506, 9, -1, -1, -1, -1, -1, 3, -1,-1,'Scatter Shot', 'Spell::EffectDummy'), (37674, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Chaos Blast', 'Spell::EffectDummy'), (37675,-1, -1, -1, -1, -1, -1, 2, -1, 0,'Chaos Blast', 'Spell::EffectDummy'), +(37877,10, -1, -1, -1, -1, -1, 3, -1,-1,'Blessing of Faith', 'Spell::EffectDummy'), +(37878,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Blessing of Lower City', 'Spell::EffectDummy'), +(37879,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Blessing of Lower City', 'Spell::EffectDummy'), +(37880,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Blessing of Lower City', 'Spell::EffectDummy'), +(37881,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Blessing of Lower City', 'Spell::EffectDummy'), (38441, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Cataclysmic Bolt', 'Spell::EffectSchoolDMG'), (38903, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Meteor', 'Spell::EffectSchoolDMG'), +(39609,-1, -1, -1, -1, -1, -1, 30, -1, 0,'Mana Tide Totem', 'Spell::EffectDummy'), +(39610,11, -1, -1, -1, -1, -1, 3, -1,-1,'Mana Tide Totem effect', 'Spell::EffectDummy'), (40810, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Saber Lash', 'Spell::EffectSchoolDMG'), (41276, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Meteor', 'Spell::EffectSchoolDMG'), (42384, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Brutal Swipe', 'Spell::EffectSchoolDMG'), @@ -191,10 +229,19 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (45030, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Impale Emissary', 'Spell::EffectDummy'), (45088,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Emissary of Hate Credit', 'Spell::EffectDummy'), (45150, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Meteor Slash', 'Spell::EffectSchoolDMG'), +(45182,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Cheat Death', 'Spell::EffectDummy'), (46014,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Knocked Up', 'Spell::EffectDummy'), (47540, 6,0x0080000000000000,0x00000000, -1, -1, -1, 3, -1,-1,'Penance', 'Spell::EffectDummy'), +(47632,-1, -1, -1, -1, -1, -1, 2, -1, 0,'Death Coil', 'Spell::EffectDummy'), +(47633,-1, -1, -1, -1, -1, -1, 10, -1, 0,'Death Coil', 'Spell::EffectDummy'), (47757,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Penance', 'Spell::EffectDummy'), (47758,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Penance', 'Spell::EffectDummy'), +(48820,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Holy Shock', 'Spell::EffectDummy'), +(48821,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Holy Shock', 'Spell::EffectDummy'), +(48822,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Holy Shock', 'Spell::EffectDummy'), +(48823,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Holy Shock', 'Spell::EffectDummy'), +(48824,10, -1, -1, 156, -1, -1, 3, -1,-1,'Holy Shock', 'Spell::EffectDummy'), +(48825,10, -1, -1, 156, -1, -1, 3, -1,-1,'Holy Shock', 'Spell::EffectDummy'), (50242,-1, -1, -1, -1, -1, -1, -1, -1,-1,'1000001', 'Spell::EffectDummy'), (50243, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Teach Language', 'Spell::EffectDummy'), (50246,-1, -1, -1, -1, -1, -1, -1, -1,-1,'01001000', 'Spell::EffectDummy'), @@ -202,6 +249,9 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (50288,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Starfall', 'Spell::EffectDummy'), (51582, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Rocket Boots Engaged', 'Spell::EffectDummy'), (51592, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Pickup Primordial Hatchling', 'Spell::EffectDummy'), +(52025,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Cleansing Totem Effect', 'Spell::EffectDummy'), +(52032,-1, -1, -1, -1, -1, -1, 30, -1, 0,'Mana Spring Totem', 'Spell::EffectDummy'), +(52042,-1, -1, -1, -1, -1, -1, 10, -1, 0,'Healing Stream Totem', 'Spell::EffectDummy'), (52308, 0, -1, -1, -1, -1, -1, 3, -1, 0,'Take Sputum Sample', 'Spell::EffectDummy'), (52308, 0, -1, -1, -1, -1, -1, 3, -1, 1,'Take Sputum Sample', 'Spell::EffectDummy'), (52752,-1, -1, -1, -1, -1, -1, 10, -1, 0,'Ancestral Awakening', 'Spell::EffectDummy'), @@ -226,6 +276,7 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (54586,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Runeforging Credit', 'Spell::EffectDummy'), (54861,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Nitro Boosts', 'Spell::EffectDummy'), (55004, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Nitro Boosts', 'Spell::EffectDummy'), +(55441,11, -1, -1, -1, -1, -1, -1, 4,-1,'Glyph of Mana Tide', 'Spell::EffectDummy'), (57946, 5,0x0000000000040000,0x00000000, -1, -1, -1, 3, -1,-1,'Life Tap', 'Spell::EffectDummy'), (58367,-1, -1, -1, -1, -1, -1, -1, 4,-1,'Glyph of Execution', 'Spell::EffectDummy'), (58418, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Portal to Orgrimmar', 'Spell::EffectDummy'), @@ -239,34 +290,44 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas ( 0, 0, -1, -1,1661, -1, -1, 3, -1,-1,'Berserking', 'Spell::EffectDummy'), ( 0, 4,0x0000040000000000,0x00000000, -1, -1, -1, 2, -1,-1,'Bloodthirst', 'Spell::EffectSchoolDMG'), (0, 4,0x0000000000000001,0x00000000, -1, 867, -1, 3, -1,-1,'Charge', 'Spell::EffectDummy'), +( 0,11,0x0000000004000000,0x00000000,1673, -1, -1, 3, -1,-1,'Cleansing Totem', 'Spell::EffectDummy'), (0, 4,0x0000000004000000,0x00000000, -1, -1, -1, 3, -1,-1,'Concussion Blow', 'Spell::EffectDummy'), ( 0, 9,0x0008000000000000,0x00000000, -1, -1, -1, 2, -1,-1,'Counterattack', 'Spell::EffectSchoolDMG'), ( 0, 8,0x0000000000010000,0x00000000, -1, -1, -1, -1, 3,-1,'Deadly poison', 'Spell::EffectSchoolDMG'), +( 0,15,0x0000000000002000,0x00000000, -1, -1, -1, 3, -1,-1,'Death Coil', 'Spell::EffectDummy'), ( 0, 8,0x0000000800000000,0x00000000, -1, -1, -1, 2, -1,-1,'Envenom', 'Spell::EffectSchoolDMG'), ( 0, 8,0x0000000000020000,0x00000000, -1, -1, -1, 2, -1,-1,'Eviscerate', 'Spell::EffectSchoolDMG'), (0, 4,0x0000000020000000,0x00000000, -1, -1, -1, 3, -1,-1,'Execute', 'Spell::EffectDummy'), ( 0, 9,0x0000000000000004,0x00000000, -1, -1, -1, 2, -1,-1,'Explosive Trap Effect', 'Spell::EffectSchoolDMG'), ( 0, 7,0x0000000000800000,0x00000000, -1,6587, -1, 2, -1,-1,'Ferocious Bite', 'Spell::EffectSchoolDMG'), +( 0,11,0x0000000000200000,0x00000000, -1, -1, -1, -1, -1,-1,'Flametongue', 'Spell::EffectDummy'), ( 0, 9, -1, -1,1578, -1, -1, 2, -1,-1,'Gore', 'Spell::EffectSchoolDMG'), ( 0, 8,0x0000000000000008,0x00000000, -1, -1, -1, 2, -1,-1,'Gouge', 'Spell::EffectSchoolDMG'), ( 0,10,0x0000008000000000,0x00000000, -1, -1, -1, 2, -1,-1,'Hammer of Wrath', 'Spell::EffectSchoolDMG'), ( 0,10,0x0004000000000000,0x00000000, -1, -1, -1, 2, -1,-1,'Hammer of the Righteous', 'Spell::EffectSchoolDMG'), +( 0,11,0x0000000000002000,0x00000000, -1, -1, -1, 3, -1,-1,'Healing Stream Totem', 'Spell::EffectDummy'), ( 0, 4,0x0000000100000000,0x00000000, -1, -1, -1, 2, -1,-1,'Heroic Throw', 'Spell::EffectSchoolDMG'), +( 0,10, -1, -1, 156, -1, -1, 3, -1,-1,'Holy Shock', 'Spell::EffectDummy'), (0, 5, -1, -1, 208, -1, -1, -1, 4,-1,'Improved Life Tap', 'Spell::EffectDummy'), ( 0, 5,0x0000004000000000,0x00000000,2128, -1, -1, 2, -1,-1,'Incinerate', 'Spell::EffectSchoolDMG'), ( 0, 8,0x0000000000002000,0x00000000, -1, -1, -1, 2, -1,-1,'Instant Poison', 'Spell::EffectSchoolDMG'), +( 0,10, -1, -1, 561, -1, -1, 3, -1,-1,'Judgement of command', 'Spell::EffectDummy'), ( 0,10,0x0000000800000000,0x00000000,2292, -1, -1, 2, -1,-1,'Judgement of Vengeance', 'Spell::EffectSchoolDMG'), ( 0, 7,0x0000010000000000,0x00000000,2246, -1, -1, 2, -1,-1,'Lacerate', 'Spell::EffectSchoolDMG'), +( 0,11,0x0000000000000000,0x00000004, -1, -1, -1, 3, -1,-1,'Lava Lash', 'Spell::EffectDummy'), (0, 5,0x0000000000040000,0x00000000, -1, -1, -1, 3, -1,-1,'Life Tap', 'Spell::EffectDummy'), (0, 5, -1, -1,1982, -1, -1, -1,107,-1,'Mana Feed', 'Spell::EffectDummy'), +( 0,11,0x0000000000004000,0x00000000, -1, -1, -1, 3, -1,-1,'Mana Spring Totem', 'Spell::EffectDummy'), ( 0, 7,0x0000044000000000,0x00000000, -1, -1, -1, -1, -1,-1,'Mangle (Cat) and Mangle (Bear)', 'Unit::HandleDummyAuraProc'), ( 0, 9,0x0000000000000002,0x00000000, -1, 342, -1, 2, -1,-1,'Mongoose Bite', 'Spell::EffectSchoolDMG'), (0, 6,0x0080000000000000,0x00000000, -1, -1, -1, 3, -1,-1,'Penance', 'Spell::EffectDummy'), +( 0, 8,0x0000024000000860,0x00000000, -1, -1, -1, -1, -1,-1,'Preparation (affected spells)', 'Spell::EffectDummy'), ( 0, 7,0x0000000000001000,0x00000000, -1, -1, -1, 2, -1,-1,'Rake', 'Spell::EffectSchoolDMG'), /* used in */ ( 0, 7,0x0000000000001000,0x00000000, -1, -1, -1, 80, -1, 2,'Rake', 'Spell::EffectSchoolDMG'), /* exactly selected */ ( 0, 7,0x0000000000001000,0x00000000, -1, -1, -1, -1, 3,-1,'Rake', 'Aura::HandlePeriodicDamage'), /* used in */ ( 0, 7,0x0000000000001000,0x00000000, -1, -1, -1, 80, -1, 2,'Rake', 'Aura::HandlePeriodicDamage'), /* exactly selected */ ( 0, 4,0x0000000000000400,0x00000000, -1, -1, -1, 2, -1,-1,'Revenge', 'Spell::EffectSchoolDMG'), +( 0,11,0x0000000000400000,0x00000000, -1, -1, -1, 3, -1,-1,'Rockbiter Weapon', 'Spell::EffectDummy'), ( 0, 6,0x0000000200000000,0x00000000, -1, -1, -1, 2, -1,-1,'Shadow Word: Death', 'Spell::EffectSchoolDMG'), ( 0,10,0x0010000000000000,0x00000000, -1, -1, -1, 2, -1,-1,'Shield of Righteousness', 'Spell::EffectSchoolDMG'), ( 0, 4,0x0000020000000000,0x00000000, -1, -1,1209, 2, -1,-1,'Shield Slam', 'Spell::EffectSchoolDMG'), @@ -275,8 +336,8 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (0, 4,0x0000000000200000,0x00000000, -1, -1, -1, 3, -1,-1,'Slam', 'Spell::EffectDummy'), (0, 7,0x0000000000000000,0x00000100, -1, -1, -1, 3, -1,-1,'Starfall', 'Spell::EffectDummy'), ( 0, 9,0x0000000100000000,0x00000000, -1, -1, -1, 2, -1,-1,'Steady Shot', 'Spell::EffectSchoolDMG'), +( 0, 9,0x0000000100000000,0x00000000, -1, -1, -1, 3, -1,-1,'Steady Shot', 'Spell::EffectDummy'), ( 0, 7,0x0010000000000000,0x00000000, -1, -1, -1, 2, -1,-1,'Swipe', 'Spell::EffectSchoolDMG'), ( 0, 4,0x0000000000000080,0x00000000, -1, -1, -1, 2, -1,-1,'Thunder Clap', 'Spell::EffectSchoolDMG'), ( 0, 4,0x0000010000000000,0x00000000, -1, -1, -1, 2, -1,-1,'Victory Rush', 'Spell::EffectSchoolDMG'), ( 0, 8,0x0000000010000000,0x00000000, -1, -1, -1, 2, -1,-1,'Wound Poison', 'Spell::EffectSchoolDMG'); - diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 9260a738683..75a707b3105 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1502,7 +1502,7 @@ void Spell::EffectDummy(uint32 i) m_caster->CastSpell(unitTarget, 5940, true); return; } - case 14185: // Preparation Rogue + case 14185: // Preparation { if(m_caster->GetTypeId()!=TYPEID_PLAYER) return; @@ -1530,7 +1530,7 @@ void Spell::EffectDummy(uint32 i) case SPELLFAMILY_HUNTER: switch(m_spellInfo->Id) { - case 23989: //Readiness talent + case 23989: // Readiness talent { if(m_caster->GetTypeId()!=TYPEID_PLAYER) return; @@ -1688,8 +1688,8 @@ void Spell::EffectDummy(uint32 i) } break; case SPELLFAMILY_SHAMAN: - //Shaman Rockbiter Weapon - if (m_spellInfo->SpellFamilyFlags.IsEqual(0x400000)) + // Rockbiter Weapon + if (m_spellInfo->SpellFamilyFlags[0] & 0x400000) { // TODO: use expect spell for enchant (if exist talent) // In 3.0.3 no mods present for rockbiter @@ -1762,8 +1762,7 @@ void Spell::EffectDummy(uint32 i) if(!unitTarget || unitTarget->getPowerType() != POWER_MANA) return; // Glyph of Mana Tide - Unit *owner = m_caster->GetOwner(); - if (owner) + if(Unit *owner = m_caster->GetOwner()) if (AuraEffect *dummy = owner->GetDummyAura(55441)) damage+=dummy->GetAmount(); // Regenerate 6% of Total Mana Every 3 secs -- cgit v1.2.3 From c46e8f7b0f4853751c8f40e93a6657230b251456 Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 24 Jul 2009 09:05:47 +0800 Subject: [8196] Implement item 44012 spell effects. Author: evilstar --HG-- branch : trunk --- sql/mangos_spell_check.sql | 4 ++++ src/game/SpellEffects.cpp | 15 +++++++++++++++ src/trinitycore/trinitycore.conf.dist | 4 ++-- 3 files changed, 21 insertions(+), 2 deletions(-) (limited to 'sql') diff --git a/sql/mangos_spell_check.sql b/sql/mangos_spell_check.sql index d8c9c33eca0..3a2078fc102 100644 --- a/sql/mangos_spell_check.sql +++ b/sql/mangos_spell_check.sql @@ -281,6 +281,10 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (58367,-1, -1, -1, -1, -1, -1, -1, 4,-1,'Glyph of Execution', 'Spell::EffectDummy'), (58418, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Portal to Orgrimmar', 'Spell::EffectDummy'), (58420, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Portal to Stormwind', 'Spell::EffectDummy'), +(59640, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Underbelly Elixir', 'Spell::EffectDummy'), +(59645,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Underbelly Elixir', 'Spell::EffectDummy'), +(59831,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Underbelly Elixir', 'Spell::EffectDummy'), +(59843,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Underbelly Elixir', 'Spell::EffectDummy'), (61491, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Intercept', 'Spell::EffectSchoolDMG'), /* sorted by spell names */ /*id fm familyMaskA fmMaskB icon vis cat eff aur ef name code */ diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 75a707b3105..67e1c88c7ef 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1205,6 +1205,21 @@ void Spell::EffectDummy(uint32 i) case 58418: // Portal to Orgrimmar case 58420: // Portal to Stormwind return; // implemented in EffectScript[0] + case 59640: // Underbelly Elixir + { + if(m_caster->GetTypeId() != TYPEID_PLAYER) + return; + + uint32 spell_id = 0; + switch(urand(1,3)) + { + case 1: spell_id = 59645; break; + case 2: spell_id = 59831; break; + case 3: spell_id = 59843; break; + } + m_caster->CastSpell(m_caster,spell_id,true,NULL); + return; + } } //All IconID Check in there diff --git a/src/trinitycore/trinitycore.conf.dist b/src/trinitycore/trinitycore.conf.dist index 9a33a2daf6e..cbc2ee54f3d 100644 --- a/src/trinitycore/trinitycore.conf.dist +++ b/src/trinitycore/trinitycore.conf.dist @@ -632,8 +632,8 @@ ChatLogTimestamp = 0 # # AllFlightPaths # Players will start with all flight paths (Note: ALL flight paths, not only player's team) -# Default: 0 (true) -# 1 (false) +# Default: 0 (false) +# 1 (true) # # AlwaysMaxSkillForLevel # Players will automatically gain max level dependent (weapon/defense) skill when logging in, leveling up etc. -- cgit v1.2.3 From f9d0ccf8574e9b40fdeac17473b224cacbb1d457 Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 24 Jul 2009 09:48:13 +0800 Subject: [8215] Update sql/mangos_spell_check.sql. Author: VladimirMangos --HG-- branch : trunk --- sql/mangos.sql | 26 +++++++++++++++++--------- sql/mangos_spell_check.sql | 2 ++ 2 files changed, 19 insertions(+), 9 deletions(-) (limited to 'sql') diff --git a/sql/mangos.sql b/sql/mangos.sql index ed429442af9..90ff12ab883 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -23,7 +23,7 @@ DROP TABLE IF EXISTS `db_version`; CREATE TABLE `db_version` ( `version` varchar(120) default NULL, `creature_ai_version` varchar(120) default NULL, - `required_8191_01_mangos_spell_affect` bit(1) default NULL + `required_8213_01_mangos_spell_bonus_data` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -17004,12 +17004,12 @@ INSERT INTO `spell_proc_event` VALUES (17801, 0x00000000, 5, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (17802, 0x00000000, 5, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (17803, 0x00000000, 5, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), -(18073, 0x00000000, 5, 0x00000060, 0x00000080, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), +(18073, 0x00000000, 5, 0x00000100, 0x00800000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (18094, 0x00000000, 5, 0x0000000A, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (18095, 0x00000000, 5, 0x0000000A, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(18096, 0x00000000, 5, 0x00000060, 0x00000080, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(18119, 0x00000000, 5, 0x000003E5, 0x000010C0, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(18120, 0x00000000, 5, 0x000003E5, 0x000010C0, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), +(18096, 0x00000000, 5, 0x00000100, 0x00800000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), +(18119, 0x00000000, 5, 0x00000000, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), +(18120, 0x00000000, 5, 0x00000000, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (18820, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0.000000, 0.000000, 0), (19184, 0x00000000, 9, 0x00000014, 0x00002000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (19387, 0x00000000, 9, 0x00000014, 0x00002000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), @@ -17135,9 +17135,9 @@ INSERT INTO `spell_proc_event` VALUES (29977, 0x00000000, 3, 0x00C00017, 0x00000040, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (30003, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000800, 0.000000, 0.000000, 0), (30160, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), -(30293, 0x00000000, 5, 0x00000381, 0x000000C0, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(30295, 0x00000000, 5, 0x00000381, 0x000000C0, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(30296, 0x00000000, 5, 0x00000381, 0x000000C0, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), +(30293, 0x00000000, 5, 0x00000181, 0x008200C0, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), +(30295, 0x00000000, 5, 0x00000181, 0x008200C0, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), +(30296, 0x00000000, 5, 0x00000181, 0x008200C0, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (30299, 0x0000007E, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (30301, 0x0000007E, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (30302, 0x0000007E, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), @@ -17606,6 +17606,7 @@ INSERT INTO `spell_proc_event` VALUES (56822, 0x00000000, 15, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (56834, 0x00000000, 15, 0x00440000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (56835, 0x00000000, 15, 0x00440000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), +(57352, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00010154, 0x00000003, 0.000000, 0.000000, 45), (57878, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0.000000, 0.000000, 0), (57880, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0.000000, 0.000000, 0), (57881, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0.000000, 0.000000, 0), @@ -17660,7 +17661,14 @@ INSERT INTO `spell_proc_event` VALUES (61356, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (61846, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0.000000, 0.000000, 0), (61847, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0.000000, 0.000000, 0), +<<<<<<< HEAD:sql/mangos.sql (63108, 0x00000000, 5, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0); +======= +(63108, 0x00000000, 5, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), +(63156, 0x00000000, 0, 0x00000001, 0x00000040, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), +(63158, 0x00000000, 0, 0x00000001, 0x00000040, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), +(63245, 0x00000000, 5, 0x00000100, 0x00800000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0); +>>>>>>> 4386e1133bd161f1b3a8d378e567b3d61f83ce89:sql/mangos.sql /*!40000 ALTER TABLE `spell_proc_event` ENABLE KEYS */; UNLOCK TABLES; @@ -17875,7 +17883,7 @@ INSERT INTO `spell_bonus_data` VALUES ('27243', '0.22', '0.25', '0', 'Warlock - Seed of Corruption'), ('30108', '0', '0.24', '0', 'Warlock - Unstable Affliction'), ('31117', '1.8', '0', '0', 'Warlock - Unstable Affliction Dispell'), -('17962', '0.4286', '0', '0', 'Warlock - Conflagrate'), +('17962', '0', '0', '0', 'Warlock - Conflagrate'), ('6789', '0.22', '0', '0', 'Warlock - Death Coil'), ('28176', '0', '0', '0', 'Warlock - Fel Armor'), ('48181', '0.4729', '0', '0', 'Warlock - Haunt'), diff --git a/sql/mangos_spell_check.sql b/sql/mangos_spell_check.sql index 3a2078fc102..019424bebd6 100644 --- a/sql/mangos_spell_check.sql +++ b/sql/mangos_spell_check.sql @@ -312,6 +312,7 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas ( 0,11,0x0000000000002000,0x00000000, -1, -1, -1, 3, -1,-1,'Healing Stream Totem', 'Spell::EffectDummy'), ( 0, 4,0x0000000100000000,0x00000000, -1, -1, -1, 2, -1,-1,'Heroic Throw', 'Spell::EffectSchoolDMG'), ( 0,10, -1, -1, 156, -1, -1, 3, -1,-1,'Holy Shock', 'Spell::EffectDummy'), +( 0, 5,0x0000000000000004,0x00000000, -1, -1, -1, -1, 3,-1,'Immolate', 'Spell::EffectSchoolDMG'), (0, 5, -1, -1, 208, -1, -1, -1, 4,-1,'Improved Life Tap', 'Spell::EffectDummy'), ( 0, 5,0x0000004000000000,0x00000000,2128, -1, -1, 2, -1,-1,'Incinerate', 'Spell::EffectSchoolDMG'), ( 0, 8,0x0000000000002000,0x00000000, -1, -1, -1, 2, -1,-1,'Instant Poison', 'Spell::EffectSchoolDMG'), @@ -333,6 +334,7 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas ( 0, 4,0x0000000000000400,0x00000000, -1, -1, -1, 2, -1,-1,'Revenge', 'Spell::EffectSchoolDMG'), ( 0,11,0x0000000000400000,0x00000000, -1, -1, -1, 3, -1,-1,'Rockbiter Weapon', 'Spell::EffectDummy'), ( 0, 6,0x0000000200000000,0x00000000, -1, -1, -1, 2, -1,-1,'Shadow Word: Death', 'Spell::EffectSchoolDMG'), +( 0, 5,0x0000000000000000,0x00000002, -1, -1, -1, -1, 3,-1,'Shadowflame', 'Spell::EffectSchoolDMG'), ( 0,10,0x0010000000000000,0x00000000, -1, -1, -1, 2, -1,-1,'Shield of Righteousness', 'Spell::EffectSchoolDMG'), ( 0, 4,0x0000020000000000,0x00000000, -1, -1,1209, 2, -1,-1,'Shield Slam', 'Spell::EffectSchoolDMG'), ( 0, 4,0x0000800000000000,0x00000000, -1, -1, -1, 2, -1,-1,'Shockwave', 'Spell::EffectSchoolDMG'), -- cgit v1.2.3 From b6c0f72b1350b76da6add2781ff54e343eaf2c48 Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 24 Jul 2009 09:59:33 +0800 Subject: *Do not let Incinerate has extra damage for Shadowflame Author: rechapa79 --HG-- branch : trunk --- sql/mangos_spell_check.sql | 9 ++++++++- src/game/SharedDefines.h | 2 +- src/game/SpellAuras.cpp | 11 +++++++---- src/game/SpellEffects.cpp | 31 ++++++++++++++++++++++++------- 4 files changed, 40 insertions(+), 13 deletions(-) (limited to 'sql') diff --git a/sql/mangos_spell_check.sql b/sql/mangos_spell_check.sql index 019424bebd6..73c84ee6701 100644 --- a/sql/mangos_spell_check.sql +++ b/sql/mangos_spell_check.sql @@ -236,6 +236,8 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (47633,-1, -1, -1, -1, -1, -1, 10, -1, 0,'Death Coil', 'Spell::EffectDummy'), (47757,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Penance', 'Spell::EffectDummy'), (47758,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Penance', 'Spell::EffectDummy'), +(47897, 5,0x0001000000000000,0x00000000, -1, -1, -1, 2, -1,-1,'Shadowflame', 'Spell::EffectSchoolDMG'), +(47960,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Shadowflame', 'Spell::EffectSchoolDMG'), (48820,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Holy Shock', 'Spell::EffectDummy'), (48821,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Holy Shock', 'Spell::EffectDummy'), (48822,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Holy Shock', 'Spell::EffectDummy'), @@ -277,6 +279,7 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (54861,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Nitro Boosts', 'Spell::EffectDummy'), (55004, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Nitro Boosts', 'Spell::EffectDummy'), (55441,11, -1, -1, -1, -1, -1, -1, 4,-1,'Glyph of Mana Tide', 'Spell::EffectDummy'), +(56235,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Glyph of Conflagrate', 'Spell::EffectSchoolDMG'), (57946, 5,0x0000000000040000,0x00000000, -1, -1, -1, 3, -1,-1,'Life Tap', 'Spell::EffectDummy'), (58367,-1, -1, -1, -1, -1, -1, -1, 4,-1,'Glyph of Execution', 'Spell::EffectDummy'), (58418, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Portal to Orgrimmar', 'Spell::EffectDummy'), @@ -285,7 +288,10 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (59645,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Underbelly Elixir', 'Spell::EffectDummy'), (59831,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Underbelly Elixir', 'Spell::EffectDummy'), (59843,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Underbelly Elixir', 'Spell::EffectDummy'), +(61290, 5,0x0001000000000000,0x00000000, -1, -1, -1, 2, -1,-1,'Shadowflame', 'Spell::EffectSchoolDMG'), +(61291,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Shadowflame', 'Spell::EffectSchoolDMG'), (61491, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Intercept', 'Spell::EffectSchoolDMG'), + /* sorted by spell names */ /*id fm familyMaskA fmMaskB icon vis cat eff aur ef name code */ ( 0, 3,0x0000000020000000,0x00000000, -1, -1, -1, 2, -1,-1,'Arcane Blast', 'Spell::EffectSchoolDMG'), @@ -334,7 +340,8 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas ( 0, 4,0x0000000000000400,0x00000000, -1, -1, -1, 2, -1,-1,'Revenge', 'Spell::EffectSchoolDMG'), ( 0,11,0x0000000000400000,0x00000000, -1, -1, -1, 3, -1,-1,'Rockbiter Weapon', 'Spell::EffectDummy'), ( 0, 6,0x0000000200000000,0x00000000, -1, -1, -1, 2, -1,-1,'Shadow Word: Death', 'Spell::EffectSchoolDMG'), -( 0, 5,0x0000000000000000,0x00000002, -1, -1, -1, -1, 3,-1,'Shadowflame', 'Spell::EffectSchoolDMG'), +( 0, 5,0x0000000000000000,0x00000002, -1, -1, -1, -1, 3,-1,'Shadowflame', 'Spell::EffectSchoolDMG'), /* dot */ +( 0, 5,0x0001000000000000,0x00000000, -1, -1, -1, 2, -1,-1,'Shadowflame', 'Spell::EffectSchoolDMG'), /* explcit damage */ ( 0,10,0x0010000000000000,0x00000000, -1, -1, -1, 2, -1,-1,'Shield of Righteousness', 'Spell::EffectSchoolDMG'), ( 0, 4,0x0000020000000000,0x00000000, -1, -1,1209, 2, -1,-1,'Shield Slam', 'Spell::EffectSchoolDMG'), ( 0, 4,0x0000800000000000,0x00000000, -1, -1, -1, 2, -1,-1,'Shockwave', 'Spell::EffectSchoolDMG'), diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 748e81e89e0..b4e9940e0b7 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -908,7 +908,7 @@ enum AuraState //AURA_STATE_UNKNOWN11 = 11, // t| AURA_STATE_FAERIE_FIRE = 12, // c t| AURA_STATE_HEALTHLESS_35_PERCENT = 13, // C T | - AURA_STATE_IMMOLATE = 14, // T | + AURA_STATE_CONFLAGRATE = 14, // T | AURA_STATE_SWIFTMEND = 15, // T | AURA_STATE_DEADLY_POISON = 16, // T | AURA_STATE_ENRAGE = 17, // C | diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index e027632328d..5f9a3d6eeae 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1203,10 +1203,13 @@ void Aura::_AddAura() if (IsSealSpell(m_spellProto)) SetAuraState(AURA_STATE_JUDGEMENT); - // Conflagrate aura state on Immolate or Shadowflame - if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARLOCK && (m_spellProto->SpellFamilyFlags[0] & 4 - || m_spellProto->SpellFamilyFlags[2] & 2)) - SetAuraState(AURA_STATE_IMMOLATE); + // Conflagrate aura state on Immolate and Shadowflame + if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARLOCK && + // Immolate + ((m_spellProto->SpellFamilyFlags[0] & 4) || + // Shadowflame + (m_spellProto->SpellFamilyFlags[2] & 2))) + SetAuraState(AURA_STATE_CONFLAGRATE); // Faerie Fire (druid versions) if (m_spellProto->SpellFamilyName == SPELLFAMILY_DRUID && m_spellProto->SpellFamilyFlags[0] & 0x400) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 67e1c88c7ef..f60d04a7ff2 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -444,19 +444,36 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx) // Incinerate Rank 1 & 2 if((m_spellInfo->SpellFamilyFlags[1] & 0x000040) && m_spellInfo->SpellIconID==2128) { - // Incinerate does more dmg (dmg*0.25) if the target is Immolated. - if(unitTarget->HasAuraState(AURA_STATE_IMMOLATE, m_spellInfo, m_caster)) - damage += int32(damage*0.25f); + // Incinerate does more dmg (dmg*0.25) if the target have Immolate debuff. + // Check aura state for speed but aura state set not only for Immolate spell + if(unitTarget->HasAuraState(AURA_STATE_CONFLAGRATE, m_spellInfo, m_caster)) + { + Unit::AuraEffectList const& RejorRegr = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE); + for(Unit::AuraEffectList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i) + { + // Immolate + if((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && + ((*i)->GetSpellProto()->SpellFamilyFlags[0] & 0x4)) + { + damage += damage/4; + break; + } + } + } } - // Conflagrate - consumes immolate or shadowflame - else if (m_spellInfo->TargetAuraState == AURA_STATE_IMMOLATE) + // Conflagrate - consumes Immolate or Shadowflame + else if (m_spellInfo->TargetAuraState == AURA_STATE_CONFLAGRATE) { // for caster applied auras only Unit::AuraEffectList const &mPeriodic = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE); for(Unit::AuraEffectList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i) { - if( (*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && ((*i)->GetSpellProto()->SpellFamilyFlags[0] & 4 || (*i)->GetSpellProto()->SpellFamilyFlags[2] & 2) && - (*i)->GetCasterGUID()==m_caster->GetGUID() ) + if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && + (*i)->GetCasterGUID()==m_caster->GetGUID() && + // Immolate + ((*i)->GetSpellProto()->SpellFamilyFlags[0] & 4 || + // Shadowflame + (*i)->GetSpellProto()->SpellFamilyFlags[2] & 2)) { uint32 pdamage = (*i)->GetAmount() > 0 ? (*i)->GetAmount() : 0; pdamage = m_caster->SpellDamageBonus(unitTarget, (*i)->GetSpellProto(), pdamage, DOT, (*i)->GetParentAura()->GetStackAmount()); -- cgit v1.2.3 From 4f7e94ace27126cb272924f1f809635032edca97 Mon Sep 17 00:00:00 2001 From: Kudlaty Date: Fri, 24 Jul 2009 06:16:31 +0200 Subject: Merge [SD2] r1095 Correct one spellId in hyjal - skip r1096 Remove more grid search code from scripts and use functions. r1097 Remove obsolete functions redefined in 1094 r1098 Added text for bosses in map 615 r1099 Added instance script for map 615 --HG-- branch : trunk --- sql/FULL/world_script_texts.sql | 50 ++++++++++++++ sql/FULL/world_scripts_full.sql | 3 + src/bindings/scripts/CMakeLists.txt | 2 + src/bindings/scripts/ScriptMgr.cpp | 6 ++ src/bindings/scripts/VC80/80ScriptDev2.vcproj | 12 ++++ src/bindings/scripts/VC90/90ScriptDev2.vcproj | 12 ++++ .../zone/obsidian_sanctum/def_obsidian_sanctum.h | 16 +++++ .../obsidian_sanctum/instance_obsidian_sanctum.cpp | 77 ++++++++++++++++++++++ .../zone/temple_of_ahnqiraj/boss_twinemperors.cpp | 34 ++-------- src/shared/Errors.h | 4 ++ 10 files changed, 188 insertions(+), 28 deletions(-) (limited to 'sql') diff --git a/sql/FULL/world_script_texts.sql b/sql/FULL/world_script_texts.sql index bfdfae626c2..d5efe5ad1f9 100644 --- a/sql/FULL/world_script_texts.sql +++ b/sql/FULL/world_script_texts.sql @@ -1690,6 +1690,56 @@ INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content (-1585028, 'Do not... get too comfortable.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12420, 1, 0, 0, 'kaelthas MT SAY_RECAST_GRAVITY'), (-1585029, 'My demise accomplishes nothing! The Master will have you! You will drown in your own blood! This world shall burn! Aaaghh!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12421, 1, 0, 0, 'kaelthas MT SAY_DEATH'); +-- -1 615 000 OBSIDIAN SANCTUM +INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES +(-1615000,'I fear nothing! Least of all you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14111,1,0,0,'shadron SAY_SHADRON_AGGRO'), +(-1615001,'You are insignificant!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14112,1,0,0,'shadron SAY_SHADRON_SLAY_1'), +(-1615002,'Such mediocre resistance!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14113,1,0,0,'shadron SAY_SHADRON_SLAY_2'), +(-1615003,'We...are superior! How could this...be...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14118,1,0,0,'shadron SAY_SHADRON_DEATH'), +(-1615004,'You are easily bested! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14114,1,0,0,'shadron SAY_SHADRON_BREATH'), +(-1615005,'I will take pity on you Sartharion, just this once.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14117,1,0,0,'shadron SAY_SHADRON_RESPOND'), +(-1615006,'Father tought me well!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14115,1,0,0,'shadron SAY_SHADRON_SPECIAL_1'), +(-1615007,'On your knees!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14116,1,0,0,'shadron SAY_SHADRON_SPECIAL_2'), +(-1615008,'A Shadron Disciple appears in the Twilight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,5,0,0,'shadron WHISPER_SHADRON_DICIPLE'), + +(-1615009,'You have no place here. Your place is among the departed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14122,1,0,0,'tenebron SAY_TENEBRON_AGGRO'), +(-1615010,'No contest.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14123,1,0,0,'tenebron SAY_TENEBRON_SLAY_1'), +(-1615011,'Typical... Just as I was having fun.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14124,1,0,0,'tenebron SAY_TENEBRON_SLAY_2'), +(-1615012,'I should not... have held back...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14129,1,0,0,'tenebron SAY_TENEBRON_DEATH'), +(-1615013,'To darkness I condemn you...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14125,1,0,0,'tenebron SAY_TENEBRON_BREATH'), +(-1615014,'It is amusing to watch you struggle. Very well, witness how it is done.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14128,1,0,0,'tenebron SAY_TENEBRON_RESPOND'), +(-1615015,'Arrogant little creatures! To challenge powers you do not yet understand...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14126,1,0,0,'tenebron SAY_TENEBRON_SPECIAL_1'), +(-1615016,'I am no mere dragon! You will find I am much, much, more...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14127,1,0,0,'tenebron SAY_TENEBRON_SPECIAL_2'), +(-1615017,'%s begins to hatch eggs in the twilight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,5,0,0,'tenebron WHISPER_HATCH_EGGS'), + +(-1615018,'It is my charge to watch over these eggs. I will see you burn before any harm comes to them!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14093,1,0,0,'sartharion SAY_SARTHARION_AGGRO'), +(-1615019,'This pathetic siege ends NOW!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14103,1,0,0,'sartharion SAY_SARTHARION_BERSERK'), +(-1615020,'Burn, you miserable wretches!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14098, 1,0,0,'sartharion SAY_SARTHARION_BREATH'), +(-1615021,'Shadron! Come to me, all is at risk!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14105,1,0,0,'sartharion SARTHARION_CALL_SHADRON'), +(-1615022,'Tenebron! The eggs are yours to protect as well!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14106,1,0,0,'sartharion SAY_SARTHARION_CALL_TENEBRON'), +(-1615023,'Vesperon! The clutch is in danger! Assist me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14104,1,0,0,'sartharion SAY_SARTHARION_CALL_VESPERON'), +(-1615024,'Such is the price... of failure...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14107,1,0,0,'sartharion SAY_SARTHARION_DEATH'), +(-1615025,'Such flammable little insects....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14099,1,0,0,'sartharion SAY_SARTHARION_SPECIAL_1'), +(-1615026,'Your charred bones will litter the floor!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14100,1,0,0,'sartharion SAY_SARTHARION_SPECIAL_2'), +(-1615027,'How much heat can you take?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14101,1,0,0,'sartharion SAY_SARTHARION_SPECIAL_3'), +(-1615028,'All will be reduced to ash!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14102,1,0,0,'sartharion SAY_SARTHARION_SPECIAL_4'), +(-1615029,'You will make a fine meal for the hatchlings.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14094,1,0,0,'sartharion SAY_SARTHARION_SLAY_1'), +(-1615030,'You are the grave disadvantage.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14096,1,0,0,'sartharion SAY_SARTHARION_SLAY_2'), +(-1615031,'This is why we call you lesser beeings.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14097,1,0,0,'sartharion SAY_SARTHARION_SLAY_3'), +(-1615032,'The lava surrounding %s churns!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,5,0,0,'sartharion WHISPER_LAVA_CHURN'), + +(-1615033,'You pose no threat, lesser beings...give me your worst!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14133,1,0,0,'vesperon SAY_VESPERON_AGGRO'), +(-1615034,'The least you could do is put up a fight...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14134,1,0,0,'vesperon SAY_VESPERON_SLAY_1'), +(-1615035,'Was that the best you can do?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14135,1,0,0,'vesperon SAY_VESPERON_SLAY_2'), +(-1615036,'I still have some...fight..in...me...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14140,1,0,0,'vesperon SAY_VESPERON_DEATH'), +(-1615037,'I will pick my teeth with your bones!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14136,1,0,0,'vesperon SAY_VESPERON_BREATH'), +(-1615038,'Father was right about you, Sartharion...You are a weakling!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14139,1,0,0,'vesperon SAY_VESPERON_RESPOND'), +(-1615039,'Aren\'t you tricky...I have a few tricks of my own...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14137,1,0,0,'vesperon SAY_VESPERON_SPECIAL_1'), +(-1615040,'Unlike, I have many talents.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14138,1,0,0,'vesperon SAY_VESPERON_SPECIAL_2'), +(-1615041,'A Vesperon Disciple appears in the Twilight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,5,0,0,'shadron WHISPER_VESPERON_DICIPLE'), + +(-1615042,'%s begins to open a Twilight Portal!',0,5,0,0,'sartharion drake WHISPER_OPEN_PORTAL'); + -- -1 645 000 ??? INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES (-1645006, 'Let the trial begin, Bloodwrath, attack!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'master_kelerun_bloodmourn YELL_PHASE'), diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql index 1ff50664213..9cd579b4da7 100644 --- a/sql/FULL/world_scripts_full.sql +++ b/sql/FULL/world_scripts_full.sql @@ -702,6 +702,9 @@ UPDATE `creature_template` SET `ScriptName`='mob_crystal_spike' WHERE `entry`=27 UPDATE `creature_template` SET `ScriptName`='mob_crystalline_tangler' WHERE `entry`=32665; UPDATE `creature_template` SET `ScriptName`='boss_keristrasza' WHERE `entry`=26723; +/* OBSIDIAN SANCTUM */ +UPDATE `instance_template` SET `script`='instance_obsidian_sanctum' WHERE map=615; + /* ONYXIA'S LAIR */ UPDATE `creature_template` SET `ScriptName`='boss_onyxia' WHERE `entry`=10184; diff --git a/src/bindings/scripts/CMakeLists.txt b/src/bindings/scripts/CMakeLists.txt index 3dcd38fa256..e4375732161 100644 --- a/src/bindings/scripts/CMakeLists.txt +++ b/src/bindings/scripts/CMakeLists.txt @@ -246,6 +246,8 @@ SET(trinityscript_LIB_SRCS scripts/zone/naxxramas/def_naxxramas.h scripts/zone/naxxramas/instance_naxxramas.cpp scripts/zone/netherstorm/netherstorm.cpp + scripts/zone/obsidian_sanctum/def_obsidian_sanctum.h + scripts/zone/obsidian_sanctum/instance_obsidian_sanctum.cpp scripts/zone/onyxias_lair/boss_onyxia.cpp scripts/zone/orgrimmar/orgrimmar.cpp scripts/zone/razorfen_downs/boss_amnennar_the_coldbringer.cpp diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index 3dbdd4899a1..a7a57818df7 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -414,6 +414,9 @@ extern void AddSC_boss_ormorok(); extern void AddSC_boss_keristrasza(); extern void AddSC_instance_nexus(); +//Obsidian Sanctum +extern void AddSC_instance_obsidian_sanctum(); + //Onyxia's Lair extern void AddSC_boss_onyxia(); @@ -1315,6 +1318,9 @@ void ScriptsInit(char const* cfg_file = "trinitycore.conf") AddSC_boss_keristrasza(); AddSC_instance_nexus(); + //Obsidian Sanctum + AddSC_instance_obsidian_sanctum(); + //Onyxia's Lair AddSC_boss_onyxia(); diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj index a615d579f4c..fde415501c0 100644 --- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj +++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj @@ -2818,6 +2818,18 @@ + + + + + + diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj index effb6e84d13..958a0bf0eae 100644 --- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj +++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj @@ -2819,6 +2819,18 @@ + + + + + + diff --git a/src/bindings/scripts/scripts/zone/obsidian_sanctum/def_obsidian_sanctum.h b/src/bindings/scripts/scripts/zone/obsidian_sanctum/def_obsidian_sanctum.h index 59d76502af3..461834a2386 100644 --- a/src/bindings/scripts/scripts/zone/obsidian_sanctum/def_obsidian_sanctum.h +++ b/src/bindings/scripts/scripts/zone/obsidian_sanctum/def_obsidian_sanctum.h @@ -1,4 +1,20 @@ #ifndef DEF_OBSIDIAN_SANCTUM_H #define DEF_OBSIDIAN_SANCTUM_H +enum +{ + TYPE_SARTHARION_EVENT = 1, + + DATA_SARTHARION = 10, + DATA_TENEBRON = 11, + DATA_SHADRON = 12, + DATA_VESPERON = 13, + + NPC_SARTHARION = 28860, + NPC_TENEBRON = 30452, + NPC_SHADRON = 30451, + NPC_VESPERON = 30449, + GO_TWILIGHT_PORTAL = 193988 +}; + #endif diff --git a/src/bindings/scripts/scripts/zone/obsidian_sanctum/instance_obsidian_sanctum.cpp b/src/bindings/scripts/scripts/zone/obsidian_sanctum/instance_obsidian_sanctum.cpp index 898574c99eb..72166261684 100644 --- a/src/bindings/scripts/scripts/zone/obsidian_sanctum/instance_obsidian_sanctum.cpp +++ b/src/bindings/scripts/scripts/zone/obsidian_sanctum/instance_obsidian_sanctum.cpp @@ -1,9 +1,86 @@ #include "precompiled.h" #include "def_obsidian_sanctum.h" +#define ENCOUNTERS 1 + +/* Obsidian Sanctum encounters: +0 - Sartharion +*/ + struct TRINITY_DLL_DECL instance_obsidian_sanctum : public ScriptedInstance { instance_obsidian_sanctum(Map *Map) : ScriptedInstance(Map) {Initialize();}; + + uint32 m_uiEncounter[ENCOUNTERS]; + uint64 m_uiSartharionGUID; + uint64 m_uiTenebronGUID; + uint64 m_uiShadronGUID; + uint64 m_uiVesperonGUID; + + void Initialize() + { + m_uiSartharionGUID = 0; + m_uiTenebronGUID = 0; + m_uiShadronGUID = 0; + m_uiVesperonGUID = 0; + + for(uint8 i = 0; i < ENCOUNTERS; ++i) + m_uiEncounter[i] = NOT_STARTED; + } + + void OnCreatureCreate(Creature* pCreature, uint32 entry) + { + switch(pCreature->GetEntry()) + { + case NPC_SARTHARION: + m_uiSartharionGUID = pCreature->GetGUID(); + break; + //three dragons below set to active state once created. + //we must expect bigger raid to encounter main boss, and then three dragons must be active due to grid differences + case NPC_TENEBRON: + m_uiTenebronGUID = pCreature->GetGUID(); + pCreature->setActive(true); + break; + case NPC_SHADRON: + m_uiShadronGUID = pCreature->GetGUID(); + pCreature->setActive(true); + break; + case NPC_VESPERON: + m_uiVesperonGUID = pCreature->GetGUID(); + pCreature->setActive(true); + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + if (uiType == TYPE_SARTHARION_EVENT) + m_uiEncounter[0] = uiData; + } + + uint32 GetData(uint32 uiType) + { + if (uiType == TYPE_SARTHARION_EVENT) + return m_uiEncounter[0]; + + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_SARTHARION: + return m_uiSartharionGUID; + case DATA_TENEBRON: + return m_uiTenebronGUID; + case DATA_SHADRON: + return m_uiShadronGUID; + case DATA_VESPERON: + return m_uiVesperonGUID; + } + return 0; + } }; InstanceData* GetInstanceData_instance_obsidian_sanctum(Map* map) diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_twinemperors.cpp b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_twinemperors.cpp index 3089f3267c8..9449524412c 100644 --- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -312,40 +312,18 @@ struct TRINITY_DLL_DECL boss_twinemperorsAI : public ScriptedAI } } - class AnyBugCheck - { - public: - AnyBugCheck(WorldObject const* obj, float range) : i_obj(obj), i_range(range) {} - bool operator()(Creature* u) - { - Creature *c = u; - if (!i_obj->IsWithinDistInMap(c, i_range)) - return false; - return (c->GetEntry() == 15316 || c->GetEntry() == 15317); - } - private: - WorldObject const* i_obj; - float i_range; - }; - Creature *RespawnNearbyBugsAndGetOne() { - CellPair p(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); - Cell cell(p); - cell.data.Part.reserved = ALL_DISTRICT; - cell.SetNoCreate(); - - std::list unitList; + std::list lUnitList; + m_creature->GetCreatureListWithEntryInGrid(lUnitList,15316,150.0f); + m_creature->GetCreatureListWithEntryInGrid(lUnitList,15317,150.0f); - AnyBugCheck u_check(m_creature, 150); - Trinity::CreatureListSearcher searcher(m_creature, unitList, u_check); - TypeContainerVisitor, GridTypeMapContainer > grid_creature_searcher(searcher); - CellLock cell_lock(cell, p); - cell_lock->Visit(cell_lock, grid_creature_searcher, *(m_creature->GetMap())); + if (lUnitList.empty()) + return NULL; Creature *nearb = NULL; - for(std::list::iterator iter = unitList.begin(); iter != unitList.end(); ++iter) + for(std::list::iterator iter = lUnitList.begin(); iter != lUnitList.end(); ++iter) { Creature *c = *iter; if (c) diff --git a/src/shared/Errors.h b/src/shared/Errors.h index 992b1752a0f..5cfd109ee01 100644 --- a/src/shared/Errors.h +++ b/src/shared/Errors.h @@ -23,6 +23,10 @@ #include "Common.h" +#ifndef HAVE_CONFIG_H +#define HAVE_ACE_STACK_TRACE_H 1 +#endif + #ifdef HAVE_ACE_STACK_TRACE_H #include "ace/Stack_Trace.h" #endif -- cgit v1.2.3 From 224e38e136ed60ab8308a3351c1d4f8780572b96 Mon Sep 17 00:00:00 2001 From: Kudlaty Date: Fri, 24 Jul 2009 06:17:12 +0200 Subject: Add missing sql updates --HG-- branch : trunk --- sql/updates/4572_script_texts.sql | 49 +++++++++++++++++++++++++++++++++++++++ sql/updates/4572_world_script.sql | 1 + 2 files changed, 50 insertions(+) create mode 100644 sql/updates/4572_script_texts.sql create mode 100644 sql/updates/4572_world_script.sql (limited to 'sql') diff --git a/sql/updates/4572_script_texts.sql b/sql/updates/4572_script_texts.sql new file mode 100644 index 00000000000..1e4d1f3c261 --- /dev/null +++ b/sql/updates/4572_script_texts.sql @@ -0,0 +1,49 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1615042 AND -1615000; +INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES +(-1615000,'I fear nothing! Least of all you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14111,1,0,0,'shadron SAY_SHADRON_AGGRO'), +(-1615001,'You are insignificant!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14112,1,0,0,'shadron SAY_SHADRON_SLAY_1'), +(-1615002,'Such mediocre resistance!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14113,1,0,0,'shadron SAY_SHADRON_SLAY_2'), +(-1615003,'We...are superior! How could this...be...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14118,1,0,0,'shadron SAY_SHADRON_DEATH'), +(-1615004,'You are easily bested! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14114,1,0,0,'shadron SAY_SHADRON_BREATH'), +(-1615005,'I will take pity on you Sartharion, just this once.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14117,1,0,0,'shadron SAY_SHADRON_RESPOND'), +(-1615006,'Father tought me well!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14115,1,0,0,'shadron SAY_SHADRON_SPECIAL_1'), +(-1615007,'On your knees!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14116,1,0,0,'shadron SAY_SHADRON_SPECIAL_2'), +(-1615008,'A Shadron Disciple appears in the Twilight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,5,0,0,'shadron WHISPER_SHADRON_DICIPLE'), + +(-1615009,'You have no place here. Your place is among the departed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14122,1,0,0,'tenebron SAY_TENEBRON_AGGRO'), +(-1615010,'No contest.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14123,1,0,0,'tenebron SAY_TENEBRON_SLAY_1'), +(-1615011,'Typical... Just as I was having fun.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14124,1,0,0,'tenebron SAY_TENEBRON_SLAY_2'), +(-1615012,'I should not... have held back...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14129,1,0,0,'tenebron SAY_TENEBRON_DEATH'), +(-1615013,'To darkness I condemn you...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14125,1,0,0,'tenebron SAY_TENEBRON_BREATH'), +(-1615014,'It is amusing to watch you struggle. Very well, witness how it is done.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14128,1,0,0,'tenebron SAY_TENEBRON_RESPOND'), +(-1615015,'Arrogant little creatures! To challenge powers you do not yet understand...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14126,1,0,0,'tenebron SAY_TENEBRON_SPECIAL_1'), +(-1615016,'I am no mere dragon! You will find I am much, much, more...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14127,1,0,0,'tenebron SAY_TENEBRON_SPECIAL_2'), +(-1615017,'%s begins to hatch eggs in the twilight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,5,0,0,'tenebron WHISPER_HATCH_EGGS'), + +(-1615018,'It is my charge to watch over these eggs. I will see you burn before any harm comes to them!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14093,1,0,0,'sartharion SAY_SARTHARION_AGGRO'), +(-1615019,'This pathetic siege ends NOW!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14103,1,0,0,'sartharion SAY_SARTHARION_BERSERK'), +(-1615020,'Burn, you miserable wretches!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14098, 1,0,0,'sartharion SAY_SARTHARION_BREATH'), +(-1615021,'Shadron! Come to me, all is at risk!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14105,1,0,0,'sartharion SARTHARION_CALL_SHADRON'), +(-1615022,'Tenebron! The eggs are yours to protect as well!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14106,1,0,0,'sartharion SAY_SARTHARION_CALL_TENEBRON'), +(-1615023,'Vesperon! The clutch is in danger! Assist me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14104,1,0,0,'sartharion SAY_SARTHARION_CALL_VESPERON'), +(-1615024,'Such is the price... of failure...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14107,1,0,0,'sartharion SAY_SARTHARION_DEATH'), +(-1615025,'Such flammable little insects....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14099,1,0,0,'sartharion SAY_SARTHARION_SPECIAL_1'), +(-1615026,'Your charred bones will litter the floor!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14100,1,0,0,'sartharion SAY_SARTHARION_SPECIAL_2'), +(-1615027,'How much heat can you take?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14101,1,0,0,'sartharion SAY_SARTHARION_SPECIAL_3'), +(-1615028,'All will be reduced to ash!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14102,1,0,0,'sartharion SAY_SARTHARION_SPECIAL_4'), +(-1615029,'You will make a fine meal for the hatchlings.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14094,1,0,0,'sartharion SAY_SARTHARION_SLAY_1'), +(-1615030,'You are the grave disadvantage.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14096,1,0,0,'sartharion SAY_SARTHARION_SLAY_2'), +(-1615031,'This is why we call you lesser beeings.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14097,1,0,0,'sartharion SAY_SARTHARION_SLAY_3'), +(-1615032,'The lava surrounding %s churns!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,5,0,0,'sartharion WHISPER_LAVA_CHURN'), + +(-1615033,'You pose no threat, lesser beings...give me your worst!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14133,1,0,0,'vesperon SAY_VESPERON_AGGRO'), +(-1615034,'The least you could do is put up a fight...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14134,1,0,0,'vesperon SAY_VESPERON_SLAY_1'), +(-1615035,'Was that the best you can do?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14135,1,0,0,'vesperon SAY_VESPERON_SLAY_2'), +(-1615036,'I still have some...fight..in...me...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 14140,1,0,0,'vesperon SAY_VESPERON_DEATH'), +(-1615037,'I will pick my teeth with your bones!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14136,1,0,0,'vesperon SAY_VESPERON_BREATH'), +(-1615038,'Father was right about you, Sartharion...You are a weakling!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14139,1,0,0,'vesperon SAY_VESPERON_RESPOND'), +(-1615039,'Aren\'t you tricky...I have a few tricks of my own...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14137,1,0,0,'vesperon SAY_VESPERON_SPECIAL_1'), +(-1615040,'Unlike, I have many talents.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14138,1,0,0,'vesperon SAY_VESPERON_SPECIAL_2'), +(-1615041,'A Vesperon Disciple appears in the Twilight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,5,0,0,'shadron WHISPER_VESPERON_DICIPLE'), + +(-1615042,'%s begins to open a Twilight Portal!',0,5,0,0,'sartharion drake WHISPER_OPEN_PORTAL'); diff --git a/sql/updates/4572_world_script.sql b/sql/updates/4572_world_script.sql new file mode 100644 index 00000000000..f34a407ab17 --- /dev/null +++ b/sql/updates/4572_world_script.sql @@ -0,0 +1 @@ +UPDATE instance_template SET script='instance_obsidian_sanctum' WHERE map=615; -- cgit v1.2.3 From 779a0c1b0d983bfe4766baae2d3c4d505eebb403 Mon Sep 17 00:00:00 2001 From: Kudlaty Date: Fri, 24 Jul 2009 11:50:28 +0200 Subject: Fix typo. Thx to X-Savior for poiting --HG-- branch : trunk --- sql/FULL/world_script_texts.sql | 2 +- sql/updates/4572_script_texts.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sql') diff --git a/sql/FULL/world_script_texts.sql b/sql/FULL/world_script_texts.sql index d5efe5ad1f9..dd083aa1dfa 100644 --- a/sql/FULL/world_script_texts.sql +++ b/sql/FULL/world_script_texts.sql @@ -1738,7 +1738,7 @@ INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content (-1615040,'Unlike, I have many talents.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14138,1,0,0,'vesperon SAY_VESPERON_SPECIAL_2'), (-1615041,'A Vesperon Disciple appears in the Twilight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,5,0,0,'shadron WHISPER_VESPERON_DICIPLE'), -(-1615042,'%s begins to open a Twilight Portal!',0,5,0,0,'sartharion drake WHISPER_OPEN_PORTAL'); +(-1615042,'%s begins to open a Twilight Portal!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,5,0,0,'sartharion drake WHISPER_OPEN_PORTAL'); -- -1 645 000 ??? INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES diff --git a/sql/updates/4572_script_texts.sql b/sql/updates/4572_script_texts.sql index 1e4d1f3c261..d9c4a644c92 100644 --- a/sql/updates/4572_script_texts.sql +++ b/sql/updates/4572_script_texts.sql @@ -46,4 +46,4 @@ INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content (-1615040,'Unlike, I have many talents.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14138,1,0,0,'vesperon SAY_VESPERON_SPECIAL_2'), (-1615041,'A Vesperon Disciple appears in the Twilight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,5,0,0,'shadron WHISPER_VESPERON_DICIPLE'), -(-1615042,'%s begins to open a Twilight Portal!',0,5,0,0,'sartharion drake WHISPER_OPEN_PORTAL'); +(-1615042,'%s begins to open a Twilight Portal!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,5,0,0,'sartharion drake WHISPER_OPEN_PORTAL'); -- cgit v1.2.3 From 261e75c9cf048b450e82e75cb884581c029613d3 Mon Sep 17 00:00:00 2001 From: Kudlaty Date: Fri, 24 Jul 2009 22:42:17 +0200 Subject: Merge [SD2] r1100 Added basic AI definitions for boss sartharion (with adds, using a common AI for certain events) and intro calling drakes r1101 Correcting a few details and simplify call drakes for boss sartharion Add boss and mini-boss' abilities and add more common events to common drakes AI r1102 Drop support for Windows VC71 (2003) (ref Mangos rev 7865) r1103 Added support for quest 6481 (summon npc 11920) r1104 Restore compile after change in OnCreatureCreate(). Require Mangos 7871+ - skip (we don't merge 7871?) r1105 Remove code related to taunt immune. creature_template.flags_extra(CREATURE_FLAG_EXTRA_NOT_TAUNTABLE) must be used instead where creature should always be immune. --HG-- branch : trunk --- sql/FULL/world_scripts_full.sql | 9 + sql/updates/4577_world_scripts.sql | 10 + src/bindings/scripts/VC80/80ScriptDev2.vcproj | 12 - src/bindings/scripts/VC90/90ScriptDev2.vcproj | 12 - src/bindings/scripts/scripts/go/go_scripts.cpp | 25 +- .../blackwing_lair/boss_broodlord_lashlayer.cpp | 3 - .../scripts/zone/blackwing_lair/boss_nefarian.cpp | 3 - .../scripts/zone/blackwing_lair/boss_razorgore.cpp | 3 - .../zone/blackwing_lair/boss_vaelastrasz.cpp | 3 - .../caverns_of_time/dark_portal/boss_temporus.cpp | 5 +- .../scripts/zone/gruuls_lair/boss_gruul.cpp | 3 - .../shattered_halls/boss_warbringer_omrogg.cpp | 3 - .../scripts/scripts/zone/karazhan/boss_curator.cpp | 2 - .../scripts/zone/karazhan/boss_midnight.cpp | 3 - .../zone/obsidian_sanctum/boss_sartharion.cpp | 1170 +++++++++++++++++--- .../scripts/zone/onyxias_lair/boss_onyxia.cpp | 3 - .../temple_of_ahnqiraj/mob_anubisath_sentinel.cpp | 8 - .../scripts/scripts/zone/zulgurub/boss_marli.cpp | 3 - src/shared/Errors.h | 4 - 19 files changed, 1037 insertions(+), 247 deletions(-) create mode 100644 sql/updates/4577_world_scripts.sql (limited to 'sql') diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql index 9cd579b4da7..71d430a6f02 100644 --- a/sql/FULL/world_scripts_full.sql +++ b/sql/FULL/world_scripts_full.sql @@ -17,6 +17,7 @@ UPDATE `gameobject_template` SET `ScriptName`='go_eastern_crystal_pylon' WHERE ` UPDATE `gameobject_template` SET `ScriptName`='go_barov_journal' WHERE `entry`=180794; UPDATE `gameobject_template` SET `ScriptName`='go_field_repair_bot_74A' WHERE `entry`=179552; UPDATE `gameobject_template` SET `ScriptName`='go_orb_of_command' WHERE `entry`=179879; +UPDATE `gameobject_template` SET `ScriptName`='go_resonite_cask' WHERE entry=178145; UPDATE `gameobject_template` SET `ScriptName`='go_tablet_of_madness' WHERE `entry`=180368; UPDATE `gameobject_template` SET `ScriptName`='go_tablet_of_the_seven' WHERE `entry`=169294; UPDATE `gameobject_template` SET `ScriptName`='go_manticron_cube' WHERE `entry`=181713; @@ -704,6 +705,14 @@ UPDATE `creature_template` SET `ScriptName`='boss_keristrasza' WHERE `entry`=267 /* OBSIDIAN SANCTUM */ UPDATE `instance_template` SET `script`='instance_obsidian_sanctum' WHERE map=615; +UPDATE creature_template SET ScriptName='boss_sartharion' WHERE entry=28860; +UPDATE creature_template SET ScriptName='mob_vesperon' WHERE entry=30449; +UPDATE creature_template SET ScriptName='mob_shadron' WHERE entry=30451; +UPDATE creature_template SET ScriptName='mob_tenebron' WHERE entry=30452; +UPDATE creature_template SET ScriptName='mob_twilight_eggs' WHERE entry=30882; +UPDATE creature_template SET ScriptName='mob_twilight_whelp' WHERE entry IN (30890, 31214); +UPDATE creature_template SET ScriptName='mob_acolyte_of_shadron' WHERE entry=31218; +UPDATE creature_template SET ScriptName='mob_acolyte_of_vesperon' WHERE entry=31219; /* ONYXIA'S LAIR */ UPDATE `creature_template` SET `ScriptName`='boss_onyxia' WHERE `entry`=10184; diff --git a/sql/updates/4577_world_scripts.sql b/sql/updates/4577_world_scripts.sql new file mode 100644 index 00000000000..930ebec424a --- /dev/null +++ b/sql/updates/4577_world_scripts.sql @@ -0,0 +1,10 @@ +UPDATE creature_template SET ScriptName='boss_sartharion' WHERE entry=28860; +UPDATE creature_template SET ScriptName='mob_vesperon' WHERE entry=30449; +UPDATE creature_template SET ScriptName='mob_shadron' WHERE entry=30451; +UPDATE creature_template SET ScriptName='mob_tenebron' WHERE entry=30452; +UPDATE creature_template SET ScriptName='mob_twilight_eggs' WHERE entry=30882; +UPDATE creature_template SET ScriptName='mob_twilight_whelp' WHERE entry IN (30890, 31214); +UPDATE creature_template SET ScriptName='mob_acolyte_of_shadron' WHERE entry=31218; +UPDATE creature_template SET ScriptName='mob_acolyte_of_vesperon' WHERE entry=31219; + +UPDATE gameobject_template SET ScriptName='go_resonite_cask' WHERE entry=178145; diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj index fde415501c0..a615d579f4c 100644 --- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj +++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj @@ -2818,18 +2818,6 @@ - - - - - - diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj index 958a0bf0eae..effb6e84d13 100644 --- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj +++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj @@ -2819,18 +2819,6 @@ - - - - - - diff --git a/src/bindings/scripts/scripts/go/go_scripts.cpp b/src/bindings/scripts/scripts/go/go_scripts.cpp index bd0e621c3c4..b50a0b79bf4 100644 --- a/src/bindings/scripts/scripts/go/go_scripts.cpp +++ b/src/bindings/scripts/scripts/go/go_scripts.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: GO_Scripts SD%Complete: 100 -SDComment: Quest support: 4285,4287,4288(crystal pylons), 4296, 10990, 10991, 10992, Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089 +SDComment: Quest support: 4285,4287,4288(crystal pylons), 4296, 6481, 10990, 10991, 10992, Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089 SDCategory: Game Objects EndScriptData */ @@ -33,6 +33,7 @@ go_sacred_fire_of_life go_shrine_of_the_birds go_field_repair_bot_74A go_orb_of_command +go_resonite_cask go_tablet_of_madness go_tablet_of_the_seven go_tele_to_dalaran_crystal @@ -274,6 +275,23 @@ bool GOHello_go_ethereum_stasis(Player* pPlayer, GameObject* pGo) return false; } +/*###### +## go_resonite_cask +######*/ + +enum +{ + NPC_GOGGEROC = 11920 +}; + +bool GOHello_go_resonite_cask(Player* pPlayer, GameObject* pGO) +{ + if (pGO->GetGoType() == GAMEOBJECT_TYPE_GOOBER) + pGO->SummonCreature(NPC_GOGGEROC, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000); + + return false; +} + /*###### ## go_sacred_fire_of_life ######*/ @@ -433,6 +451,11 @@ void AddSC_go_scripts() newscript->pGOHello = &GOHello_go_ethereum_stasis; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "go_resonite_cask"; + newscript->pGOHello = &GOHello_go_resonite_cask; + newscript->RegisterSelf(); + newscript = new Script; newscript->Name = "go_sacred_fire_of_life"; newscript->pGOHello = &GOHello_go_sacred_fire_of_life; diff --git a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_broodlord_lashlayer.cpp b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_broodlord_lashlayer.cpp index c2582ffb600..9207f5d03a4 100644 --- a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_broodlord_lashlayer.cpp +++ b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_broodlord_lashlayer.cpp @@ -48,9 +48,6 @@ struct TRINITY_DLL_DECL boss_broodlordAI : public ScriptedAI MortalStrike_Timer = 20000; KnockBack_Timer = 30000; LeashCheck_Timer = 2000; - - m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); - m_creature->ApplySpellImmune(1, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); } void EnterCombat(Unit *who) diff --git a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_nefarian.cpp b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_nefarian.cpp index 808f381d197..c71b1871d94 100644 --- a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_nefarian.cpp +++ b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_nefarian.cpp @@ -79,9 +79,6 @@ struct TRINITY_DLL_DECL boss_nefarianAI : public ScriptedAI TailLash_Timer = 10000; ClassCall_Timer = 35000; //35-40 seconds Phase3 = false; - - m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); - m_creature->ApplySpellImmune(1, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); } void KilledUnit(Unit* Victim) diff --git a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_razorgore.cpp b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_razorgore.cpp index 5267f1ef4b6..77e22a4d543 100644 --- a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_razorgore.cpp +++ b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_razorgore.cpp @@ -50,9 +50,6 @@ struct TRINITY_DLL_DECL boss_razorgoreAI : public ScriptedAI WarStomp_Timer = 35000; FireballVolley_Timer = 7000; Conflagration_Timer = 12000; - - m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); - m_creature->ApplySpellImmune(1, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); } void EnterCombat(Unit *who) diff --git a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_vaelastrasz.cpp b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_vaelastrasz.cpp index 9925cd6d3bc..a1b87ae6f01 100644 --- a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_vaelastrasz.cpp +++ b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_vaelastrasz.cpp @@ -72,9 +72,6 @@ struct TRINITY_DLL_DECL boss_vaelAI : public ScriptedAI TailSwipe_Timer = 20000; HasYelled = false; DoingSpeach = false; - - m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); - m_creature->ApplySpellImmune(1, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); } void BeginSpeach(Unit* target) diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_temporus.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_temporus.cpp index eea9a28da36..a2e28a19d5b 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_temporus.cpp @@ -45,7 +45,7 @@ struct TRINITY_DLL_DECL boss_temporusAI : public ScriptedAI boss_temporusAI(Creature *c) : ScriptedAI(c) { pInstance = c->GetInstanceData(); - HeroicMode = m_creature->GetMap()->IsHeroic(); + HeroicMode = c->GetMap()->IsHeroic(); } ScriptedInstance *pInstance; @@ -58,9 +58,6 @@ struct TRINITY_DLL_DECL boss_temporusAI : public ScriptedAI void Reset() { - m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); - m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); - Haste_Timer = 15000+rand()%8000; SpellReflection_Timer = 30000; MortalWound_Timer = 8000; diff --git a/src/bindings/scripts/scripts/zone/gruuls_lair/boss_gruul.cpp b/src/bindings/scripts/scripts/zone/gruuls_lair/boss_gruul.cpp index a0b4f632c42..26520fc16df 100644 --- a/src/bindings/scripts/scripts/zone/gruuls_lair/boss_gruul.cpp +++ b/src/bindings/scripts/scripts/zone/gruuls_lair/boss_gruul.cpp @@ -80,9 +80,6 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI if (pInstance) pInstance->SetData(DATA_GRUULEVENT, NOT_STARTED); - - m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); - m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); } void EnterCombat(Unit *who) diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index 219256f4da8..3bb9ccbd0e2 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -191,9 +191,6 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI ThunderClap_Timer = 15000; ResetThreat_Timer = 30000; - m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); - m_creature->ApplySpellImmune(1, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); - if (pInstance) pInstance->SetData(TYPE_OMROGG, NOT_STARTED); //End boss can use this later. O'mrogg must be defeated(DONE) or he will come to aid. } diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_curator.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_curator.cpp index 4906f02281a..9fb9d2226bd 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/boss_curator.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/boss_curator.cpp @@ -131,8 +131,6 @@ struct TRINITY_DLL_DECL boss_curatorAI : public ScriptedAI { AstralFlare->CastSpell(AstralFlare, SPELL_ASTRAL_FLARE_PASSIVE, false); AstralFlare->AI()->AttackStart(target); - AstralFlare->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); - AstralFlare->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); } //Reduce Mana by 10% of max health diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp index ab40ad745ef..7877dcbe686 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp @@ -185,9 +185,6 @@ struct TRINITY_DLL_DECL boss_attumenAI : public ScriptedAI void Reset() { ResetTimer = 2000; - - m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); - m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); } void EnterCombat(Unit* who) {} diff --git a/src/bindings/scripts/scripts/zone/obsidian_sanctum/boss_sartharion.cpp b/src/bindings/scripts/scripts/zone/obsidian_sanctum/boss_sartharion.cpp index c7034655b11..3fc3a2ff6de 100644 --- a/src/bindings/scripts/scripts/zone/obsidian_sanctum/boss_sartharion.cpp +++ b/src/bindings/scripts/scripts/zone/obsidian_sanctum/boss_sartharion.cpp @@ -1,272 +1,1073 @@ -/* Script Data Start -SDName: Boss sartharion -SDAuthor: LordVanMartin -SD%Complete: -SDComment: -SDCategory: -Script Data End */ - -/*** SQL START *** -update creature_template set scriptname = '' where entry = ''; -*** SQL END ***/ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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 Sartharion +SD%Complete: 70% +SDComment: Flame wave, achievement and portal events need to be implemented +SDCategory: Obsidian Sanctum +EndScriptData */ + #include "precompiled.h" +#include "def_obsidian_sanctum.h" + +enum +{ + //Sartharion Yell + SAY_SARTHARION_AGGRO = -1615018, + SAY_SARTHARION_BERSERK = -1615019, + SAY_SARTHARION_BREATH = -1615020, + SAY_SARTHARION_CALL_SHADRON = -1615021, + SAY_SARTHARION_CALL_TENEBRON = -1615022, + SAY_SARTHARION_CALL_VESPERON = -1615023, + SAY_SARTHARION_DEATH = -1615024, + SAY_SARTHARION_SPECIAL_1 = -1615025, + SAY_SARTHARION_SPECIAL_2 = -1615026, + SAY_SARTHARION_SPECIAL_3 = -1615027, + SAY_SARTHARION_SPECIAL_4 = -1615028, + SAY_SARTHARION_SLAY_1 = -1615029, + SAY_SARTHARION_SLAY_2 = -1615030, + SAY_SARTHARION_SLAY_3 = -1615031, + + WHISPER_LAVA_CHURN = -1615032, + + WHISPER_SHADRON_DICIPLE = -1615008, + WHISPER_VESPERON_DICIPLE = -1615041, + WHISPER_HATCH_EGGS = -1615017, + WHISPER_OPEN_PORTAL = -1615042, // whisper, shared by two dragons + + //Sartharion Spells + SPELL_BERSERK = 61632, // Increases the caster's attack speed by 150% and all damage it deals by 500% for 5 min. + SPELL_CLEAVE = 56909, // Inflicts 35% weapon damage to an enemy and its nearest allies, affecting up to 10 targets. + SPELL_FLAME_BREATH = 56908, // Inflicts 8750 to 11250 Fire damage to enemies in a cone in front of the caster. + SPELL_FLAME_BREATH_H = 58956, // Inflicts 10938 to 14062 Fire damage to enemies in a cone in front of the caster. + SPELL_TAIL_LASH = 56910, // A sweeping tail strike hits all enemies behind the caster, inflicting 3063 to 3937 damage and stunning them for 2 sec. + SPELL_TAIL_LASH_H = 58957, // A sweeping tail strike hits all enemies behind the caster, inflicting 4375 to 5625 damage and stunning them for 2 sec. + SPELL_WILL_OF_SARTHARION = 61254, // Sartharion's presence bolsters the resolve of the Twilight Drakes, increasing their total health by 25%. This effect also increases Sartharion's health by 25%. + SPELL_LAVA_STRIKE = 57571, // (Real spell casted should be 57578) 57571 then trigger visual missile, then summon Lava Blaze on impact(spell 57572) + SPELL_TWILIGHT_REVENGE = 60639, + + SPELL_TWILIGHT_SHIFT_ENTER = 57620, // enter phase. Player get this when click GO + SPELL_TWILIGHT_SHIFT_REMOVAL = 61187, // leave phase + SPELL_TWILIGHT_SHIFT_REMOVAL_ALL = 61190, // leave phase (probably version to make all leave) + + //Mini bosses common spells + SPELL_TWILIGHT_RESIDUE = 61885, // makes immune to shadow damage, applied when leave phase + + //Miniboses (Vesperon, Shadron, Tenebron) + SPELL_SHADOW_BREATH_H = 59126, // Inflicts 8788 to 10212 Fire damage to enemies in a cone in front of the caster. + SPELL_SHADOW_BREATH = 57570, // Inflicts 6938 to 8062 Fire damage to enemies in a cone in front of the caster. + + SPELL_SHADOW_FISSURE_H = 59127, // Deals 9488 to 13512 Shadow damage to any enemy within the Shadow fissure after 5 sec. + SPELL_SHADOW_FISSURE = 57579, // Deals 6188 to 8812 Shadow damage to any enemy within the Shadow fissure after 5 sec. + + //Vesperon + //In portal is a disciple, when disciple killed remove Power_of_vesperon, portal open multiple times + NPC_ACOLYTE_OF_VESPERON = 31219, // Acolyte of Vesperon + SPELL_POWER_OF_VESPERON = 61251, // Vesperon's presence decreases the maximum health of all enemies by 25%. + SPELL_TWILIGHT_TORMENT_VESP = 57948, // (Shadow only) trigger 57935 then 57988 + SPELL_TWILIGHT_TORMENT_VESP_ACO = 58853, // (Fire and Shadow) trigger 58835 then 57988 + + //Shadron + //In portal is a disciple, when disciple killed remove Power_of_vesperon, portal open multiple times + NPC_ACOLYTE_OF_SHADRON = 31218, // Acolyte of Shadron + SPELL_POWER_OF_SHADRON = 58105, // Shadron's presence increases Fire damage taken by all enemies by 100%. + SPELL_GIFT_OF_TWILIGTH_SHA = 57835, // TARGET_SCRIPT shadron + SPELL_GIFT_OF_TWILIGTH_SAR = 58766, // TARGET_SCRIPT sartharion + + //Tenebron + //in the portal spawns 6 eggs, if not killed in time (approx. 20s) they will hatch, whelps can cast 60708 + SPELL_POWER_OF_TENEBRON = 61248, // Tenebron's presence increases Shadow damage taken by all enemies by 100%. + //Tenebron, dummy spell + SPELL_SUMMON_TWILIGHT_WHELP = 58035, // doesn't work, will spawn NPC_TWILIGHT_WHELP + SPELL_SUMMON_SARTHARION_TWILIGHT_WHELP = 58826, // doesn't work, will spawn NPC_SHARTHARION_TWILIGHT_WHELP + + SPELL_HATCH_EGGS_H = 59189, + SPELL_HATCH_EGGS = 58542, + SPELL_HATCH_EGGS_EFFECT_H = 59190, + SPELL_HATCH_EGGS_EFFECT = 58685, + + //Whelps + NPC_TWILIGHT_WHELP = 30890, + NPC_SHARTHARION_TWILIGHT_WHELP = 31214, + SPELL_FADE_ARMOR = 60708, // Reduces the armor of an enemy by 1500 for 15s + + //flame tsunami + SPELL_FLAME_TSUNAMI = 57494, // the visual dummy + SPELL_FLAME_TSUNAMI_LEAP = 60241, // SPELL_EFFECT_138 some leap effect, causing caster to move in direction + SPELL_FLAME_TSUNAMI_DMG_AURA = 57492, // periodic damage, npc has this aura + + NPC_FLAME_TSUNAMI = 30616, // for the flame waves + NPC_LAVA_BLAZE = 30643, // adds spawning from flame strike + + //using these custom points for dragons start and end + POINT_ID_INIT = 100, + POINT_ID_LAND = 200 +}; + +//POS_SARTHARION_X = 3246.57, +//POS_SARTHARION_Y = 551.263, + +struct Waypoint +{ + float m_fX, m_fY, m_fZ; +}; -//Sartharion Spells -#define SPELL_BERSERK 61632 // Increases the caster's attack speed by 150% and all damage it deals by 500% for 5 min. -#define SPELL_CLEAVE 56909 // Inflicts 35% weapon damage to an enemy and its nearest allies, affecting up to 10 targets. -#define SPELL_FLAME_BREATH_N 56908 // Inflicts 8750 to 11250 Fire damage to enemies in a cone in front of the caster. -#define SPELL_FLAME_BREATH_H 58956 // Inflicts 10938 to 14062 Fire damage to enemies in a cone in front of the caster. -#define SPELL_TAIL_LASH_N 56910 // A sweeping tail strike hits all enemies behind the caster, inflicting 3063 to 3937 damage and stunning them for 2 sec. -#define SPELL_TAIL_LASH_H 58957 // A sweeping tail strike hits all enemies behind the caster, inflicting 4375 to 5625 damage and stunning them for 2 sec. -#define SPELL_WILL_OF_SARTHARION 61254 // Sartharion's presence bolsters the resolve of the Twilight Drakes, increasing their total health by 25%. This effect also increases Sartharion's health by 25%. -#define SPELL_POWER_OF_SARTHARION 61254 //Shadron's presence increases Fire damage taken by all enemies by 100%. - -//Sartharion Yell -#define SAY_SARTHARION_AGGRO -1615016 -#define SAY_SARTHARION_BERSERK -1615017 -#define SAY_SARTHARION_BREATH -1615018 -#define SAY_SARTHARION_CALL_SHADRON -1615019 -#define SAY_SARTHARION_CALL_TENEBRON -1615020 -#define SAY_SARTHARION_CALL_VESPERON -1615021 -#define SAY_SARTHARION_DEATH -1615022 -#define SAY_SARTHARION_SPECIAL_1 -1615023 -#define SAY_SARTHARION_SPECIAL_2 -1615024 -#define SAY_SARTHARION_SPECIAL_3 -1615025 -#define SAY_SARTHARION_SPECIAL_4 -1615026 -#define SAY_SARTHARION_SLAY_1 -1615027 -#define SAY_SARTHARION_SLAY_2 -1615028 -#define SAY_SARTHARION_SLAY_3 -1615029 - -//Miniboses (Vesperon, Shadron, Tenebron) -#define SPELL_SHADOW_BREATH_H 59126 //Inflicts 8788 to 10212 Fire damage to enemies in a cone in front of the caster. -#define SPELL_SHADOW_BREATH_N 57570 //Inflicts 6938 to 8062 Fire damage to enemies in a cone in front of the caster. -//TAIL LASH the same as Sartharion's -#define SPELL_SHADOW_FISSURE_H 59127 //Deals 9488 to 13512 Shadow damage to any enemy within the Shadow fissure after 5 sec. -#define SPELL_SHADOW_FISSURE_N 57579 //Deals 6188 to 8812 Shadow damage to any enemy within the Shadow fissure after 5 sec. - -//Vesperon -#define MINIBOSS_VESPERON 30449 //npc 30449 //In portal is a disciple, when disciple killed remove Power_of_vesperon, portal spawns multiple times -#define BUFF_POWER_OF_VESPERON 61251 //Vesperon's presence decreases the maximum health of all enemies by 25%. - -//Shadron -#define MINIBOSS_SHADRON 30451 //npc 30451 //In portal is a disciple, when disciple killed remove Power_of_vesperon, portal spawns multiple times -#define BUFF_POWER_OF_SHADRON 58105 //Shadron's presence increases Fire damage taken by all enemies by 100%. - -//Tenebron -#define MINIBOSS_TENEBRON 30452 //npc 30452 //in the portal spawns 6 eggs, if not killed in time (approx. 20s) they will hatch, whelps can cast 60708 -#define BUFF_POWER_OF_TENEBRON 61248 //Tenebron's presence increases Shadow damage taken by all enemies by 100%. - -//Minibosses common spells -#define SPELL_SHADOW_BREATH_N 57570 -#define SPELL_SHADOW_BREATH_H 59126 -#define SPELL_SHADOW_FISSURE_N 57579 -#define SPELL_SHADOW_FISSURE_H 59127 -#define SPELL_TWILIGHT_REVENGE 60639 - -//Tenebron, dummy spell -#define SPELL_HATCH_EGGS 58793 - -//Whelps -#define TWILIGHT_WHELP 30890 //npc 30890 -#define SHARTHARION_TWILIGHT_WHELP 31214 //npc 31214 -#define SPELL_FADE_ARMOR 60708 //Reduces the armor of an enemy by 1500 for 15s - -/*Summons a portal, which all DPS and one healer should go through and proceed to kill all eggs. After about 20 seconds these eggs will hatch into whelplings with 60k health. Whelplings that hatched should be picked up by a tank and killed. -Hatch Eggs Tenebron summons a portal in which eggs are spawned. After about 20s the eggs hatches into Whelps (156,396 hp - amount of whelps determined by Normal or Heroic mode) that do Fade Armor. */ +//each dragons special points. First where fly to before connect to connon, second where land point is. +Waypoint m_aTene[]= +{ + {3212.854, 575.597, 109.856}, //init + {3246.425, 565.367, 61.249} //end +}; + +Waypoint m_aShad[]= +{ + {3293.238, 472.223, 106.968}, + {3271.669, 526.907, 61.931} +}; + +Waypoint m_aVesp[]= +{ + {3193.310, 472.861, 102.697}, + {3227.268, 533.238, 59.995} +}; + +//points around raid "isle", counter clockwise. should probably be adjusted to be more alike +Waypoint m_aDragonCommon[]= +{ + {3214.012, 468.932, 98.652}, + {3244.950, 468.427, 98.652}, + {3283.520, 496.869, 98.652}, + {3287.316, 555.875, 98.652}, + {3250.479, 585.827, 98.652}, + {3209.969, 566.523, 98.652} +}; + +/*###### +## Boss Sartharion +######*/ struct TRINITY_DLL_DECL boss_sartharionAI : public ScriptedAI { - boss_sartharionAI(Creature *c) : ScriptedAI(c) {} + boss_sartharionAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + } - bool berserk; + ScriptedInstance* m_pInstance; + bool m_bIsHeroic; - void Reset() + bool m_bIsBerserk; + uint32 m_uiEnrageTimer; + + uint32 m_uiTenebronTimer; + uint32 m_uiShadronTimer; + uint32 m_uiVesperonTimer; + + uint32 m_uiFlameTsunamiTimer; + uint32 m_uiFlameBreathTimer; + uint32 m_uiTailSweepTimer; + uint32 m_uiCleaveTimer; + uint32 m_uiLavaStrikeTimer; + + bool m_bHasCalledTenebron; + bool m_bHasCalledShadron; + bool m_bHasCalledVesperon; + + void Reset() + { + m_bIsBerserk = false; + m_uiEnrageTimer = MINUTE*15*IN_MILISECONDS; + + m_uiTenebronTimer = 30000; + m_uiShadronTimer = 75000; + m_uiVesperonTimer = 120000; + + m_uiFlameTsunamiTimer = 30000; + m_uiFlameBreathTimer = 20000; + m_uiTailSweepTimer = 20000; + m_uiCleaveTimer = 7000; + m_uiLavaStrikeTimer = 5000; + + m_bHasCalledTenebron = false; + m_bHasCalledShadron = false; + m_bHasCalledVesperon = false; + + if (m_pInstance) + { + if (!m_creature->isAlive()) + return; + + m_pInstance->SetData(TYPE_SARTHARION_EVENT, NOT_STARTED); + + //do dragons actually respawn like this? Commented for now, until confirmed. + + /*if (Unit* Temp1 = Unit::GetUnit((*m_creature),m_pInstance->GetData64(DATA_TENEBRON))) + if (Temp1->isDead()) + ((Creature*)Temp1)->Respawn(); + + if (Unit* Temp2 = Unit::GetUnit((*m_creature),m_pInstance->GetData64(DATA_SHADRON))) + if (Temp2->isDead()) + ((Creature*)Temp2)->Respawn(); + + if (Unit* Temp3 = Unit::GetUnit((*m_creature),m_pInstance->GetData64(DATA_VESPERON))) + if (Temp3->isDead()) + ((Creature*)Temp3)->Respawn();*/ + } + + if (m_creature->HasAura(SPELL_TWILIGHT_REVENGE)) + m_creature->RemoveAurasDueToSpell(SPELL_TWILIGHT_REVENGE); + } + + void Aggro(Unit* pWho) { - berserk = false; + DoScriptText(SAY_SARTHARION_AGGRO,m_creature); + DoZoneInCombat(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SARTHARION_EVENT, IN_PROGRESS); + + FetchDragons(); } - void EnterCombat(Unit* who) + + void JustDied(Unit* pKiller) { DoScriptText(SAY_SARTHARION_DEATH,m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SARTHARION_EVENT, DONE); + } + + void KilledUnit(Unit* pVictim) + { + switch(rand()%3) + { + case 0: DoScriptText(SAY_SARTHARION_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SARTHARION_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SARTHARION_SLAY_3, m_creature); break; + } + } + + void FetchDragons() + { + Unit* pTene = Unit::GetUnit(*m_creature,m_pInstance->GetData64(DATA_TENEBRON)); + Unit* pShad = Unit::GetUnit(*m_creature,m_pInstance->GetData64(DATA_SHADRON)); + Unit* pVesp = Unit::GetUnit(*m_creature,m_pInstance->GetData64(DATA_VESPERON)); + + if (pTene && pTene->isAlive() && !pTene->getVictim()) + { + pTene->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aTene[0].m_fX, m_aTene[0].m_fY, m_aTene[0].m_fZ); + + if (!pTene->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + pTene->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + + if (pShad && pShad->isAlive() && !pShad->getVictim()) + { + pShad->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aShad[0].m_fX, m_aShad[0].m_fY, m_aShad[0].m_fZ); + + if (!pShad->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + pShad->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + + if (pVesp && pVesp->isAlive() && !pVesp->getVictim()) + { + pVesp->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aVesp[0].m_fX, m_aVesp[0].m_fY, m_aVesp[0].m_fZ); + + if (!pVesp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + pVesp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + } + + void CallDragon(uint32 uiDataId) + { + if (m_pInstance) + { + Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(uiDataId)); + + if (pTemp && pTemp->isAlive() && !pTemp->getVictim()) + { + if (pTemp->HasUnitMovementFlag(MOVEMENTFLAG_WALK_MODE)) + pTemp->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); + + if (pTemp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + int32 iTextId = 0; + + switch(pTemp->GetEntry()) + { + case NPC_TENEBRON: + iTextId = SAY_SARTHARION_CALL_TENEBRON; + pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aTene[1].m_fX, m_aTene[1].m_fY, m_aTene[1].m_fZ); + break; + case NPC_SHADRON: + iTextId = SAY_SARTHARION_CALL_SHADRON; + pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aShad[1].m_fX, m_aShad[1].m_fY, m_aShad[1].m_fZ); + break; + case NPC_VESPERON: + iTextId = SAY_SARTHARION_CALL_VESPERON; + pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aVesp[1].m_fX, m_aVesp[1].m_fY, m_aVesp[1].m_fZ); + break; + } + + DoScriptText(iTextId, m_creature); + } + } + } + + void SendFlameTsunami() + { + Map* pMap = m_creature->GetMap(); + + if (pMap && pMap->IsDungeon()) + { + Map::PlayerList const &PlayerList = pMap->GetPlayers(); + + if (!PlayerList.isEmpty()) + { + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + { + if (i->getSource()->isAlive()) + DoScriptText(WHISPER_LAVA_CHURN,m_creature,i->getSource()); + } + } + } } - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit* who) {} - void UpdateAI(const uint32 diff) + + void UpdateAI(const uint32 uiDiff) { //Return since we have no target - if(!UpdateVictim()) + if (!UpdateVictim()) return; - if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 10) + //reset if out of his platform, must find better/faster way to do this + //if (m_creature->GetDistance2d(POS_SARTHARION_X, POS_SARTHARION_Y) > 55) + //{ + //EnterEvadeMode(); + //return; + //} + + if (!m_bIsBerserk && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 10) { - if(!berserk){ - DoCast(m_creature,SPELL_BERSERK); - berserk = true; - } + DoScriptText(SAY_SARTHARION_BERSERK,m_creature); + DoCast(m_creature,SPELL_BERSERK); + m_bIsBerserk = true; + } + + // enrage + if (m_uiEnrageTimer) + { + if (m_uiEnrageTimer < uiDiff) + { + DoCast(m_creature, SPELL_WILL_OF_SARTHARION); + m_uiEnrageTimer = 0; + }else m_uiEnrageTimer -= uiDiff; } + // flame tsunami + if (m_uiFlameTsunamiTimer < uiDiff) + { + SendFlameTsunami(); + m_uiFlameTsunamiTimer = 30000; + }else m_uiFlameTsunamiTimer -= uiDiff; + + // flame breath + if (m_uiFlameBreathTimer < uiDiff) + { + DoScriptText(SAY_SARTHARION_BREATH, m_creature); + DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_FLAME_BREATH_H : SPELL_FLAME_BREATH); + m_uiFlameBreathTimer = 25000 + rand()%10000; + }else m_uiFlameBreathTimer -= uiDiff; + + // Tail Sweep + if (m_uiTailSweepTimer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_TAIL_LASH_H : SPELL_TAIL_LASH); + m_uiTailSweepTimer = 15000 + rand()%5000; + }else m_uiTailSweepTimer -= uiDiff; + + // Cleave + if (m_uiCleaveTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CLEAVE); + m_uiCleaveTimer = 7000 + rand()%3000; + }else m_uiCleaveTimer -= uiDiff; + + // Lavas Strike + if (m_uiLavaStrikeTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + DoCast(pTarget, SPELL_LAVA_STRIKE); + + switch(rand()%15) + { + case 0: DoScriptText(SAY_SARTHARION_SPECIAL_1, m_creature); break; + case 1: DoScriptText(SAY_SARTHARION_SPECIAL_2, m_creature); break; + case 2: DoScriptText(SAY_SARTHARION_SPECIAL_3, m_creature); break; + } + } + m_uiLavaStrikeTimer = 5000 + rand()%15000; + }else m_uiLavaStrikeTimer -= uiDiff; + + // call tenebron + if (!m_bHasCalledTenebron && m_uiTenebronTimer < uiDiff) + { + CallDragon(DATA_TENEBRON); + m_bHasCalledTenebron = true; + }else m_uiTenebronTimer -= uiDiff; + + // call shadron + if (!m_bHasCalledShadron && m_uiShadronTimer < uiDiff) + { + CallDragon(DATA_SHADRON); + m_bHasCalledShadron = true; + }else m_uiShadronTimer -= uiDiff; + + // call vesperon + if (!m_bHasCalledVesperon && m_uiVesperonTimer < uiDiff) + { + CallDragon(DATA_VESPERON); + m_bHasCalledVesperon = true; + }else m_uiVesperonTimer -= uiDiff; + DoMeleeAttackIfReady(); } - void JustDied(Unit* killer) +}; + +CreatureAI* GetAI_boss_sartharion(Creature* pCreature) +{ + return new boss_sartharionAI(pCreature); +} + +enum TeneText +{ + SAY_TENEBRON_AGGRO = -1615009, + SAY_TENEBRON_SLAY_1 = -1615010, + SAY_TENEBRON_SLAY_2 = -1615011, + SAY_TENEBRON_DEATH = -1615012, + SAY_TENEBRON_BREATH = -1615013, + SAY_TENEBRON_RESPOND = -1615014, + SAY_TENEBRON_SPECIAL_1 = -1615015, + SAY_TENEBRON_SPECIAL_2 = -1615016 +}; + +enum ShadText +{ + SAY_SHADRON_AGGRO = -1615000, + SAY_SHADRON_SLAY_1 = -1615001, + SAY_SHADRON_SLAY_2 = -1615002, + SAY_SHADRON_DEATH = -1615003, + SAY_SHADRON_BREATH = -1615004, + SAY_SHADRON_RESPOND = -1615005, + SAY_SHADRON_SPECIAL_1 = -1615006, + SAY_SHADRON_SPECIAL_2 = -1615007 +}; + +enum VespText +{ + SAY_VESPERON_AGGRO = -1615033, + SAY_VESPERON_SLAY_1 = -1615034, + SAY_VESPERON_SLAY_2 = -1615035, + SAY_VESPERON_DEATH = -1615036, + SAY_VESPERON_BREATH = -1615037, + SAY_VESPERON_RESPOND = -1615038, + SAY_VESPERON_SPECIAL_1 = -1615039, + SAY_VESPERON_SPECIAL_2 = -1615040 +}; + +//to control each dragons common abilities +struct TRINITY_DLL_DECL dummy_dragonAI : public ScriptedAI +{ + dummy_dragonAI(Creature* pCreature) : ScriptedAI(pCreature) { - DoScriptText(SAY_SARTHARION_DEATH,m_creature); + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroic; + + uint32 m_uiWaypointId; + uint32 m_uiMoveNextTimer; + int32 m_iPortalRespawnTime; + bool m_bCanMoveFree; + + void Reset() + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + m_uiWaypointId = 0; + m_uiMoveNextTimer = 500; + m_iPortalRespawnTime = 30000; + m_bCanMoveFree = false; + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (!m_pInstance || uiType != POINT_MOTION_TYPE) + return; + + debug_log("dummy_dragonAI: %s reached point %u", m_creature->GetName(), uiPointId); + + //if healers messed up the raid and we was already initialized + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) + { + EnterEvadeMode(); + return; + } + + //this is end, if we reach this, don't do much + if (uiPointId == POINT_ID_LAND) + { + m_creature->GetMotionMaster()->Clear(); + m_bCanMoveFree = false; + return; + } + + //get amount of common points + uint32 uiCommonWPCount = sizeof(m_aDragonCommon)/sizeof(Waypoint); + + //increase + m_uiWaypointId = uiPointId+1; + + //if we have reached a point bigger or equal to count, it mean we must reset to point 0 + if (m_uiWaypointId >= uiCommonWPCount) + { + if (!m_bCanMoveFree) + m_bCanMoveFree = true; + + m_uiWaypointId = 0; + } + + m_uiMoveNextTimer = 500; + } + + //used when open portal and spawn mobs in phase + void DoRaidWhisper(int32 iTextId) + { + Map* pMap = m_creature->GetMap(); + + if (pMap && pMap->IsDungeon()) + { + Map::PlayerList const &PlayerList = pMap->GetPlayers(); + + if (!PlayerList.isEmpty()) + { + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + DoScriptText(iTextId, m_creature, i->getSource()); + } + } + } + + //"opens" the portal and does the "opening" whisper + void OpenPortal() + { + int32 iTextId = 0; + + //there are 4 portal spawn locations, each are expected to be spawned with negative spawntimesecs in database + + //using a grid search here seem to be more efficient than caching all four guids + //in instance script and calculate range to each. + GameObject* pPortal = m_creature->FindNearestGameObject(GO_TWILIGHT_PORTAL,50.0f); + + switch(m_creature->GetEntry()) + { + case NPC_TENEBRON: + iTextId = WHISPER_HATCH_EGGS; + break; + case NPC_SHADRON: + case NPC_VESPERON: + iTextId = WHISPER_OPEN_PORTAL; + break; + } + + DoRaidWhisper(iTextId); + + //By using SetRespawnTime() we will actually "spawn" the object with our defined time. + //Once time is up, portal will disappear again. + if (pPortal && !pPortal->isSpawned()) + pPortal->SetRespawnTime(m_iPortalRespawnTime); + + //Unclear what are expected to happen if one drake has a portal open already + //Refresh respawnTime so time again are set to 30secs? + } + + //Removes each drakes unique debuff from players + void RemoveDebuff(uint32 uiSpellId) + { + Map* pMap = m_creature->GetMap(); + + if (pMap && pMap->IsDungeon()) + { + Map::PlayerList const &PlayerList = pMap->GetPlayers(); + + if (PlayerList.isEmpty()) + return; + + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + { + if (i->getSource()->isAlive() && i->getSource()->HasAura(uiSpellId)) + i->getSource()->RemoveAurasDueToSpell(uiSpellId); + } + } + } + + void JustDied(Unit* pKiller) + { + int32 iTextId = 0; + uint32 uiSpellId = 0; + + switch(m_creature->GetEntry()) + { + case NPC_TENEBRON: + iTextId = SAY_TENEBRON_DEATH; + uiSpellId = SPELL_POWER_OF_TENEBRON; + break; + case NPC_SHADRON: + iTextId = SAY_SHADRON_DEATH; + uiSpellId = SPELL_POWER_OF_SHADRON; + break; + case NPC_VESPERON: + iTextId = SAY_VESPERON_DEATH; + uiSpellId = SPELL_POWER_OF_VESPERON; + break; + } + + DoScriptText(iTextId, m_creature); + + RemoveDebuff(uiSpellId); + + if (m_pInstance) + { + // not if solo mini-boss fight + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) + return; + + // Twilight Revenge to main boss + if (Unit* pSartharion = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_SARTHARION))) + { + if (pSartharion->isAlive()) + m_creature->CastSpell(pSartharion,SPELL_TWILIGHT_REVENGE,true); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_bCanMoveFree && m_uiMoveNextTimer) + { + if (m_uiMoveNextTimer < uiDiff) + { + m_creature->GetMotionMaster()->MovePoint(m_uiWaypointId, + m_aDragonCommon[m_uiWaypointId].m_fX, m_aDragonCommon[m_uiWaypointId].m_fY, m_aDragonCommon[m_uiWaypointId].m_fZ); + + debug_log("dummy_dragonAI: %s moving to point %u", m_creature->GetName(), m_uiWaypointId); + m_uiMoveNextTimer = 0; + } else m_uiMoveNextTimer -= uiDiff; + } } }; /*###### -## Mob Vesperon +## Mob Tenebron ######*/ -//Vesperon Yell -#define SAY_VESPERON_AGGRO -1615030 -#define SAY_VESPERON_SLAY_1 -1615031 -#define SAY_VESPERON_SLAY_2 -1615032 -#define SAY_VESPERON_DEATH -1615033 -#define SAY_VESPERON_BREATH -1615034 -#define SAY_VESPERON_RESPOND -1615035 -#define SAY_VESPERON_SPECIAL_1 -1615036 -#define SAY_VESPERON_SPECIAL_2 -1615037 - -struct TRINITY_DLL_DECL mob_vesperonAI : public ScriptedAI +struct TRINITY_DLL_DECL mob_tenebronAI : public dummy_dragonAI { - mob_vesperonAI(Creature *c) : ScriptedAI(c) {} + mob_tenebronAI(Creature* pCreature) : dummy_dragonAI(pCreature) { } + + uint32 m_uiShadowBreathTimer; + uint32 m_uiShadowFissureTimer; + uint32 m_uiHatchEggTimer; - void Reset() {} - void EnterCombat(Unit* who) + void Reset() { - DoScriptText(SAY_VESPERON_AGGRO,m_creature); + m_uiShadowBreathTimer = 20000; + m_uiShadowFissureTimer = 5000; + m_uiHatchEggTimer = 30000; } - void UpdateAI(const uint32 diff) + + void Aggro(Unit* pWho) { - //Return since we have no target - if(!UpdateVictim()) - return; + DoScriptText(SAY_TENEBRON_AGGRO, m_creature); + DoZoneInCombat(); + DoCast(m_creature, SPELL_POWER_OF_TENEBRON); + } - DoMeleeAttackIfReady(); + void KilledUnit(Unit* pVictim) + { + switch(rand()%2) + { + case 0: DoScriptText(SAY_TENEBRON_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_TENEBRON_SLAY_2, m_creature); break; + } } - void JustDied(Unit* killer) + + void UpdateAI(const uint32 uiDiff) { - DoScriptText(SAY_VESPERON_DEATH,m_creature); + //if no target, update dummy and return + if (!UpdateVictim()) + { + dummy_dragonAI::UpdateAI(uiDiff); + return; + } + + // shadow fissure + if (m_uiShadowFissureTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsHeroic ? SPELL_SHADOW_FISSURE_H : SPELL_SHADOW_FISSURE); + + m_uiShadowFissureTimer = 15000 + rand()%5000; + }else m_uiShadowFissureTimer -= uiDiff; + + // shadow breath + if (m_uiShadowBreathTimer < uiDiff) + { + DoScriptText(SAY_TENEBRON_BREATH, m_creature); + DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_SHADOW_BREATH_H : SPELL_SHADOW_BREATH); + m_uiShadowBreathTimer = 20000 + rand()%5000; + }else m_uiShadowBreathTimer -= uiDiff; + + DoMeleeAttackIfReady(); } }; +CreatureAI* GetAI_mob_tenebron(Creature* pCreature) +{ + return new mob_tenebronAI(pCreature); +} + /*###### ## Mob Shadron ######*/ -//Shadron Yell -#define SAY_SHADRON_AGGRO -1615000 -#define SAY_SHADRON_SLAY_1 -1615001 -#define SAY_SHADRON_SLAY_2 -1615002 -#define SAY_SHADRON_DEATH -1615003 -#define SAY_SHADRON_BREATH -1615004 -#define SAY_SHADRON_RESPOND -1615005 -#define SAY_SHADRON_SPECIAL_1 -1615006 -#define SAY_SHADRON_SPECIAL_2 -1615007 - -struct TRINITY_DLL_DECL mob_shadronAI : public ScriptedAI +struct TRINITY_DLL_DECL mob_shadronAI : public dummy_dragonAI { - mob_shadronAI(Creature *c) : ScriptedAI(c) {} + mob_shadronAI(Creature* pCreature) : dummy_dragonAI(pCreature) { } + + uint32 m_uiShadowBreathTimer; + uint32 m_uiShadowFissureTimer; + uint32 m_uiAcolyteShadronTimer; + + void Reset() + { + m_uiShadowBreathTimer = 20000; + m_uiShadowFissureTimer = 5000; + m_uiAcolyteShadronTimer = 60000; + + if (m_creature->HasAura(SPELL_TWILIGHT_TORMENT_VESP)) + m_creature->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP); + + if (m_creature->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) + m_creature->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA); + } - void Reset(){} - void EnterCombat(Unit* who) + void Aggro(Unit* pWho) { DoScriptText(SAY_SHADRON_AGGRO,m_creature); + DoZoneInCombat(); + DoCast(m_creature, SPELL_POWER_OF_SHADRON); } - void UpdateAI(const uint32 diff) + + void KilledUnit(Unit* pVictim) { - //Return since we have no target - if(!UpdateVictim()) + switch(rand()%2) + { + case 0: DoScriptText(SAY_SHADRON_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SHADRON_SLAY_2, m_creature); break; + } + } + + void UpdateAI(const uint32 uiDiff) + { + //if no target, update dummy and return + if (!UpdateVictim()) + { + dummy_dragonAI::UpdateAI(uiDiff); return; + } + + // shadow fissure + if (m_uiShadowFissureTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsHeroic ? SPELL_SHADOW_FISSURE_H : SPELL_SHADOW_FISSURE); + + m_uiShadowFissureTimer = 15000 + rand()%5000; + }else m_uiShadowFissureTimer -= uiDiff; + + // shadow breath + if (m_uiShadowBreathTimer < uiDiff) + { + DoScriptText(SAY_SHADRON_BREATH, m_creature); + DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_SHADOW_BREATH_H : SPELL_SHADOW_BREATH); + m_uiShadowBreathTimer = 20000 + rand()%5000; + }else m_uiShadowBreathTimer -= uiDiff; DoMeleeAttackIfReady(); } - void JustDied(Unit* killer) - { - DoScriptText(SAY_SHADRON_DEATH,m_creature); - } }; + +CreatureAI* GetAI_mob_shadron(Creature* pCreature) +{ + return new mob_shadronAI(pCreature); +} + /*###### -## Mob Tenebron +## Mob Vesperon ######*/ -//Yell -#define SAY_TENEBRON_AGGRO -1615008 -#define SAY_TENEBRON_SLAY_1 -1615009 -#define SAY_TENEBRON_SLAY_2 -1615010 -#define SAY_TENEBRON_DEATH -1615011 -#define SAY_TENEBRON_BREATH -1615012 -#define SAY_TENEBRON_RESPOND -1615013 -#define SAY_TENEBRON_SPECIAL_1 -1615014 -#define SAY_TENEBRON_SPECIAL_2 -1615015 - -struct TRINITY_DLL_DECL mob_tenebronAI : public ScriptedAI +struct TRINITY_DLL_DECL mob_vesperonAI : public dummy_dragonAI { - mob_tenebronAI(Creature *c) : ScriptedAI(c) {} + mob_vesperonAI(Creature* pCreature) : dummy_dragonAI(pCreature) { } - void Reset() {} - void EnterCombat(Unit* who) + uint32 m_uiShadowBreathTimer; + uint32 m_uiShadowFissureTimer; + uint32 m_uiAcolyteVesperonTimer; + + void Reset() { - DoScriptText(SAY_TENEBRON_AGGRO,m_creature); + m_uiShadowBreathTimer = 20000; + m_uiShadowFissureTimer = 5000; + m_uiAcolyteVesperonTimer = 60000; } - void UpdateAI(const uint32 diff) + + void Aggro(Unit* pWho) { - //Return since we have no target - if(!UpdateVictim()) + DoScriptText(SAY_VESPERON_AGGRO,m_creature); + DoZoneInCombat(); + DoCast(m_creature, SPELL_POWER_OF_VESPERON); + } + + void KilledUnit(Unit* pVictim) + { + switch(rand()%2) + { + case 0: DoScriptText(SAY_VESPERON_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_VESPERON_SLAY_2, m_creature); break; + } + } + + void UpdateAI(const uint32 uiDiff) + { + //if no target, update dummy and return + if (!UpdateVictim()) + { + dummy_dragonAI::UpdateAI(uiDiff); return; + } + + // shadow fissure + if (m_uiShadowFissureTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsHeroic ? SPELL_SHADOW_FISSURE_H : SPELL_SHADOW_FISSURE); + + m_uiShadowFissureTimer = 15000 + rand()%5000; + }else m_uiShadowFissureTimer -= uiDiff; + + // shadow breath + if (m_uiShadowBreathTimer < uiDiff) + { + DoScriptText(SAY_VESPERON_BREATH, m_creature); + DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_SHADOW_BREATH_H : SPELL_SHADOW_BREATH); + m_uiShadowBreathTimer = 20000 + rand()%5000; + }else m_uiShadowBreathTimer -= uiDiff; DoMeleeAttackIfReady(); } +}; + +CreatureAI* GetAI_mob_vesperon(Creature* pCreature) +{ + return new mob_vesperonAI(pCreature); +} + +/*###### +## Mob Acolyte of Shadron +######*/ + +struct TRINITY_DLL_DECL mob_acolyte_of_shadronAI : public ScriptedAI +{ + mob_acolyte_of_shadronAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + } + + ScriptedInstance* m_pInstance; + + void Reset() + { + if (m_pInstance) + { + //if not solo figth, buff main boss, else place debuff on mini-boss. both spells TARGET_SCRIPT + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + DoCast(m_creature, SPELL_GIFT_OF_TWILIGTH_SAR); + else + DoCast(m_creature, SPELL_GIFT_OF_TWILIGTH_SHA); + } + } + void JustDied(Unit* killer) { - DoScriptText(SAY_TENEBRON_DEATH,m_creature); + if (m_pInstance) + { + Creature* pDebuffTarget = NULL; + + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + { + //not solo fight, so main boss has deduff + pDebuffTarget = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SARTHARION)); + + if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SAR)) + pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SAR); + } + else + { + //event not in progress, then solo fight and must remove debuff mini-boss + pDebuffTarget = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SHADRON)); + + if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) + pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); } }; +CreatureAI* GetAI_mob_acolyte_of_shadron(Creature* pCreature) +{ + return new mob_acolyte_of_shadronAI(pCreature); +} + /*###### -## Mob Whelps +## Mob Acolyte of Vesperon ######*/ -struct TRINITY_DLL_DECL mob_whelpAI : public ScriptedAI + +struct TRINITY_DLL_DECL mob_acolyte_of_vesperonAI : public ScriptedAI { - mob_whelpAI(Creature *c) : ScriptedAI(c) {} + mob_acolyte_of_vesperonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + } - uint32 Fade_armor_Timer; + ScriptedInstance* m_pInstance; - void Reset() {} - void EnterCombat(Unit* who) {} - void UpdateAI(const uint32 diff) + void Reset() { - //Return since we have no target - if(!UpdateVictim()) + DoCast(m_creature, SPELL_TWILIGHT_TORMENT_VESP_ACO); + } + + void JustDied(Unit* pKiller) + { + // remove twilight torment on Vesperon + if (m_pInstance) + { + Creature* pVesperon = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_VESPERON)); + + if (pVesperon && pVesperon->isAlive() && pVesperon->HasAura(SPELL_TWILIGHT_TORMENT_VESP)) + pVesperon->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!UpdateVictim()) return; DoMeleeAttackIfReady(); } - void JustDied(Unit* killer) {} }; -CreatureAI* GetAI_mob_whelp(Creature *_Creature) +CreatureAI* GetAI_mob_acolyte_of_vesperon(Creature* pCreature) { - return new mob_whelpAI (_Creature); + return new mob_acolyte_of_vesperonAI(pCreature); } -CreatureAI* GetAI_mob_tenebron(Creature *_Creature) +/*###### +## Mob Twilight Eggs +######*/ + +struct TRINITY_DLL_DECL mob_twilight_eggsAI : public ScriptedAI { - return new mob_tenebronAI (_Creature); -} + mob_twilight_eggsAI(Creature* pCreature) : ScriptedAI(pCreature) { } + + uint32 m_uiFadeArmorTimer; + + void Reset() + { + m_uiFadeArmorTimer = 1000; + } -CreatureAI* GetAI_mob_shadron(Creature *_Creature) + void AttackStart(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) { } +}; + +CreatureAI* GetAI_mob_twilight_eggs(Creature* pCreature) { - return new mob_shadronAI (_Creature); + return new mob_twilight_eggsAI(pCreature); } -CreatureAI* GetAI_mob_vesperon(Creature *_Creature) +/*###### +## Mob Twilight Whelps +######*/ + +struct TRINITY_DLL_DECL mob_twilight_whelpAI : public ScriptedAI { - return new mob_vesperonAI (_Creature); -} + mob_twilight_whelpAI(Creature* pCreature) : ScriptedAI(pCreature) { } -CreatureAI* GetAI_boss_sartharion(Creature *_Creature) + uint32 m_uiFadeArmorTimer; + + void Reset() + { + m_uiFadeArmorTimer = 1000; + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!UpdateVictim()) + return; + + // twilight torment + if (m_uiFadeArmorTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_FADE_ARMOR); + m_uiFadeArmorTimer = 5000 + rand()%5000; + }else m_uiFadeArmorTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_twilight_whelp(Creature* pCreature) { - return new boss_sartharionAI (_Creature); + return new mob_twilight_whelpAI(pCreature); } void AddSC_boss_sartharion() @@ -294,7 +1095,22 @@ void AddSC_boss_sartharion() newscript->RegisterSelf(); newscript = new Script; - newscript->Name="mob_whelp"; - newscript->GetAI = &GetAI_mob_whelp; + newscript->Name="mob_acolyte_of_shadron"; + newscript->GetAI = &GetAI_mob_acolyte_of_shadron; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="mob_acolyte_of_vesperon"; + newscript->GetAI = &GetAI_mob_acolyte_of_vesperon; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="mob_twilight_eggs"; + newscript->GetAI = &GetAI_mob_twilight_eggs; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="mob_twilight_whelp"; + newscript->GetAI = &GetAI_mob_twilight_whelp; newscript->RegisterSelf(); } diff --git a/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp b/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp index 96885e7e672..ceea0a66d85 100644 --- a/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp +++ b/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp @@ -97,9 +97,6 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI FireballTimer = 18000; InitialSpawn = true; - - m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); - m_creature->ApplySpellImmune(1, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); } void EnterCombat(Unit* who) diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index 953fbcb198c..377c19ec491 100644 --- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -218,8 +218,6 @@ struct TRINITY_DLL_DECL aqsentinelAI : public ScriptedAI } ClearBudyList(); gatherOthersWhenAggro = true; - m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, false); - m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, false); } void GainSentinelAbility(uint32 id) @@ -234,12 +232,6 @@ struct TRINITY_DLL_DECL aqsentinelAI : public ScriptedAI } SentinelAbilityAura *a = new SentinelAbilityAura(this, (SpellEntry*)spell, id, eff_mask); m_creature->AddAura(a); - - if (id == SPELL_KNOCK_BUFF) - { - m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); - m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, true); - } } void EnterCombat(Unit *who) diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp index b3b92cbc2c7..895e91c13c6 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp +++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp @@ -71,9 +71,6 @@ struct TRINITY_DLL_DECL boss_marliAI : public ScriptedAI Spawned = false; PhaseTwo = false; - - m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); - m_creature->ApplySpellImmune(1, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); } void EnterCombat(Unit *who) diff --git a/src/shared/Errors.h b/src/shared/Errors.h index 5cfd109ee01..992b1752a0f 100644 --- a/src/shared/Errors.h +++ b/src/shared/Errors.h @@ -23,10 +23,6 @@ #include "Common.h" -#ifndef HAVE_CONFIG_H -#define HAVE_ACE_STACK_TRACE_H 1 -#endif - #ifdef HAVE_ACE_STACK_TRACE_H #include "ace/Stack_Trace.h" #endif -- cgit v1.2.3 From 370b38312ac1e51e244e1936cb493f6101b73ea6 Mon Sep 17 00:00:00 2001 From: Anubisss Date: Sat, 25 Jul 2009 02:02:02 +0200 Subject: *Drop command reload spell_affect from DB. Its already dropped from core. --HG-- branch : trunk --- sql/updates/4583_world_command.sql | 1 + sql/world.sql | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 sql/updates/4583_world_command.sql (limited to 'sql') diff --git a/sql/updates/4583_world_command.sql b/sql/updates/4583_world_command.sql new file mode 100644 index 00000000000..6c5bc49f013 --- /dev/null +++ b/sql/updates/4583_world_command.sql @@ -0,0 +1 @@ +DELETE FROM `command` WHERE `name` = 'reload spell_affect'; diff --git a/sql/world.sql b/sql/world.sql index e65f1acc018..302d36eccdb 100644 --- a/sql/world.sql +++ b/sql/world.sql @@ -573,7 +573,6 @@ INSERT INTO `command` VALUES ('reload skill_extra_item_template',3,'Syntax: .reload skill_extra_item_template\nReload skill_extra_item_template table.'), ('reload skill_fishing_base_level',3,'Syntax: .reload skill_fishing_base_level\nReload skill_fishing_base_level table.'), ('reload skinning_loot_template',3,'Syntax: .reload skinning_loot_template\nReload skinning_loot_template table.'), -('reload spell_affect',3,'Syntax: .reload spell_affect\nReload spell_affect table.'), ('reload spell_area',3,'Syntax: .reload spell_area\nReload spell_area table.'), ('reload spell_bonus_data',3,'Syntax: .reload spell_bonus_data\nReload spell_bonus_data table.'), ('reload spell_disabled',3,'Syntax: .reload spell_disabled\nReload spell_disabled table.'), -- cgit v1.2.3 From d62da4cc16c3498674450d5751d18bbe9f9b4f6f Mon Sep 17 00:00:00 2001 From: Kudlaty Date: Sat, 25 Jul 2009 22:16:21 +0200 Subject: Merge [SD2] r1106 Prevent abuse of item 44222. Apply some SD2 code style r1107 Add health modification for phase and correct phase value for kael(TK) r1108 Remove scripted function SetSheathState() and use mangos function instead. Fix one typo and apply sd2 code style for one script. r1109 Remove old makefile* files not needed. r1110 Some minor adjustments to sharkkis, add one spell and also add distance to MoveChase. Not kill boss' advisors on Reset when not needed. r1111 Check pointers and avoid possible crash r1112 Added script for friendly Kael in MgT (movement to orb-platform, transform and gossip) r1113 Correct misunderstanding added in 1112, and use timer for transformation instead (creature are expected to spawn/fly down once player use orb). --HG-- branch : trunk --- sql/FULL/world_scripts_full.sql | 2 ++ src/bindings/scripts/CMakeLists.txt | 1 + src/bindings/scripts/ScriptMgr.cpp | 2 ++ src/bindings/scripts/VC80/80ScriptDev2.vcproj | 4 +++ src/bindings/scripts/VC90/90ScriptDev2.vcproj | 4 +++ src/bindings/scripts/include/sc_creature.cpp | 5 ---- src/bindings/scripts/include/sc_creature.h | 2 -- src/bindings/scripts/scripts/item/item_scripts.cpp | 25 ++++++++++++++++ .../zone/tempest_keep/the_eye/boss_kaelthas.cpp | 11 +++++-- .../scripts/scripts/zone/westfall/westfall.cpp | 34 ++++++++++++++-------- .../scripts/scripts/zone/zulgurub/boss_thekal.cpp | 15 ++++------ 11 files changed, 74 insertions(+), 31 deletions(-) (limited to 'sql') diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql index 71d430a6f02..02b7159d570 100644 --- a/sql/FULL/world_scripts_full.sql +++ b/sql/FULL/world_scripts_full.sql @@ -64,6 +64,7 @@ UPDATE `creature_template` SET `ScriptName`='guard_shattrath_scryer' WHERE `entr UPDATE `item_template` SET `ScriptName`='item_area_52_special' WHERE `entry`=28132; UPDATE `item_template` SET `ScriptName`='item_attuned_crystal_cores' WHERE `entry`=34368; UPDATE `item_template` SET `ScriptName`='item_blackwhelp_net' WHERE `entry`=31129; +UPDATE `item_template` SET `ScriptName`='item_dart_gun' WHERE `entry`=44222; UPDATE `item_template` SET `ScriptName`='item_disciplinary_rod' WHERE `entry`=22473; UPDATE `item_template` SET `ScriptName`='item_draenei_fishing_net' WHERE `entry`=23654; UPDATE `item_template` SET `ScriptName`='item_flying_machine' WHERE `entry` IN (34060,34061); @@ -615,6 +616,7 @@ UPDATE `creature_template` SET `ScriptName`='mob_arcane_sphere' WHERE `entry`=24 UPDATE `creature_template` SET `ScriptName`='mob_felkael_phoenix' WHERE `entry`=24674; UPDATE `creature_template` SET `ScriptName`='mob_felkael_phoenix_egg' WHERE `entry`=24675; UPDATE `creature_template` SET `ScriptName`='mob_felkael_flamestrike' WHERE `entry`=24666; +UPDATE `creature_template` SET `ScriptName`='npc_kalecgos' WHERE `entry` IN (24844, 24848); /* MARAUDON */ UPDATE `creature_template` SET `ScriptName`='boss_princess_theradras' WHERE `entry`=12201; diff --git a/src/bindings/scripts/CMakeLists.txt b/src/bindings/scripts/CMakeLists.txt index 3dcd38fa256..6fe9c0e1ec0 100644 --- a/src/bindings/scripts/CMakeLists.txt +++ b/src/bindings/scripts/CMakeLists.txt @@ -208,6 +208,7 @@ SET(trinityscript_LIB_SRCS scripts/zone/magisters_terrace/boss_vexallus.cpp scripts/zone/magisters_terrace/def_magisters_terrace.h scripts/zone/magisters_terrace/instance_magisters_terrace.cpp + scripts/zone/magisters_terrace/magisters_terrace.cpp scripts/zone/maraudon/boss_celebras_the_cursed.cpp scripts/zone/maraudon/boss_landslide.cpp scripts/zone/maraudon/boss_noxxion.cpp diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index a7a57818df7..f81edfdfb01 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -356,6 +356,7 @@ extern void AddSC_boss_selin_fireheart(); extern void AddSC_boss_vexallus(); extern void AddSC_boss_priestess_delrissa(); extern void AddSC_instance_magisters_terrace(); +extern void AddSC_magisters_terrace(); //Maraudon extern void AddSC_boss_celebras_the_cursed(); @@ -1260,6 +1261,7 @@ void ScriptsInit(char const* cfg_file = "trinitycore.conf") AddSC_boss_vexallus(); AddSC_boss_priestess_delrissa(); AddSC_instance_magisters_terrace(); + AddSC_magisters_terrace(); //Maraudon AddSC_boss_celebras_the_cursed(); diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj index a615d579f4c..53a1624820c 100644 --- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj +++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj @@ -1102,6 +1102,10 @@ RelativePath="..\scripts\zone\magisters_terrace\instance_magisters_terrace.cpp" > + + + + SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, uint32(uiRanged)); } -void ScriptedAI::SetSheathState(SheathState newState) -{ - m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, newState); -} - void ScriptedAI::SetCombatMovement(bool CombatMove) { CombatMovement = CombatMove; diff --git a/src/bindings/scripts/include/sc_creature.h b/src/bindings/scripts/include/sc_creature.h index 7c57367332a..666ec1fad44 100644 --- a/src/bindings/scripts/include/sc_creature.h +++ b/src/bindings/scripts/include/sc_creature.h @@ -189,8 +189,6 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI bool CanCast(Unit* Target, SpellEntry const *Spell, bool Triggered = false); void SetEquipmentSlots(bool bLoadDefault, int32 uiMainHand = EQUIP_NO_CHANGE, int32 uiOffHand = EQUIP_NO_CHANGE, int32 uiRanged = EQUIP_NO_CHANGE); - - void SetSheathState(SheathState newState); void SetCombatMovement(bool CombatMove); diff --git a/src/bindings/scripts/scripts/item/item_scripts.cpp b/src/bindings/scripts/scripts/item/item_scripts.cpp index d30efdae89f..a58edb58fa2 100644 --- a/src/bindings/scripts/scripts/item/item_scripts.cpp +++ b/src/bindings/scripts/scripts/item/item_scripts.cpp @@ -25,6 +25,7 @@ EndScriptData */ item_area_52_special(i28132) Prevents abuse of this item item_attuned_crystal_cores(i34368) Prevent abuse(quest 11524 & 11525) item_blackwhelp_net(i31129) Quest Whelps of the Wyrmcult (q10747). Prevents abuse +item_dart_gun Prevent quest provided item instakill anything but the expected item_draenei_fishing_net(i23654) Hacklike implements chance to spawn item or creature item_disciplinary_rod Prevents abuse item_nether_wraith_beacon(i31742) Summons creatures for quest Becoming a Spellfire Tailor (q10832) @@ -129,6 +130,25 @@ bool ItemUse_item_blackwhelp_net(Player *player, Item* _Item, SpellCastTargets c return true; } +/*##### +# item_dart_gun +#####*/ + +enum +{ + NPC_HAMMER_SCOUT = 32201 +}; + +bool ItemUse_item_dart_gun(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets) +{ + if (pTargets.getUnitTarget() && pTargets.getUnitTarget()->GetTypeId() == TYPEID_UNIT && + pTargets.getUnitTarget()->GetEntry() == NPC_HAMMER_SCOUT) + return false; + + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL); + return true; +} + /*##### # item_draenei_fishing_net #####*/ @@ -530,6 +550,11 @@ void AddSC_item_scripts() newscript->pItemUse = &ItemUse_item_blackwhelp_net; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "item_dart_gun"; + newscript->pItemUse = &ItemUse_item_dart_gun; + newscript->RegisterSelf(); + newscript = new Script; newscript->Name="item_disciplinary_rod"; newscript->pItemUse = &ItemUse_item_disciplinary_rod; diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp index 1ebf18efa94..b33a3030e1d 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp @@ -144,7 +144,7 @@ float KaelthasWeapons[7][5] = #define GRAVITY_Z 70.0f #define TIME_PHASE_2_3 120000 -#define TIME_PHASE_3_4 120000 +#define TIME_PHASE_3_4 180000 #define KAEL_VISIBLE_RANGE 50.0f #define ROOM_BASE_Z 49.0f @@ -160,6 +160,7 @@ struct TRINITY_DLL_DECL advisorbase_ai : public ScriptedAI advisorbase_ai(Creature *c) : ScriptedAI(c) { pInstance = c->GetInstanceData(); + FakeDeath = false; } void MoveInLineOfSight(Unit *who) @@ -180,6 +181,9 @@ struct TRINITY_DLL_DECL advisorbase_ai : public ScriptedAI void Reset() { + if (FakeDeath) + m_creature->SetMaxHealth(m_creature->GetMaxHealth() / 2); + m_creature->SetNoCallAssistance(true); FakeDeath = false; DelayRes_Timer = 0; @@ -238,7 +242,10 @@ struct TRINITY_DLL_DECL advisorbase_ai : public ScriptedAI m_creature->SetUInt64Value(UNIT_FIELD_TARGET,0); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveIdle(); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,UNIT_STAND_STATE_DEAD); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + + // Double health for Phase 3 + m_creature->SetMaxHealth(m_creature->GetMaxHealth() * 2); if (pInstance->GetData(DATA_KAELTHASEVENT) == 3) JustDied(pKiller); diff --git a/src/bindings/scripts/scripts/zone/westfall/westfall.cpp b/src/bindings/scripts/scripts/zone/westfall/westfall.cpp index f9e04a5186f..3548e9ee089 100644 --- a/src/bindings/scripts/scripts/zone/westfall/westfall.cpp +++ b/src/bindings/scripts/scripts/zone/westfall/westfall.cpp @@ -84,24 +84,23 @@ struct TRINITY_DLL_DECL npc_daphne_stilwellAI : public npc_escortAI { case 4: SetEquipmentSlots(false, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE, EQUIP_ID_RIFLE); - SetSheathState(SHEATH_STATE_RANGED); + m_creature->SetSheath(SHEATH_STATE_RANGED); m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING_NOSHEATHE); break; - case 6: - SetCombatMovement(false); - break; case 7: m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836, 1569.755, 54.267, 4.230, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697, 1569.124, 54.421, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237, 1568.307, 54.620, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); break; case 8: + m_creature->SetSheath(SHEATH_STATE_RANGED); m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836, 1569.755, 54.267, 4.230, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697, 1569.124, 54.421, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237, 1568.307, 54.620, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.037, 1570.213, 54.961, 4.283, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); break; case 9: + m_creature->SetSheath(SHEATH_STATE_RANGED); m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836, 1569.755, 54.267, 4.230, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697, 1569.124, 54.421, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237, 1568.307, 54.620, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); @@ -115,9 +114,9 @@ struct TRINITY_DLL_DECL npc_daphne_stilwellAI : public npc_escortAI DoScriptText(SAY_DS_PROLOGUE, m_creature); break; case 13: - SetSheathState(SHEATH_STATE_UNARMED); - m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING_NOSHEATHE); SetEquipmentSlots(true); + m_creature->SetSheath(SHEATH_STATE_UNARMED); + m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING_NOSHEATHE); break; case 17: pPlayer->GroupEventHappens(QUEST_TOME_VALOR, m_creature); @@ -125,6 +124,21 @@ struct TRINITY_DLL_DECL npc_daphne_stilwellAI : public npc_escortAI } } + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, false)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + m_creature->GetMotionMaster()->MoveChase(pWho, 30.0f); + } + } + void JustSummoned(Creature* pSummoned) { pSummoned->AI()->AttackStart(m_creature); @@ -148,14 +162,10 @@ struct TRINITY_DLL_DECL npc_daphne_stilwellAI : public npc_escortAI if (uiShootTimer < diff) { - if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) - SetCombatMovement(true); - else - SetCombatMovement(false); - uiShootTimer = 1500; - DoCast(m_creature->getVictim(), SPELL_SHOOT); + if (!m_creature->IsWithinDist(m_creature->getVictim(), ATTACK_DISTANCE)) + DoCast(m_creature->getVictim(), SPELL_SHOOT); }else uiShootTimer -= diff; } }; diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_thekal.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_thekal.cpp index 76d3d5268e9..5cd5fc61d8f 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/boss_thekal.cpp +++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_thekal.cpp @@ -117,8 +117,7 @@ struct TRINITY_DLL_DECL boss_thekalAI : public ScriptedAI if(pInstance->GetData(DATA_LORKHANISDEAD)) { //Resurrect LorKhan - Unit *pLorKhan = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LORKHAN)); - if(pLorKhan) + if(Unit *pLorKhan = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LORKHAN))) { pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); pLorKhan->setFaction(14); @@ -336,8 +335,7 @@ struct TRINITY_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI if(pInstance->GetData(DATA_THEKALISFAKEDEAD)) { //Resurrect Thekal - Unit *pThekal = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_THEKAL)); - if(pThekal) + if(Unit *pThekal = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_THEKAL))) { pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -349,8 +347,7 @@ struct TRINITY_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI if(pInstance->GetData(DATA_ZATHISDEAD)) { //Resurrect Zath - Unit *pZath = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_ZATH)); - if(pZath) + if(Unit *pZath = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_ZATH))) { pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -473,8 +470,7 @@ struct TRINITY_DLL_DECL mob_zealot_zathAI : public ScriptedAI if(pInstance->GetData(DATA_LORKHANISDEAD)) { //Resurrect LorKhan - Unit *pLorKhan = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LORKHAN)); - if(pLorKhan) + if(Unit *pLorKhan = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LORKHAN))) { pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -486,8 +482,7 @@ struct TRINITY_DLL_DECL mob_zealot_zathAI : public ScriptedAI if(pInstance->GetData(DATA_THEKALISFAKEDEAD)) { //Resurrect Thekal - Unit *pThekal = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_THEKAL)); - if(pThekal) + if(Unit *pThekal = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_THEKAL))) { pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); -- cgit v1.2.3 From 93e7fe61ca078139fd837c3a89ea7bd29981c1bf Mon Sep 17 00:00:00 2001 From: Kudlaty Date: Sat, 25 Jul 2009 22:18:34 +0200 Subject: Add missing file from rev 4594 --HG-- branch : trunk --- sql/updates/4594_world_scripts.sql | 3 + .../zone/magisters_terrace/magisters_terrace.cpp | 145 +++++++++++++++++++++ 2 files changed, 148 insertions(+) create mode 100644 sql/updates/4594_world_scripts.sql create mode 100644 src/bindings/scripts/scripts/zone/magisters_terrace/magisters_terrace.cpp (limited to 'sql') diff --git a/sql/updates/4594_world_scripts.sql b/sql/updates/4594_world_scripts.sql new file mode 100644 index 00000000000..ebdcb7f761f --- /dev/null +++ b/sql/updates/4594_world_scripts.sql @@ -0,0 +1,3 @@ +UPDATE `item_template` SET `ScriptName`='item_dart_gun' WHERE `entry`=44222; + +UPDATE `creature_template` SET `ScriptName`='npc_kalecgos' WHERE `entry` IN (24844, 24848); diff --git a/src/bindings/scripts/scripts/zone/magisters_terrace/magisters_terrace.cpp b/src/bindings/scripts/scripts/zone/magisters_terrace/magisters_terrace.cpp new file mode 100644 index 00000000000..18694fe15e6 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/magisters_terrace/magisters_terrace.cpp @@ -0,0 +1,145 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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: Magisters_Terrace +SD%Complete: 100 +SDComment: Quest support: 11490(post-event) +SDCategory: Magisters Terrace +EndScriptData */ + +/* ContentData +npc_kalecgos +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_kalecgos +######*/ + +enum +{ + SPELL_TRANSFORM_TO_KAEL = 44670, + NPC_KAEL = 24848, //human form entry + POINT_ID_LAND = 1 +}; + +const float afKaelLandPoint[] = {225.045, -276.236, -5.434}; + +#define GOSSIP_ITEM_KAEL_1 "Who are you?" +#define GOSSIP_ITEM_KAEL_2 "What can we do to assist you?" +#define GOSSIP_ITEM_KAEL_3 "What brings you to the Sunwell?" +#define GOSSIP_ITEM_KAEL_4 "You're not alone here?" +#define GOSSIP_ITEM_KAEL_5 "What would Kil'jaeden want with a mortal woman?" + +// This is friendly keal that appear after used Orb. +// If we assume DB handle summon, summon appear somewhere outside the platform where Orb is +struct TRINITY_DLL_DECL npc_kalecgosAI : public ScriptedAI +{ + npc_kalecgosAI(Creature* pCreature) : ScriptedAI(pCreature) { } + + uint32 m_uiTransformTimer; + + void Reset() + { + m_uiTransformTimer = 0; + + // we must assume he appear as dragon somewhere outside the platform of orb, and then move directly to here + if (m_creature->GetEntry() != NPC_KAEL) + m_creature->GetMotionMaster()->MovePoint(POINT_ID_LAND, afKaelLandPoint[0], afKaelLandPoint[1], afKaelLandPoint[2]); + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE) + return; + + if (uiPointId == POINT_ID_LAND) + m_uiTransformTimer = MINUTE*IN_MILISECONDS; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiTransformTimer) + { + if (m_uiTransformTimer < uiDiff) + { + // Transform and update entry, now ready for quest/read gossip + m_creature->CastSpell(m_creature,SPELL_TRANSFORM_TO_KAEL,false); + m_creature->UpdateEntry(NPC_KAEL); + + m_uiTransformTimer = 0; + }else m_uiTransformTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_kalecgos(Creature* pCreature) +{ + return new npc_kalecgosAI(pCreature); +} + +bool GossipHello_npc_kalecgos(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + pPlayer->SEND_GOSSIP_MENU(12498, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_kalecgos(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(12500, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(12502, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(12606, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->SEND_GOSSIP_MENU(12607, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->SEND_GOSSIP_MENU(12608, pCreature->GetGUID()); + break; + } + + return true; +} + +void AddSC_magisters_terrace() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_kalecgos"; + newscript->GetAI = &GetAI_npc_kalecgos; + newscript->pGossipHello = &GossipHello_npc_kalecgos; + newscript->pGossipSelect = &GossipSelect_npc_kalecgos; + newscript->RegisterSelf(); +} -- cgit v1.2.3 From 3c046356942193756987dc646b30dcf408a1630f Mon Sep 17 00:00:00 2001 From: Kudlaty Date: Sun, 26 Jul 2009 02:00:35 +0200 Subject: Fix build on windows. Fix command ticket viewname - thx Deadlyskunk for point this fix setlink command group, add missing commands to db - patch by XTElite1 --HG-- branch : trunk --- sql/updates/4597_world_command.sql | 4 ++++ sql/world.sql | 2 ++ src/game/Chat.cpp | 2 +- src/game/Level1.cpp | 5 ++++- src/game/ReputationMgr.cpp | 2 +- src/game/ReputationMgr.h | 1 - 6 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 sql/updates/4597_world_command.sql (limited to 'sql') diff --git a/sql/updates/4597_world_command.sql b/sql/updates/4597_world_command.sql new file mode 100644 index 00000000000..374cbb2c632 --- /dev/null +++ b/sql/updates/4597_world_command.sql @@ -0,0 +1,4 @@ +DELETE FROM `command` WHERE `name` IN ('reload creature_linked_respawn', 'npc setlink'); +INSERT INTO `command` (`name`,`security`,`help`) VALUES +('reload creature_linked_respawn',2,'Syntax: .reload creature_linked_respawn\r\nReload creature_linked_respawn table.'), +('npc setlink',2,'Syntax: .npc setlink $creatureGUID\r\n\r\nLinks respawn of selected creature to the condition that $creatureGUID defined is alive.'); diff --git a/sql/world.sql b/sql/world.sql index 302d36eccdb..9139f18470c 100644 --- a/sql/world.sql +++ b/sql/world.sql @@ -490,6 +490,7 @@ INSERT INTO `command` VALUES ('npc info',3,'Syntax: .npc info\r\n\r\nDisplay a list of details for the selected creature.\r\n\r\nThe list includes:\r\n- GUID, Faction, NPC flags, Entry ID, Model ID,\r\n- Level,\r\n- Health (current/maximum),\r\n\r\n- Field flags, dynamic flags, faction template, \r\n- Position information,\r\n- and the creature type, e.g. if the creature is a vendor.'), ('npc move',2,'Syntax: .npc move [#creature_guid]\r\n\r\nMove the targeted creature spawn point to your coordinates.'), ('npc playemote',3,'Syntax: .npc playemote #emoteid\r\n\r\nMake the selected creature emote with an emote of id #emoteid.'), +('npc setlink',2,'Syntax: .npc setlink $creatureGUID\r\n\r\nLinks respawn of selected creature to the condition that $creatureGUID defined is alive.'), ('npc say',1,'Syntax: .npc say $message\nMake selected creature say specified message.'), ('npc setdeathstate',2,'Syntax: .npc setdeathstate on/off\r\n\r\nSet default death state (dead/alive) for npc at spawn.'), ('npc setmodel',2,'Syntax: .npc setmodel #displayid\r\n\r\nChange the model id of the selected creature to #displayid.'), @@ -534,6 +535,7 @@ INSERT INTO `command` VALUES ('reload config',3,'Syntax: .reload config\r\n\r\nReload config settings (by default stored in trinityd.conf). Not all settings can be change at reload: some new setting values will be ignored until restart, some values will applied with delay or only to new objects/maps, some values will explicitly rejected to change at reload.'), ('reload creature_involvedrelation',3,'Syntax: .reload creature_involvedrelation\nReload creature_involvedrelation table.'), ('reload creature_loot_template',3,'Syntax: .reload creature_loot_template\nReload creature_loot_template table.'), +('reload creature_linked_respawn',2,'Syntax: .reload creature_linked_respawn\r\nReload creature_linked_respawn table.'), ('reload creature_questrelation',3,'Syntax: .reload creature_questrelation\nReload creature_questrelation table.'), ('reload disenchant_loot_template',3,'Syntax: .reload disenchant_loot_template\nReload disenchant_loot_template table.'), ('reload event_scripts',3,'Syntax: .reload event_scripts\nReload event_scripts table.'), diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index b14a7f94e6e..4dcc603afc4 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -373,6 +373,7 @@ ChatCommand * ChatHandler::getCommandTable() { "tame", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcTameCommand, "", NULL }, { "setdeathstate", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetDeathStateCommand, "", NULL }, { "addformation", SEC_MODERATOR, false, &ChatHandler::HandleNpcAddFormationCommand, "", NULL }, + { "setlink", SEC_MODERATOR, false, &ChatHandler::HandleNpcSetLinkCommand, "", NULL }, //{ TODO: fix or remove this commands { "addweapon", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcAddWeaponCommand, "", NULL }, @@ -547,7 +548,6 @@ ChatCommand * ChatHandler::getCommandTable() { { "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL }, { "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCommand, "", NULL }, - { "setlink", SEC_MODERATOR, false, &ChatHandler::HandleNpcSetLinkCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; diff --git a/src/game/Level1.cpp b/src/game/Level1.cpp index 8e234057f94..6c344b29903 100644 --- a/src/game/Level1.cpp +++ b/src/game/Level1.cpp @@ -400,7 +400,10 @@ bool ChatHandler::HandleGMTicketGetByNameCommand(const char* args) if(!*args) return false; - Player *plr = objmgr.GetPlayer(args); + std::string name = (char*)args; + normalizePlayerName(name); + + Player *plr = objmgr.GetPlayer(name.c_str()); if(!plr) { SendSysMessage(LANG_NO_PLAYERS_FOUND); diff --git a/src/game/ReputationMgr.cpp b/src/game/ReputationMgr.cpp index 8e6aa511d21..7536fb54f03 100644 --- a/src/game/ReputationMgr.cpp +++ b/src/game/ReputationMgr.cpp @@ -255,7 +255,7 @@ bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, in if(incremental) { // int32 *= float cause one point loss? - standing = roundf( (float)standing * sWorld.getRate(RATE_REPUTATION_GAIN) ); + standing = floor( (float)standing * sWorld.getRate(RATE_REPUTATION_GAIN) + 0.5 ); standing += itr->second.Standing + BaseRep; } diff --git a/src/game/ReputationMgr.h b/src/game/ReputationMgr.h index 494f675d20a..d63c518eb82 100644 --- a/src/game/ReputationMgr.h +++ b/src/game/ReputationMgr.h @@ -24,7 +24,6 @@ #include "Language.h" #include "DBCStructure.h" #include -#include static uint32 ReputationRankStrIndex[MAX_REPUTATION_RANK] = { -- cgit v1.2.3 From 3409ddf1a86f31ebc4fca3fa5ca4fb606fed14eb Mon Sep 17 00:00:00 2001 From: Anubisss Date: Sun, 26 Jul 2009 03:25:18 +0200 Subject: *Correct damage for Shield of Righteousness. --HG-- branch : trunk --- sql/FULL/world_spell_full.sql | 1 - sql/updates/4598_world_spell_bonus_data.sql | 1 + src/game/SpellEffects.cpp | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 sql/updates/4598_world_spell_bonus_data.sql (limited to 'sql') diff --git a/sql/FULL/world_spell_full.sql b/sql/FULL/world_spell_full.sql index 980c29c9fd8..88b6d86de66 100644 --- a/sql/FULL/world_spell_full.sql +++ b/sql/FULL/world_spell_full.sql @@ -1630,7 +1630,6 @@ INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus` (25742, 0.07, -1, 0.039, -1, 'Paladin - Seal of Righteousness Dummy Proc'), (53719, 0, 0, 0, 0, 'Paladin - Seal of the Martyr Proc Enemy'), (53718, 0, 0, 0, 0, 'Paladin - Seal of the Martyr Proc Self'), -(53600, 0, 0, 0, 0, 'Paladin - Shield of Righteousness'), (32546, 0.8068, -1, -1, -1, 'Priest - Binding Heal'), (27813, 0, 0, 0, 0, 'Priest - Blessed Recovery Rank 1'), (34861, 0.402, -1, -1, -1, 'Priest - Circle of Healing'), diff --git a/sql/updates/4598_world_spell_bonus_data.sql b/sql/updates/4598_world_spell_bonus_data.sql new file mode 100644 index 00000000000..0127e88b5a7 --- /dev/null +++ b/sql/updates/4598_world_spell_bonus_data.sql @@ -0,0 +1 @@ +DELETE FROM `spell_bonus_data` WHERE `entry` = 53600; diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 0ec93efa83e..7ee0289e329 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -619,7 +619,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx) // Shield of Righteousness else if(m_spellInfo->SpellFamilyFlags[1]&0x00100000) { - damage+=int32(m_caster->GetShieldBlockValue()); + damage += int32(m_caster->GetShieldBlockValue() * 1.3f); } break; } -- cgit v1.2.3 From 190863e5a58364a9f42336e300c836d9ec6242ad Mon Sep 17 00:00:00 2001 From: QAston Date: Sun, 26 Jul 2009 19:58:01 +0200 Subject: *Update procflags for Imp.Shadowform. *Use item speed value instead of attack speed value for enchant PPM - by MaS0n. *Correctly apply cooldown to Improved leader of the pack mana regen. *Do not refresh duration when stack from aura is dropped - by Apoc --HG-- branch : trunk --- sql/FULL/world_spell_full.sql | 4 ++-- sql/updates/4601_world_spell_proc_event.sql | 4 ++++ src/bindings/scripts/scripts/npc/npcs_special.cpp | 3 ++- src/game/Player.cpp | 5 +---- src/game/SpellAuras.cpp | 7 ++++++- src/game/Unit.cpp | 10 ++++++---- 6 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 sql/updates/4601_world_spell_proc_event.sql (limited to 'sql') diff --git a/sql/FULL/world_spell_full.sql b/sql/FULL/world_spell_full.sql index 88b6d86de66..7d1e6fd12f4 100644 --- a/sql/FULL/world_spell_full.sql +++ b/sql/FULL/world_spell_full.sql @@ -1102,8 +1102,8 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell ( 47535, 0x00, 6, 0x00000001, 0x00000000, 0x00000000, 0x00004000, 0x00002000, 0, 0, 12), -- Rapture (Rank 1) ( 47536, 0x00, 6, 0x00000001, 0x00000000, 0x00000000, 0x00004000, 0x00002000, 0, 0, 12), -- Rapture (Rank 2) ( 47537, 0x00, 6, 0x00000001, 0x00000000, 0x00000000, 0x00004000, 0x00002000, 0, 0, 12), -- Rapture (Rank 3) -( 47569, 0x00, 6, 0x00004000, 0x00000000, 0x00000000, 0x00000400, 0x00000000, 0, 50, 0), -- Improved Shadowform (Rank 1) -( 47570, 0x00, 6, 0x00004000, 0x00000000, 0x00000000, 0x00000400, 0x00000000, 0, 100, 0), -- Improved Shadowform (Rank 2) +( 47569, 0x00, 6, 0x00004000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0, 50, 0), -- Improved Shadowform (Rank 1) +( 47570, 0x00, 6, 0x00004000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0, 100, 0), -- Improved Shadowform (Rank 2) ( 47580, 0x00, 6, 0x00000000, 0x00000000, 0x00000040, 0x00000000, 0x00010000, 0, 0, 0), -- Pain and Suffering (Rank 1) ( 47581, 0x00, 6, 0x00000000, 0x00000000, 0x00000040, 0x00000000, 0x00010000, 0, 0, 0), -- Pain and Suffering (Rank 2) ( 47582, 0x00, 6, 0x00000000, 0x00000000, 0x00000040, 0x00000000, 0x00010000, 0, 0, 0), -- Pain and Suffering (Rank 3) diff --git a/sql/updates/4601_world_spell_proc_event.sql b/sql/updates/4601_world_spell_proc_event.sql new file mode 100644 index 00000000000..516cd070482 --- /dev/null +++ b/sql/updates/4601_world_spell_proc_event.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_proc_event` WHERE `entry` IN(47569, 47570); +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +( 47569, 0x00, 6, 0x00004000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0, 50, 0), -- Improved Shadowform (Rank 1) +( 47570, 0x00, 6, 0x00004000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0, 100, 0); -- Improved Shadowform (Rank 2) \ No newline at end of file diff --git a/src/bindings/scripts/scripts/npc/npcs_special.cpp b/src/bindings/scripts/scripts/npc/npcs_special.cpp index 6c44b5b9ae3..9bf3113a9c6 100644 --- a/src/bindings/scripts/scripts/npc/npcs_special.cpp +++ b/src/bindings/scripts/scripts/npc/npcs_special.cpp @@ -1639,9 +1639,10 @@ CreatureAI* GetAI_mob_mojo(Creature *_Creature) struct TRINITY_DLL_DECL npc_mirror_image : public SpellAI { npc_mirror_image(Creature *c) : SpellAI(c) {} - Unit * owner; + void Reset() { + Unit * owner = NULL; if (m_creature->isSummon()) owner = ((TempSummon*)me)->GetOwner(); if (!owner) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 3f0add0373b..ec31194680c 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -7243,10 +7243,7 @@ void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32 float chance = pEnchant->amount[s] != 0 ? float(pEnchant->amount[s]) : GetWeaponProcChance(); if (entry && entry->PPMChance) - { - uint32 WeaponSpeed = GetAttackTime(attType); - chance = GetPPMProcChance(WeaponSpeed, entry->PPMChance, spellInfo); - } + chance = GetPPMProcChance(proto->Delay, entry->PPMChance, spellInfo); else if (entry && entry->customChance) chance = entry->customChance; diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 5f9a3d6eeae..cb6f2caf31f 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1388,6 +1388,7 @@ void Aura::_RemoveAura() void Aura::SetStackAmount(uint8 stackAmount, bool applied) { + bool refresh = stackAmount >= m_stackAmount; if (stackAmount != m_stackAmount) { m_stackAmount = stackAmount; @@ -1399,7 +1400,11 @@ void Aura::SetStackAmount(uint8 stackAmount, bool applied) } } } - RefreshAura(); + + if (refresh) + RefreshAura(); + else + SendAuraUpdate(); } bool Aura::modStackAmount(int32 num) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index cd378c94586..69f42896dbd 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -5843,10 +5843,13 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger basepoints0 = triggerAmount * GetMaxHealth() / 100; target = this; triggered_spell_id = 34299; - if (triggeredByAura->GetCaster() != this) + if (triggeredByAura->GetCasterGUID() != GetGUID()) break; int32 basepoints1 = triggerAmount * 2; - CastCustomSpell(this,60889,&basepoints1,0,0,true,0,triggeredByAura); + // Improved Leader of the Pack + // Check cooldown of heal spell cooldown + if (GetTypeId()==TYPEID_PLAYER && !((Player *)this)->HasSpellCooldown(34299)) + CastCustomSpell(this,60889,&basepoints1,0,0,true,0,triggeredByAura); break; } // Healing Touch (Dreamwalker Raiment set) @@ -10451,8 +10454,7 @@ float Unit::GetPPMProcChance(uint32 WeaponSpeed, float PPM, const SpellEntry * s if(Player* modOwner = GetSpellModOwner()) modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_PROC_PER_MINUTE,PPM); - uint32 result = uint32((WeaponSpeed * PPM) / 600.0f); // result is chance in percents (probability = Speed_in_sec * (PPM / 60)) - return result; + return uint32((WeaponSpeed * PPM) / 600.0f); // result is chance in percents (probability = Speed_in_sec * (PPM / 60)) } void Unit::Mount(uint32 mount) -- cgit v1.2.3