mirror of
https://github.com/mangosfour/server.git
synced 2025-12-31 22:37:05 +00:00
Prepare for master tree
Remove some unused in 303 data from table Fix some table data Fix send (change in 303) SMSG_SPELLDAMAGESHIELD opcode Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
30908fb5ff
commit
7a9346fe3d
6 changed files with 93 additions and 2182 deletions
|
|
@ -897,83 +897,6 @@ void Spell::AddItemTarget(Item* pitem, uint32 effIndex)
|
|||
target.effectMask = 1<<effIndex;
|
||||
m_UniqueItemInfo.push_back(target);
|
||||
}
|
||||
/*
|
||||
void Spell::doTriggers(SpellMissInfo missInfo, uint32 damage, SpellSchoolMask damageSchoolMask, uint32 block, uint32 absorb, bool crit)
|
||||
{
|
||||
// Do triggers depends from hit result (triggers on hit do in effects)
|
||||
// Set aura states depends from hit result
|
||||
if (missInfo!=SPELL_MISS_NONE)
|
||||
{
|
||||
// Miss/dodge/parry/block only for melee based spells
|
||||
// Resist only for magic based spells
|
||||
switch (missInfo)
|
||||
{
|
||||
case SPELL_MISS_MISS:
|
||||
if(m_caster->GetTypeId()== TYPEID_PLAYER)
|
||||
((Player*)m_caster)->UpdateWeaponSkill(BASE_ATTACK);
|
||||
|
||||
m_caster->CastMeleeProcDamageAndSpell(unitTarget, 0, damageSchoolMask, m_attackType, MELEE_HIT_MISS, m_spellInfo, m_IsTriggeredSpell);
|
||||
break;
|
||||
case SPELL_MISS_RESIST:
|
||||
m_caster->ProcDamageAndSpell(unitTarget, PROC_FLAG_TARGET_RESISTS, PROC_FLAG_RESIST_SPELL, 0, damageSchoolMask, m_spellInfo, m_IsTriggeredSpell);
|
||||
break;
|
||||
case SPELL_MISS_DODGE:
|
||||
if(unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)unitTarget)->UpdateDefense();
|
||||
|
||||
// Overpower
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->getClass() == CLASS_WARRIOR)
|
||||
{
|
||||
((Player*) m_caster)->AddComboPoints(unitTarget, 1);
|
||||
m_caster->StartReactiveTimer( REACTIVE_OVERPOWER );
|
||||
}
|
||||
|
||||
// Riposte
|
||||
if (unitTarget->getClass() != CLASS_ROGUE)
|
||||
{
|
||||
unitTarget->ModifyAuraState(AURA_STATE_DEFENSE, true);
|
||||
unitTarget->StartReactiveTimer( REACTIVE_DEFENSE );
|
||||
}
|
||||
|
||||
m_caster->CastMeleeProcDamageAndSpell(unitTarget, 0, damageSchoolMask, m_attackType, MELEE_HIT_DODGE, m_spellInfo, m_IsTriggeredSpell);
|
||||
break;
|
||||
case SPELL_MISS_PARRY:
|
||||
// Update victim defense ?
|
||||
if(unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)unitTarget)->UpdateDefense();
|
||||
// Mongoose bite - set only Counterattack here
|
||||
if (unitTarget->getClass() == CLASS_HUNTER)
|
||||
{
|
||||
unitTarget->ModifyAuraState(AURA_STATE_HUNTER_PARRY,true);
|
||||
unitTarget->StartReactiveTimer( REACTIVE_HUNTER_PARRY );
|
||||
}
|
||||
else
|
||||
{
|
||||
unitTarget->ModifyAuraState(AURA_STATE_DEFENSE, true);
|
||||
unitTarget->StartReactiveTimer( REACTIVE_DEFENSE );
|
||||
}
|
||||
m_caster->CastMeleeProcDamageAndSpell(unitTarget, 0, damageSchoolMask, m_attackType, MELEE_HIT_PARRY, m_spellInfo, m_IsTriggeredSpell);
|
||||
break;
|
||||
case SPELL_MISS_BLOCK:
|
||||
unitTarget->ModifyAuraState(AURA_STATE_DEFENSE, true);
|
||||
unitTarget->StartReactiveTimer( REACTIVE_DEFENSE );
|
||||
|
||||
m_caster->CastMeleeProcDamageAndSpell(unitTarget, 0, damageSchoolMask, m_attackType, MELEE_HIT_BLOCK, m_spellInfo, m_IsTriggeredSpell);
|
||||
break;
|
||||
// Trigger from this events not supported
|
||||
case SPELL_MISS_EVADE:
|
||||
case SPELL_MISS_IMMUNE:
|
||||
case SPELL_MISS_IMMUNE2:
|
||||
case SPELL_MISS_DEFLECT:
|
||||
case SPELL_MISS_ABSORB:
|
||||
// Trigger from reflects need do after get reflect result
|
||||
case SPELL_MISS_REFLECT:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -876,81 +876,11 @@ void SpellMgr::LoadSpellProcEvents()
|
|||
|
||||
sLog.outString();
|
||||
if (customProc)
|
||||
sLog.outString( ">> Loaded %u custom spell proc event conditions +%u custom", count, customProc );
|
||||
sLog.outString( ">> Loaded %u extra spell proc event conditions +%u custom", count, customProc );
|
||||
else
|
||||
sLog.outString( ">> Loaded %u spell proc event conditions", count );
|
||||
|
||||
/*
|
||||
// Commented for now, as it still produces many errors (still quite many spells miss spell_proc_event)
|
||||
for (uint32 id = 0; id < sSpellStore.GetNumRows(); ++id)
|
||||
{
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(id);
|
||||
if (!spellInfo)
|
||||
continue;
|
||||
|
||||
bool found = false;
|
||||
for (int effectId = 0; effectId < 3; ++effectId)
|
||||
{
|
||||
// at this moment check only SPELL_AURA_PROC_TRIGGER_SPELL
|
||||
if( spellInfo->EffectApplyAuraName[effectId] == SPELL_AURA_PROC_TRIGGER_SPELL )
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!found)
|
||||
continue;
|
||||
|
||||
if(GetSpellProcEvent(id))
|
||||
continue;
|
||||
|
||||
sLog.outErrorDb("Spell %u (%s) misses spell_proc_event",id,spellInfo->SpellName[sWorld.GetDBClang()]);
|
||||
}
|
||||
*/
|
||||
sLog.outString( ">> Loaded %u extra spell proc event conditions", count );
|
||||
}
|
||||
|
||||
/*
|
||||
bool SpellMgr::IsSpellProcEventCanTriggeredBy( SpellProcEventEntry const * spellProcEvent, SpellEntry const * procSpell, uint32 procFlags )
|
||||
{
|
||||
if((procFlags & spellProcEvent->procFlags) == 0)
|
||||
return false;
|
||||
|
||||
// Additional checks in case spell cast/hit/crit is the event
|
||||
// Check (if set) school, category, skill line, spell talent mask
|
||||
if(spellProcEvent->schoolMask && (!procSpell || (GetSpellSchoolMask(procSpell) & spellProcEvent->schoolMask) == 0))
|
||||
return false;
|
||||
if(spellProcEvent->category && (!procSpell || procSpell->Category != spellProcEvent->category))
|
||||
return false;
|
||||
if(spellProcEvent->skillId)
|
||||
{
|
||||
if (!procSpell)
|
||||
return false;
|
||||
|
||||
SkillLineAbilityMap::const_iterator lower = spellmgr.GetBeginSkillLineAbilityMap(procSpell->Id);
|
||||
SkillLineAbilityMap::const_iterator upper = spellmgr.GetEndSkillLineAbilityMap(procSpell->Id);
|
||||
|
||||
bool found = false;
|
||||
for(SkillLineAbilityMap::const_iterator _spell_idx = lower; _spell_idx != upper; ++_spell_idx)
|
||||
{
|
||||
if(_spell_idx->second->skillId == spellProcEvent->skillId)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
return false;
|
||||
}
|
||||
if(spellProcEvent->spellFamilyName && (!procSpell || spellProcEvent->spellFamilyName != procSpell->SpellFamilyName))
|
||||
return false;
|
||||
if(spellProcEvent->spellFamilyMask && (!procSpell || (spellProcEvent->spellFamilyMask & procSpell->SpellFamilyFlags) == 0))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
||||
bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const * spellProcEvent, uint32 EventProcFlag, SpellEntry const * procSpell, uint32 procFlags, uint32 procExtra, bool active)
|
||||
{
|
||||
// No extra req need
|
||||
|
|
|
|||
|
|
@ -469,14 +469,14 @@ enum ProcFlags
|
|||
PROC_FLAG_KILLED = 0x00000001, // 00 Killed by agressor
|
||||
PROC_FLAG_KILL_AND_GET_XP = 0x00000002, // 01 Kill that yields experience or honor
|
||||
|
||||
PROC_FLAG_SUCCESSFUL_MILEE_HIT = 0x00000004, // 02 Successful melee attack
|
||||
PROC_FLAG_TAKEN_MELEE_HIT = 0x00000008, // 03 Taken damage from melee strike hit
|
||||
PROC_FLAG_SUCCESSFUL_MILEE_HIT = 0x00000004, // 02 Successful melee auto attack
|
||||
PROC_FLAG_TAKEN_MELEE_HIT = 0x00000008, // 03 Taken damage from melee auto attack hit
|
||||
|
||||
PROC_FLAG_SUCCESSFUL_MELEE_SPELL_HIT = 0x00000010, // 04 Successful attack by Spell that use melee weapon
|
||||
PROC_FLAG_TAKEN_MELEE_SPELL_HIT = 0x00000020, // 05 Taken damage by Spell that use melee weapon
|
||||
|
||||
PROC_FLAG_SUCCESSFUL_RANGED_HIT = 0x00000040, // 06 Successful Ranged attack (all ranged attack deal as spell so newer set :( )
|
||||
PROC_FLAG_TAKEN_RANGED_HIT = 0x00000080, // 07 Taken damage from ranged attack (all ranged attack deal as spell so newer set :( )
|
||||
PROC_FLAG_SUCCESSFUL_RANGED_HIT = 0x00000040, // 06 Successful Ranged auto attack
|
||||
PROC_FLAG_TAKEN_RANGED_HIT = 0x00000080, // 07 Taken damage from ranged auto attack
|
||||
|
||||
PROC_FLAG_SUCCESSFUL_RANGED_SPELL_HIT = 0x00000100, // 08 Successful Ranged attack by Spell that use ranged weapon
|
||||
PROC_FLAG_TAKEN_RANGED_SPELL_HIT = 0x00000200, // 09 Taken damage by Spell that use ranged weapon
|
||||
|
|
@ -527,12 +527,12 @@ enum ProcFlagsEx
|
|||
PROC_EX_DEFLECT = 0x0000200,
|
||||
PROC_EX_ABSORB = 0x0000400,
|
||||
PROC_EX_REFLECT = 0x0000800,
|
||||
PROC_EX_INTERRUPT = 0x0001000, // Melle hit result can be Interrupt (not used)
|
||||
PROC_EX_INTERRUPT = 0x0001000, // Melee hit result can be Interrupt (not used)
|
||||
PROC_EX_RESERVED1 = 0x0002000,
|
||||
PROC_EX_RESERVED2 = 0x0004000,
|
||||
PROC_EX_RESERVED3 = 0x0008000,
|
||||
PROC_EX_EX_TRIGGER_ALWAYS = 0x0010000, // If set trigger always ( no matter another flags) used for drop charges
|
||||
PROC_EX_EX_ONE_TIME_TRIGGER = 0x0020000 // If set trigger always but only one time
|
||||
PROC_EX_EX_ONE_TIME_TRIGGER = 0x0020000 // If set trigger always but only one time (not used)
|
||||
};
|
||||
|
||||
struct SpellProcEventEntry
|
||||
|
|
|
|||
2095
src/game/Unit.cpp
2095
src/game/Unit.cpp
File diff suppressed because it is too large
Load diff
|
|
@ -765,7 +765,6 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
typedef std::multimap< spellEffectPair, Aura*> AuraMap;
|
||||
typedef std::list<Aura *> AuraList;
|
||||
typedef std::list<DiminishingReturn> Diminishing;
|
||||
typedef std::set<AuraType> AuraTypeSet;
|
||||
typedef std::set<uint32> ComboPointHolderSet;
|
||||
typedef std::map<uint8, uint32> VisibleAuraMap;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue