[10051] Fixed talent 58426 broken after 3.3.3 switch.

Also cleanup character auras from wrong duration auras.
This commit is contained in:
VladimirMangos 2010-06-12 04:29:37 +04:00
parent 64f959fb82
commit f520c9b1e0
7 changed files with 32 additions and 10 deletions

View file

@ -21,7 +21,7 @@
DROP TABLE IF EXISTS `character_db_version`;
CREATE TABLE `character_db_version` (
`required_10007_01_characters_pet_aura` bit(1) default NULL
`required_10051_01_characters_character_aura` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB';
--

View file

@ -0,0 +1,3 @@
ALTER TABLE character_db_version CHANGE COLUMN required_10007_01_characters_pet_aura required_10051_01_characters_character_aura bit;
DELETE FROM character_aura WHERE spell = 58427;

View file

@ -87,6 +87,7 @@ pkgdata_DATA = \
10044_01_mangos_spell_chain.sql \
10044_02_mangos_spell_proc_event.sql \
10045_01_mangos_spell_proc_event.sql \
10051_01_characters_character_aura.sql \
README
## Additional files to include when running 'make dist'
@ -154,4 +155,5 @@ EXTRA_DIST = \
10044_01_mangos_spell_chain.sql \
10044_02_mangos_spell_proc_event.sql \
10045_01_mangos_spell_proc_event.sql \
10051_01_characters_character_aura.sql \
README

View file

@ -4064,7 +4064,6 @@ void Aura::HandleModStealth(bool apply, bool Real)
// Overkill
else if ((*i)->GetId() == 58426 && GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000400000))
{
target->RemoveAurasDueToSpell(58428);
target->CastSpell(target, 58427, true);
}
}
@ -4103,7 +4102,13 @@ void Aura::HandleModStealth(bool apply, bool Real)
target->CastSpell(target, 31666, true);
// Overkill
else if ((*i)->GetId() == 58426 && GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000400000))
target->CastSpell(target, 58428, true);
{
if (Aura* aura = target->GetAura(58427, EFFECT_INDEX_0))
{
aura->SetAuraMaxDuration(20*IN_MILLISECONDS);
aura->RefreshAura();
}
}
}
}
}
@ -4815,8 +4820,6 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real)
{
// Master of Subtlety
case 31666: target->RemoveAurasDueToSpell(31665); break;
// Overkill
case 58428: target->RemoveAurasDueToSpell(58427); break;
}
}
break;
@ -8455,3 +8458,17 @@ void Aura::HandleAllowOnlyAbility(bool apply, bool Real)
target->UpdateDamagePhysical(RANGED_ATTACK);
target->UpdateDamagePhysical(OFF_ATTACK);
}
void Aura::SetAuraMaxDuration( int32 duration )
{
m_maxduration = duration;
// possible overwrite persistent state
if (duration > 0)
{
if (!(m_isPassive && m_spellProto->DurationIndex == 0))
m_permanent = false;
m_auraFlags |= AFLAG_DURATION;
}
}

View file

@ -236,7 +236,7 @@ class MANGOS_DLL_SPEC Aura
int32 GetBasePoints() const { return m_currentBasePoints; }
int32 GetAuraMaxDuration() const { return m_maxduration; }
void SetAuraMaxDuration(int32 duration) { m_maxduration = duration; }
void SetAuraMaxDuration(int32 duration);
int32 GetAuraDuration() const { return m_duration; }
void SetAuraDuration(int32 duration) { m_duration = duration; }
time_t GetAuraApplyTime() const { return m_applyTime; }
@ -251,8 +251,8 @@ class MANGOS_DLL_SPEC Aura
{
m_caster_guid = caster_guid;
m_modifier.m_amount = damage;
m_maxduration = maxduration;
m_duration = duration;
SetAuraMaxDuration(maxduration);
SetAuraDuration(duration);
m_procCharges = charges;
if(uint32 maxticks = GetAuraMaxTicks())

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10050"
#define REVISION_NR "10051"
#endif // __REVISION_NR_H__

View file

@ -1,6 +1,6 @@
#ifndef __REVISION_SQL_H__
#define __REVISION_SQL_H__
#define REVISION_DB_CHARACTERS "required_10007_01_characters_pet_aura"
#define REVISION_DB_CHARACTERS "required_10051_01_characters_character_aura"
#define REVISION_DB_MANGOS "required_10045_01_mangos_spell_proc_event"
#define REVISION_DB_REALMD "required_10008_01_realmd_realmd_db_version"
#endif // __REVISION_SQL_H__