mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +00:00
[8561] Replace another auras code call by explicit code
This better by reasons: * More explcitly clear how work aura code * One from "sub-auras" already applied only in player only case * Another "sub-aura have lot code related to appling for specific weapon types that not need in this aura code
This commit is contained in:
parent
0356924cf9
commit
734426a6f6
2 changed files with 14 additions and 3 deletions
|
|
@ -7400,6 +7400,17 @@ void Aura::HandleModTargetArmorPct(bool apply, bool Real)
|
|||
|
||||
void Aura::HandleAuraModAllCritChance(bool apply, bool Real)
|
||||
{
|
||||
this->HandleAuraModCritPercent(apply, Real);
|
||||
this->HandleModSpellCritChance(apply, Real);
|
||||
// spells required only Real aura add/remove
|
||||
if(!Real)
|
||||
return;
|
||||
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
((Player*)m_target)->HandleBaseModValue(CRIT_PERCENTAGE, FLAT_MOD, float (m_modifier.m_amount), apply);
|
||||
((Player*)m_target)->HandleBaseModValue(OFFHAND_CRIT_PERCENTAGE, FLAT_MOD, float (m_modifier.m_amount), apply);
|
||||
((Player*)m_target)->HandleBaseModValue(RANGED_CRIT_PERCENTAGE, FLAT_MOD, float (m_modifier.m_amount), apply);
|
||||
|
||||
// included in Player::UpdateSpellCritChance calculation
|
||||
((Player*)m_target)->UpdateAllSpellCritChances();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8560"
|
||||
#define REVISION_NR "8561"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue