feat(Core/Pets): Management refactoring (#9712)
* feat(Core/Pets): rework managment * 1 * 2 * 3 * 4 * 5 * cs pet * check before ressurect * pet DECLINED_NAMES * display - https://github.com/azerothcore/azerothcore-wotlk/issues/9297 * ArenaSpectator * 1
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
#include "WaypointMovementGenerator.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "Pet.h"
|
||||
|
||||
// TODO: this import is not necessary for compilation and marked as unused by the IDE
|
||||
// however, for some reasons removing it would cause a damn linking issue
|
||||
@@ -854,7 +855,7 @@ void Creature::Regenerate(Powers power)
|
||||
if (Powers((*i)->GetMiscValue()) == power)
|
||||
AddPct(addvalue, (*i)->GetAmount());
|
||||
|
||||
addvalue += GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_POWER_REGEN, power) * (power == POWER_FOCUS ? PET_FOCUS_REGEN_INTERVAL : CREATURE_REGEN_INTERVAL) / (5 * IN_MILLISECONDS);
|
||||
addvalue += GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_POWER_REGEN, power) * (power == POWER_FOCUS ? PET_FOCUS_REGEN_INTERVAL.count() : CREATURE_REGEN_INTERVAL) / (5 * IN_MILLISECONDS);
|
||||
|
||||
ModifyPower(power, int32(addvalue));
|
||||
}
|
||||
|
||||
@@ -33,12 +33,15 @@
|
||||
|
||||
#define MAX_KILL_CREDIT 2
|
||||
#define CREATURE_REGEN_INTERVAL 2 * IN_MILLISECONDS
|
||||
#define PET_FOCUS_REGEN_INTERVAL 4 * IN_MILLISECONDS
|
||||
|
||||
#define MAX_CREATURE_QUEST_ITEMS 6
|
||||
|
||||
#define MAX_EQUIPMENT_ITEMS 3
|
||||
|
||||
constexpr Milliseconds PET_FOCUS_REGEN_INTERVAL = 4s;
|
||||
|
||||
enum class VisibilityDistanceType : uint8;
|
||||
|
||||
// TODO: Implement missing flags from TC in places that custom flags from xinef&pussywizzard use flag values.
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum CreatureFlagsExtra : uint32
|
||||
|
||||
Reference in New Issue
Block a user