*Update procflags for Imp.Shadowform.

*Use item speed value instead of attack speed value for enchant PPM - by MaS0n.
*Correctly apply cooldown to Improved leader of the pack mana regen.
*Do not refresh duration when stack from aura is dropped - by Apoc

--HG--
branch : trunk
This commit is contained in:
QAston
2009-07-26 19:58:01 +02:00
parent e36a0f4825
commit 190863e5a5
6 changed files with 21 additions and 12 deletions
+2 -2
View File
@@ -1102,8 +1102,8 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell
( 47535, 0x00, 6, 0x00000001, 0x00000000, 0x00000000, 0x00004000, 0x00002000, 0, 0, 12), -- Rapture (Rank 1) ( 47535, 0x00, 6, 0x00000001, 0x00000000, 0x00000000, 0x00004000, 0x00002000, 0, 0, 12), -- Rapture (Rank 1)
( 47536, 0x00, 6, 0x00000001, 0x00000000, 0x00000000, 0x00004000, 0x00002000, 0, 0, 12), -- Rapture (Rank 2) ( 47536, 0x00, 6, 0x00000001, 0x00000000, 0x00000000, 0x00004000, 0x00002000, 0, 0, 12), -- Rapture (Rank 2)
( 47537, 0x00, 6, 0x00000001, 0x00000000, 0x00000000, 0x00004000, 0x00002000, 0, 0, 12), -- Rapture (Rank 3) ( 47537, 0x00, 6, 0x00000001, 0x00000000, 0x00000000, 0x00004000, 0x00002000, 0, 0, 12), -- Rapture (Rank 3)
( 47569, 0x00, 6, 0x00004000, 0x00000000, 0x00000000, 0x00000400, 0x00000000, 0, 50, 0), -- Improved Shadowform (Rank 1) ( 47569, 0x00, 6, 0x00004000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0, 50, 0), -- Improved Shadowform (Rank 1)
( 47570, 0x00, 6, 0x00004000, 0x00000000, 0x00000000, 0x00000400, 0x00000000, 0, 100, 0), -- Improved Shadowform (Rank 2) ( 47570, 0x00, 6, 0x00004000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0, 100, 0), -- Improved Shadowform (Rank 2)
( 47580, 0x00, 6, 0x00000000, 0x00000000, 0x00000040, 0x00000000, 0x00010000, 0, 0, 0), -- Pain and Suffering (Rank 1) ( 47580, 0x00, 6, 0x00000000, 0x00000000, 0x00000040, 0x00000000, 0x00010000, 0, 0, 0), -- Pain and Suffering (Rank 1)
( 47581, 0x00, 6, 0x00000000, 0x00000000, 0x00000040, 0x00000000, 0x00010000, 0, 0, 0), -- Pain and Suffering (Rank 2) ( 47581, 0x00, 6, 0x00000000, 0x00000000, 0x00000040, 0x00000000, 0x00010000, 0, 0, 0), -- Pain and Suffering (Rank 2)
( 47582, 0x00, 6, 0x00000000, 0x00000000, 0x00000040, 0x00000000, 0x00010000, 0, 0, 0), -- Pain and Suffering (Rank 3) ( 47582, 0x00, 6, 0x00000000, 0x00000000, 0x00000040, 0x00000000, 0x00010000, 0, 0, 0), -- Pain and Suffering (Rank 3)
@@ -0,0 +1,4 @@
DELETE FROM `spell_proc_event` WHERE `entry` IN(47569, 47570);
INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
( 47569, 0x00, 6, 0x00004000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0, 50, 0), -- Improved Shadowform (Rank 1)
( 47570, 0x00, 6, 0x00004000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0, 100, 0); -- Improved Shadowform (Rank 2)
@@ -1639,9 +1639,10 @@ CreatureAI* GetAI_mob_mojo(Creature *_Creature)
struct TRINITY_DLL_DECL npc_mirror_image : public SpellAI struct TRINITY_DLL_DECL npc_mirror_image : public SpellAI
{ {
npc_mirror_image(Creature *c) : SpellAI(c) {} npc_mirror_image(Creature *c) : SpellAI(c) {}
Unit * owner;
void Reset() void Reset()
{ {
Unit * owner = NULL;
if (m_creature->isSummon()) if (m_creature->isSummon())
owner = ((TempSummon*)me)->GetOwner(); owner = ((TempSummon*)me)->GetOwner();
if (!owner) if (!owner)
+1 -4
View File
@@ -7243,10 +7243,7 @@ void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32
float chance = pEnchant->amount[s] != 0 ? float(pEnchant->amount[s]) : GetWeaponProcChance(); float chance = pEnchant->amount[s] != 0 ? float(pEnchant->amount[s]) : GetWeaponProcChance();
if (entry && entry->PPMChance) if (entry && entry->PPMChance)
{ chance = GetPPMProcChance(proto->Delay, entry->PPMChance, spellInfo);
uint32 WeaponSpeed = GetAttackTime(attType);
chance = GetPPMProcChance(WeaponSpeed, entry->PPMChance, spellInfo);
}
else if (entry && entry->customChance) else if (entry && entry->customChance)
chance = entry->customChance; chance = entry->customChance;
+6 -1
View File
@@ -1388,6 +1388,7 @@ void Aura::_RemoveAura()
void Aura::SetStackAmount(uint8 stackAmount, bool applied) void Aura::SetStackAmount(uint8 stackAmount, bool applied)
{ {
bool refresh = stackAmount >= m_stackAmount;
if (stackAmount != m_stackAmount) if (stackAmount != m_stackAmount)
{ {
m_stackAmount = 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) bool Aura::modStackAmount(int32 num)
+6 -4
View File
@@ -5843,10 +5843,13 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
basepoints0 = triggerAmount * GetMaxHealth() / 100; basepoints0 = triggerAmount * GetMaxHealth() / 100;
target = this; target = this;
triggered_spell_id = 34299; triggered_spell_id = 34299;
if (triggeredByAura->GetCaster() != this) if (triggeredByAura->GetCasterGUID() != GetGUID())
break; break;
int32 basepoints1 = triggerAmount * 2; 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; break;
} }
// Healing Touch (Dreamwalker Raiment set) // Healing Touch (Dreamwalker Raiment set)
@@ -10451,8 +10454,7 @@ float Unit::GetPPMProcChance(uint32 WeaponSpeed, float PPM, const SpellEntry * s
if(Player* modOwner = GetSpellModOwner()) if(Player* modOwner = GetSpellModOwner())
modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_PROC_PER_MINUTE,PPM); 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 uint32((WeaponSpeed * PPM) / 600.0f); // result is chance in percents (probability = Speed_in_sec * (PPM / 60))
return result;
} }
void Unit::Mount(uint32 mount) void Unit::Mount(uint32 mount)