mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[9844] Fix some whitespace errors.
Signed-off-by: hunuza <hunuza@gmail.com>
This commit is contained in:
parent
ec0141261a
commit
68abd76c97
20 changed files with 88 additions and 88 deletions
|
|
@ -1340,13 +1340,13 @@ void Unit::CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *da
|
|||
// Physical Immune check
|
||||
if (damageInfo->target->IsImmunedToDamage(damageInfo->damageSchoolMask))
|
||||
{
|
||||
damageInfo->HitInfo |= HITINFO_NORMALSWING;
|
||||
damageInfo->TargetState = VICTIMSTATE_IS_IMMUNE;
|
||||
damageInfo->HitInfo |= HITINFO_NORMALSWING;
|
||||
damageInfo->TargetState = VICTIMSTATE_IS_IMMUNE;
|
||||
|
||||
damageInfo->procEx |=PROC_EX_IMMUNE;
|
||||
damageInfo->damage = 0;
|
||||
damageInfo->cleanDamage = 0;
|
||||
return;
|
||||
damageInfo->procEx |=PROC_EX_IMMUNE;
|
||||
damageInfo->damage = 0;
|
||||
damageInfo->cleanDamage = 0;
|
||||
return;
|
||||
}
|
||||
damage += CalculateDamage (damageInfo->attackType, false);
|
||||
// Add melee damage bonus
|
||||
|
|
@ -1671,33 +1671,33 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
|
|||
AuraList const& vDamageShields = pVictim->GetAurasByType(SPELL_AURA_DAMAGE_SHIELD);
|
||||
for(AuraList::const_iterator i = vDamageShields.begin(); i != vDamageShields.end();)
|
||||
{
|
||||
if (alreadyDone.find(*i) == alreadyDone.end())
|
||||
{
|
||||
alreadyDone.insert(*i);
|
||||
uint32 damage=(*i)->GetModifier()->m_amount;
|
||||
SpellEntry const *i_spellProto = (*i)->GetSpellProto();
|
||||
//Calculate absorb resist ??? no data in opcode for this possibly unable to absorb or resist?
|
||||
//uint32 absorb;
|
||||
//uint32 resist;
|
||||
//CalcAbsorbResist(pVictim, SpellSchools(spellProto->School), SPELL_DIRECT_DAMAGE, damage, &absorb, &resist);
|
||||
//damage-=absorb + resist;
|
||||
if (alreadyDone.find(*i) == alreadyDone.end())
|
||||
{
|
||||
alreadyDone.insert(*i);
|
||||
uint32 damage=(*i)->GetModifier()->m_amount;
|
||||
SpellEntry const *i_spellProto = (*i)->GetSpellProto();
|
||||
//Calculate absorb resist ??? no data in opcode for this possibly unable to absorb or resist?
|
||||
//uint32 absorb;
|
||||
//uint32 resist;
|
||||
//CalcAbsorbResist(pVictim, SpellSchools(spellProto->School), SPELL_DIRECT_DAMAGE, damage, &absorb, &resist);
|
||||
//damage-=absorb + resist;
|
||||
|
||||
pVictim->DealDamageMods(this,damage,NULL);
|
||||
pVictim->DealDamageMods(this,damage,NULL);
|
||||
|
||||
WorldPacket data(SMSG_SPELLDAMAGESHIELD,(8+8+4+4+4+4));
|
||||
data << uint64(pVictim->GetGUID());
|
||||
data << uint64(GetGUID());
|
||||
data << uint32(i_spellProto->Id);
|
||||
data << uint32(damage); // Damage
|
||||
data << uint32(0); // Overkill
|
||||
data << uint32(i_spellProto->SchoolMask);
|
||||
pVictim->SendMessageToSet(&data, true );
|
||||
WorldPacket data(SMSG_SPELLDAMAGESHIELD,(8+8+4+4+4+4));
|
||||
data << uint64(pVictim->GetGUID());
|
||||
data << uint64(GetGUID());
|
||||
data << uint32(i_spellProto->Id);
|
||||
data << uint32(damage); // Damage
|
||||
data << uint32(0); // Overkill
|
||||
data << uint32(i_spellProto->SchoolMask);
|
||||
pVictim->SendMessageToSet(&data, true );
|
||||
|
||||
pVictim->DealDamage(this, damage, 0, SPELL_DIRECT_DAMAGE, GetSpellSchoolMask(i_spellProto), i_spellProto, true);
|
||||
pVictim->DealDamage(this, damage, 0, SPELL_DIRECT_DAMAGE, GetSpellSchoolMask(i_spellProto), i_spellProto, true);
|
||||
|
||||
i = vDamageShields.begin();
|
||||
}
|
||||
else
|
||||
i = vDamageShields.begin();
|
||||
}
|
||||
else
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
|
@ -2314,7 +2314,7 @@ void Unit::CalculateAbsorbResistBlock(Unit *pCaster, SpellNonMeleeDamage *damage
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (blocked)
|
||||
{
|
||||
damageInfo->blocked = GetShieldBlockValue();
|
||||
|
|
@ -5563,7 +5563,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
return true;
|
||||
// Crititcal counted -> roll chance
|
||||
if (roll_chance_i(triggerAmount))
|
||||
CastSpell(this, 48108, true, castItem, triggeredByAura);
|
||||
CastSpell(this, 48108, true, castItem, triggeredByAura);
|
||||
}
|
||||
mod->m_amount = 25;
|
||||
return true;
|
||||
|
|
@ -7670,8 +7670,8 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
if (!(10*(int32(GetHealth() - damage)) < int32(3 * GetMaxHealth())))
|
||||
return false;
|
||||
|
||||
if(pVictim && pVictim->isAlive())
|
||||
pVictim->getThreatManager().modifyThreatPercent(this,-10);
|
||||
if(pVictim && pVictim->isAlive())
|
||||
pVictim->getThreatManager().modifyThreatPercent(this,-10);
|
||||
|
||||
basepoints[0] = triggerAmount * GetMaxHealth() / 100;
|
||||
trigger_spell_id = 31616;
|
||||
|
|
@ -7901,7 +7901,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
|
||||
// try detect target manually if not set
|
||||
if (target == NULL)
|
||||
target = !(procFlags & PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL) && IsPositiveSpell(trigger_spell_id) ? this : pVictim;
|
||||
target = !(procFlags & PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL) && IsPositiveSpell(trigger_spell_id) ? this : pVictim;
|
||||
|
||||
// default case
|
||||
if (!target || target!=this && !target->isAlive())
|
||||
|
|
@ -9789,7 +9789,7 @@ uint32 Unit::SpellHealingBonusTaken(Unit *pCaster, SpellEntry const *spellProto,
|
|||
|
||||
// Healing Done
|
||||
// Done total percent damage auras
|
||||
int32 TakenTotal = 0;
|
||||
int32 TakenTotal = 0;
|
||||
|
||||
// Taken fixed damage bonus auras
|
||||
int32 TakenAdvertisedBenefit = SpellBaseHealingBonusTaken(GetSpellSchoolMask(spellProto));
|
||||
|
|
@ -10179,7 +10179,7 @@ uint32 Unit::MeleeDamageBonusDone(Unit *pVictim, uint32 pdamage,WeaponAttackType
|
|||
|
||||
// Frost Strike
|
||||
if (spellProto && spellProto->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && spellProto->SpellFamilyFlags & UI64LIT(0x0000000400000000))
|
||||
{
|
||||
{
|
||||
// search disease
|
||||
bool found = false;
|
||||
Unit::AuraMap const& auras = pVictim->GetAuras();
|
||||
|
|
@ -10308,7 +10308,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit *pCaster, uint32 pdamage,WeaponAttackTyp
|
|||
// FLAT damage bonus auras
|
||||
// =======================
|
||||
int32 TakenFlat = 0;
|
||||
|
||||
|
||||
// ..taken flat (base at attack power for marked target and base at attack power for creature type)
|
||||
if (attType == RANGED_ATTACK)
|
||||
TakenFlat += GetTotalAuraModifier(SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN);
|
||||
|
|
@ -10341,7 +10341,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit *pCaster, uint32 pdamage,WeaponAttackTyp
|
|||
|
||||
// special dummys/class scripts and other effects
|
||||
// =============================================
|
||||
|
||||
|
||||
// .. taken (dummy auras)
|
||||
AuraList const& mDummyAuras = GetAurasByType(SPELL_AURA_DUMMY);
|
||||
for(AuraList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
|
||||
|
|
@ -11601,7 +11601,7 @@ int32 Unit::CalculateSpellDuration(SpellEntry const* spellProto, SpellEffectInde
|
|||
int32 durationMod_not_stack = target->GetMaxNegativeAuraModifierByMiscValue(SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK, mechanic);
|
||||
|
||||
if (!IsPositiveSpell(spellProto->Id))
|
||||
durationMod_always += target->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DURATION_OF_MAGIC_EFFECTS, spellProto->DmgClass);
|
||||
durationMod_always += target->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DURATION_OF_MAGIC_EFFECTS, spellProto->DmgClass);
|
||||
|
||||
int32 durationMod = 0;
|
||||
// Select strongest negative mod
|
||||
|
|
@ -12444,8 +12444,8 @@ bool InitTriggerAuraData()
|
|||
{
|
||||
for (int i=0;i<TOTAL_AURAS;++i)
|
||||
{
|
||||
isTriggerAura[i]=false;
|
||||
isNonTriggerAura[i] = false;
|
||||
isTriggerAura[i]=false;
|
||||
isNonTriggerAura[i] = false;
|
||||
}
|
||||
isTriggerAura[SPELL_AURA_DUMMY] = true;
|
||||
isTriggerAura[SPELL_AURA_MOD_CONFUSE] = true;
|
||||
|
|
@ -13044,7 +13044,7 @@ void Unit::SetStandState(uint8 state)
|
|||
SetByteValue(UNIT_FIELD_BYTES_1, 0, state);
|
||||
|
||||
if (IsStandState())
|
||||
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_NOT_SEATED);
|
||||
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_NOT_SEATED);
|
||||
|
||||
if(GetTypeId()==TYPEID_PLAYER)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue