mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 19:37:02 +00:00
Merge commit 'origin/master' into 310
Conflicts: src/game/UpdateData.cpp
This commit is contained in:
commit
e75e66063e
38 changed files with 687 additions and 537 deletions
|
|
@ -349,11 +349,11 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
|
|||
static AuraType const frozenAuraTypes[] = { SPELL_AURA_MOD_ROOT, SPELL_AURA_MOD_STUN, SPELL_AURA_NONE };
|
||||
|
||||
Aura::Aura(SpellEntry const* spellproto, uint32 eff, int32 *currentBasePoints, Unit *target, Unit *caster, Item* castItem) :
|
||||
m_spellmod(NULL), m_caster_guid(0), m_castItemGuid(castItem?castItem->GetGUID():0), m_target(target),
|
||||
m_spellmod(NULL), m_caster_guid(0), m_target(target), m_castItemGuid(castItem?castItem->GetGUID():0),
|
||||
m_timeCla(1000), m_periodicTimer(0), m_removeMode(AURA_REMOVE_BY_DEFAULT), m_AuraDRGroup(DIMINISHING_NONE),
|
||||
m_effIndex(eff), m_auraSlot(MAX_AURAS), m_auraFlags(AFLAG_NONE), m_auraLevel(1), m_procCharges(0), m_stackAmount(1),
|
||||
m_positive(false), m_permanent(false), m_isPeriodic(false), m_isAreaAura(false), m_isPersistent(false),
|
||||
m_updated(false), m_isRemovedOnShapeLost(true), m_in_use(false)
|
||||
m_isRemovedOnShapeLost(true), m_updated(false), m_in_use(false)
|
||||
{
|
||||
assert(target);
|
||||
|
||||
|
|
@ -701,7 +701,6 @@ void AreaAura::Update(uint32 diff)
|
|||
|
||||
if( pGroup)
|
||||
{
|
||||
uint8 subgroup = ((Player*)owner)->GetSubGroup();
|
||||
for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
{
|
||||
Player* Target = itr->getSource();
|
||||
|
|
@ -1305,7 +1304,7 @@ void Aura::HandleAddModifier(bool apply, bool Real)
|
|||
m_target->CastSpell(m_target,45471,true);
|
||||
}
|
||||
}
|
||||
void Aura::HandleAddTargetTrigger(bool apply, bool Real)
|
||||
void Aura::HandleAddTargetTrigger(bool apply, bool /*Real*/)
|
||||
{
|
||||
// Use SpellModifier structure for check
|
||||
// used only fields:
|
||||
|
|
@ -2556,7 +2555,7 @@ void Aura::HandleAuraHover(bool apply, bool Real)
|
|||
m_target->SendMessageToSet(&data,true);
|
||||
}
|
||||
|
||||
void Aura::HandleWaterBreathing(bool apply, bool Real)
|
||||
void Aura::HandleWaterBreathing(bool /*apply*/, bool /*Real*/)
|
||||
{
|
||||
// update timers in client
|
||||
if(m_target->GetTypeId()==TYPEID_PLAYER)
|
||||
|
|
@ -2963,7 +2962,7 @@ void Aura::HandleForceReaction(bool apply, bool Real)
|
|||
player->GetReputationMgr().SendForceReactions();
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModSkill(bool apply, bool Real)
|
||||
void Aura::HandleAuraModSkill(bool apply, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -3016,7 +3015,7 @@ void Aura::HandleChannelDeathItem(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandleBindSight(bool apply, bool Real)
|
||||
void Aura::HandleBindSight(bool apply, bool /*Real*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if(!caster || caster->GetTypeId() != TYPEID_PLAYER)
|
||||
|
|
@ -3025,7 +3024,7 @@ void Aura::HandleBindSight(bool apply, bool Real)
|
|||
((Player*)caster)->SetFarSightGUID(apply ? m_target->GetGUID() : 0);
|
||||
}
|
||||
|
||||
void Aura::HandleFarSight(bool apply, bool Real)
|
||||
void Aura::HandleFarSight(bool apply, bool /*Real*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if(!caster || caster->GetTypeId() != TYPEID_PLAYER)
|
||||
|
|
@ -3034,7 +3033,7 @@ void Aura::HandleFarSight(bool apply, bool Real)
|
|||
((Player*)caster)->SetFarSightGUID(apply ? m_target->GetGUID() : 0);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraTrackCreatures(bool apply, bool Real)
|
||||
void Aura::HandleAuraTrackCreatures(bool apply, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId()!=TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -3044,7 +3043,7 @@ void Aura::HandleAuraTrackCreatures(bool apply, bool Real)
|
|||
m_target->SetUInt32Value(PLAYER_TRACK_CREATURES, apply ? ((uint32)1)<<(m_modifier.m_miscvalue-1) : 0 );
|
||||
}
|
||||
|
||||
void Aura::HandleAuraTrackResources(bool apply, bool Real)
|
||||
void Aura::HandleAuraTrackResources(bool apply, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId()!=TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -3054,7 +3053,7 @@ void Aura::HandleAuraTrackResources(bool apply, bool Real)
|
|||
m_target->SetUInt32Value(PLAYER_TRACK_RESOURCES, apply ? ((uint32)1)<<(m_modifier.m_miscvalue-1): 0 );
|
||||
}
|
||||
|
||||
void Aura::HandleAuraTrackStealthed(bool apply, bool Real)
|
||||
void Aura::HandleAuraTrackStealthed(bool apply, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId()!=TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -3065,7 +3064,7 @@ void Aura::HandleAuraTrackStealthed(bool apply, bool Real)
|
|||
m_target->ApplyModFlag(PLAYER_FIELD_BYTES,PLAYER_FIELD_BYTE_TRACK_STEALTHED,apply);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModScale(bool apply, bool Real)
|
||||
void Aura::HandleAuraModScale(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_target->ApplyPercentModFloatValue(OBJECT_FIELD_SCALE_X,m_modifier.m_amount,apply);
|
||||
}
|
||||
|
|
@ -3193,7 +3192,7 @@ void Aura::HandleModPossessPet(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModPetTalentsPoints(bool Apply, bool Real)
|
||||
void Aura::HandleAuraModPetTalentsPoints(bool /*Apply*/, bool Real)
|
||||
{
|
||||
if(!Real)
|
||||
return;
|
||||
|
|
@ -3688,7 +3687,6 @@ void Aura::HandleAuraModRoot(bool apply, bool Real)
|
|||
if(!Real)
|
||||
return;
|
||||
|
||||
uint32 apply_stat = UNIT_STAT_ROOT;
|
||||
if (apply)
|
||||
{
|
||||
// Frost root aura -> freeze/unfreeze target
|
||||
|
|
@ -3986,7 +3984,7 @@ void Aura::HandleAuraModUseNormalSpeed(bool /*apply*/, bool Real)
|
|||
/*** IMMUNITY ***/
|
||||
/*********************************************************/
|
||||
|
||||
void Aura::HandleModMechanicImmunity(bool apply, bool Real)
|
||||
void Aura::HandleModMechanicImmunity(bool apply, bool /*Real*/)
|
||||
{
|
||||
uint32 mechanic = 1 << m_modifier.m_miscvalue;
|
||||
|
||||
|
|
@ -4063,7 +4061,7 @@ void Aura::HandleModMechanicImmunity(bool apply, bool Real)
|
|||
}
|
||||
|
||||
//this method is called whenever we add / remove aura which gives m_target some imunity to some spell effect
|
||||
void Aura::HandleAuraModEffectImmunity(bool apply, bool Real)
|
||||
void Aura::HandleAuraModEffectImmunity(bool apply, bool /*Real*/)
|
||||
{
|
||||
// when removing flag aura, handle flag drop
|
||||
if( !apply && m_target->GetTypeId() == TYPEID_PLAYER
|
||||
|
|
@ -4139,7 +4137,7 @@ void Aura::HandleAuraModSchoolImmunity(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModDmgImmunity(bool apply, bool Real)
|
||||
void Aura::HandleAuraModDmgImmunity(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_target->ApplySpellImmune(GetId(),IMMUNITY_DAMAGE,m_modifier.m_miscvalue,apply);
|
||||
}
|
||||
|
|
@ -4171,7 +4169,7 @@ void Aura::HandleAuraProcTriggerSpell(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModStalked(bool apply, bool Real)
|
||||
void Aura::HandleAuraModStalked(bool apply, bool /*Real*/)
|
||||
{
|
||||
// used by spells: Hunter's Mark, Mind Vision, Syndicate Tracker (MURP) DND
|
||||
if(apply)
|
||||
|
|
@ -4184,7 +4182,7 @@ void Aura::HandleAuraModStalked(bool apply, bool Real)
|
|||
/*** PERIODIC ***/
|
||||
/*********************************************************/
|
||||
|
||||
void Aura::HandlePeriodicTriggerSpell(bool apply, bool Real)
|
||||
void Aura::HandlePeriodicTriggerSpell(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_isPeriodic = apply;
|
||||
if (m_spellProto->Id == 66 && !apply)
|
||||
|
|
@ -4194,7 +4192,7 @@ void Aura::HandlePeriodicTriggerSpell(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandlePeriodicTriggerSpellWithValue(bool apply, bool Real)
|
||||
void Aura::HandlePeriodicTriggerSpellWithValue(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_isPeriodic = apply;
|
||||
}
|
||||
|
|
@ -4213,7 +4211,7 @@ void Aura::HandlePeriodicEnergize(bool apply, bool Real)
|
|||
m_modifier.m_amount = m_target->GetMaxPower(POWER_MANA) * 25 / 10000;
|
||||
}
|
||||
|
||||
void Aura::HandleAuraPowerBurn(bool apply, bool Real)
|
||||
void Aura::HandleAuraPowerBurn(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_isPeriodic = apply;
|
||||
}
|
||||
|
|
@ -4258,7 +4256,7 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real)
|
|||
m_isPeriodic = apply;
|
||||
}
|
||||
|
||||
void Aura::HandlePeriodicHeal(bool apply, bool Real)
|
||||
void Aura::HandlePeriodicHeal(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_isPeriodic = apply;
|
||||
}
|
||||
|
|
@ -4371,7 +4369,7 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
|
|||
//3 points: ${($m1+$b1*3+0.03*$AP)*6} damage over 12 secs
|
||||
//4 points: ${($m1+$b1*4+0.03428571*$AP)*7} damage over 14 secs
|
||||
//5 points: ${($m1+$b1*5+0.0375*$AP)*8} damage over 16 secs
|
||||
float AP_per_combo[] = {0, 0.015f, 0.024, 0.03, 0.03428571, 0.0375};
|
||||
float AP_per_combo[6] = {0.0f, 0.015f, 0.024f, 0.03f, 0.03428571f, 0.0375f};
|
||||
uint8 cp = ((Player*)caster)->GetComboPoints();
|
||||
if (cp > 5) cp = 5;
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * AP_per_combo[cp]);
|
||||
|
|
@ -4424,22 +4422,22 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandlePeriodicDamagePCT(bool apply, bool Real)
|
||||
void Aura::HandlePeriodicDamagePCT(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_isPeriodic = apply;
|
||||
}
|
||||
|
||||
void Aura::HandlePeriodicLeech(bool apply, bool Real)
|
||||
void Aura::HandlePeriodicLeech(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_isPeriodic = apply;
|
||||
}
|
||||
|
||||
void Aura::HandlePeriodicManaLeech(bool apply, bool Real)
|
||||
void Aura::HandlePeriodicManaLeech(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_isPeriodic = apply;
|
||||
}
|
||||
|
||||
void Aura::HandlePeriodicHealthFunnel(bool apply, bool Real)
|
||||
void Aura::HandlePeriodicHealthFunnel(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_isPeriodic = apply;
|
||||
}
|
||||
|
|
@ -4452,7 +4450,7 @@ void Aura::HandlePeriodicHealthFunnel(bool apply, bool Real)
|
|||
/*** RESISTANCE ***/
|
||||
/********************************/
|
||||
|
||||
void Aura::HandleAuraModResistanceExclusive(bool apply, bool Real)
|
||||
void Aura::HandleAuraModResistanceExclusive(bool apply, bool /*Real*/)
|
||||
{
|
||||
for(int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL;x++)
|
||||
{
|
||||
|
|
@ -4465,7 +4463,7 @@ void Aura::HandleAuraModResistanceExclusive(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModResistance(bool apply, bool Real)
|
||||
void Aura::HandleAuraModResistance(bool apply, bool /*Real*/)
|
||||
{
|
||||
for(int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL;x++)
|
||||
{
|
||||
|
|
@ -4478,7 +4476,7 @@ void Aura::HandleAuraModResistance(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModBaseResistancePCT(bool apply, bool Real)
|
||||
void Aura::HandleAuraModBaseResistancePCT(bool apply, bool /*Real*/)
|
||||
{
|
||||
// only players have base stats
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
|
|
@ -4497,7 +4495,7 @@ void Aura::HandleAuraModBaseResistancePCT(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandleModResistancePercent(bool apply, bool Real)
|
||||
void Aura::HandleModResistancePercent(bool apply, bool /*Real*/)
|
||||
{
|
||||
for(int8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++)
|
||||
{
|
||||
|
|
@ -4513,7 +4511,7 @@ void Aura::HandleModResistancePercent(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandleModBaseResistance(bool apply, bool Real)
|
||||
void Aura::HandleModBaseResistance(bool apply, bool /*Real*/)
|
||||
{
|
||||
// only players have base stats
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
|
|
@ -4534,7 +4532,7 @@ void Aura::HandleModBaseResistance(bool apply, bool Real)
|
|||
/*** STAT ***/
|
||||
/********************************/
|
||||
|
||||
void Aura::HandleAuraModStat(bool apply, bool Real)
|
||||
void Aura::HandleAuraModStat(bool apply, bool /*Real*/)
|
||||
{
|
||||
if (m_modifier.m_miscvalue < -2 || m_modifier.m_miscvalue > 4)
|
||||
{
|
||||
|
|
@ -4555,7 +4553,7 @@ void Aura::HandleAuraModStat(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandleModPercentStat(bool apply, bool Real)
|
||||
void Aura::HandleModPercentStat(bool apply, bool /*Real*/)
|
||||
{
|
||||
if (m_modifier.m_miscvalue < -1 || m_modifier.m_miscvalue > 4)
|
||||
{
|
||||
|
|
@ -4574,7 +4572,7 @@ void Aura::HandleModPercentStat(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandleModSpellDamagePercentFromStat(bool /*apply*/, bool Real)
|
||||
void Aura::HandleModSpellDamagePercentFromStat(bool /*apply*/, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4585,7 +4583,7 @@ void Aura::HandleModSpellDamagePercentFromStat(bool /*apply*/, bool Real)
|
|||
((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
|
||||
}
|
||||
|
||||
void Aura::HandleModSpellHealingPercentFromStat(bool /*apply*/, bool Real)
|
||||
void Aura::HandleModSpellHealingPercentFromStat(bool /*apply*/, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4603,7 +4601,7 @@ void Aura::HandleAuraModDispelResist(bool apply, bool Real)
|
|||
m_target->CastSpell(m_target,44416,true,NULL,this,GetCasterGUID());
|
||||
}
|
||||
|
||||
void Aura::HandleModSpellDamagePercentFromAttackPower(bool /*apply*/, bool Real)
|
||||
void Aura::HandleModSpellDamagePercentFromAttackPower(bool /*apply*/, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4614,7 +4612,7 @@ void Aura::HandleModSpellDamagePercentFromAttackPower(bool /*apply*/, bool Real)
|
|||
((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
|
||||
}
|
||||
|
||||
void Aura::HandleModSpellHealingPercentFromAttackPower(bool /*apply*/, bool Real)
|
||||
void Aura::HandleModSpellHealingPercentFromAttackPower(bool /*apply*/, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4623,7 +4621,7 @@ void Aura::HandleModSpellHealingPercentFromAttackPower(bool /*apply*/, bool Real
|
|||
((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
|
||||
}
|
||||
|
||||
void Aura::HandleModHealingDone(bool /*apply*/, bool Real)
|
||||
void Aura::HandleModHealingDone(bool /*apply*/, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4632,7 +4630,7 @@ void Aura::HandleModHealingDone(bool /*apply*/, bool Real)
|
|||
((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
|
||||
}
|
||||
|
||||
void Aura::HandleModTotalPercentStat(bool apply, bool Real)
|
||||
void Aura::HandleModTotalPercentStat(bool apply, bool /*Real*/)
|
||||
{
|
||||
if (m_modifier.m_miscvalue < -1 || m_modifier.m_miscvalue > 4)
|
||||
{
|
||||
|
|
@ -4663,7 +4661,7 @@ void Aura::HandleModTotalPercentStat(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModResistenceOfStatPercent(bool /*apply*/, bool Real)
|
||||
void Aura::HandleAuraModResistenceOfStatPercent(bool /*apply*/, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4683,12 +4681,12 @@ void Aura::HandleAuraModResistenceOfStatPercent(bool /*apply*/, bool Real)
|
|||
/********************************/
|
||||
/*** HEAL & ENERGIZE ***/
|
||||
/********************************/
|
||||
void Aura::HandleAuraModTotalHealthPercentRegen(bool apply, bool Real)
|
||||
void Aura::HandleAuraModTotalHealthPercentRegen(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_isPeriodic = apply;
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModTotalManaPercentRegen(bool apply, bool Real)
|
||||
void Aura::HandleAuraModTotalManaPercentRegen(bool apply, bool /*Real*/)
|
||||
{
|
||||
if(m_modifier.periodictime == 0)
|
||||
m_modifier.periodictime = 1000;
|
||||
|
|
@ -4697,7 +4695,7 @@ void Aura::HandleAuraModTotalManaPercentRegen(bool apply, bool Real)
|
|||
m_isPeriodic = apply;
|
||||
}
|
||||
|
||||
void Aura::HandleModRegen(bool apply, bool Real) // eating
|
||||
void Aura::HandleModRegen(bool apply, bool /*Real*/) // eating
|
||||
{
|
||||
if(m_modifier.periodictime == 0)
|
||||
m_modifier.periodictime = 5000;
|
||||
|
|
@ -4756,7 +4754,7 @@ void Aura::HandleModManaRegen(bool /*apply*/, bool Real)
|
|||
((Player*)m_target)->UpdateManaRegen();
|
||||
}
|
||||
|
||||
void Aura::HandleComprehendLanguage(bool apply, bool Real)
|
||||
void Aura::HandleComprehendLanguage(bool apply, bool /*Real*/)
|
||||
{
|
||||
if(apply)
|
||||
m_target->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_COMPREHEND_LANG);
|
||||
|
|
@ -4799,7 +4797,7 @@ void Aura::HandleAuraModIncreaseHealth(bool apply, bool Real)
|
|||
m_target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(m_modifier.m_amount), apply);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModIncreaseMaxHealth(bool apply, bool Real)
|
||||
void Aura::HandleAuraModIncreaseMaxHealth(bool apply, bool /*Real*/)
|
||||
{
|
||||
uint32 oldhealth = m_target->GetHealth();
|
||||
double healthPercentage = (double)oldhealth / (double)m_target->GetMaxHealth();
|
||||
|
|
@ -4817,7 +4815,7 @@ void Aura::HandleAuraModIncreaseMaxHealth(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModIncreaseEnergy(bool apply, bool Real)
|
||||
void Aura::HandleAuraModIncreaseEnergy(bool apply, bool /*Real*/)
|
||||
{
|
||||
Powers powerType = m_target->getPowerType();
|
||||
if(int32(powerType) != m_modifier.m_miscvalue)
|
||||
|
|
@ -4853,7 +4851,7 @@ void Aura::HandleAuraIncreaseBaseHealthPercent(bool apply, bool /*Real*/)
|
|||
/*** FIGHT ***/
|
||||
/********************************/
|
||||
|
||||
void Aura::HandleAuraModParryPercent(bool /*apply*/, bool Real)
|
||||
void Aura::HandleAuraModParryPercent(bool /*apply*/, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId()!=TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4861,7 +4859,7 @@ void Aura::HandleAuraModParryPercent(bool /*apply*/, bool Real)
|
|||
((Player*)m_target)->UpdateParryPercentage();
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModDodgePercent(bool /*apply*/, bool Real)
|
||||
void Aura::HandleAuraModDodgePercent(bool /*apply*/, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId()!=TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4870,7 +4868,7 @@ void Aura::HandleAuraModDodgePercent(bool /*apply*/, bool Real)
|
|||
//sLog.outError("BONUS DODGE CHANCE: + %f", float(m_modifier.m_amount));
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModBlockPercent(bool /*apply*/, bool Real)
|
||||
void Aura::HandleAuraModBlockPercent(bool /*apply*/, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId()!=TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -4920,7 +4918,7 @@ void Aura::HandleAuraModCritPercent(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandleModHitChance(bool apply, bool Real)
|
||||
void Aura::HandleModHitChance(bool apply, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
|
|
@ -4934,7 +4932,7 @@ void Aura::HandleModHitChance(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
void Aura::HandleModSpellHitChance(bool apply, bool Real)
|
||||
void Aura::HandleModSpellHitChance(bool apply, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
|
|
@ -4980,19 +4978,19 @@ void Aura::HandleModSpellCritChanceShool(bool /*apply*/, bool Real)
|
|||
/*** ATTACK SPEED ***/
|
||||
/********************************/
|
||||
|
||||
void Aura::HandleModCastingSpeed(bool apply, bool Real)
|
||||
void Aura::HandleModCastingSpeed(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_target->ApplyCastTimePercentMod(m_modifier.m_amount,apply);
|
||||
}
|
||||
|
||||
void Aura::HandleModMeleeRangedSpeedPct(bool apply, bool Real)
|
||||
void Aura::HandleModMeleeRangedSpeedPct(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_target->ApplyAttackTimePercentMod(BASE_ATTACK,m_modifier.m_amount,apply);
|
||||
m_target->ApplyAttackTimePercentMod(OFF_ATTACK,m_modifier.m_amount,apply);
|
||||
m_target->ApplyAttackTimePercentMod(RANGED_ATTACK, m_modifier.m_amount, apply);
|
||||
}
|
||||
|
||||
void Aura::HandleModCombatSpeedPct(bool apply, bool Real)
|
||||
void Aura::HandleModCombatSpeedPct(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_target->ApplyCastTimePercentMod(m_modifier.m_amount,apply);
|
||||
m_target->ApplyAttackTimePercentMod(BASE_ATTACK,m_modifier.m_amount,apply);
|
||||
|
|
@ -5000,7 +4998,7 @@ void Aura::HandleModCombatSpeedPct(bool apply, bool Real)
|
|||
m_target->ApplyAttackTimePercentMod(RANGED_ATTACK, m_modifier.m_amount, apply);
|
||||
}
|
||||
|
||||
void Aura::HandleModAttackSpeed(bool apply, bool Real)
|
||||
void Aura::HandleModAttackSpeed(bool apply, bool /*Real*/)
|
||||
{
|
||||
if(!m_target->isAlive() )
|
||||
return;
|
||||
|
|
@ -5008,19 +5006,19 @@ void Aura::HandleModAttackSpeed(bool apply, bool Real)
|
|||
m_target->ApplyAttackTimePercentMod(BASE_ATTACK,m_modifier.m_amount,apply);
|
||||
}
|
||||
|
||||
void Aura::HandleHaste(bool apply, bool Real)
|
||||
void Aura::HandleHaste(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_target->ApplyAttackTimePercentMod(BASE_ATTACK, m_modifier.m_amount,apply);
|
||||
m_target->ApplyAttackTimePercentMod(OFF_ATTACK, m_modifier.m_amount,apply);
|
||||
m_target->ApplyAttackTimePercentMod(RANGED_ATTACK,m_modifier.m_amount,apply);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModRangedHaste(bool apply, bool Real)
|
||||
void Aura::HandleAuraModRangedHaste(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_target->ApplyAttackTimePercentMod(RANGED_ATTACK, m_modifier.m_amount, apply);
|
||||
}
|
||||
|
||||
void Aura::HandleRangedAmmoHaste(bool apply, bool Real)
|
||||
void Aura::HandleRangedAmmoHaste(bool apply, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -5031,12 +5029,12 @@ void Aura::HandleRangedAmmoHaste(bool apply, bool Real)
|
|||
/*** ATTACK POWER ***/
|
||||
/********************************/
|
||||
|
||||
void Aura::HandleAuraModAttackPower(bool apply, bool Real)
|
||||
void Aura::HandleAuraModAttackPower(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(m_modifier.m_amount), apply);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModRangedAttackPower(bool apply, bool Real)
|
||||
void Aura::HandleAuraModRangedAttackPower(bool apply, bool /*Real*/)
|
||||
{
|
||||
if((m_target->getClassMask() & CLASSMASK_WAND_USERS)!=0)
|
||||
return;
|
||||
|
|
@ -5044,13 +5042,13 @@ void Aura::HandleAuraModRangedAttackPower(bool apply, bool Real)
|
|||
m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(m_modifier.m_amount), apply);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModAttackPowerPercent(bool apply, bool Real)
|
||||
void Aura::HandleAuraModAttackPowerPercent(bool apply, bool /*Real*/)
|
||||
{
|
||||
//UNIT_FIELD_ATTACK_POWER_MULTIPLIER = multiplier - 1
|
||||
m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_PCT, float(m_modifier.m_amount), apply);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModRangedAttackPowerPercent(bool apply, bool Real)
|
||||
void Aura::HandleAuraModRangedAttackPowerPercent(bool apply, bool /*Real*/)
|
||||
{
|
||||
if((m_target->getClassMask() & CLASSMASK_WAND_USERS)!=0)
|
||||
return;
|
||||
|
|
@ -5059,7 +5057,7 @@ void Aura::HandleAuraModRangedAttackPowerPercent(bool apply, bool Real)
|
|||
m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_PCT, float(m_modifier.m_amount), apply);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModRangedAttackPowerOfStatPercent(bool apply, bool Real)
|
||||
void Aura::HandleAuraModRangedAttackPowerOfStatPercent(bool /*apply*/, bool Real)
|
||||
{
|
||||
// spells required only Real aura add/remove
|
||||
if(!Real)
|
||||
|
|
@ -5070,7 +5068,7 @@ void Aura::HandleAuraModRangedAttackPowerOfStatPercent(bool apply, bool Real)
|
|||
((Player*)m_target)->UpdateAttackPowerAndDamage(true);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModAttackPowerOfStatPercent(bool apply, bool Real)
|
||||
void Aura::HandleAuraModAttackPowerOfStatPercent(bool /*apply*/, bool Real)
|
||||
{
|
||||
// spells required only Real aura add/remove
|
||||
if(!Real)
|
||||
|
|
@ -5262,7 +5260,7 @@ void Aura::HandleModPowerCost(bool apply, bool Real)
|
|||
m_target->ApplyModInt32Value(UNIT_FIELD_POWER_COST_MODIFIER+i,m_modifier.m_amount,apply);
|
||||
}
|
||||
|
||||
void Aura::HandleNoReagentUseAura(bool Apply, bool Real)
|
||||
void Aura::HandleNoReagentUseAura(bool /*Apply*/, bool Real)
|
||||
{
|
||||
// spells required only Real aura add/remove
|
||||
if(!Real)
|
||||
|
|
@ -5430,7 +5428,7 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
|||
m_target->SetHealth(uint32(ceil((double)m_target->GetMaxHealth() * healthPercentage)));*/
|
||||
}
|
||||
|
||||
void Aura::HandleAuraEmpathy(bool apply, bool Real)
|
||||
void Aura::HandleAuraEmpathy(bool apply, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
|
@ -5440,7 +5438,7 @@ void Aura::HandleAuraEmpathy(bool apply, bool Real)
|
|||
m_target->ApplyModUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_SPECIALINFO, apply);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraUntrackable(bool apply, bool Real)
|
||||
void Aura::HandleAuraUntrackable(bool apply, bool /*Real*/)
|
||||
{
|
||||
if(apply)
|
||||
m_target->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNTRACKABLE);
|
||||
|
|
@ -5448,7 +5446,7 @@ void Aura::HandleAuraUntrackable(bool apply, bool Real)
|
|||
m_target->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNTRACKABLE);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModPacify(bool apply, bool Real)
|
||||
void Aura::HandleAuraModPacify(bool apply, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -5465,7 +5463,7 @@ void Aura::HandleAuraModPacifyAndSilence(bool apply, bool Real)
|
|||
HandleAuraModSilence(apply,Real);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraGhost(bool apply, bool Real)
|
||||
void Aura::HandleAuraGhost(bool apply, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -5535,7 +5533,7 @@ void Aura::HandleForceMoveForward(bool apply, bool Real)
|
|||
m_target->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FORCE_MOVE);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModExpertise(bool /*apply*/, bool Real)
|
||||
void Aura::HandleAuraModExpertise(bool /*apply*/, bool /*Real*/)
|
||||
{
|
||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -5560,7 +5558,7 @@ void Aura::HandleModTargetResistance(bool apply, bool Real)
|
|||
m_target->ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE,m_modifier.m_amount, apply);
|
||||
}
|
||||
|
||||
void Aura::HandleShieldBlockValue(bool apply, bool Real)
|
||||
void Aura::HandleShieldBlockValue(bool apply, bool /*Real*/)
|
||||
{
|
||||
BaseModType modType = FLAT_MOD;
|
||||
if(m_modifier.m_auraname == SPELL_AURA_MOD_SHIELD_BLOCKVALUE_PCT)
|
||||
|
|
@ -5959,14 +5957,9 @@ void Aura::PeriodicTick()
|
|||
if( BattleGround *bg = ((Player*)pCaster)->GetBattleGround() )
|
||||
bg->UpdatePlayerScore(((Player*)pCaster), SCORE_HEALING_DONE, gain);
|
||||
|
||||
//Do check before because m_modifier.auraName can be invalidate by DealDamage.
|
||||
bool procSpell = (m_modifier.m_auraname == SPELL_AURA_PERIODIC_HEAL && m_target != pCaster);
|
||||
|
||||
m_target->getHostilRefManager().threatAssist(pCaster, float(gain) * 0.5f, GetSpellProto());
|
||||
|
||||
Unit* target = m_target; // aura can be deleted in DealDamage
|
||||
SpellEntry const* spellProto = GetSpellProto();
|
||||
bool haveCastItem = GetCastItemGUID()!=0;
|
||||
|
||||
// heal for caster damage
|
||||
if(m_target!=pCaster && spellProto->SpellVisual[0]==163)
|
||||
|
|
@ -5996,8 +5989,8 @@ void Aura::PeriodicTick()
|
|||
}
|
||||
}
|
||||
|
||||
uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC;// | PROC_FLAG_SUCCESSFUL_HEAL;
|
||||
uint32 procVictim = 0;//ROC_FLAG_ON_TAKE_PERIODIC | PROC_FLAG_TAKEN_HEAL;
|
||||
// uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC;// | PROC_FLAG_SUCCESSFUL_HEAL;
|
||||
// uint32 procVictim = 0;//ROC_FLAG_ON_TAKE_PERIODIC | PROC_FLAG_TAKEN_HEAL;
|
||||
// ignore item heals
|
||||
// if(procSpell && !haveCastItem)
|
||||
// pCaster->ProcDamageAndSpell(target, procAttacker, procVictim, PROC_EX_NORMAL_HIT, pdamage, BASE_ATTACK, spellProto);
|
||||
|
|
@ -6691,7 +6684,7 @@ void Aura::HandleArenaPreparation(bool apply, bool Real)
|
|||
m_target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PREPARATION);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraControlVehicle(bool apply, bool Real)
|
||||
void Aura::HandleAuraControlVehicle(bool /*apply*/, bool Real)
|
||||
{
|
||||
if(!Real)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue