From 722abf4a81b9c76afff4939988c9d46b55cab8bc Mon Sep 17 00:00:00 2001 From: bkhorizon Date: Sat, 19 Dec 2009 20:00:01 -0600 Subject: [PATCH 1/6] Fix Envenom Damage Formula. Closes #655. --HG-- branch : trunk --- src/game/SpellEffects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 709aefa2b4..aa8b7e2fa9 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -611,7 +611,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx) for (uint32 i = 0; i < doses; ++i) unitTarget->RemoveAuraFromStack(spellId); damage *= doses; - damage += int32(((Player*)m_caster)->GetTotalAttackPowerValue(BASE_ATTACK) * 0.03f * doses); + damage += int32(((Player*)m_caster)->GetTotalAttackPowerValue(BASE_ATTACK) * 0.09f * doses); } // Eviscerate and Envenom Bonus Damage (item set effect) if (m_caster->HasAura(37169)) From e30d516f5a3b72cd9f1f065e3d330f3b62fc6aa3 Mon Sep 17 00:00:00 2001 From: bkhorizon Date: Sat, 19 Dec 2009 20:04:00 -0600 Subject: [PATCH 2/6] Fix typo in boss_palehoof_orbAI. Closes #856. --HG-- branch : trunk --- .../northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp index 64759d62b9..49dc134eb5 100644 --- a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp +++ b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp @@ -737,7 +737,7 @@ struct TRINITY_DLL_DECL mob_palehoof_orbAI : public ScriptedAI { if (type != POINT_MOTION_TYPE) return; - if(id<0&&id>4) + if(id<0 || id>4) return; Creature *pNext; switch(id) From fc2033176bf4f37f58fd0b69f71930d9a69eacda Mon Sep 17 00:00:00 2001 From: bkhorizon Date: Sat, 19 Dec 2009 20:07:03 -0600 Subject: [PATCH 3/6] Fix Glyph of Blocking (43425). Patch by chops. Closes #195. --HG-- branch : trunk --- src/game/SpellEffects.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index aa8b7e2fa9..5bff50196c 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -437,7 +437,14 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx) damage = uint32(damage * (m_caster->GetTotalAttackPowerValue(BASE_ATTACK)) / 100); // Shield Slam else if(m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->Category == 1209) - damage += int32(m_caster->GetShieldBlockValue()); + { + damage += int32(m_caster->GetShieldBlockValue()); + + // Glyph of Shield Slam + if (m_caster->HasAura(58375)) + m_caster->CastSpell(m_caster, 58374, true); + } + // Victory Rush else if(m_spellInfo->SpellFamilyFlags[1] & 0x100) { From 9e2b42661a3a83e350fc7adc974e7979fe71f333 Mon Sep 17 00:00:00 2001 From: p0wer Date: Sat, 19 Dec 2009 21:09:54 -0600 Subject: [PATCH 4/6] Fix Recursion Crash. Patch by Zor. Closes #863. --HG-- branch : trunk --- .../scripts/scripts/northrend/zuldrak.cpp | 105 +++++++++--------- 1 file changed, 52 insertions(+), 53 deletions(-) diff --git a/src/bindings/scripts/scripts/northrend/zuldrak.cpp b/src/bindings/scripts/scripts/northrend/zuldrak.cpp index 00129033b5..83f76254b4 100644 --- a/src/bindings/scripts/scripts/northrend/zuldrak.cpp +++ b/src/bindings/scripts/scripts/northrend/zuldrak.cpp @@ -32,60 +32,59 @@ enum eDrakuruShackles NPC_RAGECLAW = 29686 }; -struct TRINITY_DLL_DECL npc_drakuru_shacklesAI : public ScriptedAI -{ - npc_drakuru_shacklesAI(Creature* pCreature) : ScriptedAI(pCreature) {} +struct TRINITY_DLL_DECL npc_drakuru_shacklesAI : public ScriptedAI +{ + npc_drakuru_shacklesAI(Creature* pCreature) : ScriptedAI(pCreature) {} + + Unit* Rageclaw; + + void Reset() + { + Rageclaw = NULL; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + float x, y, z; + m_creature->GetClosePoint(x, y, z, m_creature->GetObjectSize() / 3, 0.1f); + + if (Unit* summon = m_creature->SummonCreature(NPC_RAGECLAW, x, y, z, + 0, TEMPSUMMON_DEAD_DESPAWN, 1000)) + { + Rageclaw = summon; + LockRageclaw(); + } + } + + void LockRageclaw() + { + m_creature->SetInFront(Rageclaw); + Rageclaw->SetInFront(m_creature); + + DoCast(Rageclaw, SPELL_LEFT_CHAIN, true); + DoCast(Rageclaw, SPELL_RIGHT_CHAIN, true); + } + + void UnlockRageclaw(Unit* pWho) + { + if (!pWho) + return; + + DoCast(Rageclaw, SPELL_FREE_RAGECLAW, true); + + m_creature->setDeathState(DEAD); + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_UNLOCK_SHACKLE) + { + if (Rageclaw) + UnlockRageclaw(pCaster); + else + m_creature->setDeathState(JUST_DIED); + } + } +}; - Unit* Rageclaw; - - void Reset() - { - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - float x, y, z; - Rageclaw = NULL; - m_creature->GetClosePoint(x, y, z, m_creature->GetObjectSize()/3,0.1); - if (Unit* summon = m_creature->SummonCreature(NPC_RAGECLAW,x,y,z,0,TEMPSUMMON_DEAD_DESPAWN,1000)) - DoActionOnRageclaw(true,summon); - } - - void DoActionOnRageclaw(bool bLocking, Unit* pWho) - { - if (!pWho) - return; - - Rageclaw = pWho; - - if (bLocking) - { - if (pWho) - { - m_creature->SetInFront(Rageclaw); - Rageclaw->SetInFront(m_creature); - - DoCast(Rageclaw, SPELL_LEFT_CHAIN, true); - DoCast(Rageclaw, SPELL_RIGHT_CHAIN, true); - } - } - else - { - DoCast(Rageclaw, SPELL_FREE_RAGECLAW, true); - if (pWho->GetTypeId() == TYPEID_PLAYER) - CAST_PLR(pWho)->CastSpell(Rageclaw, SPELL_UNLOCK_SHACKLE, true); - m_creature->setDeathState(DEAD); - } - } - - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) - { - if (pSpell->Id == SPELL_UNLOCK_SHACKLE) - { - if (Rageclaw) - DoActionOnRageclaw(false, pCaster); - else - m_creature->setDeathState(JUST_DIED); - } - } -}; CreatureAI* GetAI_npc_drakuru_shackles(Creature* pCreature) { From 9218ebce9d97b2b27397aa98d28fac9e43584949 Mon Sep 17 00:00:00 2001 From: p0wer Date: Sat, 19 Dec 2009 22:17:19 -0600 Subject: [PATCH 5/6] Fix Tenacity to increase heal %. Patch by corfen. Closes #825. --HG-- branch : trunk --- src/game/Unit.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 4f3e90bf50..ae694ffbdb 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10270,6 +10270,11 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint TakenTotalMod *= (HealingWay->GetAmount() + 100.0f) / 100.0f; } + // Tenacity increase healing % taken + if (AuraEffect const* Tenacity = pVictim->GetAuraEffect(58549, 0)) + TakenTotalMod *= (Tenacity->GetAmount() + 100.0f) / 100.0f; + + // Healing taken percent float minval = pVictim->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_PCT); if (minval) From a21f0da24fe99becc06eb2a08016d7acb4d82027 Mon Sep 17 00:00:00 2001 From: Paradox Date: Sat, 19 Dec 2009 23:42:19 -0500 Subject: [PATCH 6/6] fix CRLF in last 3-4 commits, take note, new devs using windows need to configure the win32text extension properly before pushing anything else. --HG-- branch : trunk --- .../scripts/scripts/northrend/zuldrak.cpp | 104 +++++++++--------- src/game/SpellEffects.cpp | 14 +-- src/game/Unit.cpp | 6 +- 3 files changed, 62 insertions(+), 62 deletions(-) diff --git a/src/bindings/scripts/scripts/northrend/zuldrak.cpp b/src/bindings/scripts/scripts/northrend/zuldrak.cpp index 83f76254b4..1b09915239 100644 --- a/src/bindings/scripts/scripts/northrend/zuldrak.cpp +++ b/src/bindings/scripts/scripts/northrend/zuldrak.cpp @@ -32,58 +32,58 @@ enum eDrakuruShackles NPC_RAGECLAW = 29686 }; -struct TRINITY_DLL_DECL npc_drakuru_shacklesAI : public ScriptedAI -{ - npc_drakuru_shacklesAI(Creature* pCreature) : ScriptedAI(pCreature) {} - - Unit* Rageclaw; - - void Reset() - { - Rageclaw = NULL; - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - float x, y, z; - m_creature->GetClosePoint(x, y, z, m_creature->GetObjectSize() / 3, 0.1f); - - if (Unit* summon = m_creature->SummonCreature(NPC_RAGECLAW, x, y, z, - 0, TEMPSUMMON_DEAD_DESPAWN, 1000)) - { - Rageclaw = summon; - LockRageclaw(); - } - } - - void LockRageclaw() - { - m_creature->SetInFront(Rageclaw); - Rageclaw->SetInFront(m_creature); - - DoCast(Rageclaw, SPELL_LEFT_CHAIN, true); - DoCast(Rageclaw, SPELL_RIGHT_CHAIN, true); - } - - void UnlockRageclaw(Unit* pWho) - { - if (!pWho) - return; - - DoCast(Rageclaw, SPELL_FREE_RAGECLAW, true); - - m_creature->setDeathState(DEAD); - } - - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) - { - if (pSpell->Id == SPELL_UNLOCK_SHACKLE) - { - if (Rageclaw) - UnlockRageclaw(pCaster); - else - m_creature->setDeathState(JUST_DIED); - } - } -}; +struct TRINITY_DLL_DECL npc_drakuru_shacklesAI : public ScriptedAI +{ + npc_drakuru_shacklesAI(Creature* pCreature) : ScriptedAI(pCreature) {} + + Unit* Rageclaw; + + void Reset() + { + Rageclaw = NULL; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + float x, y, z; + m_creature->GetClosePoint(x, y, z, m_creature->GetObjectSize() / 3, 0.1f); + + if (Unit* summon = m_creature->SummonCreature(NPC_RAGECLAW, x, y, z, + 0, TEMPSUMMON_DEAD_DESPAWN, 1000)) + { + Rageclaw = summon; + LockRageclaw(); + } + } + + void LockRageclaw() + { + m_creature->SetInFront(Rageclaw); + Rageclaw->SetInFront(m_creature); + + DoCast(Rageclaw, SPELL_LEFT_CHAIN, true); + DoCast(Rageclaw, SPELL_RIGHT_CHAIN, true); + } + + void UnlockRageclaw(Unit* pWho) + { + if (!pWho) + return; + + DoCast(Rageclaw, SPELL_FREE_RAGECLAW, true); + + m_creature->setDeathState(DEAD); + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_UNLOCK_SHACKLE) + { + if (Rageclaw) + UnlockRageclaw(pCaster); + else + m_creature->setDeathState(JUST_DIED); + } + } +}; CreatureAI* GetAI_npc_drakuru_shackles(Creature* pCreature) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 5bff50196c..adf82f3289 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -437,13 +437,13 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx) damage = uint32(damage * (m_caster->GetTotalAttackPowerValue(BASE_ATTACK)) / 100); // Shield Slam else if(m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->Category == 1209) - { - damage += int32(m_caster->GetShieldBlockValue()); - - // Glyph of Shield Slam - if (m_caster->HasAura(58375)) - m_caster->CastSpell(m_caster, 58374, true); - } + { + damage += int32(m_caster->GetShieldBlockValue()); + + // Glyph of Shield Slam + if (m_caster->HasAura(58375)) + m_caster->CastSpell(m_caster, 58374, true); + } // Victory Rush else if(m_spellInfo->SpellFamilyFlags[1] & 0x100) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index ae694ffbdb..36c7cf23e2 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10270,9 +10270,9 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint TakenTotalMod *= (HealingWay->GetAmount() + 100.0f) / 100.0f; } - // Tenacity increase healing % taken - if (AuraEffect const* Tenacity = pVictim->GetAuraEffect(58549, 0)) - TakenTotalMod *= (Tenacity->GetAmount() + 100.0f) / 100.0f; + // Tenacity increase healing % taken + if (AuraEffect const* Tenacity = pVictim->GetAuraEffect(58549, 0)) + TakenTotalMod *= (Tenacity->GetAmount() + 100.0f) / 100.0f; // Healing taken percent