mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 15:46:24 +00:00
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:
@@ -877,6 +877,7 @@ enum PlayerLoginQueryIndex
|
||||
PLAYER_LOGIN_QUERY_LOAD_BREW_OF_THE_MONTH = 34,
|
||||
PLAYER_LOGIN_QUERY_LOAD_CORPSE_LOCATION = 35,
|
||||
PLAYER_LOGIN_QUERY_LOAD_CHARACTER_SETTINGS = 36,
|
||||
PLAYER_LOGIN_QUERY_LOAD_PET_SLOTS = 37,
|
||||
MAX_PLAYER_LOGIN_QUERY
|
||||
};
|
||||
|
||||
@@ -1162,9 +1163,12 @@ public:
|
||||
void RemoveRestFlag(RestFlag restFlag);
|
||||
[[nodiscard]] uint32 GetInnTriggerId() const { return _innTriggerId; }
|
||||
|
||||
PetStable* GetPetStable() { return m_petStable.get(); }
|
||||
PetStable& GetOrInitPetStable();
|
||||
PetStable const* GetPetStable() const { return m_petStable.get(); }
|
||||
|
||||
[[nodiscard]] Pet* GetPet() const;
|
||||
bool IsPetDismissed();
|
||||
void SummonPet(uint32 entry, float x, float y, float z, float ang, PetType petType, uint32 despwtime, uint32 createdBySpell, ObjectGuid casterGUID, uint8 asynchLoadType, int32 healthPct = 0);
|
||||
Pet* SummonPet(uint32 entry, float x, float y, float z, float ang, PetType petType, Milliseconds duration = 0s);
|
||||
void RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent = false);
|
||||
[[nodiscard]] uint32 GetPhaseMaskForSpawn() const; // used for proper set phase for DB at GM-mode creature/GO spawn
|
||||
|
||||
@@ -1345,8 +1349,6 @@ public:
|
||||
|
||||
bool AddItem(uint32 itemId, uint32 count);
|
||||
|
||||
uint32 m_stableSlots;
|
||||
|
||||
/*********************************************************/
|
||||
/*** GOSSIP SYSTEM ***/
|
||||
/*********************************************************/
|
||||
@@ -2684,6 +2686,7 @@ public:
|
||||
void _LoadInstanceTimeRestrictions(PreparedQueryResult result);
|
||||
void _LoadBrewOfTheMonth(PreparedQueryResult result);
|
||||
void _LoadCharacterSettings(PreparedQueryResult result);
|
||||
void _LoadPetStable(uint8 petStableSlots, PreparedQueryResult result);
|
||||
|
||||
/*********************************************************/
|
||||
/*** SAVE SYSTEM ***/
|
||||
@@ -2923,6 +2926,8 @@ private:
|
||||
bool m_bMustDelayTeleport;
|
||||
bool m_bHasDelayedTeleport;
|
||||
|
||||
std::unique_ptr<PetStable> m_petStable;
|
||||
|
||||
// Temporary removed pet cache
|
||||
uint32 m_temporaryUnsummonedPetNumber;
|
||||
uint32 m_oldpetspell;
|
||||
|
||||
Reference in New Issue
Block a user