[11597] Fixed detection part triggering of spell 17767 and ranks.

Also in Unit::IsTriggeredAtSpellProcEvent allow triggering by
spell with custom flag PROC_FLAG_ON_TAKE_PERIODIC
This commit is contained in:
VladimirMangos 2011-06-04 19:35:10 +04:00
parent cae9e9c29f
commit 35bac6976c
5 changed files with 19 additions and 5 deletions

View file

@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
`version` varchar(120) default NULL, `version` varchar(120) default NULL,
`creature_ai_version` varchar(120) default NULL, `creature_ai_version` varchar(120) default NULL,
`cache_id` int(10) default '0', `cache_id` int(10) default '0',
`required_11595_09_mangos_spell_elixir` bit(1) default NULL `required_11597_01_mangos_spell_proc_event` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
-- --
@ -17070,6 +17070,7 @@ INSERT INTO `spell_proc_event` VALUES
(17106, 0x00, 7, 0x00080000, 0x00080000, 0x00080000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (17106, 0x00, 7, 0x00080000, 0x00080000, 0x00080000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(17364, 0x08, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (17364, 0x08, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(17495, 0x7F, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0.000000, 0.000000, 0), (17495, 0x7F, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0.000000, 0.000000, 0),
(17767, 0x00, 5, 0x02000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00080000, 0x00040000, 0.000000, 0.000000, 0),
(17793, 0x00, 5, 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (17793, 0x00, 5, 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
(18094, 0x00, 5, 0x0000000A, 0x0000000A, 0x0000000A, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (18094, 0x00, 5, 0x0000000A, 0x0000000A, 0x0000000A, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(18096, 0x00, 5, 0x00000100, 0x00000100, 0x00000100, 0x00800000, 0x00800000, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (18096, 0x00, 5, 0x00000100, 0x00000100, 0x00000100, 0x00800000, 0x00800000, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),

View file

@ -0,0 +1,6 @@
ALTER TABLE db_version CHANGE COLUMN required_11595_09_mangos_spell_elixir required_11597_01_mangos_spell_proc_event bit;
DELETE FROM `spell_proc_event` WHERE entry IN (17767);
INSERT INTO `spell_proc_event` VALUE
(17767, 0x00, 5, 0x02000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00080000, 0x00040000, 0.000000, 0.000000, 0);

View file

@ -384,7 +384,7 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, SpellAuraHolder* holder, S
} }
// Aura added by spell can`t trigger from self (prevent drop charges/do triggers) // Aura added by spell can`t trigger from self (prevent drop charges/do triggers)
// But except periodic triggers (can triggered from self) // But except periodic triggers (can triggered from self)
if(procSpell && procSpell->Id == spellProto->Id && !(spellProto->procFlags & PROC_FLAG_ON_TAKE_PERIODIC)) if(procSpell && procSpell->Id == spellProto->Id && !(EventProcFlag & PROC_FLAG_ON_TAKE_PERIODIC))
return false; return false;
// Check if current equipment allows aura to proc // Check if current equipment allows aura to proc
@ -3038,7 +3038,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit *pVictim, uint32 d
case SPELLFAMILY_WARLOCK: case SPELLFAMILY_WARLOCK:
{ {
// Drain Soul // Drain Soul
if (auraSpellInfo->SpellFamilyFlags & UI64LIT(0x0000000000004000)) if (auraSpellInfo->IsFitToFamilyMask(UI64LIT(0x0000000000004000)))
{ {
// search for "Improved Drain Soul" dummy aura // search for "Improved Drain Soul" dummy aura
Unit::AuraList const& mDummyAura = GetAurasByType(SPELL_AURA_DUMMY); Unit::AuraList const& mDummyAura = GetAurasByType(SPELL_AURA_DUMMY);
@ -3056,6 +3056,13 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit *pVictim, uint32 d
// Need for correct work Drain Soul SPELL_AURA_CHANNEL_DEATH_ITEM aura // Need for correct work Drain Soul SPELL_AURA_CHANNEL_DEATH_ITEM aura
return SPELL_AURA_PROC_FAILED; return SPELL_AURA_PROC_FAILED;
} }
// Consume Shadows
else if (auraSpellInfo->IsFitToFamilyMask(UI64LIT(0x0000000002000000)))
{
Aura* heal = triggeredByAura->GetHolder()->GetAuraByEffectIndex(EFFECT_INDEX_0);
if (!heal || heal->GetAuraTicks() > 1)
return SPELL_AURA_PROC_FAILED;
}
// Nether Protection // Nether Protection
else if (auraSpellInfo->SpellIconID == 1985) else if (auraSpellInfo->SpellIconID == 1985)
{ {

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "11596" #define REVISION_NR "11597"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__

View file

@ -1,6 +1,6 @@
#ifndef __REVISION_SQL_H__ #ifndef __REVISION_SQL_H__
#define __REVISION_SQL_H__ #define __REVISION_SQL_H__
#define REVISION_DB_CHARACTERS "required_11436_01_characters_character_queststatus" #define REVISION_DB_CHARACTERS "required_11436_01_characters_character_queststatus"
#define REVISION_DB_MANGOS "required_11595_09_mangos_spell_elixir" #define REVISION_DB_MANGOS "required_11597_01_mangos_spell_proc_event"
#define REVISION_DB_REALMD "required_10008_01_realmd_realmd_db_version" #define REVISION_DB_REALMD "required_10008_01_realmd_realmd_db_version"
#endif // __REVISION_SQL_H__ #endif // __REVISION_SQL_H__