aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/npc/npcs_special.cpp3
-rw-r--r--src/game/Player.cpp5
-rw-r--r--src/game/SpellAuras.cpp7
-rw-r--r--src/game/Unit.cpp10
4 files changed, 15 insertions, 10 deletions
diff --git a/src/bindings/scripts/scripts/npc/npcs_special.cpp b/src/bindings/scripts/scripts/npc/npcs_special.cpp
index 6c44b5b9ae3..9bf3113a9c6 100644
--- a/src/bindings/scripts/scripts/npc/npcs_special.cpp
+++ b/src/bindings/scripts/scripts/npc/npcs_special.cpp
@@ -1639,9 +1639,10 @@ CreatureAI* GetAI_mob_mojo(Creature *_Creature)
struct TRINITY_DLL_DECL npc_mirror_image : public SpellAI
{
npc_mirror_image(Creature *c) : SpellAI(c) {}
- Unit * owner;
+
void Reset()
{
+ Unit * owner = NULL;
if (m_creature->isSummon())
owner = ((TempSummon*)me)->GetOwner();
if (!owner)
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 3f0add0373b..ec31194680c 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -7243,10 +7243,7 @@ void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32
float chance = pEnchant->amount[s] != 0 ? float(pEnchant->amount[s]) : GetWeaponProcChance();
if (entry && entry->PPMChance)
- {
- uint32 WeaponSpeed = GetAttackTime(attType);
- chance = GetPPMProcChance(WeaponSpeed, entry->PPMChance, spellInfo);
- }
+ chance = GetPPMProcChance(proto->Delay, entry->PPMChance, spellInfo);
else if (entry && entry->customChance)
chance = entry->customChance;
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 5f9a3d6eeae..cb6f2caf31f 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1388,6 +1388,7 @@ void Aura::_RemoveAura()
void Aura::SetStackAmount(uint8 stackAmount, bool applied)
{
+ bool refresh = stackAmount >= m_stackAmount;
if (stackAmount != m_stackAmount)
{
m_stackAmount = stackAmount;
@@ -1399,7 +1400,11 @@ void Aura::SetStackAmount(uint8 stackAmount, bool applied)
}
}
}
- RefreshAura();
+
+ if (refresh)
+ RefreshAura();
+ else
+ SendAuraUpdate();
}
bool Aura::modStackAmount(int32 num)
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index cd378c94586..69f42896dbd 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -5843,10 +5843,13 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
basepoints0 = triggerAmount * GetMaxHealth() / 100;
target = this;
triggered_spell_id = 34299;
- if (triggeredByAura->GetCaster() != this)
+ if (triggeredByAura->GetCasterGUID() != GetGUID())
break;
int32 basepoints1 = triggerAmount * 2;
- CastCustomSpell(this,60889,&basepoints1,0,0,true,0,triggeredByAura);
+ // Improved Leader of the Pack
+ // Check cooldown of heal spell cooldown
+ if (GetTypeId()==TYPEID_PLAYER && !((Player *)this)->HasSpellCooldown(34299))
+ CastCustomSpell(this,60889,&basepoints1,0,0,true,0,triggeredByAura);
break;
}
// Healing Touch (Dreamwalker Raiment set)
@@ -10451,8 +10454,7 @@ float Unit::GetPPMProcChance(uint32 WeaponSpeed, float PPM, const SpellEntry * s
if(Player* modOwner = GetSpellModOwner())
modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_PROC_PER_MINUTE,PPM);
- uint32 result = uint32((WeaponSpeed * PPM) / 600.0f); // result is chance in percents (probability = Speed_in_sec * (PPM / 60))
- return result;
+ return uint32((WeaponSpeed * PPM) / 600.0f); // result is chance in percents (probability = Speed_in_sec * (PPM / 60))
}
void Unit::Mount(uint32 mount)