mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7419] Fixed some type convertion warnings.
This commit is contained in:
parent
bf718ea961
commit
4dad8f40d0
4 changed files with 19 additions and 15 deletions
|
|
@ -3108,7 +3108,7 @@ void Aura::HandleModPossessPet(bool apply, bool Real)
|
|||
else
|
||||
pet->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_24);
|
||||
|
||||
((Player*)caster)->SetFarSightGUID(apply ? pet->GetGUID() : NULL);
|
||||
((Player*)caster)->SetFarSightGUID(apply ? pet->GetGUID() : 0);
|
||||
((Player*)caster)->SetCharm(apply ? pet : NULL);
|
||||
((Player*)caster)->SetClientControl(pet, apply ? 1 : 0);
|
||||
|
||||
|
|
@ -4181,7 +4181,7 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real)
|
|||
{
|
||||
// Explosive Shot
|
||||
if (apply && !loading && caster)
|
||||
m_modifier.m_amount +=caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 8 / 100;
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 8 / 100);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1255,7 +1255,7 @@ void Spell::EffectDummy(uint32 i)
|
|||
if (m_spellInfo->SpellFamilyFlags & 0x0000000000040000LL)
|
||||
{
|
||||
// In 303 exist spirit depend
|
||||
uint32 spirit = m_caster->GetStat(STAT_SPIRIT);
|
||||
uint32 spirit = uint32(m_caster->GetStat(STAT_SPIRIT));
|
||||
switch (m_spellInfo->Id)
|
||||
{
|
||||
case 1454: damage+=spirit; break;
|
||||
|
|
|
|||
|
|
@ -6029,7 +6029,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
//else if (auraSpellInfo->Id==47300) // Dark Flame Aura
|
||||
else if (auraSpellInfo->Id==57345) // Darkmoon Card: Greatness
|
||||
{
|
||||
uint32 stat = 0;
|
||||
float stat = 0.0f;
|
||||
// strength
|
||||
if (GetStat(STAT_STRENGTH) > stat) { trigger_spell_id = 60229;stat = GetStat(STAT_STRENGTH); }
|
||||
// agility
|
||||
|
|
@ -7618,10 +7618,12 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
|||
coeff = bonus->dot_damage * LvlPenalty * stack;
|
||||
else
|
||||
coeff = bonus->direct_damage * LvlPenalty * stack;
|
||||
|
||||
if (bonus->ap_bonus)
|
||||
DoneTotal+=bonus->ap_bonus * GetTotalAttackPowerValue(BASE_ATTACK) * stack;
|
||||
DoneTotal += DoneAdvertisedBenefit * coeff * SpellModSpellDamage;
|
||||
TakenTotal+= TakenAdvertisedBenefit * coeff;
|
||||
DoneTotal += int32(bonus->ap_bonus * GetTotalAttackPowerValue(BASE_ATTACK) * stack);
|
||||
|
||||
DoneTotal += int32(DoneAdvertisedBenefit * coeff * SpellModSpellDamage);
|
||||
TakenTotal += int32(TakenAdvertisedBenefit * coeff);
|
||||
}
|
||||
// Default calculation
|
||||
else if (DoneAdvertisedBenefit || TakenAdvertisedBenefit)
|
||||
|
|
@ -7671,8 +7673,8 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
|||
break;
|
||||
}
|
||||
}
|
||||
DoneTotal += DoneAdvertisedBenefit * (CastingTime / 3500.0f) * DotFactor * LvlPenalty * SpellModSpellDamage;
|
||||
TakenTotal+= TakenAdvertisedBenefit * (CastingTime / 3500.0f) * DotFactor * LvlPenalty;
|
||||
DoneTotal += int32(DoneAdvertisedBenefit * (CastingTime / 3500.0f) * DotFactor * LvlPenalty * SpellModSpellDamage);
|
||||
TakenTotal+= int32(TakenAdvertisedBenefit * (CastingTime / 3500.0f) * DotFactor * LvlPenalty);
|
||||
}
|
||||
|
||||
float tmpDamage = (pdamage + DoneTotal) * DoneTotalMod;
|
||||
|
|
@ -8034,10 +8036,12 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
|
|||
coeff = bonus->dot_damage * LvlPenalty * stack;
|
||||
else
|
||||
coeff = bonus->direct_damage * LvlPenalty * stack;
|
||||
|
||||
if (bonus->ap_bonus)
|
||||
DoneTotal+=bonus->ap_bonus * GetTotalAttackPowerValue(BASE_ATTACK) * stack;
|
||||
DoneTotal += DoneAdvertisedBenefit * coeff * SpellModSpellDamage;
|
||||
TakenTotal+= TakenAdvertisedBenefit * coeff;
|
||||
DoneTotal += int32(bonus->ap_bonus * GetTotalAttackPowerValue(BASE_ATTACK) * stack);
|
||||
|
||||
DoneTotal += int32(DoneAdvertisedBenefit * coeff * SpellModSpellDamage);
|
||||
TakenTotal += int32(TakenAdvertisedBenefit * coeff);
|
||||
}
|
||||
// Default calculation
|
||||
else if (DoneAdvertisedBenefit || TakenAdvertisedBenefit)
|
||||
|
|
@ -8087,8 +8091,8 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
|
|||
break;
|
||||
}
|
||||
}
|
||||
DoneTotal += DoneAdvertisedBenefit * (CastingTime / 3500.0f) * DotFactor * LvlPenalty * SpellModSpellDamage * 1.88f;
|
||||
TakenTotal+= TakenAdvertisedBenefit * (CastingTime / 3500.0f) * DotFactor * LvlPenalty * 1.88f;
|
||||
DoneTotal += int32(DoneAdvertisedBenefit * (CastingTime / 3500.0f) * DotFactor * LvlPenalty * SpellModSpellDamage * 1.88f);
|
||||
TakenTotal += int32(TakenAdvertisedBenefit * (CastingTime / 3500.0f) * DotFactor * LvlPenalty * 1.88f);
|
||||
}
|
||||
|
||||
// use float as more appropriate for negative values and percent applying
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7418"
|
||||
#define REVISION_NR "7419"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue