mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[10010] Use schoolmask enum in struct SpellNonMeleeDamage, some indents fix.
This commit is contained in:
parent
b23fd66aa6
commit
59cf9c1dbd
5 changed files with 52 additions and 52 deletions
|
|
@ -7562,7 +7562,7 @@ void Aura::PeriodicTick()
|
||||||
|
|
||||||
SpellEntry const* spellProto = GetSpellProto();
|
SpellEntry const* spellProto = GetSpellProto();
|
||||||
// maybe has to be sent different to client, but not by SMSG_PERIODICAURALOG
|
// maybe has to be sent different to client, but not by SMSG_PERIODICAURALOG
|
||||||
SpellNonMeleeDamage damageInfo(pCaster, m_target, spellProto->Id, spellProto->SchoolMask);
|
SpellNonMeleeDamage damageInfo(pCaster, m_target, spellProto->Id, SpellSchoolMask(spellProto->SchoolMask));
|
||||||
pCaster->CalculateSpellDamage(&damageInfo, gain, spellProto);
|
pCaster->CalculateSpellDamage(&damageInfo, gain, spellProto);
|
||||||
|
|
||||||
damageInfo.target->CalculateAbsorbResistBlock(pCaster, &damageInfo, spellProto);
|
damageInfo.target->CalculateAbsorbResistBlock(pCaster, &damageInfo, spellProto);
|
||||||
|
|
|
||||||
|
|
@ -456,7 +456,7 @@ enum ProcFlags
|
||||||
{
|
{
|
||||||
PROC_FLAG_NONE = 0x00000000,
|
PROC_FLAG_NONE = 0x00000000,
|
||||||
|
|
||||||
PROC_FLAG_KILLED = 0x00000001, // 00 Killed by agressor
|
PROC_FLAG_KILLED = 0x00000001, // 00 Killed by aggressor
|
||||||
PROC_FLAG_KILL = 0x00000002, // 01 Kill target (in most cases need XP/Honor reward)
|
PROC_FLAG_KILL = 0x00000002, // 01 Kill target (in most cases need XP/Honor reward)
|
||||||
|
|
||||||
PROC_FLAG_SUCCESSFUL_MELEE_HIT = 0x00000004, // 02 Successful melee auto attack
|
PROC_FLAG_SUCCESSFUL_MELEE_HIT = 0x00000004, // 02 Successful melee auto attack
|
||||||
|
|
|
||||||
|
|
@ -1180,7 +1180,7 @@ void Unit::CastSpell(float x, float y, float z, SpellEntry const *spellInfo, boo
|
||||||
uint32 Unit::SpellNonMeleeDamageLog(Unit *pVictim, uint32 spellID, uint32 damage)
|
uint32 Unit::SpellNonMeleeDamageLog(Unit *pVictim, uint32 spellID, uint32 damage)
|
||||||
{
|
{
|
||||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellID);
|
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellID);
|
||||||
SpellNonMeleeDamage damageInfo(this, pVictim, spellInfo->Id, spellInfo->SchoolMask);
|
SpellNonMeleeDamage damageInfo(this, pVictim, spellInfo->Id, SpellSchoolMask(spellInfo->SchoolMask));
|
||||||
CalculateSpellDamage(&damageInfo, damage, spellInfo);
|
CalculateSpellDamage(&damageInfo, damage, spellInfo);
|
||||||
damageInfo.target->CalculateAbsorbResistBlock(this, &damageInfo, spellInfo);
|
damageInfo.target->CalculateAbsorbResistBlock(this, &damageInfo, spellInfo);
|
||||||
DealDamageMods(damageInfo.target,damageInfo.damage,&damageInfo.absorb);
|
DealDamageMods(damageInfo.target,damageInfo.damage,&damageInfo.absorb);
|
||||||
|
|
@ -1191,7 +1191,7 @@ uint32 Unit::SpellNonMeleeDamageLog(Unit *pVictim, uint32 spellID, uint32 damage
|
||||||
|
|
||||||
void Unit::CalculateSpellDamage(SpellNonMeleeDamage *damageInfo, int32 damage, SpellEntry const *spellInfo, WeaponAttackType attackType)
|
void Unit::CalculateSpellDamage(SpellNonMeleeDamage *damageInfo, int32 damage, SpellEntry const *spellInfo, WeaponAttackType attackType)
|
||||||
{
|
{
|
||||||
SpellSchoolMask damageSchoolMask = SpellSchoolMask(damageInfo->schoolMask);
|
SpellSchoolMask damageSchoolMask = damageInfo->schoolMask;
|
||||||
Unit *pVictim = damageInfo->target;
|
Unit *pVictim = damageInfo->target;
|
||||||
|
|
||||||
if (damage < 0)
|
if (damage < 0)
|
||||||
|
|
@ -1304,7 +1304,7 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss)
|
||||||
|
|
||||||
// Call default DealDamage (send critical in hit info for threat calculation)
|
// Call default DealDamage (send critical in hit info for threat calculation)
|
||||||
CleanDamage cleanDamage(0, BASE_ATTACK, damageInfo->HitInfo & SPELL_HIT_TYPE_CRIT ? MELEE_HIT_CRIT : MELEE_HIT_NORMAL);
|
CleanDamage cleanDamage(0, BASE_ATTACK, damageInfo->HitInfo & SPELL_HIT_TYPE_CRIT ? MELEE_HIT_CRIT : MELEE_HIT_NORMAL);
|
||||||
DealDamage(pVictim, damageInfo->damage, &cleanDamage, SPELL_DIRECT_DAMAGE, SpellSchoolMask(damageInfo->schoolMask), spellProto, durabilityLoss);
|
DealDamage(pVictim, damageInfo->damage, &cleanDamage, SPELL_DIRECT_DAMAGE, damageInfo->schoolMask, spellProto, durabilityLoss);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO for melee need create structure as in
|
//TODO for melee need create structure as in
|
||||||
|
|
@ -12481,7 +12481,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
||||||
case SPELL_AURA_PROC_TRIGGER_DAMAGE:
|
case SPELL_AURA_PROC_TRIGGER_DAMAGE:
|
||||||
{
|
{
|
||||||
DEBUG_FILTER_LOG(LOG_FILTER_SPELL_CAST, "ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", auraModifier->m_amount, spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
DEBUG_FILTER_LOG(LOG_FILTER_SPELL_CAST, "ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", auraModifier->m_amount, spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
||||||
SpellNonMeleeDamage damageInfo(this, pTarget, spellInfo->Id, spellInfo->SchoolMask);
|
SpellNonMeleeDamage damageInfo(this, pTarget, spellInfo->Id, SpellSchoolMask(spellInfo->SchoolMask));
|
||||||
CalculateSpellDamage(&damageInfo, auraModifier->m_amount, spellInfo);
|
CalculateSpellDamage(&damageInfo, auraModifier->m_amount, spellInfo);
|
||||||
damageInfo.target->CalculateAbsorbResistBlock(this, &damageInfo, spellInfo);
|
damageInfo.target->CalculateAbsorbResistBlock(this, &damageInfo, spellInfo);
|
||||||
DealDamageMods(damageInfo.target,damageInfo.damage,&damageInfo.absorb);
|
DealDamageMods(damageInfo.target,damageInfo.damage,&damageInfo.absorb);
|
||||||
|
|
|
||||||
|
|
@ -878,7 +878,7 @@ struct CalcDamageInfo
|
||||||
|
|
||||||
// Spell damage info structure based on structure sending in SMSG_SPELLNONMELEEDAMAGELOG opcode
|
// Spell damage info structure based on structure sending in SMSG_SPELLNONMELEEDAMAGELOG opcode
|
||||||
struct SpellNonMeleeDamage{
|
struct SpellNonMeleeDamage{
|
||||||
SpellNonMeleeDamage(Unit *_attacker, Unit *_target, uint32 _SpellID, uint32 _schoolMask)
|
SpellNonMeleeDamage(Unit *_attacker, Unit *_target, uint32 _SpellID, SpellSchoolMask _schoolMask)
|
||||||
: target(_target), attacker(_attacker), SpellID(_SpellID), damage(0), overkill(0), schoolMask(_schoolMask),
|
: target(_target), attacker(_attacker), SpellID(_SpellID), damage(0), overkill(0), schoolMask(_schoolMask),
|
||||||
absorb(0), resist(0), physicalLog(false), unused(false), blocked(0), HitInfo(0)
|
absorb(0), resist(0), physicalLog(false), unused(false), blocked(0), HitInfo(0)
|
||||||
{}
|
{}
|
||||||
|
|
@ -888,7 +888,7 @@ struct SpellNonMeleeDamage{
|
||||||
uint32 SpellID;
|
uint32 SpellID;
|
||||||
uint32 damage;
|
uint32 damage;
|
||||||
uint32 overkill;
|
uint32 overkill;
|
||||||
uint32 schoolMask;
|
SpellSchoolMask schoolMask;
|
||||||
uint32 absorb;
|
uint32 absorb;
|
||||||
uint32 resist;
|
uint32 resist;
|
||||||
bool physicalLog;
|
bool physicalLog;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10009"
|
#define REVISION_NR "10010"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue