From 0676da0ea100f853e85776e5eaa5ddc42b023521 Mon Sep 17 00:00:00 2001 From: Ramus Date: Mon, 21 Mar 2011 13:21:19 +0200 Subject: Allow apply .modify scale to targeted creature. --- src/server/scripts/Commands/cs_modify.cpp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 60944575d68..8902e0757ea 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); -- cgit v1.2.3 From 5908b2af477c6ffb5fc37829bb05b8a80942831b Mon Sep 17 00:00:00 2001 From: Ramusik Date: Sun, 10 Apr 2011 08:46:47 +0300 Subject: Fixed Starfall: root effect shouldn't supress the starfall effect --- src/server/game/Spells/SpellEffects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 10edae93467..565e1d2d4bd 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); -- cgit v1.2.3 From 1c063696ace9c04bad3ad05df11dcaa472a997db Mon Sep 17 00:00:00 2001 From: Ramusik Date: Mon, 11 Apr 2011 13:26:28 +0300 Subject: 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(-) (limited to 'src') diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index d78da696987..0b45273d763 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); -- cgit v1.2.3 From ae7d55bb3bb2fcbd04c404a13662c5d948ff6abf Mon Sep 17 00:00:00 2001 From: Shocker Date: Thu, 5 May 2011 22:22:12 +0300 Subject: Core/Misc: Corrections after recent pull merge --- sql/updates/world/2011_03_21_2_world_command.sql | 3 --- sql/updates/world/2011_03_21_3_world_spell_proc_event.sql | 2 -- sql/updates/world/2011_05_05_00_world_command.sql | 3 +++ sql/updates/world/2011_05_05_01_spell_proc_event.sql | 1 + sql/updates/world/dislodged Foreign Object.sql | 1 - src/server/scripts/Commands/cs_modify.cpp | 2 +- 6 files changed, 5 insertions(+), 7 deletions(-) delete mode 100644 sql/updates/world/2011_03_21_2_world_command.sql delete mode 100644 sql/updates/world/2011_03_21_3_world_spell_proc_event.sql create mode 100644 sql/updates/world/2011_05_05_00_world_command.sql create mode 100644 sql/updates/world/2011_05_05_01_spell_proc_event.sql delete mode 100644 sql/updates/world/dislodged Foreign Object.sql (limited to 'src') diff --git a/sql/updates/world/2011_03_21_2_world_command.sql b/sql/updates/world/2011_03_21_2_world_command.sql deleted file mode 100644 index 0c16d9b7580..00000000000 --- a/sql/updates/world/2011_03_21_2_world_command.sql +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100644 index 5e1d017fb3a..00000000000 --- 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_05_05_00_world_command.sql b/sql/updates/world/2011_05_05_00_world_command.sql new file mode 100644 index 00000000000..b31ffc2ff0a --- /dev/null +++ b/sql/updates/world/2011_05_05_00_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.'); diff --git a/sql/updates/world/2011_05_05_01_spell_proc_event.sql b/sql/updates/world/2011_05_05_01_spell_proc_event.sql new file mode 100644 index 00000000000..6c5db5d3663 --- /dev/null +++ b/sql/updates/world/2011_05_05_01_spell_proc_event.sql @@ -0,0 +1 @@ +UPDATE `spell_proc_event` SET `procFlags`=0x00010000 WHERE `entry` IN (71602, 71645); diff --git a/sql/updates/world/dislodged Foreign Object.sql b/sql/updates/world/dislodged Foreign Object.sql deleted file mode 100644 index 247af7ad891..00000000000 --- a/sql/updates/world/dislodged Foreign Object.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `spell_proc_event` SET `procFlags`=0x00010000 WHERE `entry` IN (71602,71645); -- Dislodged Foreign Object \ No newline at end of file diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 79422531a77..9e3851ccc8a 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); -- cgit v1.2.3 From acf7f6501359e1de7226f96834ebdeaa6bca6633 Mon Sep 17 00:00:00 2001 From: johnholiver Date: Wed, 13 Apr 2011 14:08:34 -0300 Subject: Scripts/PitOfSaron: Remove Forgemaster Garfrost's Blade buff before applying Mace buff. --- .../Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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 d7f20de04d9..bc24f70f702 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); } -- cgit v1.2.3 From e617c1618fc1207f9fdbf0b248d7e6f36773b8cd Mon Sep 17 00:00:00 2001 From: johnholiver Date: Thu, 5 May 2011 18:08:01 -0300 Subject: 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(-) (limited to 'src') diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 7d1fc92113c..510ec8dc9a5 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 -- cgit v1.2.3 From a1c708d62c6af45aa4d02fbc5909b2ec41b87a8d Mon Sep 17 00:00:00 2001 From: johnholiver Date: Thu, 5 May 2011 18:18:02 -0300 Subject: Scripts/Oculus: Fix Eregos loot. --- .../world/2011_05_05_02_world_gameobject.sql | 4 +++ .../Northrend/Nexus/Oculus/instance_oculus.cpp | 29 ++++++++++++++++------ src/server/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 (limited to 'src') 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 00000000000..575f51ee43d --- /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 41aa988583d..412a30abb3b 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 8c669b91917..e04f2c8aab9 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 -- cgit v1.2.3 From 99959e8cd786a961fe392a01ade53618c0c44f0a Mon Sep 17 00:00:00 2001 From: johnholiver Date: Thu, 5 May 2011 19:06:11 -0300 Subject: 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 | 35 ++++++++++++++++++----- src/server/game/Entities/Unit/Unit.h | 4 +-- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 4 +-- src/server/game/Spells/SpellEffects.cpp | 22 ++++++++++---- 4 files changed, 48 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 445488d7d82..21dc29ec3f3 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 1d1b34e1520..6502203a83a 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 8fd24da80a8..1246815aaaa 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 510ec8dc9a5..6c9bfba4953 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); -- cgit v1.2.3