mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 13:22:48 +01:00
*Cleanup, proper indentation, and remove some wrong/irrelevant comments copied from custom patches..
--HG-- branch : trunk
This commit is contained in:
@@ -923,7 +923,7 @@ bool Guardian::UpdateStats(Stats stat)
|
||||
|
||||
Unit *owner = GetOwner();
|
||||
// Handle Death Knight Glyphs and Talents
|
||||
float mod = 0.75f;
|
||||
float mod = 0.75f;
|
||||
if (IsPetGhoul() && (stat == STAT_STAMINA || stat == STAT_STRENGTH))
|
||||
{
|
||||
switch (stat)
|
||||
@@ -948,26 +948,26 @@ bool Guardian::UpdateStats(Stats stat)
|
||||
else if (stat == STAT_STAMINA)
|
||||
{
|
||||
if (owner->getClass() == CLASS_WARLOCK && isPet())
|
||||
value += float(owner->GetStat(STAT_STAMINA)) * 0.75f;
|
||||
value += float(owner->GetStat(STAT_STAMINA)) * 0.75f;
|
||||
else
|
||||
{
|
||||
mod = 0.3f;
|
||||
if (((Creature*)this)->isPet())
|
||||
{
|
||||
PetSpellMap::const_iterator itr = (((Pet*)this)->m_spells.find(62758)); //Wild Hunt rank1
|
||||
if (itr == ((Pet*)this)->m_spells.end())
|
||||
{
|
||||
itr = ((Pet*)this)->m_spells.find(62762); //Wild Hunt rank2
|
||||
}
|
||||
if (itr != ((Pet*)this)->m_spells.end()) // If pet has Wild Hunt
|
||||
{
|
||||
|
||||
SpellEntry const* sProto = sSpellStore.LookupEntry(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||
mod += mod * (sProto->EffectBasePoints[0] / 100.0f);
|
||||
}
|
||||
}
|
||||
{
|
||||
mod = 0.3f;
|
||||
if (((Creature*)this)->isPet())
|
||||
{
|
||||
PetSpellMap::const_iterator itr = (((Pet*)this)->m_spells.find(62758)); // Wild Hunt rank 1
|
||||
if (itr == ((Pet*)this)->m_spells.end())
|
||||
{
|
||||
itr = ((Pet*)this)->m_spells.find(62762); // Wild Hunt rank 2
|
||||
}
|
||||
if (itr != ((Pet*)this)->m_spells.end()) // If pet has Wild Hunt
|
||||
{
|
||||
|
||||
SpellEntry const* sProto = sSpellStore.LookupEntry(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||
mod += mod * (sProto->EffectBasePoints[0] / 100.0f);
|
||||
}
|
||||
}
|
||||
value += float(owner->GetStat(stat)) * mod;
|
||||
}
|
||||
}
|
||||
}
|
||||
//warlock's and mage's pets gain 30% of owner's intellect
|
||||
else if (stat == STAT_INTELLECT)
|
||||
@@ -1117,21 +1117,21 @@ void Guardian::UpdateAttackPowerAndDamage(bool ranged)
|
||||
{
|
||||
if(isHunterPet()) //hunter pets benefit from owner's attack power
|
||||
{
|
||||
float mod = 1.0f; //Hunter contribution modifier
|
||||
float mod = 1.0f; //Hunter contribution modifier
|
||||
if (((Creature*)this)->isPet())
|
||||
{
|
||||
PetSpellMap::const_iterator itr = ((Pet*)this)->m_spells.find(62758); //Wild Hunt rank1
|
||||
if (itr == ((Pet*)this)->m_spells.end())
|
||||
{
|
||||
itr = ((Pet*)this)->m_spells.find(62762); //Wild Hunt rank2
|
||||
}
|
||||
if (itr != ((Pet*)this)->m_spells.end()) // If pet has Wild Hunt
|
||||
{
|
||||
|
||||
SpellEntry const* sProto = sSpellStore.LookupEntry(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||
{
|
||||
PetSpellMap::const_iterator itr = ((Pet*)this)->m_spells.find(62758); //Wild Hunt rank 1
|
||||
if (itr == ((Pet*)this)->m_spells.end())
|
||||
{
|
||||
itr = ((Pet*)this)->m_spells.find(62762); //Wild Hunt rank 2
|
||||
}
|
||||
if (itr != ((Pet*)this)->m_spells.end()) // If pet has Wild Hunt
|
||||
{
|
||||
|
||||
SpellEntry const* sProto = sSpellStore.LookupEntry(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||
mod += (sProto->EffectBasePoints[1] / 100.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
bonusAP = owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.22f * mod;
|
||||
SetBonusDamage( int32(owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.1287f * mod));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user