mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Merge branch 'bfa'
This commit is contained in:
@@ -891,7 +891,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
|
||||
SetPowerType(POWER_ENERGY);
|
||||
else if (IsPetImp() || IsPetFelhunter() || IsPetVoidwalker() || IsPetSuccubus() || IsPetDoomguard() || IsPetFelguard()) // Warlock pets have energy (since 5.x)
|
||||
SetPowerType(POWER_ENERGY);
|
||||
else
|
||||
else
|
||||
SetPowerType(POWER_MANA);
|
||||
|
||||
// Damage
|
||||
@@ -901,8 +901,8 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
|
||||
case SUMMON_PET:
|
||||
{
|
||||
// the damage bonus used for pets is either fire or shadow damage, whatever is higher
|
||||
int32 fire = GetOwner()->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE);
|
||||
int32 shadow = GetOwner()->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW);
|
||||
int32 fire = GetOwner()->GetUInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE);
|
||||
int32 shadow = GetOwner()->GetUInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW);
|
||||
int32 val = (fire > shadow) ? fire : shadow;
|
||||
if (val < 0)
|
||||
val = 0;
|
||||
@@ -1780,9 +1780,9 @@ Player* Pet::GetOwner() const
|
||||
return Minion::GetOwner()->ToPlayer();
|
||||
}
|
||||
|
||||
void Pet::SetDisplayId(uint32 modelId)
|
||||
void Pet::SetDisplayId(uint32 modelId, float displayScale /*= 1.f*/)
|
||||
{
|
||||
Guardian::SetDisplayId(modelId);
|
||||
Guardian::SetDisplayId(modelId, displayScale);
|
||||
|
||||
if (!isControlled())
|
||||
return;
|
||||
|
||||
@@ -52,7 +52,7 @@ class TC_GAME_API Pet : public Guardian
|
||||
void AddToWorld() override;
|
||||
void RemoveFromWorld() override;
|
||||
|
||||
void SetDisplayId(uint32 modelId) override;
|
||||
void SetDisplayId(uint32 modelId, float displayScale = 1.f) override;
|
||||
|
||||
PetType getPetType() const { return m_petType; }
|
||||
void setPetType(PetType type) { m_petType = type; }
|
||||
|
||||
Reference in New Issue
Block a user