mirror of
https://github.com/mangosfour/server.git
synced 2025-12-22 04:37:01 +00:00
[7034] Add support 96 bit spell family mask to triggers
Some fix/add data in table (about 100 records) Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
675a90b267
commit
b6efea176d
7 changed files with 1607 additions and 723 deletions
|
|
@ -822,15 +822,12 @@ void SpellMgr::LoadSpellProcEvents()
|
|||
|
||||
uint32 count = 0;
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8
|
||||
QueryResult *result = WorldDatabase.Query("SELECT entry, SchoolMask, SpellFamilyName, SpellFamilyMask, procFlags, procEx, ppmRate, CustomChance, Cooldown FROM spell_proc_event");
|
||||
// 0 1 2 3 4 5 6 7 8 9 10
|
||||
QueryResult *result = WorldDatabase.Query("SELECT entry, SchoolMask, SpellFamilyName, SpellFamilyMask0, SpellFamilyMask1, SpellFamilyMask2, procFlags, procEx, ppmRate, CustomChance, Cooldown FROM spell_proc_event");
|
||||
if( !result )
|
||||
{
|
||||
|
||||
barGoLink bar( 1 );
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString( ">> Loaded %u spell proc event conditions", count );
|
||||
return;
|
||||
|
|
@ -857,12 +854,13 @@ void SpellMgr::LoadSpellProcEvents()
|
|||
|
||||
spe.schoolMask = fields[1].GetUInt32();
|
||||
spe.spellFamilyName = fields[2].GetUInt32();
|
||||
spe.spellFamilyMask = fields[3].GetUInt64();
|
||||
spe.procFlags = fields[4].GetUInt32();
|
||||
spe.procEx = fields[5].GetUInt32();
|
||||
spe.ppmRate = fields[6].GetFloat();
|
||||
spe.customChance = fields[7].GetFloat();
|
||||
spe.cooldown = fields[8].GetUInt32();
|
||||
spe.spellFamilyMask = (uint64)fields[3].GetUInt32()|((uint64)fields[4].GetUInt32()<<32);
|
||||
spe.spellFamilyMask2= fields[5].GetUInt32();
|
||||
spe.procFlags = fields[6].GetUInt32();
|
||||
spe.procEx = fields[7].GetUInt32();
|
||||
spe.ppmRate = fields[8].GetFloat();
|
||||
spe.customChance = fields[9].GetFloat();
|
||||
spe.cooldown = fields[10].GetUInt32();
|
||||
|
||||
mSpellProcEventMap[entry] = spe;
|
||||
|
||||
|
|
@ -923,9 +921,10 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const * spellP
|
|||
return false;
|
||||
|
||||
// spellFamilyName is Ok need check for spellFamilyMask if present
|
||||
if(spellProcEvent->spellFamilyMask)
|
||||
if(spellProcEvent->spellFamilyMask || spellProcEvent->spellFamilyMask2)
|
||||
{
|
||||
if ((spellProcEvent->spellFamilyMask & procSpell->SpellFamilyFlags) == 0)
|
||||
if ((spellProcEvent->spellFamilyMask & procSpell->SpellFamilyFlags ) == 0 &&
|
||||
(spellProcEvent->spellFamilyMask2 & procSpell->SpellFamilyFlags2) == 0)
|
||||
return false;
|
||||
active = true; // Spell added manualy -> so its active spell
|
||||
}
|
||||
|
|
|
|||
|
|
@ -556,7 +556,8 @@ struct SpellProcEventEntry
|
|||
{
|
||||
uint32 schoolMask; // if nonzero - bit mask for matching proc condition based on spell candidate's school: Fire=2, Mask=1<<(2-1)=2
|
||||
uint32 spellFamilyName; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyNamer value
|
||||
uint64 spellFamilyMask; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyFlags (like auras 107 and 108 do)
|
||||
uint64 spellFamilyMask; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyFlags (like auras 107 and 108 do)
|
||||
uint32 spellFamilyMask2; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyFlags2 (like auras 107 and 108 do)
|
||||
uint32 procFlags; // bitmask for matching proc event
|
||||
uint32 procEx; // proc Extend info (see ProcFlagsEx)
|
||||
float ppmRate; // for melee (ranged?) damage spells - proc rate per minute. if zero, falls back to flat chance from Spell.dbc
|
||||
|
|
|
|||
|
|
@ -4562,6 +4562,15 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
target = this;
|
||||
break;
|
||||
}
|
||||
// Vampiric Touch (generic, used by some boss)
|
||||
case 52723:
|
||||
case 60501:
|
||||
{
|
||||
triggered_spell_id = 52724;
|
||||
basepoints0 = damage / 2;
|
||||
target = this;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7033"
|
||||
#define REVISION_NR "7034"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue