diff options
-rw-r--r-- | sql/updates/TC1_1486_world.sql | 13 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 18 |
2 files changed, 30 insertions, 1 deletions
diff --git a/sql/updates/TC1_1486_world.sql b/sql/updates/TC1_1486_world.sql new file mode 100644 index 00000000000..0a25eaefc46 --- /dev/null +++ b/sql/updates/TC1_1486_world.sql @@ -0,0 +1,13 @@ +CREATE TABLE `spell_enchant_proc_data` ( + `entry` INT(10) UNSIGNED NOT NULL, + `customChance` INT(10) UNSIGNED NOT NULL DEFAULT '0', + `PPMChance` FLOAT UNSIGNED NOT NULL DEFAULT '0', + `procEx` FLOAT UNSIGNED NOT NULL DEFAULT '0' +) ENGINE=MYISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Spell enchant proc data'; + +INSERT INTO spell_enchant_proc_data (`entry`, `customChance`, `PPMChance`,`procEx`) VALUES (2, 0, 8.8,0); +INSERT INTO spell_enchant_proc_data (`entry`, `customChance`, `PPMChance`,`procEx`) VALUES (12, 0, 8.8,0); +INSERT INTO spell_enchant_proc_data (`entry`, `customChance`, `PPMChance`,`procEx`) VALUES (524, 0, 8.8,0); +INSERT INTO spell_enchant_proc_data (`entry`, `customChance`, `PPMChance`,`procEx`) VALUES (1667, 0, 8.8,0); +INSERT INTO spell_enchant_proc_data (`entry`, `customChance`, `PPMChance`,`procEx`) VALUES (1668, 0, 8.8,0); +INSERT INTO spell_enchant_proc_data (`entry`, `customChance`, `PPMChance`,`procEx`) VALUES (2635, 0, 8.8,0); diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index c2be850370c..8c9c640c86b 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -774,12 +774,28 @@ void Aura::UpdateAuraDuration() Unit* caster = GetCaster(); - if(caster && caster->GetTypeId() == TYPEID_PLAYER && caster != m_target) + if(caster && caster->GetTypeId() == TYPEID_PLAYER) + { SendAuraDurationForCaster((Player*)caster); + + Group* CasterGroup = ((Player*)caster)->GetGroup(); + if (CasterGroup && (spellmgr.GetSpellCustomAttr(GetId()) & SPELL_ATTR_CU_AURA_CC)) + { + for (GroupReference *itr = CasterGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + { + Player* player = itr->getSource(); + if(player && player != caster) + SendAuraDurationForCaster(player); + } + } + } } void Aura::SendAuraDurationForCaster(Player* caster) { + if (caster == m_target) + return; + WorldPacket data(SMSG_SET_EXTRA_AURA_INFO_NEED_UPDATE, (8+1+4+4+4)); data.append(m_target->GetPackGUID()); data << uint8(m_auraSlot); |