382m_base(base), m_spellInfo(base->GetSpellInfo()), m_effectInfo(spellEfffectInfo), m_spellmod(nullptr),
383m_baseAmount(baseAmount ? *baseAmount : spellEfffectInfo.BasePoints),
384_amount(), _periodicTimer(0), _period(0), _ticksDone(0),
385m_canBeRecalculated(true), m_isPeriodic(false)
399template <
typename Container>
404 for (
auto appIter = targetMap.begin(); appIter != targetMap.end(); ++appIter)
407 targetContainer.push_back(appIter->second->GetTarget());
411template <
typename Container>
415 for (
auto appIter = targetMap.begin(); appIter != targetMap.end(); ++appIter)
418 applicationContainer.push_back(appIter->second);
428 if (!amount && caster)
435 if (
Item* castItem = playerCaster->GetItemByGuid(itemGUID))
437 if (castItem->GetItemSuffixFactor())
449 amount =
uint32((item_rand_suffix->AllocationPct[k] * castItem->GetItemSuffixFactor()) / 10000);
477 amount =
int32(
GetBase()->GetUnitOwner()->CountPctFromMaxHealth(10));
482 for (Unit::AuraEffectList::const_iterator itr = overrideClassScripts.begin(); itr != overrideClassScripts.end(); ++itr)
487 if ((*itr)->GetMiscValue() == 7801)
489 AddPct(amount, (*itr)->GetAmount());
525 amount = std::accumulate(std::begin(periodicAuras), std::end(periodicAuras), amount, [
this](
int32 val,
AuraEffect const* aurEff)
554 if (resetPeriodicTimer)
663 uint8 handleMask = 0;
666 if (onStackOrReapply)
672 std::vector<AuraApplication*> effectApplications;
677 aurApp->GetTarget()->_RegisterAuraEffect(
this,
false);
695 aurApp->GetTarget()->_RegisterAuraEffect(
this,
true);
721 bool prevented =
false;
761 if (
GetBase()->IsUsingCharges())
774 for (Unit::AuraApplicationMap::iterator iter = auras.begin(); iter != auras.end(); ++iter)
776 Aura* aura = iter->second->GetBase();
786 aurEff->RecalculateAmount();
792 aurEff->RecalculateAmount();
797 aurEff->RecalculateAmount();
802 aurEff->RecalculateAmount();
832 std::vector<AuraApplication*> effectApplications;
946 if (!damageInfo || !damageInfo->
GetDamage())
999 if (lastExtraAttackSpell == triggerSpellId)
1004 if (lastExtraAttackSpell == 16459 || lastExtraAttackSpell == 66923)
1094 HotWSpellId = 24900;
1108 HotWSpellId = 24899;
1113 HotWSpellId = 24899;
1164 target->
CastSpell(target, spellId,
this);
1167 target->
CastSpell(target, spellId2,
this);
1174 for (
auto itr = sp_list.begin(); itr != sp_list.end(); ++itr)
1179 if (itr->first == spellId || itr->first == spellId2)
1187 target->
CastSpell(target, itr->first,
this);
1202 target->
CastSpell(target, glyph->SpellID,
this);
1228 for (
AuraEffect const* aurEff : mModTotalStatPct)
1231 if (aurEff->GetSpellInfo()->SpellIconID == 240 && aurEff->GetMiscValue() == 3)
1236 target->
CastSpell(target, HotWSpellId, args);
1304 if (player->HasSpell(63410) || player->HasSpell(63411))
1324 for (
auto itr = tAuras.begin(); itr != tAuras.end();)
1330 if (itr->second->GetBase()->IsRemovedOnShapeLost(target) && !(itr->second->GetBase()->GetSpellInfo()->Stances & newStance))
1518 for (Unit::AuraEffectList::const_iterator i = amoreAuras.begin(); i != amoreAuras.end(); ++i)
1593 if (!phases.empty())
1594 for (Unit::AuraEffectList::const_iterator itr = phases.begin(); itr != phases.end(); ++itr)
1595 newPhase |= (*itr)->GetMiscValue();
1603 if (player->IsGameMaster())
1604 newPhase = 0xFFFFFFFF;
1606 player->SetPhaseMask(newPhase,
false);
1607 player->GetSession()->SendSetPhaseShift(newPhase);
1616 newPhase = data->phaseMask;
1746 int32 FurorChance = 0;
1748 FurorChance = std::max(dummy->GetAmount(), 0);
1785 if (prevForm != form)
1791 if (!transformSpellInfo || !
GetSpellInfo()->IsPositive())
1819 target->
CastSpell(target, 37316, dummy);
1824 target->
CastSpell(target, 37325, dummy);
1835 Rage_val += aurEff->GetAmount() * 10;
1841 for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr)
1872 aurEff->RecalculateAmount();
2064 TC_LOG_ERROR(
"spells.aura.effect",
"Auras: unknown creature id = {} (only need its modelid) From Spell Aura Transform in Spell ID = {}",
GetMiscValue(),
GetId());
2077 if (caster->HasAura(52648))
2119 sObjectMgr->GetCreatureModelRandomGender(&displayID);
2146 if (!caster || caster == target)
2185 for (UnitList::iterator iter = targets.begin(); iter != targets.end(); ++iter)
2192 if ((*iter)->GetCurrentSpell(i)
2193 && (*iter)->GetCurrentSpell(i)->m_targets.GetUnitTargetGUID() == target->
GetGUID())
2201 pair.second->ScaleThreat(0.0f);
2207 targetPlayer->SendAttackSwingCancelAttack();
2246 creature->InitializeReactState();
2273 targetPlayer->SendAttackSwingCancelAttack();
2293 void(*flagChangeFunc)(
Unit* u) =
nullptr;
2329 flagChangeFunc(target);
2558 pet->InitTalentForLevel();
2599 creatureEntry = 24906;
2601 creatureEntry = 15665;
2607 displayId =
GetMiscValueB() == 2 && creatureInfo->Modelid2 > 0 ? creatureInfo->Modelid2 : creatureInfo->Modelid1;
2610 sObjectMgr->GetCreatureModelRandomGender(&displayId);
2612 vehicleId = creatureInfo->VehicleId;
2620 target->
Mount(displayId, vehicleId, creatureEntry);
2762 if (caster && caster->
IsAlive())
2969 if (!caster || caster == target)
2986 if (
GetId() == 53111)
3132 bg->EventPlayerDroppedFlag(player);
3162 bool banishFound =
false;
3253 float value = float(
GetAmount() - amount);
3399 if (std::abs(spellGroupVal) >= std::abs(
GetAmount()))
3430 TC_LOG_ERROR(
"spells.aura.effect",
"WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
3539 TC_LOG_ERROR(
"spells.aura.effect",
"WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
3547 bool zeroHealth = !target->
IsAlive();
3553 zeroHealth = (target->
GetHealth() == 0);
3595 TC_LOG_ERROR(
"spells.aura.effect",
"Aura SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT(182) does not work for non-armor type resistances!");
3729 change = (oldPower + change) - target->
GetPower(powerType);
3916 for (
AuraEffect const* aurEff : castingSpeedNotStack)
3918 if (aurEff !=
this && aurEff->GetAmount() >= 1000)
3933 if (std::abs(spellGroupVal) >= std::abs(
GetAmount()))
3961 if (std::abs(spellGroupVal) >= std::abs(
GetAmount()))
3995 if (std::abs(spellGroupVal) >= std::abs(
GetAmount()))
4162 pet->UpdateAttackPowerAndDamage();
4291 for (Unit::AuraEffectList::const_iterator i = noReagent.begin(); i != noReagent.end(); ++i)
4292 mask |= (*i)->GetSpellEffectInfo().SpellClassMask;
4309 if (!(apply) &&
GetBase()->GetDuration() == 0)
4443 bg->RemovePlayerFromResurrectQueue(target->
GetGUID());
4445 bf->RemovePlayerFromResurrectQueue(target->
GetGUID());
4473 if (
GetId() == 61777)
4500 if (apply && caster)
4515 if (apply && caster)
4529 target->
SetEntry(apply ? 17654 : 17326);
4546 case 57819: FactionID = 1106;
break;
4547 case 57820: FactionID = 1098;
break;
4548 case 57821: FactionID = 1090;
break;
4549 case 57822: FactionID = 1091;
break;
4582 uint32 creatureEntry = 0;
4586 creatureEntry = 24906;
4588 creatureEntry = 15665;
4596 sObjectMgr->GetCreatureModelRandomGender(&displayID);
4685 uint32 noSpaceForCount = 0;
4692 count -= noSpaceForCount;
4704 plCaster->
SendNewItem(newitem, count,
true,
true);
4844 if (!triggeredSpellInfo)
4859 caster->
CastSpell(target, triggeredSpellId, args);
4864 target->
RemoveAura(triggeredSpellId, casterGUID);
4871 if (
Aura* triggeredAura = target->
GetAura(triggeredSpellId, casterGUID))
4922 if (
uint32 spellId = overrideSpells->Spells[i])
4930 if (
uint32 spellId = overrideSpells->Spells[i])
4973 data <<
uint32(apply ? vehicleId : 0);
4997 if (triggerSpellId == 0)
4999 TC_LOG_WARN(
"spells.aura.effect.nospell",
"AuraEffect::HandlePeriodicTriggerSpellAuraTick: Spell {} [EffectIndex: {}] does not have triggered spell.",
GetId(),
GetEffIndex());
5005 if (
Unit* triggerCaster = triggeredSpellInfo->NeedsToBeTriggeredByCaster(
m_spellInfo) ? caster : target)
5007 triggerCaster->CastSpell(target, triggerSpellId,
this);
5008 TC_LOG_DEBUG(
"spells.aura.effect",
"AuraEffect::HandlePeriodicTriggerSpellAuraTick: Spell {} Trigger {}",
GetId(), triggeredSpellInfo->Id);
5012 TC_LOG_ERROR(
"spells.aura.effect.nospell",
"AuraEffect::HandlePeriodicTriggerSpellAuraTick: Spell {} has non-existent spell {} in EffectTriggered[{}] and is therefore not triggered.",
GetId(), triggerSpellId,
GetEffIndex());
5018 if (triggerSpellId == 0)
5020 TC_LOG_WARN(
"spells.aura.effect.nospell",
"AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell {} [EffectIndex: {}] does not have triggered spell.",
GetId(),
GetEffIndex());
5026 if (
Unit* triggerCaster = triggeredSpellInfo->NeedsToBeTriggeredByCaster(
m_spellInfo) ? caster : target)
5032 triggerCaster->CastSpell(target, triggerSpellId, args);
5033 TC_LOG_DEBUG(
"spells.aura.effect",
"AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell {} Trigger {}",
GetId(), triggeredSpellInfo->Id);
5037 TC_LOG_ERROR(
"spells.aura.effect.nospell",
"AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell {} has non-existent spell {} in EffectTriggered[{}] and is therefore not triggered.",
GetId(), triggerSpellId,
GetEffIndex());
5063 sScriptMgr->ModifyPeriodicDamageAurasTick(target, caster, damage);
5106 damage = damageReducedArmor;
5126 TC_LOG_DEBUG(
"spells.aura.effect",
"PeriodicTick: {} attacked {} for {} dmg inflicted by {} absorb is {}",
5175 sScriptMgr->ModifyPeriodicDamageAurasTick(target, caster, damage);
5191 damage = damageReducedArmor;
5210 TC_LOG_DEBUG(
"spells.aura.effect",
"PeriodicTick: {} health leech of {} for {} dmg inflicted by {} abs is {}",
5242 if (!caster || !caster->
IsAlive())
5280 damage =
int32(damage * gainMultiplier);
5310 sScriptMgr->ModifyPeriodicDamageAurasTick(target, caster, damage);
5327 TC_LOG_DEBUG(
"spells.aura.effect",
"PeriodicTick: {} heal of {} for {} health inflicted by {}",
5359 log.
damage = funnelDamage;
5360 log.
absorb = funnelAbsorb;
5408 if (drainAmount > maxmana)
5409 drainAmount = maxmana;
5412 TC_LOG_DEBUG(
"spells.aura.effect",
"PeriodicTick: {} power leech of {} for {} dmg inflicted by {}",
5426 int32 gainAmount =
int32(drainedAmount * gainMultiplier);
5427 int32 gainedAmount = 0;
5430 gainedAmount = caster->
ModifyPower(powerType, gainAmount);
5438 int32 manaFeedVal = 0;
5440 manaFeedVal = aurEff->GetAmount();
5442 if (manaFeedVal > 0)
5472 TC_LOG_DEBUG(
"spells.aura.effect",
"PeriodicTick: {} energize {} for {} dmg inflicted by {}",
5510 TC_LOG_DEBUG(
"spells.aura.effect",
"PeriodicTick: {} energize {} for {} dmg inflicted by {}",
5584 if (damageLeft <= 0)
5596 if (triggerSpellId == 0)
5598 TC_LOG_WARN(
"spells.aura.effect.nospell",
"AuraEffect::HandleProcTriggerSpellAuraProc: Spell {} [EffectIndex: {}] does not have triggered spell.",
GetId(),
GetEffIndex());
5604 TC_LOG_DEBUG(
"spells.aura.effect",
"AuraEffect::HandleProcTriggerSpellAuraProc: Triggering spell {} from aura {} proc", triggeredSpellInfo->Id,
GetId());
5605 triggerCaster->
CastSpell(triggerTarget, triggeredSpellInfo->Id,
this);
5608 TC_LOG_ERROR(
"spells.aura.effect.nospell",
"AuraEffect::HandleProcTriggerSpellAuraProc: Spell {} has non-existent spell {} in EffectTriggered[{}] and is therefore not triggered.",
GetId(), triggerSpellId,
GetEffIndex());
5617 if (triggerSpellId == 0)
5619 TC_LOG_WARN(
"spells.aura.effect.nospell",
"AuraEffect::HandleProcTriggerSpellAuraProc: Spell {} [EffectIndex: {}] does not have triggered spell.",
GetId(),
GetEffIndex());
5627 triggerCaster->
CastSpell(triggerTarget, triggerSpellId, args);
5628 TC_LOG_DEBUG(
"spells.aura.effect",
"AuraEffect::HandleProcTriggerSpellWithValueAuraProc: Triggering spell {} with value {} from aura {} proc", triggeredSpellInfo->Id,
GetAmount(),
GetId());
5631 TC_LOG_ERROR(
"spells.aura.effect.nospell",
"AuraEffect::HandleProcTriggerSpellWithValueAuraProc: Spell {} has non-existent spell {} in EffectTriggered[{}] and is therefore not triggered.",
GetId(), triggerSpellId,
GetEffIndex());
5653 TC_LOG_DEBUG(
"spells.aura.effect",
"AuraEffect::HandleProcTriggerDamageAuraProc: Triggering {} spell damage from aura {} proc", damage,
GetId());
5665 triggerSpellId = 57952;
5669 triggerSpellId = 59979;
5672 triggerSpellId = 43594;
5675 TC_LOG_DEBUG(
"spells.aura.effect",
"AuraEffect::HandleRaidProcFromChargeAuraProc: received not handled spell: {}",
GetId());
5696 aura->SetCharges(jumps);
5701 TC_LOG_DEBUG(
"spells.aura.effect",
"AuraEffect::HandleRaidProcFromChargeAuraProc: Triggering spell {} from aura {} proc", triggerSpellId,
GetId());
5712 TC_LOG_DEBUG(
"spells.aura.effect",
"AuraEffect::HandleRaidProcFromChargeWithValueAuraProc: received not handled spell: {}",
GetId());
5715 uint32 triggerSpellId = 33110;
5734 Unit* triggerTarget =
nullptr;
5743 aura->SetCharges(jumps);
5748 TC_LOG_DEBUG(
"spells.aura.effect",
"AuraEffect::HandleRaidProcFromChargeWithValueAuraProc: Triggering spell {} from aura {} proc", triggerSpellId,
GetId());
5749 target->
CastSpell(target, triggerSpellId, args);
#define MAX_SPELL_EFFECTS
DBCStorage< SpellItemEnchantmentEntry > sSpellItemEnchantmentStore(SpellItemEnchantmentfmt)
DBCStorage< SpellShapeshiftFormEntry > sSpellShapeshiftFormStore(SpellShapeshiftFormfmt)
DBCStorage< OverrideSpellDataEntry > sOverrideSpellDataStore(OverrideSpellDatafmt)
DBCStorage< ItemRandomSuffixEntry > sItemRandomSuffixStore(ItemRandomSuffixfmt)
DBCStorage< GlyphPropertiesEntry > sGlyphPropertiesStore(GlyphPropertiesfmt)
#define MAX_SHAPESHIFT_SPELLS
#define MAX_ITEM_ENCHANTMENT_EFFECTS
#define MAX_OVERRIDE_SPELL
#define ASSERT_NOTNULL(pointer)
@ EQUIP_ERR_ITEM_NOT_FOUND
#define TC_LOG_WARN(filterType__,...)
#define TC_LOG_DEBUG(filterType__,...)
#define TC_LOG_ERROR(filterType__,...)
@ EQUIPMENT_SLOT_MAINHAND
std::vector< ItemPosCount > ItemPosCountVec
@ PLAYER_FIELD_BYTE2_STEALTH
@ PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW
@ PLAYER_FIELD_BYTE_TRACK_STEALTHED
@ PLAYER_FIELD_BYTE_RELEASE_TIMER
std::unordered_map< uint32, PlayerSpell > PlayerSpellMap
@ PLAYER_ALLOW_ONLY_ABILITY
#define PLAYER_BYTES_2_OVERRIDE_SPELLS_UINT16_OFFSET
@ PLAYER_FIELD_BYTES_OFFSET_FLAGS
#define INVENTORY_SLOT_BAG_0
@ PLAYER_FIELD_BYTES_2_OFFSET_AURA_VISION
bool roll_chance_f(float chance)
bool roll_chance_i(int chance)
@ SERVERSIDE_VISIBILITY_GHOST
@ SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER
@ SPELL_EFFECT_ADD_EXTRA_ATTACKS
@ SPELL_EFFECT_PERSISTENT_AREA_AURA
#define CLASSMASK_WAND_USERS
@ SPELL_PREVENTION_TYPE_SILENCE
@ SPELL_ATTR5_START_PERIODIC_AT_APPLY
@ SPELL_ATTR5_HASTE_AFFECT_DURATION
@ SPELL_SCHOOL_MASK_NORMAL
@ SPELL_SCHOOL_MASK_SPELL
@ SPELL_ATTR2_HEALTH_FUNNEL
@ SPELL_ATTR2_FAIL_ON_ALL_TARGETS_IMMUNE
@ SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY
@ SPELL_ATTR1_CHANNEL_TRACK_TARGET
@ UNIT_DYNFLAG_SPECIALINFO
@ UNIT_DYNFLAG_TRACK_UNIT
#define MAX_GLYPH_SLOT_INDEX
@ SPELLFAMILY_DEATHKNIGHT
@ SPELL_ATTR0_HIDDEN_CLIENTSIDE
@ SPELL_ATTR4_FIXED_DAMAGE
@ AURA_EFFECT_HANDLE_STAT
@ AURA_EFFECT_HANDLE_CHANGE_AMOUNT
@ AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK
@ AURA_EFFECT_HANDLE_CHANGE_AMOUNT_SEND_FOR_CLIENT_MASK
@ AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK
@ AURA_EFFECT_HANDLE_SEND_FOR_CLIENT_MASK
@ AURA_EFFECT_HANDLE_REAPPLY
@ AURA_EFFECT_HANDLE_REAL
@ AURA_EFFECT_HANDLE_SKILL
@ AURA_EFFECT_HANDLE_SEND_FOR_CLIENT
@ SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE
@ SPELL_AURA_MOD_DISARM_RANGED
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_PERIODIC_HASTE
@ SPELL_AURA_MOD_SHAPESHIFT
@ SPELL_AURA_RAID_PROC_FROM_CHARGE_WITH_VALUE
@ SPELL_AURA_OBS_MOD_HEALTH
@ SPELL_AURA_PERIODIC_HEALTH_FUNNEL
@ SPELL_AURA_ADD_PCT_MODIFIER
@ SPELL_AURA_PERIODIC_MANA_LEECH
@ SPELL_AURA_MOD_INCREASE_SPEED
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_OBS_MOD_POWER
@ SPELL_AURA_ADD_FLAT_MODIFIER
@ SPELL_AURA_MOD_STEALTH_DETECT
@ SPELL_AURA_MOD_SHIELD_BLOCKVALUE_PCT
@ SPELL_AURA_CONTROL_VEHICLE
@ SPELL_AURA_MOD_MELEE_HASTE
@ SPELL_AURA_MOD_RESISTANCE_EXCLUSIVE
@ SPELL_AURA_MOD_SPELL_CRIT_CHANCE
@ SPELL_AURA_MOD_INVISIBILITY
@ SPELL_AURA_PERIODIC_HEAL
@ SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE
@ SPELL_AURA_PERIODIC_DAMAGE_PERCENT
@ SPELL_AURA_MOD_POWER_COST_SCHOOL_PCT
@ SPELL_AURA_MOD_DISARM_OFFHAND
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_DETECT_AMORE
@ SPELL_AURA_SCHOOL_IMMUNITY
@ SPELL_AURA_ALLOW_ONLY_ABILITY
@ SPELL_AURA_MOD_POWER_COST_SCHOOL
@ SPELL_AURA_MECHANIC_IMMUNITY
@ SPELL_AURA_RAID_PROC_FROM_CHARGE
@ SPELL_AURA_MOD_INCREASE_ENERGY_PERCENT
@ SPELL_AURA_MOD_SPELL_DAMAGE_FROM_CASTER
@ SPELL_AURA_MOD_PACIFY_SILENCE
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE
@ SPELL_AURA_SCHOOL_ABSORB
@ SPELL_AURA_MOD_RESISTANCE_PCT
@ SPELL_AURA_PERIODIC_ENERGIZE
@ SPELL_AURA_MOD_INVISIBILITY_DETECT
@ SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR
@ SPELL_AURA_MOD_BASE_RESISTANCE_PCT
@ SPELL_AURA_PERIODIC_LEECH
@ SPELL_AURA_PROC_TRIGGER_DAMAGE
@ SPELL_AURA_DAMAGE_IMMUNITY
@ SPELL_AURA_MOD_PERCENT_STAT
@ SPELL_AURA_REFLECT_SPELLS_SCHOOL
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_MOD_MECHANIC_RESISTANCE
@ SPELL_AURA_MOD_BASE_HEALTH_PCT
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL_FROM_CLIENT
@ SPELL_AURA_NO_REAGENT_USE
@ SPELL_AURA_MOD_UNATTACKABLE
@ SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED
@ SPELL_AURA_OVERRIDE_CLASS_SCRIPTS
@ SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ SPELL_AURA_MOD_SKILL_TALENT
@ SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT
@ FORM_SPIRITOFREDEMPTION
pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]
void(AuraEffect::* pAuraEffectHandler)(AuraApplication const *aurApp, uint8 mode, bool apply) const
@ SPELLMOD_ACTIVATION_TIME
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
@ AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION
@ SPELL_ATTR0_CU_ROLLING_PERIODIC
@ SPELL_ATTR0_CU_CAN_CRIT
@ PROC_SPELL_TYPE_NO_DMG_HEAL
@ PROC_FLAG_DONE_PERIODIC
@ PROC_FLAG_TAKEN_PERIODIC
@ UNIT_FLAG2_MIRROR_IMAGE
@ UNIT_FLAG2_COMPREHEND_LANG
@ UNIT_FLAG2_FORCE_MOVEMENT
@ UNIT_FLAG2_DISARM_OFFHAND
@ UNIT_FLAG2_DISARM_RANGED
@ UNIT_VIS_FLAGS_UNTRACKABLE
@ UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_NON_ATTACKABLE_2
@ UNIT_FLAG_PLAYER_CONTROLLED
uint32 createProcHitMask(SpellNonMeleeDamage *damageInfo, SpellMissInfo missCondition)
@ UNIT_MOD_RESISTANCE_START
#define CURRENT_FIRST_NON_MELEE_SPELL
#define MAX_COMBAT_RATING
#define CURRENT_MAX_SPELL
std::list< Unit * > UnitList
@ PLAYER_FIELD_MOD_DAMAGE_DONE_POS
@ UNIT_FIELD_POWER_COST_MODIFIER
@ PLAYER_FIELD_MOD_TARGET_RESISTANCE
@ PLAYER_FIELD_MOD_DAMAGE_DONE_PCT
@ UNIT_FIELD_POWER_COST_MULTIPLIER
@ PLAYER_FIELD_MOD_DAMAGE_DONE_NEG
@ PLAYER_FIELD_MOD_TARGET_PHYSICAL_RESISTANCE
T ApplyPct(T &base, U pct)
T CalculatePct(T base, U pct)
AuraRemoveMode GetRemoveMode() const
void HandleAuraModDecreaseSpeed(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModBlockPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePreventFleeing(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModShapeshift(AuraApplication const *aurApp, uint8 mode, bool apply) const
void GetApplicationList(Container &applicationContainer) const
void ChangeAmount(int32 newAmount, bool mark=true, bool onStackOrReapply=false)
void HandleAuraModStun(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModHealingDone(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraRetainComboPoints(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModRatingFromStat(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModDispelImmunity(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePeriodicPowerBurnAuraTick(Unit *target, Unit *caster) const
SpellInfo const * GetSpellInfo() const
AuraType GetAuraType() const
SpellEffIndex GetEffIndex() const
void HandleAuraTrackResources(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModDamagePercentDone(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModEffectImmunity(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModThreat(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModPowerCostPCT(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModRangedAttackPowerOfStatPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraEmpathy(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraCloneCaster(AuraApplication const *aurApp, uint8 mode, bool apply) const
void Update(uint32 diff, Unit *caster)
void HandleAuraFeatherFall(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePeriodicManaLeechAuraTick(Unit *target, Unit *caster) const
void HandleNULL(AuraApplication const *, uint8, bool) const
void HandleModCombatSpeedPct(AuraApplication const *aurApp, uint8 mode, bool apply) const
SpellModifier * m_spellmod
void HandleModFear(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModFaction(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModRangedAttackPowerPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void ApplySpellMod(Unit *target, bool apply)
SpellEffectInfo const & GetSpellEffectInfo() const
void HandleObsModPowerAuraTick(Unit *target, Unit *caster) const
void HandleAuraSetVehicle(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModIncreaseHealthPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModResistanceExclusive(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleDetectAmore(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePeriodicHealthFunnelAuraTick(Unit *target, Unit *caster) const
void HandleAuraPreventRegeneratePower(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModRangedAttackPower(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModPossessPet(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleForceReaction(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModDodgePercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePeriodicHealAurasTick(Unit *target, Unit *caster) const
void HandleAuraModDmgImmunity(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModPetTalentsPoints(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModDamageDone(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModAttackPowerPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleSpiritOfRedemption(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModTaunt(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModIncreaseMountedSpeed(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModIncreaseHealth(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleArenaPreparation(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModSchoolImmunity(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModMeleeSpeedPct(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleUnused(AuraApplication const *, uint8, bool) const
void HandlePeriodicEnergizeAuraTick(Unit *target, Unit *caster) const
void HandleModPowerRegen(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModInvisibilityDetect(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModResistenceOfStatPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePeriodicTriggerSpellAuraTick(Unit *target, Unit *caster) const
void HandleNoImmediateEffect(AuraApplication const *, uint8, bool) const
void HandleAuraModWeaponCritPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModTotalThreat(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModRating(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraIncreaseBaseHealthPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraMounted(AuraApplication const *aurApp, uint8 mode, bool apply) const
uint32 GetRemainingTicks() const
void HandleAuraModRangedHaste(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraControlVehicle(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModBaseResistance(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleShapeshiftBoosts(Unit *target, bool apply) const
int32 CalculateAmount(Unit *caster)
void HandlePreventResurrection(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModMechanicImmunityMask(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraAllowFlight(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModPowerCost(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModSkill(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModFakeInebriation(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleRaidProcFromChargeAuraProc(AuraApplication *aurApp, ProcEventInfo &eventInfo)
void HandlePeriodicHealthLeechAuraTick(Unit *target, Unit *caster) const
void HandleEffect(AuraApplication *aurApp, uint8 mode, bool apply)
bool IsAffectingSpell(SpellInfo const *spell) const
void HandleAuraGhost(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraAllowOnlyAbility(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModPercentStat(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleProcTriggerSpellWithValueAuraProc(AuraApplication *aurApp, ProcEventInfo &eventInfo)
void CalculatePeriodic(Unit *caster, bool resetPeriodicTimer=true, bool load=false)
void HandleAuraModStateImmunity(AuraApplication const *aurApp, uint8 mode, bool apply) const
int32 GetMiscValueB() const
void HandleAuraModExpertise(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraTransform(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModDisarm(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModOffhandDamagePercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePeriodicDamageAurasTick(Unit *target, Unit *caster) const
void HandleAuraTrackStealthed(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModUnattackable(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModMeleeRangedSpeedPct(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModSpellCritChanceShool(AuraApplication const *aurApp, uint8 mode, bool apply) const
void SendTickImmune(Unit *target, Unit *caster) const
void HandleNoReagentUseAura(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleComprehendLanguage(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleRangedAmmoHaste(AuraApplication const *aurApp, uint8 mode, bool apply) const
void SetAmount(int32 amount)
void HandleCharmConvert(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModIncreaseSwimSpeed(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModCastingSpeed(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModIncreaseMaxHealth(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModStealthLevel(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModTargetResistance(AuraApplication const *aurApp, uint8 mode, bool apply) const
int32 GetMiscValue() const
void GetTargetList(Container &targetContainer) const
void HandleModConfuse(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModTotalPercentStat(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModStealthDetect(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModSpellCritChance(AuraApplication const *aurApp, uint8 mode, bool apply) const
uint32 GetTotalTicks() const
void HandleAuraModScale(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModIncreaseSpeed(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraConvertRune(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleChannelDeathItem(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModIncreaseEnergy(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModRoot(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModStalked(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraDummy(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleFeignDeath(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModParryPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleProcTriggerDamageAuraProc(AuraApplication *aurApp, ProcEventInfo &eventInfo)
void HandleModSpellDamagePercentFromStat(AuraApplication const *aurApp, uint8 mode, bool apply) const
void CleanupTriggeredSpells(Unit *target)
void HandleShieldBlockValue(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModCharm(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleRaidProcFromChargeWithValueAuraProc(AuraApplication *aurApp, ProcEventInfo &eventInfo)
SpellInfo const *const m_spellInfo
void HandleAuraModAttackPower(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModSilence(AuraApplication const *aurApp, uint8 mode, bool apply) const
void ResetPeriodic(bool resetPeriodicTimer=false)
void HandleModManaRegen(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModBaseResistancePCT(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleShieldBlockValuePercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModSpellHealingPercentFromStat(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModSpellHitChance(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModSpellDamagePercentFromAttackPower(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModAttackPowerOfStatPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleProc(AuraApplication *aurApp, ProcEventInfo &eventInfo)
void HandleBreakableCCAuraProc(AuraApplication *aurApp, ProcEventInfo &eventInfo)
ObjectGuid GetCasterGUID() const
void HandleAuraModStat(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleForceMoveForward(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModSpellHealingPercentFromAttackPower(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModRegenInterrupt(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraUntrackable(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModResistance(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleWaterBreathing(AuraApplication const *aurApp, uint8 mode, bool apply) const
bool CheckEffectProc(AuraApplication *aurApp, ProcEventInfo &eventInfo) const
void HandleAuraModUseNormalSpeed(AuraApplication const *aurApp, uint8 mode, bool apply) const
float GetCritChanceFor(Unit const *caster, Unit const *target) const
void HandleModResistancePercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModPacifyAndSilence(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePhase(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModMechanicImmunity(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraOpenStable(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModStealth(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraHover(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleBindSight(AuraApplication const *aurApp, uint8 mode, bool apply) const
AuraEffect(Aura *base, SpellEffectInfo const &spellEfffectInfo, int32 const *baseAmount, Unit *caster)
void HandleAuraModIncreaseFlightSpeed(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModPowerRegenPCT(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModAttackSpeed(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModPacify(AuraApplication const *aurApp, uint8 mode, bool apply) const
void PeriodicTick(AuraApplication *aurApp, Unit *caster) const
void HandleAuraOverrideSpells(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraWaterWalk(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraTrackCreatures(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePeriodicTriggerSpellWithValueAuraTick(Unit *target, Unit *caster) const
void HandleAuraModCritPct(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraLinked(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModAttackPowerOfArmorAuraTick(Unit *target, Unit *caster) const
void HandleProcTriggerSpellAuraProc(AuraApplication *aurApp, ProcEventInfo &eventInfo)
void HandleAuraModIncreaseEnergyPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModDetaunt(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModInvisibility(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModPossess(AuraApplication const *aurApp, uint8 mode, bool apply) const
int32 GetMaxDuration() const
ApplicationMap const & GetApplicationMap()
void SetStackAmount(uint8 num)
void CallScriptEffectCalcSpellModHandlers(AuraEffect const *aurEff, SpellModifier *&spellMod)
Unit * GetUnitOwner() const
AuraApplication const * GetApplicationOfTarget(ObjectGuid guid) const
void SetUsingCharges(bool val)
bool CallScriptEffectRemoveHandlers(AuraEffect const *aurEff, AuraApplication const *aurApp, AuraEffectHandleModes mode)
void CallScriptEffectCalcAmountHandlers(AuraEffect const *aurEff, int32 &amount, bool &canBeRecalculated)
bool CallScriptEffectPeriodicHandlers(AuraEffect const *aurEff, AuraApplication const *aurApp)
ObjectGuid GetCasterGUID() const
int32 GetDuration() const
AuraEffect * GetEffect(uint8 effIndex) const
void CallScriptAfterEffectApplyHandlers(AuraEffect const *aurEff, AuraApplication const *aurApp, AuraEffectHandleModes mode)
void SetCharges(uint8 charges)
bool CallScriptEffectApplyHandlers(AuraEffect const *aurEff, AuraApplication const *aurApp, AuraEffectHandleModes mode)
void CallScriptAfterEffectRemoveHandlers(AuraEffect const *aurEff, AuraApplication const *aurApp, AuraEffectHandleModes mode)
bool CallScriptEffectProcHandlers(AuraEffect const *aurEff, AuraApplication const *aurApp, ProcEventInfo &eventInfo)
void CallScriptAfterEffectProcHandlers(AuraEffect const *aurEff, AuraApplication const *aurApp, ProcEventInfo &eventInfo)
void SetDuration(int32 duration, bool withMods=false)
uint8 GetStackAmount() const
SpellInfo const * GetSpellInfo() const
ObjectGuid GetCastItemGUID() const
void CallScriptEffectCalcPeriodicHandlers(AuraEffect const *aurEff, bool &isPeriodic, int32 &litude)
bool CallScriptCheckEffectProcHandlers(AuraEffect const *aurEff, AuraApplication const *aurApp, ProcEventInfo &eventInfo)
void CallScriptEffectUpdatePeriodicHandlers(AuraEffect *aurEff)
std::unordered_map< ObjectGuid, AuraApplication * > ApplicationMap
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
bool isTappedBy(Player const *player) const
uint8 GetCurrentEquipmentId() const
uint32 GetHitMask() const
bool HasFlag(FLAG_TYPE flag) const
void AddFlag(FLAG_TYPE flag)
void DelFlag(FLAG_TYPE flag)
void AddValue(FLAG_TYPE flag, T_VALUES value)
void SetValue(FLAG_TYPE flag, T_VALUES value)
uint32 GetEffectiveHeal() const
bool IsBattleground() const
bool Instanceable() const
float GetVisibilityRange() const
float GetFollowAngle() const override
void MoveFollow(Unit *target, float dist, ChaseAngle angle, MovementSlot slot=MOTION_SLOT_ACTIVE)
void MoveFall(uint32 id=0)
static ObjectGuid const Empty
std::string ToString() const
static uint32 ChooseDisplayId(CreatureTemplate const *cinfo, CreatureData const *data=nullptr)
void ApplyModSignedFloatValue(uint16 index, float val, bool apply)
virtual void RemoveDynamicFlag(uint32 flag)
static Creature * ToCreature(Object *o)
PackedGuid const & GetPackGUID() const
void SetUInt16Value(uint16 index, uint8 offset, uint16 value)
void ApplyModInt32Value(uint16 index, int32 val, bool apply)
void ApplyModByteFlag(uint16 index, uint8 offset, uint8 flag, bool apply)
void SetFlag(uint16 index, uint32 newFlag)
void RemoveFlag(uint16 index, uint32 oldFlag)
virtual void SetDynamicFlag(uint32 flag)
float GetFloatValue(uint16 index) const
void SetFloatValue(uint16 index, float value)
void RemoveByteFlag(uint16 index, uint8 offset, uint8 newFlag)
static ObjectGuid GetGUID(Object const *o)
void SetEntry(uint32 entry)
static Player * ToPlayer(Object *o)
void SetByteFlag(uint16 index, uint8 offset, uint8 newFlag)
void Remove(PetSaveMode mode, bool returnreagent=false)
void UpdateParryPercentage()
void SendEquipError(InventoryResult msg, Item const *item1=nullptr, Item const *item2=nullptr, uint32 itemId=0) const
void UpdateAllSpellCritChances()
void ApplyModFakeDrunkValue(int32 mod, bool apply)
void RemoveRunesByAuraEffect(AuraEffect const *aura)
void UpdateRuneRegen(RuneType rune)
void UpdateDodgePercentage()
Item * StoreNewItem(ItemPosCountVec const &pos, uint32 itemId, bool update, int32 randomPropertyId=0, GuidSet const &allowedLooters=GuidSet())
void LeaveBattleground(bool teleportToEntryPoint=true, bool withoutDeserterDebuff=false)
void UpdateWeaponDependentAuras(WeaponAttackType attackType)
void HandleBaseModFlatValue(BaseModGroup modGroup, float amount, bool apply)
void ApplyRatingMod(CombatRating cr, int32 value, bool apply)
void UpdatePowerRegen(Powers power)
void AddTemporarySpell(uint32 spellId)
void _ApplyWeaponDamage(uint8 slot, ItemTemplate const *proto, bool apply)
void UpdateBlockPercentage()
bool InBattleground() const
void SetNoRegentCostMask(flag96 mask)
void PetSpellInitialize()
void SetFallInformation(uint32 time, float z)
void setRegenTimerCount(uint32 time)
void RemoveTemporarySpell(uint32 spellId)
void ApplyItemDependentAuras(Item *item, bool apply)
WorldSession * GetSession() const
void UpdateSpellHitChances()
Item * GetItemByPos(uint16 pos) const
void UpdateExpertise(WeaponAttackType attType)
void SetViewpoint(WorldObject *target, bool apply)
PlayerSpellMap const & GetSpellMap() const
void InitDataForForm(bool reapplyMods=false)
uint32 GetRuneCooldown(uint8 index) const
void SetBaseModPctValue(BaseModGroup modGroup, float val)
Battleground * GetBattleground() const
void AddRuneByAuraEffect(uint8 index, RuneType newType, AuraEffect const *aura)
void UpdateAllWeaponDependentCritAuras()
void SendNewItem(Item *item, uint32 count, bool received, bool created, bool broadcast=false, bool sendChatMessage=true)
void SetChampioningFaction(uint32 faction)
void UpdateSpellDamageAndHealingBonus()
RuneType GetCurrentRune(uint8 index) const
void UpdateMirrorTimers()
void ModifySkillBonus(uint32 skillid, int32 val, bool talent)
void ApplySpellMod(uint32 spellId, SpellModOp op, T &basevalue, Spell *spell=nullptr) const
void SendOnCancelExpectedVehicleRideAura() const
void ApplyBaseModPctValue(BaseModGroup modGroup, float pct)
uint8 GetActiveTalentGroup() const
uint32 GetGlyph(uint8 group, uint8 slot) const
ReputationRank GetReputationRank(uint32 faction_id) const
void RemovePetAura(PetAura const *petSpell)
bool HasSpell(uint32 spell) const override
bool isHonorOrXPTarget(Unit const *victim) const
void UpdateInvisibilityDrunkDetect()
void UpdateDefenseBonusesMod()
void AddSpellMod(SpellModifier *mod, bool apply)
InventoryResult CanStoreNewItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 item, uint32 count, uint32 *no_space_count=nullptr) const
void UpdateAttackPowerAndDamage(bool ranged=false) override
ReputationMgr & GetReputationMgr()
static WeaponAttackType GetAttackBySlot(uint8 slot)
void UpdateSpellCritChance(uint32 school)
void AddPetAura(PetAura const *petSpell)
Unit * GetActionTarget() const
SpellInfo const * GetSpellInfo() const
DamageInfo * GetDamageInfo() const
void ApplyForceReaction(uint32 faction_id, ReputationRank rank, bool apply)
void SendForceReactions()
float CalcRadius(WorldObject *caster=nullptr, Spell *=nullptr) const
float CalcValueMultiplier(WorldObject *caster, Spell *spell=nullptr) const
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr) const
bool IsAffected(uint32 familyName, flag96 const &familyFlags) const
uint32 CalcCastTime(Spell *spell=nullptr) const
bool NeedsToBeTriggeredByCaster(SpellInfo const *triggeringSpell) const
bool IsAffectedBySpellMod(SpellModifier const *mod) const
SpellSchoolMask GetSchoolMask() const
void ApplyAllSpellImmunitiesTo(Unit *target, SpellEffectInfo const &spellEffectInfo, bool apply) const
bool HasAttribute(SpellAttr0 attribute) const
int32 GetDuration() const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
uint32 ManaCostPercentage
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > const & GetEffects() const
void EvaluateSuppressed(bool canExpire=false)
void ForwardThreatForAssistingMe(Unit *assistant, float baseAmount, SpellInfo const *spell=nullptr, bool ignoreModifiers=false)
== AFFECT OTHERS' THREAT LISTS ==
void UpdateMySpellSchoolModifiers()
auto const & GetThreatenedByMeList() const
void AddThreat(Unit *target, float amount, SpellInfo const *spell=nullptr, bool ignoreModifiers=false, bool ignoreRedirects=false)
== AFFECT MY THREAT LIST ==
void UpdateMyTempModifiers()
int32 ModifyHealth(int32 val)
static uint32 DealDamage(Unit *attacker, Unit *victim, uint32 damage, CleanDamage const *cleanDamage=nullptr, DamageEffectType damagetype=DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *spellProto=nullptr, bool durabilityLoss=true)
float GetPctModifierValue(UnitMods unitMod, UnitModifierPctType modifierType) const
void ClearUnitState(uint32 f)
uint32 SpellHealingBonusTaken(Unit *caster, SpellInfo const *spellProto, uint32 healamount, DamageEffectType damagetype) const
int32 ModifyPower(Powers power, int32 val, bool withPowerUpdate=true)
void RemoveOwnedAura(AuraMap::iterator &i, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void RemoveAurasByType(AuraType auraType, std::function< bool(AuraApplication const *)> const &check, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
AuraEffectList const & GetAuraEffectsByType(AuraType type) const
float GetHealthPct() const
float m_baseSpellCritChance
virtual void RecalculateObjectScale()
void HandleAttackPowerModifier(AttackPowerModIndex index, AttackPowerModType modifierType, float amount, bool apply)
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
static uint32 SpellCriticalHealingBonus(Unit const *caster, SpellInfo const *spellProto, uint32 damage, Unit *victim)
bool CanHaveThreatList() const
====================== THREAT & COMBAT ====================
void RemoveAurasByShapeShift()
void UpdateDamagePctDoneMods(WeaponAttackType attackType)
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
void UpdateObjectVisibility(bool forced=true) override
ThreatManager & GetThreatManager()
bool HasAuraTypeWithMiscvalue(AuraType auraType, int32 miscValue) const
void SetControlled(bool apply, UnitState state)
void SetVisFlag(UnitVisFlags flags)
bool CanUseAttackType(uint8 attacktype) const
void RemoveAurasWithInterruptFlags(uint32 flag, uint32 except=0)
uint32 GetClassMask() const
bool HasAuraTypeWithCaster(AuraType auraType, ObjectGuid caster) const
uint32 GetLastExtraAttackSpell() const
uint32 GetMountDisplayId() const
void UpdateAllDamageDoneMods()
void UpdateDisplayPower()
static void DealHeal(HealInfo &healInfo)
std::multimap< uint32, AuraApplication * > AuraApplicationMap
void UpdateSpeed(UnitMoveType mtype)
bool IsPolymorphed() const
ShapeshiftForm GetShapeshiftForm() const
void SetFaction(uint32 faction) override
uint32 SpellHealingBonusDone(Unit *victim, SpellInfo const *spellProto, uint32 healamount, DamageEffectType damagetype, SpellEffectInfo const &spellEffectInfo, Optional< float > const &donePctTotal, uint32 stack=1) const
virtual void UpdateAttackPowerAndDamage(bool ranged=false)=0
static void CalcHealAbsorb(HealInfo &healInfo)
void CalculateSpellDamageTaken(SpellNonMeleeDamage *damageInfo, int32 damage, SpellInfo const *spellInfo, WeaponAttackType attackType=BASE_ATTACK, bool crit=false, bool blocked=false, Spell *spell=nullptr)
void SetStatPctModifier(UnitMods unitMod, UnitModifierPctType modifierType, float val)
void ApplyStatPctModifier(UnitMods unitMod, UnitModifierPctType modifierType, float amount)
void SendSpellDamageImmune(Unit *target, uint32 spellId)
uint32 GetTransformSpell() const
void DealSpellDamage(SpellNonMeleeDamage const *damageInfo, bool durabilityLoss)
static void CalcAbsorbResist(DamageInfo &damageInfo, Spell *spell=nullptr)
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
virtual bool CanFly() const =0
MotionMaster * GetMotionMaster()
bool SetFeatherFall(bool enable)
Powers GetPowerType() const
static uint32 CalcArmorReducedDamage(Unit const *attacker, Unit *victim, uint32 damage, SpellInfo const *spellInfo, WeaponAttackType attackType=MAX_ATTACK, uint8 attackerLevel=0)
bool SetHover(bool enable, bool updateAnimTier=true)
uint32 GetMaxHealth() const
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
uint32 GetSpellCritDamageReduction(uint32 damage) const
bool IsFullHealth() const
void SetUnitFlag2(UnitFlags2 flags)
AuraEffect * IsScriptOverriden(SpellInfo const *spell, int32 script) const
void ApplyAttackTimePercentMod(WeaponAttackType att, float val, bool apply)
int32 HealBySpell(HealInfo &healInfo, bool critical=false)
void _ExitVehicle(Position const *exitPosition=nullptr)
float SpellCritChanceTaken(Unit const *caster, SpellInfo const *spellInfo, SpellSchoolMask schoolMask, float doneChance, WeaponAttackType attackType=BASE_ATTACK, bool isPeriodic=false) const
void SetHealth(uint32 val)
void SendSpellNonMeleeDamageLog(SpellNonMeleeDamage const *log)
bool IsStandState() const
bool IsGravityDisabled() const
CharmInfo * GetCharmInfo()
void RemoveVisFlag(UnitVisFlags flags)
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Unit * GetNextRandomRaidMemberOrPet(float radius)
void AddUnitState(uint32 f)
float GetTotalAuraMultiplier(AuraType auraType) const
void Mount(uint32 mount, uint32 vehicleId=0, uint32 creatureEntry=0)
uint32 SpellDamageBonusDone(Unit *victim, SpellInfo const *spellProto, uint32 pdamage, DamageEffectType damagetype, SpellEffectInfo const &spellEffectInfo, Optional< float > const &donePctTotal, uint32 stack=1) const
virtual void UpdateDamagePhysical(WeaponAttackType attType)
virtual Gender GetNativeGender() const
uint32 GetCreatureType() const
void SetInstantCast(bool set)
int32 GetHighestExclusiveSameEffectSpellGroupValue(AuraEffect const *aurEff, AuraType auraType, bool checkMiscValue=false, int32 miscValue=0) const
int32 GetMaxPositiveAuraModifierByMiscMask(AuraType auraType, uint32 misc_mask, AuraEffect const *except=nullptr) const
bool SetCanFly(bool enable, bool packetOnly=false)
float GetTotalAuraMultiplierByMiscValue(AuraType auraType, int32 misc_value) const
uint32 GetDisplayId() const
uint32 GetNativeDisplayId() const
virtual void UpdateArmor()=0
bool HasAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid caster=ObjectGuid::Empty) const
static void ProcSkillsAndAuras(Unit *actor, Unit *actionTarget, uint32 typeMaskActor, uint32 typeMaskActionTarget, uint32 spellTypeMask, uint32 spellPhaseMask, uint32 hitMask, Spell *spell, DamageInfo *damageInfo, HealInfo *healInfo)
uint32 GetMaxPower(Powers power) const
void InterruptSpell(CurrentSpellTypes spellType, bool withDelayed=true, bool withInstant=true, SpellCastResult result=SPELL_FAILED_INTERRUPTED, Optional< SpellCastResult > resultOther={})
void SetPower(Powers power, uint32 val, bool withPowerUpdate=true, bool force=false)
void RemoveUnitFlag2(UnitFlags2 flags)
bool HasAuraType(AuraType auraType) const
static void ApplyResilience(Unit const *victim, float *crit, int32 *damage, bool isCrit, CombatRating type)
void SetPhaseMask(uint32 newPhaseMask, bool update) override
void StopAttackFaction(uint32 faction_id)
void RemoveCharmedBy(Unit *charmer)
bool CreateVehicleKit(uint32 id, uint32 creatureEntry)
virtual void SetDisplayId(uint32 modelId)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void SetPowerType(Powers power, bool sendUpdate=true)
bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask) const
DeathState getDeathState() const
ObjectGuid GetChannelObjectGuid() const
float GetTotalAuraMultiplierByMiscMask(AuraType auraType, uint32 misc_mask) const
void AddComboPoints(Unit *target, int8 count)
void ApplyCastTimePercentMod(float val, bool apply)
int32 CalculateAOEAvoidance(int32 damage, uint32 schoolMask, ObjectGuid const &casterGuid) const
void UpdateResistanceBuffModsMod(SpellSchools school)
bool HasUnitState(const uint32 f) const
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply)
void FinishSpell(CurrentSpellTypes spellType, bool ok=true)
bool IsInFeralForm() const
static uint32 SpellCriticalDamageBonus(Unit const *caster, SpellInfo const *spellProto, uint32 damage, Unit *victim)
void _RegisterAuraEffect(AuraEffect *aurEff, bool apply)
void SendPeriodicAuraLog(SpellPeriodicAuraLogInfo *pInfo)
uint32 CountPctFromMaxHealth(int32 pct) const
void _EnterVehicle(Vehicle *vehicle, int8 seatId, AuraApplication const *aurApp=nullptr)
void SetStandState(UnitStandStateType state)
bool SetCharmedBy(Unit *charmer, CharmType type, AuraApplication const *aurApp=nullptr)
AuraEffect * GetDummyAuraEffect(SpellFamilyNames name, uint32 iconId, uint8 effIndex) const
bool SetWaterWalking(bool enable)
virtual void setDeathState(DeathState s)
static void Kill(Unit *attacker, Unit *victim, bool durabilityLoss=true)
uint32 GetPower(Powers power) const
void CombatStop(bool includingCast=false, bool mutualPvP=true)
static bool IsDamageReducedByArmor(SpellSchoolMask damageSchoolMask, SpellInfo const *spellInfo=nullptr)
void HandleStatFlatModifier(UnitMods unitMod, UnitModifierFlatType modifierType, float amount, bool apply)
void SetUnitFlag(UnitFlags flags)
bool HasAuraTypeWithAffectMask(AuraType auraType, SpellInfo const *affectedSpell) const
AuraApplicationMap & GetAppliedAuras()
std::list< AuraEffect * > AuraEffectList
void SetInFront(WorldObject const *target)
Vehicle * GetVehicleKit() const
float m_modSpellHitChance
Guardian * GetGuardianPet() const
void UpdateAllDamagePctDoneMods()
void SetTransformSpell(uint32 spellid)
void SetShapeshiftForm(ShapeshiftForm form)
static void DealDamageMods(Unit const *victim, uint32 &damage, uint32 *absorb)
void SetMountDisplayId(uint32 mountDisplayId)
uint32 GetModelForForm(ShapeshiftForm form, uint32 spellId) const
void RemoveUnitFlag(UnitFlags flags)
uint32 SpellDamageBonusTaken(Unit *caster, SpellInfo const *spellProto, uint32 pdamage, DamageEffectType damagetype) const
void UpdateStatBuffMod(Stats stat)
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
Vehicle * RemovePassenger(Unit *passenger)
Removes the passenger from the vehicle.
void RemovePendingEventsForPassenger(Unit *passenger)
virtual void SendMessageToSet(WorldPacket const *data, bool self) const
FlaggedValuesArray32< int32, uint32, InvisibilityType, TOTAL_INVISIBILITY_TYPES > m_invisibility
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
FlaggedValuesArray32< int32, uint32, InvisibilityType, TOTAL_INVISIBILITY_TYPES > m_invisibilityDetect
FlaggedValuesArray32< int32, uint32, StealthType, TOTAL_STEALTH_TYPES > m_stealthDetect
Player * GetSpellModOwner() const
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
FlaggedValuesArray32< int32, uint32, StealthType, TOTAL_STEALTH_TYPES > m_stealth
FlaggedValuesArray32< int32, uint32, ServerSideVisibilityType, TOTAL_SERVERSIDE_VISIBILITY_TYPES > m_serverSideVisibilityDetect
void PlayDirectSound(uint32 soundId, Player *target=nullptr)
SpellMissInfo SpellHitResult(Unit *victim, SpellInfo const *spellInfo, bool canReflect=false) const
void PlayDistanceSound(uint32 soundId, Player *target=nullptr)
FlaggedValuesArray32< int32, uint32, ServerSideVisibilityType, TOTAL_SERVERSIDE_VISIBILITY_TYPES > m_serverSideVisibility
int32 CalculateSpellDamage(SpellEffectInfo const &spellEffectInfo, int32 const *basePoints=nullptr) const
void ModSpellDurationTime(SpellInfo const *spellInfo, int32 &durationTime, Spell *spell=nullptr) const
void SendStablePet(ObjectGuid guid)
@ SMSG_PLAYER_VEHICLE_DATA
TC_GAME_API WorldObject * GetWorldObject(WorldObject const &, ObjectGuid const &)
static void VisitAllObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
bool HasCommandState(CommandStates state) const
float GetPositionZ() const
uint32 PresetSpellID[MAX_SHAPESHIFT_SPELLS]