From ca8f0a53b3a9b146039b5be5e0dea246bf37a538 Mon Sep 17 00:00:00 2001 From: XTZGZoReX Date: Mon, 7 Jun 2010 01:44:40 +0200 Subject: * Cleanup in sql directory. --HG-- branch : trunk --- sql/updates/2.4.3_old/CMakeLists.txt | 4 +--- sql/updates/3.0.9_old/CMakeLists.txt | 4 +--- sql/updates/3.1.3_old/CMakeLists.txt | 4 +--- sql/updates/3.2.2a_old/CMakeLists.txt | 4 +--- sql/updates/3.3.2_old/CMakeLists.txt | 4 +--- sql/updates/3.3.3a_old/CMakeLists.txt | 4 +--- sql/updates/CMakeLists.txt | 4 +--- 7 files changed, 7 insertions(+), 21 deletions(-) (limited to 'sql/updates') diff --git a/sql/updates/2.4.3_old/CMakeLists.txt b/sql/updates/2.4.3_old/CMakeLists.txt index 229a6de626c..585813a934b 100644 --- a/sql/updates/2.4.3_old/CMakeLists.txt +++ b/sql/updates/2.4.3_old/CMakeLists.txt @@ -1,5 +1,3 @@ FILE(GLOB _SQL_243 *.sql) -INSTALL(FILES -${_SQL_243} -DESTINATION share/trinity/sql/updates/2.4.3_updates) \ No newline at end of file +INSTALL(FILES ${_SQL_243} DESTINATION share/trinity/sql/updates/2.4.3_old) \ No newline at end of file diff --git a/sql/updates/3.0.9_old/CMakeLists.txt b/sql/updates/3.0.9_old/CMakeLists.txt index 7d2b2d975d3..d09917d76f9 100644 --- a/sql/updates/3.0.9_old/CMakeLists.txt +++ b/sql/updates/3.0.9_old/CMakeLists.txt @@ -1,5 +1,3 @@ FILE(GLOB _SQL_309 *.sql) -INSTALL(FILES -${_SQL_309} -DESTINATION share/trinity/sql/updates/3.0.9_old) \ No newline at end of file +INSTALL(FILES ${_SQL_309} DESTINATION share/trinity/sql/updates/3.0.9_old) \ No newline at end of file diff --git a/sql/updates/3.1.3_old/CMakeLists.txt b/sql/updates/3.1.3_old/CMakeLists.txt index 1c99a2be619..5a99663dff5 100644 --- a/sql/updates/3.1.3_old/CMakeLists.txt +++ b/sql/updates/3.1.3_old/CMakeLists.txt @@ -1,5 +1,3 @@ FILE(GLOB _SQL_313 *.sql) -INSTALL(FILES -${_SQL_313} -DESTINATION share/trinity/sql/updates/3.1.3_old) \ No newline at end of file +INSTALL(FILES ${_SQL_313} DESTINATION share/trinity/sql/updates/3.1.3_old) \ No newline at end of file diff --git a/sql/updates/3.2.2a_old/CMakeLists.txt b/sql/updates/3.2.2a_old/CMakeLists.txt index e6193267b8a..391d4895850 100644 --- a/sql/updates/3.2.2a_old/CMakeLists.txt +++ b/sql/updates/3.2.2a_old/CMakeLists.txt @@ -1,5 +1,3 @@ FILE(GLOB _SQL_322 *.sql) -INSTALL(FILES -${_SQL_322} -DESTINATION share/trinity/sql/updates/3.2.2a_old) \ No newline at end of file +INSTALL(FILES ${_SQL_322} DESTINATION share/trinity/sql/updates/3.2.2a_old) \ No newline at end of file diff --git a/sql/updates/3.3.2_old/CMakeLists.txt b/sql/updates/3.3.2_old/CMakeLists.txt index 87734d93da3..75f051dcede 100644 --- a/sql/updates/3.3.2_old/CMakeLists.txt +++ b/sql/updates/3.3.2_old/CMakeLists.txt @@ -1,5 +1,3 @@ FILE(GLOB _SQL_332 *.sql) -INSTALL(FILES -${_SQL_332} -DESTINATION share/trinity/sql/updates/3.3.2_old) \ No newline at end of file +INSTALL(FILES ${_SQL_332} DESTINATION share/trinity/sql/updates/3.3.2_old) \ No newline at end of file diff --git a/sql/updates/3.3.3a_old/CMakeLists.txt b/sql/updates/3.3.3a_old/CMakeLists.txt index 94143fe1e5b..8557b4d4bf3 100644 --- a/sql/updates/3.3.3a_old/CMakeLists.txt +++ b/sql/updates/3.3.3a_old/CMakeLists.txt @@ -1,5 +1,3 @@ FILE(GLOB _SQL_333 *.sql) -INSTALL(FILES -${_SQL_333} -DESTINATION share/trinity/sql/updates/3.3.3a_old) \ No newline at end of file +INSTALL(FILES ${_SQL_333} DESTINATION share/trinity/sql/updates/3.3.3a_old) \ No newline at end of file diff --git a/sql/updates/CMakeLists.txt b/sql/updates/CMakeLists.txt index 68639a4b265..0d2d6cd6bfa 100644 --- a/sql/updates/CMakeLists.txt +++ b/sql/updates/CMakeLists.txt @@ -7,6 +7,4 @@ add_subdirectory(3.3.3a_old) FILE(GLOB _SQL_UPDATES *.sql) -INSTALL(FILES -${_SQL_UPDATES} -DESTINATION share/trinity/sql/updates) +INSTALL(FILES ${_SQL_UPDATES} DESTINATION share/trinity/sql/updates) -- cgit v1.2.3 From 04955cfb235e7dd3803a486ec1d198401446278f Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Tue, 8 Jun 2010 15:41:37 +0200 Subject: Fix Infusion of Light talent (53569,53576), properly cast HoT on target after Flash of Light cast when target has Sacred Shield active. Big thanks to Shauren, QAston and JohnHoliver. --HG-- branch : trunk --- sql/updates/8510_world_spell_proc_event.sql | 1 + sql/world_database.sql | 4 ++-- src/server/game/Entities/Unit/Unit.cpp | 20 +++++++++++++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 sql/updates/8510_world_spell_proc_event.sql (limited to 'sql/updates') diff --git a/sql/updates/8510_world_spell_proc_event.sql b/sql/updates/8510_world_spell_proc_event.sql new file mode 100644 index 00000000000..c9d0a9cbc69 --- /dev/null +++ b/sql/updates/8510_world_spell_proc_event.sql @@ -0,0 +1 @@ +UPDATE spell_proc_event SET SpellFamilyMask0 = SpellFamilyMask0 | 0x40000000, procEx = ProcEx | 0x0000001 WHERE entry IN(53569,53576); diff --git a/sql/world_database.sql b/sql/world_database.sql index 692927a2fdf..60c05bd068f 100644 --- a/sql/world_database.sql +++ b/sql/world_database.sql @@ -6947,8 +6947,8 @@ INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFam ( 53551, 0x00, 10, 0x00001000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Sacred Cleansing (Rank 1) ( 53552, 0x00, 10, 0x00001000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Sacred Cleansing (Rank 2) ( 53553, 0x00, 10, 0x00001000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Sacred Cleansing (Rank 3) -( 53569, 0x00, 10, 0x00200000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Infusion of Light (Rank 1) -( 53576, 0x00, 10, 0x00200000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Infusion of Light (Rank 2) +( 53569, 0x00, 10, 0x40200000, 0x00010000, 0x00000000, 0x00000000, 0x00000003, 0, 0, 0), -- Infusion of Light (Rank 1) +( 53576, 0x00, 10, 0x40200000, 0x00010000, 0x00000000, 0x00000000, 0x00000003, 0, 0, 0), -- Infusion of Light (Rank 2) ( 53646, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Demonic Pact (Rank 1) ( 53671, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Judgements of the Pure (Rank 1) ( 53672, 0x00, 10, 0x00200000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Infusion of Light diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 703ea029460..a5a3ea268f3 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -7742,12 +7742,30 @@ bool Unit::HandleModDamagePctTakenAuraProc(Unit *pVictim, uint32 /*damage*/, Aur // Used in case when access to whole aura is needed // All procs should be handled like this... -bool Unit::HandleAuraProc(Unit * /*pVictim*/, uint32 damage, Aura * triggeredByAura, SpellEntry const * procSpell, uint32 /*procFlag*/, uint32 procEx, uint32 /*cooldown*/, bool * handled) +bool Unit::HandleAuraProc(Unit * pVictim, uint32 damage, Aura * triggeredByAura, SpellEntry const * procSpell, uint32 /*procFlag*/, uint32 procEx, uint32 /*cooldown*/, bool * handled) { SpellEntry const *dummySpell = triggeredByAura->GetSpellProto(); switch(dummySpell->SpellFamilyName) { + case SPELLFAMILY_PALADIN: + { + // Infusion of Light + if (dummySpell->SpellIconID == 3021) + { + // Flash of Light Heal over Time + if (procSpell->SpellFamilyFlags[0] & 0x40000000 && procSpell->SpellIconID == 242) + { + *handled = true; + if (pVictim->HasAura(53601)) + { + int32 bp0 = (damage/12) * dummySpell->CalculateSimpleValue(2)/100; + CastCustomSpell(pVictim, 66922, &bp0, NULL, NULL, true); + return true; + } + } + } + }break; case SPELLFAMILY_MAGE: { // Combustion -- cgit v1.2.3 From e5aa4f7be97ca7c03cf9d8f5f3547f01b8c9cd3e Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Tue, 8 Jun 2010 16:12:43 +0200 Subject: Only proc Infusion of Light (active buff) on Holy Shock criticals. (Problem introduced in previous fix) Author: Shauren --HG-- branch : trunk --- sql/updates/8511_world_spell_proc_event.sql | 1 + sql/world_database.sql | 4 ++-- src/server/game/Entities/Unit/Unit.cpp | 13 +++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 sql/updates/8511_world_spell_proc_event.sql (limited to 'sql/updates') diff --git a/sql/updates/8511_world_spell_proc_event.sql b/sql/updates/8511_world_spell_proc_event.sql new file mode 100644 index 00000000000..91cc7841f97 --- /dev/null +++ b/sql/updates/8511_world_spell_proc_event.sql @@ -0,0 +1 @@ +UPDATE spell_proc_event SET procEx = 0x0 WHERE entry IN(53569,53576); diff --git a/sql/world_database.sql b/sql/world_database.sql index 60c05bd068f..b589f3b1b0f 100644 --- a/sql/world_database.sql +++ b/sql/world_database.sql @@ -6947,8 +6947,8 @@ INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFam ( 53551, 0x00, 10, 0x00001000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Sacred Cleansing (Rank 1) ( 53552, 0x00, 10, 0x00001000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Sacred Cleansing (Rank 2) ( 53553, 0x00, 10, 0x00001000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Sacred Cleansing (Rank 3) -( 53569, 0x00, 10, 0x40200000, 0x00010000, 0x00000000, 0x00000000, 0x00000003, 0, 0, 0), -- Infusion of Light (Rank 1) -( 53576, 0x00, 10, 0x40200000, 0x00010000, 0x00000000, 0x00000000, 0x00000003, 0, 0, 0), -- Infusion of Light (Rank 2) +( 53569, 0x00, 10, 0x40200000, 0x00010000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Infusion of Light (Rank 1) +( 53576, 0x00, 10, 0x40200000, 0x00010000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Infusion of Light (Rank 2) ( 53646, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Demonic Pact (Rank 1) ( 53671, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Judgements of the Pure (Rank 1) ( 53672, 0x00, 10, 0x00200000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Infusion of Light diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index a5a3ea268f3..e2493e50e3c 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -7753,7 +7753,7 @@ bool Unit::HandleAuraProc(Unit * pVictim, uint32 damage, Aura * triggeredByAura, // Infusion of Light if (dummySpell->SpellIconID == 3021) { - // Flash of Light Heal over Time + // Flash of Light HoT on Flash of Light when Sacred Shield active if (procSpell->SpellFamilyFlags[0] & 0x40000000 && procSpell->SpellIconID == 242) { *handled = true; @@ -7763,9 +7763,14 @@ bool Unit::HandleAuraProc(Unit * pVictim, uint32 damage, Aura * triggeredByAura, CastCustomSpell(pVictim, 66922, &bp0, NULL, NULL, true); return true; } - } - } - }break; + } + // but should not proc on non-critical Holy Shocks + else if ((procSpell->SpellFamilyFlags[0] & 0x200000 || procSpell->SpellFamilyFlags[1] & 0x10000) && !(procEx & PROC_EX_CRITICAL_HIT)) + *handled = true; + break; + } + break; + } case SPELLFAMILY_MAGE: { // Combustion -- cgit v1.2.3 From ae2f8d70a04e2520e0863a2fbeb4079073ba93da Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 8 Jun 2010 17:19:36 +0200 Subject: Added support for reloading creature_onkill_reputation table Commented ace in externals/CmakeLists.txt and moved zlib before g3dlite, requested by click --HG-- branch : trunk --- externals/CMakeLists.txt | 4 ++-- sql/updates/8512_world_command.sql | 3 +++ sql/world_database.sql | 1 + src/server/game/Chat/Chat.cpp | 1 + src/server/game/Chat/Chat.h | 1 + src/server/game/Chat/Commands/Level3.cpp | 8 ++++++++ src/server/game/Globals/ObjectMgr.cpp | 9 ++++++--- 7 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 sql/updates/8512_world_command.sql (limited to 'sql/updates') diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index f74c476ac4c..320a40c7377 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -1,7 +1,7 @@ -add_subdirectory(ace) +#add_subdirectory(ace) #add_subdirectory(bzip2) +add_subdirectory(zlib) add_subdirectory(g3dlite) add_subdirectory(jemalloc) #add_subdirectory(libmpq) add_subdirectory(sockets) -add_subdirectory(zlib) diff --git a/sql/updates/8512_world_command.sql b/sql/updates/8512_world_command.sql new file mode 100644 index 00000000000..6293503d492 --- /dev/null +++ b/sql/updates/8512_world_command.sql @@ -0,0 +1,3 @@ +DELETE FROM `command` WHERE `name`='reload creature_onkill_reputation'; +INSERT INTO `command` VALUES +('reload creature_onkill_reputation','3','Syntax: .reload creature_onkill_reputation\r\nReload creature_onkill_reputation table.'); diff --git a/sql/world_database.sql b/sql/world_database.sql index b589f3b1b0f..9d808f9926e 100644 --- a/sql/world_database.sql +++ b/sql/world_database.sql @@ -571,6 +571,7 @@ INSERT INTO `command` VALUES ('reload creature_involvedrelation',3,'Syntax: .reload creature_involvedrelation\nReload creature_involvedrelation table.'), ('reload creature_linked_respawn',2,'Syntax: .reload creature_linked_respawn\r\nReload creature_linked_respawn table.'), ('reload creature_loot_template',3,'Syntax: .reload creature_loot_template\nReload creature_loot_template table.'), +('reload creature_onkill_reputation','3','Syntax: .reload creature_onkill_reputation\r\nReload creature_onkill_reputation 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/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 0d9f1485d20..66d867e4a69 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -460,6 +460,7 @@ ChatCommand * ChatHandler::getCommandTable() { "creature_involvedrelation", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCreatureQuestInvRelationsCommand,"",NULL }, { "creature_linked_respawn", SEC_GAMEMASTER, true, &ChatHandler::HandleReloadCreatureLinkedRespawnCommand, "", NULL }, { "creature_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesCreatureCommand, "", NULL }, + { "creature_onkill_reputation", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadOnKillReputationCommand, "", NULL }, { "creature_questrelation", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCreatureQuestRelationsCommand, "", NULL }, { "creature_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCreatureTemplateCommand, "", NULL }, //{ "db_script_string", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadDbScriptStringCommand, "", NULL }, diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h index 6aa42995663..8da2979ae82 100644 --- a/src/server/game/Chat/Chat.h +++ b/src/server/game/Chat/Chat.h @@ -364,6 +364,7 @@ class ChatHandler bool HandleReloadEventAISummonsCommand(const char* args); bool HandleReloadEventAIScriptsCommand(const char* args); bool HandleReloadCommandCommand(const char* args); + bool HandleReloadOnKillReputationCommand(const char* args); bool HandleReloadCreatureTemplateCommand(const char* args); bool HandleReloadCreatureQuestRelationsCommand(const char* args); bool HandleReloadCreatureQuestInvRelationsCommand(const char* args); diff --git a/src/server/game/Chat/Commands/Level3.cpp b/src/server/game/Chat/Commands/Level3.cpp index deabbe62871..77d07a6f406 100644 --- a/src/server/game/Chat/Commands/Level3.cpp +++ b/src/server/game/Chat/Commands/Level3.cpp @@ -749,6 +749,14 @@ bool ChatHandler::HandleReloadCommandCommand(const char*) return true; } +bool ChatHandler::HandleReloadOnKillReputationCommand(const char*) +{ + sLog.outString("Re-Loading creature award reputation definitions..."); + objmgr.LoadReputationOnKill(); + SendGlobalGMSysMessage("DB table `creature_onkill_reputation` reloaded."); + return true; +} + bool ChatHandler::HandleReloadCreatureTemplateCommand(const char* args) { if (!*args) diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 7290af9d3fa..07e2607d13c 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -6488,6 +6488,9 @@ void ObjectMgr::LoadCorpses() void ObjectMgr::LoadReputationOnKill() { + // For reload case + mRepOnKill.clear(); + uint32 count = 0; // 0 1 2 @@ -6529,7 +6532,7 @@ void ObjectMgr::LoadReputationOnKill() if (!GetCreatureTemplate(creature_id)) { - sLog.outErrorDb("Table `creature_onkill_reputation` have data for not existed creature entry (%u), skipped",creature_id); + sLog.outErrorDb("Table `creature_onkill_reputation` have data for not existed creature entry (%u), skipped", creature_id); continue; } @@ -6538,7 +6541,7 @@ void ObjectMgr::LoadReputationOnKill() FactionEntry const *factionEntry1 = sFactionStore.LookupEntry(repOnKill.repfaction1); if (!factionEntry1) { - sLog.outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`",repOnKill.repfaction1); + sLog.outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.repfaction1); continue; } } @@ -6548,7 +6551,7 @@ void ObjectMgr::LoadReputationOnKill() FactionEntry const *factionEntry2 = sFactionStore.LookupEntry(repOnKill.repfaction2); if (!factionEntry2) { - sLog.outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`",repOnKill.repfaction2); + sLog.outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.repfaction2); continue; } } -- cgit v1.2.3 From dabeaec4646d70a2e24fd92f9116ccc97ca5796a Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 9 Jun 2010 20:46:56 +0200 Subject: Fixed [T10] Paladin 4P Protection bonus Closes issue #2519. --HG-- branch : trunk --- sql/base/world_database.sql | 3 ++- sql/updates/8565_world_spell_proc_event.sql | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 sql/updates/8565_world_spell_proc_event.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index 9d808f9926e..e4eb0b6e991 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -7207,7 +7207,8 @@ INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFam ( 67702, 0x01, 0, 0x00000000, 0x00000000, 0x00000000, 0x00851154, 0x00000003, 0, 35, 45), -- Item - Coliseum Melee Trinket 25men ( 70807, 0x00, 11, 0x00000000, 0x00000000, 0x00000010, 0x00000000, 0x00000000, 0, 100, 0), -- Item - Shaman T10 Restoration 2P Bonus ( 71519, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 105), -- Item - Deathbringer's Will Trinket Normal -( 71562, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 105); -- Item - Deathbringer's Will Trinket Heroic +( 71562, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 105), -- Item - Deathbringer's Will Trinket Heroic +( 70761, 0x00, 10, 0x00000000, 0x80004000, 0x00000001, 0x00000400, 0x00000000, 0, 0, 0); -- Item - Paladin T10 Protection 4P Bonus /*!40000 ALTER TABLE `spell_proc_event` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/updates/8565_world_spell_proc_event.sql b/sql/updates/8565_world_spell_proc_event.sql new file mode 100644 index 00000000000..b4a378e458c --- /dev/null +++ b/sql/updates/8565_world_spell_proc_event.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_proc_event` WHERE `entry`=70761; +INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES +( 70761, 0x00, 10, 0x00000000, 0x80004000, 0x00000001, 0x00000400, 0x00000000, 0, 0, 0); -- Item - Paladin T10 Protection 4P Bonus -- cgit v1.2.3 From 5dff68e457f6c0111acfc4c55b0dfba464ca72df Mon Sep 17 00:00:00 2001 From: John Holiver Date: Wed, 9 Jun 2010 19:38:15 -0300 Subject: Allow to sell item for: money, extendedCost or money+extendedCost. The new method (money+extende) can be used by using negative values on npc_vendor.ExtendedCost. This one goes dedicated to ZxBiohazardZx. Tnx also to VladimirMangos. --HG-- branch : trunk --- sql/updates/8568_world_npc_vendor.sql | 1 + sql/updates/8568_world_trinity_string.sql | 4 ++++ src/server/game/Chat/Commands/Level2.cpp | 2 +- src/server/game/Entities/Creature/Creature.cpp | 2 +- src/server/game/Entities/Creature/Creature.h | 12 ++++++---- src/server/game/Entities/Player/Player.cpp | 27 +++++++++++----------- src/server/game/Globals/ObjectMgr.cpp | 23 +++++++++--------- src/server/game/Globals/ObjectMgr.h | 4 ++-- .../game/Server/Protocol/Handlers/ItemHandler.cpp | 4 ++-- 9 files changed, 45 insertions(+), 34 deletions(-) create mode 100644 sql/updates/8568_world_npc_vendor.sql create mode 100644 sql/updates/8568_world_trinity_string.sql (limited to 'sql/updates') diff --git a/sql/updates/8568_world_npc_vendor.sql b/sql/updates/8568_world_npc_vendor.sql new file mode 100644 index 00000000000..63645847ef6 --- /dev/null +++ b/sql/updates/8568_world_npc_vendor.sql @@ -0,0 +1 @@ +ALTER TABLE npc_vendor CHANGE COLUMN `ExtendedCost` `ExtendedCost` mediumint(8) NOT NULL default '0' COMMENT 'negative if cost must exclude normal money cost'; diff --git a/sql/updates/8568_world_trinity_string.sql b/sql/updates/8568_world_trinity_string.sql new file mode 100644 index 00000000000..029966a4968 --- /dev/null +++ b/sql/updates/8568_world_trinity_string.sql @@ -0,0 +1,4 @@ +DELETE FROM trinity_string WHERE entry IN (210); +INSERT INTO trinity_string VALUES +(210,'Item \'%i\' (with extended cost %i) already in vendor list.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + diff --git a/src/server/game/Chat/Commands/Level2.cpp b/src/server/game/Chat/Commands/Level2.cpp index 40772a82922..85c5ef739fd 100644 --- a/src/server/game/Chat/Commands/Level2.cpp +++ b/src/server/game/Chat/Commands/Level2.cpp @@ -1051,7 +1051,7 @@ bool ChatHandler::HandleNpcAddVendorItemCommand(const char* args) incrtime = atol(fincrtime); char* fextendedcost = strtok(NULL, " "); //add ExtendedCost, default: 0 - uint32 extendedcost = fextendedcost ? atol(fextendedcost) : 0; + int32 extendedcost = fextendedcost ? atol(fextendedcost) : 0; Creature* vendor = getSelectedCreature(); diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 71461f94949..c9c9775c04a 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -76,7 +76,7 @@ bool VendorItemData::RemoveItem(uint32 item_id) return found; } -VendorItem const* VendorItemData::FindItemCostPair(uint32 item_id, uint32 extendedCost) const +VendorItem const* VendorItemData::FindItemCostPair(uint32 item_id, int32 extendedCost) const { for (VendorItemList::const_iterator i = m_items.begin(); i != m_items.end(); ++i) if((*i)->item == item_id && (*i)->ExtendedCost == extendedCost) diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index c19187f2770..a7c17561516 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -307,13 +307,17 @@ enum ChatType // Vendors struct VendorItem { - VendorItem(uint32 _item, int32 _maxcount, uint32 _incrtime, uint32 _ExtendedCost) + VendorItem(uint32 _item, int32 _maxcount, uint32 _incrtime, int32 _ExtendedCost) : item(_item), maxcount(_maxcount), incrtime(_incrtime), ExtendedCost(_ExtendedCost) {} uint32 item; int32 maxcount; // 0 for infinity item amount uint32 incrtime; // time for restore items amount if maxcount != 0 - uint32 ExtendedCost; + int32 ExtendedCost; + + //helpers + bool IsExcludeMoneyPrice() const { return ExtendedCost > 0; } + uint32 GetExtendedCostId() const { return std::abs(ExtendedCost); } }; typedef std::vector VendorItemList; @@ -328,12 +332,12 @@ struct VendorItemData } bool Empty() const { return m_items.empty(); } uint8 GetItemCount() const { return m_items.size(); } - void AddItem(uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost) + void AddItem(uint32 item, int32 maxcount, uint32 ptime, int32 ExtendedCost) { m_items.push_back(new VendorItem(item, maxcount, ptime, ExtendedCost)); } bool RemoveItem(uint32 item_id); - VendorItem const* FindItemCostPair(uint32 item_id, uint32 extendedCost) const; + VendorItem const* FindItemCostPair(uint32 item_id, int32 extendedCost) const; void Clear() { for (VendorItemList::const_iterator itr = m_items.begin(); itr != m_items.end(); ++itr) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index c79ce17f40e..faeb676c21a 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -19573,12 +19573,12 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 return false; } - if (crItem->ExtendedCost) + if (uint32 extendedCostId = crItem->GetExtendedCostId()) { - ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(crItem->ExtendedCost); + ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(extendedCostId); if (!iece) { - sLog.outError("Item %u have wrong ExtendedCost field value %u", pProto->ItemId, crItem->ExtendedCost); + sLog.outError("Item %u have wrong ExtendedCost field value %u", pProto->ItemId, extendedCostId); return false; } @@ -19615,10 +19615,11 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 } } - int32 price = pProto->BuyPrice * count; + int32 price = crItem->IsExcludeMoneyPrice() ? 0 : pProto->BuyPrice * count; // reputation discount - price = uint32(floor(price * GetReputationPriceDiscount(pCreature))); + if (price) + price = uint32(floor(price * GetReputationPriceDiscount(pCreature))); if (GetMoney() < price) { @@ -19638,9 +19639,9 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 ModifyMoney(-(int32)price); - if (crItem->ExtendedCost) // case for new honor system + if (uint32 extendedCostId = crItem->GetExtendedCostId()) // case for new honor system { - ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(crItem->ExtendedCost); + ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(extendedCostId); if (iece->reqhonorpoints) ModifyHonorPoints(- int32(iece->reqhonorpoints * count)); @@ -19666,11 +19667,11 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 GetSession()->SendPacket(&data); SendNewItem(it, pProto->BuyCount*count, true, false, false); - if (it->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_REFUNDABLE) && crItem->ExtendedCost) + if (it->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_REFUNDABLE) && crItem->GetExtendedCostId()) { it->SetRefundRecipient(GetGUIDLow()); it->SetPaidMoney(price); - it->SetPaidExtendedCost(crItem->ExtendedCost); + it->SetPaidExtendedCost(crItem->GetExtendedCostId()); it->SaveRefundDataToDB(); AddRefundReference(it->GetGUID()); } @@ -19693,9 +19694,9 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 } ModifyMoney(-(int32)price); - if (crItem->ExtendedCost) // case for new honor system + if (uint32 extendedCostId = crItem->GetExtendedCostId()) // case for new honor system { - ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(crItem->ExtendedCost); + ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(extendedCostId); if (iece->reqhonorpoints) ModifyHonorPoints(- int32(iece->reqhonorpoints * count)); @@ -19724,11 +19725,11 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 AutoUnequipOffhandIfNeed(); - if (it->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_REFUNDABLE) && crItem->ExtendedCost) + if (it->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_REFUNDABLE) && crItem->GetExtendedCostId()) { it->SetRefundRecipient(GetGUIDLow()); it->SetPaidMoney(price); - it->SetPaidExtendedCost(crItem->ExtendedCost); + it->SetPaidExtendedCost(crItem->GetExtendedCostId()); it->SaveRefundDataToDB(); AddRefundReference(it->GetGUID()); } diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 5f460c7e84c..8b3cf97a3fe 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -7954,7 +7954,7 @@ int ObjectMgr::LoadReferenceVendor(int32 vendor, int32 item, std::set *s { int32 maxcount = fields[1].GetInt32(); uint32 incrtime = fields[2].GetUInt32(); - uint32 ExtendedCost = fields[3].GetUInt32(); + int32 ExtendedCost = fields[3].GetUInt32(); if (!IsVendorItemValid(vendor,item_id,maxcount,incrtime,ExtendedCost,NULL,skip_vendors)) continue; @@ -8009,7 +8009,7 @@ void ObjectMgr::LoadVendors() { int32 maxcount = fields[2].GetInt32(); uint32 incrtime = fields[3].GetUInt32(); - uint32 ExtendedCost = fields[4].GetUInt32(); + int32 ExtendedCost = fields[4].GetUInt32(); if (!IsVendorItemValid(entry,item_id,maxcount,incrtime,ExtendedCost,NULL,&skip_vendors)) continue; @@ -8223,12 +8223,12 @@ void ObjectMgr::LoadGossipMenuItems() sLog.outString(">> Loaded %u gossip_menu_option entries", count); } -void ObjectMgr::AddVendorItem(uint32 entry,uint32 item, int32 maxcount, uint32 incrtime, uint32 extendedcost, bool savetodb) +void ObjectMgr::AddVendorItem(uint32 entry,uint32 item, int32 maxcount, uint32 incrtime, int32 extendedcost, bool savetodb) { VendorItemData& vList = m_mCacheVendorItemMap[entry]; vList.AddItem(item,maxcount,incrtime,extendedcost); - if (savetodb) WorldDatabase.PExecuteLog("INSERT INTO npc_vendor (entry,item,maxcount,incrtime,extendedcost) VALUES('%u','%u','%u','%u','%u')",entry, item, maxcount,incrtime,extendedcost); + if (savetodb) WorldDatabase.PExecuteLog("INSERT INTO npc_vendor (entry,item,maxcount,incrtime,extendedcost) VALUES('%u','%u','%u','%u','%i')",entry, item, maxcount,incrtime,extendedcost); } bool ObjectMgr::RemoveVendorItem(uint32 entry,uint32 item, bool savetodb) @@ -8244,7 +8244,7 @@ bool ObjectMgr::RemoveVendorItem(uint32 entry,uint32 item, bool savetodb) return true; } -bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 maxcount, uint32 incrtime, uint32 ExtendedCost, Player* pl, std::set* skip_vendors, uint32 ORnpcflag) const +bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 maxcount, uint32 incrtime, int32 ExtendedCost, Player* pl, std::set* skip_vendors, uint32 ORnpcflag) const { CreatureInfo const* cInfo = GetCreatureTemplate(vendor_entry); if (!cInfo) @@ -8280,12 +8280,13 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max return false; } - if (ExtendedCost && !sItemExtendedCostStore.LookupEntry(ExtendedCost)) + uint32 extendedCostId = std::abs(ExtendedCost); + if (extendedCostId && !sItemExtendedCostStore.LookupEntry(extendedCostId)) { if (pl) - ChatHandler(pl).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST,ExtendedCost); + ChatHandler(pl).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST,extendedCostId); else - sLog.outErrorDb("Table `(game_event_)npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore",item_id,ExtendedCost,vendor_entry); + sLog.outErrorDb("Table `(game_event_)npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore",item_id,extendedCostId,vendor_entry); return false; } @@ -8310,12 +8311,12 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (!vItems) return true; // later checks for non-empty lists - if(vItems->FindItemCostPair(item_id,ExtendedCost)) + if(vItems->FindItemCostPair(item_id,extendedCostId)) { if (pl) - ChatHandler(pl).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, item_id, ExtendedCost); + ChatHandler(pl).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, item_id, extendedCostId); else - sLog.outErrorDb( "Table `npc_vendor` has duplicate items %u (with extended cost %u) for vendor (Entry: %u), ignoring", item_id, ExtendedCost, vendor_entry); + sLog.outErrorDb( "Table `npc_vendor` has duplicate items %u (with extended cost %u) for vendor (Entry: %u), ignoring", item_id, extendedCostId, vendor_entry); return false; } diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index c1471aa0680..eeeb871c98e 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -874,9 +874,9 @@ class ObjectMgr return &iter->second; } - void AddVendorItem(uint32 entry,uint32 item, int32 maxcount, uint32 incrtime, uint32 ExtendedCost, bool savetodb = true); // for event + void AddVendorItem(uint32 entry,uint32 item, int32 maxcount, uint32 incrtime, int32 ExtendedCost, bool savetodb = true); // for event bool RemoveVendorItem(uint32 entry,uint32 item, bool savetodb = true); // for event - bool IsVendorItemValid(uint32 vendor_entry, uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* pl = NULL, std::set* skip_vendors = NULL, uint32 ORnpcflag = 0) const; + bool IsVendorItemValid(uint32 vendor_entry, uint32 item, int32 maxcount, uint32 ptime, int32 ExtendedCost, Player* pl = NULL, std::set* skip_vendors = NULL, uint32 ORnpcflag = 0) const; void LoadScriptNames(); ScriptNameMap &GetScriptNames() { return m_scriptNames; } diff --git a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp index 53aede43492..897ee7dcfd3 100644 --- a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp @@ -766,7 +766,7 @@ void WorldSession::SendListInventory(uint64 vendorguid) ++count; // reputation discount - int32 price = uint32(floor(pProto->BuyPrice * discountMod)); + int32 price = crItem->IsExcludeMoneyPrice() ? 0 : uint32(floor(pProto->BuyPrice * discountMod)); data << uint32(vendorslot+1); // client expects counting to start at 1 data << uint32(crItem->item); @@ -775,7 +775,7 @@ void WorldSession::SendListInventory(uint64 vendorguid) data << uint32(price); data << uint32(pProto->MaxDurability); data << uint32(pProto->BuyCount); - data << uint32(crItem->ExtendedCost); + data << uint32(crItem->GetExtendedCostId()); } } } -- cgit v1.2.3 From 605c3a4f1ffc323915849ca528e599e32606d504 Mon Sep 17 00:00:00 2001 From: Anubisss Date: Thu, 10 Jun 2010 23:52:05 +0200 Subject: Add a missing SQL from reload conditions. --HG-- branch : trunk --- sql/updates/8575_world_command.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/8575_world_command.sql (limited to 'sql/updates') diff --git a/sql/updates/8575_world_command.sql b/sql/updates/8575_world_command.sql new file mode 100644 index 00000000000..8175ad3d453 --- /dev/null +++ b/sql/updates/8575_world_command.sql @@ -0,0 +1,2 @@ +DELETE FROM command WHERE name = 'reload conditions'; +INSERT INTO command (name, security, help) VALUES ('reload conditions', 3, 'Reload conditions table.'); -- cgit v1.2.3 From 169cbb5b1d924435c1ed3668c569629bf1dbae5c Mon Sep 17 00:00:00 2001 From: Anubisss Date: Fri, 11 Jun 2010 00:04:11 +0200 Subject: Drop 'reload spell_script_target' command from DB because this table dropped with the ConditionManager. --HG-- branch : trunk --- sql/updates/8576_world_command.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 sql/updates/8576_world_command.sql (limited to 'sql/updates') diff --git a/sql/updates/8576_world_command.sql b/sql/updates/8576_world_command.sql new file mode 100644 index 00000000000..4512dfe8a28 --- /dev/null +++ b/sql/updates/8576_world_command.sql @@ -0,0 +1 @@ +DELETE FROM command WHERE name = 'reload spell_script_target'; -- cgit v1.2.3 From 4261828d6301c4404a107351bba196a3cab033db Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 11 Jun 2010 20:02:46 +0200 Subject: Added support for item set names in case where item does not exist in item_template (like gladiator gear) --HG-- branch : trunk --- sql/base/world_database.sql | 56 +++++++++ sql/updates/8586_world_command.sql | 4 + sql/updates/8586_world_item_set_names.sql | 14 +++ sql/updates/8586_world_locales_item_set_name.sql | 20 ++++ src/server/game/Chat/Chat.cpp | 2 + src/server/game/Chat/Chat.h | 2 + src/server/game/Chat/Commands/Level3.cpp | 16 +++ src/server/game/DataStores/DBCStructure.h | 4 +- src/server/game/DataStores/DBCfmt.h | 2 +- src/server/game/Entities/Item/ItemPrototype.h | 11 ++ src/server/game/Globals/ObjectMgr.cpp | 127 ++++++++++++++++++++- src/server/game/Globals/ObjectMgr.h | 21 ++++ .../game/Server/Protocol/Handlers/ItemHandler.cpp | 37 ++---- src/server/game/World/World.cpp | 20 ++-- 14 files changed, 299 insertions(+), 37 deletions(-) create mode 100644 sql/updates/8586_world_command.sql create mode 100644 sql/updates/8586_world_item_set_names.sql create mode 100644 sql/updates/8586_world_locales_item_set_name.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index 8e047fc7a1c..9b577fd3179 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -585,9 +585,11 @@ INSERT INTO `command` VALUES ('reload gm_tickets',3,'Syntax: .reload gm_tickets\nReload gm_tickets table.'), ('reload item_enchantment_template',3,'Syntax: .reload item_enchantment_template\nReload item_enchantment_template table.'), ('reload item_loot_template',3,'Syntax: .reload item_loot_template\nReload item_loot_template table.'), +('reload item_set_names',3,'Syntax: .reload item_set_names\nReload item_set_names table.'), ('reload locales_creature',3,'Syntax: .reload locales_creature\nReload locales_creature table.'), ('reload locales_gameobject',3,'Syntax: .reload locales_gameobject\nReload locales_gameobject table.'), ('reload locales_item',3,'Syntax: .reload locales_item\nReload locales_item table.'), +('reload locales_item_set_name',3,'Syntax: .reload locales_item_set_name\nReload locales_item_set_name table.'), ('reload locales_npc_text',3,'Syntax: .reload locales_npc_text\nReload locales_npc_text table.'), ('reload locales_page_text',3,'Syntax: .reload locales_page_text\nReload locales_page_text table.'), ('reload locales_points_of_interest',3,'Syntax: .reload locales_points_of_interest\nReload locales_point_of_interest table.'), @@ -2746,6 +2748,30 @@ LOCK TABLES `item_loot_template` WRITE; /*!40000 ALTER TABLE `item_loot_template` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `item_set_names` +-- + +DROP TABLE IF EXISTS `item_set_names`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `item_set_names` ( + `entry` mediumint(8) unsigned NOT NULL, + `name` varchar(255) character set utf8 NOT NULL default '', + `InventoryType` tinyint(3) unsigned NOT NULL default '0', + PRIMARY KEY (`entry`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `item_set_names` +-- + +LOCK TABLES `item_set_names` WRITE; +/*!40000 ALTER TABLE `item_set_names` DISABLE KEYS */; +/*!40000 ALTER TABLE `item_set_names` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `item_required_target` -- @@ -3083,6 +3109,36 @@ LOCK TABLES `locales_item` WRITE; /*!40000 ALTER TABLE `locales_item` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `locales_item_set_name` +-- + +DROP TABLE IF EXISTS `locales_item_set_name`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `locales_item_set_name` ( + `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', + `name_loc1` varchar(100) NOT NULL DEFAULT '', + `name_loc2` varchar(100) NOT NULL DEFAULT '', + `name_loc3` varchar(100) NOT NULL DEFAULT '', + `name_loc4` varchar(100) NOT NULL DEFAULT '', + `name_loc5` varchar(100) NOT NULL DEFAULT '', + `name_loc6` varchar(100) NOT NULL DEFAULT '', + `name_loc7` varchar(100) NOT NULL DEFAULT '', + `name_loc8` varchar(100) NOT NULL DEFAULT '', + PRIMARY KEY (`entry`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `locales_item_set_name` +-- + +LOCK TABLES `locales_item_set_name` WRITE; +/*!40000 ALTER TABLE `locales_item_set_name` DISABLE KEYS */; +/*!40000 ALTER TABLE `locales_item_set_name` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `locales_gossip_menu_option` -- diff --git a/sql/updates/8586_world_command.sql b/sql/updates/8586_world_command.sql new file mode 100644 index 00000000000..b554755df08 --- /dev/null +++ b/sql/updates/8586_world_command.sql @@ -0,0 +1,4 @@ +DELETE FROM `command` WHERE `name` IN ('reload item_set_names','reload locales_item_set_name'); +INSERT INTO `command` VALUES +('reload item_set_names',3,'Syntax: .reload item_set_names\nReload item_set_names table.'), +('reload locales_item_set_name',3,'Syntax: .reload locales_item_set_name\nReload locales_item_set_name table.'); diff --git a/sql/updates/8586_world_item_set_names.sql b/sql/updates/8586_world_item_set_names.sql new file mode 100644 index 00000000000..f62df79678a --- /dev/null +++ b/sql/updates/8586_world_item_set_names.sql @@ -0,0 +1,14 @@ +-- +-- Table structure for table `item_set_names` +-- + +DROP TABLE IF EXISTS `item_set_names`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `item_set_names` ( + `entry` mediumint(8) unsigned NOT NULL, + `name` varchar(255) character set utf8 NOT NULL default '', + `InventoryType` tinyint(3) unsigned NOT NULL default '0', + PRIMARY KEY (`entry`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; diff --git a/sql/updates/8586_world_locales_item_set_name.sql b/sql/updates/8586_world_locales_item_set_name.sql new file mode 100644 index 00000000000..30d39f978a2 --- /dev/null +++ b/sql/updates/8586_world_locales_item_set_name.sql @@ -0,0 +1,20 @@ +-- +-- Table structure for table `locales_item_set_name` +-- + +DROP TABLE IF EXISTS `locales_item_set_name`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `locales_item_set_name` ( + `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', + `name_loc1` varchar(100) NOT NULL DEFAULT '', + `name_loc2` varchar(100) NOT NULL DEFAULT '', + `name_loc3` varchar(100) NOT NULL DEFAULT '', + `name_loc4` varchar(100) NOT NULL DEFAULT '', + `name_loc5` varchar(100) NOT NULL DEFAULT '', + `name_loc6` varchar(100) NOT NULL DEFAULT '', + `name_loc7` varchar(100) NOT NULL DEFAULT '', + `name_loc8` varchar(100) NOT NULL DEFAULT '', + PRIMARY KEY (`entry`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index a976a2fcafc..f62dee975da 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -479,10 +479,12 @@ ChatCommand * ChatHandler::getCommandTable() { "gossip_menu_option", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadGossipMenuOptionCommand, "", NULL }, { "item_enchantment_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadItemEnchantementsCommand, "", NULL }, { "item_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesItemCommand, "", NULL }, + { "item_set_names", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadItemSetNamesCommand, "", NULL }, { "locales_achievement_reward", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesAchievementRewardCommand,"", NULL }, { "locales_creature", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesCreatureCommand, "", NULL }, { "locales_gameobject", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesGameobjectCommand, "", NULL }, { "locales_item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesItemCommand, "", NULL }, + { "locales_item_set_name", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesItemSetNameCommand, "", NULL }, { "locales_npc_text", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesNpcTextCommand, "", NULL }, { "locales_page_text", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesPageTextCommand, "", NULL }, { "locales_points_of_interest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesPointsOfInterestCommand, "", NULL }, diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h index a298ca03881..6b102129c8a 100644 --- a/src/server/game/Chat/Chat.h +++ b/src/server/game/Chat/Chat.h @@ -378,10 +378,12 @@ class ChatHandler bool HandleReloadGOQuestRelationsCommand(const char* args); bool HandleReloadGOQuestInvRelationsCommand(const char* args); bool HandleReloadItemEnchantementsCommand(const char* args); + bool HandleReloadItemSetNamesCommand(const char* args); bool HandleReloadLocalesAchievementRewardCommand(const char* args); bool HandleReloadLocalesCreatureCommand(const char* args); bool HandleReloadLocalesGameobjectCommand(const char* args); bool HandleReloadLocalesItemCommand(const char* args); + bool HandleReloadLocalesItemSetNameCommand(const char* args); bool HandleReloadLocalesNpcTextCommand(const char* args); bool HandleReloadLocalesPageTextCommand(const char* args); bool HandleReloadLocalesPointsOfInterestCommand(const char* args); diff --git a/src/server/game/Chat/Commands/Level3.cpp b/src/server/game/Chat/Commands/Level3.cpp index abdb99ee5e5..d7ebfbf912e 100644 --- a/src/server/game/Chat/Commands/Level3.cpp +++ b/src/server/game/Chat/Commands/Level3.cpp @@ -1284,6 +1284,14 @@ bool ChatHandler::HandleReloadItemEnchantementsCommand(const char*) return true; } +bool ChatHandler::HandleReloadItemSetNamesCommand(const char*) +{ + sLog.outString("Re-Loading Item set names..."); + LoadRandomEnchantmentsTable(); + SendGlobalGMSysMessage("DB table `item_set_names` reloaded."); + return true; +} + bool ChatHandler::HandleReloadGameObjectScriptsCommand(const char* arg) { if (sWorld.IsScriptScheduled()) @@ -1502,6 +1510,14 @@ bool ChatHandler::HandleReloadLocalesItemCommand(const char* /*arg*/) return true; } +bool ChatHandler::HandleReloadLocalesItemSetNameCommand(const char* /*arg*/) +{ + sLog.outString("Re-Loading Locales Item set name... "); + objmgr.LoadItemSetNameLocales(); + SendGlobalGMSysMessage("DB table `locales_item_set_name` reloaded."); + return true; +} + bool ChatHandler::HandleReloadLocalesNpcTextCommand(const char* /*arg*/) { sLog.outString("Re-Loading Locales NPC Text ... "); diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 112aef734e7..f3ed1e09b12 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1080,12 +1080,14 @@ struct ItemRandomSuffixEntry uint32 prefix[5]; // 22-24 m_allocationPct }; +#define MAX_ITEM_SET_ITEMS 10 struct ItemSetEntry { //uint32 id // 0 m_ID char* name[16]; // 1-16 m_name_lang // 17 string flags, unused - //uint32 itemId[17]; // 18-34 m_itemID + uint32 itemId[MAX_ITEM_SET_ITEMS]; // 18-27 m_itemID + //uint32 unknown[7]; // 28-34 unk, all 0 uint32 spells[8]; // 35-42 m_setSpellID uint32 items_to_triggerspell[8]; // 43-50 m_setThreshold uint32 required_skill_id; // 51 m_requiredSkill diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index 1f1b010a6fd..e791e304d8c 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -72,7 +72,7 @@ const char ItemExtendedCostEntryfmt[]="niiiiiiiiiiiiiix"; const char ItemLimitCategoryEntryfmt[]="nxxxxxxxxxxxxxxxxxix"; const char ItemRandomPropertiesfmt[]="nxiiiiissssssssssssssssx"; const char ItemRandomSuffixfmt[]="nssssssssssssssssxxiiiiiiiiii"; -const char ItemSetEntryfmt[]="dssssssssssssssssxxxxxxxxxxxxxxxxxxiiiiiiiiiiiiiiiiii"; +const char ItemSetEntryfmt[]="dssssssssssssssssxiiiiiiiiiixxxxxxxiiiiiiiiiiiiiiiiii"; const char LFGDungeonEntryfmt[]="nxxxxxxxxxxxxxxxxxiiiiiiixixxixixxxxxxxxxxxxxxxxx"; const char LockEntryfmt[]="niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx"; const char MailTemplateEntryfmt[]="nxxxxxxxxxxxxxxxxxssssssssssssssssx"; diff --git a/src/server/game/Entities/Item/ItemPrototype.h b/src/server/game/Entities/Item/ItemPrototype.h index 31025005a15..797ccd6faaf 100644 --- a/src/server/game/Entities/Item/ItemPrototype.h +++ b/src/server/game/Entities/Item/ItemPrototype.h @@ -661,6 +661,17 @@ struct ItemLocale std::vector Description; }; +struct ItemSetNameEntry +{ + std::string name; + uint32 InventoryType; +}; + +struct ItemSetNameLocale +{ + std::vector Name; +}; + // GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform #if defined(__GNUC__) #pragma pack() diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 8b3cf97a3fe..89ce93b5d80 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -2368,7 +2368,132 @@ void ObjectMgr::LoadItemPrototypes() } for (std::set::const_iterator itr = notFoundOutfit.begin(); itr != notFoundOutfit.end(); ++itr) - sLog.outErrorDb("Item (Entry: %u) not exist in `item_template` but referenced in `CharStartOutfit.dnc`", *itr); + sLog.outErrorDb("Item (Entry: %u) not exist in `item_template` but referenced in `CharStartOutfit.dbc`", *itr); +} + +void ObjectMgr::LoadItemSetNameLocales() +{ + mItemSetNameLocaleMap.clear(); // need for reload case + + QueryResult_AutoPtr result = WorldDatabase.Query("SELECT `entry`,`name_loc1`,`name_loc2`,`name_loc3`,`name_loc4`,`name_loc5`,`name_loc6`,`name_loc7`,`name_loc8` FROM `locales_item_set_name`"); + + if (!result) + return; + + barGoLink bar(result->GetRowCount()); + + do + { + Field *fields = result->Fetch(); + bar.step(); + + uint32 entry = fields[0].GetUInt32(); + + ItemSetNameLocale& data = mItemSetNameLocaleMap[entry]; + + for (uint8 i = 1; i < MAX_LOCALE; ++i) + { + std::string str = fields[i].GetCppString(); + if (!str.empty()) + { + int idx = GetOrNewIndexForLocale(LocaleConstant(i)); + if (idx >= 0) + { + if (data.Name.size() <= idx) + data.Name.resize(idx+1); + + data.Name[idx] = str; + } + } + } + } while (result->NextRow()); + + sLog.outString(); + sLog.outString(">> Loaded %lu Item set name locale strings", (uint32)mItemSetNameLocaleMap.size()); +} + +void ObjectMgr::LoadItemSetNames() +{ + mItemSetNameMap.clear(); // needed for reload case + + QueryResult_AutoPtr result = WorldDatabase.Query("SELECT `entry`,`name`,`InventoryType` FROM `item_set_names`"); + + uint32 count = 0; + std::set itemSetItems; + + // fill item set member ids + for (uint32 entryId = 0; entryId < sItemSetStore.GetNumRows(); ++entryId) + { + ItemSetEntry const* setEntry = sItemSetStore.LookupEntry(entryId); + if (!setEntry) + continue; + + for (uint32 i = 0; i < MAX_ITEM_SET_ITEMS; ++i) + if (setEntry->itemId[i]) + itemSetItems.insert(setEntry->itemId[i]); + } + + if (result) + { + barGoLink bar(result->GetRowCount()); + do + { + Field *fields = result->Fetch(); + bar.step(); + + uint32 entry = fields[0].GetUInt32(); + if (itemSetItems.find(entry) == itemSetItems.end()) + { + sLog.outErrorDb("Item set name (Entry: %u) not found in ItemSet.dbc, data useless.", entry); + continue; + } + + ItemSetNameEntry &data = mItemSetNameMap[entry]; + data.name = fields[1].GetCppString(); + + uint32 invType = fields[2].GetUInt32(); + if (invType >= MAX_INVTYPE) + { + sLog.outErrorDb("Item set name (Entry: %u) has wrong InventoryType value (%u)", entry, invType); + invType = INVTYPE_NON_EQUIP; + } + + data.InventoryType = invType; + itemSetItems.erase(entry); + ++count; + } while (result->NextRow()); + } + else + { + barGoLink bar(1); + bar.step(); + + sLog.outString(); + sLog.outErrorDb(">> Loaded 0 item set names. DB table `item_set_names` is empty."); + } + + if (!itemSetItems.empty()) + { + ItemPrototype const* pProto; + for (std::set::iterator itr = itemSetItems.begin(); itr != itemSetItems.end(); ++itr) + { + uint32 entry = *itr; + // add data from item_template if available + if (pProto = GetItemPrototype(entry)) + { + sLog.outErrorDb("Item set part (Entry: %u) does not have entry in `item_set_names`, adding data from `item_template`.", entry); + ItemSetNameEntry &data = mItemSetNameMap[entry]; + data.name = pProto->Name1; + data.InventoryType = pProto->InventoryType; + ++count; + } + else + sLog.outErrorDb("Item set part (Entry: %u) does not have entry in `item_set_names`, set will not display properly.", entry); + } + } + + sLog.outString(); + sLog.outString(">> Loaded %u item set names", count); } void ObjectMgr::LoadVehicleAccessories() diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index eeeb871c98e..a5e3989d452 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -164,6 +164,7 @@ typedef UNORDERED_MAP GameObjectDataMap; typedef UNORDERED_MAP CreatureLocaleMap; typedef UNORDERED_MAP GameObjectLocaleMap; typedef UNORDERED_MAP ItemLocaleMap; +typedef UNORDERED_MAP ItemSetNameLocaleMap; typedef UNORDERED_MAP QuestLocaleMap; typedef UNORDERED_MAP NpcTextLocaleMap; typedef UNORDERED_MAP PageTextLocaleMap; @@ -431,6 +432,14 @@ class ObjectMgr static ItemPrototype const* GetItemPrototype(uint32 id) { return sItemStorage.LookupEntry(id); } + ItemSetNameEntry const* GetItemSetNameEntry(uint32 itemId) + { + ItemSetNameMap::iterator itr = mItemSetNameMap.find(itemId); + if(itr != mItemSetNameMap.end()) + return &itr->second; + return NULL; + } + static InstanceTemplate const* GetInstanceTemplate(uint32 map) { return sInstanceTemplate.LookupEntry(map); @@ -607,6 +616,8 @@ class ObjectMgr void LoadGameobjectRespawnTimes(); void LoadItemPrototypes(); void LoadItemLocales(); + void LoadItemSetNames(); + void LoadItemSetNameLocales(); void LoadQuestLocales(); void LoadNpcTextLocales(); void LoadPageTextLocales(); @@ -740,6 +751,12 @@ class ObjectMgr if (itr == mItemLocaleMap.end()) return NULL; return &itr->second; } + ItemSetNameLocale const* GetItemSetNameLocale(uint32 entry) const + { + ItemSetNameLocaleMap::const_iterator itr = mItemSetNameLocaleMap.find(entry); + if (itr == mItemSetNameLocaleMap.end())return NULL; + return &itr->second; + } QuestLocale const* GetQuestLocale(uint32 entry) const { QuestLocaleMap::const_iterator itr = mQuestLocaleMap.find(entry); @@ -1045,6 +1062,9 @@ class ObjectMgr HalfNameMap PetHalfName0; HalfNameMap PetHalfName1; + typedef UNORDERED_MAP ItemSetNameMap; + ItemSetNameMap mItemSetNameMap; + MapObjectGuids mMapObjectGuids; CreatureDataMap mCreatureDataMap; CreatureLinkedRespawnMap mCreatureLinkedRespawnMap; @@ -1052,6 +1072,7 @@ class ObjectMgr GameObjectDataMap mGameObjectDataMap; GameObjectLocaleMap mGameObjectLocaleMap; ItemLocaleMap mItemLocaleMap; + ItemSetNameLocaleMap mItemSetNameLocaleMap; QuestLocaleMap mQuestLocaleMap; NpcTextLocaleMap mNpcTextLocaleMap; PageTextLocaleMap mPageTextLocaleMap; diff --git a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp index 897ee7dcfd3..e9b9004804a 100644 --- a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp @@ -1003,40 +1003,25 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket & recv_data) recv_data.read_skip(); // guid sLog.outDebug("WORLD: CMSG_ITEM_NAME_QUERY %u", itemid); - ItemPrototype const *pProto = objmgr.GetItemPrototype(itemid); - if (pProto) + ItemSetNameEntry const *pName = objmgr.GetItemSetNameEntry(itemid); + if (pName) { - std::string Name; - Name = pProto->Name1; - + std::string Name = pName->name; int loc_idx = GetSessionDbLocaleIndex(); if (loc_idx >= 0) { - ItemLocale const *il = objmgr.GetItemLocale(pProto->ItemId); - if (il) - { - if (il->Name.size() > size_t(loc_idx) && !il->Name[loc_idx].empty()) - Name = il->Name[loc_idx]; - } + ItemSetNameLocale const *isnl = objmgr.GetItemSetNameLocale(itemid); + if (isnl) + if (isnl->Name.size() > size_t(loc_idx) && !isnl->Name[loc_idx].empty()) + Name = isnl->Name[loc_idx]; } - // guess size - WorldPacket data(SMSG_ITEM_NAME_QUERY_RESPONSE, (4+10)); - data << uint32(pProto->ItemId); + + WorldPacket data(SMSG_ITEM_NAME_QUERY_RESPONSE, (4+Name.size()+1+4)); + data << uint32(itemid); data << Name; - data << uint32(pProto->InventoryType); + data << uint32(pName->InventoryType); SendPacket(&data); - return; } -// This is a BS check, there are lots of items listed in Item.dbc that do not even exist on official -- so we can NEVER get the data for them. -// If you *really* want to spam your error log -- uncomment this. -/* else - { - // listed in dbc or not expected to exist unknown item - if (sItemStore.LookupEntry(itemid)) - sLog.outErrorDb("WORLD: CMSG_ITEM_NAME_QUERY for item %u failed (item listed in Item.dbc but not exist in DB)", itemid); - else - sLog.outError("WORLD: CMSG_ITEM_NAME_QUERY for item %u failed (unknown item, not listed in Item.dbc)", itemid); - } */ } void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data) diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 0f34fc83ffb..0041bbaecc8 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1320,6 +1320,7 @@ void World::SetInitialWorldSettings() objmgr.LoadCreatureLocales(); objmgr.LoadGameObjectLocales(); objmgr.LoadItemLocales(); + objmgr.LoadItemSetNameLocales(); objmgr.LoadQuestLocales(); objmgr.LoadNpcTextLocales(); objmgr.LoadPageTextLocales(); @@ -1332,7 +1333,7 @@ void World::SetInitialWorldSettings() sLog.outString("Loading Page Texts..."); objmgr.LoadPageTexts(); - sLog.outString("Loading Game Object Templates..."); // must be after LoadPageTexts + sLog.outString("Loading Game Object Templates..."); // must be after LoadPageTexts objmgr.LoadGameobjectInfo(); sLog.outString("Loading Spell Rank Data..."); @@ -1371,9 +1372,12 @@ void World::SetInitialWorldSettings() sLog.outString("Loading Item Random Enchantments Table..."); LoadRandomEnchantmentsTable(); - sLog.outString("Loading Items..."); // must be after LoadRandomEnchantmentsTable and LoadPageTexts + sLog.outString("Loading Items..."); // must be after LoadRandomEnchantmentsTable and LoadPageTexts objmgr.LoadItemPrototypes(); + sLog.outString("Loading Item set names..."); // must be after LoadItemPrototypes + objmgr.LoadItemSetNames(); + sLog.outString("Loading Creature Model Based Info Data..."); objmgr.LoadCreatureModelInfo(); @@ -1408,15 +1412,15 @@ void World::SetInitialWorldSettings() objmgr.LoadCreatureAddons(); // must be after LoadCreatureTemplates() and LoadCreatures() sLog.outString("Loading Vehicle Accessories..."); - objmgr.LoadVehicleAccessories(); // must be after LoadCreatureTemplates() + objmgr.LoadVehicleAccessories(); // must be after LoadCreatureTemplates() - sLog.outString("Loading Creature Respawn Data..."); // must be after PackInstances() + sLog.outString("Loading Creature Respawn Data..."); // must be after PackInstances() objmgr.LoadCreatureRespawnTimes(); sLog.outString("Loading Gameobject Data..."); objmgr.LoadGameobjects(); - sLog.outString("Loading Gameobject Respawn Data..."); // must be after PackInstances() + sLog.outString("Loading Gameobject Respawn Data..."); // must be after PackInstances() objmgr.LoadGameobjectRespawnTimes(); sLog.outString("Loading Objects Pooling Data..."); @@ -1440,7 +1444,7 @@ void World::SetInitialWorldSettings() sLog.outString("Loading UNIT_NPC_FLAG_SPELLCLICK Data..."); objmgr.LoadNPCSpellClickSpells(); - sLog.outString("Loading SpellArea Data..."); // must be after quest load + sLog.outString("Loading SpellArea Data..."); // must be after quest load spellmgr.LoadSpellAreas(); sLog.outString("Loading AreaTrigger definitions..."); @@ -1603,7 +1607,7 @@ void World::SetInitialWorldSettings() sLog.outString(">>> Scripts loaded"); sLog.outString(); - sLog.outString("Loading Scripts text locales..."); // must be after Load*Scripts calls + sLog.outString("Loading Scripts text locales..."); // must be after Load*Scripts calls objmgr.LoadDbScriptStrings(); sLog.outString("Loading CreatureEventAI Texts..."); @@ -1671,7 +1675,7 @@ void World::SetInitialWorldSettings() sLog.outString("Starting Arena Season..."); gameeventmgr.StartArenaSeason(); - sLog.outString("Loading World States..."); // must be loaded before battleground and outdoor PvP + sLog.outString("Loading World States..."); // must be loaded before battleground and outdoor PvP LoadWorldStates(); ///- Initialize Looking For Group -- cgit v1.2.3 From 38417ef2f618e86522cbf46ac3e494a962b448ec Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 12 Jun 2010 17:21:21 +0200 Subject: Added forgotten field to `item_set_names` since this data come from WDB --HG-- branch : trunk --- sql/base/world_database.sql | 1 + sql/updates/8589_world_item_set_names.sql | 1 + 2 files changed, 2 insertions(+) create mode 100644 sql/updates/8589_world_item_set_names.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index 9b577fd3179..3edddb8cd7a 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -2759,6 +2759,7 @@ CREATE TABLE `item_set_names` ( `entry` mediumint(8) unsigned NOT NULL, `name` varchar(255) character set utf8 NOT NULL default '', `InventoryType` tinyint(3) unsigned NOT NULL default '0', + `WDBVerified` smallint(5) signed NOT NULL DEFAULT '1', PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; diff --git a/sql/updates/8589_world_item_set_names.sql b/sql/updates/8589_world_item_set_names.sql new file mode 100644 index 00000000000..2edcc160c65 --- /dev/null +++ b/sql/updates/8589_world_item_set_names.sql @@ -0,0 +1 @@ +ALTER TABLE `item_set_names` ADD COLUMN `WDBVerified` smallint(5) signed NOT NULL DEFAULT '1'; -- cgit v1.2.3 From c88ecf99c3ec0521526052065ae316c59cc77261 Mon Sep 17 00:00:00 2001 From: John Holiver Date: Mon, 14 Jun 2010 11:44:55 -0300 Subject: Missing file from the last commit. --HG-- branch : trunk --- sql/updates/8602_world_spell_proc_event.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 sql/updates/8602_world_spell_proc_event.sql (limited to 'sql/updates') diff --git a/sql/updates/8602_world_spell_proc_event.sql b/sql/updates/8602_world_spell_proc_event.sql new file mode 100644 index 00000000000..ce7873f3a83 --- /dev/null +++ b/sql/updates/8602_world_spell_proc_event.sql @@ -0,0 +1 @@ +UPDATE `spell_proc_event` SET `Cooldown`=30 WHERE `entry` IN (30886, 30885, 30884, 30883, 30881); -- cgit v1.2.3 From b3f1bc11d9a38dd87957c33e8b7e32319fb7ef8f Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 14 Jun 2010 21:03:05 +0200 Subject: Added support for removing blizz items from character creation info by adding entry to playercreateinfo_item with count -1 Added support for all class/all race in playercreateinfo_item by setting class/race to 0 (like currently playercreateinfo_spell) --HG-- branch : trunk --- sql/base/world_database.sql | 2 +- sql/updates/8605_world_playercreateinfo_item.sql | 1 + src/server/game/Globals/ObjectMgr.cpp | 58 ++++++++++++++++++++++-- src/server/game/Globals/ObjectMgr.h | 1 + 4 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 sql/updates/8605_world_playercreateinfo_item.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index 5cf85d68cab..4ef57d79fdd 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -4105,7 +4105,7 @@ CREATE TABLE `playercreateinfo_item` ( `race` tinyint(3) unsigned NOT NULL DEFAULT '0', `class` tinyint(3) unsigned NOT NULL DEFAULT '0', `itemid` mediumint(8) unsigned NOT NULL DEFAULT '0', - `amount` tinyint(3) unsigned NOT NULL DEFAULT '1', + `amount` tinyint(3) NOT NULL DEFAULT '1', KEY `playercreateinfo_race_class_index` (`race`,`class`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; diff --git a/sql/updates/8605_world_playercreateinfo_item.sql b/sql/updates/8605_world_playercreateinfo_item.sql new file mode 100644 index 00000000000..c5d423c1744 --- /dev/null +++ b/sql/updates/8605_world_playercreateinfo_item.sql @@ -0,0 +1 @@ +ALTER TABLE `playercreateinfo_item` CHANGE `amount` `amount` tinyint(3) NOT NULL DEFAULT '1'; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 89ce93b5d80..e78dc02a93f 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -2660,6 +2660,47 @@ PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level) return &itr->second[level-1]; // data for level 1 stored in [0] array element, ... } +void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count) +{ + if (count > 0) + playerInfo[race_][class_].item.push_back(PlayerCreateInfoItem(itemId, count)); + else + { + if (count < -1) + sLog.outErrorDb("Invalid count %i specified on item %u be removed from original player create info (use -1)!", count, itemId); + + uint32 RaceClass = (race_) | (class_ << 8); + bool doneOne = false; + for (uint32 i = 1; i < sCharStartOutfitStore.GetNumRows(); ++i) + { + if (CharStartOutfitEntry const* entry = sCharStartOutfitStore.LookupEntry(i)) + { + if (entry->RaceClassGender == RaceClass || entry->RaceClassGender == (RaceClass | (1 << 16))) + { + bool found = false; + for (uint8 x = 0; x < MAX_OUTFIT_ITEMS; ++x) + { + if (entry->ItemId[x] == itemId) + { + found = true; + const_cast(entry)->ItemId[x] = 0; + break; + } + } + + if (!found) + sLog.outErrorDb("Item %u specified to be removed from original create info not found in dbc!", itemId); + + if (!doneOne) + doneOne = true; + else + break; + } + } + } + } +} + void ObjectMgr::LoadPlayerInfo() { // Load playercreate @@ -2790,8 +2831,6 @@ void ObjectMgr::LoadPlayerInfo() continue; } - PlayerInfo* pInfo = &playerInfo[current_race][current_class]; - uint32 item_id = fields[2].GetUInt32(); if (!GetItemPrototype(item_id)) @@ -2800,7 +2839,7 @@ void ObjectMgr::LoadPlayerInfo() continue; } - uint32 amount = fields[3].GetUInt32(); + int32 amount = fields[3].GetInt32(); if (!amount) { @@ -2808,7 +2847,18 @@ void ObjectMgr::LoadPlayerInfo() continue; } - pInfo->item.push_back(PlayerCreateInfoItem(item_id, amount)); + if (!current_race || !current_class) + { + uint32 min_race = current_race ? current_race : 1; + uint32 max_race = current_race ? current_race + 1 : MAX_RACES; + uint32 min_class = current_class ? current_class : 1; + uint32 max_class = current_class ? current_class + 1 : MAX_CLASSES; + for (uint32 r = min_race; r < max_race; ++r) + for (uint32 c = min_class; c < max_class; ++c) + PlayerCreateInfoAddItemHelper(r, c, item_id, amount); + } + else + PlayerCreateInfoAddItemHelper(current_race, current_class, item_id, amount); bar.step(); ++count; diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index a5e3989d452..824eb237756 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -1035,6 +1035,7 @@ class ObjectMgr void LoadCreatureAddons(SQLStorage& creatureaddons, char const* entryName, char const* comment); void ConvertCreatureAddonAuras(CreatureDataAddon* addon, char const* table, char const* guidEntryStr); void LoadQuestRelationsHelper(QuestRelations& map,char const* table); + void PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count); MailLevelRewardMap m_mailLevelRewardMap; -- cgit v1.2.3 From edb8c7a8aad780ca76abe3ff5d17cf05bad9d0fe Mon Sep 17 00:00:00 2001 From: Xanadu Date: Mon, 14 Jun 2010 22:22:11 +0200 Subject: Removed useless comment columns from the pool system DB tables. --HG-- branch : trunk --- sql/base/world_database.sql | 2 -- sql/updates/8607_world_pool_creature.sql | 2 ++ sql/updates/8607_world_pool_tempate.sql | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 sql/updates/8607_world_pool_creature.sql create mode 100644 sql/updates/8607_world_pool_tempate.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index 4ef57d79fdd..88d8e282749 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -4210,7 +4210,6 @@ CREATE TABLE `pool_creature` ( `guid` int(10) unsigned NOT NULL DEFAULT '0', `pool_entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `chance` float unsigned NOT NULL DEFAULT '0', - `comment` varchar(255) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, PRIMARY KEY (`pool_entry`,`guid`), KEY `idx_guid` (`guid`) @@ -4287,7 +4286,6 @@ DROP TABLE IF EXISTS `pool_template`; CREATE TABLE `pool_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Pool entry', `max_limit` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Max number of objects (0) is no limit', - `comment` varchar(255) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/sql/updates/8607_world_pool_creature.sql b/sql/updates/8607_world_pool_creature.sql new file mode 100644 index 00000000000..400e54cc6b5 --- /dev/null +++ b/sql/updates/8607_world_pool_creature.sql @@ -0,0 +1,2 @@ +UPDATE `pool_creature` SET `description` = `comment` WHERE `comment` <> '' AND `comment` IS NOT NULL AND (`description` = '' OR `description` IS NULL); +ALTER TABLE `pool_creature` DROP COLUMN `comment`; diff --git a/sql/updates/8607_world_pool_tempate.sql b/sql/updates/8607_world_pool_tempate.sql new file mode 100644 index 00000000000..ac1cbf70223 --- /dev/null +++ b/sql/updates/8607_world_pool_tempate.sql @@ -0,0 +1,2 @@ +UPDATE `pool_template` SET `description` = `comment` WHERE `comment` <> '' AND `comment` IS NOT NULL AND (`description` = '' OR `description` IS NULL); +ALTER TABLE `pool_template` DROP COLUMN `comment`; -- cgit v1.2.3 From 5238320af0cad3438dcc532ef79d118b922a3219 Mon Sep 17 00:00:00 2001 From: Xanadu Date: Thu, 17 Jun 2010 05:37:37 +0200 Subject: Fixed pool system I broke in 52fac32a0b35, added a check for child pools and rearranged primary keys to prevent inclusion of single creature/GO spawn in multiple pools. --HG-- branch : trunk --- sql/updates/8625_world_pool_creature.sql | 1 + sql/updates/8625_world_pool_gameobject.sql | 1 + sql/updates/8625_world_pool_pool.sql | 1 + src/server/game/Pools/PoolHandler.cpp | 25 +++++++++++++++++-------- 4 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 sql/updates/8625_world_pool_creature.sql create mode 100644 sql/updates/8625_world_pool_gameobject.sql create mode 100644 sql/updates/8625_world_pool_pool.sql (limited to 'sql/updates') diff --git a/sql/updates/8625_world_pool_creature.sql b/sql/updates/8625_world_pool_creature.sql new file mode 100644 index 00000000000..ade35efe138 --- /dev/null +++ b/sql/updates/8625_world_pool_creature.sql @@ -0,0 +1 @@ +ALTER TABLE `pool_creature` DROP PRIMARY KEY, ADD PRIMARY KEY (`guid`); diff --git a/sql/updates/8625_world_pool_gameobject.sql b/sql/updates/8625_world_pool_gameobject.sql new file mode 100644 index 00000000000..720fbb76a0c --- /dev/null +++ b/sql/updates/8625_world_pool_gameobject.sql @@ -0,0 +1 @@ +ALTER TABLE `pool_gameobject` DROP PRIMARY KEY, ADD PRIMARY KEY (`guid`); diff --git a/sql/updates/8625_world_pool_pool.sql b/sql/updates/8625_world_pool_pool.sql new file mode 100644 index 00000000000..1c8b9f3db8e --- /dev/null +++ b/sql/updates/8625_world_pool_pool.sql @@ -0,0 +1 @@ +ALTER TABLE `pool_pool` DROP PRIMARY KEY, ADD PRIMARY KEY (`pool_id`); diff --git a/src/server/game/Pools/PoolHandler.cpp b/src/server/game/Pools/PoolHandler.cpp index de29d59d628..731d71c6b19 100644 --- a/src/server/game/Pools/PoolHandler.cpp +++ b/src/server/game/Pools/PoolHandler.cpp @@ -121,10 +121,7 @@ void PoolGroup::AddEntry(PoolObject& poolitem, uint32 maxentries) template bool PoolGroup::CheckPool() const { - if (EqualChanced.size() && ExplicitlyChanced.size()) - return false; - - if (ExplicitlyChanced.size()) + if (!EqualChanced.size()) { float chance = 0; for (uint32 i = 0; i < ExplicitlyChanced.size(); ++i) @@ -662,7 +659,7 @@ void PoolHandler::LoadFromDB() // The initialize method will spawn all pools not in an event and not in another pool, this is why there is 2 left joins with 2 null checks void PoolHandler::Initialize() { - QueryResult_AutoPtr result = WorldDatabase.Query("SELECT DISTINCT pool_template.entry FROM pool_template LEFT JOIN game_event_pool ON pool_template.entry=game_event_pool.pool_entry LEFT JOIN pool_pool ON pool_template.entry=pool_pool.pool_id WHERE game_event_pool.pool_entry IS NULL AND pool_pool.pool_id IS NULL"); + QueryResult_AutoPtr result = WorldDatabase.Query("SELECT DISTINCT pool_template.entry, pool_pool.pool_id, pool_pool.mother_pool FROM pool_template LEFT JOIN game_event_pool ON pool_template.entry=game_event_pool.pool_entry LEFT JOIN pool_pool ON pool_template.entry=pool_pool.pool_id WHERE game_event_pool.pool_entry IS NULL"); uint32 count=0; if (result) { @@ -670,13 +667,25 @@ void PoolHandler::Initialize() { Field *fields = result->Fetch(); uint16 pool_entry = fields[0].GetUInt16(); + uint16 pool_pool_id = fields[1].GetUInt16(); + if (!CheckPool(pool_entry)) { - sLog.outErrorDb("Pool Id (%u) has all creatures or gameobjects with explicit chance sum <>100 and no equal chance defined. The pool system cannot pick one to spawn.", pool_entry); + if (pool_pool_id) + // The pool is a child pool in pool_pool table. Ideally we should remove it from the pool handler to ensure it never gets spawned, + // however that could recursively invalidate entire chain of mother pools. It can be done in the future but for now we'll do nothing. + sLog.outErrorDb("Pool Id %u has no equal chance pooled entites defined and explicit chance sum is not 100. This broken pool is a child pool of Id %u and cannot be safely removed.", pool_entry, fields[2].GetUInt16()); + else + sLog.outErrorDb("Pool Id %u has no equal chance pooled entites defined and explicit chance sum is not 100. The pool will not be spawned.", pool_entry); continue; } - SpawnPool(pool_entry);; - count++; + + // Don't spawn child pools, they are spawned recursively by their parent pools + if (!pool_pool_id) + { + SpawnPool(pool_entry);; + count++; + } } while (result->NextRow()); } -- cgit v1.2.3 From 6e871d6f4d93a9c1103fa619576e7e387e2b77d8 Mon Sep 17 00:00:00 2001 From: Tartalo Date: Sat, 19 Jun 2010 20:57:58 +0200 Subject: Violet Hold: Instance mechanics fixes, by PivoNRoll Closes issue #2733 Implements door hiting by trash, trash waypoints and more --HG-- branch : trunk --- sql/scripts/world_scripts_full.sql | 12 + sql/updates/8638_world_scriptname.sql | 12 + .../Northrend/VioletHold/instance_violet_hold.cpp | 225 +++-- .../scripts/Northrend/VioletHold/violet_hold.cpp | 935 +++++++++++++++++++-- .../scripts/Northrend/VioletHold/violet_hold.h | 13 +- 5 files changed, 1066 insertions(+), 131 deletions(-) create mode 100644 sql/updates/8638_world_scriptname.sql (limited to 'sql/updates') diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql index 1aaae94d91b..6b36f9f0928 100644 --- a/sql/scripts/world_scripts_full.sql +++ b/sql/scripts/world_scripts_full.sql @@ -1491,6 +1491,18 @@ UPDATE `creature_template` SET `ScriptName`='boss_moragg' WHERE `entry`=29316; UPDATE `creature_template` SET `ScriptName`='boss_xevozz' WHERE `entry`=29266; UPDATE `creature_template` SET `ScriptName`='mob_ethereal_sphere' WHERE `entry`=29271; UPDATE `creature_template` SET `ScriptName`='boss_cyanigosa' WHERE `entry`=31134; +update `creature_template` SET `scriptname`='mob_azure_invader' WHERE `entry`=30661; +update `creature_template` SET `scriptname`='mob_azure_spellbreaker' WHERE `entry`=30662; +update `creature_template` SET `scriptname`='mob_azure_binder' WHERE `entry`=30663; +update `creature_template` SET `scriptname`='mob_azure_mage_slayer' WHERE `entry`=30664; +update `creature_template` SET `scriptname`='mob_azure_captain' WHERE `entry`=30666; +update `creature_template` SET `scriptname`='mob_azure_sorceror' WHERE `entry`=30667; +update `creature_template` SET `scriptname`='mob_azure_raider' WHERE `entry`=30668; +update `creature_template` SET `scriptname`='mob_azure_stalker' WHERE `entry`=32191; +update `creature_template` SET `scriptname`='mob_azure_invader' WHERE `entry`=30961; +update `creature_template` SET `scriptname`='mob_azure_spellbreaker' WHERE `entry`=30962; +update `creature_template` SET `scriptname`='mob_azure_binder' WHERE `entry`=30918; +update `creature_template` SET `scriptname`='mob_azure_mage_slayer' WHERE `entry`=30963; UPDATE `instance_template` SET `script`='instance_violet_hold' WHERE `map`=608; /* WAILING CAVERNS */ diff --git a/sql/updates/8638_world_scriptname.sql b/sql/updates/8638_world_scriptname.sql new file mode 100644 index 00000000000..d3f357f43bf --- /dev/null +++ b/sql/updates/8638_world_scriptname.sql @@ -0,0 +1,12 @@ +update `creature_template` SET `scriptname`='mob_azure_invader' WHERE `entry`=30661; -- Azure Invader 1 +update `creature_template` SET `scriptname`='mob_azure_spellbreaker' WHERE `entry`=30662; -- Azure Spellbreaker +update `creature_template` SET `scriptname`='mob_azure_binder' WHERE `entry`=30663; -- Azure Binder 1 +update `creature_template` SET `scriptname`='mob_azure_mage_slayer' WHERE `entry`=30664; -- Azure Mage Slayer 1 +update `creature_template` SET `scriptname`='mob_azure_captain' WHERE `entry`=30666; -- Azure Captain +update `creature_template` SET `scriptname`='mob_azure_sorceror' WHERE `entry`=30667; -- Azure Sorceror +update `creature_template` SET `scriptname`='mob_azure_raider' WHERE `entry`=30668; -- Azure Raider +update `creature_template` SET `scriptname`='mob_azure_stalker' WHERE `entry`=32191; -- Azure Stalker +update `creature_template` SET `scriptname`='mob_azure_invader' WHERE `entry`=30961; -- Azure Invader 2 +update `creature_template` SET `scriptname`='mob_azure_spellbreaker' WHERE `entry`=30962; -- Azure Spellbreaker +update `creature_template` SET `scriptname`='mob_azure_binder' WHERE `entry`=30918; -- Azure Binder 2 +update `creature_template` SET `scriptname`='mob_azure_mage_slayer' WHERE `entry`=30963; -- Azure Mage Sl diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp index 9b220ae36cc..d5702980ff8 100644 --- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp @@ -34,12 +34,12 @@ enum GameObjects const Position PortalLocation[] = { - {1936.07, 803.198, 53.3749, 3.12414}, - {1877.51, 850.104, 44.6599, 4.7822 }, - {1890.64, 753.471, 48.7224, 1.71042}, - {1908.31, 809.657, 38.7037, 3.08701}, - {1918.37, 853.437, 47.1624, 4.12294}, - {1927.61, 758.436, 51.4533, 2.20891} + {1877.51, 850.104, 44.6599, 4.7822 }, // WP 1 + {1918.37, 853.437, 47.1624, 4.12294}, // WP 2 + {1936.07, 803.198, 53.3749, 3.12414}, // WP 3 + {1927.61, 758.436, 51.4533, 2.20891}, // WP 4 + {1890.64, 753.471, 48.7224, 1.71042}, // WP 5 + {1908.31, 809.657, 38.7037, 3.08701} // WP 6 }; struct instance_violet_hold : public ScriptedInstance @@ -65,6 +65,7 @@ struct instance_violet_hold : public ScriptedInstance uint64 uiXevozzCell; uint64 uiZuramatCell; uint64 uiMainDoor; + uint64 uiTeleportationPortal; uint64 uiActivationCrystal[3]; @@ -75,6 +76,10 @@ struct instance_violet_hold : public ScriptedInstance uint8 uiFirstBoss; uint8 uiSecondBoss; uint8 uiRemoveNpc; + uint32 uiDoorSpellTimer; + + uint8 uiMainDoorState; + uint8 uiDoorIntegrity; uint8 m_auiEncounter[MAX_ENCOUNTER]; uint8 uiCountErekemGuards; @@ -82,6 +87,9 @@ struct instance_violet_hold : public ScriptedInstance bool bActive; bool bWiped; + bool bIsDoorSpellCasted; + + std::list NpcAtDoorCastingList; std::string str_data; @@ -105,8 +113,13 @@ struct instance_violet_hold : public ScriptedInstance uiXevozzCell = 0; uiZuramatCell = 0; uiMainDoor = 0; + uiTeleportationPortal = 0; + uiRemoveNpc = 0; + uiMainDoorState = GO_STATE_ACTIVE; + uiDoorIntegrity = 100; + uiWaveCount = 0; uiLocation = urand(0,5); uiFirstBoss = 0; @@ -115,9 +128,10 @@ struct instance_violet_hold : public ScriptedInstance uiCountActivationCrystals = 0; uiActivationTimer = 5000; + uiDoorSpellTimer = 2000; bActive = false; - bWiped = false; + bIsDoorSpellCasted = false; memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } @@ -242,6 +256,38 @@ struct instance_violet_hold : public ScriptedInstance case DATA_REMOVE_NPC: uiRemoveNpc = data; break; + case DATA_PORTAL_LOCATION: + uiLocation = (uint8)data; + break; + case DATA_DOOR_INTEGRITY: + uiDoorIntegrity = data; + DoUpdateWorldState(WORLD_STATE_VH_PRISON_STATE, uiDoorIntegrity); + break; + case DATA_NPC_PRESENCE_AT_DOOR_ADD: + NpcAtDoorCastingList.push_back(data); + break; + case DATA_NPC_PRESENCE_AT_DOOR_REMOVE: + if(!NpcAtDoorCastingList.empty()) + NpcAtDoorCastingList.pop_back(); + break; + case DATA_MAIN_DOOR: + if(GameObject* pMainDoor = instance->GetGameObject(uiMainDoor)) + { + switch(data) + { + case GO_STATE_ACTIVE: + pMainDoor->SetGoState(GO_STATE_ACTIVE); + break; + case GO_STATE_READY: + pMainDoor->SetGoState(GO_STATE_READY); + break; + case GO_STATE_ACTIVE_ALTERNATIVE: + pMainDoor->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); + break; + } + } + uiMainDoorState = data; + break; } } @@ -254,6 +300,39 @@ struct instance_violet_hold : public ScriptedInstance case DATA_CYANIGOSA_EVENT: return m_auiEncounter[2]; case DATA_WAVE_COUNT: return uiWaveCount; case DATA_REMOVE_NPC: return uiRemoveNpc; + case DATA_PORTAL_LOCATION: return uiLocation; + case DATA_DOOR_INTEGRITY: return uiDoorIntegrity; + case DATA_NPC_PRESENCE_AT_DOOR: return NpcAtDoorCastingList.size(); + case DATA_MAIN_DOOR: return uiMainDoorState; + } + + return 0; + } + + uint64 GetData64(uint32 identifier) + { + switch(identifier) + { + case DATA_MORAGG: return uiMoragg; + case DATA_EREKEM: return uiErekem; + case DATA_EREKEM_GUARD_1: return uiErekemGuard[0]; + case DATA_EREKEM_GUARD_2: return uiErekemGuard[1]; + case DATA_ICHORON: return uiIchoron; + case DATA_LAVANTHOR: return uiLavanthor; + case DATA_XEVOZZ: return uiXevozz; + case DATA_ZURAMAT: return uiZuramat; + case DATA_CYANIGOSA: return uiCyanigosa; + case DATA_MORAGG_CELL: return uiMoraggCell; + case DATA_EREKEM_CELL: return uiErekemCell; + case DATA_EREKEM_RIGHT_GUARD_CELL: return uiErekemRightGuardCell; + case DATA_EREKEM_LEFT_GUARD_CELL: return uiErekemLeftGuardCell; + case DATA_ICHORON_CELL: return uiIchoronCell; + case DATA_LAVANTHOR_CELL: return uiLavanthorCell; + case DATA_XEVOZZ_CELL: return uiXevozzCell; + case DATA_ZURAMAT_CELL: return uiZuramatCell; + case DATA_MAIN_DOOR: return uiMainDoor; + case DATA_SINCLARI: return uiSinclari; + case DATA_TELEPORTATION_PORTAL: return uiTeleportationPortal; } return 0; @@ -261,9 +340,10 @@ struct instance_violet_hold : public ScriptedInstance void SpawnPortal() { + SetData(DATA_PORTAL_LOCATION, (GetData(DATA_PORTAL_LOCATION) + urand(1,5))%6); if (Creature *pSinclari = instance->GetCreature(uiSinclari)) - if (Creature *pPortal = pSinclari->SummonCreature(CREATURE_TELEPORTATION_PORTAL,PortalLocation[uiLocation],TEMPSUMMON_CORPSE_DESPAWN)) - uiLocation = (uiLocation+urand(1,5))%6; + if(Creature *portal = pSinclari->SummonCreature(CREATURE_TELEPORTATION_PORTAL,PortalLocation[GetData(DATA_PORTAL_LOCATION)],TEMPSUMMON_CORPSE_DESPAWN)) + uiTeleportationPortal = portal->GetGUID(); } void StartBossEncounter(uint8 uiBoss, bool bForceRespawn = true) @@ -275,8 +355,6 @@ struct instance_violet_hold : public ScriptedInstance case BOSS_MORAGG: HandleGameObject(uiMoraggCell,bForceRespawn); pBoss = instance->GetCreature(uiMoragg); - if (pBoss) - pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); break; case BOSS_EREKEM: HandleGameObject(uiErekemCell, bForceRespawn); @@ -284,8 +362,6 @@ struct instance_violet_hold : public ScriptedInstance HandleGameObject(uiErekemLeftGuardCell, bForceRespawn); pBoss = instance->GetCreature(uiErekem); - if (pBoss) - pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); if (Creature* pGuard1 = instance->GetCreature(uiErekemGuard[0])) { @@ -306,40 +382,38 @@ struct instance_violet_hold : public ScriptedInstance case BOSS_ICHORON: HandleGameObject(uiIchoronCell,bForceRespawn); pBoss = instance->GetCreature(uiIchoron); - if (pBoss) - pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); break; case BOSS_LAVANTHOR: HandleGameObject(uiLavanthorCell,bForceRespawn); pBoss = instance->GetCreature(uiLavanthor); - if (pBoss) - pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); break; case BOSS_XEVOZZ: HandleGameObject(uiXevozzCell,bForceRespawn); pBoss = instance->GetCreature(uiXevozz); - if (pBoss) - pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); break; case BOSS_ZURAMAT: HandleGameObject(uiZuramatCell,bForceRespawn); pBoss = instance->GetCreature(uiZuramat); - if (pBoss) - pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); break; } - if (!bForceRespawn && pBoss) + // generic boss state changes + if (pBoss) { - if (pBoss->isDead()) + pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pBoss->SetReactState(REACT_AGGRESSIVE); + + if (!bForceRespawn) { - // respawn but avoid to be looted again - pBoss->Respawn(); - pBoss->RemoveLootMode(1); + if (pBoss->isDead()) + { + // respawn but avoid to be looted again + pBoss->Respawn(); + pBoss->RemoveLootMode(1); + } + pBoss->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + uiWaveCount = 0; } - pBoss->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); - SetData(DATA_WAVE_COUNT,0); - uiWaveCount = 0; } } @@ -347,7 +421,6 @@ struct instance_violet_hold : public ScriptedInstance { DoUpdateWorldState(WORLD_STATE_VH, 1); DoUpdateWorldState(WORLD_STATE_VH_WAVE_COUNT, uiWaveCount); - DoUpdateWorldState(WORLD_STATE_VH_PRISON_STATE, 100); // TODO switch(uiWaveCount) { @@ -375,43 +448,14 @@ struct instance_violet_hold : public ScriptedInstance { if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor)) pMainDoor->SetGoState(GO_STATE_READY); + DoUpdateWorldState(WORLD_STATE_VH_PRISON_STATE, 100); } default: - if (!bWiped) - SpawnPortal(); - bWiped = false; + SpawnPortal(); break; } } - uint64 GetData64(uint32 identifier) - { - switch(identifier) - { - case DATA_MORAGG: return uiMoragg; - case DATA_EREKEM: return uiErekem; - case DATA_EREKEM_GUARD_1: return uiErekemGuard[0]; - case DATA_EREKEM_GUARD_2: return uiErekemGuard[1]; - case DATA_ICHORON: return uiIchoron; - case DATA_LAVANTHOR: return uiLavanthor; - case DATA_XEVOZZ: return uiXevozz; - case DATA_ZURAMAT: return uiZuramat; - case DATA_CYANIGOSA: return uiCyanigosa; - case DATA_MORAGG_CELL: return uiMoraggCell; - case DATA_EREKEM_CELL: return uiErekemCell; - case DATA_EREKEM_RIGHT_GUARD_CELL: return uiErekemRightGuardCell; - case DATA_EREKEM_LEFT_GUARD_CELL: return uiErekemLeftGuardCell; - case DATA_ICHORON_CELL: return uiIchoronCell; - case DATA_LAVANTHOR_CELL: return uiLavanthorCell; - case DATA_XEVOZZ_CELL: return uiXevozzCell; - case DATA_ZURAMAT_CELL: return uiZuramatCell; - case DATA_MAIN_DOOR: return uiMainDoor; - case DATA_SINCLARI: return uiSinclari; - } - - return 0; - } - std::string GetSaveData() { OUT_SAVE_INST_DATA; @@ -483,7 +527,8 @@ struct instance_violet_hold : public ScriptedInstance if (!instance->HavePlayers()) return; - if (bActive) + // portals should spawn if other portal is dead and doors are closed + if (bActive && GetData(DATA_MAIN_DOOR) == GO_STATE_READY) { if (uiActivationTimer < diff) { @@ -493,23 +538,55 @@ struct instance_violet_hold : public ScriptedInstance } else uiActivationTimer -= diff; } - if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor)) - if (pMainDoor->GetGoState() != GO_STATE_ACTIVE && CheckWipe()) + // if doors are closed (means event is in progres) and players have wiped then reset instance + if (GetData(DATA_MAIN_DOOR) != GO_STATE_ACTIVE && CheckWipe()) + { + SetData(DATA_REMOVE_NPC, 1); + StartBossEncounter(uiFirstBoss, false); + StartBossEncounter(uiSecondBoss, false); + + SetData(DATA_MAIN_DOOR,GO_STATE_ACTIVE); + SetData(DATA_WAVE_COUNT, 0); + + if (Creature* pSinclari = instance->GetCreature(uiSinclari)) { - SetData(DATA_REMOVE_NPC, 1); - StartBossEncounter(uiFirstBoss, false); - StartBossEncounter(uiSecondBoss, false); - bWiped = true; - if (Creature* pSinclari = instance->GetCreature(uiSinclari)) + pSinclari->SetVisibility(VISIBILITY_ON); + + std::list GuardList; + pSinclari->GetCreatureListWithEntryInGrid(GuardList, NPC_VIOLET_HOLD_GUARD, 40.0f); + if (!GuardList.empty()) { - pSinclari->DisappearAndDie(); - pSinclari->Respawn(true); + for (std::list::const_iterator itr = GuardList.begin(); itr != GuardList.end(); ++itr) + { + if (Creature* pGuard = *itr) + { + pGuard->SetVisibility(VISIBILITY_ON); + pGuard->SetReactState(REACT_AGGRESSIVE); + pGuard->GetMotionMaster()->MovePoint(1,pGuard->GetHomePosition()); + } + } } + pSinclari->GetMotionMaster()->MovePoint(1,pSinclari->GetHomePosition()); + pSinclari->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NOT_SELECTABLE); + } + } - if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor)) - pMainDoor->SetGoState(GO_STATE_ACTIVE); - SetData(DATA_WAVE_COUNT, 0); + // if there are NPCs in front of the prison door, which are casting the door seal spell and doors are active + if(GetData(DATA_NPC_PRESENCE_AT_DOOR) && (GetData(DATA_MAIN_DOOR) == GO_STATE_READY)) + { + // if door integrity is > 0 then decrase it's integrity state + if(GetData(DATA_DOOR_INTEGRITY)) + { + if(uiDoorSpellTimer < diff) + { + SetData(DATA_DOOR_INTEGRITY,GetData(DATA_DOOR_INTEGRITY)-1); + uiDoorSpellTimer =2000; + } else uiDoorSpellTimer -= diff; } + // else set door state to active (means door will open and group have failed to sustain mob invasion on the door) + else + SetData(DATA_MAIN_DOOR,GO_STATE_ACTIVE); + } } }; diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp index 169f933ef45..b46f4d68c11 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp @@ -1,4 +1,5 @@ #include "ScriptPCH.h" +#include "ScriptedEscortAI.h" #include "violet_hold.h" #define GOSSIP_START_EVENT "Get your people to safety, we'll keep the Blue Dragonflight's forces at bay." @@ -7,29 +8,184 @@ enum PortalCreatures { - CREATURE_AZURE_INVADER = 30661, - CREATURE_AZURE_SPELLBREAKER = 30662, - CREATURE_AZURE_BINDER = 30663, - CREATURE_AZURE_MAGE_SLAYER = 30664, + CREATURE_AZURE_INVADER_1 = 30661, + CREATURE_AZURE_INVADER_2 = 30961, + CREATURE_AZURE_SPELLBREAKER_1 = 30662, + CREATURE_AZURE_SPELLBREAKER_2 = 30962, + CREATURE_AZURE_BINDER_1 = 30663, + CREATURE_AZURE_BINDER_2 = 30918, + CREATURE_AZURE_MAGE_SLAYER_1 = 30664, + CREATURE_AZURE_MAGE_SLAYER_2 = 30963, CREATURE_AZURE_CAPTAIN = 30666, CREATURE_AZURE_SORCEROR = 30667, CREATURE_AZURE_RAIDER = 30668, CREATURE_AZURE_STALKER = 32191 }; +enum AzureInvaderSpells +{ + SPELL_CLEAVE = 15496, + SPELL_IMPALE = 58459, + H_SPELL_IMPALE = 59256, + SPELL_BRUTAL_STRIKE = 58460, + SPELL_SUNDER_ARMOR = 58461 +}; + +enum AzureSellbreakerSpells +{ + SPELL_ARCANE_BLAST = 58462, + H_SPELL_ARCANE_BLAST = 59257, + SPELL_SLOW = 25603, + SPELL_CHAINS_OF_ICE = 58464, + SPELL_CONE_OF_COLD = 58463, + H_SPELL_CONE_OF_COLD = 59258 +}; + +enum AzureBinderSpells +{ + SPELL_ARCANE_BARRAGE = 58456, + H_SPELL_ARCANE_BARRAGE = 59248, + SPELL_ARCANE_EXPLOSION = 58455, + H_SPELL_ARCANE_EXPLOSION = 59245, + SPELL_FROST_NOVA = 58458, + H_SPELL_FROST_NOVA = 59253, + SPELL_FROSTBOLT = 58457, + H_SPELL_FROSTBOLT = 59251, +}; + +enum AzureMageSlayerSpells +{ + SPELL_ARCANE_EMPOWERMENT = 58469, + SPELL_SPELL_LOCK = 30849 +}; + +enum AzureCaptainSpells +{ + SPELL_MORTAL_STRIKE = 32736, + SPELL_WHIRLWIND_OF_STEEL = 41057 +}; + +enum AzureSorcerorSpells +{ + SPELL_ARCANE_STREAM = 60181, + H_SPELL_ARCANE_STREAM = 60204, + SPELL_MANA_DETONATION = 60182, + H_SPELL_MANA_DETONATION = 60205 +}; + +enum AzureRaiderSpells +{ + SPELL_CONCUSSION_BLOW = 52719, + SPELL_MAGIC_REFLECTION = 60158 +}; + +enum AzureStalkerSpells +{ + SPELL_BACKSTAB = 58471, + SPELL_TACTICAL_BLINK = 58470 +}; + +enum TrashDoorSpell +{ + SPELL_DESTROY_DOOR_SEAL = 58040 +}; + enum Spells { - SPELL_PORTAL_CHANNEL = 58012 + SPELL_PORTAL_CHANNEL = 58012, + SPELL_CRYSTALL_ACTIVATION = 57804 }; enum eSinclari { - NPC_VIOLET_HOLD_GUARD = 30659, + SAY_SINCLARI_1 = -1608045 +}; + +float FirstPortalWPs [6][3] = +{ + {1877.670288, 842.280273, 43.333591}, + {1877.338867, 834.615356, 38.762287}, + {1872.161011, 823.854309, 38.645401}, + {1864.860474, 815.787170, 38.784843}, + {1858.953735, 810.048950, 44.008759}, + {1843.707153, 805.807739, 44.135197} + //{1825.736084, 807.305847, 44.363785} +}; + +float SecondPortalFirstWPs [9][3] = +{ + {1902.561401, 853.334656, 47.106117}, + {1895.486084, 855.376404, 44.334591}, + {1882.805176, 854.993286, 43.333591}, + {1877.670288, 842.280273, 43.333591}, + {1877.338867, 834.615356, 38.762287}, + {1872.161011, 823.854309, 38.645401}, + {1864.860474, 815.787170, 38.784843}, + {1858.953735, 810.048950, 44.008759}, + {1843.707153, 805.807739, 44.135197} + //{1825.736084, 807.305847, 44.363785} +}; - SAY_SINCLARI_1 = -1608045, +float SecondPortalSecondWPs [8][3] = +{ + {1929.392212, 837.614990, 47.136166}, + {1928.290649, 824.750427, 45.474411}, + {1915.544922, 826.919373, 38.642811}, + {1900.933960, 818.855652, 38.801647}, + {1886.810547, 813.536621, 38.490490}, + {1869.079712, 808.701538, 38.689003}, + {1860.843384, 806.645020, 44.008789}, + {1843.707153, 805.807739, 44.135197} + //{1825.736084, 807.305847, 44.363785} +}; + +float ThirdPortalWPs [8][3] = +{ + {1934.049438, 815.778503, 52.408699}, + {1928.290649, 824.750427, 45.474411}, + {1915.544922, 826.919373, 38.642811}, + {1900.933960, 818.855652, 38.801647}, + {1886.810547, 813.536621, 38.490490}, + {1869.079712, 808.701538, 38.689003}, + {1860.843384, 806.645020, 44.008789}, + {1843.707153, 805.807739, 44.135197} + //{1825.736084, 807.305847, 44.363785} +}; + +float FourthPortalWPs [9][3] = +{ + {1921.658447, 761.657043, 50.866741}, + {1910.559814, 755.780457, 47.701447}, + {1896.664673, 752.920898, 47.667004}, + {1887.398804, 763.633240, 47.666851}, + {1879.020386, 775.396973, 38.705990}, + {1872.439087, 782.568604, 38.808292}, + {1863.573364, 791.173584, 38.743660}, + {1857.811890, 796.765564, 43.950329}, + {1845.577759, 800.681152, 44.104248} + //{1827.100342, 801.605957, 44.363358} +}; + +float FifthPortalWPs [6][3] = +{ + {1887.398804, 763.633240, 47.666851}, + {1879.020386, 775.396973, 38.705990}, + {1872.439087, 782.568604, 38.808292}, + {1863.573364, 791.173584, 38.743660}, + {1857.811890, 796.765564, 43.950329}, + {1845.577759, 800.681152, 44.104248} + //{1827.100342, 801.605957, 44.363358} +}; + +float SixthPoralWPs [4][3] = +{ + {1888.861084, 805.074768, 38.375790}, + {1869.793823, 804.135804, 38.647018}, + {1861.541504, 804.149780, 43.968292}, + {1843.567017, 804.288208, 44.139091} + //{1826.889648, 803.929993, 44.363239} }; -const Position DoorPosition = { 1828.300049, 797.309021, 46.135502, 1.48353}; const Position MovePosition = { 1806.955566, 803.851807, 44.363323}; struct npc_sinclariAI : public ScriptedAI @@ -69,22 +225,6 @@ struct npc_sinclariAI : public ScriptedAI } } - void MovementInform(uint32 uiType, uint32 /*uiId*/) - { - if (uiType != POINT_MOTION_TYPE) - return; - - if (pInstance) - { - pInstance->SetData(DATA_WAVE_COUNT,1); - pInstance->SetData(DATA_REMOVE_NPC,0); // might not have been reset after a wipe on a boss. - } - - //She should not be despawned, she will be used by the instance to summon some npcs - me->SetVisibility(VISIBILITY_OFF); - me->SetReactState(REACT_PASSIVE); - } - void UpdateAI(const uint32 uiDiff) { ScriptedAI::UpdateAI(uiDiff); @@ -96,10 +236,11 @@ struct npc_sinclariAI : public ScriptedAI switch(uiPhase) { case 1: - DoScriptText(SAY_SINCLARI_1, me); - uiTimer = 4000; - uiPhase = 2; - break; + me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NOT_SELECTABLE); + DoScriptText(SAY_SINCLARI_1, me); + uiTimer = 4000; + uiPhase = 2; + break; case 2: { std::list GuardList; @@ -136,6 +277,18 @@ struct npc_sinclariAI : public ScriptedAI } case 4: me->GetMotionMaster()->MovePoint(0, MovePosition); + uiTimer = 4000; + uiPhase = 5; + break; + case 5: + if (pInstance) + { + pInstance->SetData(DATA_MAIN_DOOR,GO_STATE_READY); + pInstance->SetData(DATA_WAVE_COUNT,1); + pInstance->SetData(DATA_REMOVE_NPC,0); // might not have been reset after a wipe on a boss. + } + me->SetVisibility(VISIBILITY_OFF); + me->SetReactState(REACT_PASSIVE); uiTimer = 0; uiPhase = 0; break; @@ -187,23 +340,29 @@ bool GossipSelect_npc_sinclari(Player* pPlayer, Creature* pCreature, uint32 /*ui struct npc_teleportation_portalAI : public ScriptedAI { - npc_teleportation_portalAI(Creature *c) : ScriptedAI(c) + npc_teleportation_portalAI(Creature *c) : ScriptedAI(c), listOfMobs(me) { pInstance = c->GetInstanceData(); + uiTypeOfMobsPortal = urand(0,1); // 0 - elite mobs 1 - portal guardian or portal keeper with regular mobs + bPortalGuardianOrKeeperOrEliteSpawn = false; } uint32 uiSpawnTimer; - bool bPortalGuardianOrKeeperSpawn; + bool bPortalGuardianOrKeeperOrEliteSpawn; + uint8 uiTypeOfMobsPortal; + + SummonList listOfMobs; ScriptedInstance *pInstance; void Reset() { uiSpawnTimer = 10000; - bPortalGuardianOrKeeperSpawn = false; + bPortalGuardianOrKeeperOrEliteSpawn = false; } void EnterCombat(Unit * /*who*/) {} + void MoveInLineOfSight(Unit * /*who*/) {} void UpdateAI(const uint32 diff) @@ -214,33 +373,63 @@ struct npc_teleportation_portalAI : public ScriptedAI pInstance->SetData(DATA_REMOVE_NPC, 0); } - if (uiSpawnTimer <= diff) + switch(uiTypeOfMobsPortal) { - if (bPortalGuardianOrKeeperSpawn) - { - uint8 k = pInstance->GetData(DATA_WAVE_COUNT) < 12 ? 2 : 3; - for (uint8 i = 0; i < k; ++i) + // spawn elite mobs and then set portals visibility to make it look like it dissapeard + case 0: + if(!bPortalGuardianOrKeeperOrEliteSpawn) { - uint32 entry = RAND(CREATURE_AZURE_CAPTAIN,CREATURE_AZURE_RAIDER,CREATURE_AZURE_STALKER,CREATURE_AZURE_SORCEROR); - if (Creature* pSummon = DoSummon(entry, me, 2.0f, 30000, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT)) - pSummon->GetMotionMaster()->MovePoint(0, DoorPosition); + if (uiSpawnTimer <= diff) + { + bPortalGuardianOrKeeperOrEliteSpawn = true; + uint8 k = pInstance->GetData(DATA_WAVE_COUNT) < 12 ? 2 : 3; + for (uint8 i = 0; i < k; i) + { + uint32 entry = RAND(CREATURE_AZURE_CAPTAIN,CREATURE_AZURE_RAIDER,CREATURE_AZURE_STALKER,CREATURE_AZURE_SORCEROR); + DoSummon(entry, me, 2.0f, 20000, TEMPSUMMON_DEAD_DESPAWN); + } + me->SetVisibility(VISIBILITY_OFF); + } else uiSpawnTimer -= diff; } - } - else - { - bPortalGuardianOrKeeperSpawn = true; - uint32 entry = RAND(CREATURE_PORTAL_GUARDIAN, CREATURE_PORTAL_KEEPER); - if (Creature *pPortalKeeper = DoSummon(entry, me, 2.0f, 0, TEMPSUMMON_DEAD_DESPAWN)) - me->CastSpell(pPortalKeeper, SPELL_PORTAL_CHANNEL, false); - } - uiSpawnTimer = SPAWN_TIME; - } else uiSpawnTimer -= diff; + else + { + // if all spawned elites have died kill portal + if(!listOfMobs.size()) + { + me->Kill(me, false); + me->RemoveCorpse(); + } + } + break; + // spawn portal guardian or portal keeper with regular mobs + case 1: + if (uiSpawnTimer <= diff) + { + if(bPortalGuardianOrKeeperOrEliteSpawn) + { + uint8 k = pInstance->GetData(DATA_WAVE_COUNT) < 12 ? 3 : 4; + for (uint8 i = 0; i < k; i) + { + uint32 entry = RAND(CREATURE_AZURE_INVADER_1,CREATURE_AZURE_INVADER_2,CREATURE_AZURE_SPELLBREAKER_1,CREATURE_AZURE_SPELLBREAKER_2,CREATURE_AZURE_MAGE_SLAYER_1,CREATURE_AZURE_MAGE_SLAYER_2,CREATURE_AZURE_BINDER_1,CREATURE_AZURE_BINDER_2); + DoSummon(entry, me, 2.0f, 20000, TEMPSUMMON_DEAD_DESPAWN); + } + } + else + { + bPortalGuardianOrKeeperOrEliteSpawn = true; + uint32 entry = RAND(CREATURE_PORTAL_GUARDIAN, CREATURE_PORTAL_KEEPER); + if (Creature *pPortalKeeper = DoSummon(entry, me, 2.0f, 0, TEMPSUMMON_DEAD_DESPAWN)) + me->CastSpell(pPortalKeeper, SPELL_PORTAL_CHANNEL, false); + } + uiSpawnTimer = SPAWN_TIME; + } else uiSpawnTimer -= diff; - if (bPortalGuardianOrKeeperSpawn && !me->IsNonMeleeSpellCasted(false)) - { - me->Kill(me, false); - me->RemoveCorpse(); - return; + if (bPortalGuardianOrKeeperOrEliteSpawn && !me->IsNonMeleeSpellCasted(false)) + { + me->Kill(me, false); + me->RemoveCorpse(); + } + break; } } @@ -249,6 +438,16 @@ struct npc_teleportation_portalAI : public ScriptedAI if (pInstance) pInstance->SetData(DATA_WAVE_COUNT,pInstance->GetData(DATA_WAVE_COUNT)+1); } + + void JustSummoned(Creature *summoned) + { + listOfMobs.Summon(summoned); + } + + void SummonedMobDied(Creature *summoned) + { + listOfMobs.Despawn(summoned); + } }; CreatureAI* GetAI_npc_teleportation_portal(Creature *pCreature) @@ -256,6 +455,594 @@ CreatureAI* GetAI_npc_teleportation_portal(Creature *pCreature) return new npc_teleportation_portalAI(pCreature); } +struct violet_hold_trashAI : public npc_escortAI +{ + violet_hold_trashAI(Creature *c):npc_escortAI(c) + { + pInstance = c->GetInstanceData(); + bHasGotMovingPoints = false; + portalLocationID = pInstance->GetData(DATA_PORTAL_LOCATION); + Reset(); + } + + public: + ScriptedInstance* pInstance; + bool bHasGotMovingPoints; + uint32 portalLocationID; + uint32 secondPortalRouteID; + + void WaypointReached(uint32 uiPointId) + { + switch(portalLocationID) + { + case 0: + if (uiPointId == 5) + CreatureStartAttackDoor(me->GetGUID()); + break; + case 1: + if((uiPointId == 8 && secondPortalRouteID == 0) || (uiPointId == 7 && secondPortalRouteID == 1)) + CreatureStartAttackDoor(me->GetGUID()); + break; + case 2: + if(uiPointId == 7) + CreatureStartAttackDoor(me->GetGUID()); + break; + case 3: + if(uiPointId == 8) + CreatureStartAttackDoor(me->GetGUID()); + break; + case 4: + if(uiPointId == 5) + CreatureStartAttackDoor(me->GetGUID()); + break; + case 5: + if(uiPointId == 3) + CreatureStartAttackDoor(me->GetGUID()); + break; + } + } + + void UpdateAI(const uint32) + { + if(pInstance->GetData(DATA_MAIN_DOOR) != GO_STATE_READY) + me->CastStop(); + + if(!bHasGotMovingPoints) + { + bHasGotMovingPoints = true; + switch(portalLocationID) + { + case 0: + for(int i=0;i<6;i++) + AddWaypoint(i,FirstPortalWPs[i][0]+irand(-1,1),FirstPortalWPs[i][1]+irand(-1,1),FirstPortalWPs[i][2]+irand(-1,1),0); + me->SetHomePosition(FirstPortalWPs[5][0],FirstPortalWPs[5][1],FirstPortalWPs[5][2],3.149439); + break; + case 1: + secondPortalRouteID = urand(0,1); + switch(secondPortalRouteID) + { + case 0: + for(int i=0;i<9;i++) + AddWaypoint(i,SecondPortalFirstWPs[i][0]+irand(-1,1),SecondPortalFirstWPs[i][1]+irand(-1,1),SecondPortalFirstWPs[i][2],0); + me->SetHomePosition(SecondPortalFirstWPs[8][0]+irand(-1,1),SecondPortalFirstWPs[8][1]+irand(-1,1),SecondPortalFirstWPs[8][2]+irand(-1,1),3.149439); + break; + case 1: + for(int i=0;i<8;i++) + AddWaypoint(i,SecondPortalSecondWPs[i][0]+irand(-1,1),SecondPortalSecondWPs[i][1]+irand(-1,1),SecondPortalSecondWPs[i][2],0); + me->SetHomePosition(SecondPortalSecondWPs[7][0],SecondPortalSecondWPs[7][1],SecondPortalSecondWPs[7][2],3.149439); + break; + } + break; + case 2: + for(int i=0;i<8;i++) + AddWaypoint(i,ThirdPortalWPs[i][0]+irand(-1,1),ThirdPortalWPs[i][1]+irand(-1,1),ThirdPortalWPs[i][2],0); + me->SetHomePosition(ThirdPortalWPs[7][0],ThirdPortalWPs[7][1],ThirdPortalWPs[7][2],3.149439); + break; + case 3: + for(int i=0;i<9;i++) + AddWaypoint(i,FourthPortalWPs[i][0]+irand(-1,1),FourthPortalWPs[i][1]+irand(-1,1),FourthPortalWPs[i][2],0); + me->SetHomePosition(FourthPortalWPs[8][0],FourthPortalWPs[8][1],FourthPortalWPs[8][2],3.149439); + break; + case 4: + for(int i=0;i<6;i++) + AddWaypoint(i,FifthPortalWPs[i][0]+irand(-1,1),FifthPortalWPs[i][1]+irand(-1,1),FifthPortalWPs[i][2],0); + me->SetHomePosition(FifthPortalWPs[5][0],FifthPortalWPs[5][1],FifthPortalWPs[5][2],3.149439); + break; + case 5: + for(int i=0;i<4;i++) + AddWaypoint(i,SixthPoralWPs[i][0]+irand(-1,1),SixthPoralWPs[i][1]+irand(-1,1),SixthPoralWPs[i][2],0); + me->SetHomePosition(SixthPoralWPs[3][0],SixthPoralWPs[3][1],SixthPoralWPs[3][2],3.149439); + break; + } + SetDespawnAtEnd(false); + Start(true,true); + } + } + + void JustDied(Unit *unit) + { + Creature* portal = Unit::GetCreature((*me),pInstance->GetData64(DATA_TELEPORTATION_PORTAL)); + if (portal) + CAST_AI(npc_teleportation_portalAI,portal->AI())->SummonedMobDied(me); + pInstance->SetData(DATA_NPC_PRESENCE_AT_DOOR_REMOVE,1); + } + + void CreatureStartAttackDoor(uint32 creature_guid) + { + me->SetReactState(REACT_PASSIVE); + DoCast(SPELL_DESTROY_DOOR_SEAL); + pInstance->SetData(DATA_NPC_PRESENCE_AT_DOOR_ADD,1); + } + +}; + +struct mob_azure_invaderAI : public violet_hold_trashAI +{ + mob_azure_invaderAI(Creature *c) : violet_hold_trashAI(c) + { + pInstance = c->GetInstanceData(); + } + + uint32 uiCleaveTimer; + uint32 uiImpaleTimer; + uint32 uiBrutalStrikeTimer; + uint32 uiSunderArmorTimer; + + void Reset() + { + uiCleaveTimer = 5000; + uiImpaleTimer = 4000; + uiBrutalStrikeTimer = 5000; + uiSunderArmorTimer = 4000; + } + + void UpdateAI(const uint32 diff) + { + violet_hold_trashAI::UpdateAI(diff); + npc_escortAI::UpdateAI(diff); + + if(!UpdateVictim()) + return; + + if(me->GetEntry() == CREATURE_AZURE_INVADER_1) + { + if(uiCleaveTimer <= diff) + { + DoCast(me->getVictim(),SPELL_CLEAVE); + uiCleaveTimer = 5000; + }else uiCleaveTimer -= diff; + + if(uiImpaleTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); + if(pTarget) + DoCast(pTarget,SPELL_IMPALE); + uiImpaleTimer = 4000; + }else uiImpaleTimer -= diff; + } + + if(me->GetEntry() == CREATURE_AZURE_INVADER_2) + { + if(uiBrutalStrikeTimer <= diff) + { + DoCast(me->getVictim(),SPELL_BRUTAL_STRIKE); + uiBrutalStrikeTimer = 5000; + }else uiBrutalStrikeTimer -= diff; + + if(uiSunderArmorTimer <= diff) + { + DoCast(me->getVictim(),SPELL_SUNDER_ARMOR); + uiSunderArmorTimer = urand(8000,10000); + }else uiSunderArmorTimer -= diff; + + DoMeleeAttackIfReady(); + } + + DoMeleeAttackIfReady(); + } + +}; + +struct mob_azure_spellbreakerAI : public violet_hold_trashAI +{ + mob_azure_spellbreakerAI(Creature* c) : violet_hold_trashAI(c) + { + pInstance = c->GetInstanceData(); + } + + uint32 uiArcaneBlastTimer; + uint32 uiSlowTimer; + uint32 uiChainsOfIceTimer; + uint32 uiConeOfColdTimer; + + void Reset() + { + uiArcaneBlastTimer = 5000; + uiSlowTimer = 4000; + uiChainsOfIceTimer = 5000; + uiConeOfColdTimer = 4000; + } + + void UpdateAI(const uint32 diff) + { + violet_hold_trashAI::UpdateAI(diff); + npc_escortAI::UpdateAI(diff); + + if(!UpdateVictim()) + return; + + if(me->GetEntry() == CREATURE_AZURE_SPELLBREAKER_1) + { + if(uiArcaneBlastTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); + if(pTarget) + DoCast(pTarget,DUNGEON_MODE(SPELL_ARCANE_BLAST,H_SPELL_ARCANE_BLAST)); + uiArcaneBlastTimer = 6000; + }else uiArcaneBlastTimer -= diff; + + if(uiSlowTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); + if(pTarget) + DoCast(pTarget,SPELL_SLOW); + uiSlowTimer = 5000; + }else uiSlowTimer -= diff; + } + + if(me->GetEntry() == CREATURE_AZURE_SPELLBREAKER_2) + { + if(uiChainsOfIceTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); + if(pTarget) + DoCast(pTarget,SPELL_CHAINS_OF_ICE); + uiChainsOfIceTimer = 7000; + }else uiChainsOfIceTimer -= diff; + + if(uiConeOfColdTimer <= diff) + { + DoCast(DUNGEON_MODE(SPELL_CONE_OF_COLD,H_SPELL_CONE_OF_COLD)); + uiConeOfColdTimer = 5000; + }else uiConeOfColdTimer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +struct mob_azure_binderAI : public violet_hold_trashAI +{ + mob_azure_binderAI(Creature *c) : violet_hold_trashAI(c) + { + pInstance = c->GetInstanceData(); + } + + uint32 uiArcaneExplosionTimer; + uint32 uiArcainBarrageTimer; + uint32 uiFrostNovaTimer; + uint32 uiFrostboltTimer; + + void Reset() + { + uiArcaneExplosionTimer = 5000; + uiArcainBarrageTimer = 4000; + uiFrostNovaTimer = 5000; + uiFrostboltTimer = 4000; + } + + void UpdateAI(const uint32 diff) + { + violet_hold_trashAI::UpdateAI(diff); + npc_escortAI::UpdateAI(diff); + + if(!UpdateVictim()) + return; + + if(me->GetEntry() == CREATURE_AZURE_BINDER_1) + { + if(uiArcaneExplosionTimer <= diff) + { + DoCast(DUNGEON_MODE(SPELL_ARCANE_EXPLOSION,H_SPELL_ARCANE_EXPLOSION)); + uiArcaneExplosionTimer = 5000; + }else uiArcaneExplosionTimer -= diff; + + if(uiArcainBarrageTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); + if(pTarget) + DoCast(pTarget,DUNGEON_MODE(SPELL_ARCANE_BARRAGE,H_SPELL_ARCANE_BARRAGE)); + uiArcainBarrageTimer = 6000; + }else uiArcainBarrageTimer -= diff; + } + + if(me->GetEntry() == CREATURE_AZURE_BINDER_2) + { + if(uiFrostNovaTimer <= diff) + { + DoCast(DUNGEON_MODE(SPELL_FROST_NOVA,H_SPELL_FROST_NOVA)); + uiFrostNovaTimer = 5000; + }else uiFrostNovaTimer -= diff; + + if(uiFrostboltTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); + if(pTarget) + DoCast(pTarget,DUNGEON_MODE(SPELL_FROSTBOLT,H_SPELL_FROSTBOLT)); + uiFrostboltTimer = 6000; + }else uiFrostboltTimer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +struct mob_azure_mage_slayerAI : public violet_hold_trashAI +{ + mob_azure_mage_slayerAI(Creature *c) : violet_hold_trashAI(c) + { + pInstance = c->GetInstanceData(); + } + + uint32 uiArcaneEmpowermentTimer; + uint32 uiSpellLockTimer; + + void Reset() + { + uiArcaneEmpowermentTimer = 5000; + uiSpellLockTimer = 5000; + } + + void UpdateAI(const uint32 diff) + { + violet_hold_trashAI::UpdateAI(diff); + npc_escortAI::UpdateAI(diff); + + if(!UpdateVictim()) + return; + + if(me->GetEntry() == CREATURE_AZURE_MAGE_SLAYER_1) + { + if(uiArcaneEmpowermentTimer <= diff) + { + DoCast(me,SPELL_ARCANE_EMPOWERMENT); + uiArcaneEmpowermentTimer = 14000; + }else uiArcaneEmpowermentTimer -= diff; + } + + if(me->GetEntry() == CREATURE_AZURE_MAGE_SLAYER_2) + { + if(uiSpellLockTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); + if(pTarget) + DoCast(pTarget,SPELL_SPELL_LOCK); + uiSpellLockTimer = 9000; + }else uiSpellLockTimer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +struct mob_azure_captainAI : public violet_hold_trashAI +{ + mob_azure_captainAI(Creature *c) : violet_hold_trashAI(c) + { + pInstance = c->GetInstanceData(); + } + + uint32 uiMortalStrikeTimer; + uint32 uiWhirlwindTimer; + + void Reset() + { + uiMortalStrikeTimer = 5000; + uiWhirlwindTimer = 8000; + } + + void UpdateAI(const uint32 diff) + { + violet_hold_trashAI::UpdateAI(diff); + npc_escortAI::UpdateAI(diff); + + if(!UpdateVictim()) + return; + + if(uiMortalStrikeTimer <= diff) + { + DoCast(me->getVictim(),SPELL_MORTAL_STRIKE); + uiMortalStrikeTimer = 5000; + }else uiMortalStrikeTimer -= diff; + + if(uiWhirlwindTimer <= diff) + { + DoCast(me,SPELL_WHIRLWIND_OF_STEEL); + uiWhirlwindTimer = 8000; + }else uiWhirlwindTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct mob_azure_sorcerorAI : public violet_hold_trashAI +{ + mob_azure_sorcerorAI(Creature *c) : violet_hold_trashAI(c) + { + pInstance = c->GetInstanceData(); + } + + uint32 uiArcaneStreamTimer; + uint32 uiArcaneStreamTimerStartingValueHolder; + uint32 uiManaDetonationTimer; + + void Reset() + { + uiArcaneStreamTimer = 4000; + uiArcaneStreamTimerStartingValueHolder = uiArcaneStreamTimer; + uiManaDetonationTimer = 5000; + } + + void UpdateAI(const uint32 diff) + { + violet_hold_trashAI::UpdateAI(diff); + npc_escortAI::UpdateAI(diff); + + if(!UpdateVictim()) + return; + + if(uiArcaneStreamTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); + if(pTarget) + DoCast(pTarget,DUNGEON_MODE(SPELL_ARCANE_STREAM,H_SPELL_ARCANE_STREAM)); + uiArcaneStreamTimer = urand(0,5000)+5000; + uiArcaneStreamTimerStartingValueHolder = uiArcaneStreamTimer; + }else uiArcaneStreamTimer -= diff; + + if(uiManaDetonationTimer <= diff && uiArcaneStreamTimer >=1500 && uiArcaneStreamTimer <= uiArcaneStreamTimerStartingValueHolder/2) + { + DoCast(DUNGEON_MODE(SPELL_MANA_DETONATION,H_SPELL_MANA_DETONATION)); + uiManaDetonationTimer = urand(2000,6000); + }else uiManaDetonationTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct mob_azure_raiderAI : public violet_hold_trashAI +{ + mob_azure_raiderAI(Creature *c) : violet_hold_trashAI(c) + { + pInstance = c->GetInstanceData(); + } + + uint32 uiConcussionBlowTimer; + uint32 uiMagicReflectionTimer; + + void Reset() + { + uiConcussionBlowTimer = 5000; + uiMagicReflectionTimer = 8000; + } + + void UpdateAI(const uint32 diff) + { + violet_hold_trashAI::UpdateAI(diff); + npc_escortAI::UpdateAI(diff); + + if(!UpdateVictim()) + return; + + if(uiConcussionBlowTimer <= diff) + { + DoCast(me->getVictim(),SPELL_CONCUSSION_BLOW); + uiConcussionBlowTimer = 5000; + }else uiConcussionBlowTimer -= diff; + + if(uiMagicReflectionTimer <= diff) + { + DoCast(SPELL_MAGIC_REFLECTION); + uiMagicReflectionTimer = urand(10000,15000); + }else uiMagicReflectionTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct mob_azure_stalkerAI : public violet_hold_trashAI +{ + mob_azure_stalkerAI(Creature *c) : violet_hold_trashAI(c) + { + pInstance = c->GetInstanceData(); + } + uint32 uiBackstabTimer; + uint32 uiTacticalBlinkTimer; + bool TacticalBlinkCasted; + + void Reset() + { + uiBackstabTimer = 1300; + uiTacticalBlinkTimer = 8000; + TacticalBlinkCasted =false; + } + + void UpdateAI(const uint32 diff) + { + violet_hold_trashAI::UpdateAI(diff); + npc_escortAI::UpdateAI(diff); + + if(!UpdateVictim()) + return; + + if(!TacticalBlinkCasted) + { + if(uiTacticalBlinkTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true); + if(pTarget) + DoCast(pTarget,SPELL_TACTICAL_BLINK); + uiTacticalBlinkTimer = 6000; + TacticalBlinkCasted = true; + }else uiTacticalBlinkTimer -= diff; + } + + else + { + if(uiBackstabTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_NEAREST, 0, 10, true); + DoCast(pTarget,SPELL_BACKSTAB); + TacticalBlinkCasted = false; + uiBackstabTimer =1300; + }else uiBackstabTimer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_mob_azure_invader(Creature* pCreature) +{ + return new mob_azure_invaderAI (pCreature); +} + +CreatureAI* GetAI_mob_azure_spellbreaker(Creature* pCreature) +{ + return new mob_azure_spellbreakerAI (pCreature); +} + +CreatureAI* GetAI_mob_azure_binder(Creature* pCreature) +{ + return new mob_azure_binderAI (pCreature); +} + +CreatureAI* GetAI_mob_azure_mage_slayer(Creature* pCreature) +{ + return new mob_azure_mage_slayerAI (pCreature); +} + +CreatureAI* GetAI_mob_azure_captain(Creature* pCreature) +{ + return new mob_azure_captainAI (pCreature); +} + +CreatureAI* GetAI_mob_azure_sorceror(Creature* pCreature) +{ + return new mob_azure_sorcerorAI (pCreature); +} + +CreatureAI* GetAI_mob_azure_raider(Creature* pCreature) +{ + return new mob_azure_raiderAI (pCreature); +} + +CreatureAI* GetAI_mob_azure_stalker(Creature* pCreature) +{ + return new mob_azure_stalkerAI (pCreature); +} + void AddSC_violet_hold() { Script *newscript; @@ -271,4 +1058,44 @@ void AddSC_violet_hold() newscript->Name = "npc_teleportation_portal_vh"; newscript->GetAI = &GetAI_npc_teleportation_portal; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_invader"; + newscript->GetAI = &GetAI_mob_azure_invader; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_spellbreaker"; + newscript->GetAI = &GetAI_mob_azure_invader; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_binder"; + newscript->GetAI = &GetAI_mob_azure_binder; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_mage_slayer"; + newscript->GetAI = &GetAI_mob_azure_mage_slayer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_captain"; + newscript->GetAI = &GetAI_mob_azure_captain; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_sorceror"; + newscript->GetAI = &GetAI_mob_azure_sorceror; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_raider"; + newscript->GetAI = &GetAI_mob_azure_raider; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_stalker"; + newscript->GetAI = &GetAI_mob_azure_stalker; + newscript->RegisterSelf(); } diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.h b/src/server/scripts/Northrend/VioletHold/violet_hold.h index 4476d5e823a..459cfc884ee 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.h +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.h @@ -14,7 +14,8 @@ enum Creatures CREATURE_EREKEM_GUARD = 29395, CREATURE_MORAGG = 29316, CREATURE_CYANIGOSA = 31134, - CREATURE_SINCLARI = 30658 + CREATURE_SINCLARI = 30658, + NPC_VIOLET_HOLD_GUARD = 30659 }; enum Data @@ -23,7 +24,12 @@ enum Data DATA_2ND_BOSS_EVENT, DATA_CYANIGOSA_EVENT, DATA_WAVE_COUNT, - DATA_REMOVE_NPC + DATA_REMOVE_NPC, + DATA_PORTAL_LOCATION, + DATA_DOOR_INTEGRITY, + DATA_NPC_PRESENCE_AT_DOOR, + DATA_NPC_PRESENCE_AT_DOOR_ADD, + DATA_NPC_PRESENCE_AT_DOOR_REMOVE }; enum Data64 @@ -46,7 +52,8 @@ enum Data64 DATA_XEVOZZ_CELL, DATA_ZURAMAT_CELL, DATA_MAIN_DOOR, - DATA_SINCLARI + DATA_SINCLARI, + DATA_TELEPORTATION_PORTAL }; enum Bosses -- cgit v1.2.3 From 0e4954df2e3a31a9d2f928b365b7614ef182e3c3 Mon Sep 17 00:00:00 2001 From: Xanadu Date: Sat, 19 Jun 2010 21:23:56 +0200 Subject: Fixed the client crash near Exodar mysteriously caused by a model ID. Closes issue #2731. --HG-- branch : trunk --- sql/updates/8640_world_creature_template.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 sql/updates/8640_world_creature_template.sql (limited to 'sql/updates') diff --git a/sql/updates/8640_world_creature_template.sql b/sql/updates/8640_world_creature_template.sql new file mode 100644 index 00000000000..2b8e2327274 --- /dev/null +++ b/sql/updates/8640_world_creature_template.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `modelid2` = 0, `WDBVerified` = -11723 WHERE `entry` = 17591; -- cgit v1.2.3 From 47955ba8a8e3611d1713e0e7cbdbbde051702773 Mon Sep 17 00:00:00 2001 From: Tartalo Date: Sun, 20 Jun 2010 11:54:28 +0200 Subject: Nicer approach for Repeteance fix using spell_linked_spell --HG-- branch : trunk --- sql/updates/8658_world_spell_linked_spell.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/8658_world_spell_linked_spell.sql (limited to 'sql/updates') diff --git a/sql/updates/8658_world_spell_linked_spell.sql b/sql/updates/8658_world_spell_linked_spell.sql new file mode 100644 index 00000000000..a05895a955d --- /dev/null +++ b/sql/updates/8658_world_spell_linked_spell.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=20066; +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(20066, -61840, 0, 'Repentance'); + -- cgit v1.2.3 From f9f72b53af271873b268d6d977bb3425d2c23970 Mon Sep 17 00:00:00 2001 From: teacher Date: Mon, 21 Jun 2010 09:34:38 +0200 Subject: Added missed sql update file for Rev 8613. Removed hackish non-TrinityCore related 8640_world_creature_template.sql. Proper fix can be found on forum (Accepted Fixes). Don't worry if you used it, it was a harmless hotfix and it will not cause any issue when using proper fix from forum. Added to world_database missed changes updates. Minor sql standards cleanup. --HG-- branch : trunk --- sql/base/world_database.sql | 5 +++-- sql/updates/8568_world_trinity_string.sql | 1 - sql/updates/8640_world_creature_template.sql | 1 - sql/updates/8658_world_spell_linked_spell.sql | 1 - sql/updates/8671_world_spell_linked_spell.sql | 6 ++++++ 5 files changed, 9 insertions(+), 5 deletions(-) delete mode 100644 sql/updates/8640_world_creature_template.sql create mode 100644 sql/updates/8671_world_spell_linked_spell.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index f84a6b76705..f32713e4be6 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -567,6 +567,7 @@ INSERT INTO `command` VALUES ('reload areatrigger_teleport',3,'Syntax: .reload areatrigger_teleport\nReload areatrigger_teleport table.'), ('reload autobroadcast',3,'Syntax: .reload autobroadcast\nReload autobroadcast table.'), ('reload command',3,'Syntax: .reload command\nReload command table.'), +('reload conditions', 3, 'Reload conditions table.'), ('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_linked_respawn',2,'Syntax: .reload creature_linked_respawn\r\nReload creature_linked_respawn table.'), @@ -624,10 +625,9 @@ INSERT INTO `command` VALUES ('reload spell_proc_event',3,'Syntax: .reload spell_proc_event\nReload spell_proc_event table.'), ('reload spell_required',3,'Syntax: .reload spell_required\nReload spell_required table.'), ('reload spell_scripts',3,'Syntax: .reload spell_scripts\nReload spell_scripts table.'), -('reload spell_script_target',3,'Syntax: .reload spell_script_target\nReload spell_script_target table.'), ('reload spell_target_position',3,'Syntax: .reload spell_target_position\nReload spell_target_position table.'), ('reload spell_threats',3,'Syntax: .reload spell_threats\nReload spell_threats table.'), -('reload creature_template','3','Syntax: .reload creature_template $entry\r\nReload the specified creature\'s template.'), +('reload creature_template','3','Syntax: .reload creature_template $entry\r\nReload the specified creature''s template.'), ('reload trinity_string',3,'Syntax: .reload trinity_string\nReload trinity_string table.'), ('reload waypoint_scripts',3,'Syntax: .reload waypoint_scripts\nReload waypoint_scripts table.'), ('repairitems',2,'Syntax: .repairitems\r\n\r\nRepair all selected player''s items.'), @@ -6110,6 +6110,7 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment (-59907, 7, 0, 'Lightwell Charges - Suicide'), ( 19263, 67801, 2, 'Deterrence'), ( 45524, 55095, 0, 'Chains of Ice - Frost Fever'), +( 20066,-61840, 0, 'Repentance'), -- Quest ( 40214, 40216, 2, 'Dragonmaw Illusion'), ( 40214, 42016, 2, 'Dragonmaw Illusion'), diff --git a/sql/updates/8568_world_trinity_string.sql b/sql/updates/8568_world_trinity_string.sql index 029966a4968..c4fdc2f8480 100644 --- a/sql/updates/8568_world_trinity_string.sql +++ b/sql/updates/8568_world_trinity_string.sql @@ -1,4 +1,3 @@ DELETE FROM trinity_string WHERE entry IN (210); INSERT INTO trinity_string VALUES (210,'Item \'%i\' (with extended cost %i) already in vendor list.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); - diff --git a/sql/updates/8640_world_creature_template.sql b/sql/updates/8640_world_creature_template.sql deleted file mode 100644 index 2b8e2327274..00000000000 --- a/sql/updates/8640_world_creature_template.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `creature_template` SET `modelid2` = 0, `WDBVerified` = -11723 WHERE `entry` = 17591; diff --git a/sql/updates/8658_world_spell_linked_spell.sql b/sql/updates/8658_world_spell_linked_spell.sql index a05895a955d..59e96ca2ac5 100644 --- a/sql/updates/8658_world_spell_linked_spell.sql +++ b/sql/updates/8658_world_spell_linked_spell.sql @@ -1,4 +1,3 @@ DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=20066; INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (20066, -61840, 0, 'Repentance'); - diff --git a/sql/updates/8671_world_spell_linked_spell.sql b/sql/updates/8671_world_spell_linked_spell.sql new file mode 100644 index 00000000000..d2572727e59 --- /dev/null +++ b/sql/updates/8671_world_spell_linked_spell.sql @@ -0,0 +1,6 @@ +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (54861,55004)AND `spell_effect` IN (-23335,-23333); +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +(54861,-23335,0, 'Drop Flag on Nitro Boost WSG'), +(54861,-23333,0, 'Drop Flag on Nitro Boost WSG'), +(55004,-23335,0, 'Drop Flag on Nitro Boost WSG'), +(55004,-23333,0, 'Drop Flag on Nitro Boost WSG'); -- cgit v1.2.3 From f95bc8e0779bb308f7a60683ec3d74e04bf05816 Mon Sep 17 00:00:00 2001 From: teacher Date: Mon, 21 Jun 2010 15:21:48 +0200 Subject: Drop cond3 fields in gossip_menu_option table (the sql update was forgotten when condition table was implemented) and finally update world_database.sql accordingly. Removed all vehicle and gossip data from world_database.sql. DB projects must now handle such data. One file renamed (cosmetic) (thx Aokromes for spotting it). --HG-- branch : trunk --- sql/base/world_database.sql | 78 +++++++-------------------- sql/updates/8352_world_spell_linked_spell.sql | 1 - sql/updates/8607_world_pool_tempate.sql | 2 - sql/updates/8607_world_pool_template.sql | 2 + sql/updates/8672_world_gossip_menu_option.sql | 2 + 5 files changed, 22 insertions(+), 63 deletions(-) delete mode 100644 sql/updates/8607_world_pool_tempate.sql create mode 100644 sql/updates/8607_world_pool_template.sql create mode 100644 sql/updates/8672_world_gossip_menu_option.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index f32713e4be6..684d0a846d2 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -2582,6 +2582,15 @@ CREATE TABLE `gossip_scripts` ( ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Dumping data for table `gossip_scripts` +-- + +LOCK TABLES `gossip_scripts` WRITE; +/*!40000 ALTER TABLE `gossip_scripts` DISABLE KEYS */; +/*!40000 ALTER TABLE `gossip_scripts` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `gossip_menu` -- @@ -2592,16 +2601,19 @@ DROP TABLE IF EXISTS `gossip_menu`; CREATE TABLE `gossip_menu` ( entry smallint(6) unsigned NOT NULL default '0', text_id mediumint(8) unsigned NOT NULL default '0', - cond_1 tinyint(3) unsigned NOT NULL default '0', - cond_1_val_1 mediumint(8) unsigned NOT NULL default '0', - cond_1_val_2 mediumint(8) unsigned NOT NULL default '0', - cond_2 tinyint(3) unsigned NOT NULL default '0', - cond_2_val_1 mediumint(8) unsigned NOT NULL default '0', - cond_2_val_2 mediumint(8) unsigned NOT NULL default '0', PRIMARY KEY (entry, text_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Dumping data for table `gossip_menu` +-- + +LOCK TABLES `gossip_menu` WRITE; +/*!40000 ALTER TABLE `gossip_menu` DISABLE KEYS */; +/*!40000 ALTER TABLE `gossip_menu` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `gossip_menu_option` -- @@ -2622,15 +2634,6 @@ CREATE TABLE gossip_menu_option ( box_coded tinyint(3) unsigned NOT NULL default '0', box_money int(11) unsigned NOT NULL default '0', box_text text, - cond_1 tinyint(3) unsigned NOT NULL default '0', - cond_1_val_1 mediumint(8) unsigned NOT NULL default '0', - cond_1_val_2 mediumint(8) unsigned NOT NULL default '0', - cond_2 tinyint(3) unsigned NOT NULL default '0', - cond_2_val_1 mediumint(8) unsigned NOT NULL default '0', - cond_2_val_2 mediumint(8) unsigned NOT NULL default '0', - cond_3 tinyint(3) unsigned NOT NULL default '0', - cond_3_val_1 mediumint(8) unsigned NOT NULL default '0', - cond_3_val_2 mediumint(8) unsigned NOT NULL default '0', PRIMARY KEY (menu_id, id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2641,25 +2644,6 @@ CREATE TABLE gossip_menu_option ( LOCK TABLES `gossip_menu_option` WRITE; /*!40000 ALTER TABLE `gossip_menu_option` DISABLE KEYS */; -INSERT INTO `gossip_menu_option` VALUES -(0,0,0,'GOSSIP_OPTION_QUESTGIVER',2,2,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), -(0,1,1,'I want to browse your goods',3,128,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), -(0,2,2,'I want to travel fast',4,8192,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), -(0,3,3,'Train me!',5,16,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), -(0,4,4,'Bring me back to life',6,16384,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), -(0,5,4,'Bring me back to life',7,32768,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), -(0,6,5,'Make this inn my home',8,65536,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), -(0,7,6,'Show me my bank',9,131072,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), -(0,8,7,'How do I form a guild?',10,262144,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), -(0,9,8,'I want to create a guild crest',11,524288,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), -(0,10,9,'I want to join the Battle Ground',12,1048576,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), -(0,11,6,'Auction!',13,2097152,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), -(0,12,0,'I''d like to stable my pet here',14,4194304,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), -(0,13,1,'I want to browse your goods',15,4096,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), -(0,14,2,'I wish to unlearn my talents',16,16,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), -(0,15,2,'I wish to unlearn my pet''s skills',17,16,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), -(0,16,2,'Purchase a Dual Talent Specialization',18,16,0,0,0,0,10000000,NULL,0,0,0,0,0,0,0,0,0), -(0,17,0,'GOSSIP_OPTION_OUTDOORPVP',19,536870912,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0); /*!40000 ALTER TABLE `gossip_menu_option` ENABLE KEYS */; UNLOCK TABLES; @@ -15515,32 +15499,6 @@ AVG_ROW_LENGTH=0; LOCK TABLES `vehicle_accessory` WRITE; /*!40000 ALTER TABLE `vehicle_accessory` DISABLE KEYS */; -INSERT INTO `vehicle_accessory` (`entry`,`accessory_entry`,`seat_id`,`minion`,`description`) VALUES -(28782,28768,0,0, 'Acherus Deathcharger'), -(28312,28319,7,1, 'Wintergrasp Siege Engine'), -(32627,32629,7,1, 'Wintergrasp Siege Engine'), -(32930,32933,0,1, 'Kologarn'), -(32930,32934,1,1, 'Kologarn'), -(33109,33167,1,1, 'Salvaged Demolisher'), -(33060,33067,7,1, 'Salvaged Siege Engine'), -(33113,33114,0,1, 'Flame Leviathan'), -(33113,33114,1,1, 'Flame Leviathan'), -(33113,33114,2,1, 'Flame Leviathan'), -(33113,33114,3,1, 'Flame Leviathan'), -(33113,33139,7,1, 'Flame Leviathan'), -(33114,33142,1,1, 'Overload Control Device'), -(33114,33143,2,1, 'Leviathan Defense Turret'), -(33214,33218,1,1, 'Mechanolift 304-A'), -(35637,34705,0,0, 'Marshal Jacob Alerius'' Mount'), -(35633,34702,0,0, 'Ambrose Boltspark''s Mount'), -(35768,34701,0,0, 'Colosos'' Mount'), -(34658,34657,0,0, 'Jaelyne Evensong''s Mount'), -(35636,34703,0,0, 'Lana Stouthammer''s Mount'), -(35638,35572,0,0, 'Mokra the Skullcrusher''s Mount'), -(35635,35569,0,0, 'Eressea Dawnsinger''s Mount'), -(35640,35571,0,0, 'Runok Wildmane''s Mount'), -(35641,35570,0,0, 'Zul''tore''s Mount'), -(35634,35617,0,0, 'Deathstalker Visceri''s Mount'); /*!40000 ALTER TABLE `vehicle_accessory` ENABLE KEYS */; UNLOCK TABLES; -- diff --git a/sql/updates/8352_world_spell_linked_spell.sql b/sql/updates/8352_world_spell_linked_spell.sql index 00462fce1ac..9feca78a3ff 100644 --- a/sql/updates/8352_world_spell_linked_spell.sql +++ b/sql/updates/8352_world_spell_linked_spell.sql @@ -1,5 +1,4 @@ DELETE FROM `spell_linked_spell` WHERE `spell_effect` IN (52418, -52418); - INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (52415, 52418, 0, 'Carrying Seaforium - Add'), (52410, -52418, 0, 'Carrying Seaforium - Remove'); diff --git a/sql/updates/8607_world_pool_tempate.sql b/sql/updates/8607_world_pool_tempate.sql deleted file mode 100644 index ac1cbf70223..00000000000 --- a/sql/updates/8607_world_pool_tempate.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE `pool_template` SET `description` = `comment` WHERE `comment` <> '' AND `comment` IS NOT NULL AND (`description` = '' OR `description` IS NULL); -ALTER TABLE `pool_template` DROP COLUMN `comment`; diff --git a/sql/updates/8607_world_pool_template.sql b/sql/updates/8607_world_pool_template.sql new file mode 100644 index 00000000000..ac1cbf70223 --- /dev/null +++ b/sql/updates/8607_world_pool_template.sql @@ -0,0 +1,2 @@ +UPDATE `pool_template` SET `description` = `comment` WHERE `comment` <> '' AND `comment` IS NOT NULL AND (`description` = '' OR `description` IS NULL); +ALTER TABLE `pool_template` DROP COLUMN `comment`; diff --git a/sql/updates/8672_world_gossip_menu_option.sql b/sql/updates/8672_world_gossip_menu_option.sql new file mode 100644 index 00000000000..2ba86951100 --- /dev/null +++ b/sql/updates/8672_world_gossip_menu_option.sql @@ -0,0 +1,2 @@ +-- Drop forgotten fields after condition implementation +ALTER TABLE gossip_menu_option DROP COLUMN cond_3,DROP COLUMN cond_3_val_1,DROP COLUMN cond_3_val_2; -- cgit v1.2.3 From 5c86cc2aee955ce80b0d365561f2a87cc43fe024 Mon Sep 17 00:00:00 2001 From: teacher Date: Mon, 21 Jun 2010 22:12:14 +0200 Subject: Added forgotten spell_linked_spell values in previous commit (thank you Gyullo for spotting it). Added place holder for serverside spell. --HG-- branch : trunk --- sql/base/world_database.sql | 1 + sql/updates/8674_world_spell_dbc.sql | 4 ++++ sql/updates/8674_world_spell_linked_spell.sql | 4 ++++ 3 files changed, 9 insertions(+) create mode 100644 sql/updates/8674_world_spell_dbc.sql create mode 100644 sql/updates/8674_world_spell_linked_spell.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index 684d0a846d2..05647ea22a0 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -5329,6 +5329,7 @@ INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`A (24900, 0, 0, 400, 1024, 0, 0, 2097152, 0, 0, 1, 0, 0, 101, 0, 0, 0, 0, 21, 1, 0, -1, 0, 0, 6, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 'Heart of the Wild Cat Effect'), (43503, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11261 reward serverside spell'), (39613, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 10967 reward serverside spell'), +(39616, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 10966 reward serverside spell'), (34448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Serverside spell orb of translocation (gobjid=180911)' ), (34452, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Serverside spell orb of translocation (gobjid=180912)' ); /*!40000 ALTER TABLE `spell_dbc` ENABLE KEYS */; diff --git a/sql/updates/8674_world_spell_dbc.sql b/sql/updates/8674_world_spell_dbc.sql new file mode 100644 index 00000000000..e1e9e8d2fe2 --- /dev/null +++ b/sql/updates/8674_world_spell_dbc.sql @@ -0,0 +1,4 @@ +-- Add serverside spells place holders for future development +DELETE FROM `spell_dbc` WHERE `Id`=39616; +INSERT INTO `spell_dbc` (`Id`,`Comment`) VALUES +(39616, 'Quest 10966 reward serverside spell'); diff --git a/sql/updates/8674_world_spell_linked_spell.sql b/sql/updates/8674_world_spell_linked_spell.sql new file mode 100644 index 00000000000..1333c728a8a --- /dev/null +++ b/sql/updates/8674_world_spell_linked_spell.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (54861,55004)AND `spell_effect` IN (-34976); +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +( 54861,-34976, 0, 'Drop Flag on Nitro Boost EOS'), +( 55004,-34976, 0, 'Drop Flag on Nitro Boost EOS'); -- cgit v1.2.3 From 71d47b384f35b3b51aa651b74332b9e80d4ba3fb Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 22 Jun 2010 19:39:02 -0600 Subject: * Remove table from database that is no longer needed after previous commit --HG-- branch : trunk --- sql/base/world_database.sql | 23 ----------------------- sql/updates/8694_world_transport_events.sql | 1 + 2 files changed, 1 insertion(+), 23 deletions(-) create mode 100644 sql/updates/8694_world_transport_events.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index 05647ea22a0..dfbf1b38bba 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -14546,29 +14546,6 @@ INSERT INTO `spelldifficulty_dbc` VALUES /*!40000 ALTER TABLE `spelldifficulty_dbc` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `transport_events` --- - -DROP TABLE IF EXISTS `transport_events`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `transport_events` ( - `entry` int(11) unsigned NOT NULL DEFAULT '0', - `waypoint_id` int(11) unsigned NOT NULL DEFAULT '0', - `event_id` int(11) unsigned NOT NULL DEFAULT '0' -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `transport_events` --- - -LOCK TABLES `transport_events` WRITE; -/*!40000 ALTER TABLE `transport_events` DISABLE KEYS */; -/*!40000 ALTER TABLE `transport_events` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `transports` -- diff --git a/sql/updates/8694_world_transport_events.sql b/sql/updates/8694_world_transport_events.sql new file mode 100644 index 00000000000..480aea9d7c6 --- /dev/null +++ b/sql/updates/8694_world_transport_events.sql @@ -0,0 +1 @@ +DROP TABLE `transport_events`; -- cgit v1.2.3 From 1361b8b86c20d2e4a5a7332bb2834774a209f0f8 Mon Sep 17 00:00:00 2001 From: Tartalo Date: Sat, 26 Jun 2010 23:40:24 +0200 Subject: Violet Hold: Azure Saboteour animation on boss encounters, by DenissRassman From issue #2180 --HG-- branch : trunk --- sql/scripts/world_scripts_full.sql | 1 + sql/updates/8752_world_scriptname.sql | 1 + .../Northrend/VioletHold/instance_violet_hold.cpp | 39 ++++- .../scripts/Northrend/VioletHold/violet_hold.cpp | 165 ++++++++++++++++++++- .../scripts/Northrend/VioletHold/violet_hold.h | 9 +- 5 files changed, 210 insertions(+), 5 deletions(-) create mode 100644 sql/updates/8752_world_scriptname.sql (limited to 'sql/updates') diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql index 6b36f9f0928..191a2ea0106 100644 --- a/sql/scripts/world_scripts_full.sql +++ b/sql/scripts/world_scripts_full.sql @@ -1503,6 +1503,7 @@ update `creature_template` SET `scriptname`='mob_azure_invader' WHERE `entry`=30 update `creature_template` SET `scriptname`='mob_azure_spellbreaker' WHERE `entry`=30962; update `creature_template` SET `scriptname`='mob_azure_binder' WHERE `entry`=30918; update `creature_template` SET `scriptname`='mob_azure_mage_slayer' WHERE `entry`=30963; +UPDATE `creature_template` SET `scriptname`='mob_azure_saboteur' WHERE `entry`=31079; UPDATE `instance_template` SET `script`='instance_violet_hold' WHERE `map`=608; /* WAILING CAVERNS */ diff --git a/sql/updates/8752_world_scriptname.sql b/sql/updates/8752_world_scriptname.sql new file mode 100644 index 00000000000..03bc1bb354c --- /dev/null +++ b/sql/updates/8752_world_scriptname.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `scriptname`='mob_azure_saboteur' WHERE `entry`=31079; -- Azure Saboteur diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp index cec9b8800cf..39d052b4055 100644 --- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp @@ -32,6 +32,12 @@ enum GameObjects GO_ACTIVATION_CRYSTAL = 193611 }; +enum AzureSaboteurSpells +{ + SABOTEUR_SHIELD_DISRUPTION = 58291, + SABOTEUR_SHIELD_EFFECT = 45775 +}; + const Position PortalLocation[] = { {1877.51, 850.104, 44.6599, 4.7822 }, // WP 1 @@ -53,6 +59,7 @@ const Position BossStartMove6 = {1928.207031, 852.864441, 47.200813}; const Position CyanigosasSpawnLocation = {1930.281250, 804.407715, 52.410946, 3.139621}; const Position MiddleRoomLocation = {1892.291260, 805.696838, 38.438862, 3.139621}; +const Position MiddleRoomPortalSaboLocation = {1896.622925, 804.854126, 38.504772, 3.139621}; //Cyanigosa's prefight event data enum Yells @@ -89,6 +96,7 @@ struct instance_violet_hold : public ScriptedInstance uint64 uiZuramatCell; uint64 uiMainDoor; uint64 uiTeleportationPortal; + uint64 uiSaboteurPortal; uint64 uiActivationCrystal[3]; @@ -139,6 +147,7 @@ struct instance_violet_hold : public ScriptedInstance uiZuramatCell = 0; uiMainDoor = 0; uiTeleportationPortal = 0; + uiSaboteurPortal = 0; uiRemoveNpc = 0; @@ -316,6 +325,17 @@ struct instance_violet_hold : public ScriptedInstance } uiMainDoorState = data; break; + case DATA_START_BOSS_ENCOUNTER: + switch(uiWaveCount) + { + case 6: + StartBossEncounter(uiFirstBoss); + break; + case 12: + StartBossEncounter(uiSecondBoss); + break; + } + break; } } @@ -332,6 +352,8 @@ struct instance_violet_hold : public ScriptedInstance case DATA_DOOR_INTEGRITY: return uiDoorIntegrity; case DATA_NPC_PRESENCE_AT_DOOR: return NpcAtDoorCastingList.size(); case DATA_MAIN_DOOR: return uiMainDoorState; + case DATA_FIRST_BOSS: return uiFirstBoss; + case DATA_SECOND_BOSS: return uiSecondBoss; } return 0; @@ -361,6 +383,7 @@ struct instance_violet_hold : public ScriptedInstance case DATA_MAIN_DOOR: return uiMainDoor; case DATA_SINCLARI: return uiSinclari; case DATA_TELEPORTATION_PORTAL: return uiTeleportationPortal; + case DATA_SABOTEUR_PORTAL: return uiSaboteurPortal; } return 0; @@ -470,7 +493,13 @@ struct instance_violet_hold : public ScriptedInstance case 6: if (uiFirstBoss == 0) uiFirstBoss = urand(1,6); - StartBossEncounter(uiFirstBoss); + if (Creature *pSinclari = instance->GetCreature(uiSinclari)) + { + if(Creature *pPortal = pSinclari->SummonCreature(CREATURE_TELEPORTATION_PORTAL, MiddleRoomPortalSaboLocation, TEMPSUMMON_CORPSE_DESPAWN)) + uiSaboteurPortal = pPortal->GetGUID(); + if (Creature *pAzureSaboteur = pSinclari->SummonCreature(CREATURE_SABOTEOUR, MiddleRoomLocation, TEMPSUMMON_DEAD_DESPAWN)) + pAzureSaboteur->CastSpell(pAzureSaboteur, SABOTEUR_SHIELD_EFFECT, false); + } break; case 12: if (uiSecondBoss == 0) @@ -478,7 +507,13 @@ struct instance_violet_hold : public ScriptedInstance { uiSecondBoss = urand(1,6); } while (uiSecondBoss == uiFirstBoss); - StartBossEncounter(uiSecondBoss); + if (Creature *pSinclari = instance->GetCreature(uiSinclari)) + { + if(Creature *pPortal = pSinclari->SummonCreature(CREATURE_TELEPORTATION_PORTAL, MiddleRoomPortalSaboLocation, TEMPSUMMON_CORPSE_DESPAWN)) + uiSaboteurPortal = pPortal->GetGUID(); + if (Creature *pAzureSaboteur = pSinclari->SummonCreature(CREATURE_SABOTEOUR, MiddleRoomLocation, TEMPSUMMON_DEAD_DESPAWN)) + pAzureSaboteur->CastSpell(pAzureSaboteur, SABOTEUR_SHIELD_EFFECT, false); + } break; case 18: { diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp index 516163a0834..a7a624a3dbe 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp @@ -85,6 +85,12 @@ enum AzureStalkerSpells SPELL_TACTICAL_BLINK = 58470 }; +enum AzureSaboteurSpells +{ + SABOTEUR_SHIELD_DISRUPTION = 58291, + SABOTEUR_SHIELD_EFFECT = 45775 +}; + enum TrashDoorSpell { SPELL_DESTROY_DOOR_SEAL = 58040 @@ -186,6 +192,40 @@ float SixthPoralWPs [4][3] = //{1826.889648, 803.929993, 44.363239} }; +const float SaboteurFinalPos1[3][3] = +{ + {1892.502319, 777.410767, 38.630402}, + {1891.165161, 762.969421, 47.666920}, + {1893.168091, 740.919189, 47.666920} +}; +const float SaboteurFinalPos2[3][3] = +{ + {1882.242676, 834.818726, 38.646786}, + {1879.220825, 842.224854, 43.333641}, + {1873.842896, 863.892456, 43.333641} +}; +const float SaboteurFinalPos3[2][3] = +{ + {1904.298340, 792.400391, 38.646782}, + {1935.716919, 758.437073, 30.627895} +}; +const float SaboteurFinalPos4[3] = +{ + 1855.006104, 760.641724, 38.655266 +}; +const float SaboteurFinalPos5[3] = +{ + 1906.667358, 841.705566, 38.637894 +}; +const float SaboteurFinalPos6[5][3] = +{ + {1911.437012, 821.289246, 38.684128}, + {1920.734009, 822.978027, 41.525414}, + {1928.262939, 830.836609, 44.668266}, + {1929.338989, 837.593933, 47.137596}, + {1931.063354, 848.468445, 47.190434} + }; + const Position MovePosition = { 1806.955566, 803.851807, 44.363323}; struct npc_sinclariAI : public ScriptedAI @@ -309,6 +349,120 @@ CreatureAI* GetAI_npc_sinclari(Creature* pCreature) return new npc_sinclariAI(pCreature); } +struct mob_azure_saboteurAI : public npc_escortAI +{ + mob_azure_saboteurAI(Creature *c):npc_escortAI(c) + { + pInstance = c->GetInstanceData(); + bHasGotMovingPoints = false; + uiBoss = 0; + Reset(); + } + + ScriptedInstance* pInstance; + bool bHasGotMovingPoints; + uint32 uiBoss; + + void Reset() + { + if (pInstance && !uiBoss) + uiBoss = pInstance->GetData(DATA_WAVE_COUNT) == 6 ? pInstance->GetData(DATA_FIRST_BOSS) : pInstance->GetData(DATA_SECOND_BOSS); + } + + void WaypointReached(uint32 uiWPointId) + { + switch(uiBoss) + { + case 1: + if(uiWPointId == 2) + FinishPointReached(); + break; + case 2: + if(uiWPointId == 2) + FinishPointReached(); + break; + case 3: + if(uiWPointId == 1) + FinishPointReached(); + break; + case 4: + if(uiWPointId == 0) + FinishPointReached(); + break; + case 5: + if(uiWPointId == 0) + FinishPointReached(); + break; + case 6: + if(uiWPointId == 4) + FinishPointReached(); + break; + } + } + + void UpdateAI(uint32 diff) + { + if(pInstance->GetData(DATA_MAIN_DOOR) != GO_STATE_READY) + me->CastStop(); + + npc_escortAI::UpdateAI(diff); + + if(!bHasGotMovingPoints) + { + bHasGotMovingPoints = true; + switch(uiBoss) + { + case 1: + for(int i=0;i<3;i++) + AddWaypoint(i,SaboteurFinalPos1[i][0],SaboteurFinalPos1[i][1],SaboteurFinalPos1[i][2],0); + me->SetHomePosition(SaboteurFinalPos1[2][0],SaboteurFinalPos1[2][1],SaboteurFinalPos1[2][2],4.762346); + break; + case 2: + for(int i=0;i<3;i++) + AddWaypoint(i,SaboteurFinalPos2[i][0],SaboteurFinalPos2[i][1],SaboteurFinalPos2[i][2],0); + me->SetHomePosition(SaboteurFinalPos2[2][0],SaboteurFinalPos2[2][1],SaboteurFinalPos2[2][2],1.862674); + break; + case 3: + for(int i=0;i<2;i++) + AddWaypoint(i,SaboteurFinalPos3[i][0],SaboteurFinalPos3[i][1],SaboteurFinalPos3[i][2],0); + me->SetHomePosition(SaboteurFinalPos3[1][0],SaboteurFinalPos3[1][1],SaboteurFinalPos3[1][2],5.500638); + break; + case 4: + AddWaypoint(0,SaboteurFinalPos4[0],SaboteurFinalPos4[1],SaboteurFinalPos4[2],0); + me->SetHomePosition(SaboteurFinalPos4[0],SaboteurFinalPos4[1],SaboteurFinalPos4[2],3.991108); + break; + case 5: + AddWaypoint(0,SaboteurFinalPos5[0],SaboteurFinalPos5[1],SaboteurFinalPos5[2],0); + me->SetHomePosition(SaboteurFinalPos5[0],SaboteurFinalPos5[1],SaboteurFinalPos5[2],1.100841); + break; + case 6: + for(int i=0;i<5;i++) + AddWaypoint(i,SaboteurFinalPos6[i][0],SaboteurFinalPos6[i][1],SaboteurFinalPos6[i][2],0); + me->SetHomePosition(SaboteurFinalPos6[4][0],SaboteurFinalPos6[4][1],SaboteurFinalPos6[4][2],0.983031); + break; + } + + SetDespawnAtEnd(false); + Start(true,true); + } + } + + void FinishPointReached() + { + me->CastSpell(me, SABOTEUR_SHIELD_DISRUPTION, false); + me->DisappearAndDie(); + Creature* pSaboPort = Unit::GetCreature((*me),pInstance->GetData64(DATA_SABOTEUR_PORTAL)); + if (pSaboPort) + pSaboPort->DisappearAndDie(); + pInstance->SetData(DATA_START_BOSS_ENCOUNTER, 1); + } +}; + +CreatureAI* GetAI_mob_azure_saboteur(Creature* pCreature) +{ + return new mob_azure_saboteurAI (pCreature); +} + bool GossipHello_npc_sinclari(Player* pPlayer, Creature* pCreature) { ScriptedInstance* pInstance = pCreature->GetInstanceData(); @@ -373,6 +527,10 @@ struct npc_teleportation_portalAI : public ScriptedAI pInstance->SetData(DATA_REMOVE_NPC, 0); } + uint8 uiWaveCount = pInstance->GetData(DATA_WAVE_COUNT); + if ((uiWaveCount == 6) || (uiWaveCount == 12)) //Don't spawn mobs on boss encounters + return; + switch(uiTypeOfMobsPortal) { // spawn elite mobs and then set portals visibility to make it look like it dissapeard @@ -382,7 +540,7 @@ struct npc_teleportation_portalAI : public ScriptedAI if (uiSpawnTimer <= diff) { bPortalGuardianOrKeeperOrEliteSpawn = true; - uint8 k = pInstance->GetData(DATA_WAVE_COUNT) < 12 ? 2 : 3; + uint8 k = uiWaveCount < 12 ? 2 : 3; for (uint8 i = 0; i < k; ++i) { uint32 entry = RAND(CREATURE_AZURE_CAPTAIN,CREATURE_AZURE_RAIDER,CREATURE_AZURE_STALKER,CREATURE_AZURE_SORCEROR); @@ -1100,4 +1258,9 @@ void AddSC_violet_hold() newscript->Name = "mob_azure_stalker"; newscript->GetAI = &GetAI_mob_azure_stalker; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_saboteur"; + newscript->GetAI = &GetAI_mob_azure_saboteur; + newscript->RegisterSelf(); } diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.h b/src/server/scripts/Northrend/VioletHold/violet_hold.h index 459cfc884ee..cbe6aecf5dd 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.h +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.h @@ -15,6 +15,7 @@ enum Creatures CREATURE_MORAGG = 29316, CREATURE_CYANIGOSA = 31134, CREATURE_SINCLARI = 30658, + CREATURE_SABOTEOUR = 31079, NPC_VIOLET_HOLD_GUARD = 30659 }; @@ -29,7 +30,10 @@ enum Data DATA_DOOR_INTEGRITY, DATA_NPC_PRESENCE_AT_DOOR, DATA_NPC_PRESENCE_AT_DOOR_ADD, - DATA_NPC_PRESENCE_AT_DOOR_REMOVE + DATA_NPC_PRESENCE_AT_DOOR_REMOVE, + DATA_START_BOSS_ENCOUNTER, + DATA_FIRST_BOSS, + DATA_SECOND_BOSS }; enum Data64 @@ -53,7 +57,8 @@ enum Data64 DATA_ZURAMAT_CELL, DATA_MAIN_DOOR, DATA_SINCLARI, - DATA_TELEPORTATION_PORTAL + DATA_TELEPORTATION_PORTAL, + DATA_SABOTEUR_PORTAL }; enum Bosses -- cgit v1.2.3 From 499fa9b7cbff18f48529a0b838d63a2af9bb4df3 Mon Sep 17 00:00:00 2001 From: teacher Date: Sun, 27 Jun 2010 11:30:38 +0200 Subject: Added missing script to full (thank you azazel_kon for spotting them). Small sql editing (cosmetic, NO sql need to be re-applied). --HG-- branch : trunk --- sql/scripts/world_scripts_full.sql | 3 +++ sql/updates/8391_world_conditions.sql | 1 + sql/updates/8694_world_transport_events.sql | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'sql/updates') diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql index 191a2ea0106..eb99451c348 100644 --- a/sql/scripts/world_scripts_full.sql +++ b/sql/scripts/world_scripts_full.sql @@ -445,6 +445,8 @@ UPDATE `creature_template` SET `ScriptName`='npc_magmoth_crusher' WHERE `entry`= UPDATE `creature_template` SET `ScriptName`='npc_valiance_keep_cannoneer' WHERE `entry`=25306; UPDATE `creature_template` SET `ScriptName`='npc_warmage_coldarra' WHERE `entry` IN (27173,27904,27906); UPDATE `creature_template` SET `ScriptName`='npc_valiance_keep_cannoneer' WHERE `entry`=25306; +UPDATE `creature_template` SET `ScriptName`= 'npc_seaforium_depth_charge' WHERE `entry`=25401; + /* BURNING STEPPES */ UPDATE `creature_template` SET `ScriptName`='npc_ragged_john' WHERE `entry`=9563; @@ -583,6 +585,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_inquisitor_hallard' WHERE `entr /* DESOLACE */ UPDATE `creature_template` SET `ScriptName`='npc_aged_dying_ancient_kodo' WHERE `entry` IN (4700,4701,4702,11627); UPDATE `gameobject_template` SET `ScriptName`='go_iruxos' WHERE `entry`=176581; +UPDATE `creature_template` SET `ScriptName`='npc_dalinda' WHERE `entry`=5644; /* DIRE MAUL */ diff --git a/sql/updates/8391_world_conditions.sql b/sql/updates/8391_world_conditions.sql index 2eb3d79fac9..fb5cc9fbc9e 100644 --- a/sql/updates/8391_world_conditions.sql +++ b/sql/updates/8391_world_conditions.sql @@ -1,6 +1,7 @@ -- ---------------------------- -- Table structure for conditions -- ---------------------------- +DROP TABLE IF EXISTS `conditions`; CREATE TABLE `conditions` ( `SourceTypeOrReferenceId` mediumint(8) NOT NULL DEFAULT '0', `SourceGroup` mediumint(8) unsigned NOT NULL DEFAULT '0', diff --git a/sql/updates/8694_world_transport_events.sql b/sql/updates/8694_world_transport_events.sql index 480aea9d7c6..0e8786f777f 100644 --- a/sql/updates/8694_world_transport_events.sql +++ b/sql/updates/8694_world_transport_events.sql @@ -1 +1 @@ -DROP TABLE `transport_events`; +DROP TABLE IF EXISTS `transport_events`; -- cgit v1.2.3 From 2e70b0b5d42426c0e437479a45f0d9f364c139b5 Mon Sep 17 00:00:00 2001 From: teacher Date: Sun, 27 Jun 2010 11:57:07 +0200 Subject: Moved sql update files to 3.3.3a_old directory. You know what that means! --HG-- branch : trunk --- .../3.3.3a_old/8312_world_spell_proc_event.sql | 4 ++ .../3.3.3a_old/8313_world_spell_bonus_data.sql | 2 + .../3.3.3a_old/8315_world_spell_bonus_data.sql | 2 + .../3.3.3a_old/8316_world_spell_bonus_data.sql | 4 ++ .../3.3.3a_old/8318_world_spell_bonus_data.sql | 2 + .../3.3.3a_old/8319_world_spell_linked_spell.sql | 1 + sql/updates/3.3.3a_old/8327_world_scriptname.sql | 1 + .../8330_world_playercreateinfo_spell.sql | 2 + sql/updates/3.3.3a_old/8334_world_scriptname.sql | 1 + sql/updates/3.3.3a_old/8348_world_script_texts.sql | 13 ++++ sql/updates/3.3.3a_old/8348_world_scriptname.sql | 2 + sql/updates/3.3.3a_old/8352_world_scriptname.sql | 1 + .../3.3.3a_old/8352_world_spell_linked_spell.sql | 4 ++ .../3.3.3a_old/8358_world_spell_linked_spell.sql | 5 ++ .../3.3.3a_old/8361_world_trinity_string.sql | 20 ++++++ .../3.3.3a_old/8371_world_spell_bonus_data.sql | 6 ++ .../3.3.3a_old/8372_world_spell_proc_event.sql | 3 + .../3.3.3a_old/8373_world_spell_proc_event.sql | 3 + .../3.3.3a_old/8374_world_spell_proc_event.sql | 3 + .../3.3.3a_old/8375_world_spell_proc_event.sql | 5 ++ sql/updates/3.3.3a_old/8391_world_conditions.sql | 72 ++++++++++++++++++++++ sql/updates/3.3.3a_old/8397_world_command.sql | 4 ++ .../3.3.3a_old/8510_world_spell_proc_event.sql | 1 + .../3.3.3a_old/8511_world_spell_proc_event.sql | 1 + sql/updates/3.3.3a_old/8512_world_command.sql | 3 + .../3.3.3a_old/8565_world_spell_proc_event.sql | 3 + sql/updates/3.3.3a_old/8568_world_npc_vendor.sql | 1 + .../3.3.3a_old/8568_world_trinity_string.sql | 3 + sql/updates/3.3.3a_old/8575_world_command.sql | 2 + sql/updates/3.3.3a_old/8576_world_command.sql | 1 + sql/updates/3.3.3a_old/8586_world_command.sql | 4 ++ .../3.3.3a_old/8586_world_item_set_names.sql | 14 +++++ .../8586_world_locales_item_set_name.sql | 20 ++++++ .../3.3.3a_old/8589_world_item_set_names.sql | 1 + .../3.3.3a_old/8602_world_spell_proc_event.sql | 1 + .../8605_world_playercreateinfo_item.sql | 1 + .../3.3.3a_old/8607_world_pool_creature.sql | 2 + .../3.3.3a_old/8607_world_pool_template.sql | 2 + .../3.3.3a_old/8625_world_pool_creature.sql | 1 + .../3.3.3a_old/8625_world_pool_gameobject.sql | 1 + sql/updates/3.3.3a_old/8625_world_pool_pool.sql | 1 + sql/updates/3.3.3a_old/8638_world_scriptname.sql | 12 ++++ .../3.3.3a_old/8658_world_spell_linked_spell.sql | 3 + .../3.3.3a_old/8671_world_spell_linked_spell.sql | 6 ++ .../3.3.3a_old/8672_world_gossip_menu_option.sql | 2 + sql/updates/3.3.3a_old/8674_world_spell_dbc.sql | 4 ++ .../3.3.3a_old/8674_world_spell_linked_spell.sql | 4 ++ .../3.3.3a_old/8694_world_transport_events.sql | 1 + sql/updates/3.3.3a_old/8752_world_scriptname.sql | 1 + sql/updates/8312_world_spell_proc_event.sql | 4 -- sql/updates/8313_world_spell_bonus_data.sql | 2 - sql/updates/8315_world_spell_bonus_data.sql | 2 - sql/updates/8316_world_spell_bonus_data.sql | 4 -- sql/updates/8318_world_spell_bonus_data.sql | 2 - sql/updates/8319_world_spell_linked_spell.sql | 1 - sql/updates/8327_world_scriptname.sql | 1 - sql/updates/8330_world_playercreateinfo_spell.sql | 2 - sql/updates/8334_world_scriptname.sql | 1 - sql/updates/8348_world_script_texts.sql | 13 ---- sql/updates/8348_world_scriptname.sql | 2 - sql/updates/8352_world_scriptname.sql | 1 - sql/updates/8352_world_spell_linked_spell.sql | 4 -- sql/updates/8358_world_spell_linked_spell.sql | 5 -- sql/updates/8361_world_trinity_string.sql | 20 ------ sql/updates/8371_world_spell_bonus_data.sql | 6 -- sql/updates/8372_world_spell_proc_event.sql | 3 - sql/updates/8373_world_spell_proc_event.sql | 3 - sql/updates/8374_world_spell_proc_event.sql | 3 - sql/updates/8375_world_spell_proc_event.sql | 5 -- sql/updates/8391_world_conditions.sql | 72 ---------------------- sql/updates/8397_world_command.sql | 4 -- sql/updates/8510_world_spell_proc_event.sql | 1 - sql/updates/8511_world_spell_proc_event.sql | 1 - sql/updates/8512_world_command.sql | 3 - sql/updates/8565_world_spell_proc_event.sql | 3 - sql/updates/8568_world_npc_vendor.sql | 1 - sql/updates/8568_world_trinity_string.sql | 3 - sql/updates/8575_world_command.sql | 2 - sql/updates/8576_world_command.sql | 1 - sql/updates/8586_world_command.sql | 4 -- sql/updates/8586_world_item_set_names.sql | 14 ----- sql/updates/8586_world_locales_item_set_name.sql | 20 ------ sql/updates/8589_world_item_set_names.sql | 1 - sql/updates/8602_world_spell_proc_event.sql | 1 - sql/updates/8605_world_playercreateinfo_item.sql | 1 - sql/updates/8607_world_pool_creature.sql | 2 - sql/updates/8607_world_pool_template.sql | 2 - sql/updates/8625_world_pool_creature.sql | 1 - sql/updates/8625_world_pool_gameobject.sql | 1 - sql/updates/8625_world_pool_pool.sql | 1 - sql/updates/8638_world_scriptname.sql | 12 ---- sql/updates/8658_world_spell_linked_spell.sql | 3 - sql/updates/8671_world_spell_linked_spell.sql | 6 -- sql/updates/8672_world_gossip_menu_option.sql | 2 - sql/updates/8674_world_spell_dbc.sql | 4 -- sql/updates/8674_world_spell_linked_spell.sql | 4 -- sql/updates/8694_world_transport_events.sql | 1 - sql/updates/8752_world_scriptname.sql | 1 - 98 files changed, 256 insertions(+), 256 deletions(-) create mode 100644 sql/updates/3.3.3a_old/8312_world_spell_proc_event.sql create mode 100644 sql/updates/3.3.3a_old/8313_world_spell_bonus_data.sql create mode 100644 sql/updates/3.3.3a_old/8315_world_spell_bonus_data.sql create mode 100644 sql/updates/3.3.3a_old/8316_world_spell_bonus_data.sql create mode 100644 sql/updates/3.3.3a_old/8318_world_spell_bonus_data.sql create mode 100644 sql/updates/3.3.3a_old/8319_world_spell_linked_spell.sql create mode 100644 sql/updates/3.3.3a_old/8327_world_scriptname.sql create mode 100644 sql/updates/3.3.3a_old/8330_world_playercreateinfo_spell.sql create mode 100644 sql/updates/3.3.3a_old/8334_world_scriptname.sql create mode 100644 sql/updates/3.3.3a_old/8348_world_script_texts.sql create mode 100644 sql/updates/3.3.3a_old/8348_world_scriptname.sql create mode 100644 sql/updates/3.3.3a_old/8352_world_scriptname.sql create mode 100644 sql/updates/3.3.3a_old/8352_world_spell_linked_spell.sql create mode 100644 sql/updates/3.3.3a_old/8358_world_spell_linked_spell.sql create mode 100644 sql/updates/3.3.3a_old/8361_world_trinity_string.sql create mode 100644 sql/updates/3.3.3a_old/8371_world_spell_bonus_data.sql create mode 100644 sql/updates/3.3.3a_old/8372_world_spell_proc_event.sql create mode 100644 sql/updates/3.3.3a_old/8373_world_spell_proc_event.sql create mode 100644 sql/updates/3.3.3a_old/8374_world_spell_proc_event.sql create mode 100644 sql/updates/3.3.3a_old/8375_world_spell_proc_event.sql create mode 100644 sql/updates/3.3.3a_old/8391_world_conditions.sql create mode 100644 sql/updates/3.3.3a_old/8397_world_command.sql create mode 100644 sql/updates/3.3.3a_old/8510_world_spell_proc_event.sql create mode 100644 sql/updates/3.3.3a_old/8511_world_spell_proc_event.sql create mode 100644 sql/updates/3.3.3a_old/8512_world_command.sql create mode 100644 sql/updates/3.3.3a_old/8565_world_spell_proc_event.sql create mode 100644 sql/updates/3.3.3a_old/8568_world_npc_vendor.sql create mode 100644 sql/updates/3.3.3a_old/8568_world_trinity_string.sql create mode 100644 sql/updates/3.3.3a_old/8575_world_command.sql create mode 100644 sql/updates/3.3.3a_old/8576_world_command.sql create mode 100644 sql/updates/3.3.3a_old/8586_world_command.sql create mode 100644 sql/updates/3.3.3a_old/8586_world_item_set_names.sql create mode 100644 sql/updates/3.3.3a_old/8586_world_locales_item_set_name.sql create mode 100644 sql/updates/3.3.3a_old/8589_world_item_set_names.sql create mode 100644 sql/updates/3.3.3a_old/8602_world_spell_proc_event.sql create mode 100644 sql/updates/3.3.3a_old/8605_world_playercreateinfo_item.sql create mode 100644 sql/updates/3.3.3a_old/8607_world_pool_creature.sql create mode 100644 sql/updates/3.3.3a_old/8607_world_pool_template.sql create mode 100644 sql/updates/3.3.3a_old/8625_world_pool_creature.sql create mode 100644 sql/updates/3.3.3a_old/8625_world_pool_gameobject.sql create mode 100644 sql/updates/3.3.3a_old/8625_world_pool_pool.sql create mode 100644 sql/updates/3.3.3a_old/8638_world_scriptname.sql create mode 100644 sql/updates/3.3.3a_old/8658_world_spell_linked_spell.sql create mode 100644 sql/updates/3.3.3a_old/8671_world_spell_linked_spell.sql create mode 100644 sql/updates/3.3.3a_old/8672_world_gossip_menu_option.sql create mode 100644 sql/updates/3.3.3a_old/8674_world_spell_dbc.sql create mode 100644 sql/updates/3.3.3a_old/8674_world_spell_linked_spell.sql create mode 100644 sql/updates/3.3.3a_old/8694_world_transport_events.sql create mode 100644 sql/updates/3.3.3a_old/8752_world_scriptname.sql delete mode 100644 sql/updates/8312_world_spell_proc_event.sql delete mode 100644 sql/updates/8313_world_spell_bonus_data.sql delete mode 100644 sql/updates/8315_world_spell_bonus_data.sql delete mode 100644 sql/updates/8316_world_spell_bonus_data.sql delete mode 100644 sql/updates/8318_world_spell_bonus_data.sql delete mode 100644 sql/updates/8319_world_spell_linked_spell.sql delete mode 100644 sql/updates/8327_world_scriptname.sql delete mode 100644 sql/updates/8330_world_playercreateinfo_spell.sql delete mode 100644 sql/updates/8334_world_scriptname.sql delete mode 100644 sql/updates/8348_world_script_texts.sql delete mode 100644 sql/updates/8348_world_scriptname.sql delete mode 100644 sql/updates/8352_world_scriptname.sql delete mode 100644 sql/updates/8352_world_spell_linked_spell.sql delete mode 100644 sql/updates/8358_world_spell_linked_spell.sql delete mode 100644 sql/updates/8361_world_trinity_string.sql delete mode 100644 sql/updates/8371_world_spell_bonus_data.sql delete mode 100644 sql/updates/8372_world_spell_proc_event.sql delete mode 100644 sql/updates/8373_world_spell_proc_event.sql delete mode 100644 sql/updates/8374_world_spell_proc_event.sql delete mode 100644 sql/updates/8375_world_spell_proc_event.sql delete mode 100644 sql/updates/8391_world_conditions.sql delete mode 100644 sql/updates/8397_world_command.sql delete mode 100644 sql/updates/8510_world_spell_proc_event.sql delete mode 100644 sql/updates/8511_world_spell_proc_event.sql delete mode 100644 sql/updates/8512_world_command.sql delete mode 100644 sql/updates/8565_world_spell_proc_event.sql delete mode 100644 sql/updates/8568_world_npc_vendor.sql delete mode 100644 sql/updates/8568_world_trinity_string.sql delete mode 100644 sql/updates/8575_world_command.sql delete mode 100644 sql/updates/8576_world_command.sql delete mode 100644 sql/updates/8586_world_command.sql delete mode 100644 sql/updates/8586_world_item_set_names.sql delete mode 100644 sql/updates/8586_world_locales_item_set_name.sql delete mode 100644 sql/updates/8589_world_item_set_names.sql delete mode 100644 sql/updates/8602_world_spell_proc_event.sql delete mode 100644 sql/updates/8605_world_playercreateinfo_item.sql delete mode 100644 sql/updates/8607_world_pool_creature.sql delete mode 100644 sql/updates/8607_world_pool_template.sql delete mode 100644 sql/updates/8625_world_pool_creature.sql delete mode 100644 sql/updates/8625_world_pool_gameobject.sql delete mode 100644 sql/updates/8625_world_pool_pool.sql delete mode 100644 sql/updates/8638_world_scriptname.sql delete mode 100644 sql/updates/8658_world_spell_linked_spell.sql delete mode 100644 sql/updates/8671_world_spell_linked_spell.sql delete mode 100644 sql/updates/8672_world_gossip_menu_option.sql delete mode 100644 sql/updates/8674_world_spell_dbc.sql delete mode 100644 sql/updates/8674_world_spell_linked_spell.sql delete mode 100644 sql/updates/8694_world_transport_events.sql delete mode 100644 sql/updates/8752_world_scriptname.sql (limited to 'sql/updates') diff --git a/sql/updates/3.3.3a_old/8312_world_spell_proc_event.sql b/sql/updates/3.3.3a_old/8312_world_spell_proc_event.sql new file mode 100644 index 00000000000..775ad64f307 --- /dev/null +++ b/sql/updates/3.3.3a_old/8312_world_spell_proc_event.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_proc_event` WHERE `entry` IN (71519,71562); +INSERT INTO `spell_proc_event` (`entry`, `Cooldown`) VALUES +(71519, 105), +(71562, 105); diff --git a/sql/updates/3.3.3a_old/8313_world_spell_bonus_data.sql b/sql/updates/3.3.3a_old/8313_world_spell_bonus_data.sql new file mode 100644 index 00000000000..7121fd8a4e1 --- /dev/null +++ b/sql/updates/3.3.3a_old/8313_world_spell_bonus_data.sql @@ -0,0 +1,2 @@ +DELETE FROM `spell_bonus_data` WHERE `entry` = 25997; +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES (25997, 0, 0, 0, 0, 'Paladin - Eye for an Eye'); diff --git a/sql/updates/3.3.3a_old/8315_world_spell_bonus_data.sql b/sql/updates/3.3.3a_old/8315_world_spell_bonus_data.sql new file mode 100644 index 00000000000..6a95716a1d7 --- /dev/null +++ b/sql/updates/3.3.3a_old/8315_world_spell_bonus_data.sql @@ -0,0 +1,2 @@ +DELETE FROM `spell_bonus_data` WHERE `entry` = 20267; +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES (20267, 0, 0, 0, 0, 'Paladin - Judgement of Light Proc'); diff --git a/sql/updates/3.3.3a_old/8316_world_spell_bonus_data.sql b/sql/updates/3.3.3a_old/8316_world_spell_bonus_data.sql new file mode 100644 index 00000000000..bad80f0cd4c --- /dev/null +++ b/sql/updates/3.3.3a_old/8316_world_spell_bonus_data.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_bonus_data` WHERE `entry` IN (59638, 59637); +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES +(59638, 0.3, -1, 0, -1, 'Mage - Mirror Image Frostbolt'), +(59637, 0.3, -1, 0, -1, 'Mage - Mirror Image Fire Blast'); diff --git a/sql/updates/3.3.3a_old/8318_world_spell_bonus_data.sql b/sql/updates/3.3.3a_old/8318_world_spell_bonus_data.sql new file mode 100644 index 00000000000..c262f5e5c05 --- /dev/null +++ b/sql/updates/3.3.3a_old/8318_world_spell_bonus_data.sql @@ -0,0 +1,2 @@ +DELETE FROM `spell_bonus_data` WHERE `entry`=59637; +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES (59637, 0.15, -1, 0, -1, 'Mage - Mirror Image Fire Blast'); diff --git a/sql/updates/3.3.3a_old/8319_world_spell_linked_spell.sql b/sql/updates/3.3.3a_old/8319_world_spell_linked_spell.sql new file mode 100644 index 00000000000..5c8db788868 --- /dev/null +++ b/sql/updates/3.3.3a_old/8319_world_spell_linked_spell.sql @@ -0,0 +1 @@ +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=50720; diff --git a/sql/updates/3.3.3a_old/8327_world_scriptname.sql b/sql/updates/3.3.3a_old/8327_world_scriptname.sql new file mode 100644 index 00000000000..be75f817100 --- /dev/null +++ b/sql/updates/3.3.3a_old/8327_world_scriptname.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_colossus' WHERE `entry`=33237; diff --git a/sql/updates/3.3.3a_old/8330_world_playercreateinfo_spell.sql b/sql/updates/3.3.3a_old/8330_world_playercreateinfo_spell.sql new file mode 100644 index 00000000000..c79731abdfe --- /dev/null +++ b/sql/updates/3.3.3a_old/8330_world_playercreateinfo_spell.sql @@ -0,0 +1,2 @@ +DELETE FROM `playercreateinfo_spell` WHERE `Spell`=75461; +INSERT INTO `playercreateinfo_spell` VALUES (0,7,75461,'Flame Shock Passive'); diff --git a/sql/updates/3.3.3a_old/8334_world_scriptname.sql b/sql/updates/3.3.3a_old/8334_world_scriptname.sql new file mode 100644 index 00000000000..abd905d0f22 --- /dev/null +++ b/sql/updates/3.3.3a_old/8334_world_scriptname.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_guardian_pavilion' WHERE `entry` IN (33543,33643); diff --git a/sql/updates/3.3.3a_old/8348_world_script_texts.sql b/sql/updates/3.3.3a_old/8348_world_script_texts.sql new file mode 100644 index 00000000000..af3d17c700b --- /dev/null +++ b/sql/updates/3.3.3a_old/8348_world_script_texts.sql @@ -0,0 +1,13 @@ +-- Skadi the Ruthless voice +DELETE FROM `script_texts` WHERE `npc_entry`=26693; +INSERT INTO `script_texts` VALUES +(26693,-1575004, "What mongrels dare intrude here? Look alive, my brothers! A feast for the one that brings me their heads!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13497,1,0,0, "Skadi - SAY_AGGRO"), +(26693,-1575005, "Not so brash now, are you?" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13504,1,0,0, "Skadi - SAY_KILL_1"), +(26693,-1575006, "I'll mount your skull from the highest tower!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13505,1,0,0, "Skadi - SAY_KILL_2"), +(26693,-1575007, "%s in within range of the harpoon launchers!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0, "Skadi - EMOTE_RANGE"), +(26693,-1575008, "ARGH! You call that... an attack? I'll... show... aghhhh..." ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13506,1,0,0, "Skadi - SAY_DEATH"), +(26693,-1575009, "%s in within range of the harpoon launchers!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0, "Skadi - EMOTE_RANGE"), +(26693,-1575010, "You motherless knaves! Your corpses will make fine morsels for my new drake!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13507,1,0,0, "Skadi - SAY_DRAKE_DEATH"), +(26693,-1575011, "Sear them to the bone!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13498,1,0,0, "Skadi - SAY_DRAKE_BREATH_1"), +(26693,-1575012, "Go now! Leave nothing but ash in your wake!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13499,1,0,0, "Skadi - SAY_DRAKE_BREATH_2"), +(26693,-1575013, "Cleanse our sacred halls with flame!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13500,1,0,0, "Skadi - SAY_DRAKE_BREATH_3"); diff --git a/sql/updates/3.3.3a_old/8348_world_scriptname.sql b/sql/updates/3.3.3a_old/8348_world_scriptname.sql new file mode 100644 index 00000000000..42fbaed7eb7 --- /dev/null +++ b/sql/updates/3.3.3a_old/8348_world_scriptname.sql @@ -0,0 +1,2 @@ +-- Skadi Harpoon Launchers +UPDATE `gameobject_template` SET `ScriptName`='go_harpoon_launcher' WHERE `entry` IN (192175,192176,192177); diff --git a/sql/updates/3.3.3a_old/8352_world_scriptname.sql b/sql/updates/3.3.3a_old/8352_world_scriptname.sql new file mode 100644 index 00000000000..d3e350f60f3 --- /dev/null +++ b/sql/updates/3.3.3a_old/8352_world_scriptname.sql @@ -0,0 +1 @@ +UPDATE `gameobject_template` SET `ScriptName`='go_massive_seaforium_charge' WHERE `entry` = 190752; diff --git a/sql/updates/3.3.3a_old/8352_world_spell_linked_spell.sql b/sql/updates/3.3.3a_old/8352_world_spell_linked_spell.sql new file mode 100644 index 00000000000..9feca78a3ff --- /dev/null +++ b/sql/updates/3.3.3a_old/8352_world_spell_linked_spell.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_linked_spell` WHERE `spell_effect` IN (52418, -52418); +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(52415, 52418, 0, 'Carrying Seaforium - Add'), +(52410, -52418, 0, 'Carrying Seaforium - Remove'); diff --git a/sql/updates/3.3.3a_old/8358_world_spell_linked_spell.sql b/sql/updates/3.3.3a_old/8358_world_spell_linked_spell.sql new file mode 100644 index 00000000000..f86328d30e0 --- /dev/null +++ b/sql/updates/3.3.3a_old/8358_world_spell_linked_spell.sql @@ -0,0 +1,5 @@ +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (69381,69378,69377); +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(69381, 72588, 1, 'Drums of the Wild'), +(69378, 72586, 1, 'Drums of the Forgotten Kings'), +(69377, 72590, 1, 'Runescroll of Fortitude'); diff --git a/sql/updates/3.3.3a_old/8361_world_trinity_string.sql b/sql/updates/3.3.3a_old/8361_world_trinity_string.sql new file mode 100644 index 00000000000..f8bf096c075 --- /dev/null +++ b/sql/updates/3.3.3a_old/8361_world_trinity_string.sql @@ -0,0 +1,20 @@ +DELETE FROM `trinity_string` WHERE `entry` BETWEEN 10056 AND 10073; +INSERT INTO `trinity_string` VALUES +(10056,'The battle for Strand of the Ancients begins in 2 minutes.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10057,'The battle for Strand of the Ancients begins in 1 minute.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10058,'The battle for Strand of the Ancients begins in 30 seconds. Prepare yourselves!.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10059,'Let the battle for Strand of the Ancients begin!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10060,'The %s is under attack!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10061,'The %s was destroyed!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10062,'Round 1 - finished!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10063,'The Alliance captured the titan portal!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10064,'The Horde captured the titan portal!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10065,'Round 2 of the Battle for the Strand of the Ancients begins in 1 minute.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10066,'Round 2 begins in 30 seconds. Prepare yourselves!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10067,'The chamber has been breached! The titan relic is vulnerable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10068,'The Alliance captured the South Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10069,'The Alliance captured the West Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10070,'The Alliance captured the East Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10071,'The Horde captured the South Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10072,'The Horde captured the West Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10073,'The Horde captured the East Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); diff --git a/sql/updates/3.3.3a_old/8371_world_spell_bonus_data.sql b/sql/updates/3.3.3a_old/8371_world_spell_bonus_data.sql new file mode 100644 index 00000000000..5b72884b34c --- /dev/null +++ b/sql/updates/3.3.3a_old/8371_world_spell_bonus_data.sql @@ -0,0 +1,6 @@ +DELETE FROM `spell_bonus_data` WHERE `entry` IN (56131,56160,52725,55533); +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES +(56131, 0, 0, 0, 0, 'Priest - Glyph of Dispel Magic'), +(56160, 0, 0, 0, 0, 'Priest - Glyph of Power Word: Shield'), +(52752, 0, 0, 0, 0, 'Ancestral Awakening'), +(55533, 0, 0, 0, 0, 'Shaman - Glyph of Healing Wave'); diff --git a/sql/updates/3.3.3a_old/8372_world_spell_proc_event.sql b/sql/updates/3.3.3a_old/8372_world_spell_proc_event.sql new file mode 100644 index 00000000000..0f072328d27 --- /dev/null +++ b/sql/updates/3.3.3a_old/8372_world_spell_proc_event.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_proc_event` WHERE `entry` IN (57870); +INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES +( 57870, 0x00, 9, 0x00800000, 0x00000000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0); -- Glyph of Mend Pet diff --git a/sql/updates/3.3.3a_old/8373_world_spell_proc_event.sql b/sql/updates/3.3.3a_old/8373_world_spell_proc_event.sql new file mode 100644 index 00000000000..20f87b3f1f9 --- /dev/null +++ b/sql/updates/3.3.3a_old/8373_world_spell_proc_event.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_proc_event` WHERE `entry` IN (70807); +INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES +( 70807, 0, 11, 0x00000000, 0x00000000, 0x00000010, 0x00000000, 0x00000000, 0, 100, 0); -- Item - Shaman T10 Restoration 2P Bonus diff --git a/sql/updates/3.3.3a_old/8374_world_spell_proc_event.sql b/sql/updates/3.3.3a_old/8374_world_spell_proc_event.sql new file mode 100644 index 00000000000..2ee60a1b9af --- /dev/null +++ b/sql/updates/3.3.3a_old/8374_world_spell_proc_event.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_proc_event` WHERE `entry` IN (67667); +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +( 67667, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0, 0, 45); -- Item - Coliseum Healer Trinket 5men diff --git a/sql/updates/3.3.3a_old/8375_world_spell_proc_event.sql b/sql/updates/3.3.3a_old/8375_world_spell_proc_event.sql new file mode 100644 index 00000000000..62700485066 --- /dev/null +++ b/sql/updates/3.3.3a_old/8375_world_spell_proc_event.sql @@ -0,0 +1,5 @@ +DELETE FROM `spell_proc_event` WHERE `entry` IN (67672,67670,67653); +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +( 67672, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00800154, 0x00000000, 0, 0, 45), -- Item - Coliseum Melee Trinket 5men +( 67670, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000000, 0, 0, 45), -- Item - Coliseum Caster Trinket 5men +( 67653, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00400028, 0x00000000, 0, 0, 45); -- Item - Coliseum Tank Trinket 5men diff --git a/sql/updates/3.3.3a_old/8391_world_conditions.sql b/sql/updates/3.3.3a_old/8391_world_conditions.sql new file mode 100644 index 00000000000..fb5cc9fbc9e --- /dev/null +++ b/sql/updates/3.3.3a_old/8391_world_conditions.sql @@ -0,0 +1,72 @@ +-- ---------------------------- +-- Table structure for conditions +-- ---------------------------- +DROP TABLE IF EXISTS `conditions`; +CREATE TABLE `conditions` ( + `SourceTypeOrReferenceId` mediumint(8) NOT NULL DEFAULT '0', + `SourceGroup` mediumint(8) unsigned NOT NULL DEFAULT '0', + `SourceEntry` mediumint(8) unsigned NOT NULL DEFAULT '0', + `ElseGroup` mediumint(8) unsigned NOT NULL DEFAULT '0', + `ConditionTypeOrReference` mediumint(8) NOT NULL DEFAULT '0', + `ConditionValue1` mediumint(8) unsigned NOT NULL DEFAULT '0', + `ConditionValue2` mediumint(8) unsigned NOT NULL DEFAULT '0', + `ConditionValue3` mediumint(8) unsigned NOT NULL DEFAULT '0', + `ErrorTextId` mediumint(8) unsigned NOT NULL DEFAULT '0', + `Comment` varchar(255) DEFAULT NULL, + PRIMARY KEY (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Condition System'; + +-- convert loot conditions +INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 1,creature_loot_template.entry,creature_loot_template.item,creature_loot_template.lootcondition,creature_loot_template.condition_value1,creature_loot_template.condition_value2 FROM creature_loot_template WHERE creature_loot_template.lootcondition>0; +INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 2,disenchant_loot_template.entry,disenchant_loot_template.item,disenchant_loot_template.lootcondition,disenchant_loot_template.condition_value1,disenchant_loot_template.condition_value2 FROM disenchant_loot_template WHERE disenchant_loot_template.lootcondition>0; +INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 3,fishing_loot_template.entry,fishing_loot_template.item,fishing_loot_template.lootcondition,fishing_loot_template.condition_value1,fishing_loot_template.condition_value2 FROM fishing_loot_template WHERE fishing_loot_template.lootcondition>0; +INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 4,gameobject_loot_template.entry,gameobject_loot_template.item,gameobject_loot_template.lootcondition,gameobject_loot_template.condition_value1,gameobject_loot_template.condition_value2 FROM gameobject_loot_template WHERE gameobject_loot_template.lootcondition>0; +INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 5,item_loot_template.entry,item_loot_template.item,item_loot_template.lootcondition,item_loot_template.condition_value1,item_loot_template.condition_value2 FROM item_loot_template WHERE item_loot_template.lootcondition>0; +INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 6,mail_loot_template.entry,mail_loot_template.item,mail_loot_template.lootcondition,mail_loot_template.condition_value1,mail_loot_template.condition_value2 FROM mail_loot_template WHERE mail_loot_template.lootcondition>0; +INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 7,milling_loot_template.entry,milling_loot_template.item,milling_loot_template.lootcondition,milling_loot_template.condition_value1,milling_loot_template.condition_value2 FROM milling_loot_template WHERE milling_loot_template.lootcondition>0; +INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 8,pickpocketing_loot_template.entry,pickpocketing_loot_template.item,pickpocketing_loot_template.lootcondition,pickpocketing_loot_template.condition_value1,pickpocketing_loot_template.condition_value2 FROM pickpocketing_loot_template WHERE pickpocketing_loot_template.lootcondition>0; +INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 9,prospecting_loot_template.entry,prospecting_loot_template.item,prospecting_loot_template.lootcondition,prospecting_loot_template.condition_value1,prospecting_loot_template.condition_value2 FROM prospecting_loot_template WHERE prospecting_loot_template.lootcondition>0; +INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 10,reference_loot_template.entry,reference_loot_template.item,reference_loot_template.lootcondition,reference_loot_template.condition_value1,reference_loot_template.condition_value2 FROM reference_loot_template WHERE reference_loot_template.lootcondition>0; +INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 11,skinning_loot_template.entry,skinning_loot_template.item,skinning_loot_template.lootcondition,skinning_loot_template.condition_value1,skinning_loot_template.condition_value2 FROM skinning_loot_template WHERE skinning_loot_template.lootcondition>0; +INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 12,spell_loot_template.entry,spell_loot_template.item,spell_loot_template.lootcondition,spell_loot_template.condition_value1,spell_loot_template.condition_value2 FROM spell_loot_template WHERE spell_loot_template.lootcondition>0; + +-- convert spell script targets +INSERT INTO conditions (SourceTypeOrReferenceId,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 13,spell_script_target.entry,18,spell_script_target.type,spell_script_target.targetEntry FROM spell_script_target; + +-- convert gossip menu conditions +INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 14,gossip_menu.entry,gossip_menu.text_id,gossip_menu.cond_1,gossip_menu.cond_1_val_1,gossip_menu.cond_1_val_2 FROM gossip_menu WHERE gossip_menu.cond_1>0; +INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 14,gossip_menu.entry,gossip_menu.text_id,gossip_menu.cond_2,gossip_menu.cond_2_val_1,gossip_menu.cond_2_val_2 FROM gossip_menu WHERE gossip_menu.cond_2>0; + +-- convert gossip menu options conditions +INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 15,gossip_menu_option.menu_id,gossip_menu_option.id,gossip_menu_option.cond_1,gossip_menu_option.cond_1_val_1,gossip_menu_option.cond_1_val_2 FROM gossip_menu_option WHERE gossip_menu_option.cond_1>0; +INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 15,gossip_menu_option.menu_id,gossip_menu_option.id,gossip_menu_option.cond_2,gossip_menu_option.cond_2_val_1,gossip_menu_option.cond_2_val_2 FROM gossip_menu_option WHERE gossip_menu_option.cond_2>0; +INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 15,gossip_menu_option.menu_id,gossip_menu_option.id,gossip_menu_option.cond_3,gossip_menu_option.cond_3_val_1,gossip_menu_option.cond_3_val_2 FROM gossip_menu_option WHERE gossip_menu_option.cond_3>0; + +-- convert item required target +INSERT INTO conditions (SourceTypeOrReferenceId,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 18,item_required_target.entry,24,item_required_target.type,item_required_target.targetEntry FROM item_required_target; + +-- drop no more needed condition fields + +-- drop not used loot conditions +ALTER TABLE creature_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; +ALTER TABLE disenchant_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; +ALTER TABLE fishing_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; +ALTER TABLE gameobject_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; +ALTER TABLE item_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; +ALTER TABLE mail_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; +ALTER TABLE milling_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; +ALTER TABLE pickpocketing_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; +ALTER TABLE prospecting_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; +ALTER TABLE reference_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; +ALTER TABLE skinning_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; +ALTER TABLE spell_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; + +-- drop spell_script_target table, it is built into conditions +DROP TABLE IF EXISTS `spell_script_target`; + +-- drop item_required_target table, it is built into conditions +DROP TABLE IF EXISTS `item_required_target`; + +-- drop not used gossip conditions +ALTER TABLE gossip_menu DROP COLUMN cond_1,DROP COLUMN cond_1_val_1,DROP COLUMN cond_1_val_2,DROP COLUMN cond_2,DROP COLUMN cond_2_val_1,DROP COLUMN cond_2_val_2; +ALTER TABLE gossip_menu_option DROP COLUMN cond_1,DROP COLUMN cond_1_val_1,DROP COLUMN cond_1_val_2,DROP COLUMN cond_2,DROP COLUMN cond_2_val_1,DROP COLUMN cond_2_val_2; diff --git a/sql/updates/3.3.3a_old/8397_world_command.sql b/sql/updates/3.3.3a_old/8397_world_command.sql new file mode 100644 index 00000000000..f90f37e7eab --- /dev/null +++ b/sql/updates/3.3.3a_old/8397_world_command.sql @@ -0,0 +1,4 @@ +DELETE FROM `command` WHERE `name` IN ('instance open','instance close'); +INSERT INTO `command` (`name`, `security`, `help`) VALUES +('instance open', 3, 'Syntax: .instance open mapid [normal|heroic|10normal|10heroic|25normal|25heroic]'), +('instance close', 3, 'Syntax: .instance close mapid [normal|heroic|10normal|10heroic|25normal|25heroic]'); diff --git a/sql/updates/3.3.3a_old/8510_world_spell_proc_event.sql b/sql/updates/3.3.3a_old/8510_world_spell_proc_event.sql new file mode 100644 index 00000000000..c9d0a9cbc69 --- /dev/null +++ b/sql/updates/3.3.3a_old/8510_world_spell_proc_event.sql @@ -0,0 +1 @@ +UPDATE spell_proc_event SET SpellFamilyMask0 = SpellFamilyMask0 | 0x40000000, procEx = ProcEx | 0x0000001 WHERE entry IN(53569,53576); diff --git a/sql/updates/3.3.3a_old/8511_world_spell_proc_event.sql b/sql/updates/3.3.3a_old/8511_world_spell_proc_event.sql new file mode 100644 index 00000000000..91cc7841f97 --- /dev/null +++ b/sql/updates/3.3.3a_old/8511_world_spell_proc_event.sql @@ -0,0 +1 @@ +UPDATE spell_proc_event SET procEx = 0x0 WHERE entry IN(53569,53576); diff --git a/sql/updates/3.3.3a_old/8512_world_command.sql b/sql/updates/3.3.3a_old/8512_world_command.sql new file mode 100644 index 00000000000..6293503d492 --- /dev/null +++ b/sql/updates/3.3.3a_old/8512_world_command.sql @@ -0,0 +1,3 @@ +DELETE FROM `command` WHERE `name`='reload creature_onkill_reputation'; +INSERT INTO `command` VALUES +('reload creature_onkill_reputation','3','Syntax: .reload creature_onkill_reputation\r\nReload creature_onkill_reputation table.'); diff --git a/sql/updates/3.3.3a_old/8565_world_spell_proc_event.sql b/sql/updates/3.3.3a_old/8565_world_spell_proc_event.sql new file mode 100644 index 00000000000..b4a378e458c --- /dev/null +++ b/sql/updates/3.3.3a_old/8565_world_spell_proc_event.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_proc_event` WHERE `entry`=70761; +INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES +( 70761, 0x00, 10, 0x00000000, 0x80004000, 0x00000001, 0x00000400, 0x00000000, 0, 0, 0); -- Item - Paladin T10 Protection 4P Bonus diff --git a/sql/updates/3.3.3a_old/8568_world_npc_vendor.sql b/sql/updates/3.3.3a_old/8568_world_npc_vendor.sql new file mode 100644 index 00000000000..63645847ef6 --- /dev/null +++ b/sql/updates/3.3.3a_old/8568_world_npc_vendor.sql @@ -0,0 +1 @@ +ALTER TABLE npc_vendor CHANGE COLUMN `ExtendedCost` `ExtendedCost` mediumint(8) NOT NULL default '0' COMMENT 'negative if cost must exclude normal money cost'; diff --git a/sql/updates/3.3.3a_old/8568_world_trinity_string.sql b/sql/updates/3.3.3a_old/8568_world_trinity_string.sql new file mode 100644 index 00000000000..c4fdc2f8480 --- /dev/null +++ b/sql/updates/3.3.3a_old/8568_world_trinity_string.sql @@ -0,0 +1,3 @@ +DELETE FROM trinity_string WHERE entry IN (210); +INSERT INTO trinity_string VALUES +(210,'Item \'%i\' (with extended cost %i) already in vendor list.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); diff --git a/sql/updates/3.3.3a_old/8575_world_command.sql b/sql/updates/3.3.3a_old/8575_world_command.sql new file mode 100644 index 00000000000..8175ad3d453 --- /dev/null +++ b/sql/updates/3.3.3a_old/8575_world_command.sql @@ -0,0 +1,2 @@ +DELETE FROM command WHERE name = 'reload conditions'; +INSERT INTO command (name, security, help) VALUES ('reload conditions', 3, 'Reload conditions table.'); diff --git a/sql/updates/3.3.3a_old/8576_world_command.sql b/sql/updates/3.3.3a_old/8576_world_command.sql new file mode 100644 index 00000000000..4512dfe8a28 --- /dev/null +++ b/sql/updates/3.3.3a_old/8576_world_command.sql @@ -0,0 +1 @@ +DELETE FROM command WHERE name = 'reload spell_script_target'; diff --git a/sql/updates/3.3.3a_old/8586_world_command.sql b/sql/updates/3.3.3a_old/8586_world_command.sql new file mode 100644 index 00000000000..b554755df08 --- /dev/null +++ b/sql/updates/3.3.3a_old/8586_world_command.sql @@ -0,0 +1,4 @@ +DELETE FROM `command` WHERE `name` IN ('reload item_set_names','reload locales_item_set_name'); +INSERT INTO `command` VALUES +('reload item_set_names',3,'Syntax: .reload item_set_names\nReload item_set_names table.'), +('reload locales_item_set_name',3,'Syntax: .reload locales_item_set_name\nReload locales_item_set_name table.'); diff --git a/sql/updates/3.3.3a_old/8586_world_item_set_names.sql b/sql/updates/3.3.3a_old/8586_world_item_set_names.sql new file mode 100644 index 00000000000..f62df79678a --- /dev/null +++ b/sql/updates/3.3.3a_old/8586_world_item_set_names.sql @@ -0,0 +1,14 @@ +-- +-- Table structure for table `item_set_names` +-- + +DROP TABLE IF EXISTS `item_set_names`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `item_set_names` ( + `entry` mediumint(8) unsigned NOT NULL, + `name` varchar(255) character set utf8 NOT NULL default '', + `InventoryType` tinyint(3) unsigned NOT NULL default '0', + PRIMARY KEY (`entry`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; diff --git a/sql/updates/3.3.3a_old/8586_world_locales_item_set_name.sql b/sql/updates/3.3.3a_old/8586_world_locales_item_set_name.sql new file mode 100644 index 00000000000..30d39f978a2 --- /dev/null +++ b/sql/updates/3.3.3a_old/8586_world_locales_item_set_name.sql @@ -0,0 +1,20 @@ +-- +-- Table structure for table `locales_item_set_name` +-- + +DROP TABLE IF EXISTS `locales_item_set_name`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `locales_item_set_name` ( + `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', + `name_loc1` varchar(100) NOT NULL DEFAULT '', + `name_loc2` varchar(100) NOT NULL DEFAULT '', + `name_loc3` varchar(100) NOT NULL DEFAULT '', + `name_loc4` varchar(100) NOT NULL DEFAULT '', + `name_loc5` varchar(100) NOT NULL DEFAULT '', + `name_loc6` varchar(100) NOT NULL DEFAULT '', + `name_loc7` varchar(100) NOT NULL DEFAULT '', + `name_loc8` varchar(100) NOT NULL DEFAULT '', + PRIMARY KEY (`entry`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; diff --git a/sql/updates/3.3.3a_old/8589_world_item_set_names.sql b/sql/updates/3.3.3a_old/8589_world_item_set_names.sql new file mode 100644 index 00000000000..2edcc160c65 --- /dev/null +++ b/sql/updates/3.3.3a_old/8589_world_item_set_names.sql @@ -0,0 +1 @@ +ALTER TABLE `item_set_names` ADD COLUMN `WDBVerified` smallint(5) signed NOT NULL DEFAULT '1'; diff --git a/sql/updates/3.3.3a_old/8602_world_spell_proc_event.sql b/sql/updates/3.3.3a_old/8602_world_spell_proc_event.sql new file mode 100644 index 00000000000..ce7873f3a83 --- /dev/null +++ b/sql/updates/3.3.3a_old/8602_world_spell_proc_event.sql @@ -0,0 +1 @@ +UPDATE `spell_proc_event` SET `Cooldown`=30 WHERE `entry` IN (30886, 30885, 30884, 30883, 30881); diff --git a/sql/updates/3.3.3a_old/8605_world_playercreateinfo_item.sql b/sql/updates/3.3.3a_old/8605_world_playercreateinfo_item.sql new file mode 100644 index 00000000000..c5d423c1744 --- /dev/null +++ b/sql/updates/3.3.3a_old/8605_world_playercreateinfo_item.sql @@ -0,0 +1 @@ +ALTER TABLE `playercreateinfo_item` CHANGE `amount` `amount` tinyint(3) NOT NULL DEFAULT '1'; diff --git a/sql/updates/3.3.3a_old/8607_world_pool_creature.sql b/sql/updates/3.3.3a_old/8607_world_pool_creature.sql new file mode 100644 index 00000000000..400e54cc6b5 --- /dev/null +++ b/sql/updates/3.3.3a_old/8607_world_pool_creature.sql @@ -0,0 +1,2 @@ +UPDATE `pool_creature` SET `description` = `comment` WHERE `comment` <> '' AND `comment` IS NOT NULL AND (`description` = '' OR `description` IS NULL); +ALTER TABLE `pool_creature` DROP COLUMN `comment`; diff --git a/sql/updates/3.3.3a_old/8607_world_pool_template.sql b/sql/updates/3.3.3a_old/8607_world_pool_template.sql new file mode 100644 index 00000000000..ac1cbf70223 --- /dev/null +++ b/sql/updates/3.3.3a_old/8607_world_pool_template.sql @@ -0,0 +1,2 @@ +UPDATE `pool_template` SET `description` = `comment` WHERE `comment` <> '' AND `comment` IS NOT NULL AND (`description` = '' OR `description` IS NULL); +ALTER TABLE `pool_template` DROP COLUMN `comment`; diff --git a/sql/updates/3.3.3a_old/8625_world_pool_creature.sql b/sql/updates/3.3.3a_old/8625_world_pool_creature.sql new file mode 100644 index 00000000000..ade35efe138 --- /dev/null +++ b/sql/updates/3.3.3a_old/8625_world_pool_creature.sql @@ -0,0 +1 @@ +ALTER TABLE `pool_creature` DROP PRIMARY KEY, ADD PRIMARY KEY (`guid`); diff --git a/sql/updates/3.3.3a_old/8625_world_pool_gameobject.sql b/sql/updates/3.3.3a_old/8625_world_pool_gameobject.sql new file mode 100644 index 00000000000..720fbb76a0c --- /dev/null +++ b/sql/updates/3.3.3a_old/8625_world_pool_gameobject.sql @@ -0,0 +1 @@ +ALTER TABLE `pool_gameobject` DROP PRIMARY KEY, ADD PRIMARY KEY (`guid`); diff --git a/sql/updates/3.3.3a_old/8625_world_pool_pool.sql b/sql/updates/3.3.3a_old/8625_world_pool_pool.sql new file mode 100644 index 00000000000..1c8b9f3db8e --- /dev/null +++ b/sql/updates/3.3.3a_old/8625_world_pool_pool.sql @@ -0,0 +1 @@ +ALTER TABLE `pool_pool` DROP PRIMARY KEY, ADD PRIMARY KEY (`pool_id`); diff --git a/sql/updates/3.3.3a_old/8638_world_scriptname.sql b/sql/updates/3.3.3a_old/8638_world_scriptname.sql new file mode 100644 index 00000000000..d3f357f43bf --- /dev/null +++ b/sql/updates/3.3.3a_old/8638_world_scriptname.sql @@ -0,0 +1,12 @@ +update `creature_template` SET `scriptname`='mob_azure_invader' WHERE `entry`=30661; -- Azure Invader 1 +update `creature_template` SET `scriptname`='mob_azure_spellbreaker' WHERE `entry`=30662; -- Azure Spellbreaker +update `creature_template` SET `scriptname`='mob_azure_binder' WHERE `entry`=30663; -- Azure Binder 1 +update `creature_template` SET `scriptname`='mob_azure_mage_slayer' WHERE `entry`=30664; -- Azure Mage Slayer 1 +update `creature_template` SET `scriptname`='mob_azure_captain' WHERE `entry`=30666; -- Azure Captain +update `creature_template` SET `scriptname`='mob_azure_sorceror' WHERE `entry`=30667; -- Azure Sorceror +update `creature_template` SET `scriptname`='mob_azure_raider' WHERE `entry`=30668; -- Azure Raider +update `creature_template` SET `scriptname`='mob_azure_stalker' WHERE `entry`=32191; -- Azure Stalker +update `creature_template` SET `scriptname`='mob_azure_invader' WHERE `entry`=30961; -- Azure Invader 2 +update `creature_template` SET `scriptname`='mob_azure_spellbreaker' WHERE `entry`=30962; -- Azure Spellbreaker +update `creature_template` SET `scriptname`='mob_azure_binder' WHERE `entry`=30918; -- Azure Binder 2 +update `creature_template` SET `scriptname`='mob_azure_mage_slayer' WHERE `entry`=30963; -- Azure Mage Sl diff --git a/sql/updates/3.3.3a_old/8658_world_spell_linked_spell.sql b/sql/updates/3.3.3a_old/8658_world_spell_linked_spell.sql new file mode 100644 index 00000000000..59e96ca2ac5 --- /dev/null +++ b/sql/updates/3.3.3a_old/8658_world_spell_linked_spell.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=20066; +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(20066, -61840, 0, 'Repentance'); diff --git a/sql/updates/3.3.3a_old/8671_world_spell_linked_spell.sql b/sql/updates/3.3.3a_old/8671_world_spell_linked_spell.sql new file mode 100644 index 00000000000..d2572727e59 --- /dev/null +++ b/sql/updates/3.3.3a_old/8671_world_spell_linked_spell.sql @@ -0,0 +1,6 @@ +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (54861,55004)AND `spell_effect` IN (-23335,-23333); +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +(54861,-23335,0, 'Drop Flag on Nitro Boost WSG'), +(54861,-23333,0, 'Drop Flag on Nitro Boost WSG'), +(55004,-23335,0, 'Drop Flag on Nitro Boost WSG'), +(55004,-23333,0, 'Drop Flag on Nitro Boost WSG'); diff --git a/sql/updates/3.3.3a_old/8672_world_gossip_menu_option.sql b/sql/updates/3.3.3a_old/8672_world_gossip_menu_option.sql new file mode 100644 index 00000000000..2ba86951100 --- /dev/null +++ b/sql/updates/3.3.3a_old/8672_world_gossip_menu_option.sql @@ -0,0 +1,2 @@ +-- Drop forgotten fields after condition implementation +ALTER TABLE gossip_menu_option DROP COLUMN cond_3,DROP COLUMN cond_3_val_1,DROP COLUMN cond_3_val_2; diff --git a/sql/updates/3.3.3a_old/8674_world_spell_dbc.sql b/sql/updates/3.3.3a_old/8674_world_spell_dbc.sql new file mode 100644 index 00000000000..e1e9e8d2fe2 --- /dev/null +++ b/sql/updates/3.3.3a_old/8674_world_spell_dbc.sql @@ -0,0 +1,4 @@ +-- Add serverside spells place holders for future development +DELETE FROM `spell_dbc` WHERE `Id`=39616; +INSERT INTO `spell_dbc` (`Id`,`Comment`) VALUES +(39616, 'Quest 10966 reward serverside spell'); diff --git a/sql/updates/3.3.3a_old/8674_world_spell_linked_spell.sql b/sql/updates/3.3.3a_old/8674_world_spell_linked_spell.sql new file mode 100644 index 00000000000..1333c728a8a --- /dev/null +++ b/sql/updates/3.3.3a_old/8674_world_spell_linked_spell.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (54861,55004)AND `spell_effect` IN (-34976); +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +( 54861,-34976, 0, 'Drop Flag on Nitro Boost EOS'), +( 55004,-34976, 0, 'Drop Flag on Nitro Boost EOS'); diff --git a/sql/updates/3.3.3a_old/8694_world_transport_events.sql b/sql/updates/3.3.3a_old/8694_world_transport_events.sql new file mode 100644 index 00000000000..0e8786f777f --- /dev/null +++ b/sql/updates/3.3.3a_old/8694_world_transport_events.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS `transport_events`; diff --git a/sql/updates/3.3.3a_old/8752_world_scriptname.sql b/sql/updates/3.3.3a_old/8752_world_scriptname.sql new file mode 100644 index 00000000000..03bc1bb354c --- /dev/null +++ b/sql/updates/3.3.3a_old/8752_world_scriptname.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `scriptname`='mob_azure_saboteur' WHERE `entry`=31079; -- Azure Saboteur diff --git a/sql/updates/8312_world_spell_proc_event.sql b/sql/updates/8312_world_spell_proc_event.sql deleted file mode 100644 index 775ad64f307..00000000000 --- a/sql/updates/8312_world_spell_proc_event.sql +++ /dev/null @@ -1,4 +0,0 @@ -DELETE FROM `spell_proc_event` WHERE `entry` IN (71519,71562); -INSERT INTO `spell_proc_event` (`entry`, `Cooldown`) VALUES -(71519, 105), -(71562, 105); diff --git a/sql/updates/8313_world_spell_bonus_data.sql b/sql/updates/8313_world_spell_bonus_data.sql deleted file mode 100644 index 7121fd8a4e1..00000000000 --- a/sql/updates/8313_world_spell_bonus_data.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM `spell_bonus_data` WHERE `entry` = 25997; -INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES (25997, 0, 0, 0, 0, 'Paladin - Eye for an Eye'); diff --git a/sql/updates/8315_world_spell_bonus_data.sql b/sql/updates/8315_world_spell_bonus_data.sql deleted file mode 100644 index 6a95716a1d7..00000000000 --- a/sql/updates/8315_world_spell_bonus_data.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM `spell_bonus_data` WHERE `entry` = 20267; -INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES (20267, 0, 0, 0, 0, 'Paladin - Judgement of Light Proc'); diff --git a/sql/updates/8316_world_spell_bonus_data.sql b/sql/updates/8316_world_spell_bonus_data.sql deleted file mode 100644 index bad80f0cd4c..00000000000 --- a/sql/updates/8316_world_spell_bonus_data.sql +++ /dev/null @@ -1,4 +0,0 @@ -DELETE FROM `spell_bonus_data` WHERE `entry` IN (59638, 59637); -INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES -(59638, 0.3, -1, 0, -1, 'Mage - Mirror Image Frostbolt'), -(59637, 0.3, -1, 0, -1, 'Mage - Mirror Image Fire Blast'); diff --git a/sql/updates/8318_world_spell_bonus_data.sql b/sql/updates/8318_world_spell_bonus_data.sql deleted file mode 100644 index c262f5e5c05..00000000000 --- a/sql/updates/8318_world_spell_bonus_data.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM `spell_bonus_data` WHERE `entry`=59637; -INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES (59637, 0.15, -1, 0, -1, 'Mage - Mirror Image Fire Blast'); diff --git a/sql/updates/8319_world_spell_linked_spell.sql b/sql/updates/8319_world_spell_linked_spell.sql deleted file mode 100644 index 5c8db788868..00000000000 --- a/sql/updates/8319_world_spell_linked_spell.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=50720; diff --git a/sql/updates/8327_world_scriptname.sql b/sql/updates/8327_world_scriptname.sql deleted file mode 100644 index be75f817100..00000000000 --- a/sql/updates/8327_world_scriptname.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `creature_template` SET `ScriptName`='npc_colossus' WHERE `entry`=33237; diff --git a/sql/updates/8330_world_playercreateinfo_spell.sql b/sql/updates/8330_world_playercreateinfo_spell.sql deleted file mode 100644 index c79731abdfe..00000000000 --- a/sql/updates/8330_world_playercreateinfo_spell.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM `playercreateinfo_spell` WHERE `Spell`=75461; -INSERT INTO `playercreateinfo_spell` VALUES (0,7,75461,'Flame Shock Passive'); diff --git a/sql/updates/8334_world_scriptname.sql b/sql/updates/8334_world_scriptname.sql deleted file mode 100644 index abd905d0f22..00000000000 --- a/sql/updates/8334_world_scriptname.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `creature_template` SET `ScriptName`='npc_guardian_pavilion' WHERE `entry` IN (33543,33643); diff --git a/sql/updates/8348_world_script_texts.sql b/sql/updates/8348_world_script_texts.sql deleted file mode 100644 index af3d17c700b..00000000000 --- a/sql/updates/8348_world_script_texts.sql +++ /dev/null @@ -1,13 +0,0 @@ --- Skadi the Ruthless voice -DELETE FROM `script_texts` WHERE `npc_entry`=26693; -INSERT INTO `script_texts` VALUES -(26693,-1575004, "What mongrels dare intrude here? Look alive, my brothers! A feast for the one that brings me their heads!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13497,1,0,0, "Skadi - SAY_AGGRO"), -(26693,-1575005, "Not so brash now, are you?" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13504,1,0,0, "Skadi - SAY_KILL_1"), -(26693,-1575006, "I'll mount your skull from the highest tower!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13505,1,0,0, "Skadi - SAY_KILL_2"), -(26693,-1575007, "%s in within range of the harpoon launchers!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0, "Skadi - EMOTE_RANGE"), -(26693,-1575008, "ARGH! You call that... an attack? I'll... show... aghhhh..." ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13506,1,0,0, "Skadi - SAY_DEATH"), -(26693,-1575009, "%s in within range of the harpoon launchers!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0, "Skadi - EMOTE_RANGE"), -(26693,-1575010, "You motherless knaves! Your corpses will make fine morsels for my new drake!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13507,1,0,0, "Skadi - SAY_DRAKE_DEATH"), -(26693,-1575011, "Sear them to the bone!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13498,1,0,0, "Skadi - SAY_DRAKE_BREATH_1"), -(26693,-1575012, "Go now! Leave nothing but ash in your wake!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13499,1,0,0, "Skadi - SAY_DRAKE_BREATH_2"), -(26693,-1575013, "Cleanse our sacred halls with flame!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13500,1,0,0, "Skadi - SAY_DRAKE_BREATH_3"); diff --git a/sql/updates/8348_world_scriptname.sql b/sql/updates/8348_world_scriptname.sql deleted file mode 100644 index 42fbaed7eb7..00000000000 --- a/sql/updates/8348_world_scriptname.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Skadi Harpoon Launchers -UPDATE `gameobject_template` SET `ScriptName`='go_harpoon_launcher' WHERE `entry` IN (192175,192176,192177); diff --git a/sql/updates/8352_world_scriptname.sql b/sql/updates/8352_world_scriptname.sql deleted file mode 100644 index d3e350f60f3..00000000000 --- a/sql/updates/8352_world_scriptname.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `gameobject_template` SET `ScriptName`='go_massive_seaforium_charge' WHERE `entry` = 190752; diff --git a/sql/updates/8352_world_spell_linked_spell.sql b/sql/updates/8352_world_spell_linked_spell.sql deleted file mode 100644 index 9feca78a3ff..00000000000 --- a/sql/updates/8352_world_spell_linked_spell.sql +++ /dev/null @@ -1,4 +0,0 @@ -DELETE FROM `spell_linked_spell` WHERE `spell_effect` IN (52418, -52418); -INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES -(52415, 52418, 0, 'Carrying Seaforium - Add'), -(52410, -52418, 0, 'Carrying Seaforium - Remove'); diff --git a/sql/updates/8358_world_spell_linked_spell.sql b/sql/updates/8358_world_spell_linked_spell.sql deleted file mode 100644 index f86328d30e0..00000000000 --- a/sql/updates/8358_world_spell_linked_spell.sql +++ /dev/null @@ -1,5 +0,0 @@ -DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (69381,69378,69377); -INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES -(69381, 72588, 1, 'Drums of the Wild'), -(69378, 72586, 1, 'Drums of the Forgotten Kings'), -(69377, 72590, 1, 'Runescroll of Fortitude'); diff --git a/sql/updates/8361_world_trinity_string.sql b/sql/updates/8361_world_trinity_string.sql deleted file mode 100644 index f8bf096c075..00000000000 --- a/sql/updates/8361_world_trinity_string.sql +++ /dev/null @@ -1,20 +0,0 @@ -DELETE FROM `trinity_string` WHERE `entry` BETWEEN 10056 AND 10073; -INSERT INTO `trinity_string` VALUES -(10056,'The battle for Strand of the Ancients begins in 2 minutes.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10057,'The battle for Strand of the Ancients begins in 1 minute.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10058,'The battle for Strand of the Ancients begins in 30 seconds. Prepare yourselves!.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10059,'Let the battle for Strand of the Ancients begin!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10060,'The %s is under attack!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10061,'The %s was destroyed!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10062,'Round 1 - finished!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10063,'The Alliance captured the titan portal!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10064,'The Horde captured the titan portal!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10065,'Round 2 of the Battle for the Strand of the Ancients begins in 1 minute.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10066,'Round 2 begins in 30 seconds. Prepare yourselves!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10067,'The chamber has been breached! The titan relic is vulnerable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10068,'The Alliance captured the South Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10069,'The Alliance captured the West Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10070,'The Alliance captured the East Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10071,'The Horde captured the South Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10072,'The Horde captured the West Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10073,'The Horde captured the East Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); diff --git a/sql/updates/8371_world_spell_bonus_data.sql b/sql/updates/8371_world_spell_bonus_data.sql deleted file mode 100644 index 5b72884b34c..00000000000 --- a/sql/updates/8371_world_spell_bonus_data.sql +++ /dev/null @@ -1,6 +0,0 @@ -DELETE FROM `spell_bonus_data` WHERE `entry` IN (56131,56160,52725,55533); -INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES -(56131, 0, 0, 0, 0, 'Priest - Glyph of Dispel Magic'), -(56160, 0, 0, 0, 0, 'Priest - Glyph of Power Word: Shield'), -(52752, 0, 0, 0, 0, 'Ancestral Awakening'), -(55533, 0, 0, 0, 0, 'Shaman - Glyph of Healing Wave'); diff --git a/sql/updates/8372_world_spell_proc_event.sql b/sql/updates/8372_world_spell_proc_event.sql deleted file mode 100644 index 0f072328d27..00000000000 --- a/sql/updates/8372_world_spell_proc_event.sql +++ /dev/null @@ -1,3 +0,0 @@ -DELETE FROM `spell_proc_event` WHERE `entry` IN (57870); -INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES -( 57870, 0x00, 9, 0x00800000, 0x00000000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0); -- Glyph of Mend Pet diff --git a/sql/updates/8373_world_spell_proc_event.sql b/sql/updates/8373_world_spell_proc_event.sql deleted file mode 100644 index 20f87b3f1f9..00000000000 --- a/sql/updates/8373_world_spell_proc_event.sql +++ /dev/null @@ -1,3 +0,0 @@ -DELETE FROM `spell_proc_event` WHERE `entry` IN (70807); -INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES -( 70807, 0, 11, 0x00000000, 0x00000000, 0x00000010, 0x00000000, 0x00000000, 0, 100, 0); -- Item - Shaman T10 Restoration 2P Bonus diff --git a/sql/updates/8374_world_spell_proc_event.sql b/sql/updates/8374_world_spell_proc_event.sql deleted file mode 100644 index 2ee60a1b9af..00000000000 --- a/sql/updates/8374_world_spell_proc_event.sql +++ /dev/null @@ -1,3 +0,0 @@ -DELETE FROM `spell_proc_event` WHERE `entry` IN (67667); -INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES -( 67667, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0, 0, 45); -- Item - Coliseum Healer Trinket 5men diff --git a/sql/updates/8375_world_spell_proc_event.sql b/sql/updates/8375_world_spell_proc_event.sql deleted file mode 100644 index 62700485066..00000000000 --- a/sql/updates/8375_world_spell_proc_event.sql +++ /dev/null @@ -1,5 +0,0 @@ -DELETE FROM `spell_proc_event` WHERE `entry` IN (67672,67670,67653); -INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES -( 67672, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00800154, 0x00000000, 0, 0, 45), -- Item - Coliseum Melee Trinket 5men -( 67670, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000000, 0, 0, 45), -- Item - Coliseum Caster Trinket 5men -( 67653, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00400028, 0x00000000, 0, 0, 45); -- Item - Coliseum Tank Trinket 5men diff --git a/sql/updates/8391_world_conditions.sql b/sql/updates/8391_world_conditions.sql deleted file mode 100644 index fb5cc9fbc9e..00000000000 --- a/sql/updates/8391_world_conditions.sql +++ /dev/null @@ -1,72 +0,0 @@ --- ---------------------------- --- Table structure for conditions --- ---------------------------- -DROP TABLE IF EXISTS `conditions`; -CREATE TABLE `conditions` ( - `SourceTypeOrReferenceId` mediumint(8) NOT NULL DEFAULT '0', - `SourceGroup` mediumint(8) unsigned NOT NULL DEFAULT '0', - `SourceEntry` mediumint(8) unsigned NOT NULL DEFAULT '0', - `ElseGroup` mediumint(8) unsigned NOT NULL DEFAULT '0', - `ConditionTypeOrReference` mediumint(8) NOT NULL DEFAULT '0', - `ConditionValue1` mediumint(8) unsigned NOT NULL DEFAULT '0', - `ConditionValue2` mediumint(8) unsigned NOT NULL DEFAULT '0', - `ConditionValue3` mediumint(8) unsigned NOT NULL DEFAULT '0', - `ErrorTextId` mediumint(8) unsigned NOT NULL DEFAULT '0', - `Comment` varchar(255) DEFAULT NULL, - PRIMARY KEY (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Condition System'; - --- convert loot conditions -INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 1,creature_loot_template.entry,creature_loot_template.item,creature_loot_template.lootcondition,creature_loot_template.condition_value1,creature_loot_template.condition_value2 FROM creature_loot_template WHERE creature_loot_template.lootcondition>0; -INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 2,disenchant_loot_template.entry,disenchant_loot_template.item,disenchant_loot_template.lootcondition,disenchant_loot_template.condition_value1,disenchant_loot_template.condition_value2 FROM disenchant_loot_template WHERE disenchant_loot_template.lootcondition>0; -INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 3,fishing_loot_template.entry,fishing_loot_template.item,fishing_loot_template.lootcondition,fishing_loot_template.condition_value1,fishing_loot_template.condition_value2 FROM fishing_loot_template WHERE fishing_loot_template.lootcondition>0; -INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 4,gameobject_loot_template.entry,gameobject_loot_template.item,gameobject_loot_template.lootcondition,gameobject_loot_template.condition_value1,gameobject_loot_template.condition_value2 FROM gameobject_loot_template WHERE gameobject_loot_template.lootcondition>0; -INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 5,item_loot_template.entry,item_loot_template.item,item_loot_template.lootcondition,item_loot_template.condition_value1,item_loot_template.condition_value2 FROM item_loot_template WHERE item_loot_template.lootcondition>0; -INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 6,mail_loot_template.entry,mail_loot_template.item,mail_loot_template.lootcondition,mail_loot_template.condition_value1,mail_loot_template.condition_value2 FROM mail_loot_template WHERE mail_loot_template.lootcondition>0; -INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 7,milling_loot_template.entry,milling_loot_template.item,milling_loot_template.lootcondition,milling_loot_template.condition_value1,milling_loot_template.condition_value2 FROM milling_loot_template WHERE milling_loot_template.lootcondition>0; -INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 8,pickpocketing_loot_template.entry,pickpocketing_loot_template.item,pickpocketing_loot_template.lootcondition,pickpocketing_loot_template.condition_value1,pickpocketing_loot_template.condition_value2 FROM pickpocketing_loot_template WHERE pickpocketing_loot_template.lootcondition>0; -INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 9,prospecting_loot_template.entry,prospecting_loot_template.item,prospecting_loot_template.lootcondition,prospecting_loot_template.condition_value1,prospecting_loot_template.condition_value2 FROM prospecting_loot_template WHERE prospecting_loot_template.lootcondition>0; -INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 10,reference_loot_template.entry,reference_loot_template.item,reference_loot_template.lootcondition,reference_loot_template.condition_value1,reference_loot_template.condition_value2 FROM reference_loot_template WHERE reference_loot_template.lootcondition>0; -INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 11,skinning_loot_template.entry,skinning_loot_template.item,skinning_loot_template.lootcondition,skinning_loot_template.condition_value1,skinning_loot_template.condition_value2 FROM skinning_loot_template WHERE skinning_loot_template.lootcondition>0; -INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 12,spell_loot_template.entry,spell_loot_template.item,spell_loot_template.lootcondition,spell_loot_template.condition_value1,spell_loot_template.condition_value2 FROM spell_loot_template WHERE spell_loot_template.lootcondition>0; - --- convert spell script targets -INSERT INTO conditions (SourceTypeOrReferenceId,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 13,spell_script_target.entry,18,spell_script_target.type,spell_script_target.targetEntry FROM spell_script_target; - --- convert gossip menu conditions -INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 14,gossip_menu.entry,gossip_menu.text_id,gossip_menu.cond_1,gossip_menu.cond_1_val_1,gossip_menu.cond_1_val_2 FROM gossip_menu WHERE gossip_menu.cond_1>0; -INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 14,gossip_menu.entry,gossip_menu.text_id,gossip_menu.cond_2,gossip_menu.cond_2_val_1,gossip_menu.cond_2_val_2 FROM gossip_menu WHERE gossip_menu.cond_2>0; - --- convert gossip menu options conditions -INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 15,gossip_menu_option.menu_id,gossip_menu_option.id,gossip_menu_option.cond_1,gossip_menu_option.cond_1_val_1,gossip_menu_option.cond_1_val_2 FROM gossip_menu_option WHERE gossip_menu_option.cond_1>0; -INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 15,gossip_menu_option.menu_id,gossip_menu_option.id,gossip_menu_option.cond_2,gossip_menu_option.cond_2_val_1,gossip_menu_option.cond_2_val_2 FROM gossip_menu_option WHERE gossip_menu_option.cond_2>0; -INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 15,gossip_menu_option.menu_id,gossip_menu_option.id,gossip_menu_option.cond_3,gossip_menu_option.cond_3_val_1,gossip_menu_option.cond_3_val_2 FROM gossip_menu_option WHERE gossip_menu_option.cond_3>0; - --- convert item required target -INSERT INTO conditions (SourceTypeOrReferenceId,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) SELECT 18,item_required_target.entry,24,item_required_target.type,item_required_target.targetEntry FROM item_required_target; - --- drop no more needed condition fields - --- drop not used loot conditions -ALTER TABLE creature_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; -ALTER TABLE disenchant_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; -ALTER TABLE fishing_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; -ALTER TABLE gameobject_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; -ALTER TABLE item_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; -ALTER TABLE mail_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; -ALTER TABLE milling_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; -ALTER TABLE pickpocketing_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; -ALTER TABLE prospecting_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; -ALTER TABLE reference_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; -ALTER TABLE skinning_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; -ALTER TABLE spell_loot_template DROP COLUMN lootcondition,DROP COLUMN condition_value1,DROP COLUMN condition_value2; - --- drop spell_script_target table, it is built into conditions -DROP TABLE IF EXISTS `spell_script_target`; - --- drop item_required_target table, it is built into conditions -DROP TABLE IF EXISTS `item_required_target`; - --- drop not used gossip conditions -ALTER TABLE gossip_menu DROP COLUMN cond_1,DROP COLUMN cond_1_val_1,DROP COLUMN cond_1_val_2,DROP COLUMN cond_2,DROP COLUMN cond_2_val_1,DROP COLUMN cond_2_val_2; -ALTER TABLE gossip_menu_option DROP COLUMN cond_1,DROP COLUMN cond_1_val_1,DROP COLUMN cond_1_val_2,DROP COLUMN cond_2,DROP COLUMN cond_2_val_1,DROP COLUMN cond_2_val_2; diff --git a/sql/updates/8397_world_command.sql b/sql/updates/8397_world_command.sql deleted file mode 100644 index f90f37e7eab..00000000000 --- a/sql/updates/8397_world_command.sql +++ /dev/null @@ -1,4 +0,0 @@ -DELETE FROM `command` WHERE `name` IN ('instance open','instance close'); -INSERT INTO `command` (`name`, `security`, `help`) VALUES -('instance open', 3, 'Syntax: .instance open mapid [normal|heroic|10normal|10heroic|25normal|25heroic]'), -('instance close', 3, 'Syntax: .instance close mapid [normal|heroic|10normal|10heroic|25normal|25heroic]'); diff --git a/sql/updates/8510_world_spell_proc_event.sql b/sql/updates/8510_world_spell_proc_event.sql deleted file mode 100644 index c9d0a9cbc69..00000000000 --- a/sql/updates/8510_world_spell_proc_event.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE spell_proc_event SET SpellFamilyMask0 = SpellFamilyMask0 | 0x40000000, procEx = ProcEx | 0x0000001 WHERE entry IN(53569,53576); diff --git a/sql/updates/8511_world_spell_proc_event.sql b/sql/updates/8511_world_spell_proc_event.sql deleted file mode 100644 index 91cc7841f97..00000000000 --- a/sql/updates/8511_world_spell_proc_event.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE spell_proc_event SET procEx = 0x0 WHERE entry IN(53569,53576); diff --git a/sql/updates/8512_world_command.sql b/sql/updates/8512_world_command.sql deleted file mode 100644 index 6293503d492..00000000000 --- a/sql/updates/8512_world_command.sql +++ /dev/null @@ -1,3 +0,0 @@ -DELETE FROM `command` WHERE `name`='reload creature_onkill_reputation'; -INSERT INTO `command` VALUES -('reload creature_onkill_reputation','3','Syntax: .reload creature_onkill_reputation\r\nReload creature_onkill_reputation table.'); diff --git a/sql/updates/8565_world_spell_proc_event.sql b/sql/updates/8565_world_spell_proc_event.sql deleted file mode 100644 index b4a378e458c..00000000000 --- a/sql/updates/8565_world_spell_proc_event.sql +++ /dev/null @@ -1,3 +0,0 @@ -DELETE FROM `spell_proc_event` WHERE `entry`=70761; -INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES -( 70761, 0x00, 10, 0x00000000, 0x80004000, 0x00000001, 0x00000400, 0x00000000, 0, 0, 0); -- Item - Paladin T10 Protection 4P Bonus diff --git a/sql/updates/8568_world_npc_vendor.sql b/sql/updates/8568_world_npc_vendor.sql deleted file mode 100644 index 63645847ef6..00000000000 --- a/sql/updates/8568_world_npc_vendor.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE npc_vendor CHANGE COLUMN `ExtendedCost` `ExtendedCost` mediumint(8) NOT NULL default '0' COMMENT 'negative if cost must exclude normal money cost'; diff --git a/sql/updates/8568_world_trinity_string.sql b/sql/updates/8568_world_trinity_string.sql deleted file mode 100644 index c4fdc2f8480..00000000000 --- a/sql/updates/8568_world_trinity_string.sql +++ /dev/null @@ -1,3 +0,0 @@ -DELETE FROM trinity_string WHERE entry IN (210); -INSERT INTO trinity_string VALUES -(210,'Item \'%i\' (with extended cost %i) already in vendor list.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); diff --git a/sql/updates/8575_world_command.sql b/sql/updates/8575_world_command.sql deleted file mode 100644 index 8175ad3d453..00000000000 --- a/sql/updates/8575_world_command.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM command WHERE name = 'reload conditions'; -INSERT INTO command (name, security, help) VALUES ('reload conditions', 3, 'Reload conditions table.'); diff --git a/sql/updates/8576_world_command.sql b/sql/updates/8576_world_command.sql deleted file mode 100644 index 4512dfe8a28..00000000000 --- a/sql/updates/8576_world_command.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM command WHERE name = 'reload spell_script_target'; diff --git a/sql/updates/8586_world_command.sql b/sql/updates/8586_world_command.sql deleted file mode 100644 index b554755df08..00000000000 --- a/sql/updates/8586_world_command.sql +++ /dev/null @@ -1,4 +0,0 @@ -DELETE FROM `command` WHERE `name` IN ('reload item_set_names','reload locales_item_set_name'); -INSERT INTO `command` VALUES -('reload item_set_names',3,'Syntax: .reload item_set_names\nReload item_set_names table.'), -('reload locales_item_set_name',3,'Syntax: .reload locales_item_set_name\nReload locales_item_set_name table.'); diff --git a/sql/updates/8586_world_item_set_names.sql b/sql/updates/8586_world_item_set_names.sql deleted file mode 100644 index f62df79678a..00000000000 --- a/sql/updates/8586_world_item_set_names.sql +++ /dev/null @@ -1,14 +0,0 @@ --- --- Table structure for table `item_set_names` --- - -DROP TABLE IF EXISTS `item_set_names`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `item_set_names` ( - `entry` mediumint(8) unsigned NOT NULL, - `name` varchar(255) character set utf8 NOT NULL default '', - `InventoryType` tinyint(3) unsigned NOT NULL default '0', - PRIMARY KEY (`entry`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; diff --git a/sql/updates/8586_world_locales_item_set_name.sql b/sql/updates/8586_world_locales_item_set_name.sql deleted file mode 100644 index 30d39f978a2..00000000000 --- a/sql/updates/8586_world_locales_item_set_name.sql +++ /dev/null @@ -1,20 +0,0 @@ --- --- Table structure for table `locales_item_set_name` --- - -DROP TABLE IF EXISTS `locales_item_set_name`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `locales_item_set_name` ( - `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', - `name_loc1` varchar(100) NOT NULL DEFAULT '', - `name_loc2` varchar(100) NOT NULL DEFAULT '', - `name_loc3` varchar(100) NOT NULL DEFAULT '', - `name_loc4` varchar(100) NOT NULL DEFAULT '', - `name_loc5` varchar(100) NOT NULL DEFAULT '', - `name_loc6` varchar(100) NOT NULL DEFAULT '', - `name_loc7` varchar(100) NOT NULL DEFAULT '', - `name_loc8` varchar(100) NOT NULL DEFAULT '', - PRIMARY KEY (`entry`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; diff --git a/sql/updates/8589_world_item_set_names.sql b/sql/updates/8589_world_item_set_names.sql deleted file mode 100644 index 2edcc160c65..00000000000 --- a/sql/updates/8589_world_item_set_names.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `item_set_names` ADD COLUMN `WDBVerified` smallint(5) signed NOT NULL DEFAULT '1'; diff --git a/sql/updates/8602_world_spell_proc_event.sql b/sql/updates/8602_world_spell_proc_event.sql deleted file mode 100644 index ce7873f3a83..00000000000 --- a/sql/updates/8602_world_spell_proc_event.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `spell_proc_event` SET `Cooldown`=30 WHERE `entry` IN (30886, 30885, 30884, 30883, 30881); diff --git a/sql/updates/8605_world_playercreateinfo_item.sql b/sql/updates/8605_world_playercreateinfo_item.sql deleted file mode 100644 index c5d423c1744..00000000000 --- a/sql/updates/8605_world_playercreateinfo_item.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `playercreateinfo_item` CHANGE `amount` `amount` tinyint(3) NOT NULL DEFAULT '1'; diff --git a/sql/updates/8607_world_pool_creature.sql b/sql/updates/8607_world_pool_creature.sql deleted file mode 100644 index 400e54cc6b5..00000000000 --- a/sql/updates/8607_world_pool_creature.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE `pool_creature` SET `description` = `comment` WHERE `comment` <> '' AND `comment` IS NOT NULL AND (`description` = '' OR `description` IS NULL); -ALTER TABLE `pool_creature` DROP COLUMN `comment`; diff --git a/sql/updates/8607_world_pool_template.sql b/sql/updates/8607_world_pool_template.sql deleted file mode 100644 index ac1cbf70223..00000000000 --- a/sql/updates/8607_world_pool_template.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE `pool_template` SET `description` = `comment` WHERE `comment` <> '' AND `comment` IS NOT NULL AND (`description` = '' OR `description` IS NULL); -ALTER TABLE `pool_template` DROP COLUMN `comment`; diff --git a/sql/updates/8625_world_pool_creature.sql b/sql/updates/8625_world_pool_creature.sql deleted file mode 100644 index ade35efe138..00000000000 --- a/sql/updates/8625_world_pool_creature.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `pool_creature` DROP PRIMARY KEY, ADD PRIMARY KEY (`guid`); diff --git a/sql/updates/8625_world_pool_gameobject.sql b/sql/updates/8625_world_pool_gameobject.sql deleted file mode 100644 index 720fbb76a0c..00000000000 --- a/sql/updates/8625_world_pool_gameobject.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `pool_gameobject` DROP PRIMARY KEY, ADD PRIMARY KEY (`guid`); diff --git a/sql/updates/8625_world_pool_pool.sql b/sql/updates/8625_world_pool_pool.sql deleted file mode 100644 index 1c8b9f3db8e..00000000000 --- a/sql/updates/8625_world_pool_pool.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `pool_pool` DROP PRIMARY KEY, ADD PRIMARY KEY (`pool_id`); diff --git a/sql/updates/8638_world_scriptname.sql b/sql/updates/8638_world_scriptname.sql deleted file mode 100644 index d3f357f43bf..00000000000 --- a/sql/updates/8638_world_scriptname.sql +++ /dev/null @@ -1,12 +0,0 @@ -update `creature_template` SET `scriptname`='mob_azure_invader' WHERE `entry`=30661; -- Azure Invader 1 -update `creature_template` SET `scriptname`='mob_azure_spellbreaker' WHERE `entry`=30662; -- Azure Spellbreaker -update `creature_template` SET `scriptname`='mob_azure_binder' WHERE `entry`=30663; -- Azure Binder 1 -update `creature_template` SET `scriptname`='mob_azure_mage_slayer' WHERE `entry`=30664; -- Azure Mage Slayer 1 -update `creature_template` SET `scriptname`='mob_azure_captain' WHERE `entry`=30666; -- Azure Captain -update `creature_template` SET `scriptname`='mob_azure_sorceror' WHERE `entry`=30667; -- Azure Sorceror -update `creature_template` SET `scriptname`='mob_azure_raider' WHERE `entry`=30668; -- Azure Raider -update `creature_template` SET `scriptname`='mob_azure_stalker' WHERE `entry`=32191; -- Azure Stalker -update `creature_template` SET `scriptname`='mob_azure_invader' WHERE `entry`=30961; -- Azure Invader 2 -update `creature_template` SET `scriptname`='mob_azure_spellbreaker' WHERE `entry`=30962; -- Azure Spellbreaker -update `creature_template` SET `scriptname`='mob_azure_binder' WHERE `entry`=30918; -- Azure Binder 2 -update `creature_template` SET `scriptname`='mob_azure_mage_slayer' WHERE `entry`=30963; -- Azure Mage Sl diff --git a/sql/updates/8658_world_spell_linked_spell.sql b/sql/updates/8658_world_spell_linked_spell.sql deleted file mode 100644 index 59e96ca2ac5..00000000000 --- a/sql/updates/8658_world_spell_linked_spell.sql +++ /dev/null @@ -1,3 +0,0 @@ -DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=20066; -INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES -(20066, -61840, 0, 'Repentance'); diff --git a/sql/updates/8671_world_spell_linked_spell.sql b/sql/updates/8671_world_spell_linked_spell.sql deleted file mode 100644 index d2572727e59..00000000000 --- a/sql/updates/8671_world_spell_linked_spell.sql +++ /dev/null @@ -1,6 +0,0 @@ -DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (54861,55004)AND `spell_effect` IN (-23335,-23333); -INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES -(54861,-23335,0, 'Drop Flag on Nitro Boost WSG'), -(54861,-23333,0, 'Drop Flag on Nitro Boost WSG'), -(55004,-23335,0, 'Drop Flag on Nitro Boost WSG'), -(55004,-23333,0, 'Drop Flag on Nitro Boost WSG'); diff --git a/sql/updates/8672_world_gossip_menu_option.sql b/sql/updates/8672_world_gossip_menu_option.sql deleted file mode 100644 index 2ba86951100..00000000000 --- a/sql/updates/8672_world_gossip_menu_option.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Drop forgotten fields after condition implementation -ALTER TABLE gossip_menu_option DROP COLUMN cond_3,DROP COLUMN cond_3_val_1,DROP COLUMN cond_3_val_2; diff --git a/sql/updates/8674_world_spell_dbc.sql b/sql/updates/8674_world_spell_dbc.sql deleted file mode 100644 index e1e9e8d2fe2..00000000000 --- a/sql/updates/8674_world_spell_dbc.sql +++ /dev/null @@ -1,4 +0,0 @@ --- Add serverside spells place holders for future development -DELETE FROM `spell_dbc` WHERE `Id`=39616; -INSERT INTO `spell_dbc` (`Id`,`Comment`) VALUES -(39616, 'Quest 10966 reward serverside spell'); diff --git a/sql/updates/8674_world_spell_linked_spell.sql b/sql/updates/8674_world_spell_linked_spell.sql deleted file mode 100644 index 1333c728a8a..00000000000 --- a/sql/updates/8674_world_spell_linked_spell.sql +++ /dev/null @@ -1,4 +0,0 @@ -DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (54861,55004)AND `spell_effect` IN (-34976); -INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES -( 54861,-34976, 0, 'Drop Flag on Nitro Boost EOS'), -( 55004,-34976, 0, 'Drop Flag on Nitro Boost EOS'); diff --git a/sql/updates/8694_world_transport_events.sql b/sql/updates/8694_world_transport_events.sql deleted file mode 100644 index 0e8786f777f..00000000000 --- a/sql/updates/8694_world_transport_events.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE IF EXISTS `transport_events`; diff --git a/sql/updates/8752_world_scriptname.sql b/sql/updates/8752_world_scriptname.sql deleted file mode 100644 index 03bc1bb354c..00000000000 --- a/sql/updates/8752_world_scriptname.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `creature_template` SET `scriptname`='mob_azure_saboteur' WHERE `entry`=31079; -- Azure Saboteur -- cgit v1.2.3 From 418360d8f9ccb458ab1f352434e1c79114a13bf3 Mon Sep 17 00:00:00 2001 From: Supabad Date: Mon, 28 Jun 2010 14:05:32 +0200 Subject: Add Hard Mode support to Flame Leviathan. more code cleanup. Big Thanks to all who participated. --HG-- branch : trunk --- sql/updates/8770_world_areatrigger_scripts.sql | 3 + sql/updates/8770_world_script_waypoints.sql | 8 + sql/updates/8770_world_scriptname.sql | 12 + .../Ulduar/ulduar/boss_flame_leviathan.cpp | 1013 ++++++++++++++++---- .../Northrend/Ulduar/ulduar/instance_ulduar.cpp | 34 +- 5 files changed, 876 insertions(+), 194 deletions(-) create mode 100644 sql/updates/8770_world_areatrigger_scripts.sql create mode 100644 sql/updates/8770_world_script_waypoints.sql create mode 100644 sql/updates/8770_world_scriptname.sql (limited to 'sql/updates') diff --git a/sql/updates/8770_world_areatrigger_scripts.sql b/sql/updates/8770_world_areatrigger_scripts.sql new file mode 100644 index 00000000000..158ad414759 --- /dev/null +++ b/sql/updates/8770_world_areatrigger_scripts.sql @@ -0,0 +1,3 @@ +INSERT INTO areatrigger_scripts VALUES +(5369,'at_RX_214_repair_o_matic_station'), +(5423,'at_RX_214_repair_o_matic_station'); \ No newline at end of file diff --git a/sql/updates/8770_world_script_waypoints.sql b/sql/updates/8770_world_script_waypoints.sql new file mode 100644 index 00000000000..a66c25db739 --- /dev/null +++ b/sql/updates/8770_world_script_waypoints.sql @@ -0,0 +1,8 @@ +-- waypoint for mimron inferno +INSERT INTO `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) VALUES +(33370, 1, 331.674, -68.6878, 409.804, 0, '0'), +(33370, 2, 274.578, -92.1829, 409.804, 0, '0'), +(33370, 3, 226.433, -66.6652, 409.793, 0, '0'), +(33370, 4, 206.092, -34.7447, 409.801, 0, '0'), +(33370, 5, 240.208, 1.10346, 409.802, 0, '0'), +(33370, 6, 337.199, 11.7051, 409.802, 0, '0'); \ No newline at end of file diff --git a/sql/updates/8770_world_scriptname.sql b/sql/updates/8770_world_scriptname.sql new file mode 100644 index 00000000000..95277633d0e --- /dev/null +++ b/sql/updates/8770_world_scriptname.sql @@ -0,0 +1,12 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_thorims_hammer' WHERE `entry` =33365; +UPDATE `creature_template` SET `MovementType` =2, `ScriptName` = 'npc_mimirons_inferno' WHERE `entry` =33370; +UPDATE `creature_template` SET `ScriptName` = 'npc_hodirs_fury' WHERE `entry` =33312; +UPDATE `creature_template` SET `ScriptName` = 'npc_freyas_ward' WHERE `entry` =33367; +UPDATE `creature_template` SET `ScriptName` = 'npc_lorekeeper' WHERE `entry` =33686; +UPDATE `creature_template` SET `ScriptName` = 'npc_brann_bronzebeard' WHERE `entry` =33579; +UPDATE `creature_template` SET `ScriptName` = 'npc_freya_ward_summon' WHERE `entry` =34275; +UPDATE `creature_template` SET `ScriptName` = 'npc_mechanolift' WHERE `entry` =33214; +UPDATE `gameobject_template` SET `ScriptName` = 'go_ulduar_tower' WHERE `entry` =194375; +UPDATE `gameobject_template` SET `ScriptName` = 'go_ulduar_tower' WHERE `entry` =194371; +UPDATE `gameobject_template` SET `ScriptName` = 'go_ulduar_tower' WHERE `entry` =194370; +UPDATE `gameobject_template` SET `ScriptName` = 'go_ulduar_tower' WHERE `entry` =194377; \ No newline at end of file diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp index 41509766bb3..c13ee5f5585 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp @@ -1,28 +1,29 @@ /* - * Copyright (C) 2008 - 2010 TrinityCore - * - * 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 - */ +* Copyright (C) 2008 - 2010 TrinityCore +* +* 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 +*/ /* - * Comment: Tower Event support is not finished, there is missing code on triggers and - * Lore Keeper and Brann Bronzebeard are not scripted yet. Lore Keeper's script - * should activate the hard mode so is not possible to play hard-mode yet. Add a call to - * Leviathan's DoAction(0) from Lore Keeper's script to activate hard-mode - */ +* Comment: there is missing code on triggers, +* brann bronzebeard needs correct gossip info. +* requires more work involving area triggers. +* if reached brann speaks through his radio.. +*/ +#include "ScriptedEscortAI.h" #include "ScriptPCH.h" #include "ulduar.h" #include "Vehicle.h" @@ -36,19 +37,32 @@ enum Spells SPELL_MISSILE_BARRAGE = 62400, SPELL_SYSTEMS_SHUTDOWN = 62475, - SPELL_FLAME_CANNON = 62395, -// SPELL_FLAME_CANNON = 64692, trigger the same spell - SPELL_OVERLOAD_CIRCUIT = 62399, + SPELL_START_THE_ENGINE = 62472, SPELL_SEARING_FLAME = 62402, SPELL_BLAZE = 62292, SPELL_SMOKE_TRAIL = 63575, SPELL_ELECTROSHOCK = 62522, - //TOWER BUFF SPELLS - SPELL_THORIM_S_HAMMER = 62912, // Tower of Storms - SPELL_MIMIRON_S_INFERNO = 62910, // Tower of Flames - SPELL_HODIR_S_FURY = 62297, // Tower of Frost - SPELL_FREYA_S_WARD = 62906 // Tower of Nature + //TOWER Additional SPELLS + SPELL_THORIM_S_HAMMER = 62911, // Tower of Storms + SPELL_MIMIRON_S_INFERNO = 62909, // Tower of Flames + SPELL_HODIR_S_FURY = 62533, // Tower of Frost + SPELL_FREYA_S_WARD = 62906, // Tower of Nature + SPELL_FREYA_SUMMONS = 62947, // Tower of Nature + //TOWER ap & health spells + SPELL_BUFF_TOWER_OF_STORMS = 65076, + SPELL_BUFF_TOWER_OF_FLAMES = 65075, + SPELL_BUFF_TOWER_OF_FR0ST = 65077, + SPELL_BUFF_TOWER_OF_LIFE = 64482, + //Additional Spells + SPELL_LASH = 65062, + SPELL_FREYA_S_WARD_EFFECT_1 = 62947, + SPELL_FREYA_S_WARD_EFFECT_2 = 62907, + SPELL_AUTO_REPAIR = 62705, + AURA_DUMMY_BLUE = 63294, + AURA_DUMMY_GREEN = 63295, + AURA_DUMMY_YELLOW = 63292, + SPELL_LIQUID_PYRITE = 62494, }; enum Creatures @@ -56,6 +70,25 @@ enum Creatures MOB_MECHANOLIFT = 33214, MOB_LIQUID = 33189, MOB_CONTAINER = 33218, + MOB_THORIM_BEACON = 33365, + MOB_MIMIRON_BEACON = 33370, + MOB_HODIR_BEACON = 33212, + MOB_FREYA_BEACON = 33367, + NPC_THORIM_TARGET_BEACON = 33364, + NPC_MIMIRON_TARGET_BEACON = 33369, + NPC_HODIR_TARGET_BEACON = 33108, + NPC_FREYA_TARGET_BEACON = 33366, + NPC_LOREKEEPER = 33686, //Hard mode starter + NPC_BRANZ_BRONZBEARD = 33579, + NPC_DELORAH = 33701, +}; + +enum Towers +{ + GO_TOWER_OF_STORMS = 194377, + GO_TOWER_OF_FLAMES = 194371, + GO_TOWER_OF_FROST = 194370, + GO_TOWER_OF_LIFE = 194375, }; enum Events @@ -66,10 +99,11 @@ enum Events EVENT_VENT, EVENT_SPEED, EVENT_SUMMON, + EVENT_SHUTDOWN, EVENT_THORIM_S_HAMMER, // Tower of Storms EVENT_MIMIRON_S_INFERNO, // Tower of Flames EVENT_HODIR_S_FURY, // Tower of Frost - EVENT_FREYA_S_WARD // Tower of Nature + EVENT_FREYA_S_WARD, // Tower of Nature }; enum Seats @@ -79,6 +113,17 @@ enum Seats SEAT_DEVICE = 2, }; +enum Vehicles +{ + VEHICLE_SIEGE = 33060, + VEHICLE_CHOPPER = 33062, + VEHICLE_DEMOLISHER = 33109, +}; + +#define EMOTE_PURSUE "Flame Leviathan pursues $N." +#define EMOTE_OVERLOAD "Flame Leviathan's circuits overloaded." +#define EMOTE_REPAIR "Automatic repair sequence initiated." + enum Yells { SAY_AGGRO = -1603060, @@ -101,24 +146,24 @@ enum Yells enum eAchievementData { - //ACHIEV_CHAMPION_OF_ULDUAR = 10042, - //ACHIEV_CONQUEROR_OF_ULDUAR = 10352, - ACHIEV_10_NUKED_FROM_ORBIT = 10058, - ACHIEV_25_NUKED_FROM_ORBIT = 10060, - ACHIEV_10_ORBITAL_BOMBARDMENT = 10056, - ACHIEV_25_ORBITAL_BOMBARDMENT = 10061, - ACHIEV_10_ORBITAL_DEVASTATION = 10057, - ACHIEV_25_ORBITAL_DEVASTATION = 10059, - ACHIEV_10_ORBIT_UARY = 10218, - ACHIEV_25_ORBIT_UARY = 10219, - ACHIEV_10_SHUTOUT = 10054, - ACHIEV_25_SHUTOUT = 10055, - ACHIEV_10_SIEGE_OF_ULDUAR = 9999, - ACHIEV_25_SIEGE_OF_ULDUAR = 10003, - //ACHIEV_10_THREE_CAR_GARAGE = 10046, 10047, 10048, - //ACHIEV_25_THREE_CAR_GARAGE = 10049, 10050, 10051, - ACHIEV_10_UNBROKEN = 10044, - ACHIEV_25_UNBROKEN = 10045, + //ACHIEV_CHAMPION_OF_ULDUAR = 2903, + //ACHIEV_CONQUEROR_OF_ULDUAR = 2904, + ACHIEV_10_NUKED_FROM_ORBIT = 2915, + ACHIEV_25_NUKED_FROM_ORBIT = 2917, + ACHIEV_10_ORBITAL_BOMBARDMENT = 2913, + ACHIEV_25_ORBITAL_BOMBARDMENT = 2918, + ACHIEV_10_ORBITAL_DEVASTATION = 2914, + ACHIEV_25_ORBITAL_DEVASTATION = 2916, + ACHIEV_10_ORBIT_UARY = 3056, + ACHIEV_25_ORBIT_UARY = 3057, + ACHIEV_10_SHUTOUT = 2911, + ACHIEV_25_SHUTOUT = 2912, + ACHIEV_10_SIEGE_OF_ULDUAR = 2886, + ACHIEV_25_SIEGE_OF_ULDUAR = 2887, + ACHIEV_10_THREE_CAR_GARAGE = 2907, //no core support for using a vehicle + ACHIEV_25_THREE_CAR_GARAGE = 2908, //no core support for using a vehicle + ACHIEV_10_UNBROKEN = 2905, + ACHIEV_25_UNBROKEN = 2906, }; static Position Center[]= @@ -126,38 +171,119 @@ static Position Center[]= {354.8771, -12.90240, 409.803650}, }; +const Position PosSiege[5] = +{ + {-814.59,-64.54,429.92,5.969}, + {-784.37,-33.31,429.92,5.096}, + {-808.99,-52.10,429.92,5.668}, + {-798.59,-44.00,429.92,5.663}, + {-812.83,-77.71,429.92,0.046}, +}; + +const Position PosChopper[5] = +{ + {-717.83,-106.56,430.02,0.122}, + {-717.83,-114.23,430.44,0.122}, + {-717.83,-109.70,430.22,0.122}, + {-718.45,-118.24,430.26,0.052}, + {-718.45,-123.58,430.41,0.085}, +}; + +const Position PosDemolisher[5] = +{ + {-724.12,-176.64,430.03,2.543}, + {-766.70,-225.03,430.50,1.710}, + {-729.54,-186.26,430.12,1.902}, + {-756.01,-219.23,430.50,2.369}, + {-798.01,-227.24,429.84,1.446}, +}; + struct boss_flame_leviathanAI : public BossAI { boss_flame_leviathanAI(Creature* pCreature) : BossAI(pCreature, TYPE_LEVIATHAN), vehicle(pCreature->GetVehicleKit()) { assert(vehicle); - - pInstance = pCreature->GetInstanceData(); + pInstance = me->GetInstanceData(); + uiActiveTowers = 4; + ActiveTowers = false; + towerOfStorms = false; + towerOfLife = false; + towerOfFlames = false; + towerOfFrost = false; + me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true); + me->ApplySpellImmune(0, IMMUNITY_ID, 49560, true); //deathgrip + + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED); + me->SetReactState(REACT_PASSIVE); } ScriptedInstance* pInstance; Vehicle* vehicle; uint8 uiActiveTowers; + bool ActiveTowers; + bool towerOfStorms; + bool towerOfLife; + bool towerOfFlames; + bool towerOfFrost; void Reset() { _Reset(); + /*me->SetLootMode(LOOT_MODE_HARD_MODE_4); + me->SetLootMode(LOOT_MODE_HARD_MODE_3); + me->SetLootMode(LOOT_MODE_HARD_MODE_2); + me->SetLootMode(LOOT_MODE_HARD_MODE_1);*/ + if (pInstance) + pInstance->SetData(TYPE_LEVIATHAN, NOT_STARTED); assert(vehicle); - uiActiveTowers = 0; - me->SetReactState(REACT_AGGRESSIVE); + me->GetVehicleKit(); + me->SetReactState(REACT_DEFENSIVE); } void EnterCombat(Unit* /*who*/) { _EnterCombat(); - DoScriptText(SAY_AGGRO, me); - me->SetReactState(REACT_DEFENSIVE); + pInstance->SetData(TYPE_LEVIATHAN, IN_PROGRESS); //_Reset doesnt do this correctly + me->SetReactState(REACT_AGGRESSIVE); events.ScheduleEvent(EVENT_PURSUE, 0); events.ScheduleEvent(EVENT_MISSILE, 1500); events.ScheduleEvent(EVENT_VENT, 20000); events.ScheduleEvent(EVENT_SPEED, 15000); events.ScheduleEvent(EVENT_SUMMON, 0); + if (ActiveTowers) + { + if (towerOfStorms) + { + me->AddAura(SPELL_BUFF_TOWER_OF_STORMS, me); + events.ScheduleEvent(EVENT_THORIM_S_HAMMER, 35000); + } + + if (towerOfFlames) + { + me->AddAura(SPELL_BUFF_TOWER_OF_FLAMES, me); + events.ScheduleEvent(EVENT_MIMIRON_S_INFERNO,70000); + } + + if (towerOfFrost) + { + me->AddAura(SPELL_BUFF_TOWER_OF_FR0ST, me); + events.ScheduleEvent(EVENT_HODIR_S_FURY, 105000); + } + + if (towerOfLife) + { + me->AddAura(SPELL_BUFF_TOWER_OF_LIFE, me); + events.ScheduleEvent(EVENT_FREYA_S_WARD, 140000); + } + + if (!towerOfLife && !towerOfFrost && !towerOfFlames && !towerOfStorms) + DoScriptText(SAY_TOWER_NONE, me); + else + DoScriptText(SAY_HARDMODE, me); + } + else + DoScriptText(SAY_AGGRO, me); if (Creature *turret = CAST_CRE(vehicle->GetPassenger(SEAT_TURRET))) turret->AI()->DoZoneInCombat(); @@ -170,39 +296,40 @@ struct boss_flame_leviathanAI : public BossAI AttackStart(pTarget); } + void JustDied(Unit* /*victim*/) { _JustDied(); + pInstance->SetData(TYPE_LEVIATHAN, DONE); //_Reset doesnt do this correctly DoScriptText(SAY_DEATH, me); - if (pInstance) + + if (ActiveTowers) { - if (uiActiveTowers) + switch (uiActiveTowers) { - switch (uiActiveTowers) - { - case 4: - pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBIT_UARY, ACHIEV_25_ORBIT_UARY)); - break; - case 3: - pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_NUKED_FROM_ORBIT, ACHIEV_25_NUKED_FROM_ORBIT)); - break; - case 2: - pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBITAL_DEVASTATION, ACHIEV_25_ORBITAL_DEVASTATION)); - break; - case 1: - pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBITAL_BOMBARDMENT, ACHIEV_25_ORBITAL_BOMBARDMENT)); - break; - } + case 4: + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBIT_UARY, ACHIEV_25_ORBIT_UARY)); + break; + case 3: + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_NUKED_FROM_ORBIT, ACHIEV_25_NUKED_FROM_ORBIT)); + break; + case 2: + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBITAL_DEVASTATION, ACHIEV_25_ORBITAL_DEVASTATION)); + break; + case 1: + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBITAL_BOMBARDMENT, ACHIEV_25_ORBITAL_BOMBARDMENT)); + break; } } } void SpellHit(Unit* /*caster*/, const SpellEntry* pSpell) { - if (pSpell->Id == 62472) + if (pSpell->Id == SPELL_START_THE_ENGINE) vehicle->InstallAllAccessories(); - else if (pSpell->Id == SPELL_ELECTROSHOCK) - me->InterruptSpell(CURRENT_CHANNELED_SPELL); + else + if (pSpell->Id == SPELL_ELECTROSHOCK) + me->InterruptSpell(CURRENT_CHANNELED_SPELL); } void UpdateAI(const uint32 diff) @@ -221,60 +348,104 @@ struct boss_flame_leviathanAI : public BossAI if (me->hasUnitState(UNIT_STAT_CASTING)) return; + if (me->HasAura(SPELL_SYSTEMS_SHUTDOWN)) + { + me->SetReactState(REACT_PASSIVE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); + return; + } + else + { + me->SetReactState(REACT_AGGRESSIVE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); + } + uint32 eventId = events.GetEvent(); if (!me->getVictim()) eventId = EVENT_PURSUE; switch(eventId) { - case 0: break; // this is a must - case EVENT_PURSUE: - DoCastAOE(SPELL_PURSUED, true); - //events.RepeatEvent(35000); // this should not be used because eventId may be overriden - events.RescheduleEvent(EVENT_PURSUE, 35000); - if (!me->getVictim()) // all siege engines and demolishers are dead - UpdateVictim(); // begin to kill other things - return; - case EVENT_MISSILE: - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM)) - DoCast(pTarget, SPELL_MISSILE_BARRAGE); - events.RepeatEvent(1500); - return; - case EVENT_VENT: - DoCastAOE(SPELL_FLAME_VENTS); - events.RepeatEvent(20000); - return; - case EVENT_SPEED: - DoCastAOE(SPELL_GATHERING_SPEED); - events.RepeatEvent(15000); - return; - case EVENT_SUMMON: - if (summons.size() < 15) // 4seat+1turret+10lift - if (Creature* pLift = DoSummonFlyer(MOB_MECHANOLIFT, me, urand(20,40), 50, 0)) - pLift->GetMotionMaster()->MoveRandom(100); - events.RepeatEvent(2000); - return; - case EVENT_THORIM_S_HAMMER: // Tower of Storms - DoCast(me, SPELL_THORIM_S_HAMMER); - events.RepeatEvent(urand(60000, 120000)); - return; - case EVENT_MIMIRON_S_INFERNO: // Tower of Flames - DoCast(me->getVictim(), SPELL_MIMIRON_S_INFERNO); - events.RepeatEvent(urand(60000, 120000)); - return; - case EVENT_HODIR_S_FURY: // Tower of Frost - DoCast(me->getVictim(), SPELL_HODIR_S_FURY); - events.RepeatEvent(urand(60000, 120000)); - return; - case EVENT_FREYA_S_WARD: // Tower of Nature - DoCast(me, SPELL_FREYA_S_WARD); - events.RepeatEvent(urand(60000, 120000)); - return; - default: - events.PopEvent(); - break; + case 0: break; // this is a must + case EVENT_PURSUE: + DoCastAOE(SPELL_PURSUED, true); + DoScriptText(RAND(SAY_TARGET_1, SAY_TARGET_2, SAY_TARGET_3), me); + events.RescheduleEvent(EVENT_PURSUE, 30000); + UpdateVictim(); // begin to kill other things + if (me->getVictim()) + me->MonsterTextEmote(EMOTE_PURSUE, me->getVictim()->GetGUID(), true); + return; + case EVENT_MISSILE: + if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM)) + DoCast(pTarget, SPELL_MISSILE_BARRAGE); + events.RepeatEvent(1500); + return; + case EVENT_VENT: + DoCastAOE(SPELL_FLAME_VENTS); + events.RepeatEvent(20000); + return; + case EVENT_SPEED: + DoCastAOE(SPELL_GATHERING_SPEED); + events.RepeatEvent(15000); + return; + case EVENT_SUMMON: + if (summons.size() < 15) // 4seat+1turret+10lift + if (Creature* pLift = DoSummonFlyer(MOB_MECHANOLIFT, me, urand(20,40), 50, 0)) + pLift->GetMotionMaster()->MoveRandom(100); + events.RepeatEvent(2000); + return; + case EVENT_SHUTDOWN: + DoScriptText(RAND(SAY_OVERLOAD_1, SAY_OVERLOAD_2, SAY_OVERLOAD_3), me); + me->MonsterTextEmote(EMOTE_OVERLOAD, 0, true); + DoCast(SPELL_SYSTEMS_SHUTDOWN); + me->RemoveAurasDueToSpell(SPELL_GATHERING_SPEED); + me->MonsterTextEmote(EMOTE_REPAIR, 0, true); + events.CancelEvent(EVENT_SHUTDOWN); + return; + case EVENT_THORIM_S_HAMMER: // Tower of Storms + for (uint8 i = 0; i < 7; ++i) + { + if (Creature* pThorim = DoSummon(MOB_THORIM_BEACON, me, urand(20,60), 20000, TEMPSUMMON_TIMED_DESPAWN)) + pThorim->GetMotionMaster()->MoveRandom(100); + } + DoScriptText(SAY_TOWER_STORM, me); + events.CancelEvent(EVENT_THORIM_S_HAMMER); + return; + case EVENT_MIMIRON_S_INFERNO: // Tower of Flames + me->SummonCreature(MOB_MIMIRON_BEACON, 390.93, -13.91, 409.81); + DoScriptText(SAY_TOWER_FLAME, me); + events.CancelEvent(EVENT_MIMIRON_S_INFERNO); + return; + case EVENT_HODIR_S_FURY: // Tower of Frost + for (uint8 i = 0; i < 7; ++i) + { + if (Creature* pHodir = DoSummon(MOB_HODIR_BEACON, me, 50, 0)) + pHodir->GetMotionMaster()->MoveRandom(100); + } + DoScriptText(SAY_TOWER_FROST, me); + events.CancelEvent(EVENT_HODIR_S_FURY); + return; + case EVENT_FREYA_S_WARD: // Tower of Nature + DoScriptText(SAY_TOWER_NATURE, me); + StartFreyaEvent(); + if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM)) + DoCast(pTarget, SPELL_FREYA_S_WARD); + events.CancelEvent(EVENT_FREYA_S_WARD); + return; + default: + events.PopEvent(); + break; } - DoSpellAttackIfReady(SPELL_BATTERING_RAM); + if (me->IsWithinMeleeRange(me->getVictim())) + DoSpellAttackIfReady(SPELL_BATTERING_RAM); + } + + void StartFreyaEvent()//summon these 4 on each corner wich wil spawn additional hostile mobs + { + me->SummonCreature(MOB_FREYA_BEACON, 377.02, -119.10, 409.81); + me->SummonCreature(MOB_FREYA_BEACON, 377.02, 54.78, 409.81); + me->SummonCreature(MOB_FREYA_BEACON, 185.62, 54.78, 409.81); + me->SummonCreature(MOB_FREYA_BEACON, 185.62, -119.10, 409.81); } void DoAction(const int32 uiAction) @@ -282,51 +453,62 @@ struct boss_flame_leviathanAI : public BossAI // Start encounter if (uiAction == 10) { - me->GetMotionMaster()->MovePoint(0, Center[0]); + me->SetHomePosition(354.8771, -12.90240, 409.803, 0); + me->GetMotionMaster()->MoveCharge(354.8771, -12.90240, 409.803); //position center me->SetReactState(REACT_AGGRESSIVE); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED); + DoZoneInCombat(); return; } - /* - Tower event triggers - General TODO: - Yells - - Actions: - DoAction(0): Activate hard-mode. Buff up leviathan's AP & health, schedule all the tower spells. - Should be triggered on Lore Keeper's script - DoAction(1-4): A tower have been destroyed, debuff leviathan's AP & health - DoAction(1); Tower of Storms has been destroyed, deschedule spell Thorim's Hammer - DoAction(2): Tower of Flames has been destroyed, deschedule spell Mimiron's Inferno - DoAction(3): Tower of Frost has been destroyed, deschedule spell Hodir's Fury - DoAction(4): Tower of Nature has been destroyed, deschedule spell Freya's Ward - */ - - if (uiAction) // Tower destruction, debuff leviathan AP & health + + if (uiAction && uiAction <= 4) // Tower destruction, debuff leviathan loot and reduce active tower { - --uiActiveTowers; + if (me->HasLootMode(31) && uiActiveTowers == 4) + { + me->RemoveLootMode(LOOT_MODE_HARD_MODE_4); + --uiActiveTowers; + } + if (me->HasLootMode(15) && uiActiveTowers == 3) + { + me->RemoveLootMode(LOOT_MODE_HARD_MODE_3); + --uiActiveTowers; + } + if (me->HasLootMode(7) && uiActiveTowers == 2) + { + me->RemoveLootMode(LOOT_MODE_HARD_MODE_2); + --uiActiveTowers; + } + if (me->HasLootMode(3) && uiActiveTowers == 1) + { + me->RemoveLootMode(LOOT_MODE_HARD_MODE_1); + --uiActiveTowers; + } } switch (uiAction) { - case 0: // Activate hard-mode - events.ScheduleEvent(EVENT_THORIM_S_HAMMER, urand(30000,60000)); - events.ScheduleEvent(EVENT_MIMIRON_S_INFERNO, urand(30000,60000)); - events.ScheduleEvent(EVENT_HODIR_S_FURY, urand(30000,60000)); - events.ScheduleEvent(EVENT_FREYA_S_WARD, urand(30000,60000)); - uiActiveTowers=4; + case 0: // Activate hard-mode setting counter to 4 towers, enable all towers apply buffs on levithian + ActiveTowers = true; + towerOfStorms = true; + towerOfLife = true; + towerOfFlames = true; + towerOfFrost = true; + me->SetLootMode(31); break; case 1: // Tower of Storms destroyed - events.CancelEvent(EVENT_THORIM_S_HAMMER); + towerOfStorms = false; break; case 2: // Tower of Flames destroyed - events.CancelEvent(EVENT_MIMIRON_S_INFERNO); + towerOfFlames = false; break; case 3: // Tower of Frost destroyed - events.CancelEvent(EVENT_HODIR_S_FURY); + towerOfFrost = false; break; case 4: // Tower of Nature destroyed - events.CancelEvent(EVENT_FREYA_S_WARD); + towerOfLife = false; + break; + case 9: // Schedule event + events.ScheduleEvent(EVENT_SHUTDOWN, 0); break; } } @@ -336,7 +518,7 @@ struct boss_flame_leviathanAI : public BossAI struct boss_flame_leviathan_seatAI : public PassiveAI { - boss_flame_leviathan_seatAI(Creature *c) : PassiveAI(c), vehicle(c->GetVehicleKit()) + boss_flame_leviathan_seatAI(Creature* pCreature) : PassiveAI(pCreature), vehicle(pCreature->GetVehicleKit()) { assert(vehicle); #ifdef BOSS_DEBUG @@ -377,17 +559,17 @@ struct boss_flame_leviathan_seatAI : public PassiveAI device->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } } - else if (seatId == SEAT_TURRET) - { - if (apply) - return; - - if (Unit* device = vehicle->GetPassenger(SEAT_DEVICE)) + else + if (seatId == SEAT_TURRET) { - device->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); - device->SetUInt32Value(UNIT_FIELD_FLAGS, 0); // unselectable + if (apply) + return; + if (Unit* device = vehicle->GetPassenger(SEAT_DEVICE)) + { + device->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); + device->SetUInt32Value(UNIT_FIELD_FLAGS, 0); // unselectable + } } - } } }; @@ -411,7 +593,12 @@ struct boss_flame_leviathan_defense_turretAI : public TurretAI struct boss_flame_leviathan_overload_deviceAI : public PassiveAI { - boss_flame_leviathan_overload_deviceAI(Creature* pCreature) : PassiveAI(pCreature) {} + boss_flame_leviathan_overload_deviceAI(Creature* pCreature) : PassiveAI(pCreature) + { + pInstance = pCreature->GetInstanceData(); + } + + ScriptedInstance *pInstance; void DoAction(const int32 param) { @@ -419,6 +606,7 @@ struct boss_flame_leviathan_overload_deviceAI : public PassiveAI { me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pInstance->instance->GetCreature(TYPE_LEVIATHAN)->AI()->DoAction(9); //should be called if all 3 overload devices are active if (me->GetVehicle()) { if (Unit* pPlayer = me->GetVehicle()->GetPassenger(SEAT_PLAYER)) @@ -435,28 +623,83 @@ struct boss_flame_leviathan_overload_deviceAI : public PassiveAI struct boss_flame_leviathan_safety_containerAI : public PassiveAI { - boss_flame_leviathan_safety_containerAI(Creature *c) : PassiveAI(c) {} + boss_flame_leviathan_safety_containerAI(Creature* pCreature) : PassiveAI(pCreature) + { + } + + void JustDied() + { + float x,y,z; + me->GetPosition(x,y,z); + z = me->GetMap()->GetHeight(x, y, z); + me->GetMotionMaster()->MovePoint(0,x,y,z); + me->GetMap()->CreatureRelocation(me, x,y,z,0); + } + + void UpdateAI(const uint32 diff) + { + } +}; +struct npc_mechanoliftAI : public PassiveAI +{ + npc_mechanoliftAI(Creature* pCreature) : PassiveAI(pCreature), vehicle(pCreature->GetVehicleKit()) + { + assert(vehicle); + } + + Vehicle* vehicle; + + uint32 MoveTimer; + + void Reset () + { + MoveTimer = 0; + me->GetMotionMaster()->MoveRandom(50); + } + + void JustDied(Unit* pKiller) + { + me->GetMotionMaster()->MoveTargetedHome(); + Creature* pLiquid = DoSummon(MOB_LIQUID, me, 0); + if (pLiquid) + { + pLiquid->CastSpell(pLiquid, SPELL_LIQUID_PYRITE, true); + pLiquid->GetMotionMaster()->MoveFall(pKiller->GetPositionZ()); + } + + } - void MovementInform(uint32 /*type*/, uint32 id) + void MovementInform(uint32 type, uint32 id) { - if (id == me->GetEntry()) + if (id == 1) { - if (Creature* pLiquid = DoSummon(MOB_LIQUID, me, 0)) - pLiquid->CastSpell(pLiquid, 62494, true); - me->DisappearAndDie(); // this will relocate creature to sky + Creature* pContainer = me->FindNearestCreature(MOB_CONTAINER, 5, true); + if (pContainer) + pContainer->EnterVehicle(me); } } - void UpdateAI(const uint32 /*diff*/) + void UpdateAI(const uint32 diff) { - if (!me->GetVehicle() && me->isSummon() && me->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE) - me->GetMotionMaster()->MoveFall(409.8f, me->GetEntry()); + if (MoveTimer <= diff) + { + if (me->GetVehicleKit()->HasEmptySeat(-1)) + { + Creature* pContainer = me->FindNearestCreature(MOB_CONTAINER, 50, true); + if (pContainer && !pContainer->GetVehicle()) + me->GetMotionMaster()->MovePoint(1,pContainer->GetPositionX(),pContainer->GetPositionY(),pContainer->GetPositionZ()); + } + MoveTimer = 30000; //check next 30 seconds + } + else + MoveTimer-=diff; } }; -struct spell_pool_of_tarAI : public TriggerAI + +struct spell_pool_of_tarAI : public PassiveAI { - spell_pool_of_tarAI(Creature *c) : TriggerAI(c) + spell_pool_of_tarAI(Creature* pCreature) : PassiveAI(pCreature) { me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } @@ -466,9 +709,9 @@ struct spell_pool_of_tarAI : public TriggerAI damage = 0; } - void SpellHit(Unit* /*caster*/, const SpellEntry *spell) + void SpellHit(Unit* /*caster*/, const SpellEntry* pSpell) { - if (spell->SchoolMask & SPELL_SCHOOL_MASK_FIRE && !me->HasAura(SPELL_BLAZE)) + if (pSpell->SchoolMask & SPELL_SCHOOL_MASK_FIRE && !me->HasAura(SPELL_BLAZE)) me->CastSpell(me, SPELL_BLAZE, true); } }; @@ -481,7 +724,6 @@ struct npc_colossusAI : public ScriptedAI } ScriptedInstance *pInstance; - Position pPos; void JustDied(Unit* /*Who*/) { @@ -494,11 +736,341 @@ struct npc_colossusAI : public ScriptedAI void UpdateAI(const uint32 diff) { + if (!UpdateVictim()) + return; + DoMeleeAttackIfReady() ; + } +}; + +struct npc_thorims_hammerAI : public ScriptedAI +{ + npc_thorims_hammerAI(Creature* pCreature) : ScriptedAI (pCreature) + { + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->AddAura(AURA_DUMMY_BLUE, me); + } + + void MoveInLineOfSight(Unit* who) + { + if (who->GetTypeId() == TYPEID_PLAYER && who->IsVehicle() && me->IsInRange(who,0,10,false)) + { + if (Creature* pTrigger = DoSummonFlyer(NPC_THORIM_TARGET_BEACON, me, 20, 0, 1000, TEMPSUMMON_TIMED_DESPAWN)) + pTrigger->CastSpell(who, SPELL_THORIM_S_HAMMER, true); + } + } + + void Reset () + { + } + + void UpdateAI(const uint32 diff) + { + if (!me->HasAura(AURA_DUMMY_BLUE)) + me->AddAura(AURA_DUMMY_BLUE, me); + + if (!UpdateVictim()) + return; + } +}; + +struct npc_mimirons_infernoAI : public npc_escortAI +{ + npc_mimirons_infernoAI(Creature* pCreature) : npc_escortAI(pCreature) + { + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->AddAura(AURA_DUMMY_YELLOW, me); + me->SetReactState(REACT_PASSIVE); + } + + void WaypointReached(uint32 i) + { + } + + void Reset() + { + infernoTimer = 2000; + } + + uint32 infernoTimer; + + void UpdateAI(const uint32 diff) + { + npc_escortAI::UpdateAI(diff); + + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + Start(false,true,0,NULL,false,true); + } + else + { + if(infernoTimer <= diff) + { + if (Creature* pTrigger = DoSummonFlyer(NPC_MIMIRON_TARGET_BEACON, me, 20, 0, 1000, TEMPSUMMON_TIMED_DESPAWN)) + { + pTrigger->CastSpell(me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(), SPELL_MIMIRON_S_INFERNO, true); + infernoTimer = 2000; + } + } + else + infernoTimer -= diff; + + if (!me->HasAura(AURA_DUMMY_YELLOW)) + me->AddAura(AURA_DUMMY_YELLOW, me); + } + } +}; + + +struct npc_hodirs_furyAI : public ScriptedAI +{ + npc_hodirs_furyAI(Creature* pCreature) : ScriptedAI (pCreature) + { + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->AddAura(AURA_DUMMY_GREEN, me); + } + + void MoveInLineOfSight(Unit* who) + { + if (who->GetTypeId() == TYPEID_PLAYER && who->IsVehicle() && me->IsInRange(who,0,5,false)) + { + if (Creature* pTrigger = DoSummonFlyer(NPC_HODIR_TARGET_BEACON, me, 20, 0, 1000, TEMPSUMMON_TIMED_DESPAWN)) + pTrigger->CastSpell(who, SPELL_HODIR_S_FURY, true); + } + } + + void Reset() + { + } + + void UpdateAI(const uint32 diff) + { + if (!me->HasAura(AURA_DUMMY_GREEN)) + me->AddAura(AURA_DUMMY_GREEN, me); + if (!UpdateVictim()) return; } }; +struct npc_freyas_wardAI : public ScriptedAI +{ + npc_freyas_wardAI(Creature* pCreature) : ScriptedAI(pCreature) + { + me->AddAura(AURA_DUMMY_GREEN, me); + } + + uint32 summonTimer ; + + void Reset() + { + summonTimer = 5000 ; + } + + void UpdateAI(const uint32 diff) + { + if(summonTimer <= diff) + { + DoCast(SPELL_FREYA_S_WARD_EFFECT_1) ; + DoCast(SPELL_FREYA_S_WARD_EFFECT_2) ; + summonTimer = 20000 ; + } + else + summonTimer -= diff ; + + if (!me->HasAura(AURA_DUMMY_GREEN)) + me->AddAura(AURA_DUMMY_GREEN, me); + + if (!UpdateVictim()) + return; + } +}; + +struct npc_freya_ward_summonAI : public ScriptedAI +{ + npc_freya_ward_summonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pCreature->GetMotionMaster()->MoveRandom(100); + } + + uint32 lashTimer ; + + void Reset() + { + lashTimer = 5000 ; + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + if(lashTimer <= diff) + { + DoCast(SPELL_LASH); + lashTimer = 20000; + } + else + lashTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; +//npc lore keeper +#define GOSSIP_ITEM_1 "Activate secondary defensive systems" +#define GOSSIP_ITEM_2 "Confirmed" +struct npc_lorekeeperAI : public ScriptedAI +{ + npc_lorekeeperAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = pCreature->GetInstanceData(); + } + + ScriptedInstance* pInstance; + + void DoAction(const int32 uiAction) + { + // Start encounter + if (uiAction == 0) + { + for(uint32 i = 0; i < (RAID_MODE(2,5)); ++i) + DoSummon(VEHICLE_SIEGE, PosSiege[i],3000,TEMPSUMMON_CORPSE_TIMED_DESPAWN); + for(uint32 i = 0; i < (RAID_MODE(2,5)); ++i) + DoSummon(VEHICLE_CHOPPER, PosChopper[i],3000,TEMPSUMMON_CORPSE_TIMED_DESPAWN); + for(uint32 i = 0; i < (RAID_MODE(2,5)); ++i) + DoSummon(VEHICLE_DEMOLISHER,PosDemolisher[i],3000,TEMPSUMMON_CORPSE_TIMED_DESPAWN); + return; + } + } +}; + +bool GossipHello_npc_lorekeeper(Player* pPlayer, Creature* pCreature) +{ + ScriptedInstance* pInstance = pCreature->GetInstanceData(); + if (pInstance && pInstance->GetData(TYPE_LEVIATHAN) !=DONE && pPlayer) + { + pPlayer->PrepareGossipMenu(pCreature); + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_1,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + } + return true; +} +//enable hardmode +bool GossipSelect_npc_lorekeeper(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) +{ + ScriptedInstance* pInstance = pCreature->GetInstanceData(); + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + if (pPlayer) + { + pPlayer->PrepareGossipMenu(pCreature); + pInstance->instance->LoadGrid(364,-16); //make sure leviathan is loaded + + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_2,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + } + break; + case GOSSIP_ACTION_INFO_DEF+2: + if (pPlayer) + pPlayer->CLOSE_GOSSIP_MENU(); + + if (Creature* pLeviathan = pInstance->instance->GetCreature(pInstance->GetData64(TYPE_LEVIATHAN))) + { + CAST_AI(boss_flame_leviathanAI, (pLeviathan->AI()))->DoAction(0); //enable hard mode activating the 4 additional events spawning additional vehicles + pCreature->SetVisibility(VISIBILITY_OFF); + pCreature->AI()->DoAction(0); // spawn the vehicles + pCreature->SetVisibility(VISIBILITY_OFF); + if (Creature* Delorah = pCreature->FindNearestCreature(NPC_DELORAH, 1000, true)) + { + if (Creature* Branz = pCreature->FindNearestCreature(NPC_BRANZ_BRONZBEARD, 1000, true)) + { + Delorah->GetMotionMaster()->MovePoint(0, Branz->GetPositionX()-4, Branz->GetPositionY(), Branz->GetPositionZ()); + //TODO DoScriptText(xxxx, Delorah, Branz); when reached at branz + } + } + } + break; + } + return true; +} +////npc_brann_bronzebeard this requires more work involving area triggers. if reached this guy speaks through his radio.. +//#define GOSSIP_ITEM_1 "xxxxx" +//#define GOSSIP_ITEM_2 "xxxxx" +// +//bool GossipHello_npc_brann_bronzebeard(Player* pPlayer, Creature* pCreature) +//{ +// ScriptedInstance* pInstance = pCreature->GetInstanceData(); +// if (pInstance && pInstance->GetData(TYPE_LEVIATHAN) !=DONE) +// { +// pPlayer->PrepareGossipMenu(pCreature); +// +// pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_1,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); +// pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); +// } +// return true; +//} +// +//bool GossipSelect_npc_brann_bronzebeard(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) +//{ +// switch(uiAction) +// { +// case GOSSIP_ACTION_INFO_DEF+1: +// if (pPlayer) +// { +// pPlayer->PrepareGossipMenu(pCreature); +// +// pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_2,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+2); +// pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); +// } +// break; +// case GOSSIP_ACTION_INFO_DEF+2: +// if (pPlayer) +// pPlayer->CLOSE_GOSSIP_MENU(); +// if (Creature* Lorekeeper = pCreature->FindNearestCreature(NPC_LOREKEEPER, 1000, true)) //lore keeper of lorgannon +// Lorekeeper->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); +// break; +// } +// return true; +//} + +void GODestroyed_go_ulduar_tower(Player* pPlayer, GameObject* pGO, uint32 value) +{ + ScriptedInstance* pInstance = pGO->GetInstanceData(); + if (pGO->GetGOValue()->building.health == 0) + { + switch(pGO->GetEntry()) + { + case GO_TOWER_OF_STORMS: + pInstance->ProcessEvent(pGO, EVENT_TOWER_OF_STORM_DESTROYED); + break; + case GO_TOWER_OF_FLAMES: + pInstance->ProcessEvent(pGO, EVENT_TOWER_OF_FLAMES_DESTROYED); + break; + case GO_TOWER_OF_FROST: + pInstance->ProcessEvent(pGO, EVENT_TOWER_OF_FROST_DESTROYED); + break; + case GO_TOWER_OF_LIFE: + pInstance->ProcessEvent(pGO, EVENT_TOWER_OF_LIFE_DESTROYED); + break; + } + } +} + +bool AreaTrigger_at_RX_214_repair_o_matic_station(Player* pPlayer, const AreaTriggerEntry* pAt) +{ + if(Creature* vehicle = pPlayer->GetVehicleCreatureBase()) + { + if(!vehicle->HasAura(SPELL_AUTO_REPAIR)) + { + pPlayer->MonsterTextEmote(EMOTE_REPAIR, pPlayer->GetGUID(), true); + pPlayer->CastSpell(vehicle, SPELL_AUTO_REPAIR, true); + } + } + return true; +} + CreatureAI* GetAI_boss_flame_leviathan(Creature* pCreature) { return new boss_flame_leviathanAI (pCreature); @@ -519,11 +1091,16 @@ CreatureAI* GetAI_boss_flame_leviathan_overload_device(Creature* pCreature) return new boss_flame_leviathan_overload_deviceAI (pCreature); } -CreatureAI* GetAI_boss_flame_leviathan_safety_containerAI(Creature* pCreature) +CreatureAI* GetAI_boss_flame_leviathan_safety_container(Creature* pCreature) { return new boss_flame_leviathan_safety_containerAI(pCreature); } +CreatureAI* GetAI_npc_mechanolift(Creature* pCreature) +{ + return new npc_mechanoliftAI(pCreature); +} + CreatureAI* GetAI_spell_pool_of_tar(Creature* pCreature) { return new spell_pool_of_tarAI (pCreature); @@ -534,6 +1111,35 @@ CreatureAI* GetAI_npc_colossus(Creature* pCreature) return new npc_colossusAI(pCreature); } +CreatureAI* GetAI_npc_thorims_hammer(Creature* pCreature) +{ + return new npc_thorims_hammerAI(pCreature); +} + +CreatureAI* GetAI_npc_mimirons_inferno(Creature* pCreature) +{ + return new npc_mimirons_infernoAI(pCreature); +} + +CreatureAI* GetAI_npc_hodirs_fury(Creature* pCreature) +{ + return new npc_hodirs_furyAI(pCreature); +} + +CreatureAI* GetAI_npc_freyas_ward(Creature* pCreature) +{ + return new npc_freyas_wardAI(pCreature); +} + +CreatureAI* GetAI_npc_freya_ward_summon(Creature* pCreature) +{ + return new npc_freya_ward_summonAI (pCreature); +} +CreatureAI* GetAI_npc_lorekeeper(Creature* pCreature) +{ + return new npc_lorekeeperAI (pCreature); +} + void AddSC_boss_flame_leviathan() { Script *newscript; @@ -559,7 +1165,12 @@ void AddSC_boss_flame_leviathan() newscript = new Script; newscript->Name = "boss_flame_leviathan_safety_container"; - newscript->GetAI = &GetAI_boss_flame_leviathan_safety_containerAI; + newscript->GetAI = &GetAI_boss_flame_leviathan_safety_container; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_mechanolift"; + newscript->GetAI = &GetAI_npc_mechanolift; newscript->RegisterSelf(); newscript = new Script; @@ -571,4 +1182,52 @@ void AddSC_boss_flame_leviathan() newscript->Name = "npc_colossus"; newscript->GetAI = &GetAI_npc_colossus; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_thorims_hammer"; + newscript->GetAI = &GetAI_npc_thorims_hammer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_mimirons_inferno"; + newscript->GetAI = &GetAI_npc_mimirons_inferno; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_hodirs_fury"; + newscript->GetAI = &GetAI_npc_hodirs_fury; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_freyas_ward"; + newscript->GetAI = &GetAI_npc_freyas_ward; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_freya_ward_summon"; + newscript->GetAI = &GetAI_npc_freya_ward_summon; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_lorekeeper"; + newscript->GetAI = &GetAI_npc_lorekeeper; + newscript->pGossipHello = &GossipHello_npc_lorekeeper; + newscript->pGossipSelect = &GossipSelect_npc_lorekeeper; + newscript->RegisterSelf(); + + /*newscript = new Script; + newscript->Name = "npc_brann_bronzebeard"; + newscript->pGossipHello = &GossipHello_npc_brann_bronzebeard; + newscript->pGossipSelect = &GossipSelect_npc_brann_bronzebeard; + newscript->RegisterSelf();*/ + + newscript = new Script; + newscript->Name = "go_ulduar_tower"; + newscript->pGODestroyed = &GODestroyed_go_ulduar_tower; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "at_RX_214_repair_o_matic_station"; + newscript->pAreaTrigger = &AreaTrigger_at_RX_214_repair_o_matic_station; + newscript->RegisterSelf(); } diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp index 5f9566d0840..ad6beb5ba51 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp @@ -16,6 +16,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "ScriptedEscortAI.h" #include "ScriptPCH.h" #include "ulduar.h" @@ -64,8 +65,7 @@ struct instance_ulduar : public ScriptedInstance uint64 uiFreyaChestGUID; void Initialize() - { - uiLeviathanGUID = 0; + { uiIgnisGUID = 0; uiRazorscaleGUID = 0; uiXT002GUID = 0; @@ -106,7 +106,7 @@ struct instance_ulduar : public ScriptedInstance switch(pCreature->GetEntry()) { case NPC_LEVIATHAN: - uiLeviathanGUID = pCreature->GetGUID(); + uiLeviathanGUID = pCreature->GetGUID(); break; case NPC_IGNIS: uiIgnisGUID = pCreature->GetGUID(); @@ -187,22 +187,24 @@ struct instance_ulduar : public ScriptedInstance if (flag == 7) flag =0; break; - case GO_LEVIATHAN_GATE: - uiLeviathanGateGUID = pGO->GetGUID(); - HandleGameObject(NULL, false, pGO); - break; + case GO_LEVIATHAN_GATE: + uiLeviathanGateGUID = add ? pGO->GetGUID() : NULL; + HandleGameObject(NULL, false, pGO); + break; } } void ProcessEvent(GameObject* pGO, uint32 uiEventId) { // Flame Leviathan's Tower Event triggers - Creature* pFlameLeviathan = instance->GetCreature(NPC_LEVIATHAN); + Creature* pFlameLeviathan = instance->GetCreature(uiLeviathanGUID); + if (pFlameLeviathan && pFlameLeviathan->isAlive()) //No leviathan, no event triggering ;) switch(uiEventId) { case EVENT_TOWER_OF_STORM_DESTROYED: - pFlameLeviathan->AI()->DoAction(1); + //pGO->GetInstanceData()->SetData(DATA_TOWER_STORMS,DESTROYED); + pFlameLeviathan->AI()->DoAction(1); break; case EVENT_TOWER_OF_FROST_DESTROYED: pFlameLeviathan->AI()->DoAction(2); @@ -210,7 +212,7 @@ struct instance_ulduar : public ScriptedInstance case EVENT_TOWER_OF_FLAMES_DESTROYED: pFlameLeviathan->AI()->DoAction(3); break; - case EVENT_TOWER_OF_NATURE_DESTROYED: + case EVENT_TOWER_OF_LIFE_DESTROYED: pFlameLeviathan->AI()->DoAction(4); break; } @@ -218,9 +220,6 @@ struct instance_ulduar : public ScriptedInstance void SetData(uint32 type, uint32 data) { - if (type != TYPE_COLOSSUS) - uiEncounter[type] = data; - switch(type) { /*case TYPE_IGNIS: @@ -235,12 +234,12 @@ struct instance_ulduar : public ScriptedInstance case TYPE_LEVIATHAN: if (data == IN_PROGRESS) { - for (uint8 uiI = 0; uiI < 7; uiI++) + for (uint8 uiI = 0; uiI < 7; ++uiI) HandleGameObject(uiLeviathanDoor[uiI],false); } else { - for (uint8 uiI = 0; uiI < 7; uiI++) + for (uint8 uiI = 0; uiI < 7; ++uiI) HandleGameObject(uiLeviathanDoor[uiI],true); } break; @@ -265,14 +264,15 @@ struct instance_ulduar : public ScriptedInstance pGO->SetRespawnTime(pGO->GetRespawnDelay()); break; case TYPE_COLOSSUS: + uiEncounter[TYPE_COLOSSUS] = data; if (data == 2) { if (Creature* pBoss = instance->GetCreature(uiLeviathanGUID)) pBoss->AI()->DoAction(10); if (GameObject* pGate = instance->GetGameObject(uiLeviathanGateGUID)) - pGate->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); + pGate->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); } - break; + break; default: break; } -- cgit v1.2.3 From bb9ad496669d701d5f015de7b48233ef06cf4768 Mon Sep 17 00:00:00 2001 From: teacher Date: Tue, 29 Jun 2010 13:22:56 +0200 Subject: Added missing data to fulls and better format for sql update files. --HG-- branch : trunk --- sql/scripts/world_script_waypoints.sql | 10 ++++++++++ sql/scripts/world_scripts_full.sql | 17 ++++++++++++++++- sql/updates/8770_world_areatrigger_scripts.sql | 7 ++++--- sql/updates/8770_world_script_waypoints.sql | 5 +++-- sql/updates/8770_world_scriptname.sql | 24 ++++++++++++------------ 5 files changed, 45 insertions(+), 18 deletions(-) (limited to 'sql/updates') diff --git a/sql/scripts/world_script_waypoints.sql b/sql/scripts/world_script_waypoints.sql index 1c2dfe09eb4..3a5734d6d0e 100644 --- a/sql/scripts/world_script_waypoints.sql +++ b/sql/scripts/world_script_waypoints.sql @@ -2257,3 +2257,13 @@ INSERT INTO `script_waypoint` (`entry`, `pointid`, `location_x`,`location_y`, `l (12717, 27, 3621.08, 1138.11, 10.369, 0, 'SAY_MUG_RETURN'), (12717, 28, 3615.48, 1145.53, 9.614, 0, ''), (12717, 29, 3607.19, 1152.72, 8.871, 0, ''); + +-- Waypoints for Mimiron Inferno +DELETE FROM `script_waypoint` WHERE `entry`=33370; +INSERT INTO `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) VALUES +(33370, 1, 331.674, -68.6878, 409.804, 0, '0'), +(33370, 2, 274.578, -92.1829, 409.804, 0, '0'), +(33370, 3, 226.433, -66.6652, 409.793, 0, '0'), +(33370, 4, 206.092, -34.7447, 409.801, 0, '0'), +(33370, 5, 240.208, 1.10346, 409.802, 0, '0'), +(33370, 6, 337.199, 11.7051, 409.802, 0, '0'); diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql index eb99451c348..2ec85dd2b47 100644 --- a/sql/scripts/world_scripts_full.sql +++ b/sql/scripts/world_scripts_full.sql @@ -36,7 +36,9 @@ INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES (1737, 'at_scent_larkorwi'), (1738, 'at_scent_larkorwi'), (1739, 'at_scent_larkorwi'), -(1740, 'at_scent_larkorwi'); +(1740, 'at_scent_larkorwi'), +(5369, 'at_RX_214_repair_o_matic_station'), +(5423, 'at_RX_214_repair_o_matic_station'); /* WORLD BOSS */ @@ -1430,6 +1432,19 @@ UPDATE `creature_template` SET `ScriptName`='boss_kologarn' WHERE `entry`=32930; UPDATE `creature_template` SET `ScriptName`='boss_algalon' WHERE `entry`=32871; UPDATE `creature_template` SET `ScriptName`='mob_collapsing_star' WHERE `entry`=32955; UPDATE `gameobject_template` SET `ScriptName`='ulduar_teleporter' WHERE `entry`=194569; +UPDATE `creature_template` SET `ScriptName`= 'npc_thorims_hammer' WHERE `entry`=33365; +UPDATE `creature_template` SET `ScriptName`= 'npc_mimirons_inferno' WHERE `entry`=33370; +UPDATE `creature_template` SET `ScriptName`= 'npc_hodirs_fury' WHERE `entry`=33312; +UPDATE `creature_template` SET `ScriptName`= 'npc_freyas_ward' WHERE `entry`=33367; +UPDATE `creature_template` SET `ScriptName`= 'npc_lorekeeper' WHERE `entry`=33686; +UPDATE `creature_template` SET `ScriptName`= 'npc_brann_bronzebeard' WHERE `entry`=33579; +UPDATE `creature_template` SET `ScriptName`= 'npc_freya_ward_summon' WHERE `entry`=34275; +UPDATE `creature_template` SET `ScriptName`= 'npc_mechanolift' WHERE `entry`=33214; +UPDATE `gameobject_template` SET `ScriptName`= 'go_ulduar_tower' WHERE `entry`=194375; +UPDATE `gameobject_template` SET `ScriptName`= 'go_ulduar_tower' WHERE `entry`=194371; +UPDATE `gameobject_template` SET `ScriptName`= 'go_ulduar_tower' WHERE `entry`=194370; +UPDATE `gameobject_template` SET `ScriptName`= 'go_ulduar_tower' WHERE `entry`=194377; + /* UN'GORO CRATER */ UPDATE `creature_template` SET `ScriptName`='npc_ame' WHERE `entry`=9623; diff --git a/sql/updates/8770_world_areatrigger_scripts.sql b/sql/updates/8770_world_areatrigger_scripts.sql index 158ad414759..044725b3a5f 100644 --- a/sql/updates/8770_world_areatrigger_scripts.sql +++ b/sql/updates/8770_world_areatrigger_scripts.sql @@ -1,3 +1,4 @@ -INSERT INTO areatrigger_scripts VALUES -(5369,'at_RX_214_repair_o_matic_station'), -(5423,'at_RX_214_repair_o_matic_station'); \ No newline at end of file +DELETE FROM `areatrigger_scripts` WHERE `entry` IN (5369,5423); +INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES +(5369, 'at_RX_214_repair_o_matic_station'), +(5423, 'at_RX_214_repair_o_matic_station'); diff --git a/sql/updates/8770_world_script_waypoints.sql b/sql/updates/8770_world_script_waypoints.sql index a66c25db739..c2418f6da33 100644 --- a/sql/updates/8770_world_script_waypoints.sql +++ b/sql/updates/8770_world_script_waypoints.sql @@ -1,8 +1,9 @@ --- waypoint for mimron inferno +-- Waypoints for Mimron Inferno +DELETE FROM `script_waypoint` WHERE `entry`=33370; INSERT INTO `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) VALUES (33370, 1, 331.674, -68.6878, 409.804, 0, '0'), (33370, 2, 274.578, -92.1829, 409.804, 0, '0'), (33370, 3, 226.433, -66.6652, 409.793, 0, '0'), (33370, 4, 206.092, -34.7447, 409.801, 0, '0'), (33370, 5, 240.208, 1.10346, 409.802, 0, '0'), -(33370, 6, 337.199, 11.7051, 409.802, 0, '0'); \ No newline at end of file +(33370, 6, 337.199, 11.7051, 409.802, 0, '0'); diff --git a/sql/updates/8770_world_scriptname.sql b/sql/updates/8770_world_scriptname.sql index 95277633d0e..e173f7e41f2 100644 --- a/sql/updates/8770_world_scriptname.sql +++ b/sql/updates/8770_world_scriptname.sql @@ -1,12 +1,12 @@ -UPDATE `creature_template` SET `ScriptName` = 'npc_thorims_hammer' WHERE `entry` =33365; -UPDATE `creature_template` SET `MovementType` =2, `ScriptName` = 'npc_mimirons_inferno' WHERE `entry` =33370; -UPDATE `creature_template` SET `ScriptName` = 'npc_hodirs_fury' WHERE `entry` =33312; -UPDATE `creature_template` SET `ScriptName` = 'npc_freyas_ward' WHERE `entry` =33367; -UPDATE `creature_template` SET `ScriptName` = 'npc_lorekeeper' WHERE `entry` =33686; -UPDATE `creature_template` SET `ScriptName` = 'npc_brann_bronzebeard' WHERE `entry` =33579; -UPDATE `creature_template` SET `ScriptName` = 'npc_freya_ward_summon' WHERE `entry` =34275; -UPDATE `creature_template` SET `ScriptName` = 'npc_mechanolift' WHERE `entry` =33214; -UPDATE `gameobject_template` SET `ScriptName` = 'go_ulduar_tower' WHERE `entry` =194375; -UPDATE `gameobject_template` SET `ScriptName` = 'go_ulduar_tower' WHERE `entry` =194371; -UPDATE `gameobject_template` SET `ScriptName` = 'go_ulduar_tower' WHERE `entry` =194370; -UPDATE `gameobject_template` SET `ScriptName` = 'go_ulduar_tower' WHERE `entry` =194377; \ No newline at end of file +UPDATE `creature_template` SET `ScriptName`= 'npc_thorims_hammer' WHERE `entry`=33365; +UPDATE `creature_template` SET `ScriptName`= 'npc_mimirons_inferno' WHERE `entry`=33370; +UPDATE `creature_template` SET `ScriptName`= 'npc_hodirs_fury' WHERE `entry`=33312; +UPDATE `creature_template` SET `ScriptName`= 'npc_freyas_ward' WHERE `entry`=33367; +UPDATE `creature_template` SET `ScriptName`= 'npc_lorekeeper' WHERE `entry`=33686; +UPDATE `creature_template` SET `ScriptName`= 'npc_brann_bronzebeard' WHERE `entry`=33579; +UPDATE `creature_template` SET `ScriptName`= 'npc_freya_ward_summon' WHERE `entry`=34275; +UPDATE `creature_template` SET `ScriptName`= 'npc_mechanolift' WHERE `entry`=33214; +UPDATE `gameobject_template` SET `ScriptName`= 'go_ulduar_tower' WHERE `entry`=194375; +UPDATE `gameobject_template` SET `ScriptName`= 'go_ulduar_tower' WHERE `entry`=194371; +UPDATE `gameobject_template` SET `ScriptName`= 'go_ulduar_tower' WHERE `entry`=194370; +UPDATE `gameobject_template` SET `ScriptName`= 'go_ulduar_tower' WHERE `entry`=194377; -- cgit v1.2.3 From 20225b4eab18023a25e6ec38a641eba9f1c713ca Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 29 Jun 2010 13:32:07 +0200 Subject: Make table names more consistent (item_set_names and locale) --HG-- branch : trunk --- sql/base/world_database.sql | 14 +++++++------- sql/updates/8790_world_locales_item_set_names.sql | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 sql/updates/8790_world_locales_item_set_names.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index dfbf1b38bba..89bd879ea7b 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -3095,13 +3095,13 @@ LOCK TABLES `locales_item` WRITE; UNLOCK TABLES; -- --- Table structure for table `locales_item_set_name` +-- Table structure for table `locales_item_set_names` -- -DROP TABLE IF EXISTS `locales_item_set_name`; +DROP TABLE IF EXISTS `locales_item_set_names`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `locales_item_set_name` ( +CREATE TABLE `locales_item_set_names` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `name_loc1` varchar(100) NOT NULL DEFAULT '', `name_loc2` varchar(100) NOT NULL DEFAULT '', @@ -3116,12 +3116,12 @@ CREATE TABLE `locales_item_set_name` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Dumping data for table `locales_item_set_name` +-- Dumping data for table `locales_item_set_names` -- -LOCK TABLES `locales_item_set_name` WRITE; -/*!40000 ALTER TABLE `locales_item_set_name` DISABLE KEYS */; -/*!40000 ALTER TABLE `locales_item_set_name` ENABLE KEYS */; +LOCK TABLES `locales_item_set_names` WRITE; +/*!40000 ALTER TABLE `locales_item_set_names` DISABLE KEYS */; +/*!40000 ALTER TABLE `locales_item_set_names` ENABLE KEYS */; UNLOCK TABLES; -- diff --git a/sql/updates/8790_world_locales_item_set_names.sql b/sql/updates/8790_world_locales_item_set_names.sql new file mode 100644 index 00000000000..3e6abb652ae --- /dev/null +++ b/sql/updates/8790_world_locales_item_set_names.sql @@ -0,0 +1 @@ +RENAME TABLE `locales_item_set_name` TO `locales_item_set_names`; -- cgit v1.2.3 From fe1caeefc06870ee648b5a4c680b52b0946eeced Mon Sep 17 00:00:00 2001 From: Tartalo Date: Wed, 30 Jun 2010 19:02:20 +0200 Subject: Obsidian Sanctum: Many improvements & fixes, by moriquendu Closes issue #1278 Closes issue #2505 Finally I make some time to review & push this change. Thanks for the patience --HG-- branch : trunk --- sql/updates/8806_spell_script_target.sql | 5 + .../Northrend/ObsidianSanctum/boss_sartharion.cpp | 553 +++++++++++++++------ .../ObsidianSanctum/instance_obsidian_sanctum.cpp | 36 ++ .../Northrend/ObsidianSanctum/obsidian_sanctum.h | 19 + 4 files changed, 474 insertions(+), 139 deletions(-) create mode 100644 sql/updates/8806_spell_script_target.sql (limited to 'sql/updates') diff --git a/sql/updates/8806_spell_script_target.sql b/sql/updates/8806_spell_script_target.sql new file mode 100644 index 00000000000..e84bfcc83d9 --- /dev/null +++ b/sql/updates/8806_spell_script_target.sql @@ -0,0 +1,5 @@ +-- Limit Flame Tsunami buff to Lava Blazes only +DELETE FROM spell_script_target WHERE entry = 60430; +INSERT INTO spell_script_target (entry, type, targetEntry) VALUES + (60430, 1, 30643), + (60430, 1, 31317); diff --git a/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp index 37dbce59c74..4992e325849 100644 --- a/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp +++ b/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp @@ -1,5 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * Copyright (C) 2006 - 2010 TrinityCore +/* Copyright (C) 2009 - 2010 TrinityCore * 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 @@ -53,6 +52,7 @@ enum eEnums 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, + NPC_FIRE_CYCLONE = 30648, SPELL_PYROBUFFET = 56916, // currently used for hard enrage after 15 minutes SPELL_PYROBUFFET_RANGE = 58907, // possibly used when player get too far away from dummy creatures (2x Creature entry 30494) @@ -101,6 +101,7 @@ enum eEnums SPELL_HATCH_EGGS_EFFECT = 58685, NPC_TWILIHT_WHELP = 31214, NPC_TWILIGHT_EGG = 30882, + NPC_SARTHARION_TWILIGHT_EGG = 31204, //Whelps NPC_TWILIGHT_WHELP = 30890, @@ -110,7 +111,10 @@ enum eEnums //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 + + SPELL_FLAME_TSUNAMI_DMG_AURA = 57491, // periodic damage, npc has this aura + SPELL_FLAME_TSUNAMI_BUFF = 60430, + NPC_FLAME_TSUNAMI = 30616, // for the flame waves NPC_LAVA_BLAZE = 30643, // adds spawning from flame strike @@ -132,6 +136,7 @@ struct Waypoint { float m_fX, m_fY, m_fZ; }; + struct Location { float x,y,z; @@ -171,20 +176,22 @@ Waypoint m_aDragonCommon[MAX_WAYPOINT]= {3250.479, 585.827, 98.652}, {3209.969, 566.523, 98.652} }; -static Location FlameRight1Spawn = { 3197.59, 495.336, 57.8462 }; -static Location FlameRight1Direction = { 3289.28, 521.569, 55.1526 }; -static Location FlameRight2Spawn = { 3201.94, 543.324, 56.7209 }; -static Location FlameRight2Direction = { 3288.98, 549.291, 55.1232 }; -static Location FlameLeft1Spawn = { 3290.24, 521.725, 55.1238 }; -static Location FlameLeft1Direction = { 3199.94, 516.891, 57.5112 }; -static Location FlameLeft2Spawn = { 3290.33, 586.51, 55.063 }; -static Location FlameLeft2Direction = { 3195.03, 479.135, 55.6331 }; - -static Location AcolyteofShadron = { 3363.92, 534.703, 97.2683 }; -static Location AcolyteofShadron2 = { 3246.57, 551.263, 58.6164 }; -static Location AcolyteofVesperon = { 3145.68, 520.71, 89.7 }; -static Location AcolyteofVesperon2 = { 3246.57, 551.263, 58.6164 }; +static Location FlameRight1Spawn = { 3200.00, 573.211, 57.1551 }; +static Location FlameRight1Direction = { 3289.28, 573.211, 57.1551 }; +static Location FlameRight2Spawn = { 3200.00, 532.211, 57.1551 }; +static Location FlameRight2Direction = { 3289.28, 532.211, 57.1551 }; +static Location FlameRight3Spawn = { 3200.00, 491.211, 57.1551 }; +static Location FlameRight3Direction = { 3289.28, 491.211, 57.1551 }; +static Location FlameLeft1Spawn = { 3289.28, 511.711, 57.1551 }; +static Location FlameLeft1Direction = { 3200.00, 511.711, 57.1551 }; +static Location FlameLeft2Spawn = { 3289.28, 552.711, 57.1551 }; +static Location FlameLeft2Direction = { 3200.00, 552.711, 57.1551 }; + +static Location AcolyteofShadron = { 3363.92, 534.703, 97.2683 }; +static Location AcolyteofShadron2 = { 3246.57, 551.263, 58.6164 }; +static Location AcolyteofVesperon = { 3145.68, 520.71, 89.7 }; +static Location AcolyteofVesperon2 = { 3246.57, 551.263, 58.6164 }; Locations TwilightEggs[] = { {3219.28, 669.121 , 88.5549}, @@ -196,9 +203,12 @@ Locations TwilightEggs[] = }; Locations TwilightEggsSarth[] = { - {3261.75, 539.14 , 58.6082}, - {3257.41, 512.939 , 58.5432}, - {3231.04, 498.281 , 58.6439} + {3252.73, 515.762 , 58.5501}, + {3256.56, 521.119 , 58.6061}, + {3255.63, 527.513 , 58.7568}, + {3264.90, 525.865 , 58.6436}, + {3264.26, 516.364 , 58.8011}, + {3257.54, 502.285 , 58.2077} }; /*###### @@ -262,8 +272,68 @@ struct boss_sartharionAI : public ScriptedAI me->RemoveAurasDueToSpell(SPELL_TWILIGHT_REVENGE); me->ResetLootMode(); + me->SetHomePosition(3246.57, 551.263, 58.6164, 4.66003); achievProgress = 0; + + // Drakes respawning system + if (pInstance) + { + Creature* pTenebron = Unit::GetCreature(*me, pInstance->GetData64(DATA_TENEBRON)); + Creature* pShadron = Unit::GetCreature(*me, pInstance->GetData64(DATA_SHADRON)); + Creature* pVesperon = Unit::GetCreature(*me, pInstance->GetData64(DATA_VESPERON)); + if (pTenebron) + { + pTenebron->SetHomePosition(3239.07, 657.235, 86.8775, 4.74729); + if(pTenebron->isAlive()) + { + if (pTenebron->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + pTenebron->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pTenebron->GetMotionMaster()->MoveTargetedHome(); + }else + { + if(pInstance->GetData(TYPE_TENEBRON_PREKILLED) == false) + { + pTenebron->Respawn(); + pTenebron->GetMotionMaster()->MoveTargetedHome(); + } + } + } + if (pShadron) + { + pShadron->SetHomePosition(3363.06, 525.28, 98.362, 4.76475); + if(pShadron->isAlive()) + { + if (pShadron->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + pShadron->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pShadron->GetMotionMaster()->MoveTargetedHome(); + }else + { + if(pInstance->GetData(TYPE_SHADRON_PREKILLED) == false) + { + pShadron->Respawn(); + pShadron->GetMotionMaster()->MoveTargetedHome(); + } + } + } + if (pVesperon) + { + pVesperon->SetHomePosition(3145.68, 520.71, 89.7, 4.64258); + if(pVesperon->isAlive()) + { + if (pVesperon->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + pVesperon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pVesperon->GetMotionMaster()->MoveTargetedHome(); + }else + { + if(pInstance->GetData(TYPE_VESPERON_PREKILLED) == false) + { + pVesperon->Respawn(); + pVesperon->GetMotionMaster()->MoveTargetedHome(); + } + } + } + } } void JustReachedHome() @@ -272,7 +342,7 @@ struct boss_sartharionAI : public ScriptedAI pInstance->SetData(TYPE_SARTHARION_EVENT, NOT_STARTED); } - void EnterCombat(Unit* /*pWho*/) + void EnterCombat(Unit* pWho) { DoScriptText(SAY_SARTHARION_AGGRO,me); DoZoneInCombat(); @@ -284,24 +354,41 @@ struct boss_sartharionAI : public ScriptedAI } } - void JustDied(Unit* /*pKiller*/) + void JustDied(Unit* pKiller) { DoScriptText(SAY_SARTHARION_DEATH,me); if (pInstance) { - if (achievProgress >= 1) - pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ASSIST,H_ACHIEV_TWILIGHT_ASSIST)); - else if (achievProgress >= 2) - pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_DUO,H_ACHIEV_TWILIGHT_DUO)); + Creature* pTenebron = Unit::GetCreature(*me, pInstance->GetData64(DATA_TENEBRON)); + Creature* pShadron = Unit::GetCreature(*me, pInstance->GetData64(DATA_SHADRON)); + Creature* pVesperon = Unit::GetCreature(*me, pInstance->GetData64(DATA_VESPERON)); + if (pTenebron && pTenebron->isAlive()) + pTenebron->DisappearAndDie(); + if (pShadron && pShadron->isAlive()) + pShadron->DisappearAndDie(); + if (pVesperon && pVesperon->isAlive()) + pVesperon->DisappearAndDie(); + + if (achievProgress == 1) + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ASSIST,H_ACHIEV_TWILIGHT_ASSIST)); + else if (achievProgress == 2) + { + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ASSIST,H_ACHIEV_TWILIGHT_ASSIST)); + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_DUO,H_ACHIEV_TWILIGHT_DUO)); + } else if (achievProgress == 3) - pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ZONE,H_ACHIEV_TWILIGHT_ZONE)); - + { + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ASSIST,H_ACHIEV_TWILIGHT_ASSIST)); + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_DUO,H_ACHIEV_TWILIGHT_DUO)); + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ZONE,H_ACHIEV_TWILIGHT_ZONE)); + } + pInstance->SetData(TYPE_SARTHARION_EVENT, DONE); } } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* pVictim) { DoScriptText(RAND(SAY_SARTHARION_SLAY_1,SAY_SARTHARION_SLAY_2,SAY_SARTHARION_SLAY_3), me); } @@ -314,14 +401,18 @@ struct boss_sartharionAI : public ScriptedAI me->AddLootMode(LOOT_MODE_HARD_MODE_3); // Add 3rd Drake loot mode else if (me->HasLootMode(LOOT_MODE_HARD_MODE_1)) // Has one Drake loot mode me->AddLootMode(LOOT_MODE_HARD_MODE_2); // Add 2nd Drake loot mode - else // Has no Drake loot modes + else // Has no Drake loot modes me->AddLootMode(LOOT_MODE_HARD_MODE_1); // Add 1st Drake loot mode } void FetchDragons() { - if (!pInstance) + if(!pInstance) return; + + me->ResetLootMode(); + achievProgress = 0; + Creature* pFetchTene = Unit::GetCreature(*me, pInstance->GetData64(DATA_TENEBRON)); Creature* pFetchShad = Unit::GetCreature(*me, pInstance->GetData64(DATA_SHADRON)); Creature* pFetchVesp = Unit::GetCreature(*me, pInstance->GetData64(DATA_VESPERON)); @@ -332,6 +423,11 @@ struct boss_sartharionAI : public ScriptedAI if (pFetchTene && pFetchTene->isAlive() && !pFetchTene->getVictim()) { bCanUseWill = true; + if(!pFetchTene->isInCombat()) + { + AddDrakeLootMode(); + achievProgress++; + } pFetchTene->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aTene[0].m_fX, m_aTene[0].m_fY, m_aTene[0].m_fZ); if (!pFetchTene->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) @@ -341,6 +437,11 @@ struct boss_sartharionAI : public ScriptedAI if (pFetchShad && pFetchShad->isAlive() && !pFetchShad->getVictim()) { bCanUseWill = true; + if(!pFetchShad->isInCombat()) + { + AddDrakeLootMode(); + achievProgress++; + } pFetchShad->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aShad[0].m_fX, m_aShad[0].m_fY, m_aShad[0].m_fZ); if (!pFetchShad->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) @@ -350,6 +451,11 @@ struct boss_sartharionAI : public ScriptedAI if (pFetchVesp && pFetchVesp->isAlive() && !pFetchVesp->getVictim()) { bCanUseWill = true; + if(!pFetchVesp->isInCombat()) + { + AddDrakeLootMode(); + achievProgress++; + } pFetchVesp->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aVesp[0].m_fX, m_aVesp[0].m_fY, m_aVesp[0].m_fZ); if (!pFetchVesp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) @@ -375,22 +481,22 @@ struct boss_sartharionAI : public ScriptedAI pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); int32 iTextId = 0; - AddDrakeLootMode(); - - achievProgress++; switch(pTemp->GetEntry()) { case NPC_TENEBRON: iTextId = SAY_SARTHARION_CALL_TENEBRON; + pTemp->AddAura(SPELL_POWER_OF_TENEBRON, pTemp); 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->AddAura(SPELL_POWER_OF_SHADRON, pTemp); 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->AddAura(SPELL_POWER_OF_VESPERON, pTemp); pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aVesp[1].m_fX, m_aVesp[1].m_fY, m_aVesp[1].m_fZ); break; } @@ -415,6 +521,27 @@ struct boss_sartharionAI : public ScriptedAI } } + // Selects a random Fire Cyclone and makes it cast Lava Strike. + // FIXME: Frequency of the casts reduced to compensate 100% chance of spawning a Lava Blaze add + void CastLavaStrikeOnTarget(Unit* target) + { + std::list pFireCyclonesList; + Trinity::AllCreaturesOfEntryInRange checker(me, NPC_FIRE_CYCLONE, 200.0f); + Trinity::CreatureListSearcher searcher(me, pFireCyclonesList, checker); + me->VisitNearbyObject(200.0f, searcher); + + if(pFireCyclonesList.empty()) + return; + + std::list::iterator itr = pFireCyclonesList.begin(); + uint32 rnd = rand()%pFireCyclonesList.size(); + + for(uint32 i = 0; i < rnd; ++i) + ++itr; + + (*itr)->CastSpell(target, SPELL_LAVA_STRIKE, true); + } + void UpdateAI(const uint32 uiDiff) { //Return since we have no target @@ -435,9 +562,9 @@ struct boss_sartharionAI : public ScriptedAI } //soft enrage - if (!m_bIsSoftEnraged && (me->GetHealth()*100 / me->GetMaxHealth()) <= 10) + if (!m_bIsSoftEnraged && HealthBelowPct(10)) { - // TODO + // m_bIsSoftEnraged is used while determining Lava Strike cooldown. m_bIsSoftEnraged = true; } @@ -461,18 +588,20 @@ struct boss_sartharionAI : public ScriptedAI { case 0: { - if (Creature *Right1 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight1Spawn.x, FlameRight1Spawn.y , FlameRight1Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000)) - Right1->GetMotionMaster()->MovePoint(0, FlameRight1Direction.x, FlameRight1Direction.y, FlameRight1Direction.z); - if (Creature *Right2 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight2Spawn.x, FlameRight2Spawn.y , FlameRight2Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000)) - Right2->GetMotionMaster()->MovePoint(0, FlameRight2Direction.x, FlameRight2Direction.y, FlameRight2Direction.z); + Creature *Right1 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight1Spawn.x, FlameRight1Spawn.y , FlameRight1Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000); + Creature *Right2 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight2Spawn.x, FlameRight2Spawn.y , FlameRight2Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000); + Creature *Right3 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight3Spawn.x, FlameRight3Spawn.y , FlameRight3Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000); + Right1->GetMotionMaster()->MovePoint(0, FlameRight1Direction.x, FlameRight1Direction.y, FlameRight1Direction.z); + Right2->GetMotionMaster()->MovePoint(0, FlameRight2Direction.x, FlameRight2Direction.y, FlameRight2Direction.z); + Right3->GetMotionMaster()->MovePoint(0, FlameRight3Direction.x, FlameRight3Direction.y, FlameRight3Direction.z); break; } case 1: { - if (Creature *Left1 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameLeft1Spawn.x, FlameLeft1Spawn.y , FlameLeft1Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000)) - Left1->GetMotionMaster()->MovePoint(0, FlameLeft1Direction.x, FlameLeft1Direction.y, FlameLeft1Direction.z); - if (Creature *Left2 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameLeft2Spawn.x, FlameLeft2Spawn.y , FlameLeft2Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000)) - Left2->GetMotionMaster()->MovePoint(0, FlameLeft2Direction.x, FlameLeft2Direction.y, FlameLeft2Direction.z); + Creature *Left1 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameLeft1Spawn.x, FlameLeft1Spawn.y , FlameLeft1Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000); + Creature *Left2 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameLeft2Spawn.x, FlameLeft2Spawn.y , FlameLeft2Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000); + Left1->GetMotionMaster()->MovePoint(0, FlameLeft1Direction.x, FlameLeft1Direction.y, FlameLeft1Direction.z); + Left2->GetMotionMaster()->MovePoint(0, FlameLeft2Direction.x, FlameLeft2Direction.y, FlameLeft2Direction.z); break; } } @@ -515,12 +644,12 @@ struct boss_sartharionAI : public ScriptedAI { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) { - DoCast(pTarget, SPELL_LAVA_STRIKE); + CastLavaStrikeOnTarget(pTarget); - if (urand(0,4) == 4) + if(urand(0,5) == 0) DoScriptText(RAND(SAY_SARTHARION_SPECIAL_1,SAY_SARTHARION_SPECIAL_2,SAY_SARTHARION_SPECIAL_3), me); } - m_uiLavaStrikeTimer = urand(5000,20000); + m_uiLavaStrikeTimer = (m_bIsSoftEnraged ? urand(1400, 2000) : urand(5000,20000)); } else m_uiLavaStrikeTimer -= uiDiff; @@ -552,6 +681,10 @@ struct boss_sartharionAI : public ScriptedAI else m_uiVesperonTimer -= uiDiff; + // Don't attack current target if he's not visible for us. + if(me->getVictim() && me->getVictim()->HasAura(57874, 0)) + me->getThreatManager().modifyThreatPercent(me->getVictim(), -100); + DoMeleeAttackIfReady(); EnterEvadeIfOutOfCombatArea(uiDiff); @@ -619,9 +752,6 @@ struct dummy_dragonAI : public ScriptedAI if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - if (GameObject* TwilightPortal = GameObject::GetGameObject((*me), pInstance->GetData64(GO_TWILIGHT_PORTAL))) - TwilightPortal->SetGoState(GO_STATE_READY); - m_uiWaypointId = 0; m_uiMoveNextTimer = 500; m_iPortalRespawnTime = 30000; @@ -633,7 +763,7 @@ struct dummy_dragonAI : public ScriptedAI if (!pInstance || uiType != POINT_MOTION_TYPE) return; - sLog.outDebug("dummy_dragonAI: %s reached point %u", me->GetName(), uiPointId); +// debug_log("dummy_dragonAI: %s reached point %u", me->GetName(), uiPointId); //if healers messed up the raid and we was already initialized if (pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) @@ -646,6 +776,14 @@ struct dummy_dragonAI : public ScriptedAI if (uiPointId == POINT_ID_LAND) { me->GetMotionMaster()->Clear(); + me->SetInCombatWithZone(); + if(Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true)) + { + me->AddThreat(target, 1.0f); + me->Attack(target, true); + me->GetMotionMaster()->MoveChase(target); + } + m_bCanMoveFree = false; return; } @@ -695,39 +833,57 @@ struct dummy_dragonAI : public ScriptedAI //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 = me->FindNearestGameObject(GO_TWILIGHT_PORTAL,50.0f); - if (GameObject* TwilightPortal = GameObject::GetGameObject((*me), pInstance->GetData64(GO_TWILIGHT_PORTAL))) - TwilightPortal->SetGoState(GO_STATE_ACTIVE); switch(me->GetEntry()) { case NPC_TENEBRON: { iTextId = WHISPER_HATCH_EGGS; - if (pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - me->SummonCreature(NPC_TWILIGHT_EGG, TwilightEggs[0].x, TwilightEggs[0].y, TwilightEggs[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + if (pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + { + for(uint32 i = 0; i < 6; ++i) + me->SummonCreature(NPC_TWILIGHT_EGG, TwilightEggs[i].x, TwilightEggs[i].y, TwilightEggs[i].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + } else - me->SummonCreature(NPC_TWILIGHT_EGG, TwilightEggsSarth[0].x, TwilightEggsSarth[0].y, TwilightEggsSarth[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + { + for(uint32 i = 0; i < 6; ++i) + me->SummonCreature(NPC_SARTHARION_TWILIGHT_EGG, TwilightEggsSarth[i].x, TwilightEggsSarth[i].y, TwilightEggsSarth[i].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + } break; } case NPC_SHADRON: { iTextId = WHISPER_OPEN_PORTAL; - if (pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron.x, AcolyteofShadron.y , AcolyteofShadron.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + if(pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron.x, AcolyteofShadron.y , AcolyteofShadron.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 28000); else - me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron2.x, AcolyteofShadron2.y , AcolyteofShadron2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron2.x, AcolyteofShadron2.y , AcolyteofShadron2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 28000); break; } case NPC_VESPERON: { + iTextId = WHISPER_OPEN_PORTAL; if (pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon.x, AcolyteofVesperon.y , AcolyteofVesperon.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + { + if(Creature* Acolyte = me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon.x, AcolyteofVesperon.y , AcolyteofVesperon.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000)) + { + me->InterruptNonMeleeSpells(true); + Acolyte->InterruptNonMeleeSpells(true); + me->CastSpell(me, 32747, false); + } + } else - me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon2.x, AcolyteofVesperon2.y , AcolyteofVesperon2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + { + if(Creature* Acolyte = me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon2.x, AcolyteofVesperon2.y , AcolyteofVesperon2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000)) + { + me->InterruptNonMeleeSpells(true); + Acolyte->InterruptNonMeleeSpells(true); + me->CastSpell(me, 32747, false); + } + } - iTextId = WHISPER_OPEN_PORTAL; - break; + break; } } @@ -742,7 +898,7 @@ struct dummy_dragonAI : public ScriptedAI //Refresh respawnTime so time again are set to 30secs? } - void JustDied(Unit* /*pKiller*/) + void JustDied(Unit* pKiller) { int32 iTextId = 0; uint32 uiSpellId = 0; @@ -752,23 +908,39 @@ struct dummy_dragonAI : public ScriptedAI case NPC_TENEBRON: iTextId = SAY_TENEBRON_DEATH; uiSpellId = SPELL_POWER_OF_TENEBRON; + if(pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) + pInstance->SetData(TYPE_TENEBRON_PREKILLED, 1); break; case NPC_SHADRON: iTextId = SAY_SHADRON_DEATH; uiSpellId = SPELL_POWER_OF_SHADRON; + if(pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) + pInstance->SetData(TYPE_SHADRON_PREKILLED, 1); + if(Creature* pAcolyte = me->FindNearestCreature(NPC_ACOLYTE_OF_SHADRON, 100.0f)) + { + pAcolyte->Kill(pAcolyte); + } break; case NPC_VESPERON: iTextId = SAY_VESPERON_DEATH; uiSpellId = SPELL_POWER_OF_VESPERON; + if(pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) + pInstance->SetData(TYPE_VESPERON_PREKILLED, 1); + if(Creature* pAcolyte = me->FindNearestCreature(NPC_ACOLYTE_OF_VESPERON, 100.0f)) + { + pAcolyte->Kill(pAcolyte); + } break; } DoScriptText(iTextId, me); - me->RemoveOwnedAura(uiSpellId); + me->RemoveAurasDueToSpell(uiSpellId); if (pInstance) { + pInstance->DoRemoveAurasDueToSpellOnPlayers(uiSpellId); + // not if solo mini-boss fight if (pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) return; @@ -776,7 +948,10 @@ struct dummy_dragonAI : public ScriptedAI // Twilight Revenge to main boss if (Unit* pSartharion = Unit::GetUnit((*me), pInstance->GetData64(DATA_SARTHARION))) if (pSartharion->isAlive()) + { + pSartharion->RemoveAurasDueToSpell(uiSpellId); DoCast(pSartharion, SPELL_TWILIGHT_REVENGE, true); + } } } @@ -786,11 +961,11 @@ struct dummy_dragonAI : public ScriptedAI { if (m_uiMoveNextTimer <= uiDiff) { - if (m_uiWaypointId < MAX_WAYPOINT) + if(m_uiWaypointId < MAX_WAYPOINT) me->GetMotionMaster()->MovePoint(m_uiWaypointId, m_aDragonCommon[m_uiWaypointId].m_fX, m_aDragonCommon[m_uiWaypointId].m_fY, m_aDragonCommon[m_uiWaypointId].m_fZ); - sLog.outDebug("dummy_dragonAI: %s moving to point %u", me->GetName(), m_uiWaypointId); +// debug_log("dummy_dragonAI: %s moving to point %u", me->GetName(), m_uiWaypointId); m_uiMoveNextTimer = 0; } else @@ -811,25 +986,27 @@ struct mob_tenebronAI : public dummy_dragonAI uint32 m_uiShadowFissureTimer; uint32 m_uiHatchEggTimer; + bool m_bHasPortalOpen; + void Reset() { m_uiShadowBreathTimer = 20000; m_uiShadowFissureTimer = 5000; m_uiHatchEggTimer = 30000; + + m_bHasPortalOpen = false; } - void Aggro(Unit* /*pWho*/) + void Aggro(Unit* pWho) { DoScriptText(SAY_TENEBRON_AGGRO, me); DoZoneInCombat(); DoCast(me, SPELL_POWER_OF_TENEBRON); } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* pVictim) { DoScriptText(RAND(SAY_TENEBRON_SLAY_1,SAY_TENEBRON_SLAY_2), me); - /*if (pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - achievProgress = 1;*/ } void UpdateAI(const uint32 uiDiff) @@ -852,7 +1029,7 @@ struct mob_tenebronAI : public dummy_dragonAI else m_uiShadowFissureTimer -= uiDiff; - // Hach Egg + // Hatch Egg if (m_uiHatchEggTimer <= uiDiff) { OpenPortal(); @@ -871,6 +1048,10 @@ struct mob_tenebronAI : public dummy_dragonAI else m_uiShadowBreathTimer -= uiDiff; + // Don't attack current target if he's not visible for us. + if(me->getVictim() && me->getVictim()->HasAura(57874, 0)) + me->getThreatManager().modifyThreatPercent(me->getVictim(), -100); + DoMeleeAttackIfReady(); } }; @@ -892,6 +1073,8 @@ struct mob_shadronAI : public dummy_dragonAI uint32 m_uiShadowFissureTimer; uint32 m_uiAcolyteShadronTimer; + bool m_bHasPortalOpen; + void Reset() { m_uiShadowBreathTimer = 20000; @@ -903,20 +1086,20 @@ struct mob_shadronAI : public dummy_dragonAI if (me->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) me->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA); + + m_bHasPortalOpen = false; } - void Aggro(Unit* /*pWho*/) + void Aggro(Unit* pWho) { DoScriptText(SAY_SHADRON_AGGRO,me); DoZoneInCombat(); DoCast(me, SPELL_POWER_OF_SHADRON); } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* pVictim) { DoScriptText(RAND(SAY_SHADRON_SLAY_1,SAY_SHADRON_SLAY_2), me); - /*if (pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - achievProgress = 2;*/ } void UpdateAI(const uint32 uiDiff) @@ -942,11 +1125,17 @@ struct mob_shadronAI : public dummy_dragonAI // Portal Event if (m_uiAcolyteShadronTimer <= uiDiff) { - if (me->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) - return; + if(m_bHasPortalOpen) + m_uiAcolyteShadronTimer = 10000; + else + { + if (me->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) + return; - OpenPortal(); - m_uiAcolyteShadronTimer = urand(60000,65000); + OpenPortal(); + m_bHasPortalOpen = true; + m_uiAcolyteShadronTimer = urand(60000,65000); + } } else m_uiAcolyteShadronTimer -= uiDiff; @@ -961,6 +1150,10 @@ struct mob_shadronAI : public dummy_dragonAI else m_uiShadowBreathTimer -= uiDiff; + // Don't attack current target if he's not visible for us. + if(me->getVictim() && me->getVictim() && me->getVictim()->HasAura(57874, 0)) + me->getThreatManager().modifyThreatPercent(me->getVictim(), -100); + DoMeleeAttackIfReady(); } }; @@ -982,25 +1175,27 @@ struct mob_vesperonAI : public dummy_dragonAI uint32 m_uiShadowFissureTimer; uint32 m_uiAcolyteVesperonTimer; + bool m_bHasPortalOpen; + void Reset() { m_uiShadowBreathTimer = 20000; m_uiShadowFissureTimer = 5000; m_uiAcolyteVesperonTimer = 60000; + + m_bHasPortalOpen = false; } - void Aggro(Unit* /*pWho*/) + void Aggro(Unit* pWho) { DoScriptText(SAY_VESPERON_AGGRO,me); DoZoneInCombat(); DoCast(me, SPELL_POWER_OF_VESPERON); } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* pVictim) { DoScriptText(RAND(SAY_VESPERON_SLAY_1,SAY_VESPERON_SLAY_2), me); - /*if (pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - achievProgress = 3;*/ } void UpdateAI(const uint32 uiDiff) @@ -1026,9 +1221,14 @@ struct mob_vesperonAI : public dummy_dragonAI // Portal Event if (m_uiAcolyteVesperonTimer <= uiDiff) { - OpenPortal(); - DoCast(me->getVictim(), SPELL_TWILIGHT_TORMENT_VESP); - m_uiAcolyteVesperonTimer = urand(60000,70000); + if(m_bHasPortalOpen) + m_uiAcolyteVesperonTimer = 10000; + else + { + OpenPortal(); + DoCast(me->getVictim(), SPELL_TWILIGHT_TORMENT_VESP); + m_uiAcolyteVesperonTimer = urand(60000,70000); + } } else m_uiAcolyteVesperonTimer -= uiDiff; @@ -1043,6 +1243,10 @@ struct mob_vesperonAI : public dummy_dragonAI else m_uiShadowBreathTimer -= uiDiff; + // Don't attack current target if he's not visible for us. + if(me->getVictim() && me->getVictim()->HasAura(57874, 0)) + me->getThreatManager().modifyThreatPercent(me->getVictim(), -100); + DoMeleeAttackIfReady(); } }; @@ -1061,43 +1265,49 @@ struct mob_acolyte_of_shadronAI : public ScriptedAI mob_acolyte_of_shadronAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = pCreature->GetInstanceData(); + Reset(); } ScriptedInstance* pInstance; - uint32 uiShiftEffectTimer; - + uint32 uiDespawnTimer; + void Reset() { - uiShiftEffectTimer = 1000; + uiDespawnTimer = 28000; if (pInstance) { - Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 0, 999, true); - - Creature* pSartharion = Unit::GetCreature(*me, pInstance->GetData64(DATA_SARTHARION)); - if (Creature* pShadron = Unit::GetCreature(*me, pInstance->GetData64(DATA_SHADRON))) + Creature* pTarget = NULL; //if not solo figth, buff main boss, else place debuff on mini-boss. both spells TARGET_SCRIPT if (pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - pSartharion->CastSpell(me, SPELL_GIFT_OF_TWILIGTH_SAR, true); + { + if(pTarget = ((Creature*)Unit::GetUnit((*me), pInstance->GetData64(DATA_SARTHARION)))) + pTarget->AddAura(SPELL_GIFT_OF_TWILIGTH_SAR, pTarget); + } else { - pShadron->CastSpell(me, SPELL_GIFT_OF_TWILIGTH_SHA,true); - pShadron->AddThreat(pTarget, 100.0f); - AttackStart(pShadron->getVictim()); + if(pTarget = ((Creature*)Unit::GetUnit((*me), pInstance->GetData64(DATA_SHADRON)))) + pTarget->AddAura(SPELL_GIFT_OF_TWILIGTH_SHA, pTarget); } - } - me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,me); + } + me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,me); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* killer) { if (pInstance) { - //Creature* pDebuffTarget = NULL; + Creature* Shadron = pInstance->instance->GetCreature(pInstance->GetData64(DATA_SHADRON)); + if(Shadron) + { + ((mob_shadronAI*)Shadron->AI())->m_bHasPortalOpen = false; + } + + Creature* pDebuffTarget = NULL; Map *map = me->GetMap(); if (map->IsDungeon()) { Map::PlayerList const &PlayerList = map->GetPlayers(); - + if (PlayerList.isEmpty()) return; @@ -1110,28 +1320,31 @@ struct mob_acolyte_of_shadronAI : public ScriptedAI i->getSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT); i->getSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT_ENTER); } - } + } } - if (pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - { - //not solo fight, so main boss has deduff - Creature* pDebuffTarget = Unit::GetCreature(*me, 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 - Creature* pDebuffTarget = Unit::GetCreature(*me, pInstance->GetData64(DATA_SHADRON)); - if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) - pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA); - } + //not solo fight, so main boss has deduff + pDebuffTarget = pInstance->instance->GetCreature(pInstance->GetData64(DATA_SARTHARION)); + if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SAR)) + pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SAR); + + //event not in progress, then solo fight and must remove debuff mini-boss + pDebuffTarget = pInstance->instance->GetCreature(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*/) + void UpdateAI(const uint32 uiDiff) { + if(uiDespawnTimer < uiDiff) + { + me->SetVisibility(VISIBILITY_OFF); + me->Kill(me); + uiDespawnTimer = 28000; + return; + }else uiDespawnTimer -= uiDiff; + if (!UpdateVictim()) return; @@ -1156,26 +1369,32 @@ struct mob_acolyte_of_vesperonAI : public ScriptedAI } ScriptedInstance* pInstance; + uint32 uiDespawnTimer; void Reset() { + uiDespawnTimer = 28000; if (pInstance) { - me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,me); + me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,me); } DoCast(me, SPELL_TWILIGHT_TORMENT_VESP_ACO); } - void JustDied(Unit* /*pKiller*/) + void JustDied(Unit* pKiller) { + me->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP_ACO); + // remove twilight torment on Vesperon if (pInstance) { - Creature* pVesperon = Unit::GetCreature(*me, pInstance->GetData64(DATA_VESPERON)); + Creature* pVesperon = pInstance->instance->GetCreature(pInstance->GetData64(DATA_VESPERON)); + if (pVesperon) + ((mob_vesperonAI*)pVesperon->AI())->m_bHasPortalOpen = false; if (pVesperon && pVesperon->isAlive() && pVesperon->HasAura(SPELL_TWILIGHT_TORMENT_VESP)) pVesperon->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP); - + Map *map = me->GetMap(); if (map->IsDungeon()) { @@ -1194,15 +1413,26 @@ struct mob_acolyte_of_vesperonAI : public ScriptedAI i->getSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT_ENTER); } if (i->getSource()->isAlive() && i->getSource()->HasAura(SPELL_TWILIGHT_TORMENT_VESP,0) && !i->getSource()->getVictim()) - i->getSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT); + i->getSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP); } } + pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_TWILIGHT_TORMENT_VESP_ACO); + pInstance->DoRemoveAurasDueToSpellOnPlayers(57935); + pInstance->DoRemoveAurasDueToSpellOnPlayers(58835); // Components of spell Twilight Torment } } - void UpdateAI(const uint32 /*uiDiff*/) + void UpdateAI(const uint32 uiDiff) { + if(uiDespawnTimer < uiDiff) + { + me->SetVisibility(VISIBILITY_OFF); + me->Kill(me); + uiDespawnTimer = 28000; + return; + }else uiDespawnTimer -= uiDiff; + if (!UpdateVictim()) return; @@ -1222,9 +1452,10 @@ CreatureAI* GetAI_mob_acolyte_of_vesperon(Creature* pCreature) struct mob_twilight_eggsAI : public Scripted_NoMovementAI { mob_twilight_eggsAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) - { + { pInstance = pCreature->GetInstanceData(); } + uint32 m_uiFadeArmorTimer; uint32 m_uiHatchEggTimer; @@ -1232,28 +1463,46 @@ struct mob_twilight_eggsAI : public Scripted_NoMovementAI void Reset() { - m_uiHatchEggTimer = 20000; + if(pInstance) + { + me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,me); + } m_uiFadeArmorTimer = 1000; + m_uiHatchEggTimer = 20000; } + void SpawnWhelps() { + me->RemoveAllAuras(); + if (!pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) me->SummonCreature(NPC_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); - else + else me->SummonCreature(NPC_SHARTHARION_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); me->DealDamage(me, me->GetHealth()); } + + void JustSummoned(Creature* pWho) + { + pWho->SetInCombatWithZone(); + } + void UpdateAI(const uint32 uiDiff) { if (m_uiHatchEggTimer <= uiDiff) { + Creature* Tenebron = pInstance->instance->GetCreature(pInstance->GetData64(DATA_TENEBRON)); + if(Tenebron) + ((mob_tenebronAI*)Tenebron->AI())->m_bHasPortalOpen = false; SpawnWhelps(); } else - m_uiHatchEggTimer -= uiDiff; + m_uiHatchEggTimer -= uiDiff; } - void AttackStart(Unit* /*pWho*/) {} - void MoveInLineOfSight(Unit* /*pWho*/) {} + + + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} }; CreatureAI* GetAI_mob_twilight_eggs(Creature* pCreature) @@ -1262,33 +1511,46 @@ CreatureAI* GetAI_mob_twilight_eggs(Creature* pCreature) } /*###### -## Flame Tzunami +## Mob Flame Tsunami ######*/ struct npc_flame_tsunamiAI : public ScriptedAI { npc_flame_tsunamiAI(Creature* pCreature) : ScriptedAI(pCreature) { - me->HasAura(SPELL_FLAME_TSUNAMI_DMG_AURA); - DoCast(me, SPELL_FLAME_TSUNAMI); + me->SetDisplayId(11686); + me->AddAura(SPELL_FLAME_TSUNAMI, me); } uint32 Tsunami_Timer; + uint32 TsunamiBuff_timer; + uint32 entry; void Reset() { Tsunami_Timer = 100; me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + TsunamiBuff_timer = 1000; + entry = 0; } - + void UpdateAI(const uint32 diff) { if (Tsunami_Timer <= diff) { - DoCast(me, SPELL_FLAME_TSUNAMI_DMG_AURA); - Tsunami_Timer = 1000; - } else Tsunami_Timer -= diff; + DoCast(me,SPELL_FLAME_TSUNAMI_DMG_AURA); + Tsunami_Timer = 500; + }else Tsunami_Timer -= diff; + + if(TsunamiBuff_timer <= diff) + { + if (Unit* LavaBlaze = GetClosestCreatureWithEntry(me,NPC_LAVA_BLAZE, 10.0f, true)) + LavaBlaze->CastSpell(LavaBlaze, SPELL_FLAME_TSUNAMI_BUFF, true); + TsunamiBuff_timer = 1000; + }else TsunamiBuff_timer -= diff; } }; + // Twilight Fissure struct npc_twilight_fissureAI : public Scripted_NoMovementAI { @@ -1301,6 +1563,10 @@ struct npc_twilight_fissureAI : public Scripted_NoMovementAI void Reset() { + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->AddAura( 46265 , me ); // Wrong, can't find proper visual + me->AddAura( 69422 , me ); VoidBlast_Timer = 5000; } @@ -1308,8 +1574,12 @@ struct npc_twilight_fissureAI : public Scripted_NoMovementAI { if (VoidBlast_Timer <= diff) { - DoCast(me->getVictim(), RAID_MODE(SPELL_VOID_BLAST, SPELL_VOID_BLAST_H)); + DoCastAOE(RAID_MODE(SPELL_VOID_BLAST, SPELL_VOID_BLAST_H)); + ////twilight realm + //DoCast(me->getVictim(), 57620, true); + //DoCast(me->getVictim(), 57874, true); VoidBlast_Timer = 9000; + me->RemoveAllAuras(); me->Kill(me); } else VoidBlast_Timer -= diff; } @@ -1332,12 +1602,17 @@ CreatureAI* GetAI_npc_twilight_fissure(Creature* pCreature) struct mob_twilight_whelpAI : public ScriptedAI { - mob_twilight_whelpAI(Creature* pCreature) : ScriptedAI(pCreature) {} + mob_twilight_whelpAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + } uint32 m_uiFadeArmorTimer; void Reset() { + me->RemoveAllAuras(); + me->SetInCombatWithZone(); m_uiFadeArmorTimer = 1000; } diff --git a/src/server/scripts/Northrend/ObsidianSanctum/instance_obsidian_sanctum.cpp b/src/server/scripts/Northrend/ObsidianSanctum/instance_obsidian_sanctum.cpp index 26218f2e936..a8e1d159626 100644 --- a/src/server/scripts/Northrend/ObsidianSanctum/instance_obsidian_sanctum.cpp +++ b/src/server/scripts/Northrend/ObsidianSanctum/instance_obsidian_sanctum.cpp @@ -1,3 +1,19 @@ +/* Copyright (C) 2009 - 2010 TrinityCore + * 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 "ScriptPCH.h" #include "obsidian_sanctum.h" @@ -17,6 +33,10 @@ struct instance_obsidian_sanctum : public ScriptedInstance uint64 m_uiShadronGUID; uint64 m_uiVesperonGUID; + bool m_bTenebronKilled; + bool m_bShadronKilled; + bool m_bVesperonKilled; + void Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -25,6 +45,10 @@ struct instance_obsidian_sanctum : public ScriptedInstance m_uiTenebronGUID = 0; m_uiShadronGUID = 0; m_uiVesperonGUID = 0; + + m_bTenebronKilled = false; + m_bShadronKilled = false; + m_bVesperonKilled = false; } void OnCreatureCreate(Creature* pCreature, bool /*add*/) @@ -55,12 +79,24 @@ struct instance_obsidian_sanctum : public ScriptedInstance { if (uiType == TYPE_SARTHARION_EVENT) m_auiEncounter[0] = uiData; + else if(uiType == TYPE_TENEBRON_PREKILLED) + m_bTenebronKilled = true; + else if(uiType == TYPE_SHADRON_PREKILLED) + m_bShadronKilled = true; + else if(uiType == TYPE_VESPERON_PREKILLED) + m_bVesperonKilled = true; } uint32 GetData(uint32 uiType) { if (uiType == TYPE_SARTHARION_EVENT) return m_auiEncounter[0]; + else if(uiType == TYPE_TENEBRON_PREKILLED) + return m_bTenebronKilled; + else if(uiType == TYPE_SHADRON_PREKILLED) + return m_bShadronKilled; + else if(uiType == TYPE_VESPERON_PREKILLED) + return m_bVesperonKilled; return 0; } diff --git a/src/server/scripts/Northrend/ObsidianSanctum/obsidian_sanctum.h b/src/server/scripts/Northrend/ObsidianSanctum/obsidian_sanctum.h index 59013174795..6809d1bbfdc 100644 --- a/src/server/scripts/Northrend/ObsidianSanctum/obsidian_sanctum.h +++ b/src/server/scripts/Northrend/ObsidianSanctum/obsidian_sanctum.h @@ -1,9 +1,28 @@ +/* Copyright (C) 2009 - 2010 TrinityCore + * 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 + */ + #ifndef DEF_OBSIDIAN_SANCTUM_H #define DEF_OBSIDIAN_SANCTUM_H enum eTypes { TYPE_SARTHARION_EVENT = 1, + TYPE_TENEBRON_PREKILLED = 2, + TYPE_SHADRON_PREKILLED = 3, + TYPE_VESPERON_PREKILLED = 4, DATA_SARTHARION = 10, DATA_TENEBRON = 11, -- cgit v1.2.3 From 83c037a33895a02543de2ba1c2f50258d23e23c7 Mon Sep 17 00:00:00 2001 From: Tartalo Date: Wed, 30 Jun 2010 19:39:14 +0200 Subject: Fix sql from rev 8806 for the new conditions system --HG-- branch : trunk --- sql/updates/8806_spell_script_target.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sql/updates') diff --git a/sql/updates/8806_spell_script_target.sql b/sql/updates/8806_spell_script_target.sql index e84bfcc83d9..5e16f32166a 100644 --- a/sql/updates/8806_spell_script_target.sql +++ b/sql/updates/8806_spell_script_target.sql @@ -1,5 +1,5 @@ -- Limit Flame Tsunami buff to Lava Blazes only -DELETE FROM spell_script_target WHERE entry = 60430; -INSERT INTO spell_script_target (entry, type, targetEntry) VALUES - (60430, 1, 30643), - (60430, 1, 31317); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=60430; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`) VALUES +(13,60430,18,1,30643), +(13,60430,18,1,31317); -- cgit v1.2.3 From 728c3b476d8e6e9776cd6bf8f3ec316f4f325724 Mon Sep 17 00:00:00 2001 From: Tartalo Date: Wed, 30 Jun 2010 19:42:25 +0200 Subject: Remove sql content managed by TDB --HG-- branch : trunk --- sql/updates/8806_spell_script_target.sql | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 sql/updates/8806_spell_script_target.sql (limited to 'sql/updates') diff --git a/sql/updates/8806_spell_script_target.sql b/sql/updates/8806_spell_script_target.sql deleted file mode 100644 index 5e16f32166a..00000000000 --- a/sql/updates/8806_spell_script_target.sql +++ /dev/null @@ -1,5 +0,0 @@ --- Limit Flame Tsunami buff to Lava Blazes only -DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=60430; -INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`) VALUES -(13,60430,18,1,30643), -(13,60430,18,1,31317); -- cgit v1.2.3 From 255e7e8b83848f1e43baffe98e0df88ae5dd537f Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 2 Jul 2010 14:24:05 +0200 Subject: Fixed Chain Lightning overproccing with Lightning Overload, patch by DrTenma Closes issue #1198. --HG-- branch : trunk --- sql/updates/8816_world_spell_bonus_data.sql | 4 ++++ src/server/game/Combat/ThreatManager.cpp | 5 +++++ src/server/game/Entities/Unit/Unit.cpp | 28 +++++++++++++-------------- src/server/game/Miscellaneous/SharedDefines.h | 2 +- 4 files changed, 23 insertions(+), 16 deletions(-) create mode 100644 sql/updates/8816_world_spell_bonus_data.sql (limited to 'sql/updates') diff --git a/sql/updates/8816_world_spell_bonus_data.sql b/sql/updates/8816_world_spell_bonus_data.sql new file mode 100644 index 00000000000..67d01d19b77 --- /dev/null +++ b/sql/updates/8816_world_spell_bonus_data.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_bonus_data` WHERE `entry` IN (45284,45297); +INSERT INTO `spell_bonus_data` (`entry`,`direct_bonus`,`dot_bonus`,`ap_bonus`,`ap_dot_bonus`,`comments`) VALUES +(45284,0.357,-1,-1,-1,'Shaman - LO Lightning Bolt'), +(45297,0.285,-1,-1,-1,'Shaman - LO Chain Lightning'); diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp index 52f02f0f66d..fbf5a80d42b 100644 --- a/src/server/game/Combat/ThreatManager.cpp +++ b/src/server/game/Combat/ThreatManager.cpp @@ -36,8 +36,13 @@ float ThreatCalcHelper::calcThreat(Unit* pHatedUnit, Unit* /*pHatingUnit*/, float fThreat, SpellSchoolMask schoolMask, SpellEntry const *pThreatSpell) { if (pThreatSpell) + { + if (pThreatSpell->AttributesEx & SPELL_ATTR_EX_NO_THREAT) + return 0.0f; + if (Player* modOwner = pHatedUnit->GetSpellModOwner()) modOwner->ApplySpellMod(pThreatSpell->Id, SPELLMOD_THREAT, fThreat); + } return pHatedUnit->ApplyTotalThreatModifier(fThreat, schoolMask); } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 362ccbf582d..e85dd8968dc 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -7335,27 +7335,25 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger sLog.outError("Unit::HandleDummyAuraProc: non handled spell id: %u (LO)", procSpell->Id); return false; } - // No thread generated mod - // TODO: exist special flag in spell attributes for this, need found and use! - SpellModifier *mod = new SpellModifier; - mod->op = SPELLMOD_THREAT; - mod->value = -100; - mod->type = SPELLMOD_PCT; - mod->spellId = dummySpell->Id; - mod->mask[0] = 0x02; - mod->mask[2] = 0x00; - this->ToPlayer()->AddSpellMod(mod, true); - - // Remove cooldown (Chain Lightning - have Category Recovery time) + + // Chain Lightning if (procSpell->SpellFamilyFlags[0] & 0x2) + { + // Chain lightning has [LightOverload_Proc_Chance] / [Max_Number_of_Targets] chance to proc of each individual target hit. + // A maxed LO would have a 33% / 3 = 11% chance to proc of each target. + // LO chance was already "accounted" at the proc chance roll, now need to divide the chance by [Max_Number_of_Targets] + float chance = 100.0f / procSpell->EffectChainTarget[effIndex]; + if (!roll_chance_f(chance)) + return false; + + // Remove cooldown (Chain Lightning - have Category Recovery time) ToPlayer()->RemoveSpellCooldown(spellId); + } CastSpell(pVictim, spellId, true, castItem, triggeredByAura); - this->ToPlayer()->AddSpellMod(mod, false); - if (cooldown && GetTypeId() == TYPEID_PLAYER) - ToPlayer()->AddSpellCooldown(dummySpell->Id,0,time(NULL) + cooldown); + ToPlayer()->AddSpellCooldown(dummySpell->Id, 0, time(NULL) + cooldown); return true; } diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index a9ae3bc4cc0..a1692794ca8 100644 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -287,7 +287,7 @@ const uint32 ItemQualityColors[MAX_ITEM_QUALITY] = { #define SPELL_ATTR_EX_NEGATIVE 0x00000080 // 7 #define SPELL_ATTR_EX_NOT_IN_COMBAT_TARGET 0x00000100 // 8 Spell req target not to be in combat state #define SPELL_ATTR_EX_UNK9 0x00000200 // 9 melee spells -#define SPELL_ATTR_EX_UNK10 0x00000400 // 10 no generates threat on cast 100%? (old NO_INITIAL_AGGRO) +#define SPELL_ATTR_EX_NO_THREAT 0x00000400 // 10 no generates threat on cast 100% (old NO_INITIAL_AGGRO) #define SPELL_ATTR_EX_UNK11 0x00000800 // 11 aura #define SPELL_ATTR_EX_UNK12 0x00001000 // 12 #define SPELL_ATTR_EX_UNK13 0x00002000 // 13 -- cgit v1.2.3 From d936ecda7c0fd436ab727a4906e4d4ac82a2d31b Mon Sep 17 00:00:00 2001 From: teacher Date: Sun, 4 Jul 2010 13:59:57 +0200 Subject: Added serverside spell place holder for future development. Added missing data to world_database.sql. Corrected a couple of typos in world_script_texts.sql. --HG-- branch : trunk --- sql/base/world_database.sql | 10 +++++++++- sql/scripts/world_script_texts.sql | 4 ++-- sql/updates/8821_world_spell_dbc.sql | 8 ++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 sql/updates/8821_world_spell_dbc.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index 89bd879ea7b..8f31a38123e 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -5119,6 +5119,8 @@ INSERT INTO `spell_bonus_data` (`entry`,`direct_bonus`,`dot_bonus`,`ap_bonus`,`a (8004, 0.8082, -1, -1, -1, 'Shaman - Lesser Healing Wave'), (403, 0.7143, -1, -1, -1, 'Shaman - Lightning Bolt'), (26364, 0.33, -1, -1, -1, 'Shaman - Lightning Shield Proc Rank 1'), +(45284, 0.357, -1, -1, -1, 'Shaman - LO Lightning Bolt'), +(45297, 0.285, -1, -1, -1, 'Shaman - LO Chain Lightning'), (8188, 0.1, -1, -1, -1, 'Shaman - Magma Totam Passive Rank 1'), (10582, 0.1, -1, -1, -1, 'Shaman - Magma Totam Passive Rank 2'), (10583, 0.1, -1, -1, -1, 'Shaman - Magma Totam Passive Rank 3'), @@ -5331,7 +5333,13 @@ INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`A (39613, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 10967 reward serverside spell'), (39616, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 10966 reward serverside spell'), (34448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Serverside spell orb of translocation (gobjid=180911)' ), -(34452, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Serverside spell orb of translocation (gobjid=180912)' ); +(34452, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Serverside spell orb of translocation (gobjid=180912)' ), + +(11202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Item 3776 spellid_1 serverside spell'), +(25359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Item 21293 spellid_2 serverside spell'), +(40145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11000 RewSpellCast serverside spell'), +(45767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11670 RewSpellCast serverside spell'), +(71098, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 24451 RewSpellCast serverside spell'); /*!40000 ALTER TABLE `spell_dbc` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/scripts/world_script_texts.sql b/sql/scripts/world_script_texts.sql index 961f5731fa8..ea68673c4da 100644 --- a/sql/scripts/world_script_texts.sql +++ b/sql/scripts/world_script_texts.sql @@ -1797,9 +1797,9 @@ INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1` -- Skadi the Ruthless voice (26693,-1575004,'What mongrels dare intrude here? Look alive, my brothers! A feast for the one that brings me their heads!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13497,1,0,0, 'Skadi - SAY_AGGRO'), (26693,-1575005,'Not so brash now, are you?' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13504,1,0,0, 'Skadi - SAY_KILL_1'), - (26693,-1575006,'I'll mount your skull from the highest tower!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13505,1,0,0, 'Skadi - SAY_KILL_2'), + (26693,-1575006,'I''ll mount your skull from the highest tower!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13505,1,0,0, 'Skadi - SAY_KILL_2'), (26693,-1575007,'%s in within range of the harpoon launchers!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0, 'Skadi - EMOTE_RANGE'), - (26693,-1575008,'ARGH! You call that... an attack? I'll... show... aghhhh...' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13506,1,0,0, 'Skadi - SAY_DEATH'), + (26693,-1575008,'ARGH! You call that... an attack? I''ll... show... aghhhh...' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13506,1,0,0, 'Skadi - SAY_DEATH'), (26693,-1575009,'%s in within range of the harpoon launchers!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0, 'Skadi - EMOTE_RANGE'), (26693,-1575010,'You motherless knaves! Your corpses will make fine morsels for my new drake!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13507,1,0,0, 'Skadi - SAY_DRAKE_DEATH'), (26693,-1575011,'Sear them to the bone!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13498,1,0,0, 'Skadi - SAY_DRAKE_BREATH_1'), diff --git a/sql/updates/8821_world_spell_dbc.sql b/sql/updates/8821_world_spell_dbc.sql new file mode 100644 index 00000000000..903a932edaf --- /dev/null +++ b/sql/updates/8821_world_spell_dbc.sql @@ -0,0 +1,8 @@ +-- Add serverside spells place holders for future development +DELETE FROM `spell_dbc` WHERE `Id` IN (11202,25359,40145,45767,71098); +INSERT INTO `spell_dbc` (`Id`,`Comment`) VALUES +(11202, 'Item 3776 spellid_1 serverside spell'), +(25359, 'Item 21293 spellid_2 serverside spell'), +(40145, 'Quest 11000 RewSpellCast serverside spell'), +(45767, 'Quest 11670 RewSpellCast serverside spell'), +(71098, 'Quest 24451 RewSpellCast serverside spell'); -- cgit v1.2.3 From c04b03cae982d5983163838eb75f2b9d9da34e35 Mon Sep 17 00:00:00 2001 From: teacher Date: Tue, 6 Jul 2010 13:46:39 +0200 Subject: Fix to make the Argent Defender trigger the visuals (by amki). --HG-- branch : trunk --- sql/base/world_database.sql | 1 + sql/updates/8836_world_spell_linked_spell.sql | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 sql/updates/8836_world_spell_linked_spell.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index 8f31a38123e..6bd4a008a8a 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -6104,6 +6104,7 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment ( 19263, 67801, 2, 'Deterrence'), ( 45524, 55095, 0, 'Chains of Ice - Frost Fever'), ( 20066,-61840, 0, 'Repentance'), +( 66235, 66233, 0, 'Ardent Defender Visuals'), -- Quest ( 40214, 40216, 2, 'Dragonmaw Illusion'), ( 40214, 42016, 2, 'Dragonmaw Illusion'), diff --git a/sql/updates/8836_world_spell_linked_spell.sql b/sql/updates/8836_world_spell_linked_spell.sql new file mode 100644 index 00000000000..64c3c66c9e1 --- /dev/null +++ b/sql/updates/8836_world_spell_linked_spell.sql @@ -0,0 +1,3 @@ +-- Make the Ardent Defender heal (66235) trigger the visuals (66233) +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=66235; +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES (66235,66233,0, 'Ardent Defender Visuals'); -- cgit v1.2.3 From 2ccc475aa507dfdf2b29c471afb2c5a194affce5 Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 7 Jul 2010 10:42:42 +0200 Subject: Added drop statement before table rename Because Aokromes wasnt happy. --HG-- branch : trunk --- sql/updates/8790_world_locales_item_set_names.sql | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/updates') diff --git a/sql/updates/8790_world_locales_item_set_names.sql b/sql/updates/8790_world_locales_item_set_names.sql index 3e6abb652ae..4f6015ac749 100644 --- a/sql/updates/8790_world_locales_item_set_names.sql +++ b/sql/updates/8790_world_locales_item_set_names.sql @@ -1 +1,2 @@ +DROP TABLE IF EXISTS `locales_item_set_names`; RENAME TABLE `locales_item_set_name` TO `locales_item_set_names`; -- cgit v1.2.3 From e761d578dadabd4514867764a2ceec61928bf902 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Jul 2010 02:22:20 -0600 Subject: * Implement proper script support for quest "The Prophecy of Akida" (9544) * Script by antihrist --HG-- branch : trunk --- sql/scripts/world_script_texts.sql | 3 ++ sql/scripts/world_scripts_full.sql | 1 + sql/updates/8842_world_script_texts.sql | 5 ++ sql/updates/8842_world_scriptname.sql | 2 + src/server/scripts/Kalimdor/azuremyst_isle.cpp | 71 ++++++++++++++++++++++++++ src/server/scripts/World/go_scripts.cpp | 27 ---------- 6 files changed, 82 insertions(+), 27 deletions(-) create mode 100644 sql/updates/8842_world_script_texts.sql create mode 100644 sql/updates/8842_world_scriptname.sql (limited to 'sql/updates') diff --git a/sql/scripts/world_script_texts.sql b/sql/scripts/world_script_texts.sql index ea68673c4da..84e05311494 100644 --- a/sql/scripts/world_script_texts.sql +++ b/sql/scripts/world_script_texts.sql @@ -423,6 +423,9 @@ INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1` (23861,-1000471,'It was... terrible... the demon...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''), (23864,-1000472,'This land was mine long before your wretched kind set foot here.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''), (23864,-1000473,'All who venture here belong to me, including you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''), + (17375, -1000474, '[Fulborg] The Stillpine furbolgs will not soon forget your bravery!', 0, 0, 'Stillpine Capitive free say text 1'), + (17375, -1000475, '[Fulborg] Thank you, $N', 0, 0, 'Stillpine Capitive free say text 2'), + (17375, -1000476, '[Fulborg] Those remaining at Stillpine Hold will welcome you as a hero!', 0, 0, 'Stillpine Capitive free say text 3'); (26588,-1800001, 'Um... I think one of those wolves is back...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0, '12027'), (26588,-1800002, 'He''s going for Mr. Floppy! ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0, '12027'), (26588,-1800003, 'Oh, no! Look, it''s another wolf, and it''s a biiiiiig one!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0, '12027'), diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql index 2ec85dd2b47..0576458fbcd 100644 --- a/sql/scripts/world_scripts_full.sql +++ b/sql/scripts/world_scripts_full.sql @@ -274,6 +274,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_geezle' WHERE `entry`=17318; UPDATE `creature_template` SET `ScriptName`='npc_nestlewood_owlkin' WHERE `entry`=16518; UPDATE `creature_template` SET `ScriptName`='npc_draenei_survivor' WHERE `entry`=16483; UPDATE `creature_template` SET `ScriptName`='npc_death_ravager' WHERE `entry`=17556; +UPDATE `creature_template` SET `ScriptName`='npc_stillpine_capitive' where `entry`=17375; UPDATE `gameobject_template` SET `ScriptName`='go_ravager_cage' WHERE `entry`=181849; UPDATE `gameobject_template` SET `ScriptName`='go_stillpine_cage' WHERE `entry`=181714; diff --git a/sql/updates/8842_world_script_texts.sql b/sql/updates/8842_world_script_texts.sql new file mode 100644 index 00000000000..617b61a694f --- /dev/null +++ b/sql/updates/8842_world_script_texts.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts where entry IN (-1000474, -1000475, -1000476); +INSERT INTO script_texts (`npc_entry`, `entry`, `content_default`, `type`, `language`, `comment`) VALUE +(17375, -1000474, '[Fulborg] The Stillpine furbolgs will not soon forget your bravery!', 0, 0, 'Stillpine Capitive free say text 1'), +(17375, -1000475, '[Fulborg] Thank you, $N', 0, 0, 'Stillpine Capitive free say text 2'), +(17375, -1000476, '[Fulborg] Those remaining at Stillpine Hold will welcome you as a hero!', 0, 0, 'Stillpine Capitive free say text 3'); diff --git a/sql/updates/8842_world_scriptname.sql b/sql/updates/8842_world_scriptname.sql new file mode 100644 index 00000000000..5ef8e4b6aa9 --- /dev/null +++ b/sql/updates/8842_world_scriptname.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='npc_stillpine_capitive' where `entry`=17375; +UPDATE `gameobject_template` SET `ScriptName`='go_stillpine_cage' WHERE `entry`=181714; diff --git a/src/server/scripts/Kalimdor/azuremyst_isle.cpp b/src/server/scripts/Kalimdor/azuremyst_isle.cpp index 131e91b65b3..ca35b48b970 100755 --- a/src/server/scripts/Kalimdor/azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/azuremyst_isle.cpp @@ -669,6 +669,67 @@ CreatureAI* GetAI_npc_death_ravagerAI(Creature* pCreature) return new npc_death_ravagerAI(pCreature); } +/*######## +## Quest: The Prophecy of Akida +########*/ +enum BristlelimbCage +{ + QUEST_THE_PROPHECY_OF_AKIDA = 9544, + NPC_STILLPINE_CAPITIVE = 17375, + GO_BRISTELIMB_CAGE = 181714, + CAPITIVE_SAY_1 = -1000474, + CAPITIVE_SAY_2 = -1000475, + CAPITIVE_SAY_3 = -1000476 +}; + + +struct npc_stillpine_capitiveAI : public ScriptedAI +{ + npc_stillpine_capitiveAI(Creature *c) : ScriptedAI(c){} + + uint32 FleeTimer; + + void Reset() + { + FleeTimer = 0; + GameObject* cage = me->FindNearestGameObject(GO_BRISTELIMB_CAGE, 5.0f); + if(cage) + cage->ResetDoorOrButton(); + } + + void UpdateAI(const uint32 diff) + { + if(FleeTimer) + { + if(FleeTimer <= diff) + me->ForcedDespawn(); + else FleeTimer -= diff; + } + } +}; + +CreatureAI* GetAI_npc_stillpine_capitiveAI(Creature* pCreature) +{ + return new npc_stillpine_capitiveAI(pCreature); +} + +bool go_bristlelimb_cage(Player* pPlayer, GameObject* pGo) +{ + if(pPlayer->GetQuestStatus(QUEST_THE_PROPHECY_OF_AKIDA) == QUEST_STATUS_INCOMPLETE) + { + Creature* pCreature = pGo->FindNearestCreature(NPC_STILLPINE_CAPITIVE, 5.0f, true); + if(pCreature) + { + DoScriptText(RAND(CAPITIVE_SAY_1, CAPITIVE_SAY_2, CAPITIVE_SAY_3), pCreature, pPlayer); + pCreature->GetMotionMaster()->MoveFleeing(pPlayer, 3500); + pPlayer->KilledMonsterCredit(pCreature->GetEntry(), pCreature->GetGUID()); + CAST_AI(npc_stillpine_capitiveAI, pCreature->AI())->FleeTimer = 3500; + return false; + } + } + return true; +} + void AddSC_azuremyst_isle() { Script *newscript; @@ -716,5 +777,15 @@ void AddSC_azuremyst_isle() newscript->Name="go_ravager_cage"; newscript->pGOHello = &go_ravager_cage; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_stillpine_capitive"; + newscript->GetAI = &GetAI_npc_stillpine_capitiveAI; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="go_bristlelimb_cage"; + newscript->pGOHello = &go_bristlelimb_cage; + newscript->RegisterSelf(); } diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index 84ce38dd243..ca7a136c2fb 100755 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -943,28 +943,6 @@ bool GOSelect_go_amberpine_outhouse(Player *pPlayer, GameObject *pGO, uint32 /*u return false; } -/*###### -## Quest 9544: The Prophecy of Akida -######*/ - -enum eProphecy -{ - QUEST_PROPHECY_OF_AKIDA = 9544, - NPC_STILLPINE_CAPTIVE = 17375 -}; - -bool GOHello_go_stillpine_cage(Player *pPlayer, GameObject *pGO) -{ - if (pPlayer->GetQuestStatus(QUEST_PROPHECY_OF_AKIDA) == QUEST_STATUS_INCOMPLETE) - if (Creature *pPrisoner = pGO->FindNearestCreature(NPC_STILLPINE_CAPTIVE,1.0f)) - { - pGO->UseDoorOrButton(); - pPrisoner->DisappearAndDie(); - pPlayer->KilledMonsterCredit(pPrisoner->GetEntry(),0); - } - return true; -} - /*###### ## Quest 1126: Hive in the Tower ######*/ @@ -1160,11 +1138,6 @@ void AddSC_go_scripts() newscript->pGOHello = &GOHello_go_black_cage; newscript->RegisterSelf(); - newscript = new Script; - newscript->Name = "go_stillpine_cage"; - newscript->pGOHello = &GOHello_go_stillpine_cage; - newscript->RegisterSelf(); - newscript = new Script; newscript->Name = "go_amberpine_outhouse"; newscript->pGOHello = &GOHello_go_amberpine_outhouse; -- cgit v1.2.3 From 95ce45417115e5fd15a463db661212a560cb6e57 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Jul 2010 02:30:47 -0600 Subject: * Typo in previous commit --HG-- branch : trunk --- sql/scripts/world_scripts_full.sql | 2 +- sql/updates/8843_world_scriptname.sql | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 sql/updates/8843_world_scriptname.sql (limited to 'sql/updates') diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql index 0576458fbcd..44a522a1b1a 100644 --- a/sql/scripts/world_scripts_full.sql +++ b/sql/scripts/world_scripts_full.sql @@ -276,7 +276,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_draenei_survivor' WHERE `entry` UPDATE `creature_template` SET `ScriptName`='npc_death_ravager' WHERE `entry`=17556; UPDATE `creature_template` SET `ScriptName`='npc_stillpine_capitive' where `entry`=17375; UPDATE `gameobject_template` SET `ScriptName`='go_ravager_cage' WHERE `entry`=181849; -UPDATE `gameobject_template` SET `ScriptName`='go_stillpine_cage' WHERE `entry`=181714; +UPDATE `gameobject_template` SET `ScriptName`='go_bristlelimb_cage' WHERE `entry`=181714; /* BADLANDS */ diff --git a/sql/updates/8843_world_scriptname.sql b/sql/updates/8843_world_scriptname.sql new file mode 100644 index 00000000000..4517544d99d --- /dev/null +++ b/sql/updates/8843_world_scriptname.sql @@ -0,0 +1,2 @@ +UPDATE `gameobject_template` SET `ScriptName`='go_bristlelimb_cage' WHERE `entry`=181714; + -- cgit v1.2.3 From 168b4ecad16a95da99e806098323cf3b59c3f105 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Jul 2010 05:59:15 -0600 Subject: * Prepare SQL directories --HG-- branch : trunk rename : sql/updates/8770_world_areatrigger_scripts.sql => sql/updates/3.3.3a_old/8770_world_areatrigger_scripts.sql rename : sql/updates/8770_world_script_waypoints.sql => sql/updates/3.3.3a_old/8770_world_script_waypoints.sql rename : sql/updates/8770_world_scriptname.sql => sql/updates/3.3.3a_old/8770_world_scriptname.sql rename : sql/updates/8790_world_locales_item_set_names.sql => sql/updates/3.3.3a_old/8790_world_locales_item_set_names.sql rename : sql/updates/8816_world_spell_bonus_data.sql => sql/updates/3.3.3a_old/8816_world_spell_bonus_data.sql rename : sql/updates/8821_world_spell_dbc.sql => sql/updates/3.3.3a_old/8821_world_spell_dbc.sql rename : sql/updates/8836_world_spell_linked_spell.sql => sql/updates/3.3.3a_old/8836_world_spell_linked_spell.sql rename : sql/updates/8842_world_script_texts.sql => sql/updates/3.3.3a_old/8842_world_script_texts.sql rename : sql/updates/8842_world_scriptname.sql => sql/updates/3.3.3a_old/8842_world_scriptname.sql rename : sql/updates/8843_world_scriptname.sql => sql/updates/3.3.3a_old/8843_world_scriptname.sql --- sql/updates/3.3.3a_old/8770_world_areatrigger_scripts.sql | 4 ++++ sql/updates/3.3.3a_old/8770_world_script_waypoints.sql | 9 +++++++++ sql/updates/3.3.3a_old/8770_world_scriptname.sql | 12 ++++++++++++ sql/updates/3.3.3a_old/8790_world_locales_item_set_names.sql | 2 ++ sql/updates/3.3.3a_old/8816_world_spell_bonus_data.sql | 4 ++++ sql/updates/3.3.3a_old/8821_world_spell_dbc.sql | 8 ++++++++ sql/updates/3.3.3a_old/8836_world_spell_linked_spell.sql | 3 +++ sql/updates/3.3.3a_old/8842_world_script_texts.sql | 5 +++++ sql/updates/3.3.3a_old/8842_world_scriptname.sql | 2 ++ sql/updates/3.3.3a_old/8843_world_scriptname.sql | 2 ++ sql/updates/3.3.5a_old/CMakeLists.txt | 3 +++ sql/updates/3.3.5a_old/xxxx_realmd_realmlist.sql | 3 +++ sql/updates/8770_world_areatrigger_scripts.sql | 4 ---- sql/updates/8770_world_script_waypoints.sql | 9 --------- sql/updates/8770_world_scriptname.sql | 12 ------------ sql/updates/8790_world_locales_item_set_names.sql | 2 -- sql/updates/8816_world_spell_bonus_data.sql | 4 ---- sql/updates/8821_world_spell_dbc.sql | 8 -------- sql/updates/8836_world_spell_linked_spell.sql | 3 --- sql/updates/8842_world_script_texts.sql | 5 ----- sql/updates/8842_world_scriptname.sql | 2 -- sql/updates/8843_world_scriptname.sql | 2 -- sql/updates/CMakeLists.txt | 1 + 23 files changed, 58 insertions(+), 51 deletions(-) create mode 100644 sql/updates/3.3.3a_old/8770_world_areatrigger_scripts.sql create mode 100644 sql/updates/3.3.3a_old/8770_world_script_waypoints.sql create mode 100644 sql/updates/3.3.3a_old/8770_world_scriptname.sql create mode 100644 sql/updates/3.3.3a_old/8790_world_locales_item_set_names.sql create mode 100644 sql/updates/3.3.3a_old/8816_world_spell_bonus_data.sql create mode 100644 sql/updates/3.3.3a_old/8821_world_spell_dbc.sql create mode 100644 sql/updates/3.3.3a_old/8836_world_spell_linked_spell.sql create mode 100644 sql/updates/3.3.3a_old/8842_world_script_texts.sql create mode 100644 sql/updates/3.3.3a_old/8842_world_scriptname.sql create mode 100644 sql/updates/3.3.3a_old/8843_world_scriptname.sql create mode 100644 sql/updates/3.3.5a_old/CMakeLists.txt create mode 100644 sql/updates/3.3.5a_old/xxxx_realmd_realmlist.sql delete mode 100644 sql/updates/8770_world_areatrigger_scripts.sql delete mode 100644 sql/updates/8770_world_script_waypoints.sql delete mode 100644 sql/updates/8770_world_scriptname.sql delete mode 100644 sql/updates/8790_world_locales_item_set_names.sql delete mode 100644 sql/updates/8816_world_spell_bonus_data.sql delete mode 100644 sql/updates/8821_world_spell_dbc.sql delete mode 100644 sql/updates/8836_world_spell_linked_spell.sql delete mode 100644 sql/updates/8842_world_script_texts.sql delete mode 100644 sql/updates/8842_world_scriptname.sql delete mode 100644 sql/updates/8843_world_scriptname.sql (limited to 'sql/updates') diff --git a/sql/updates/3.3.3a_old/8770_world_areatrigger_scripts.sql b/sql/updates/3.3.3a_old/8770_world_areatrigger_scripts.sql new file mode 100644 index 00000000000..044725b3a5f --- /dev/null +++ b/sql/updates/3.3.3a_old/8770_world_areatrigger_scripts.sql @@ -0,0 +1,4 @@ +DELETE FROM `areatrigger_scripts` WHERE `entry` IN (5369,5423); +INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES +(5369, 'at_RX_214_repair_o_matic_station'), +(5423, 'at_RX_214_repair_o_matic_station'); diff --git a/sql/updates/3.3.3a_old/8770_world_script_waypoints.sql b/sql/updates/3.3.3a_old/8770_world_script_waypoints.sql new file mode 100644 index 00000000000..c2418f6da33 --- /dev/null +++ b/sql/updates/3.3.3a_old/8770_world_script_waypoints.sql @@ -0,0 +1,9 @@ +-- Waypoints for Mimron Inferno +DELETE FROM `script_waypoint` WHERE `entry`=33370; +INSERT INTO `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) VALUES +(33370, 1, 331.674, -68.6878, 409.804, 0, '0'), +(33370, 2, 274.578, -92.1829, 409.804, 0, '0'), +(33370, 3, 226.433, -66.6652, 409.793, 0, '0'), +(33370, 4, 206.092, -34.7447, 409.801, 0, '0'), +(33370, 5, 240.208, 1.10346, 409.802, 0, '0'), +(33370, 6, 337.199, 11.7051, 409.802, 0, '0'); diff --git a/sql/updates/3.3.3a_old/8770_world_scriptname.sql b/sql/updates/3.3.3a_old/8770_world_scriptname.sql new file mode 100644 index 00000000000..e173f7e41f2 --- /dev/null +++ b/sql/updates/3.3.3a_old/8770_world_scriptname.sql @@ -0,0 +1,12 @@ +UPDATE `creature_template` SET `ScriptName`= 'npc_thorims_hammer' WHERE `entry`=33365; +UPDATE `creature_template` SET `ScriptName`= 'npc_mimirons_inferno' WHERE `entry`=33370; +UPDATE `creature_template` SET `ScriptName`= 'npc_hodirs_fury' WHERE `entry`=33312; +UPDATE `creature_template` SET `ScriptName`= 'npc_freyas_ward' WHERE `entry`=33367; +UPDATE `creature_template` SET `ScriptName`= 'npc_lorekeeper' WHERE `entry`=33686; +UPDATE `creature_template` SET `ScriptName`= 'npc_brann_bronzebeard' WHERE `entry`=33579; +UPDATE `creature_template` SET `ScriptName`= 'npc_freya_ward_summon' WHERE `entry`=34275; +UPDATE `creature_template` SET `ScriptName`= 'npc_mechanolift' WHERE `entry`=33214; +UPDATE `gameobject_template` SET `ScriptName`= 'go_ulduar_tower' WHERE `entry`=194375; +UPDATE `gameobject_template` SET `ScriptName`= 'go_ulduar_tower' WHERE `entry`=194371; +UPDATE `gameobject_template` SET `ScriptName`= 'go_ulduar_tower' WHERE `entry`=194370; +UPDATE `gameobject_template` SET `ScriptName`= 'go_ulduar_tower' WHERE `entry`=194377; diff --git a/sql/updates/3.3.3a_old/8790_world_locales_item_set_names.sql b/sql/updates/3.3.3a_old/8790_world_locales_item_set_names.sql new file mode 100644 index 00000000000..4f6015ac749 --- /dev/null +++ b/sql/updates/3.3.3a_old/8790_world_locales_item_set_names.sql @@ -0,0 +1,2 @@ +DROP TABLE IF EXISTS `locales_item_set_names`; +RENAME TABLE `locales_item_set_name` TO `locales_item_set_names`; diff --git a/sql/updates/3.3.3a_old/8816_world_spell_bonus_data.sql b/sql/updates/3.3.3a_old/8816_world_spell_bonus_data.sql new file mode 100644 index 00000000000..67d01d19b77 --- /dev/null +++ b/sql/updates/3.3.3a_old/8816_world_spell_bonus_data.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_bonus_data` WHERE `entry` IN (45284,45297); +INSERT INTO `spell_bonus_data` (`entry`,`direct_bonus`,`dot_bonus`,`ap_bonus`,`ap_dot_bonus`,`comments`) VALUES +(45284,0.357,-1,-1,-1,'Shaman - LO Lightning Bolt'), +(45297,0.285,-1,-1,-1,'Shaman - LO Chain Lightning'); diff --git a/sql/updates/3.3.3a_old/8821_world_spell_dbc.sql b/sql/updates/3.3.3a_old/8821_world_spell_dbc.sql new file mode 100644 index 00000000000..903a932edaf --- /dev/null +++ b/sql/updates/3.3.3a_old/8821_world_spell_dbc.sql @@ -0,0 +1,8 @@ +-- Add serverside spells place holders for future development +DELETE FROM `spell_dbc` WHERE `Id` IN (11202,25359,40145,45767,71098); +INSERT INTO `spell_dbc` (`Id`,`Comment`) VALUES +(11202, 'Item 3776 spellid_1 serverside spell'), +(25359, 'Item 21293 spellid_2 serverside spell'), +(40145, 'Quest 11000 RewSpellCast serverside spell'), +(45767, 'Quest 11670 RewSpellCast serverside spell'), +(71098, 'Quest 24451 RewSpellCast serverside spell'); diff --git a/sql/updates/3.3.3a_old/8836_world_spell_linked_spell.sql b/sql/updates/3.3.3a_old/8836_world_spell_linked_spell.sql new file mode 100644 index 00000000000..64c3c66c9e1 --- /dev/null +++ b/sql/updates/3.3.3a_old/8836_world_spell_linked_spell.sql @@ -0,0 +1,3 @@ +-- Make the Ardent Defender heal (66235) trigger the visuals (66233) +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=66235; +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES (66235,66233,0, 'Ardent Defender Visuals'); diff --git a/sql/updates/3.3.3a_old/8842_world_script_texts.sql b/sql/updates/3.3.3a_old/8842_world_script_texts.sql new file mode 100644 index 00000000000..617b61a694f --- /dev/null +++ b/sql/updates/3.3.3a_old/8842_world_script_texts.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts where entry IN (-1000474, -1000475, -1000476); +INSERT INTO script_texts (`npc_entry`, `entry`, `content_default`, `type`, `language`, `comment`) VALUE +(17375, -1000474, '[Fulborg] The Stillpine furbolgs will not soon forget your bravery!', 0, 0, 'Stillpine Capitive free say text 1'), +(17375, -1000475, '[Fulborg] Thank you, $N', 0, 0, 'Stillpine Capitive free say text 2'), +(17375, -1000476, '[Fulborg] Those remaining at Stillpine Hold will welcome you as a hero!', 0, 0, 'Stillpine Capitive free say text 3'); diff --git a/sql/updates/3.3.3a_old/8842_world_scriptname.sql b/sql/updates/3.3.3a_old/8842_world_scriptname.sql new file mode 100644 index 00000000000..5ef8e4b6aa9 --- /dev/null +++ b/sql/updates/3.3.3a_old/8842_world_scriptname.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='npc_stillpine_capitive' where `entry`=17375; +UPDATE `gameobject_template` SET `ScriptName`='go_stillpine_cage' WHERE `entry`=181714; diff --git a/sql/updates/3.3.3a_old/8843_world_scriptname.sql b/sql/updates/3.3.3a_old/8843_world_scriptname.sql new file mode 100644 index 00000000000..4517544d99d --- /dev/null +++ b/sql/updates/3.3.3a_old/8843_world_scriptname.sql @@ -0,0 +1,2 @@ +UPDATE `gameobject_template` SET `ScriptName`='go_bristlelimb_cage' WHERE `entry`=181714; + diff --git a/sql/updates/3.3.5a_old/CMakeLists.txt b/sql/updates/3.3.5a_old/CMakeLists.txt new file mode 100644 index 00000000000..63cb6eab23e --- /dev/null +++ b/sql/updates/3.3.5a_old/CMakeLists.txt @@ -0,0 +1,3 @@ +FILE(GLOB _SQL_335 *.sql) + +INSTALL(FILES ${_SQL_333} DESTINATION share/trinity/sql/updates/3.3.5a_old) diff --git a/sql/updates/3.3.5a_old/xxxx_realmd_realmlist.sql b/sql/updates/3.3.5a_old/xxxx_realmd_realmlist.sql new file mode 100644 index 00000000000..c6622d5ce1e --- /dev/null +++ b/sql/updates/3.3.5a_old/xxxx_realmd_realmlist.sql @@ -0,0 +1,3 @@ +UPDATE `realmlist` SET `gamebuild`=12340 WHERE `id`=1; +ALTER TABLE `realmlist` CHANGE COLUMN `gamebuild` `gamebuild` int(11) unsigned NOT NULL default '12340'; + diff --git a/sql/updates/8770_world_areatrigger_scripts.sql b/sql/updates/8770_world_areatrigger_scripts.sql deleted file mode 100644 index 044725b3a5f..00000000000 --- a/sql/updates/8770_world_areatrigger_scripts.sql +++ /dev/null @@ -1,4 +0,0 @@ -DELETE FROM `areatrigger_scripts` WHERE `entry` IN (5369,5423); -INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES -(5369, 'at_RX_214_repair_o_matic_station'), -(5423, 'at_RX_214_repair_o_matic_station'); diff --git a/sql/updates/8770_world_script_waypoints.sql b/sql/updates/8770_world_script_waypoints.sql deleted file mode 100644 index c2418f6da33..00000000000 --- a/sql/updates/8770_world_script_waypoints.sql +++ /dev/null @@ -1,9 +0,0 @@ --- Waypoints for Mimron Inferno -DELETE FROM `script_waypoint` WHERE `entry`=33370; -INSERT INTO `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) VALUES -(33370, 1, 331.674, -68.6878, 409.804, 0, '0'), -(33370, 2, 274.578, -92.1829, 409.804, 0, '0'), -(33370, 3, 226.433, -66.6652, 409.793, 0, '0'), -(33370, 4, 206.092, -34.7447, 409.801, 0, '0'), -(33370, 5, 240.208, 1.10346, 409.802, 0, '0'), -(33370, 6, 337.199, 11.7051, 409.802, 0, '0'); diff --git a/sql/updates/8770_world_scriptname.sql b/sql/updates/8770_world_scriptname.sql deleted file mode 100644 index e173f7e41f2..00000000000 --- a/sql/updates/8770_world_scriptname.sql +++ /dev/null @@ -1,12 +0,0 @@ -UPDATE `creature_template` SET `ScriptName`= 'npc_thorims_hammer' WHERE `entry`=33365; -UPDATE `creature_template` SET `ScriptName`= 'npc_mimirons_inferno' WHERE `entry`=33370; -UPDATE `creature_template` SET `ScriptName`= 'npc_hodirs_fury' WHERE `entry`=33312; -UPDATE `creature_template` SET `ScriptName`= 'npc_freyas_ward' WHERE `entry`=33367; -UPDATE `creature_template` SET `ScriptName`= 'npc_lorekeeper' WHERE `entry`=33686; -UPDATE `creature_template` SET `ScriptName`= 'npc_brann_bronzebeard' WHERE `entry`=33579; -UPDATE `creature_template` SET `ScriptName`= 'npc_freya_ward_summon' WHERE `entry`=34275; -UPDATE `creature_template` SET `ScriptName`= 'npc_mechanolift' WHERE `entry`=33214; -UPDATE `gameobject_template` SET `ScriptName`= 'go_ulduar_tower' WHERE `entry`=194375; -UPDATE `gameobject_template` SET `ScriptName`= 'go_ulduar_tower' WHERE `entry`=194371; -UPDATE `gameobject_template` SET `ScriptName`= 'go_ulduar_tower' WHERE `entry`=194370; -UPDATE `gameobject_template` SET `ScriptName`= 'go_ulduar_tower' WHERE `entry`=194377; diff --git a/sql/updates/8790_world_locales_item_set_names.sql b/sql/updates/8790_world_locales_item_set_names.sql deleted file mode 100644 index 4f6015ac749..00000000000 --- a/sql/updates/8790_world_locales_item_set_names.sql +++ /dev/null @@ -1,2 +0,0 @@ -DROP TABLE IF EXISTS `locales_item_set_names`; -RENAME TABLE `locales_item_set_name` TO `locales_item_set_names`; diff --git a/sql/updates/8816_world_spell_bonus_data.sql b/sql/updates/8816_world_spell_bonus_data.sql deleted file mode 100644 index 67d01d19b77..00000000000 --- a/sql/updates/8816_world_spell_bonus_data.sql +++ /dev/null @@ -1,4 +0,0 @@ -DELETE FROM `spell_bonus_data` WHERE `entry` IN (45284,45297); -INSERT INTO `spell_bonus_data` (`entry`,`direct_bonus`,`dot_bonus`,`ap_bonus`,`ap_dot_bonus`,`comments`) VALUES -(45284,0.357,-1,-1,-1,'Shaman - LO Lightning Bolt'), -(45297,0.285,-1,-1,-1,'Shaman - LO Chain Lightning'); diff --git a/sql/updates/8821_world_spell_dbc.sql b/sql/updates/8821_world_spell_dbc.sql deleted file mode 100644 index 903a932edaf..00000000000 --- a/sql/updates/8821_world_spell_dbc.sql +++ /dev/null @@ -1,8 +0,0 @@ --- Add serverside spells place holders for future development -DELETE FROM `spell_dbc` WHERE `Id` IN (11202,25359,40145,45767,71098); -INSERT INTO `spell_dbc` (`Id`,`Comment`) VALUES -(11202, 'Item 3776 spellid_1 serverside spell'), -(25359, 'Item 21293 spellid_2 serverside spell'), -(40145, 'Quest 11000 RewSpellCast serverside spell'), -(45767, 'Quest 11670 RewSpellCast serverside spell'), -(71098, 'Quest 24451 RewSpellCast serverside spell'); diff --git a/sql/updates/8836_world_spell_linked_spell.sql b/sql/updates/8836_world_spell_linked_spell.sql deleted file mode 100644 index 64c3c66c9e1..00000000000 --- a/sql/updates/8836_world_spell_linked_spell.sql +++ /dev/null @@ -1,3 +0,0 @@ --- Make the Ardent Defender heal (66235) trigger the visuals (66233) -DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=66235; -INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES (66235,66233,0, 'Ardent Defender Visuals'); diff --git a/sql/updates/8842_world_script_texts.sql b/sql/updates/8842_world_script_texts.sql deleted file mode 100644 index 617b61a694f..00000000000 --- a/sql/updates/8842_world_script_texts.sql +++ /dev/null @@ -1,5 +0,0 @@ -DELETE FROM script_texts where entry IN (-1000474, -1000475, -1000476); -INSERT INTO script_texts (`npc_entry`, `entry`, `content_default`, `type`, `language`, `comment`) VALUE -(17375, -1000474, '[Fulborg] The Stillpine furbolgs will not soon forget your bravery!', 0, 0, 'Stillpine Capitive free say text 1'), -(17375, -1000475, '[Fulborg] Thank you, $N', 0, 0, 'Stillpine Capitive free say text 2'), -(17375, -1000476, '[Fulborg] Those remaining at Stillpine Hold will welcome you as a hero!', 0, 0, 'Stillpine Capitive free say text 3'); diff --git a/sql/updates/8842_world_scriptname.sql b/sql/updates/8842_world_scriptname.sql deleted file mode 100644 index 5ef8e4b6aa9..00000000000 --- a/sql/updates/8842_world_scriptname.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE `creature_template` SET `ScriptName`='npc_stillpine_capitive' where `entry`=17375; -UPDATE `gameobject_template` SET `ScriptName`='go_stillpine_cage' WHERE `entry`=181714; diff --git a/sql/updates/8843_world_scriptname.sql b/sql/updates/8843_world_scriptname.sql deleted file mode 100644 index 4517544d99d..00000000000 --- a/sql/updates/8843_world_scriptname.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE `gameobject_template` SET `ScriptName`='go_bristlelimb_cage' WHERE `entry`=181714; - diff --git a/sql/updates/CMakeLists.txt b/sql/updates/CMakeLists.txt index 0d2d6cd6bfa..fca7e740f90 100644 --- a/sql/updates/CMakeLists.txt +++ b/sql/updates/CMakeLists.txt @@ -4,6 +4,7 @@ add_subdirectory(3.1.3_old) add_subdirectory(3.2.2a_old) add_subdirectory(3.3.2_old) add_subdirectory(3.3.3a_old) +add_subdirectory(3.3.5a_old) FILE(GLOB _SQL_UPDATES *.sql) -- cgit v1.2.3 From 44e7a7b7e51404d49924cce9c9e8111b3795597f Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Jul 2010 12:47:07 -0600 Subject: * Rename SQL file --HG-- branch : trunk rename : sql/updates/3.3.5a_old/xxxx_realmd_realmlist.sql => sql/updates/3.3.5a_old/8861_realmd_realmlist.sql --- sql/updates/3.3.5a_old/8861_realmd_realmlist.sql | 3 +++ sql/updates/3.3.5a_old/xxxx_realmd_realmlist.sql | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 sql/updates/3.3.5a_old/8861_realmd_realmlist.sql delete mode 100644 sql/updates/3.3.5a_old/xxxx_realmd_realmlist.sql (limited to 'sql/updates') diff --git a/sql/updates/3.3.5a_old/8861_realmd_realmlist.sql b/sql/updates/3.3.5a_old/8861_realmd_realmlist.sql new file mode 100644 index 00000000000..c6622d5ce1e --- /dev/null +++ b/sql/updates/3.3.5a_old/8861_realmd_realmlist.sql @@ -0,0 +1,3 @@ +UPDATE `realmlist` SET `gamebuild`=12340 WHERE `id`=1; +ALTER TABLE `realmlist` CHANGE COLUMN `gamebuild` `gamebuild` int(11) unsigned NOT NULL default '12340'; + diff --git a/sql/updates/3.3.5a_old/xxxx_realmd_realmlist.sql b/sql/updates/3.3.5a_old/xxxx_realmd_realmlist.sql deleted file mode 100644 index c6622d5ce1e..00000000000 --- a/sql/updates/3.3.5a_old/xxxx_realmd_realmlist.sql +++ /dev/null @@ -1,3 +0,0 @@ -UPDATE `realmlist` SET `gamebuild`=12340 WHERE `id`=1; -ALTER TABLE `realmlist` CHANGE COLUMN `gamebuild` `gamebuild` int(11) unsigned NOT NULL default '12340'; - -- cgit v1.2.3 From 8353e4461115382ff909f27a6126a58a03a7962b Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 9 Jul 2010 02:33:42 -0600 Subject: * Proper naming for auth SQL file * Update base SQL file for new installs --HG-- branch : trunk rename : sql/updates/3.3.5a_old/8861_realmd_realmlist.sql => sql/updates/3.3.5a_old/8861_auth_realmlist.sql --- sql/base/auth_database.sql | 4 ++-- sql/updates/3.3.5a_old/8861_auth_realmlist.sql | 3 +++ sql/updates/3.3.5a_old/8861_realmd_realmlist.sql | 3 --- 3 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 sql/updates/3.3.5a_old/8861_auth_realmlist.sql delete mode 100644 sql/updates/3.3.5a_old/8861_realmd_realmlist.sql (limited to 'sql/updates') diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql index 50940b45705..459b3fa1468 100644 --- a/sql/base/auth_database.sql +++ b/sql/base/auth_database.sql @@ -196,7 +196,7 @@ CREATE TABLE `realmlist` ( `timezone` tinyint(3) unsigned NOT NULL default '0', `allowedSecurityLevel` tinyint(3) unsigned NOT NULL default '0', `population` float unsigned NOT NULL default '0', - `gamebuild` int(11) unsigned NOT NULL default '11723', + `gamebuild` int(11) unsigned NOT NULL default '12340', PRIMARY KEY (`id`), UNIQUE KEY `idx_name` (`name`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Realm System'; @@ -209,7 +209,7 @@ CREATE TABLE `realmlist` ( LOCK TABLES `realmlist` WRITE; /*!40000 ALTER TABLE `realmlist` DISABLE KEYS */; INSERT INTO `realmlist` (`id`,`name`,`address`,`port`,`icon`,`color`,`timezone`,`allowedSecurityLevel`,`population`,`gamebuild`) VALUES -(1,'Trinity','127.0.0.1',8085,1,0,1,0,0,11723); +(1,'Trinity','127.0.0.1',8085,1,0,1,0,0,12340); /*!40000 ALTER TABLE `realmlist` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/updates/3.3.5a_old/8861_auth_realmlist.sql b/sql/updates/3.3.5a_old/8861_auth_realmlist.sql new file mode 100644 index 00000000000..c6622d5ce1e --- /dev/null +++ b/sql/updates/3.3.5a_old/8861_auth_realmlist.sql @@ -0,0 +1,3 @@ +UPDATE `realmlist` SET `gamebuild`=12340 WHERE `id`=1; +ALTER TABLE `realmlist` CHANGE COLUMN `gamebuild` `gamebuild` int(11) unsigned NOT NULL default '12340'; + diff --git a/sql/updates/3.3.5a_old/8861_realmd_realmlist.sql b/sql/updates/3.3.5a_old/8861_realmd_realmlist.sql deleted file mode 100644 index c6622d5ce1e..00000000000 --- a/sql/updates/3.3.5a_old/8861_realmd_realmlist.sql +++ /dev/null @@ -1,3 +0,0 @@ -UPDATE `realmlist` SET `gamebuild`=12340 WHERE `id`=1; -ALTER TABLE `realmlist` CHANGE COLUMN `gamebuild` `gamebuild` int(11) unsigned NOT NULL default '12340'; - -- cgit v1.2.3 From fd3e4d5139edf7e6dd036315794e7eba3e8ff91f Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 13 Jul 2010 23:04:31 +0200 Subject: Add Stances and StancesNot fields to spell_dbc table --HG-- branch : trunk --- sql/base/world_database.sql | 2 ++ sql/updates/8890_world_spell_dbc.sql | 3 +++ src/server/game/DataStores/DBCfmt.h | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 sql/updates/8890_world_spell_dbc.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index 6bd4a008a8a..7f6dae9f01a 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -5205,6 +5205,8 @@ CREATE TABLE `spell_dbc` ( `AttributesEx3` int(10) unsigned NOT NULL DEFAULT '0', `AttributesEx4` int(10) unsigned NOT NULL DEFAULT '0', `AttributesEx5` int(10) unsigned NOT NULL DEFAULT '0', + `Stances` int(10) unsigned NOT NULL DEFAULT '0', + `StancesNot` int(10) unsigned NOT NULL DEFAULT '0', `Targets` int(10) unsigned NOT NULL DEFAULT '0', `CastingTimeIndex` tinyint(3) unsigned NOT NULL DEFAULT '1', `AuraInterruptFlags` int(10) unsigned NOT NULL DEFAULT '0', diff --git a/sql/updates/8890_world_spell_dbc.sql b/sql/updates/8890_world_spell_dbc.sql new file mode 100644 index 00000000000..a5e0927806f --- /dev/null +++ b/sql/updates/8890_world_spell_dbc.sql @@ -0,0 +1,3 @@ +ALTER TABLE `spell_dbc` + ADD COLUMN `Stances` int(10) unsigned NOT NULL DEFAULT '0' AFTER `AttributesEx5`, + ADD COLUMN `StancesNot` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Stances`; diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index c951e9fa3c2..80d8791bd01 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -95,7 +95,7 @@ const std::string CustomSpellDifficultyfmt="ppppp"; const std::string CustomSpellDifficultyIndex="id"; const char SpellDurationfmt[]="niii"; const char SpellEntryfmt[]="niiiiiiiiiiiixixiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiifxiiiiiiiiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiifffiiiiiiiiiiiiixssssssssssssssssxssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiiiiiiiiiiixfffxxxiiiiixxxxxxx"; -const std::string CustomSpellEntryfmt="pappppppppaaaaaapaaaaaaaaaaapaaapapppppppaaaaapaapaaaaaaaaaaaaaaaaaappppppppppppppppppppppppppppppppppppaaaaaapppppppppaaapppppppppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaappppppppapppaaaaappaaaaaaa"; +const std::string CustomSpellEntryfmt="pappppppppaapapapaaaaaaaaaaapaaapapppppppaaaaapaapaaaaaaaaaaaaaaaaaappppppppppppppppppppppppppppppppppppaaaaaapppppppppaaapppppppppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaappppppppapppaaaaappaaaaaaa"; const std::string CustomSpellEntryIndex = "Id"; const char SpellFocusObjectfmt[]="nxxxxxxxxxxxxxxxxx"; const char SpellItemEnchantmentfmt[]="nxiiiiiixxxiiissssssssssssssssxiiiiiii"; -- cgit v1.2.3 From 6385a48b4500514b20b91f0c4eb030b9c5a89ab3 Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 14 Jul 2010 09:51:18 +0200 Subject: Fixed base points for Heart of the Wild however this does not fix its incorrect amount as the issue is somewhere else Add forgotten Stances and StancesNot fields to data insert in world sql --HG-- branch : trunk --- sql/base/world_database.sql | 89 +++++++++++------------ sql/updates/8891_world_spell_dbc.sql | 2 + src/server/game/Spells/Auras/SpellAuraEffects.cpp | 10 +-- 3 files changed, 51 insertions(+), 50 deletions(-) create mode 100644 sql/updates/8891_world_spell_dbc.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index 7f6dae9f01a..2e075d2c89c 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -5297,51 +5297,50 @@ CREATE TABLE `spell_dbc` ( LOCK TABLES `spell_dbc` WRITE; /*!40000 ALTER TABLE `spell_dbc` DISABLE KEYS */; -INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES -(62388, 0, 0, 0, 0, 0, 0x00000000, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 21, 1, 0, -1, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Demonic Circle: Teleport(48020) - casterAuraSpell'), -(65142, 3, 22, 0, 0, 0, 0x00000080, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 21, 13, 0, -1, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 'Crypt Fever - SPELL_AURA_LINKED'), -(58888, 0, 0, 0, 0, 0, 0x04000000, 0, 0, 0, 1, 0, 0, 101, 0, 0, 68, 68, 0, 1, 0, -1, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58889, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 'Ritual of Souls Rank 2 - Trigger Create Soulwell (58889)'), -(34145, 0, 0, 0, 0, 0, 0x04000000, 0, 0, 0, 1, 0, 0, 101, 0, 0, 80, 80, 0, 1, 0, -1, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 'Ritual of Souls Rank 1 - Trigger Create Soulwell (29886)'), -(200000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 8, 1, 0, -1, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 'Drain Soul increased damage - serverside spell'), -(61988, 0, 0, 0x28000180, 0x10000400, 0x4, 0x10100000, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 25, 13, 0, -1, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Divine Shield Exclude Aura - 61988'), -(42876, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 9275 reward serverside spell'), -(44987, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11521 reward serverside spell'), -(48803, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 12214 reward serverside spell'), -(68496, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Item_template serverside spell'), -(72958, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Item_template serverside spell'), -(32780, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 10040 reward serverside spell'), -(45453, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11587 reward serverside spell'), -(25347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Item_template serverside spell'), -(45315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11566 reward serverside spell'), -(43236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11288 reward serverside spell'), -(43459, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11332 reward serverside spell'), -(43499, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11250 reward serverside spell'), -(44275, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11432 reward serverside spell'), -(64689, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 13854 and 13862 reward serverside spell'), -(50574, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 12597 reward serverside spell'), -(56817, 0, 0, 384, 0, 0, 0, 0, 0, 0, 1, 0, 16, 101, 1, 0, 67,67,1, 1, 0, -1, 0, 0, 6,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Rune strike proc'), -(58428, 0, 0, 671089024, 0, 0, 0, 0, 0, 0, 1, 0, 0, 100, 0, 0, 0, 0, 18, 1, 0, -1, 0, 0, 6, 0, 0, 1, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 226, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 'Overkill - aura remove spell'), -(71356, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Spelldifficulty_dbc id:2108 spellid0 serverside spell'), -(71803, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Spelldifficulty_dbc id:2108 spellid1 serverside spell'), -(72111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Spelldifficulty_dbc id:2136 spellid0 serverside spell'), -(72125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Spelldifficulty_dbc id:2136 spellid1 serverside spell'), -(70816, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Spelldifficulty_dbc id:2146 spellid0 serverside spell'), -(72233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Spelldifficulty_dbc id:2146 spellid1 serverside spell'), -(72234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Spelldifficulty_dbc id:2146 spellid2 serverside spell'), -(72235, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Spelldifficulty_dbc id:2146 spellid3 serverside spell'), -(24899, 0, 0, 400, 1024, 0, 0, 2097152, 0, 0, 1, 0, 0, 101, 0, 0, 0, 0, 21, 1, 0, -1, 0, 0, 6, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 137, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 'Heart of the Wild Bear Effect'), -(24900, 0, 0, 400, 1024, 0, 0, 2097152, 0, 0, 1, 0, 0, 101, 0, 0, 0, 0, 21, 1, 0, -1, 0, 0, 6, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 'Heart of the Wild Cat Effect'), -(43503, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11261 reward serverside spell'), -(39613, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 10967 reward serverside spell'), -(39616, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 10966 reward serverside spell'), -(34448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Serverside spell orb of translocation (gobjid=180911)' ), -(34452, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Serverside spell orb of translocation (gobjid=180912)' ), - -(11202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Item 3776 spellid_1 serverside spell'), -(25359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Item 21293 spellid_2 serverside spell'), -(40145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11000 RewSpellCast serverside spell'), -(45767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11670 RewSpellCast serverside spell'), -(71098, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 24451 RewSpellCast serverside spell'); +INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`Stances`,`StancesNot`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES +(62388, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 21, 1, 0, -1, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Demonic Circle: Teleport(48020) - casterAuraSpell'), +(65142, 3, 22, 0, 0, 0, 128, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 21, 13, 0, -1, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 'Crypt Fever - SPELL_AURA_LINKED'), +(34145, 0, 0, 0, 0, 0, 67108864, 0, 0, 0, 0, 0, 1, 0, 0, 101, 0, 0, 80, 80, 0, 1, 0, -1, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 'Ritual of Souls Rank 1 - Trigger Create Soulwell (29886)'), +(58888, 0, 0, 0, 0, 0, 67108864, 0, 0, 0, 0, 0, 1, 0, 0, 101, 0, 0, 68, 68, 0, 1, 0, -1, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58889, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 'Ritual of Souls Rank 2 - Trigger Create Soulwell (58889)'), +(61988, 0, 0, 671089024, 268436480, 4, 269484032, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 25, 13, 0, -1, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Divine Shield Exclude Aura - 61988'), +(200000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 8, 1, 0, -1, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 'Drain Soul increased damage - serverside spell'), +(42876, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 9275 reward serverside spell'), +(44987, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11521 reward serverside spell'), +(48803, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 12214 reward serverside spell'), +(68496, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Item_template serverside spell'), +(72958, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Item_template serverside spell'), +(32780, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 10040 reward serverside spell'), +(45453, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11587 reward serverside spell'), +(25347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Item_template serverside spell'), +(45315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11566 reward serverside spell'), +(43236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11288 reward serverside spell'), +(43459, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11332 reward serverside spell'), +(43499, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11250 reward serverside spell'), +(44275, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11432 reward serverside spell'), +(64689, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 13854 and 13862 reward serverside spell'), +(50574, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 12597 reward serverside spell'), +(71356, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Spelldifficulty_dbc id:2108 spellid0 serverside spell'), +(71803, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Spelldifficulty_dbc id:2108 spellid1 serverside spell'), +(72111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Spelldifficulty_dbc id:2136 spellid0 serverside spell'), +(72125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Spelldifficulty_dbc id:2136 spellid1 serverside spell'), +(70816, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Spelldifficulty_dbc id:2146 spellid0 serverside spell'), +(72233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Spelldifficulty_dbc id:2146 spellid1 serverside spell'), +(72234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Spelldifficulty_dbc id:2146 spellid2 serverside spell'), +(72235, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Spelldifficulty_dbc id:2146 spellid3 serverside spell'), +(58428, 0, 0, 671089024, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 100, 0, 0, 0, 0, 18, 1, 0, -1, 0, 0, 6, 0, 0, 1, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 226, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 'Overkill - aura remove spell'), +(56817, 0, 0, 384, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 16, 101, 1, 0, 67, 67, 1, 1, 0, -1, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Rune strike proc'), +(24899, 0, 0, 400, 1024, 0, 0, 2097152, 0, 144, 0, 0, 1, 0, 0, 101, 0, 0, 0, 0, 21, 1, 0, -1, 0, 0, 6, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 137, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 'Heart of the Wild Bear Effect'), +(24900, 0, 0, 400, 1024, 0, 0, 2097152, 0, 1, 0, 0, 1, 0, 0, 101, 0, 0, 0, 0, 21, 1, 0, -1, 0, 0, 6, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 'Heart of the Wild Cat Effect'), +(43503, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11261 reward serverside spell'), +(39613, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 10967 reward serverside spell'), +(34448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Serverside spell orb of translocation (gobjid=180911)'), +(34452, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Serverside spell orb of translocation (gobjid=180912)'), +(39616, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 10966 reward serverside spell'), +(11202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Item 3776 spellid_1 serverside spell'), +(25359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Item 21293 spellid_2 serverside spell'), +(40145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11000 RewSpellCast serverside spell'), +(45767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11670 RewSpellCast serverside spell'), +(71098, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 24451 RewSpellCast serverside spell'); /*!40000 ALTER TABLE `spell_dbc` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/updates/8891_world_spell_dbc.sql b/sql/updates/8891_world_spell_dbc.sql new file mode 100644 index 00000000000..6adb4e5fd28 --- /dev/null +++ b/sql/updates/8891_world_spell_dbc.sql @@ -0,0 +1,2 @@ +UPDATE `spell_dbc` SET `Stances`=0x90 WHERE `Id`=24899; +UPDATE `spell_dbc` SET `Stances`=0x1 WHERE `Id`=24900; diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 69c576a5363..91bfa9a36fa 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -2505,14 +2505,14 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const } // Heart of the Wild if (HotWSpellId) - { + { // hacky, but the only way as spell family is not SPELLFAMILY_DRUID Unit::AuraEffectList const& mModTotalStatPct = target->GetAuraEffectsByType(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE); for (Unit::AuraEffectList::const_iterator i = mModTotalStatPct.begin(); i != mModTotalStatPct.end(); ++i) { // Heart of the Wild if ((*i)->GetSpellProto()->SpellIconID == 240 && (*i)->GetMiscValue() == 3) { - int32 HotWMod = (*i)->GetSpellProto()->EffectBasePoints[1] + 1; + int32 HotWMod = (*i)->GetSpellProto()->EffectBasePoints[1]+1+1; // +1 for base points and +1 for SetSpellValue (where 1 is substracted) target->CastCustomSpell(target, HotWSpellId, &HotWMod, NULL, NULL, true, NULL, this); break; @@ -2522,11 +2522,11 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const switch(GetMiscValue()) { case FORM_CAT: - // Savage Roar + // Savage Roar if (AuraEffect const * aurEff = target->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_DRUID, 0 , 0x10000000, 0)) target->CastSpell(target, 62071, true); // Nurturing Instinct - if (AuraEffect const * aurEff = target->GetAuraEffect(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, SPELLFAMILY_DRUID, 2254,0)) + if (AuraEffect const * aurEff = target->GetAuraEffect(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, SPELLFAMILY_DRUID, 2254, 0)) { uint32 spellId = 0; switch (aurEff->GetId()) @@ -2556,7 +2556,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const target->CastCustomSpell(target, 48418, &bp, NULL, NULL, true); } // Survival of the Fittest - if (AuraEffect const * aurEff = target->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE,SPELLFAMILY_DRUID, 961, 0)) + if (AuraEffect const * aurEff = target->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, SPELLFAMILY_DRUID, 961, 0)) { int32 bp = 100 + aurEff->GetSpellProto()->CalculateSimpleValue(2); target->CastCustomSpell(target, 62069, &bp, NULL, NULL, true, 0, this); -- cgit v1.2.3 From 894a0652031f509da3689fb4b359b3cfe94073f0 Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 15 Jul 2010 10:12:51 +0200 Subject: Revert revisions 67325b1a0af0 and a0cba24b9060. Made vendors ignore gold cost by default when extended cost is set, except when item has ITEM_FLAGS_EXTRA_EXT_COST_REQUIRES_GOLD flag --HG-- branch : trunk --- sql/updates/8897_world_npc_vendor.sql | 5 ++++ sql/updates/8897_world_trinity_string.sql | 2 ++ src/server/game/Chat/Commands/Level2.cpp | 2 +- src/server/game/Entities/Creature/Creature.cpp | 2 +- src/server/game/Entities/Creature/Creature.h | 11 ++++--- src/server/game/Entities/Item/ItemPrototype.h | 2 +- src/server/game/Entities/Player/Player.cpp | 24 +++++++-------- src/server/game/Globals/ObjectMgr.cpp | 34 +++++++++++----------- src/server/game/Globals/ObjectMgr.h | 6 ++-- .../game/Server/Protocol/Handlers/ItemHandler.cpp | 4 +-- 10 files changed, 49 insertions(+), 43 deletions(-) create mode 100644 sql/updates/8897_world_npc_vendor.sql create mode 100644 sql/updates/8897_world_trinity_string.sql (limited to 'sql/updates') diff --git a/sql/updates/8897_world_npc_vendor.sql b/sql/updates/8897_world_npc_vendor.sql new file mode 100644 index 00000000000..0e1c793863d --- /dev/null +++ b/sql/updates/8897_world_npc_vendor.sql @@ -0,0 +1,5 @@ +-- Restore negative ExtendedCost, we now use FlagsExtra value instead +UPDATE `npc_vendor` SET `ExtendedCost`=-`ExtendedCost` WHERE `ExtendedCost`<0; + +-- Set field type to unsigned +ALTER TABLE npc_vendor CHANGE COLUMN `ExtendedCost` `ExtendedCost` mediumint(8) UNSIGNED NOT NULL default '0' COMMENT ''; diff --git a/sql/updates/8897_world_trinity_string.sql b/sql/updates/8897_world_trinity_string.sql new file mode 100644 index 00000000000..691b0723a5b --- /dev/null +++ b/sql/updates/8897_world_trinity_string.sql @@ -0,0 +1,2 @@ +-- UPDATE so we don't kill customized locale strings if user has any +UPDATE `trinity_string` SET `content_default`='Item ''%u'' (with extended cost %u) already in vendor list.' WHERE `entry`=210; diff --git a/src/server/game/Chat/Commands/Level2.cpp b/src/server/game/Chat/Commands/Level2.cpp index ea0865a88e1..77716e25954 100644 --- a/src/server/game/Chat/Commands/Level2.cpp +++ b/src/server/game/Chat/Commands/Level2.cpp @@ -1051,7 +1051,7 @@ bool ChatHandler::HandleNpcAddVendorItemCommand(const char* args) incrtime = atol(fincrtime); char* fextendedcost = strtok(NULL, " "); //add ExtendedCost, default: 0 - int32 extendedcost = fextendedcost ? atol(fextendedcost) : 0; + uint32 extendedcost = fextendedcost ? atol(fextendedcost) : 0; Creature* vendor = getSelectedCreature(); diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 1d66385dada..7e79dc42664 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -76,7 +76,7 @@ bool VendorItemData::RemoveItem(uint32 item_id) return found; } -VendorItem const* VendorItemData::FindItemCostPair(uint32 item_id, int32 extendedCost) const +VendorItem const* VendorItemData::FindItemCostPair(uint32 item_id, uint32 extendedCost) const { for (VendorItemList::const_iterator i = m_items.begin(); i != m_items.end(); ++i) if((*i)->item == item_id && (*i)->ExtendedCost == extendedCost) diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 9f58079efd0..203106f635e 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -307,17 +307,16 @@ enum ChatType // Vendors struct VendorItem { - VendorItem(uint32 _item, int32 _maxcount, uint32 _incrtime, int32 _ExtendedCost) + VendorItem(uint32 _item, int32 _maxcount, uint32 _incrtime, uint32 _ExtendedCost) : item(_item), maxcount(_maxcount), incrtime(_incrtime), ExtendedCost(_ExtendedCost) {} uint32 item; int32 maxcount; // 0 for infinity item amount uint32 incrtime; // time for restore items amount if maxcount != 0 - int32 ExtendedCost; + uint32 ExtendedCost; //helpers - bool IsExcludeMoneyPrice() const { return ExtendedCost > 0; } - uint32 GetExtendedCostId() const { return std::abs(ExtendedCost); } + bool IsGoldRequired(ItemPrototype const* pProto) const { return pProto->Flags2 & ITEM_FLAGS_EXTRA_EXT_COST_REQUIRES_GOLD || !ExtendedCost; } }; typedef std::vector VendorItemList; @@ -332,12 +331,12 @@ struct VendorItemData } bool Empty() const { return m_items.empty(); } uint8 GetItemCount() const { return m_items.size(); } - void AddItem(uint32 item, int32 maxcount, uint32 ptime, int32 ExtendedCost) + void AddItem(uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost) { m_items.push_back(new VendorItem(item, maxcount, ptime, ExtendedCost)); } bool RemoveItem(uint32 item_id); - VendorItem const* FindItemCostPair(uint32 item_id, int32 extendedCost) const; + VendorItem const* FindItemCostPair(uint32 item_id, uint32 extendedCost) const; void Clear() { for (VendorItemList::const_iterator itr = m_items.begin(); itr != m_items.end(); ++itr) diff --git a/src/server/game/Entities/Item/ItemPrototype.h b/src/server/game/Entities/Item/ItemPrototype.h index 7f4dc97df00..1a91ad10c6b 100644 --- a/src/server/game/Entities/Item/ItemPrototype.h +++ b/src/server/game/Entities/Item/ItemPrototype.h @@ -136,7 +136,7 @@ enum ItemFlagsExtra { ITEM_FLAGS_EXTRA_HORDE_ONLY = 0x00000001, ITEM_FLAGS_EXTRA_ALLIANCE_ONLY = 0x00000002, - ITEM_FLAGS_EXTRA_REFUNDABLE = 0x00000004, + ITEM_FLAGS_EXTRA_EXT_COST_REQUIRES_GOLD = 0x00000004, // when item uses extended cost, gold is also required ITEM_FLAGS_EXTRA_NEED_ROLL_DISABLED = 0x00000100 }; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 0a14be4d35e..b491eec7508 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -19655,12 +19655,12 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 return false; } - if (uint32 extendedCostId = crItem->GetExtendedCostId()) + if (crItem->ExtendedCost) { - ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(extendedCostId); + ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(crItem->ExtendedCost); if (!iece) { - sLog.outError("Item %u have wrong ExtendedCost field value %u", pProto->ItemId, extendedCostId); + sLog.outError("Item %u have wrong ExtendedCost field value %u", pProto->ItemId, crItem->ExtendedCost); return false; } @@ -19697,7 +19697,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 } } - int32 price = crItem->IsExcludeMoneyPrice() ? 0 : pProto->BuyPrice * count; + int32 price = crItem->IsGoldRequired(pProto) ? pProto->BuyPrice * count : 0; // reputation discount if (price) @@ -19721,9 +19721,9 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 ModifyMoney(-(int32)price); - if (uint32 extendedCostId = crItem->GetExtendedCostId()) // case for new honor system + if (crItem->ExtendedCost) // case for new honor system { - ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(extendedCostId); + ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(crItem->ExtendedCost); if (iece->reqhonorpoints) ModifyHonorPoints(- int32(iece->reqhonorpoints * count)); @@ -19749,11 +19749,11 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 GetSession()->SendPacket(&data); SendNewItem(it, pProto->BuyCount*count, true, false, false); - if (it->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_REFUNDABLE) && crItem->GetExtendedCostId()) + if (it->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_REFUNDABLE) && crItem->ExtendedCost) { it->SetRefundRecipient(GetGUIDLow()); it->SetPaidMoney(price); - it->SetPaidExtendedCost(crItem->GetExtendedCostId()); + it->SetPaidExtendedCost(crItem->ExtendedCost); it->SaveRefundDataToDB(); AddRefundReference(it->GetGUIDLow()); } @@ -19776,9 +19776,9 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 } ModifyMoney(-(int32)price); - if (uint32 extendedCostId = crItem->GetExtendedCostId()) // case for new honor system + if (crItem->ExtendedCost) // case for new honor system { - ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(extendedCostId); + ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(crItem->ExtendedCost); if (iece->reqhonorpoints) ModifyHonorPoints(- int32(iece->reqhonorpoints * count)); @@ -19807,11 +19807,11 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 AutoUnequipOffhandIfNeed(); - if (it->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_REFUNDABLE) && crItem->GetExtendedCostId()) + if (it->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_REFUNDABLE) && crItem->ExtendedCost) { it->SetRefundRecipient(GetGUIDLow()); it->SetPaidMoney(price); - it->SetPaidExtendedCost(crItem->GetExtendedCostId()); + it->SetPaidExtendedCost(crItem->ExtendedCost); it->SaveRefundDataToDB(); AddRefundReference(it->GetGUIDLow()); } diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index a5c084c3a5d..b7ff12e2176 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -8089,14 +8089,14 @@ int ObjectMgr::LoadReferenceVendor(int32 vendor, int32 item, std::set *s { int32 maxcount = fields[1].GetInt32(); uint32 incrtime = fields[2].GetUInt32(); - int32 ExtendedCost = fields[3].GetUInt32(); + uint32 ExtendedCost = fields[3].GetUInt32(); - if (!IsVendorItemValid(vendor,item_id,maxcount,incrtime,ExtendedCost,NULL,skip_vendors)) + if (!IsVendorItemValid(vendor, item_id, maxcount, incrtime, ExtendedCost, NULL, skip_vendors)) continue; VendorItemData& vList = m_mCacheVendorItemMap[vendor]; - vList.AddItem(item_id,maxcount,incrtime,ExtendedCost); + vList.AddItem(item_id, maxcount, incrtime, ExtendedCost); ++count; } @@ -8144,14 +8144,14 @@ void ObjectMgr::LoadVendors() { int32 maxcount = fields[2].GetInt32(); uint32 incrtime = fields[3].GetUInt32(); - int32 ExtendedCost = fields[4].GetUInt32(); + uint32 ExtendedCost = fields[4].GetUInt32(); - if (!IsVendorItemValid(entry,item_id,maxcount,incrtime,ExtendedCost,NULL,&skip_vendors)) + if (!IsVendorItemValid(entry, item_id, maxcount, incrtime, ExtendedCost, NULL, &skip_vendors)) continue; VendorItemData& vList = m_mCacheVendorItemMap[entry]; - vList.AddItem(item_id,maxcount,incrtime,ExtendedCost); + vList.AddItem(item_id, maxcount, incrtime, ExtendedCost); ++count; } @@ -8358,12 +8358,13 @@ void ObjectMgr::LoadGossipMenuItems() sLog.outString(">> Loaded %u gossip_menu_option entries", count); } -void ObjectMgr::AddVendorItem(uint32 entry,uint32 item, int32 maxcount, uint32 incrtime, int32 extendedcost, bool savetodb) +void ObjectMgr::AddVendorItem(uint32 entry,uint32 item, int32 maxcount, uint32 incrtime, uint32 extendedcost, bool savetodb) { VendorItemData& vList = m_mCacheVendorItemMap[entry]; - vList.AddItem(item,maxcount,incrtime,extendedcost); + vList.AddItem(item, maxcount, incrtime, extendedcost); - if (savetodb) WorldDatabase.PExecuteLog("INSERT INTO npc_vendor (entry,item,maxcount,incrtime,extendedcost) VALUES('%u','%u','%u','%u','%i')",entry, item, maxcount,incrtime,extendedcost); + if (savetodb) + WorldDatabase.PExecuteLog("INSERT INTO npc_vendor (entry,item,maxcount,incrtime,extendedcost) VALUES('%u','%u','%u','%u','%i')", entry, item, maxcount, incrtime, extendedcost); } bool ObjectMgr::RemoveVendorItem(uint32 entry,uint32 item, bool savetodb) @@ -8379,7 +8380,7 @@ bool ObjectMgr::RemoveVendorItem(uint32 entry,uint32 item, bool savetodb) return true; } -bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 maxcount, uint32 incrtime, int32 ExtendedCost, Player* pl, std::set* skip_vendors, uint32 ORnpcflag) const +bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 maxcount, uint32 incrtime, uint32 ExtendedCost, Player* pl, std::set* skip_vendors, uint32 ORnpcflag) const { CreatureInfo const* cInfo = GetCreatureTemplate(vendor_entry); if (!cInfo) @@ -8411,17 +8412,16 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (pl) ChatHandler(pl).PSendSysMessage(LANG_ITEM_NOT_FOUND, item_id); else - sLog.outErrorDb("Table `(game_event_)npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u), ignore",vendor_entry,item_id); + sLog.outErrorDb("Table `(game_event_)npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u), ignore", vendor_entry, item_id); return false; } - uint32 extendedCostId = std::abs(ExtendedCost); - if (extendedCostId && !sItemExtendedCostStore.LookupEntry(extendedCostId)) + if (ExtendedCost && !sItemExtendedCostStore.LookupEntry(ExtendedCost)) { if (pl) - ChatHandler(pl).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST,extendedCostId); + ChatHandler(pl).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST, ExtendedCost); else - sLog.outErrorDb("Table `(game_event_)npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore",item_id,extendedCostId,vendor_entry); + sLog.outErrorDb("Table `(game_event_)npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore", item_id, ExtendedCost, vendor_entry); return false; } @@ -8449,9 +8449,9 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (vItems->FindItemCostPair(item_id, ExtendedCost)) { if (pl) - ChatHandler(pl).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, item_id, extendedCostId); + ChatHandler(pl).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, item_id, ExtendedCost); else - sLog.outErrorDb( "Table `npc_vendor` has duplicate items %u (with extended cost %u) for vendor (Entry: %u), ignoring", item_id, extendedCostId, vendor_entry); + sLog.outErrorDb( "Table `npc_vendor` has duplicate items %u (with extended cost %u) for vendor (Entry: %u), ignoring", item_id, ExtendedCost, vendor_entry); return false; } diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 320bf12cb21..7b7e0e2bdb9 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -882,9 +882,9 @@ class ObjectMgr return &iter->second; } - void AddVendorItem(uint32 entry,uint32 item, int32 maxcount, uint32 incrtime, int32 ExtendedCost, bool savetodb = true); // for event - bool RemoveVendorItem(uint32 entry,uint32 item, bool savetodb = true); // for event - bool IsVendorItemValid(uint32 vendor_entry, uint32 item, int32 maxcount, uint32 ptime, int32 ExtendedCost, Player* pl = NULL, std::set* skip_vendors = NULL, uint32 ORnpcflag = 0) const; + void AddVendorItem(uint32 entry,uint32 item, int32 maxcount, uint32 incrtime, uint32 ExtendedCost, bool savetodb = true); // for event + bool RemoveVendorItem(uint32 entry, uint32 item, bool savetodb = true); // for event + bool IsVendorItemValid(uint32 vendor_entry, uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* pl = NULL, std::set* skip_vendors = NULL, uint32 ORnpcflag = 0) const; void LoadScriptNames(); ScriptNameMap &GetScriptNames() { return m_scriptNames; } diff --git a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp index d969013801b..39c3b61a445 100644 --- a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp @@ -772,7 +772,7 @@ void WorldSession::SendListInventory(uint64 vendorguid) ++count; // reputation discount - int32 price = crItem->IsExcludeMoneyPrice() ? 0 : uint32(floor(pProto->BuyPrice * discountMod)); + int32 price = crItem->IsGoldRequired(pProto) ? uint32(floor(pProto->BuyPrice * discountMod)) : 0; data << uint32(vendorslot+1); // client expects counting to start at 1 data << uint32(crItem->item); @@ -781,7 +781,7 @@ void WorldSession::SendListInventory(uint64 vendorguid) data << uint32(price); data << uint32(pProto->MaxDurability); data << uint32(pProto->BuyCount); - data << uint32(crItem->GetExtendedCostId()); + data << uint32(crItem->ExtendedCost); } } } -- cgit v1.2.3 From a7b7073cc572c775e02f1143b99440329253d58d Mon Sep 17 00:00:00 2001 From: QAston Date: Fri, 16 Jul 2010 15:48:31 +0200 Subject: *Item - Coliseum 25 Heroic Caster Trinket - patch by microbius51 --HG-- branch : trunk --- sql/updates/8905_world_spell_proc_event.sql | 3 +++ src/server/game/Entities/Unit/Unit.cpp | 18 ++++++++++++++++++ src/server/game/Spells/Auras/SpellAuraEffects.cpp | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 sql/updates/8905_world_spell_proc_event.sql (limited to 'sql/updates') diff --git a/sql/updates/8905_world_spell_proc_event.sql b/sql/updates/8905_world_spell_proc_event.sql new file mode 100644 index 00000000000..7429a6a06b4 --- /dev/null +++ b/sql/updates/8905_world_spell_proc_event.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_proc_event` WHERE `entry` IN(67758); +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(67758,0,0,0,0,0,0,2,0,0,2); diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 15aadf32502..6a44506232d 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -8215,6 +8215,24 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig target = pVictim; break; } + //Item - Coliseum 25 Heroic Caster Trinket + case 67758: + { + if(!pVictim || !pVictim->isAlive()) + return false; + // stacking + CastSpell(this, 67759, true, NULL, triggeredByAura); + + Aura * dummy = GetAura(67759); + // release at 3 aura in stack (cont contain in basepoint of trigger aura) + if(!dummy || dummy->GetStackAmount() < triggerAmount) + return false; + + RemoveAurasDueToSpell(67759); + trigger_spell_id = 67760; + target = pVictim; + break; + } default: // Illumination if (auraSpellInfo->SpellIconID == 241) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 19c1e7ffee6..11467543cab 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -356,7 +356,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]= &AuraEffect::HandleNoImmediateEffect, //300 SPELL_AURA_SHARE_DAMAGE_PCT implemented in Unit::DealDamage &AuraEffect::HandleNoImmediateEffect, //301 SPELL_AURA_SCHOOL_HEAL_ABSORB implemented in Unit::CalcHealAbsorb &AuraEffect::HandleNULL, //302 0 spells in 3.3.5 - &AuraEffect::HandleNULL, //303 SPELL_AURA_MOD_DMG_VESRUS_AURASTATE_PCT? - 22 and 19 look like serverside aurastates (22 - dark, gas cloud, 19 light, ooze) + &AuraEffect::HandleNULL, //303 SPELL_AURA_MOD_DMG_VERSUS_AURASTATE_PCT? - 22 and 19 look like serverside aurastates (22 - dark, gas cloud, 19 light, ooze) &AuraEffect::HandleUnused, //304 clientside &AuraEffect::HandleAuraModIncreaseSpeed, //305 SPELL_AURA_MOD_MINIMUM_SPEED &AuraEffect::HandleNULL, //306 0 spells in 3.3.5 -- cgit v1.2.3 From d005e14faf674f7195725894ad30f760dae9872d Mon Sep 17 00:00:00 2001 From: QAston Date: Fri, 16 Jul 2010 17:25:14 +0200 Subject: *Update spell_proc_event entry for Everlastin Affliction - by francesco.buldo. *Manually add corruption to list of spells affected by Everlasting Affliction. --HG-- branch : trunk --- sql/base/world_database.sql | 11 ++++++----- sql/updates/8906_world_spell_proc_event.sql | 7 +++++++ src/server/game/Spells/SpellMgr.cpp | 9 +++++++++ 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 sql/updates/8906_world_spell_proc_event.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index 2e075d2c89c..702210f9f6e 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -6830,11 +6830,11 @@ INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFam ( 47195, 0x00, 5, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 30), -- Eradication (Rank 1) ( 47196, 0x00, 5, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 30), -- Eradication (Rank 2) ( 47197, 0x00, 5, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 30), -- Eradication (Rank 3) -( 47201, 0x00, 5, 0x00000008, 0x00040000, 0x00000000, 0x00000000, 0x00010000, 0, 0, 0), -- Everlasting Affliction (1) -( 47202, 0x00, 5, 0x00000008, 0x00040000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Everlasting Affliction (2) -( 47203, 0x00, 5, 0x00000008, 0x00040000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Everlasting Affliction (3) -( 47204, 0x00, 5, 0x00000008, 0x00040000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Everlasting Affliction (4) -( 47205, 0x00, 5, 0x00000008, 0x00040000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Everlasting Affliction (5) +( 47201, 0x00, 5, 0x00004009, 0x00040000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Everlasting Affliction (1) +( 47202, 0x00, 5, 0x00004009, 0x00040000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Everlasting Affliction (2) +( 47203, 0x00, 5, 0x00004009, 0x00040000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Everlasting Affliction (3) +( 47204, 0x00, 5, 0x00004009, 0x00040000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Everlasting Affliction (4) +( 47205, 0x00, 5, 0x00004009, 0x00040000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Everlasting Affliction (5) ( 47245, 0x00, 5, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0, 0, 0), -- Molten Core (Rank 1) ( 47246, 0x00, 5, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0, 0, 0), -- Molten Core (Rank 2) ( 47247, 0x00, 5, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0, 0, 0), -- Molten Core (Rank 3) @@ -7262,6 +7262,7 @@ INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFam ( 67667, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0, 0, 45), -- Item - Coliseum Healer Trinket 5men ( 67670, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000000, 0, 0, 45), -- Item - Coliseum Caster Trinket 5men ( 67672, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00800154, 0x00000000, 0, 0, 45), -- Item - Coliseum Melee Trinket 5men +( 67758, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 2), -- Item - Coliseum 25 Heroic Caster Trinket ( 67771, 0x01, 0, 0x00000000, 0x00000000, 0x00000000, 0x00851154, 0x00000003, 0, 35, 45), -- Item - Coliseum Melee Trinket 10men ( 67702, 0x01, 0, 0x00000000, 0x00000000, 0x00000000, 0x00851154, 0x00000003, 0, 35, 45), -- Item - Coliseum Melee Trinket 25men ( 70807, 0x00, 11, 0x00000000, 0x00000000, 0x00000010, 0x00000000, 0x00000000, 0, 100, 0), -- Item - Shaman T10 Restoration 2P Bonus diff --git a/sql/updates/8906_world_spell_proc_event.sql b/sql/updates/8906_world_spell_proc_event.sql new file mode 100644 index 00000000000..2d5c35c02a5 --- /dev/null +++ b/sql/updates/8906_world_spell_proc_event.sql @@ -0,0 +1,7 @@ +DELETE FROM `spell_proc_event` WHERE `entry` IN (47201,47202,47203,47204,47205); +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(47201,0,5,0x00004009,0x00040000,0x00000000,0x00000000,0x0000000,0,0,0), +(47202,0,5,0x00004009,0x00040000,0x00000000,0x00000000,0x0000000,0,0,0), +(47203,0,5,0x00004009,0x00040000,0x00000000,0x00000000,0x0000000,0,0,0), +(47204,0,5,0x00004009,0x00040000,0x00000000,0x00000000,0x0000000,0,0,0), +(47205,0,5,0x00004009,0x00040000,0x00000000,0x00000000,0x0000000,0,0,0); \ No newline at end of file diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 2d2d28b2012..6c9455bad99 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -3705,6 +3705,15 @@ void SpellMgr::LoadSpellCustomAttr() spellInfo->procCharges = 6; count++; break; + case 47201: // Everlasting Affliction + case 47202: + case 47203: + case 47204: + case 47205: + // add corruption to affected spells + spellInfo->EffectSpellClassMask[1][0] |= 2; + count++; + break; case 51852: // The Eye of Acherus (no spawn in phase 2 in db) spellInfo->EffectMiscValue[0] |= 1; count++; -- cgit v1.2.3 From a4d0542f192240841da11982d85ed6cd27a1f864 Mon Sep 17 00:00:00 2001 From: click Date: Mon, 19 Jul 2010 03:49:15 +0200 Subject: Clean up level0.cpp and return proper errormessages (fix by ogeraisi) Closes issue #286 --HG-- branch : trunk --- sql/base/world_database.sql | 3 +- sql/updates/8915_world_trinity_string.sql | 4 ++ src/server/game/Chat/Commands/Level0.cpp | 64 +++++++++++++++++-------------- src/server/game/Miscellaneous/Language.h | 3 +- 4 files changed, 44 insertions(+), 30 deletions(-) create mode 100644 sql/updates/8915_world_trinity_string.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index 32e82380dd0..a0c566f550c 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -14636,7 +14636,7 @@ INSERT INTO `trinity_string` (`entry`,`content_default`,`content_loc1`,`content_ (24, 'You used it recently.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (25, 'Password not changed (unknown error)!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (26, 'The password was changed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), -(27, 'The new passwords do not match or the old password is wrong', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(27, 'The old password is wrong', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (28, 'Your account is now locked.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (29, 'Your account is now unlocked.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (30, ', rank ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), @@ -14671,6 +14671,7 @@ INSERT INTO `trinity_string` (`entry`,`content_default`,`content_loc1`,`content_ (59, 'Using creature EventAI: %s', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (60, 'Online players: %u (max: %u)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (61, 'Up to %u expansion allowed now.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(62, 'One on more parameters have incorrect values', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (100, 'Global notify: ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (101, 'Map: %u (%s) Zone: %u (%s) Area: %u (%s) Phase: %u\nX: %f Y: %f Z: %f Orientation: %f\ngrid[%u,%u]cell[%u,%u] InstanceID: %u\n ZoneX: %f ZoneY: %f\nGroundZ: %f FloorZ: %f Have height data (Map: %u VMap: %u)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (102, '%s is already being teleported.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), diff --git a/sql/updates/8915_world_trinity_string.sql b/sql/updates/8915_world_trinity_string.sql new file mode 100644 index 00000000000..49676b0870a --- /dev/null +++ b/sql/updates/8915_world_trinity_string.sql @@ -0,0 +1,4 @@ +-- UPDATE so we don't kill customized locale strings if user has any +UPDATE `trinity_string` SET `content_default`='The old password is wrong' WHERE `entry`=27; +-- INSERT as this string has not been used before +INSERT INTO `trinity_string` VALUES (62, 'One on more parameters have incorrect values', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); diff --git a/src/server/game/Chat/Commands/Level0.cpp b/src/server/game/Chat/Commands/Level0.cpp index be039479092..ff266caa328 100644 --- a/src/server/game/Chat/Commands/Level0.cpp +++ b/src/server/game/Chat/Commands/Level0.cpp @@ -87,7 +87,7 @@ bool ChatHandler::HandleStartCommand(const char* /*args*/) } // cast spell Stuck - chr->CastSpell(chr,7355,false); + chr->CastSpell(chr, 7355, false); return true; } @@ -103,14 +103,6 @@ bool ChatHandler::HandleServerInfoCommand(const char* /*args*/) uint32 updateTime = sWorld.GetUpdateTime(); PSendSysMessage(_FULLVERSION); - //if (m_session) - // full = _FULLVERSION(REVISION_DATE,REVISION_TIME,"|cffffffff|Hurl:" REVISION_ID "|h" REVISION_ID "|h|r"); - //else - // full = _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_ID); - - //SendSysMessage(full); - //PSendSysMessage(LANG_USING_WORLD_DB,sWorld.GetDBVersion()); - //PSendSysMessage(LANG_USING_EVENT_AI,sWorld.GetCreatureEventAIVersion()); PSendSysMessage(LANG_CONNECTED_PLAYERS, PlayersNum, MaxPlayersNum); PSendSysMessage(LANG_CONNECTED_USERS, activeClientsNum, maxActiveClientsNum, queuedClientsNum, maxQueuedClientsNum); PSendSysMessage(LANG_UPTIME, uptime.c_str()); @@ -143,9 +135,9 @@ bool ChatHandler::HandleDismountCommand(const char* /*args*/) bool ChatHandler::HandleSaveCommand(const char* /*args*/) { - Player *player=m_session->GetPlayer(); + Player *player = m_session->GetPlayer(); - // save GM account without delay and output message (testing, etc) + // save GM account without delay and output message if (m_session->GetSecurity() > SEC_PLAYER) { player->SaveToDB(); @@ -153,7 +145,7 @@ bool ChatHandler::HandleSaveCommand(const char* /*args*/) return true; } - // save or plan save after 20 sec (logout delay) if current next save time more this value and _not_ output any messages to prevent cheat planning + // save if the player has last been saved over 20 seconds ago uint32 save_interval = sWorld.getConfig(CONFIG_INTERVAL_SAVE); if ((save_interval == 0 || save_interval > 20*IN_MILLISECONDS && player->GetSaveTimer() <= save_interval - 20*IN_MILLISECONDS)) player->SaveToDB(); @@ -192,35 +184,42 @@ bool ChatHandler::HandleGMListIngameCommand(const char* /*args*/) bool ChatHandler::HandleAccountPasswordCommand(const char* args) { if (!*args) + { + SendSysMessage(LANG_CMD_SYNTAX); + SetSentErrorMessage(true); return false; + } - char *old_pass = strtok ((char*)args, " "); - char *new_pass = strtok (NULL, " "); - char *new_pass_c = strtok (NULL, " "); + char *old_pass = strtok((char*)args, " "); + char *new_pass = strtok(NULL, " "); + char *new_pass_c = strtok(NULL, " "); if (!old_pass || !new_pass || !new_pass_c) + { + SendSysMessage(LANG_CMD_SYNTAX); + SetSentErrorMessage(true); return false; + } std::string password_old = old_pass; std::string password_new = new_pass; std::string password_new_c = new_pass_c; - if (strcmp(new_pass, new_pass_c) != 0) + if (!accmgr.CheckPassword(m_session->GetAccountId(), password_old)) { - SendSysMessage (LANG_NEW_PASSWORDS_NOT_MATCH); - SetSentErrorMessage (true); + SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD); + SetSentErrorMessage(true); return false; } - if (!accmgr.CheckPassword (m_session->GetAccountId(), password_old)) + if (strcmp(new_pass, new_pass_c) != 0) { - SendSysMessage (LANG_COMMAND_WRONGOLDPASSWORD); - SetSentErrorMessage (true); + SendSysMessage(LANG_NEW_PASSWORDS_NOT_MATCH); + SetSentErrorMessage(true); return false; } AccountOpResult result = accmgr.ChangePassword(m_session->GetAccountId(), password_new); - switch(result) { case AOR_OK: @@ -230,7 +229,6 @@ bool ChatHandler::HandleAccountPasswordCommand(const char* args) SendSysMessage(LANG_PASSWORD_TOO_LONG); SetSentErrorMessage(true); return false; - case AOR_NAME_NOT_EXIST: // not possible case, don't want get account name for output default: SendSysMessage(LANG_COMMAND_NOTCHANGEPASSWORD); SetSentErrorMessage(true); @@ -243,15 +241,23 @@ bool ChatHandler::HandleAccountPasswordCommand(const char* args) bool ChatHandler::HandleAccountAddonCommand(const char* args) { if (!*args) + { + SendSysMessage(LANG_CMD_SYNTAX); + SetSentErrorMessage(true); return false; + } - char *szExp = strtok((char*)args," "); + char *szExp = strtok((char*)args, " "); uint32 account_id = m_session->GetAccountId(); - int expansion=atoi(szExp); //get int anyway (0 if error) + int expansion = atoi(szExp); //get int anyway (0 if error) if (expansion < 0 || expansion > sWorld.getConfig(CONFIG_EXPANSION)) - return false; + { + SendSysMessage(LANG_IMPROPER_VALUE); + SetSentErrorMessage(true); + return false; + } // No SQL injection LoginDatabase.PExecute("UPDATE account SET expansion = '%d' WHERE id = '%u'", expansion, account_id); @@ -264,7 +270,8 @@ bool ChatHandler::HandleAccountLockCommand(const char* args) if (!*args) { SendSysMessage(LANG_USE_BOL); - return true; + SetSentErrorMessage(true); + return false; } std::string argstr = (char*)args; @@ -283,7 +290,8 @@ bool ChatHandler::HandleAccountLockCommand(const char* args) } SendSysMessage(LANG_USE_BOL); - return true; + SetSentErrorMessage(true); + return false; } /// Display the 'Message of the day' for the realm diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index c0c8fc486f3..435c6549f56 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -87,7 +87,8 @@ enum TrinityStrings LANG_USING_EVENT_AI = 59, LANG_CONNECTED_PLAYERS = 60, LANG_ACCOUNT_ADDON = 61, - // Room for more level 0 62-99 not used + LANG_IMPROPER_VALUE = 62, + // Room for more level 0 63-99 not used // level 1 chat LANG_GLOBAL_NOTIFY = 100, -- cgit v1.2.3 From 21ccec8500db4ca73354883fc6351218642336ab Mon Sep 17 00:00:00 2001 From: teacher Date: Mon, 19 Jul 2010 17:33:22 +0200 Subject: Added trigger effect for Blood Oath Aura for Quest "Truce?" (by Svannon) Added serverside spell place holder for future development. Better syntax for a recent sql update (no need to re-import it). --HG-- branch : trunk --- sql/base/world_database.sql | 12 +++++++++--- sql/updates/8915_world_trinity_string.sql | 3 ++- sql/updates/8920_world_spell_dbc.sql | 4 ++++ sql/updates/8920_world_spell_linked_spell.sql | 4 ++++ 4 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 sql/updates/8920_world_spell_dbc.sql create mode 100644 sql/updates/8920_world_spell_linked_spell.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index a0c566f550c..dcb731259a3 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -712,6 +712,9 @@ UNLOCK TABLES; -- Table structure for `conditions` -- +DROP TABLE IF EXISTS `conditions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `conditions` ( `SourceTypeOrReferenceId` mediumint(8) NOT NULL DEFAULT '0', `SourceGroup` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -725,9 +728,10 @@ CREATE TABLE `conditions` ( `Comment` varchar(255) DEFAULT NULL, PRIMARY KEY (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Condition System'; +/*!40101 SET character_set_client = @saved_cs_client */; -- --- Dumping data for table `creature` +-- Dumping data for table `conditions` -- LOCK TABLES `conditions` WRITE; @@ -5340,7 +5344,8 @@ INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`A (25359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Item 21293 spellid_2 serverside spell'), (40145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11000 RewSpellCast serverside spell'), (45767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11670 RewSpellCast serverside spell'), -(71098, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 24451 RewSpellCast serverside spell'); +(71098, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 24451 RewSpellCast serverside spell'), +(70878, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Creature 40160 creature_addon serverside spell'); /*!40000 ALTER TABLE `spell_dbc` ENABLE KEYS */; UNLOCK TABLES; @@ -6194,7 +6199,8 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment -- Item ( 69381, 72588, 1, 'Drums of the Wild'), ( 69378, 72586, 1, 'Drums of the Forgotten Kings'), -( 69377, 72590, 1, 'Runescroll of Fortitude'); +( 69377, 72590, 1, 'Runescroll of Fortitude'), +( 50141, 50001, 0, 'Blood Oath to Blood Oath Aura'); /*!40000 ALTER TABLE `spell_linked_spell` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/updates/8915_world_trinity_string.sql b/sql/updates/8915_world_trinity_string.sql index 49676b0870a..3c882c98895 100644 --- a/sql/updates/8915_world_trinity_string.sql +++ b/sql/updates/8915_world_trinity_string.sql @@ -1,4 +1,5 @@ -- UPDATE so we don't kill customized locale strings if user has any UPDATE `trinity_string` SET `content_default`='The old password is wrong' WHERE `entry`=27; -- INSERT as this string has not been used before -INSERT INTO `trinity_string` VALUES (62, 'One on more parameters have incorrect values', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +DELETE FROM `trinity_string` WHERE `entry`=62; +INSERT INTO `trinity_string` (`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`) VALUES (62, 'One on more parameters have incorrect values', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); diff --git a/sql/updates/8920_world_spell_dbc.sql b/sql/updates/8920_world_spell_dbc.sql new file mode 100644 index 00000000000..a400139824a --- /dev/null +++ b/sql/updates/8920_world_spell_dbc.sql @@ -0,0 +1,4 @@ +-- Add serverside spells place holders for future development +DELETE FROM `spell_dbc` WHERE `Id` IN (70878); +INSERT INTO `spell_dbc` (`Id`,`Comment`) VALUES +(70878, 'Creature 40160 creature_addon serverside spell'); diff --git a/sql/updates/8920_world_spell_linked_spell.sql b/sql/updates/8920_world_spell_linked_spell.sql new file mode 100644 index 00000000000..2b6a4bcf9ed --- /dev/null +++ b/sql/updates/8920_world_spell_linked_spell.sql @@ -0,0 +1,4 @@ +-- For quest: Truce? +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=50141; +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +(50141,50001,0, 'Blood Oath to Blood Oath Aura'); -- cgit v1.2.3 From e79355cd99d8d4da9b8e98e6a816fbb401b26f60 Mon Sep 17 00:00:00 2001 From: teacher Date: Mon, 19 Jul 2010 18:14:04 +0200 Subject: Proper aura values for previous spell place holder (thank you QAston for the little lesson). --HG-- branch : trunk --- sql/base/world_database.sql | 2 +- sql/updates/8921_world_spell_dbc.sql | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 sql/updates/8921_world_spell_dbc.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index dcb731259a3..b47cff9f9ee 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -5345,7 +5345,7 @@ INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`A (40145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11000 RewSpellCast serverside spell'), (45767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 11670 RewSpellCast serverside spell'), (71098, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Quest 24451 RewSpellCast serverside spell'), -(70878, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Creature 40160 creature_addon serverside spell'); +(70878, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Creature 40160 creature_addon serverside spell'); /*!40000 ALTER TABLE `spell_dbc` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/updates/8921_world_spell_dbc.sql b/sql/updates/8921_world_spell_dbc.sql new file mode 100644 index 00000000000..edffd2bbde6 --- /dev/null +++ b/sql/updates/8921_world_spell_dbc.sql @@ -0,0 +1,2 @@ +-- Add serverside spells place holders for future development +UPDATE `spell_dbc` SET `Effect1`=6 AND `EffectApplyAuraName1`=4 WHERE `Id` IN (70878); -- cgit v1.2.3 From 07b8d33869f757ffd5567fc164622dddf7443261 Mon Sep 17 00:00:00 2001 From: teacher Date: Mon, 19 Jul 2010 18:35:29 +0200 Subject: Typo in previous sql update (so lame of me...). --HG-- branch : trunk --- sql/updates/8921_world_spell_dbc.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sql/updates') diff --git a/sql/updates/8921_world_spell_dbc.sql b/sql/updates/8921_world_spell_dbc.sql index edffd2bbde6..7e53fc4bbf2 100644 --- a/sql/updates/8921_world_spell_dbc.sql +++ b/sql/updates/8921_world_spell_dbc.sql @@ -1,2 +1 @@ --- Add serverside spells place holders for future development -UPDATE `spell_dbc` SET `Effect1`=6 AND `EffectApplyAuraName1`=4 WHERE `Id` IN (70878); +UPDATE `spell_dbc` SET `Effect1`=6,`EffectApplyAuraName1`=4 WHERE `Id` IN (70878); -- cgit v1.2.3 From b1fab8caafcfa5228e2727d64bcf6a675318b517 Mon Sep 17 00:00:00 2001 From: QAston Date: Mon, 19 Jul 2010 19:28:54 +0200 Subject: *Correct typo in CastSpeedSlow spellgroup - by tassader1000, thanks azazel_kon for sql *Fix a compile typo in prev commit. --HG-- branch : trunk --- sql/base/world_database.sql | 4 ++-- sql/updates/8925_world_spell_group.sql | 6 ++++++ src/server/game/Spells/Auras/SpellEffects.cpp | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 sql/updates/8925_world_spell_group.sql (limited to 'sql/updates') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index b47cff9f9ee..fb3fcb2b322 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -5878,8 +5878,8 @@ INSERT INTO `spell_group` (`id`, `spell_id`) VALUES (1099,-1098), -- Cast Speed Slow (1103,-1100), -(1103,-1001), -(1103,-1002), +(1103,-1101), +(1103,-1102), -- mage freezing spells (1107, 122), -- Frost Nova (1107, 33395), -- Freeze diff --git a/sql/updates/8925_world_spell_group.sql b/sql/updates/8925_world_spell_group.sql new file mode 100644 index 00000000000..0e7d2cf894e --- /dev/null +++ b/sql/updates/8925_world_spell_group.sql @@ -0,0 +1,6 @@ +DELETE FROM `spell_group` WHERE `id` = 1103; +-- Cast Speed Slow +INSERT INTO `spell_group` (`id`,`spell_id`) VALUES +(1103,-1100), +(1103,-1101), +(1103,-1102); diff --git a/src/server/game/Spells/Auras/SpellEffects.cpp b/src/server/game/Spells/Auras/SpellEffects.cpp index fd023f14261..5d0858ed214 100644 --- a/src/server/game/Spells/Auras/SpellEffects.cpp +++ b/src/server/game/Spells/Auras/SpellEffects.cpp @@ -7133,6 +7133,7 @@ void Spell::EffectChargeDest(uint32 /*i*/) { if (m_targets.HasDst()) { + float x, y, z; m_targets.m_dstPos.GetPosition(x, y, z); m_caster->GetMotionMaster()->MoveCharge(x, y, z); } -- cgit v1.2.3