*Mangos [7031] Implement some mage, paladin dummy trigers.
*Mangos [7029] Some work vs aura charges:
Move to protected: need use SetAuraCharges, GetAuraCharges, DropAuraCharge
Now m_procCharges == 0 if infinite charges, and > 0 for limit
Remove not need UpdateAuraCharges()
By DiSlord.
--HG--
branch : trunk
This commit is contained in:
@@ -0,0 +1,23 @@
|
|||||||
|
-- (44445) Hot Streak (Rank 1)
|
||||||
|
DELETE FROM `spell_proc_event` WHERE `entry` IN (44445);
|
||||||
|
INSERT INTO `spell_proc_event` VALUES (44445, 0x00, 3, 0x0000100000000013, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
|
||||||
|
|
||||||
|
-- (44446) Hot Streak (Rank 2)
|
||||||
|
DELETE FROM `spell_proc_event` WHERE `entry` IN (44446);
|
||||||
|
INSERT INTO `spell_proc_event` VALUES (44446, 0x00, 3, 0x0000100000000013, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
|
||||||
|
|
||||||
|
-- (44448) Hot Streak (Rank 3)
|
||||||
|
DELETE FROM `spell_proc_event` WHERE `entry` IN (44448);
|
||||||
|
INSERT INTO `spell_proc_event` VALUES (44448, 0x00, 3, 0x0000100000000013, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
|
||||||
|
|
||||||
|
-- (54939) Glyph of Divinity ()
|
||||||
|
DELETE FROM `spell_proc_event` WHERE `entry` IN (54939);
|
||||||
|
INSERT INTO `spell_proc_event` VALUES (54939, 0x00, 10, 0x0000000000008000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
|
||||||
|
|
||||||
|
-- (54936) Glyph of Flash of Light ()
|
||||||
|
DELETE FROM `spell_proc_event` WHERE `entry` IN (54936);
|
||||||
|
INSERT INTO `spell_proc_event` VALUES (54936, 0x00, 10, 0x0000000040000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
|
||||||
|
|
||||||
|
-- (54937) Glyph of Holy Light ()
|
||||||
|
DELETE FROM `spell_proc_event` WHERE `entry` IN (54937);
|
||||||
|
INSERT INTO `spell_proc_event` VALUES (54937, 0x00, 10, 0x0000000080000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
|
||||||
@@ -6127,16 +6127,11 @@ INSERT INTO spell_learn_spell VALUES
|
|||||||
(53428,53343);
|
(53428,53343);
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `spell_proc_event`;
|
DROP TABLE IF EXISTS `spell_proc_event`;
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS=0;
|
|
||||||
-- ----------------------------
|
|
||||||
-- Table structure for spell_proc_event
|
|
||||||
-- ----------------------------
|
|
||||||
CREATE TABLE `spell_proc_event` (
|
CREATE TABLE `spell_proc_event` (
|
||||||
`entry` smallint(6) unsigned NOT NULL default '0',
|
`entry` smallint(5) unsigned NOT NULL default '0',
|
||||||
`SchoolMask` tinyint(4) NOT NULL default '0',
|
`SchoolMask` tinyint(4) NOT NULL default '0',
|
||||||
`SpellFamilyName` smallint(6) unsigned NOT NULL default '0',
|
`SpellFamilyName` smallint(5) unsigned NOT NULL default '0',
|
||||||
`SpellFamilyMask` bigint(40) unsigned NOT NULL default '0',
|
`SpellFamilyMask` bigint(20) unsigned NOT NULL default '0',
|
||||||
`procFlags` int(10) unsigned NOT NULL default '0',
|
`procFlags` int(10) unsigned NOT NULL default '0',
|
||||||
`procEx` int(10) unsigned NOT NULL default '0',
|
`procEx` int(10) unsigned NOT NULL default '0',
|
||||||
`ppmRate` float NOT NULL default '0',
|
`ppmRate` float NOT NULL default '0',
|
||||||
@@ -6145,9 +6140,12 @@ CREATE TABLE `spell_proc_event` (
|
|||||||
PRIMARY KEY (`entry`)
|
PRIMARY KEY (`entry`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- ----------------------------
|
--
|
||||||
-- Records
|
-- Dumping data for table `spell_proc_event`
|
||||||
-- ----------------------------
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `spell_proc_event` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `spell_proc_event` DISABLE KEYS */;
|
||||||
INSERT INTO `spell_proc_event` VALUES
|
INSERT INTO `spell_proc_event` VALUES
|
||||||
(324, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3),
|
(324, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3),
|
||||||
(325, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3),
|
(325, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3),
|
||||||
@@ -6660,6 +6658,9 @@ INSERT INTO `spell_proc_event` VALUES
|
|||||||
(43750, 0x00000000, 11, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0),
|
(43750, 0x00000000, 11, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0),
|
||||||
(43819, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0),
|
(43819, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0),
|
||||||
(44404, 0x00000000, 3, 0x0000900020000021, 0x00000000, 0x00000000, 0, 0, 0),
|
(44404, 0x00000000, 3, 0x0000900020000021, 0x00000000, 0x00000000, 0, 0, 0),
|
||||||
|
(44445, 0x00000000, 3, 0x0000100000000013, 0x00000000, 0x00000000, 0, 0, 0),
|
||||||
|
(44446, 0x00000000, 3, 0x0000100000000013, 0x00000000, 0x00000000, 0, 0, 0),
|
||||||
|
(44448, 0x00000000, 3, 0x0000100000000013, 0x00000000, 0x00000000, 0, 0, 0),
|
||||||
(44835, 0x00000000, 7, 0x0000008000000000, 0x00000010, 0x00000000, 0, 0, 0),
|
(44835, 0x00000000, 7, 0x0000008000000000, 0x00000010, 0x00000000, 0, 0, 0),
|
||||||
(45054, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 15),
|
(45054, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 15),
|
||||||
(45057, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 30),
|
(45057, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 30),
|
||||||
@@ -6779,6 +6780,9 @@ INSERT INTO `spell_proc_event` VALUES
|
|||||||
(54490, 0x00000000, 0, 0x0000900020000021, 0x00000000, 0x00000000, 0, 0, 0),
|
(54490, 0x00000000, 0, 0x0000900020000021, 0x00000000, 0x00000000, 0, 0, 0),
|
||||||
(54738, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0),
|
(54738, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0),
|
||||||
(54841, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0),
|
(54841, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0),
|
||||||
|
(54936, 0x00000000, 10, 0x0000000040000000, 0x00000000, 0x00000000, 0, 0, 0),
|
||||||
|
(54937, 0x00000000, 10, 0x0000000080000000, 0x00000000, 0x00000000, 0, 0, 0),
|
||||||
|
(54939, 0x00000000, 10, 0x0000000000008000, 0x00000000, 0x00000000, 0, 0, 0),
|
||||||
(55620, 0x00000000, 15, 0x0800000000000001, 0x00000000, 0x00000000, 0, 0, 0),
|
(55620, 0x00000000, 15, 0x0800000000000001, 0x00000000, 0x00000000, 0, 0, 0),
|
||||||
(55623, 0x00000000, 15, 0x0800000000000001, 0x00000000, 0x00000000, 0, 0, 0),
|
(55623, 0x00000000, 15, 0x0800000000000001, 0x00000000, 0x00000000, 0, 0, 0),
|
||||||
(55666, 0x00000000, 15, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0),
|
(55666, 0x00000000, 15, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0),
|
||||||
@@ -6829,4 +6833,6 @@ INSERT INTO `spell_proc_event` VALUES
|
|||||||
(60572, 0x00000000, 11, 0x0000000090100000, 0x00000000, 0x00000000, 0, 0, 0),
|
(60572, 0x00000000, 11, 0x0000000090100000, 0x00000000, 0x00000000, 0, 0, 0),
|
||||||
(60617, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000020, 0, 0, 0),
|
(60617, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000020, 0, 0, 0),
|
||||||
(60826, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0),
|
(60826, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0),
|
||||||
(61324, 0x00000000, 10, 0x0002000000000000, 0x00000000, 0x00000000, 0, 0, 0);
|
(61324, 0x00000000, 10, 0x0002000000000000, 0x00000000, 0x00000000, 0, 0, 0);
|
||||||
|
/*!40000 ALTER TABLE `spell_proc_event` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
+1
-1
@@ -1251,7 +1251,7 @@ void Pet::_SaveAuras()
|
|||||||
{
|
{
|
||||||
CharacterDatabase.PExecute("INSERT INTO pet_aura (guid,caster_guid,spell,effect_index,stackcount,amount,maxduration,remaintime,remaincharges) "
|
CharacterDatabase.PExecute("INSERT INTO pet_aura (guid,caster_guid,spell,effect_index,stackcount,amount,maxduration,remaintime,remaincharges) "
|
||||||
"VALUES ('%u', '" I64FMTD "', '%u', '%u', '%u', '%d', '%d', '%d', '%d')",
|
"VALUES ('%u', '" I64FMTD "', '%u', '%u', '%u', '%d', '%d', '%d', '%d')",
|
||||||
m_charmInfo->GetPetNumber(), itr2->second->GetCasterGUID(),(uint32)itr2->second->GetId(), (uint32)itr2->second->GetEffIndex(), (uint32)itr2->second->GetStackAmount(), itr2->second->GetModifier()->m_amount,int(itr2->second->GetAuraMaxDuration()),int(itr2->second->GetAuraDuration()),int(itr2->second->m_procCharges));
|
m_charmInfo->GetPetNumber(), itr2->second->GetCasterGUID(),(uint32)itr2->second->GetId(), (uint32)itr2->second->GetEffIndex(), (uint32)itr2->second->GetStackAmount(), itr2->second->GetModifier()->m_amount,int(itr2->second->GetAuraMaxDuration()),int(itr2->second->GetAuraDuration()),int(itr2->second->GetAuraCharges()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -14801,7 +14801,7 @@ void Player::_LoadAuras(QueryResult *result, uint32 timediff)
|
|||||||
remaincharges = spellproto->procCharges;
|
remaincharges = spellproto->procCharges;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
remaincharges = -1;
|
remaincharges = 0;
|
||||||
|
|
||||||
//do not load single target auras (unless they were cast by the player)
|
//do not load single target auras (unless they were cast by the player)
|
||||||
if (caster_guid != GetGUID() && IsSingleTargetSpell(spellproto))
|
if (caster_guid != GetGUID() && IsSingleTargetSpell(spellproto))
|
||||||
@@ -15912,7 +15912,7 @@ void Player::_SaveAuras()
|
|||||||
{
|
{
|
||||||
CharacterDatabase.PExecute("INSERT INTO character_aura (guid,caster_guid,spell,effect_index,stackcount,amount,maxduration,remaintime,remaincharges) "
|
CharacterDatabase.PExecute("INSERT INTO character_aura (guid,caster_guid,spell,effect_index,stackcount,amount,maxduration,remaintime,remaincharges) "
|
||||||
"VALUES ('%u', '" I64FMTD "' ,'%u', '%u', '%u', '%d', '%d', '%d', '%d')",
|
"VALUES ('%u', '" I64FMTD "' ,'%u', '%u', '%u', '%d', '%d', '%d', '%d')",
|
||||||
GetGUIDLow(), itr2->second->GetCasterGUID(), (uint32)itr2->second->GetId(), (uint32)itr2->second->GetEffIndex(), (uint32)itr2->second->GetStackAmount(), itr2->second->GetModifier()->m_amount,int(itr2->second->GetAuraMaxDuration()),int(itr2->second->GetAuraDuration()),int(itr2->second->m_procCharges));
|
GetGUIDLow(), itr2->second->GetCasterGUID(), (uint32)itr2->second->GetId(), (uint32)itr2->second->GetEffIndex(), (uint32)itr2->second->GetStackAmount(), itr2->second->GetModifier()->m_amount,int(itr2->second->GetAuraMaxDuration()),int(itr2->second->GetAuraDuration()),int(itr2->second->GetAuraCharges()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18634,7 +18634,7 @@ void Player::SendAurasForTarget(Unit *target)
|
|||||||
// level
|
// level
|
||||||
data << uint8(aura->GetAuraLevel());
|
data << uint8(aura->GetAuraLevel());
|
||||||
// charges
|
// charges
|
||||||
data << uint8(aura->m_procCharges >= 0 ? aura->m_procCharges : 0 );
|
data << uint8(aura->GetAuraCharges());
|
||||||
|
|
||||||
if(!(auraFlags & AFLAG_NOT_CASTER))
|
if(!(auraFlags & AFLAG_NOT_CASTER))
|
||||||
{
|
{
|
||||||
|
|||||||
+16
-28
@@ -431,15 +431,9 @@ m_periodicTimer(0), m_PeriodicEventId(0), m_AuraDRGroup(DIMINISHING_NONE)
|
|||||||
|
|
||||||
m_isDeathPersist = IsDeathPersistentSpell(m_spellProto);
|
m_isDeathPersist = IsDeathPersistentSpell(m_spellProto);
|
||||||
|
|
||||||
if(m_spellProto->procCharges)
|
m_procCharges = m_spellProto->procCharges;
|
||||||
{
|
if(modOwner)
|
||||||
m_procCharges = m_spellProto->procCharges;
|
modOwner->ApplySpellMod(GetId(), SPELLMOD_CHARGES, m_procCharges);
|
||||||
|
|
||||||
if(modOwner)
|
|
||||||
modOwner->ApplySpellMod(GetId(), SPELLMOD_CHARGES, m_procCharges);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
m_procCharges = -1;
|
|
||||||
|
|
||||||
m_isRemovedOnShapeLost = (m_caster_guid==m_target->GetGUID() && m_spellProto->Stances &&
|
m_isRemovedOnShapeLost = (m_caster_guid==m_target->GetGUID() && m_spellProto->Stances &&
|
||||||
!(m_spellProto->AttributesEx2 & 0x80000) && !(m_spellProto->Attributes & 0x10000));
|
!(m_spellProto->AttributesEx2 & 0x80000) && !(m_spellProto->Attributes & 0x10000));
|
||||||
@@ -877,17 +871,16 @@ void Aura::_AddAura()
|
|||||||
SetAuraSlot( slot );
|
SetAuraSlot( slot );
|
||||||
|
|
||||||
// Not update fields for not first spell's aura, all data already in fields
|
// Not update fields for not first spell's aura, all data already in fields
|
||||||
if(slot < MAX_AURAS) // slot found
|
if(slot < MAX_AURAS) // slot found
|
||||||
{
|
{
|
||||||
SetAura(false);
|
SetAura(false);
|
||||||
SetAuraFlags((1 << GetEffIndex()) | AFLAG_NOT_CASTER | ((GetAuraMaxDuration() > 0) ? AFLAG_DURATION : AFLAG_NONE) | (IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE));
|
SetAuraFlags((1 << GetEffIndex()) | AFLAG_NOT_CASTER | ((GetAuraMaxDuration() > 0) ? AFLAG_DURATION : AFLAG_NONE) | (IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE));
|
||||||
SetAuraLevel(caster ? caster->getLevel() : sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL));
|
SetAuraLevel(caster ? caster->getLevel() : sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL));
|
||||||
UpdateAuraCharges();
|
SendAuraUpdate(false);
|
||||||
SendAuraUpdate(false);
|
|
||||||
|
|
||||||
// update for out of range group members
|
// update for out of range group members
|
||||||
m_target->UpdateAuraForGroup(slot);
|
m_target->UpdateAuraForGroup(slot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // use found slot
|
else // use found slot
|
||||||
{
|
{
|
||||||
@@ -1027,7 +1020,7 @@ void Aura::SendAuraUpdate(bool remove)
|
|||||||
uint8 auraFlags = GetAuraFlags();
|
uint8 auraFlags = GetAuraFlags();
|
||||||
data << uint8(auraFlags);
|
data << uint8(auraFlags);
|
||||||
data << uint8(GetAuraLevel());
|
data << uint8(GetAuraLevel());
|
||||||
data << uint8(m_procCharges >= 0 ? m_procCharges : 0);
|
data << uint8(GetAuraCharges());
|
||||||
|
|
||||||
if(!(auraFlags & AFLAG_NOT_CASTER))
|
if(!(auraFlags & AFLAG_NOT_CASTER))
|
||||||
{
|
{
|
||||||
@@ -1097,7 +1090,7 @@ void Aura::HandleAddModifier(bool apply, bool Real)
|
|||||||
case 34754: // Clearcasting
|
case 34754: // Clearcasting
|
||||||
case 34936: // Backlash
|
case 34936: // Backlash
|
||||||
case 48108: // Hot Streak
|
case 48108: // Hot Streak
|
||||||
m_procCharges = 1;
|
SetAuraCharges(1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1125,11 +1118,7 @@ void Aura::HandleAddModifier(bool apply, bool Real)
|
|||||||
|
|
||||||
mod->mask = (uint64)ptr[0] | (uint64)ptr[1]<<32;
|
mod->mask = (uint64)ptr[0] | (uint64)ptr[1]<<32;
|
||||||
mod->mask2= (uint64)ptr[2];
|
mod->mask2= (uint64)ptr[2];
|
||||||
|
mod->charges = m_procCharges;
|
||||||
if (m_procCharges > 0)
|
|
||||||
mod->charges = m_procCharges;
|
|
||||||
else
|
|
||||||
mod->charges = 0;
|
|
||||||
|
|
||||||
m_spellmod = mod;
|
m_spellmod = mod;
|
||||||
}
|
}
|
||||||
@@ -3859,8 +3848,7 @@ void Aura::HandleAuraProcTriggerSpell(bool apply, bool Real)
|
|||||||
switch (GetId())
|
switch (GetId())
|
||||||
{
|
{
|
||||||
case 28200: // Ascendance (Talisman of Ascendance trinket)
|
case 28200: // Ascendance (Talisman of Ascendance trinket)
|
||||||
m_procCharges = 6;
|
SetAuraCharges(6);
|
||||||
UpdateAuraCharges();
|
|
||||||
break;
|
break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-10
@@ -264,15 +264,24 @@ class TRINITY_DLL_SPEC Aura
|
|||||||
uint8 GetAuraLevel() const { return m_auraLevel; }
|
uint8 GetAuraLevel() const { return m_auraLevel; }
|
||||||
void SetAuraLevel(uint8 level) { m_auraLevel = level; }
|
void SetAuraLevel(uint8 level) { m_auraLevel = level; }
|
||||||
uint8 GetAuraCharges() const { return m_procCharges; }
|
uint8 GetAuraCharges() const { return m_procCharges; }
|
||||||
void SetAuraCharges(uint8 charges) { m_procCharges = charges; }
|
void SetAuraCharges(uint8 charges)
|
||||||
|
{
|
||||||
|
if (m_procCharges == charges)
|
||||||
|
return;
|
||||||
|
m_procCharges = charges;
|
||||||
|
SendAuraUpdate(false);
|
||||||
|
}
|
||||||
|
bool DropAuraCharge() // return true if last charge dropped
|
||||||
|
{
|
||||||
|
if (m_procCharges == 0)
|
||||||
|
return false;
|
||||||
|
m_procCharges--;
|
||||||
|
SendAuraUpdate(false);
|
||||||
|
return m_procCharges == 0;
|
||||||
|
}
|
||||||
|
|
||||||
void SetAura(bool remove) { m_target->SetVisibleAura(m_auraSlot, remove ? 0 : GetId()); }
|
void SetAura(bool remove) { m_target->SetVisibleAura(m_auraSlot, remove ? 0 : GetId()); }
|
||||||
void SendAuraUpdate(bool remove);
|
void SendAuraUpdate(bool remove);
|
||||||
void UpdateAuraCharges()
|
|
||||||
{
|
|
||||||
// only aura in slot with charges and without stack limitation
|
|
||||||
if (m_auraSlot < MAX_AURAS && m_procCharges >= 1 && GetSpellProto()->StackAmount==0)
|
|
||||||
SendAuraUpdate(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsPositive() { return m_positive; }
|
bool IsPositive() { return m_positive; }
|
||||||
void SetNegative() { m_positive = false; }
|
void SetNegative() { m_positive = false; }
|
||||||
@@ -300,9 +309,6 @@ class TRINITY_DLL_SPEC Aura
|
|||||||
void SetUpdated(bool val) { m_updated = val; }
|
void SetUpdated(bool val) { m_updated = val; }
|
||||||
void SetRemoveMode(AuraRemoveMode mode) { m_removeMode = mode; }
|
void SetRemoveMode(AuraRemoveMode mode) { m_removeMode = mode; }
|
||||||
|
|
||||||
int32 m_procCharges;
|
|
||||||
void SetAuraProcCharges(int32 charges) { m_procCharges = charges; }
|
|
||||||
|
|
||||||
Unit* GetTriggerTarget() const;
|
Unit* GetTriggerTarget() const;
|
||||||
|
|
||||||
// add/remove SPELL_AURA_MOD_SHAPESHIFT (36) linked auras
|
// add/remove SPELL_AURA_MOD_SHAPESHIFT (36) linked auras
|
||||||
@@ -341,6 +347,7 @@ class TRINITY_DLL_SPEC Aura
|
|||||||
uint8 m_auraSlot;
|
uint8 m_auraSlot;
|
||||||
uint8 m_auraFlags;
|
uint8 m_auraFlags;
|
||||||
uint8 m_auraLevel;
|
uint8 m_auraLevel;
|
||||||
|
int8 m_procCharges;
|
||||||
|
|
||||||
bool m_positive:1;
|
bool m_positive:1;
|
||||||
bool m_permanent:1;
|
bool m_permanent:1;
|
||||||
|
|||||||
+64
-21
@@ -4567,7 +4567,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||||||
case 33493:
|
case 33493:
|
||||||
{
|
{
|
||||||
// Cast finish spell at last charge
|
// Cast finish spell at last charge
|
||||||
if (triggeredByAura->m_procCharges > 1)
|
if (triggeredByAura->GetAuraCharges() > 1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
target = this;
|
target = this;
|
||||||
@@ -4799,6 +4799,29 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||||||
triggered_spell_id = 29077;
|
triggered_spell_id = 29077;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// Hot Streak
|
||||||
|
if (dummySpell->SpellIconID == 2999)
|
||||||
|
{
|
||||||
|
if (triggeredByAura->GetEffIndex()!=0)
|
||||||
|
return true;
|
||||||
|
Aura *counter = GetAura(triggeredByAura->GetId(), 1);
|
||||||
|
if (!counter)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
// Count spell criticals in a row in second aura
|
||||||
|
Modifier *mod = counter->GetModifier();
|
||||||
|
if (procEx & PROC_EX_CRITICAL_HIT)
|
||||||
|
{
|
||||||
|
mod->m_amount *=2;
|
||||||
|
if (mod->m_amount < 100) // not enough
|
||||||
|
return true;
|
||||||
|
// Crititcal counted -> roll chance
|
||||||
|
if (roll_chance_i(triggeredByAura->GetModifier()->m_amount))
|
||||||
|
CastSpell(this, 48108, true, castItem, triggeredByAura);
|
||||||
|
}
|
||||||
|
mod->m_amount = 25;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
// Incanter's Regalia set (add trigger chance to Mana Shield)
|
// Incanter's Regalia set (add trigger chance to Mana Shield)
|
||||||
if (dummySpell->SpellFamilyFlags & 0x0000000000008000LL)
|
if (dummySpell->SpellFamilyFlags & 0x0000000000008000LL)
|
||||||
{
|
{
|
||||||
@@ -4837,7 +4860,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||||||
case 11129:
|
case 11129:
|
||||||
{
|
{
|
||||||
//last charge and crit
|
//last charge and crit
|
||||||
if (triggeredByAura->m_procCharges <= 1 && (procEx & PROC_EX_CRITICAL_HIT) )
|
if (triggeredByAura->GetAuraCharges() <= 1 && (procEx & PROC_EX_CRITICAL_HIT) )
|
||||||
{
|
{
|
||||||
RemoveAurasDueToSpell(28682); //-> remove Combustion auras
|
RemoveAurasDueToSpell(28682); //-> remove Combustion auras
|
||||||
return true; // charge counting (will removed)
|
return true; // charge counting (will removed)
|
||||||
@@ -5156,11 +5179,6 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||||||
if(!procSpell)
|
if(!procSpell)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// only rogue's finishing moves (maybe need additional checks)
|
|
||||||
if( procSpell->SpellFamilyName!=SPELLFAMILY_ROGUE ||
|
|
||||||
(procSpell->SpellFamilyFlags & SPELLFAMILYFLAG_ROGUE__FINISHING_MOVE) == 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// energy cost save
|
// energy cost save
|
||||||
basepoints0 = procSpell->manaCost * triggeredByAura->GetModifier()->m_amount/100;
|
basepoints0 = procSpell->manaCost * triggeredByAura->GetModifier()->m_amount/100;
|
||||||
if(basepoints0 <= 0)
|
if(basepoints0 <= 0)
|
||||||
@@ -5342,6 +5360,33 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// Glyph of Divinity
|
||||||
|
case 54939:
|
||||||
|
{
|
||||||
|
// Lookup base amount mana restore
|
||||||
|
for (int i=0; i<3;i++)
|
||||||
|
if (procSpell->Effect[i] == SPELL_EFFECT_ENERGIZE)
|
||||||
|
{
|
||||||
|
int32 mana = procSpell->EffectBasePoints[i];
|
||||||
|
CastCustomSpell(this, 54986, 0, &mana, 0, true, castItem, triggeredByAura);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// Glyph of Flash of Light
|
||||||
|
case 54936:
|
||||||
|
{
|
||||||
|
triggered_spell_id = 54957;
|
||||||
|
basepoints0 = triggeredByAura->GetModifier()->m_amount*damage/100;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// Glyph of Holy Light
|
||||||
|
case 54937:
|
||||||
|
{
|
||||||
|
triggered_spell_id = 54968;
|
||||||
|
basepoints0 = triggeredByAura->GetModifier()->m_amount*damage/100;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -10039,6 +10084,11 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||||||
|
|
||||||
procTriggered.push_back( ProcTriggeredData(spellProcEvent, itr->second) );
|
procTriggered.push_back( ProcTriggeredData(spellProcEvent, itr->second) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Nothing found
|
||||||
|
if (procTriggered.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
// Handle effects proceed this time
|
// Handle effects proceed this time
|
||||||
for(ProcTriggeredList::iterator i = procTriggered.begin(); i != procTriggered.end(); ++i)
|
for(ProcTriggeredList::iterator i = procTriggered.begin(); i != procTriggered.end(); ++i)
|
||||||
{
|
{
|
||||||
@@ -10073,7 +10123,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||||||
Modifier *auraModifier = triggeredByAura->GetModifier();
|
Modifier *auraModifier = triggeredByAura->GetModifier();
|
||||||
SpellEntry const *spellInfo = triggeredByAura->GetSpellProto();
|
SpellEntry const *spellInfo = triggeredByAura->GetSpellProto();
|
||||||
uint32 effIndex = triggeredByAura->GetEffIndex();
|
uint32 effIndex = triggeredByAura->GetEffIndex();
|
||||||
bool useCharges = triggeredByAura->m_procCharges > 0;
|
bool useCharges = triggeredByAura->GetAuraCharges() > 0;
|
||||||
// For players set spell cooldown if need
|
// For players set spell cooldown if need
|
||||||
uint32 cooldown = 0;
|
uint32 cooldown = 0;
|
||||||
if (GetTypeId() == TYPEID_PLAYER && spellProcEvent && spellProcEvent->cooldown)
|
if (GetTypeId() == TYPEID_PLAYER && spellProcEvent && spellProcEvent->cooldown)
|
||||||
@@ -10137,11 +10187,6 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELL_AURA_MOD_STUN:
|
|
||||||
// Remove by default, but if charge exist drop it
|
|
||||||
if (triggeredByAura->m_procCharges == 0)
|
|
||||||
removedSpells.push_back(triggeredByAura->GetId());
|
|
||||||
break;
|
|
||||||
case SPELL_AURA_MOD_CASTING_SPEED:
|
case SPELL_AURA_MOD_CASTING_SPEED:
|
||||||
// Skip melee hits or instant cast spells
|
// Skip melee hits or instant cast spells
|
||||||
if (procSpell == NULL || GetSpellCastTime(procSpell) == 0)
|
if (procSpell == NULL || GetSpellCastTime(procSpell) == 0)
|
||||||
@@ -10182,18 +10227,16 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||||||
AuraMap::const_iterator upper = GetAuras().upper_bound(i->triggeredByAura_SpellPair);
|
AuraMap::const_iterator upper = GetAuras().upper_bound(i->triggeredByAura_SpellPair);
|
||||||
for(AuraMap::const_iterator itr = lower; itr!= upper; ++itr)
|
for(AuraMap::const_iterator itr = lower; itr!= upper; ++itr)
|
||||||
{
|
{
|
||||||
if(itr->second == i->triggeredByAura)
|
// If last charge dropped add spell to remove list
|
||||||
|
if(itr->second == i->triggeredByAura && triggeredByAura->DropAuraCharge())
|
||||||
{
|
{
|
||||||
triggeredByAura->m_procCharges -=1;
|
removedSpells.push_back(triggeredByAura->GetId());
|
||||||
triggeredByAura->UpdateAuraCharges();
|
|
||||||
if (triggeredByAura->m_procCharges <= 0)
|
|
||||||
removedSpells.push_back(triggeredByAura->GetId());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (removedSpells.size())
|
if (!removedSpells.empty())
|
||||||
{
|
{
|
||||||
// Sort spells and remove dublicates
|
// Sort spells and remove dublicates
|
||||||
removedSpells.sort();
|
removedSpells.sort();
|
||||||
@@ -10905,10 +10948,10 @@ bool Unit::HandleMeandingAuraProc( Aura* triggeredByAura )
|
|||||||
uint64 caster_guid = triggeredByAura->GetCasterGUID();
|
uint64 caster_guid = triggeredByAura->GetCasterGUID();
|
||||||
|
|
||||||
// jumps
|
// jumps
|
||||||
int32 jumps = triggeredByAura->m_procCharges-1;
|
int32 jumps = triggeredByAura->GetAuraCharges()-1;
|
||||||
|
|
||||||
// current aura expire
|
// current aura expire
|
||||||
triggeredByAura->m_procCharges = 1; // will removed at next charges decrease
|
triggeredByAura->SetAuraCharges(1); // will removed at next charges decrease
|
||||||
|
|
||||||
// next target selection
|
// next target selection
|
||||||
if(jumps > 0 && GetTypeId()==TYPEID_PLAYER && IS_PLAYER_GUID(caster_guid))
|
if(jumps > 0 && GetTypeId()==TYPEID_PLAYER && IS_PLAYER_GUID(caster_guid))
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7028"
|
#define REVISION_NR "7031"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|||||||
Reference in New Issue
Block a user