mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[10051] Fixed talent 58426 broken after 3.3.3 switch.
Also cleanup character auras from wrong duration auras.
This commit is contained in:
parent
64f959fb82
commit
f520c9b1e0
7 changed files with 32 additions and 10 deletions
|
|
@ -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';
|
||||
|
||||
--
|
||||
|
|
|
|||
3
sql/updates/10051_01_characters_character_aura.sql
Normal file
3
sql/updates/10051_01_characters_character_aura.sql
Normal 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;
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10050"
|
||||
#define REVISION_NR "10051"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
|
|
@ -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__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue