From 0676da0ea100f853e85776e5eaa5ddc42b023521 Mon Sep 17 00:00:00 2001 From: Ramus Date: Mon, 21 Mar 2011 13:21:19 +0200 Subject: [PATCH 01/11] Allow apply .modify scale to targeted creature. --- sql/base/world_database.sql | 2 +- src/server/scripts/Commands/cs_modify.cpp | 27 +++++++++++++---------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index caea467b71..790f3d8726 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -502,7 +502,7 @@ INSERT INTO `command` VALUES ('modify rage',1,'Syntax: .modify rage #newrage\r\n\r\nModify the rage of the selected player. If no player is selected, modify your rage.'), ('modify rep',2,'Syntax: .modify rep #repId (#repvalue | $rankname [#delta])\r\nSets the selected players reputation with faction #repId to #repvalue or to $reprank.\r\nIf the reputation rank name is provided, the resulting reputation will be the lowest reputation for that rank plus the delta amount, if specified.\r\nYou can use ''.pinfo rep'' to list all known reputation ids, or use ''.lookup faction $name'' to locate a specific faction id.'), ('modify runicpower',1,'Syntax: .modify runicpower #newrunicpower\r\n\r\nModify the runic power of the selected player. If no player is selected, modify your runic power.'), -('modify scale',1,'.modify scale $parameter\nModify size of the selected player to \"normal scale\"*rate. If no player is selected, modify your size.\n#rate may range from 0.1 to 10.'), +('modify scale',1,'.modify scale #scale\nModify size of the selected player or creature to \"normal scale\"*rate. If no player or creature is selected, modify your size.\n#rate may range from 0.1 to 10.'), ('modify speed',1,'Syntax: .modify speed #rate\r\n.speed #rate\r\n\r\nModify the running speed of the selected player to \"normal base run speed\"*rate. If no player is selected, modify your speed.\r\n\r\n #rate may range from 0.1 to 50.'), ('modify spell',1,'TODO'), ('modify standstate',2,'Syntax: .modify standstate #emoteid\r\n\r\nChange the emote of your character while standing to #emoteid.'), diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 60944575d6..8902e0757e 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -676,35 +676,38 @@ public: return true; } - //Edit Player Scale + //Edit Player or Creature Scale static bool HandleModifyScaleCommand(ChatHandler* handler, const char* args) { if (!*args) return false; float Scale = (float)atof((char*)args); - if (Scale > 10.0f || Scale < 0.1f) + if (Scale > 10.0f || Scale < 0.0f) { handler->SendSysMessage(LANG_BAD_VALUE); handler->SetSentErrorMessage(true); return false; } - Player* target = handler->getSelectedPlayer(); + Unit* target = handler->getSelectedUnit(); if (!target) { - handler->SendSysMessage(LANG_NO_CHAR_SELECTED); + handler->SendSysMessage(LANG_SELECT_CHAR_OR_CREATURE); handler->SetSentErrorMessage(true); return false; } - - // check online security - if (handler->HasLowerSecurity(target, 0)) - return false; - - handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, Scale, handler->GetNameLink(target).c_str()); - if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale); + + if (target->GetTypeId()==TYPEID_PLAYER) + { + // check online security + if (handler->HasLowerSecurity((Player*)target, 0)) + return false; + + handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, Scale, handler->GetNameLink((Player*)target).c_str()); + if (handler->needReportToTarget((Player*)target)) + (ChatHandler((Player*)target)).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale); + } target->SetFloatValue(OBJECT_FIELD_SCALE_X, Scale); From 6ee47ad22ff56104983e97afc167795472888914 Mon Sep 17 00:00:00 2001 From: Ramus Date: Mon, 21 Mar 2011 13:50:50 +0200 Subject: [PATCH 02/11] Fix Combustion bug exploit Add forgotten file from previous commit --- sql/base/world_database.sql | 2 +- sql/updates/world/2011_03_21_2_world_command.sql | 3 +++ sql/updates/world/2011_03_21_3_world_spell_proc_event.sql | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 sql/updates/world/2011_03_21_2_world_command.sql create mode 100644 sql/updates/world/2011_03_21_3_world_spell_proc_event.sql diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index 790f3d8726..8dbb5be885 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -18376,7 +18376,7 @@ INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFam ( 11095, 0x00, 3, 0x00000010, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Improved Scorch (Rank 1) ( 11119, 0x04, 3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Ignite (Rank 1) ( 11120, 0x04, 3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Ignite (Rank 2) -( 11129, 0x04, 3, 0x08c00017, 0x00031048, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Combustion +( 11129, 0x04, 3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Combustion ( 11180, 0x10, 3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Winter's Chill (Rank 1) ( 11185, 0x00, 3, 0x00000080, 0x00000000, 0x00000000, 0x00050000, 0x00000000, 0, 0, 0), -- Improved Blizzard (Rank 1) ( 11255, 0x00, 3, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Improved Counterspell (Rank 1) diff --git a/sql/updates/world/2011_03_21_2_world_command.sql b/sql/updates/world/2011_03_21_2_world_command.sql new file mode 100644 index 0000000000..0c16d9b758 --- /dev/null +++ b/sql/updates/world/2011_03_21_2_world_command.sql @@ -0,0 +1,3 @@ +DELETE FROM `command` WHERE `name`='modify scale'; +INSERT INTO `command` VALUES +('modify scale',1,'.modify scale #scale\nModify size of the selected player or creature to \"normal scale\"*rate. If no player or creature is selected, modify your size.\n#rate may range from 0.1 to 10.'); \ No newline at end of file diff --git a/sql/updates/world/2011_03_21_3_world_spell_proc_event.sql b/sql/updates/world/2011_03_21_3_world_spell_proc_event.sql new file mode 100644 index 0000000000..5e1d017fb3 --- /dev/null +++ b/sql/updates/world/2011_03_21_3_world_spell_proc_event.sql @@ -0,0 +1,2 @@ +DELETE FROM `spell_proc_event` WHERE `entry`=11129; +INSERT INTO `spell_proc_event` VALUES (11129, 0x04, 3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0); -- Combustion \ No newline at end of file From 5908b2af477c6ffb5fc37829bb05b8a80942831b Mon Sep 17 00:00:00 2001 From: Ramusik Date: Sun, 10 Apr 2011 08:46:47 +0300 Subject: [PATCH 03/11] Fixed Starfall: root effect shouldn't supress the starfall effect --- src/server/game/Spells/SpellEffects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 10edae9346..565e1d2d4b 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1364,7 +1364,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) } //Any effect which causes you to lose control of your character will supress the starfall effect. - if (m_caster->HasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_FLEEING | UNIT_STAT_ROOT | UNIT_STAT_CONFUSED)) + if (m_caster->HasUnitState(UNIT_STAT_CONTROLLED)) return; m_caster->CastSpell(unitTarget, damage, true); From 66081a3532a000c36ee8aee9878294a5d9674d40 Mon Sep 17 00:00:00 2001 From: Ramusik Date: Sun, 10 Apr 2011 08:53:43 +0300 Subject: [PATCH 04/11] Dislodged Foreign Object shouldn't proc from healing spells --- sql/base/world_database.sql | 4 ++-- sql/updates/world/dislodged Foreign Object.sql | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 sql/updates/world/dislodged Foreign Object.sql diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index 8dbb5be885..683e68f94a 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -19393,14 +19393,14 @@ INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFam ( 71519, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 105), -- Item - Deathbringer's Will Trinket Normal ( 71540, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Whispering Fanged Skull (Heroic) ( 71562, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 105), -- Item - Deathbringer's Will Trinket Heroic -( 71602, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Dislodged Foreign Object +( 71602, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000000, 0, 0, 45), -- Dislodged Foreign Object ( 71606, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 100), -- Phylactery of the Nameless Lich ( 71611, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Althor's Abacus ( 71634, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 30), -- Corpse Tongue Coin ( 71637, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 100), -- Phylactery of the Nameless Lich (Heroic) ( 71640, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 30), -- Corpse Tongue Coin (Heroic) ( 71642, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Althor's Abacus (Heroic) -( 71645, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Dislodged Foreign Object (Heroic) +( 71645, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000000, 0, 0, 45), -- Dislodged Foreign Object (Heroic) ( 71880, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 1, 0, 0), -- Heartpierce ( 71892, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 1, 0, 0), -- Heartpierce (Heroic) ( 72417, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 60), -- Item - Icecrown Reputation Ring Caster Trigger diff --git a/sql/updates/world/dislodged Foreign Object.sql b/sql/updates/world/dislodged Foreign Object.sql new file mode 100644 index 0000000000..247af7ad89 --- /dev/null +++ b/sql/updates/world/dislodged Foreign Object.sql @@ -0,0 +1 @@ +UPDATE `spell_proc_event` SET `procFlags`=0x00010000 WHERE `entry` IN (71602,71645); -- Dislodged Foreign Object \ No newline at end of file From 1c063696ace9c04bad3ad05df11dcaa472a997db Mon Sep 17 00:00:00 2001 From: Ramusik Date: Mon, 11 Apr 2011 13:26:28 +0300 Subject: [PATCH 05/11] Learn all my spells command should learn obly player's skills --- src/server/scripts/Commands/cs_learn.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index d78da69698..0b45273d76 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -795,9 +795,13 @@ public: return true; uint32 family = clsEntry->spellfamily; - for (uint32 i = 0; i < sSpellStore.GetNumRows(); ++i) + for (uint32 i = 0; i < sSkillLineAbilityStore.GetNumRows(); ++i) { - SpellEntry const *spellInfo = sSpellStore.LookupEntry(i); + SkillLineAbilityEntry const *entry = sSkillLineAbilityStore.LookupEntry(i); + if (!entry) + continue; + + SpellEntry const *spellInfo = sSpellStore.LookupEntry(entry->spellId); if (!spellInfo) continue; @@ -822,7 +826,7 @@ public: if (!SpellMgr::IsSpellValid(spellInfo,handler->GetSession()->GetPlayer(),false)) continue; - handler->GetSession()->GetPlayer()->learnSpell(i, false); + handler->GetSession()->GetPlayer()->learnSpell(spellInfo->Id, false); } handler->SendSysMessage(LANG_COMMAND_LEARN_CLASS_SPELLS); From ae7d55bb3bb2fcbd04c404a13662c5d948ff6abf Mon Sep 17 00:00:00 2001 From: Shocker Date: Thu, 5 May 2011 22:22:12 +0300 Subject: [PATCH 06/11] Core/Misc: Corrections after recent pull merge --- sql/updates/world/2011_03_21_3_world_spell_proc_event.sql | 2 -- ...3_21_2_world_command.sql => 2011_05_05_00_world_command.sql} | 2 +- ...ed Foreign Object.sql => 2011_05_05_01_spell_proc_event.sql} | 2 +- src/server/scripts/Commands/cs_modify.cpp | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) delete mode 100644 sql/updates/world/2011_03_21_3_world_spell_proc_event.sql rename sql/updates/world/{2011_03_21_2_world_command.sql => 2011_05_05_00_world_command.sql} (95%) rename sql/updates/world/{dislodged Foreign Object.sql => 2011_05_05_01_spell_proc_event.sql} (57%) diff --git a/sql/updates/world/2011_03_21_3_world_spell_proc_event.sql b/sql/updates/world/2011_03_21_3_world_spell_proc_event.sql deleted file mode 100644 index 5e1d017fb3..0000000000 --- a/sql/updates/world/2011_03_21_3_world_spell_proc_event.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM `spell_proc_event` WHERE `entry`=11129; -INSERT INTO `spell_proc_event` VALUES (11129, 0x04, 3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0); -- Combustion \ No newline at end of file diff --git a/sql/updates/world/2011_03_21_2_world_command.sql b/sql/updates/world/2011_05_05_00_world_command.sql similarity index 95% rename from sql/updates/world/2011_03_21_2_world_command.sql rename to sql/updates/world/2011_05_05_00_world_command.sql index 0c16d9b758..b31ffc2ff0 100644 --- a/sql/updates/world/2011_03_21_2_world_command.sql +++ b/sql/updates/world/2011_05_05_00_world_command.sql @@ -1,3 +1,3 @@ DELETE FROM `command` WHERE `name`='modify scale'; INSERT INTO `command` VALUES -('modify scale',1,'.modify scale #scale\nModify size of the selected player or creature to \"normal scale\"*rate. If no player or creature is selected, modify your size.\n#rate may range from 0.1 to 10.'); \ No newline at end of file +('modify scale',1,'.modify scale #scale\nModify size of the selected player or creature to \"normal scale\"*rate. If no player or creature is selected, modify your size.\n#rate may range from 0.1 to 10.'); diff --git a/sql/updates/world/dislodged Foreign Object.sql b/sql/updates/world/2011_05_05_01_spell_proc_event.sql similarity index 57% rename from sql/updates/world/dislodged Foreign Object.sql rename to sql/updates/world/2011_05_05_01_spell_proc_event.sql index 247af7ad89..6c5db5d366 100644 --- a/sql/updates/world/dislodged Foreign Object.sql +++ b/sql/updates/world/2011_05_05_01_spell_proc_event.sql @@ -1 +1 @@ -UPDATE `spell_proc_event` SET `procFlags`=0x00010000 WHERE `entry` IN (71602,71645); -- Dislodged Foreign Object \ No newline at end of file +UPDATE `spell_proc_event` SET `procFlags`=0x00010000 WHERE `entry` IN (71602, 71645); diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 79422531a7..9e3851ccc8 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -683,7 +683,7 @@ public: return false; float Scale = (float)atof((char*)args); - if (Scale > 10.0f || Scale < 0.0f) + if (Scale > 10.0f || Scale < 0.1f) { handler->SendSysMessage(LANG_BAD_VALUE); handler->SetSentErrorMessage(true); From acf7f6501359e1de7226f96834ebdeaa6bca6633 Mon Sep 17 00:00:00 2001 From: johnholiver Date: Wed, 13 Apr 2011 14:08:34 -0300 Subject: [PATCH 07/11] Scripts/PitOfSaron: Remove Forgemaster Garfrost's Blade buff before applying Mace buff. --- .../FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp index d7f20de04d..bc24f70f70 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp @@ -157,7 +157,10 @@ class boss_garfrost : public CreatureScript if (events.GetPhaseMask() & PHASE_TWO_MASK) DoCast(me, SPELL_FORGE_BLADE); if (events.GetPhaseMask() & PHASE_THREE_MASK) + { + me->RemoveAurasDueToSpell(SPELL_FORGE_BLADE); DoCast(me, SPELL_FORGE_MACE); + } events.ScheduleEvent(EVENT_RESUME_ATTACK, 5000); } From e617c1618fc1207f9fdbf0b248d7e6f36773b8cd Mon Sep 17 00:00:00 2001 From: johnholiver Date: Thu, 5 May 2011 18:08:01 -0300 Subject: [PATCH 08/11] Core/Spells: Interruption should be checked after knowing that the knockback effect will happen (in this case, after the glyph checks). --- src/server/game/Spells/SpellEffects.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 7d1fc92113..510ec8dc9a 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -6064,10 +6064,6 @@ void Spell::EffectKnockBack(SpellEffIndex effIndex) if (!unitTarget) return; - // Instantly interrupt non melee spells being casted - if (unitTarget->IsNonMeleeSpellCasted(true)) - unitTarget->InterruptNonMeleeSpells(true); - // Typhoon if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && m_spellInfo->SpellFamilyFlags[1] & 0x01000000) { @@ -6084,6 +6080,10 @@ void Spell::EffectKnockBack(SpellEffIndex effIndex) return; } + // Instantly interrupt non melee spells being casted + if (unitTarget->IsNonMeleeSpellCasted(true)) + unitTarget->InterruptNonMeleeSpells(true); + float ratio = m_caster->GetCombatReach() / std::max(unitTarget->GetCombatReach(), 1.0f); if (ratio < 1.0f) ratio = ratio * ratio * ratio * 0.1f; // volume = length^3 From a1c708d62c6af45aa4d02fbc5909b2ec41b87a8d Mon Sep 17 00:00:00 2001 From: johnholiver Date: Thu, 5 May 2011 18:18:02 -0300 Subject: [PATCH 09/11] Scripts/Oculus: Fix Eregos loot. --- .../world/2011_05_05_02_world_gameobject.sql | 4 +++ .../Nexus/Oculus/instance_oculus.cpp | 29 ++++++++++++++----- .../scripts/Northrend/Nexus/Oculus/oculus.h | 4 ++- 3 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 sql/updates/world/2011_05_05_02_world_gameobject.sql diff --git a/sql/updates/world/2011_05_05_02_world_gameobject.sql b/sql/updates/world/2011_05_05_02_world_gameobject.sql new file mode 100644 index 0000000000..575f51ee43 --- /dev/null +++ b/sql/updates/world/2011_05_05_02_world_gameobject.sql @@ -0,0 +1,4 @@ +UPDATE `gameobject` SET `spawnMask`=1 WHERE `guid`=2853; +DELETE FROM `gameobject` WHERE `id`=193603; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(150,193603,578,2,1,1015.06,1051.09,605.619,0.017452,0,0,0,1,-608400,0,1); \ No newline at end of file diff --git a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp index 41aa988583..412a30abb3 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp @@ -52,6 +52,8 @@ public: platformUrom = 0; centrifugueConstructCounter = 0; + eregosCacheGUID = 0; + azureDragonsList.clear(); gameObjectList.clear(); } @@ -124,14 +126,21 @@ public: void OnGameObjectCreate(GameObject* go) { - if (go->GetEntry() == GO_DRAGON_CAGE_DOOR) + switch (go->GetEntry()) { - if (GetBossState(DATA_DRAKOS_EVENT) == DONE) - go->SetGoState(GO_STATE_ACTIVE); - else - go->SetGoState(GO_STATE_READY); - - gameObjectList.push_back(go->GetGUID()); + case GO_DRAGON_CAGE_DOOR: + if (GetBossState(DATA_DRAKOS_EVENT) == DONE) + go->SetGoState(GO_STATE_ACTIVE); + else + go->SetGoState(GO_STATE_READY); + gameObjectList.push_back(go->GetGUID()); + break; + case GO_EREGOS_CACHE_N: + case GO_EREGOS_CACHE_H: + eregosCacheGUID = go->GetGUID(); + break; + default: + break; } } @@ -154,6 +163,10 @@ public: if (state == DONE) DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 0); break; + case DATA_EREGOS_EVENT: + if (state == DONE) + DoRespawnGameObject(eregosCacheGUID, 7*DAY); + break; } return true; @@ -257,6 +270,8 @@ public: uint8 platformUrom; uint8 centrifugueConstructCounter; + uint64 eregosCacheGUID; + std::string str_data; std::list gameObjectList; diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h index 8c669b9191..e04f2c8aab 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h @@ -48,7 +48,9 @@ enum Bosses enum GameObjects { - GO_DRAGON_CAGE_DOOR = 193995 + GO_DRAGON_CAGE_DOOR = 193995, + GO_EREGOS_CACHE_N = 191349, + GO_EREGOS_CACHE_H = 193603 }; enum SpellEvents From 13cfd105fe2cdd0786b5f2560f67f506535566be Mon Sep 17 00:00:00 2001 From: Per Wilhelmsen Date: Thu, 5 May 2011 23:37:53 +0200 Subject: [PATCH 10/11] Repository: Add filetype attribute handling for specific filetypes found in the repository. --- .gitattributes | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..9fa544d91a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,16 @@ +# Lineendings +*.sln eol=crlf +*.vcproj eol=crlf +*.vcxproj* eol=crlf + +# Whitespace rules +# strict (no trailing, no tabs) +*.cpp whitespace=trailing-space,space-before-tab,tab-in-indent,cr-at-eol +*.h whitespace=trailing-space,space-before-tab,tab-in-indent,cr-at-eol + +# normal (no trailing) +*.sql whitespace=trailing-space,space-before-tab,cr-at-eol +*.txt whitespace=trailing-space,space-before-tab,cr-at-eol + +# special files which must ignore whitespace +*.patch whitespace=-trailing-space From 99959e8cd786a961fe392a01ade53618c0c44f0a Mon Sep 17 00:00:00 2001 From: johnholiver Date: Thu, 5 May 2011 19:06:11 -0300 Subject: [PATCH 11/11] Core/Spells: Lifebloom final bloom. Each dispelled stack will count towards the final bloom. I left spell_bonus_data stuff out following Shauren's comment. --- src/server/game/Entities/Unit/Unit.cpp | 33 +++++++++++++++---- src/server/game/Entities/Unit/Unit.h | 4 +-- .../game/Spells/Auras/SpellAuraEffects.cpp | 4 +-- src/server/game/Spells/SpellEffects.cpp | 22 +++++++++---- 4 files changed, 47 insertions(+), 16 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 445488d7d8..21dc29ec3f 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3616,13 +3616,13 @@ void Unit::RemoveAuraFromStack(uint32 spellId, uint64 caster, AuraRemoveMode rem } } -inline void Unit::RemoveAuraFromStack(AuraMap::iterator &iter, AuraRemoveMode removeMode) +inline void Unit::RemoveAuraFromStack(AuraMap::iterator &iter, AuraRemoveMode removeMode, uint8 chargesRemoved/*= 1*/) { - if (iter->second->ModStackAmount(-1)) + if (iter->second->ModStackAmount(-chargesRemoved)) RemoveOwnedAura(iter, removeMode); } -void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit *dispeller) +void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit *dispeller, uint8 chargesRemoved/*= 1*/) { for (AuraMap::iterator iter = m_ownedAuras.lower_bound(spellId); iter != m_ownedAuras.upper_bound(spellId);) { @@ -3630,14 +3630,35 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit if (aura->GetCasterGUID() == casterGUID) { if (aura->GetSpellProto()->AttributesEx7 & SPELL_ATTR7_DISPEL_CHARGES) - aura->DropCharge(); + { + for (uint8 i = 0; i < chargesRemoved; i++) + aura->DropCharge(); + } else - RemoveAuraFromStack(iter, AURA_REMOVE_BY_ENEMY_SPELL); + RemoveAuraFromStack(iter, AURA_REMOVE_BY_ENEMY_SPELL, chargesRemoved); + + //Lifebloom + if (aura->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID && (aura->GetSpellProto()->SpellFamilyFlags[1] & 0x10)) + { + if (Unit * caster = aura->GetCaster()) + { + if (AuraEffect const * aurEff = aura->GetEffect(EFFECT_1)) + { + // final heal + int32 healAmount = aurEff->GetAmount(); + int32 stack = chargesRemoved; + CastCustomSpell(this, 33778, &healAmount, &stack, NULL, true, NULL, NULL, aura->GetCasterGUID()); + // mana + int32 mana = CalculatePctU(caster->GetCreateMana(), aura->GetSpellProto()->ManaCostPercentage) * chargesRemoved / 2; + caster->CastCustomSpell(caster, 64372, &mana, NULL, NULL, true, NULL, NULL, aura->GetCasterGUID()); + } + } + } // Unstable Affliction (crash if before removeaura?) if (aura->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && (aura->GetSpellProto()->SpellFamilyFlags[1] & 0x0100)) { - if (AuraEffect const * aurEff = aura->GetEffect(0)) + if (AuraEffect const * aurEff = aura->GetEffect(EFFECT_0)) { int32 damage = aurEff->GetAmount()*9; // backfire damage and silence diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 1d1b34e152..6502203a83 100755 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -1647,8 +1647,8 @@ class Unit : public WorldObject void RemoveAurasDueToSpell(uint32 spellId, uint64 caster = 0, uint8 reqEffMask = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); void RemoveAuraFromStack(uint32 spellId, uint64 caster = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); - inline void RemoveAuraFromStack(AuraMap::iterator &iter, AuraRemoveMode removeMode); - void RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit *dispeller); + inline void RemoveAuraFromStack(AuraMap::iterator &iter, AuraRemoveMode removeMode, uint8 chargesRemoved = 1); + void RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit *dispeller, uint8 chargesRemoved = 1); void RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit *stealer); void RemoveAurasDueToItemSpell(Item* castItem, uint32 spellId); void RemoveAurasByType(AuraType auraType, uint64 casterGUID = 0, Aura * except = NULL, bool negative = true, bool positive = true); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 8fd24da80a..1246815aaa 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -5950,8 +5950,8 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo // Lifebloom if (GetSpellProto()->SpellFamilyFlags[1] & 0x10) { - // Final heal only on dispelled or duration end - if (aurApp->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE && aurApp->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL) + // Final heal only on duration end + if (aurApp->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) return; // final heal diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 510ec8dc9a..6c9bfba495 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -3224,7 +3224,7 @@ void Spell::EffectDispel(SpellEffIndex effIndex) // Ok if exist some buffs for dispel try dispel it uint32 failCount = 0; - DispelList success_list; + DispelChargesList success_list; WorldPacket dataFail(SMSG_DISPEL_FAILED, 8+8+4+4+damage*4); // dispel N = damage buffs (or while exist buffs for dispel) for (int32 count = 0; count < damage && !dispel_list.empty();) @@ -3244,7 +3244,17 @@ void Spell::EffectDispel(SpellEffIndex effIndex) { if (success) { - success_list.push_back(std::make_pair(itr->first->GetId(), itr->first->GetCasterGUID())); + bool alreadyListed = false; + for (DispelChargesList::iterator successItr = success_list.begin(); successItr != success_list.end(); ++successItr) + { + if (successItr->first->GetId() == itr->first->GetId()) + { + ++successItr->second; + alreadyListed = true; + } + } + if (!alreadyListed) + success_list.push_back(std::make_pair(itr->first, 1)); --itr->second; if (itr->second <= 0) dispel_list.erase(itr); @@ -3271,19 +3281,19 @@ void Spell::EffectDispel(SpellEffIndex effIndex) if (success_list.empty()) return; - WorldPacket dataSuccess(SMSG_SPELLDISPELLOG, 8+8+4+1+4+damage*5); + WorldPacket dataSuccess(SMSG_SPELLDISPELLOG, 8+8+4+1+4+success_list.size()*5); // Send packet header dataSuccess.append(unitTarget->GetPackGUID()); // Victim GUID dataSuccess.append(m_caster->GetPackGUID()); // Caster GUID dataSuccess << uint32(m_spellInfo->Id); // dispel spell id dataSuccess << uint8(0); // not used dataSuccess << uint32(success_list.size()); // count - for (DispelList::iterator itr = success_list.begin(); itr != success_list.end(); ++itr) + for (DispelChargesList::iterator itr = success_list.begin(); itr != success_list.end(); ++itr) { // Send dispelled spell info - dataSuccess << uint32(itr->first); // Spell Id + dataSuccess << uint32(itr->first->GetId()); // Spell Id dataSuccess << uint8(0); // 0 - dispelled !=0 cleansed - unitTarget->RemoveAurasDueToSpellByDispel(itr->first, itr->second, m_caster); + unitTarget->RemoveAurasDueToSpellByDispel(itr->first->GetId(), itr->first->GetCasterGUID(), m_caster, itr->second); } m_caster->SendMessageToSet(&dataSuccess, true);