Core/Misc: Finish cleanup of incorrectly merged Raise Ally fix (Branch 3.3.5 only)
This commit is contained in:
1 parent
c5d909693b
commit
6fe7da9cd7
7 files changed
+8
-16
No files matched your search
@@ -75,7 +75,6 @@ class Minion : public TempSummon
|
||||
bool IsPetGhoul() const { return GetEntry() == 26125; } // Ghoul may be guardian or pet
|
||||
bool IsSpiritWolf() const { return GetEntry() == 29264; } // Spirit wolf from feral spirits
|
||||
bool IsGuardianPet() const;
|
||||
bool IsRisenAlly() const { return GetEntry() == 30230; }
|
||||
protected:
|
||||
Unit* const m_owner;
|
||||
float m_followAngle;
|
||||
|
||||
@@ -1238,9 +1238,6 @@ void Player::Update(uint32 p_time)
|
||||
if (charmer->GetTypeId() == TYPEID_UNIT && charmer->IsAlive())
|
||||
UpdateCharmedAI();
|
||||
|
||||
if (GetAI() && IsAIEnabled)
|
||||
GetAI()->UpdateAI(p_time);
|
||||
|
||||
// Update items that have just a limited lifetime
|
||||
if (now > m_Last_tick)
|
||||
UpdateItemDuration(uint32(now - m_Last_tick));
|
||||
|
||||
@@ -2653,7 +2653,6 @@ class Player : public Unit, public GridObject<Player>
|
||||
void SendTimeSync();
|
||||
|
||||
ResurrectionData* _resurrectionData;
|
||||
|
||||
WorldSession* m_session;
|
||||
|
||||
typedef std::list<Channel*> JoinedChannelsList;
|
||||
|
||||
@@ -370,7 +370,7 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
|
||||
if (getClass() == CLASS_SHAMAN || getClass() == CLASS_PALADIN) // mental quickness
|
||||
UpdateSpellDamageAndHealingBonus();
|
||||
|
||||
if (pet && (pet->IsPetGhoul() || pet->IsRisenAlly())) // At melee attack power change for DK pet
|
||||
if (pet && pet->IsPetGhoul()) // At melee attack power change for DK pet
|
||||
pet->UpdateAttackPowerAndDamage();
|
||||
|
||||
if (guardian && guardian->IsSpiritWolf()) // At melee attack power change for Shaman feral spirit
|
||||
@@ -989,7 +989,7 @@ bool Guardian::UpdateStats(Stats stat)
|
||||
Unit* owner = GetOwner();
|
||||
// Handle Death Knight Glyphs and Talents
|
||||
float mod = 0.75f;
|
||||
if ((IsPetGhoul() || IsRisenAlly()) && (stat == STAT_STAMINA || stat == STAT_STRENGTH))
|
||||
if (IsPetGhoul() && (stat == STAT_STAMINA || stat == STAT_STRENGTH))
|
||||
{
|
||||
if (stat == STAT_STAMINA)
|
||||
mod = 0.3f; // Default Owner's Stamina scale
|
||||
@@ -1172,7 +1172,7 @@ void Guardian::UpdateAttackPowerAndDamage(bool ranged)
|
||||
bonusAP = owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.22f * mod;
|
||||
SetBonusDamage(int32(owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.1287f * mod));
|
||||
}
|
||||
else if (IsPetGhoul() || IsRisenAlly()) //ghouls benefit from deathknight's attack power (may be summon pet or not)
|
||||
else if (IsPetGhoul()) //ghouls benefit from deathknight's attack power (may be summon pet or not)
|
||||
{
|
||||
bonusAP = owner->GetTotalAttackPowerValue(BASE_ATTACK) * 0.22f;
|
||||
SetBonusDamage(int32(owner->GetTotalAttackPowerValue(BASE_ATTACK) * 0.1287f));
|
||||
|
||||
@@ -7977,7 +7977,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
|
||||
minion->SetSpeed(UnitMoveType(i), m_speed_rate[i], true);
|
||||
|
||||
// Ghoul pets have energy instead of mana (is anywhere better place for this code?)
|
||||
if (minion->IsPetGhoul() || minion->IsRisenAlly())
|
||||
if (minion->IsPetGhoul())
|
||||
minion->setPowerType(POWER_ENERGY);
|
||||
|
||||
// Send infinity cooldown - client does that automatically but after relog cooldown needs to be set again
|
||||
@@ -12011,9 +12011,6 @@ void Unit::RemoveFromWorld()
|
||||
|
||||
RemoveAreaAurasDueToLeaveWorld();
|
||||
|
||||
if (IsCharmed())
|
||||
RemoveCharmedBy(nullptr);
|
||||
|
||||
if (GetCharmerGUID())
|
||||
{
|
||||
TC_LOG_FATAL("entities.unit", "Unit %u has charmer guid when removed from world", GetEntry());
|
||||
|
||||
@@ -1615,7 +1615,6 @@ class Unit : public WorldObject
|
||||
bool IsAlive() const { return (m_deathState == ALIVE); }
|
||||
bool isDying() const { return (m_deathState == JUST_DIED); }
|
||||
bool isDead() const { return (m_deathState == DEAD || m_deathState == CORPSE); }
|
||||
bool IsGhouled() const { return HasAura(46619 /*SPELL_DK_RAISE_ALLY*/); }
|
||||
DeathState getDeathState() const { return m_deathState; }
|
||||
virtual void setDeathState(DeathState s); // overwrited in Creature/Player/Pet
|
||||
|
||||
|
||||
@@ -4281,8 +4281,9 @@ void Spell::SendResurrectRequest(Player* target)
|
||||
{
|
||||
// get resurrector name for creature resurrections, otherwise packet will be not accepted
|
||||
// for player resurrections the name is looked up by guid
|
||||
std::string const sentName(m_caster->GetTypeId() == TYPEID_PLAYER ?
|
||||
"" : m_caster->GetNameForLocaleIdx(target->GetSession()->GetSessionDbLocaleIndex()));
|
||||
std::string const sentName(m_caster->GetTypeId() == TYPEID_PLAYER
|
||||
? ""
|
||||
: m_caster->GetNameForLocaleIdx(target->GetSession()->GetSessionDbLocaleIndex()));
|
||||
|
||||
WorldPacket data(SMSG_RESURRECT_REQUEST, (8+4+sentName.size()+1+1+1+4));
|
||||
data << uint64(m_caster->GetGUID());
|
||||
@@ -5615,7 +5616,7 @@ SpellCastResult Spell::CheckPetCast(Unit* target)
|
||||
|
||||
// dead owner (pets still alive when owners ressed?)
|
||||
if (Unit* owner = m_caster->GetCharmerOrOwner())
|
||||
if (!owner->IsAlive() && !owner->IsGhouled())
|
||||
if (!owner->IsAlive())
|
||||
return SPELL_FAILED_CASTER_DEAD;
|
||||
|
||||
if (!target && m_targets.GetUnitTarget())
|
||||
|
||||
Reference in new issue
Block a user