[12128] Fix more warnings - close #4

* Remove warning: enumeration value '<value>' not handled in switch
* Remove warning: enumeral and non-enumeral type in conditional expression
* Remove warning: too many arguments for format

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
Shyax 2012-08-28 10:33:20 +02:00 committed by Antz
parent 1707edbcfd
commit 6e76dbae3f
16 changed files with 43 additions and 16 deletions

View file

@ -3746,7 +3746,7 @@ uint32 Unit::GetWeaponSkillValue(WeaponAttackType attType, Unit const* target) c
return GetMaxSkillValueForLevel(); // always maximized SKILL_FERAL_COMBAT in fact
// weapon skill or (unarmed for base attack)
uint32 skill = item ? item->GetSkill() : SKILL_UNARMED;
uint32 skill = item ? item->GetSkill() : uint32(SKILL_UNARMED);
// in PvP use full skill instead current skill value
value = (target && target->GetTypeId() == TYPEID_PLAYER)
@ -7633,7 +7633,7 @@ uint32 Unit::MeleeDamageBonusDone(Unit* pVictim, uint32 pdamage, WeaponAttackTyp
bool isWeaponDamageBasedSpell = !(spellProto && (damagetype == DOT || IsSpellHaveEffect(spellProto, SPELL_EFFECT_SCHOOL_DAMAGE)));
Item* pWeapon = GetTypeId() == TYPEID_PLAYER ? ((Player*)this)->GetWeaponForAttack(attType, true, false) : NULL;
uint32 creatureTypeMask = pVictim->GetCreatureTypeMask();
uint32 schoolMask = spellProto ? spellProto->SchoolMask : GetMeleeDamageSchoolMask();
uint32 schoolMask = spellProto ? spellProto->SchoolMask : uint32(GetMeleeDamageSchoolMask());
// FLAT damage bonus auras
// =======================
@ -7888,7 +7888,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* pCaster, uint32 pdamage, WeaponAttackTy
// differentiate for weapon damage based spells
bool isWeaponDamageBasedSpell = !(spellProto && (damagetype == DOT || IsSpellHaveEffect(spellProto, SPELL_EFFECT_SCHOOL_DAMAGE)));
uint32 schoolMask = spellProto ? spellProto->SchoolMask : GetMeleeDamageSchoolMask();
uint32 schoolMask = spellProto ? spellProto->SchoolMask : uint32(GetMeleeDamageSchoolMask());
uint32 mechanicMask = spellProto ? GetAllSpellMechanicMask(spellProto) : 0;
// Shred also have bonus as MECHANIC_BLEED damages