diff options
| author | Shauren <shauren.trinity@gmail.com> | 2024-03-02 15:06:33 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2024-03-02 15:06:33 +0100 |
| commit | f2ce5072d62e2835c4426220ebf8ade5fa67a79b (patch) | |
| tree | 3634fe43193476be3862112ea16f4696f93277bf /src/server/game/Entities/Creature | |
| parent | bd8cc0e5724a1b5c07f25e1547d2f3125b1fff8b (diff) | |
Core/Creatures: Implemented unsummoning and resummoning critter pets on flying mounts and teleports (and related static flags)
Diffstat (limited to 'src/server/game/Entities/Creature')
| -rw-r--r-- | src/server/game/Entities/Creature/Creature.h | 4 | ||||
| -rw-r--r-- | src/server/game/Entities/Creature/TemporarySummon.h | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index bb4f7973168..e291a14a273 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -515,6 +515,8 @@ class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public Ma Optional<uint32> m_lootId; uint16 m_LootMode; // Bitmask (default: LOOT_MODE_DEFAULT) that determines what loot will be lootable + CreatureStaticFlagsHolder _staticFlags; + bool IsInvisibleDueToDespawn(WorldObject const* seer) const override; bool CanAlwaysSee(WorldObject const* obj) const override; @@ -546,8 +548,6 @@ class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public Ma void ApplyAllStaticFlags(CreatureStaticFlagsHolder const& flags); - CreatureStaticFlagsHolder _staticFlags; - // Regenerate health bool _regenerateHealth; // Set on creation diff --git a/src/server/game/Entities/Creature/TemporarySummon.h b/src/server/game/Entities/Creature/TemporarySummon.h index 2144c58320b..a68d030b01f 100644 --- a/src/server/game/Entities/Creature/TemporarySummon.h +++ b/src/server/game/Entities/Creature/TemporarySummon.h @@ -69,6 +69,12 @@ class TC_GAME_API TempSummon : public Creature bool CanFollowOwner() const { return m_canFollowOwner; } void SetCanFollowOwner(bool can) { m_canFollowOwner = can; } + bool IsDismissedOnFlyingMount() const { return !HasFlag(CREATURE_STATIC_FLAG_5_DONT_DISMISS_ON_FLYING_MOUNT); } + void SetDontDismissOnFlyingMount(bool dontDismissOnFlyingMount) { _staticFlags.ApplyFlag(CREATURE_STATIC_FLAG_5_DONT_DISMISS_ON_FLYING_MOUNT, dontDismissOnFlyingMount); } + + bool IsAutoResummoned() const { return !HasFlag(CREATURE_STATIC_FLAG_6_DO_NOT_AUTO_RESUMMON); } + void SetDontAutoResummon(bool dontAutoResummon) { _staticFlags.ApplyFlag(CREATURE_STATIC_FLAG_6_DO_NOT_AUTO_RESUMMON, dontAutoResummon); } + SummonPropertiesEntry const* const m_Properties; std::string GetDebugInfo() const override; |
