mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-17 13:29:41 -04:00
Merge pull request #5690 from thomas33/master
Core/Misc: Remove hungarian notations
This commit is contained in:
@@ -487,7 +487,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature
|
||||
bool isCanTrainingOf(Player* player, bool msg) const;
|
||||
bool isCanInteractWithBattleMaster(Player* player, bool msg) const;
|
||||
bool isCanTrainingAndResetTalentsOf(Player* player) const;
|
||||
bool canCreatureAttack(Unit const* pVictim, bool force = true) const;
|
||||
bool canCreatureAttack(Unit const* victim, bool force = true) const;
|
||||
bool IsImmunedToSpell(SpellInfo const* spellInfo);
|
||||
// redefine Unit::IsImmunedToSpell
|
||||
bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const;
|
||||
@@ -604,8 +604,8 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature
|
||||
void RemoveLootMode(uint16 lootMode) { m_LootMode &= ~lootMode; }
|
||||
void ResetLootMode() { m_LootMode = LOOT_MODE_DEFAULT; }
|
||||
|
||||
SpellInfo const* reachWithSpellAttack(Unit* pVictim);
|
||||
SpellInfo const* reachWithSpellCure(Unit* pVictim);
|
||||
SpellInfo const* reachWithSpellAttack(Unit* victim);
|
||||
SpellInfo const* reachWithSpellCure(Unit* victim);
|
||||
|
||||
uint32 m_spells[CREATURE_MAX_SPELLS];
|
||||
CreatureSpellCooldowns m_CreatureSpellCooldowns;
|
||||
|
||||
@@ -4079,10 +4079,10 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
|
||||
// most likely will never be used, haven't heard of cases where players unlearn a mount
|
||||
if (Has310Flyer(false) && _spell_idx->second->skillId == SKILL_MOUNTS)
|
||||
{
|
||||
SpellInfo const* pSpellInfo = sSpellMgr->GetSpellInfo(spell_id);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id);
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
if (pSpellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED &&
|
||||
pSpellInfo->Effects[i].CalcValue() == 310)
|
||||
if (spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED &&
|
||||
spellInfo->Effects[i].CalcValue() == 310)
|
||||
Has310Flyer(true, spell_id); // with true as first argument its also used to set/remove the flag
|
||||
}
|
||||
}
|
||||
@@ -4161,7 +4161,7 @@ bool Player::Has310Flyer(bool checkAllSpells, uint32 excludeSpellId)
|
||||
else
|
||||
{
|
||||
SetHas310Flyer(false);
|
||||
SpellInfo const* pSpellInfo;
|
||||
SpellInfo const* spellInfo;
|
||||
for (PlayerSpellMap::iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr)
|
||||
{
|
||||
if (itr->first == excludeSpellId)
|
||||
@@ -4173,10 +4173,10 @@ bool Player::Has310Flyer(bool checkAllSpells, uint32 excludeSpellId)
|
||||
if (_spell_idx->second->skillId != SKILL_MOUNTS)
|
||||
break; // We can break because mount spells belong only to one skillline (at least 310 flyers do)
|
||||
|
||||
pSpellInfo = sSpellMgr->GetSpellInfo(itr->first);
|
||||
spellInfo = sSpellMgr->GetSpellInfo(itr->first);
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
if (pSpellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED &&
|
||||
pSpellInfo->Effects[i].CalcValue() == 310)
|
||||
if (spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED &&
|
||||
spellInfo->Effects[i].CalcValue() == 310)
|
||||
{
|
||||
SetHas310Flyer(true);
|
||||
return true;
|
||||
@@ -6916,15 +6916,15 @@ int32 Player::CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, in
|
||||
}
|
||||
|
||||
//Calculates how many reputation points player gains in victim's enemy factions
|
||||
void Player::RewardReputation(Unit* pVictim, float rate)
|
||||
void Player::RewardReputation(Unit* victim, float rate)
|
||||
{
|
||||
if (!pVictim || pVictim->GetTypeId() == TYPEID_PLAYER)
|
||||
if (!victim || victim->GetTypeId() == TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (pVictim->ToCreature()->IsReputationGainDisabled())
|
||||
if (victim->ToCreature()->IsReputationGainDisabled())
|
||||
return;
|
||||
|
||||
ReputationOnKillEntry const* Rep = sObjectMgr->GetReputationOnKilEntry(pVictim->ToCreature()->GetCreatureTemplate()->Entry);
|
||||
ReputationOnKillEntry const* Rep = sObjectMgr->GetReputationOnKilEntry(victim->ToCreature()->GetCreatureTemplate()->Entry);
|
||||
|
||||
if (!Rep)
|
||||
return;
|
||||
@@ -6966,7 +6966,7 @@ void Player::RewardReputation(Unit* pVictim, float rate)
|
||||
|
||||
if (Rep->RepFaction1 && (!Rep->TeamDependent || team == ALLIANCE))
|
||||
{
|
||||
int32 donerep1 = CalculateReputationGain(pVictim->getLevel(), Rep->RepValue1, ChampioningFaction ? ChampioningFaction : Rep->RepFaction1, false);
|
||||
int32 donerep1 = CalculateReputationGain(victim->getLevel(), Rep->RepValue1, ChampioningFaction ? ChampioningFaction : Rep->RepFaction1, false);
|
||||
donerep1 = int32(donerep1*(rate + favored_rep_mult));
|
||||
|
||||
if (recruitAFriend)
|
||||
@@ -6980,7 +6980,7 @@ void Player::RewardReputation(Unit* pVictim, float rate)
|
||||
|
||||
if (Rep->RepFaction2 && (!Rep->TeamDependent || team == HORDE))
|
||||
{
|
||||
int32 donerep2 = CalculateReputationGain(pVictim->getLevel(), Rep->RepValue2, ChampioningFaction ? ChampioningFaction : Rep->RepFaction2, false);
|
||||
int32 donerep2 = CalculateReputationGain(victim->getLevel(), Rep->RepValue2, ChampioningFaction ? ChampioningFaction : Rep->RepFaction2, false);
|
||||
donerep2 = int32(donerep2*(rate + favored_rep_mult));
|
||||
|
||||
if (recruitAFriend)
|
||||
@@ -7112,14 +7112,14 @@ bool Player::RewardHonor(Unit* uVictim, uint32 groupsize, int32 honor, bool pvpt
|
||||
|
||||
if (uVictim->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Player* pVictim = uVictim->ToPlayer();
|
||||
Player* victim = uVictim->ToPlayer();
|
||||
|
||||
if (GetTeam() == pVictim->GetTeam() && !sWorld->IsFFAPvPRealm())
|
||||
if (GetTeam() == victim->GetTeam() && !sWorld->IsFFAPvPRealm())
|
||||
return false;
|
||||
|
||||
uint8 k_level = getLevel();
|
||||
uint8 k_grey = Trinity::XP::GetGrayLevel(k_level);
|
||||
uint8 v_level = pVictim->getLevel();
|
||||
uint8 v_level = victim->getLevel();
|
||||
|
||||
if (v_level <= k_grey)
|
||||
return false;
|
||||
@@ -7130,7 +7130,7 @@ bool Player::RewardHonor(Unit* uVictim, uint32 groupsize, int32 honor, bool pvpt
|
||||
// [15..28] Horde honor titles and player name
|
||||
// [29..38] Other title and player name
|
||||
// [39+] Nothing
|
||||
uint32 victim_title = pVictim->GetUInt32Value(PLAYER_CHOSEN_TITLE);
|
||||
uint32 victim_title = victim->GetUInt32Value(PLAYER_CHOSEN_TITLE);
|
||||
// Get Killer titles, CharTitlesEntry::bit_index
|
||||
// Ranks:
|
||||
// title[1..14] -> rank[5..18]
|
||||
@@ -7152,10 +7152,10 @@ bool Player::RewardHonor(Unit* uVictim, uint32 groupsize, int32 honor, bool pvpt
|
||||
// and those in a lifetime
|
||||
ApplyModUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, 1, true);
|
||||
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL);
|
||||
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HK_CLASS, pVictim->getClass());
|
||||
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HK_RACE, pVictim->getRace());
|
||||
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HK_CLASS, victim->getClass());
|
||||
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HK_RACE, victim->getRace());
|
||||
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL_AT_AREA, GetAreaId());
|
||||
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL, 1, 0, pVictim);
|
||||
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL, 1, 0, victim);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -22649,20 +22649,20 @@ uint32 Player::GetResurrectionSpellId()
|
||||
}
|
||||
|
||||
// Used in triggers for check "Only to targets that grant experience or honor" req
|
||||
bool Player::isHonorOrXPTarget(Unit* pVictim)
|
||||
bool Player::isHonorOrXPTarget(Unit* victim)
|
||||
{
|
||||
uint8 v_level = pVictim->getLevel();
|
||||
uint8 v_level = victim->getLevel();
|
||||
uint8 k_grey = Trinity::XP::GetGrayLevel(getLevel());
|
||||
|
||||
// Victim level less gray level
|
||||
if (v_level <= k_grey)
|
||||
return false;
|
||||
|
||||
if (pVictim->GetTypeId() == TYPEID_UNIT)
|
||||
if (victim->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
if (pVictim->ToCreature()->isTotem() ||
|
||||
pVictim->ToCreature()->isPet() ||
|
||||
pVictim->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP_AT_KILL)
|
||||
if (victim->ToCreature()->isTotem() ||
|
||||
victim->ToCreature()->isPet() ||
|
||||
victim->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP_AT_KILL)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -22709,9 +22709,9 @@ bool Player::GetsRecruitAFriendBonus(bool forXP)
|
||||
return recruitAFriend;
|
||||
}
|
||||
|
||||
void Player::RewardPlayerAndGroupAtKill(Unit* pVictim, bool isBattleGround)
|
||||
void Player::RewardPlayerAndGroupAtKill(Unit* victim, bool isBattleGround)
|
||||
{
|
||||
KillRewarder(this, pVictim, isBattleGround).Reward();
|
||||
KillRewarder(this, victim, isBattleGround).Reward();
|
||||
}
|
||||
|
||||
void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewardSource)
|
||||
|
||||
@@ -17421,14 +17421,14 @@ void Unit::SetFacingTo(float ori)
|
||||
init.Launch();
|
||||
}
|
||||
|
||||
void Unit::SetFacingToObject(WorldObject* pObject)
|
||||
void Unit::SetFacingToObject(WorldObject* object)
|
||||
{
|
||||
// never face when already moving
|
||||
if (!IsStopped())
|
||||
return;
|
||||
|
||||
// TODO: figure out under what conditions creature will move towards object instead of facing it where it currently is.
|
||||
SetFacingTo(GetAngle(pObject));
|
||||
SetFacingTo(GetAngle(object));
|
||||
}
|
||||
|
||||
bool Unit::SetWalk(bool enable)
|
||||
|
||||
@@ -1305,7 +1305,7 @@ class Unit : public WorldObject
|
||||
void StopAttackFaction(uint32 faction_id);
|
||||
Unit* SelectNearbyTarget(Unit* exclude = NULL, float dist = NOMINAL_MELEE_RANGE) const;
|
||||
void SendMeleeAttackStop(Unit* victim = NULL);
|
||||
void SendMeleeAttackStart(Unit* pVictim);
|
||||
void SendMeleeAttackStart(Unit* victim);
|
||||
|
||||
void AddUnitState(uint32 f) { m_state |= f; }
|
||||
bool HasUnitState(const uint32 f) const { return (m_state & f); }
|
||||
@@ -1437,12 +1437,12 @@ class Unit : public WorldObject
|
||||
void Dismount();
|
||||
|
||||
uint16 GetMaxSkillValueForLevel(Unit const* target = NULL) const { return (target ? getLevelForTarget(target) : getLevel()) * 5; }
|
||||
void DealDamageMods(Unit* pVictim, uint32 &damage, uint32* absorb);
|
||||
uint32 DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDamage = NULL, DamageEffectType damagetype = DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellInfo const* spellProto = NULL, bool durabilityLoss = true);
|
||||
void Kill(Unit* pVictim, bool durabilityLoss = true);
|
||||
int32 DealHeal(Unit* pVictim, uint32 addhealth);
|
||||
void DealDamageMods(Unit* victim, uint32 &damage, uint32* absorb);
|
||||
uint32 DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDamage = NULL, DamageEffectType damagetype = DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellInfo const* spellProto = NULL, bool durabilityLoss = true);
|
||||
void Kill(Unit* victim, bool durabilityLoss = true);
|
||||
int32 DealHeal(Unit* victim, uint32 addhealth);
|
||||
|
||||
void ProcDamageAndSpell(Unit* pVictim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType = BASE_ATTACK, SpellInfo const* procSpell = NULL, SpellInfo const* procAura = NULL);
|
||||
void ProcDamageAndSpell(Unit* victim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType = BASE_ATTACK, SpellInfo const* procSpell = NULL, SpellInfo const* procAura = NULL);
|
||||
void ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellInfo const* procSpell, uint32 damage, SpellInfo const* procAura = NULL);
|
||||
|
||||
void GetProcAurasTriggeredOnEvent(std::list<AuraApplication*>& aurasTriggeringProc, std::list<AuraApplication*>* procAuras, ProcEventInfo eventInfo);
|
||||
@@ -1451,9 +1451,9 @@ class Unit : public WorldObject
|
||||
void TriggerAurasProcOnEvent(ProcEventInfo& eventInfo, std::list<AuraApplication*>& procAuras);
|
||||
|
||||
void HandleEmoteCommand(uint32 anim_id);
|
||||
void AttackerStateUpdate (Unit* pVictim, WeaponAttackType attType = BASE_ATTACK, bool extra = false);
|
||||
void AttackerStateUpdate (Unit* victim, WeaponAttackType attType = BASE_ATTACK, bool extra = false);
|
||||
|
||||
void CalculateMeleeDamage(Unit* pVictim, uint32 damage, CalcDamageInfo* damageInfo, WeaponAttackType attackType = BASE_ATTACK);
|
||||
void CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* damageInfo, WeaponAttackType attackType = BASE_ATTACK);
|
||||
void DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss);
|
||||
void HandleProcExtraAttackFor(Unit* victim);
|
||||
|
||||
@@ -1475,18 +1475,18 @@ class Unit : public WorldObject
|
||||
uint32 GetRangedDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_CRIT_TAKEN_RANGED, 2.0f, 100.0f, damage); }
|
||||
uint32 GetSpellDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_CRIT_TAKEN_SPELL, 2.0f, 100.0f, damage); }
|
||||
|
||||
void ApplyResilience(const Unit* pVictim, float * crit, int32 * damage, bool isCrit, CombatRating type) const;
|
||||
void ApplyResilience(const Unit* victim, float * crit, int32 * damage, bool isCrit, CombatRating type) const;
|
||||
|
||||
float MeleeSpellMissChance(const Unit* pVictim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const;
|
||||
SpellMissInfo MeleeSpellHitResult(Unit* pVictim, SpellInfo const* spell);
|
||||
SpellMissInfo MagicSpellHitResult(Unit* pVictim, SpellInfo const* spell);
|
||||
SpellMissInfo SpellHitResult(Unit* pVictim, SpellInfo const* spell, bool canReflect = false);
|
||||
float MeleeSpellMissChance(const Unit* victim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const;
|
||||
SpellMissInfo MeleeSpellHitResult(Unit* victim, SpellInfo const* spell);
|
||||
SpellMissInfo MagicSpellHitResult(Unit* victim, SpellInfo const* spell);
|
||||
SpellMissInfo SpellHitResult(Unit* victim, SpellInfo const* spell, bool canReflect = false);
|
||||
|
||||
float GetUnitDodgeChance() const;
|
||||
float GetUnitParryChance() const;
|
||||
float GetUnitBlockChance() const;
|
||||
float GetUnitMissChance(WeaponAttackType attType) const;
|
||||
float GetUnitCriticalChance(WeaponAttackType attackType, const Unit* pVictim) const;
|
||||
float GetUnitCriticalChance(WeaponAttackType attackType, const Unit* victim) const;
|
||||
int32 GetMechanicResistChance(const SpellInfo* spell);
|
||||
bool CanUseAttackType(uint8 attacktype) const
|
||||
{
|
||||
@@ -1520,8 +1520,8 @@ class Unit : public WorldObject
|
||||
float GetWeaponProcChance() const;
|
||||
float GetPPMProcChance(uint32 WeaponSpeed, float PPM, const SpellInfo* spellProto) const;
|
||||
|
||||
MeleeHitOutcome RollMeleeOutcomeAgainst (const Unit* pVictim, WeaponAttackType attType) const;
|
||||
MeleeHitOutcome RollMeleeOutcomeAgainst (const Unit* pVictim, WeaponAttackType attType, int32 crit_chance, int32 miss_chance, int32 dodge_chance, int32 parry_chance, int32 block_chance) const;
|
||||
MeleeHitOutcome RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackType attType) const;
|
||||
MeleeHitOutcome RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackType attType, int32 crit_chance, int32 miss_chance, int32 dodge_chance, int32 parry_chance, int32 block_chance) const;
|
||||
|
||||
bool isVendor() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_VENDOR); }
|
||||
bool isTrainer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_TRAINER); }
|
||||
@@ -1581,11 +1581,11 @@ class Unit : public WorldObject
|
||||
virtual bool IsUnderWater() const;
|
||||
bool isInAccessiblePlaceFor(Creature const* c) const;
|
||||
|
||||
void SendHealSpellLog(Unit* pVictim, uint32 SpellID, uint32 Damage, uint32 OverHeal, uint32 Absorb, bool critical = false);
|
||||
int32 HealBySpell(Unit* pVictim, SpellInfo const* spellInfo, uint32 addHealth, bool critical = false);
|
||||
void SendEnergizeSpellLog(Unit* pVictim, uint32 SpellID, uint32 Damage, Powers powertype);
|
||||
void EnergizeBySpell(Unit* pVictim, uint32 SpellID, uint32 Damage, Powers powertype);
|
||||
uint32 SpellNonMeleeDamageLog(Unit* pVictim, uint32 spellID, uint32 damage);
|
||||
void SendHealSpellLog(Unit* victim, uint32 SpellID, uint32 Damage, uint32 OverHeal, uint32 Absorb, bool critical = false);
|
||||
int32 HealBySpell(Unit* victim, SpellInfo const* spellInfo, uint32 addHealth, bool critical = false);
|
||||
void SendEnergizeSpellLog(Unit* victim, uint32 SpellID, uint32 Damage, Powers powertype);
|
||||
void EnergizeBySpell(Unit* victim, uint32 SpellID, uint32 Damage, Powers powertype);
|
||||
uint32 SpellNonMeleeDamageLog(Unit* victim, uint32 spellID, uint32 damage);
|
||||
|
||||
void CastSpell(SpellCastTargets const& targets, SpellInfo const* spellInfo, CustomSpellValues const* value, TriggerCastFlags triggerFlags = TRIGGERED_NONE, Item* castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastSpell(Unit* victim, uint32 spellId, bool triggered, Item* castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
@@ -1642,7 +1642,7 @@ class Unit : public WorldObject
|
||||
|
||||
void SetInFront(Unit const* target);
|
||||
void SetFacingTo(float ori);
|
||||
void SetFacingToObject(WorldObject* pObject);
|
||||
void SetFacingToObject(WorldObject* object);
|
||||
|
||||
void SendChangeCurrentVictimOpcode(HostileReference* pHostileReference);
|
||||
void SendClearThreatListOpcode();
|
||||
@@ -1967,10 +1967,10 @@ class Unit : public WorldObject
|
||||
|
||||
// Threat related methods
|
||||
bool CanHaveThreatList() const;
|
||||
void AddThreat(Unit* pVictim, float fThreat, SpellSchoolMask schoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellInfo const* threatSpell = NULL);
|
||||
void AddThreat(Unit* victim, float fThreat, SpellSchoolMask schoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellInfo const* threatSpell = NULL);
|
||||
float ApplyTotalThreatModifier(float fThreat, SpellSchoolMask schoolMask = SPELL_SCHOOL_MASK_NORMAL);
|
||||
void DeleteThreatList();
|
||||
void TauntApply(Unit* pVictim);
|
||||
void TauntApply(Unit* victim);
|
||||
void TauntFadeOut(Unit* taunter);
|
||||
ThreatManager& getThreatManager() { return m_ThreatManager; }
|
||||
void addHatedBy(HostileReference* pHostileReference) { m_HostileRefManager.insertFirst(pHostileReference); };
|
||||
@@ -2023,22 +2023,22 @@ class Unit : public WorldObject
|
||||
Unit* GetMeleeHitRedirectTarget(Unit* victim, SpellInfo const* spellInfo = NULL);
|
||||
int32 SpellBaseDamageBonus(SpellSchoolMask schoolMask);
|
||||
int32 SpellBaseHealingBonus(SpellSchoolMask schoolMask);
|
||||
int32 SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit* pVictim);
|
||||
int32 SpellBaseHealingBonusForVictim(SpellSchoolMask schoolMask, Unit* pVictim);
|
||||
uint32 SpellDamageBonus(Unit* pVictim, SpellInfo const* spellProto, uint32 damage, DamageEffectType damagetype, uint32 stack = 1);
|
||||
uint32 SpellHealingBonus(Unit* pVictim, SpellInfo const* spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack = 1);
|
||||
bool isSpellBlocked(Unit* pVictim, SpellInfo const* spellProto, WeaponAttackType attackType = BASE_ATTACK);
|
||||
int32 SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit* victim);
|
||||
int32 SpellBaseHealingBonusForVictim(SpellSchoolMask schoolMask, Unit* victim);
|
||||
uint32 SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32 damage, DamageEffectType damagetype, uint32 stack = 1);
|
||||
uint32 SpellHealingBonus(Unit* victim, SpellInfo const* spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack = 1);
|
||||
bool isSpellBlocked(Unit* victim, SpellInfo const* spellProto, WeaponAttackType attackType = BASE_ATTACK);
|
||||
bool isBlockCritical();
|
||||
bool isSpellCrit(Unit* pVictim, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType = BASE_ATTACK) const;
|
||||
uint32 SpellCriticalDamageBonus(SpellInfo const* spellProto, uint32 damage, Unit* pVictim);
|
||||
uint32 SpellCriticalHealingBonus(SpellInfo const* spellProto, uint32 damage, Unit* pVictim);
|
||||
bool isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType = BASE_ATTACK) const;
|
||||
uint32 SpellCriticalDamageBonus(SpellInfo const* spellProto, uint32 damage, Unit* victim);
|
||||
uint32 SpellCriticalHealingBonus(SpellInfo const* spellProto, uint32 damage, Unit* victim);
|
||||
|
||||
void SetLastManaUse(uint32 spellCastTime) { m_lastManaUse = spellCastTime; }
|
||||
bool IsUnderLastManaUseEffect() const;
|
||||
|
||||
void SetContestedPvP(Player* attackedPlayer = NULL);
|
||||
|
||||
void MeleeDamageBonus(Unit* pVictim, uint32 *damage, WeaponAttackType attType, SpellInfo const* spellProto = NULL);
|
||||
void MeleeDamageBonus(Unit* victim, uint32 *damage, WeaponAttackType attType, SpellInfo const* spellProto = NULL);
|
||||
uint32 GetCastingTimeForBonus(SpellInfo const* spellProto, DamageEffectType damagetype, uint32 CastingTime);
|
||||
|
||||
uint32 GetRemainingPeriodicAmount(uint64 caster, uint32 spellId, AuraType auraType, uint8 effectIndex = 0) const;
|
||||
@@ -2052,9 +2052,9 @@ class Unit : public WorldObject
|
||||
virtual bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const;
|
||||
// redefined in Creature
|
||||
static bool IsDamageReducedByArmor(SpellSchoolMask damageSchoolMask, SpellInfo const* spellInfo = NULL, uint8 effIndex = MAX_SPELL_EFFECTS);
|
||||
uint32 CalcArmorReducedDamage(Unit* pVictim, const uint32 damage, SpellInfo const* spellInfo, WeaponAttackType attackType=MAX_ATTACK);
|
||||
void CalcAbsorbResist(Unit* pVictim, SpellSchoolMask schoolMask, DamageEffectType damagetype, const uint32 damage, uint32 *absorb, uint32 *resist, SpellInfo const* spellInfo = NULL);
|
||||
void CalcHealAbsorb(Unit* pVictim, const SpellInfo* spellProto, uint32 &healAmount, uint32 &absorb);
|
||||
uint32 CalcArmorReducedDamage(Unit* victim, const uint32 damage, SpellInfo const* spellInfo, WeaponAttackType attackType=MAX_ATTACK);
|
||||
void CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffectType damagetype, const uint32 damage, uint32 *absorb, uint32 *resist, SpellInfo const* spellInfo = NULL);
|
||||
void CalcHealAbsorb(Unit* victim, const SpellInfo* spellProto, uint32 &healAmount, uint32 &absorb);
|
||||
|
||||
void UpdateSpeed(UnitMoveType mtype, bool forced);
|
||||
float GetSpeed(UnitMoveType mtype) const;
|
||||
@@ -2313,15 +2313,15 @@ class Unit : public WorldObject
|
||||
|
||||
void DisableSpline();
|
||||
private:
|
||||
bool IsTriggeredAtSpellProcEvent(Unit* pVictim, Aura* aura, SpellInfo const* procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const* & spellProcEvent);
|
||||
bool HandleDummyAuraProc(Unit* pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleHasteAuraProc(Unit* pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleSpellCritChanceAuraProc(Unit* pVictim, uint32 damage, AuraEffect* triggredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleObsModEnergyAuraProc(Unit* pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleModDamagePctTakenAuraProc(Unit* pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleAuraProc(Unit* pVictim, uint32 damage, Aura* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, bool * handled);
|
||||
bool HandleProcTriggerSpell(Unit* pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleOverrideClassScriptAuraProc(Unit* pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 cooldown);
|
||||
bool IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, SpellInfo const* procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const* & spellProcEvent);
|
||||
bool HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleHasteAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleSpellCritChanceAuraProc(Unit* victim, uint32 damage, AuraEffect* triggredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleObsModEnergyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleModDamagePctTakenAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, bool * handled);
|
||||
bool HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||
bool HandleOverrideClassScriptAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 cooldown);
|
||||
bool HandleAuraRaidProcFromChargeWithValue(AuraEffect* triggeredByAura);
|
||||
bool HandleAuraRaidProcFromCharge(AuraEffect* triggeredByAura);
|
||||
|
||||
|
||||
@@ -1188,7 +1188,7 @@ namespace Trinity
|
||||
class AllGameObjectsWithEntryInRange
|
||||
{
|
||||
public:
|
||||
AllGameObjectsWithEntryInRange(const WorldObject* pObject, uint32 uiEntry, float fMaxRange) : m_pObject(pObject), m_uiEntry(uiEntry), m_fRange(fMaxRange) {}
|
||||
AllGameObjectsWithEntryInRange(const WorldObject* object, uint32 entry, float maxRange) : m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) {}
|
||||
bool operator() (GameObject* go)
|
||||
{
|
||||
if (go->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(go, m_fRange, false))
|
||||
@@ -1205,7 +1205,7 @@ namespace Trinity
|
||||
class AllCreaturesOfEntryInRange
|
||||
{
|
||||
public:
|
||||
AllCreaturesOfEntryInRange(const WorldObject* pObject, uint32 uiEntry, float fMaxRange) : m_pObject(pObject), m_uiEntry(uiEntry), m_fRange(fMaxRange) {}
|
||||
AllCreaturesOfEntryInRange(const WorldObject* object, uint32 entry, float maxRange) : m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) {}
|
||||
bool operator() (Unit* unit)
|
||||
{
|
||||
if (unit->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(unit, m_fRange, false))
|
||||
@@ -1257,7 +1257,7 @@ namespace Trinity
|
||||
class AllWorldObjectsInRange
|
||||
{
|
||||
public:
|
||||
AllWorldObjectsInRange(const WorldObject* pObject, float fMaxRange) : m_pObject(pObject), m_fRange(fMaxRange) {}
|
||||
AllWorldObjectsInRange(const WorldObject* object, float maxRange) : m_pObject(object), m_fRange(maxRange) {}
|
||||
bool operator() (WorldObject* go)
|
||||
{
|
||||
return m_pObject->IsWithinDist(go, m_fRange, false);
|
||||
|
||||
Reference in New Issue
Block a user