mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-21 07:22:02 -04:00
Core:
* fix "warning C4305: 'initializing' : truncation from 'double' to 'float'" warnings * fix some other warnings here and there --HG-- branch : trunk
This commit is contained in:
@@ -13905,7 +13905,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag,
|
||||
}
|
||||
// Update defence if player is victim and parry/dodge/block
|
||||
else if (isVictim && procExtra&(PROC_EX_DODGE|PROC_EX_PARRY|PROC_EX_BLOCK))
|
||||
this->ToPlayer()->UpdateCombatSkills(pTarget, attType, MELEE_HIT_DODGE);
|
||||
this->ToPlayer()->UpdateCombatSkills(pTarget, attType, true);
|
||||
}
|
||||
// If exist crit/parry/dodge/block need update aura state (for victim and attacker)
|
||||
if (procExtra & (PROC_EX_CRITICAL_HIT|PROC_EX_PARRY|PROC_EX_DODGE|PROC_EX_BLOCK))
|
||||
@@ -14613,21 +14613,21 @@ float Unit::GetAPMultiplier(WeaponAttackType attType, bool normalized)
|
||||
|
||||
Item *Weapon = this->ToPlayer()->GetWeaponForAttack(attType, true);
|
||||
if (!Weapon)
|
||||
return 2.4; // fist attack
|
||||
return 2.4f; // fist attack
|
||||
|
||||
switch (Weapon->GetProto()->InventoryType)
|
||||
{
|
||||
case INVTYPE_2HWEAPON:
|
||||
return 3.3;
|
||||
return 3.3f;
|
||||
case INVTYPE_RANGED:
|
||||
case INVTYPE_RANGEDRIGHT:
|
||||
case INVTYPE_THROWN:
|
||||
return 2.8;
|
||||
return 2.8f;
|
||||
case INVTYPE_WEAPON:
|
||||
case INVTYPE_WEAPONMAINHAND:
|
||||
case INVTYPE_WEAPONOFFHAND:
|
||||
default:
|
||||
return Weapon->GetProto()->SubClass == ITEM_SUBCLASS_WEAPON_DAGGER ? 1.7 : 2.4;
|
||||
return Weapon->GetProto()->SubClass == ITEM_SUBCLASS_WEAPON_DAGGER ? 1.7f : 2.4f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user