mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-04 19:43:48 +00:00
refactor(Core): DespawnOrUnsummon (#23141)
This commit is contained in:
@@ -692,7 +692,7 @@ void Pet::Update(uint32 diff)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_duration > 0s)
|
||||
if (m_duration > 0ms)
|
||||
{
|
||||
if (m_duration > _diff)
|
||||
m_duration -= _diff;
|
||||
@@ -708,7 +708,7 @@ void Pet::Update(uint32 diff)
|
||||
if (getPowerType() == POWER_FOCUS)
|
||||
{
|
||||
m_petRegenTimer -= _diff;
|
||||
if (m_petRegenTimer <= 0s)
|
||||
if (m_petRegenTimer <= 0ms)
|
||||
{
|
||||
m_petRegenTimer += PET_FOCUS_REGEN_INTERVAL;
|
||||
Regenerate(POWER_FOCUS);
|
||||
@@ -1026,7 +1026,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
|
||||
Unit* owner = GetOwner();
|
||||
if (!owner) // just to be sure, asynchronous now
|
||||
{
|
||||
DespawnOrUnsummon(1000);
|
||||
DespawnOrUnsummon(1s);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
PetType getPetType() const { return m_petType; }
|
||||
void setPetType(PetType type) { m_petType = type; }
|
||||
bool isControlled() const { return getPetType() == SUMMON_PET || getPetType() == HUNTER_PET; }
|
||||
bool isTemporarySummoned() const { return m_duration > 0s; }
|
||||
bool isTemporarySummoned() const { return m_duration > 0ms; }
|
||||
|
||||
bool IsPermanentPetFor(Player* owner) const; // pet have tab in character windows and set UNIT_FIELD_PETNUMBER
|
||||
|
||||
|
||||
Reference in New Issue
Block a user