You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Returns the health amount that will override the default max health calculation. Nullopt when no amount is provided.
54
56
Optional<uint64> GetMaxHealth() const;
55
-
// Returns the ID of the spell that has been used to summon the creature. Nullopt when the creature has not been summoned by a spell (scripted summons/ other APIs).
56
-
Optional<uint32> GetSummonSpellId() const;
57
57
// Returns the FactionTemplate ID of the summon that is overriding the default ID of the creature. Nullopt when the faction has not been overriden.
58
58
Optional<uint32> GetFactionId() const;
59
+
// Returns the level of the creature that will override the default level calculation. Nullopt when the creature uses its default values.
60
+
Optional<uint8> GetCreatureLevel() const;
59
61
60
62
// Returns true when the summon will despawn when the summoner logs out. This also includes despawning and teleporting between map instances.
61
63
boolDespawnsOnSummonerLogout() const;
@@ -69,17 +71,23 @@ class TC_GAME_API SummonInfo
69
71
boolDespawnsWhenExpired() const;
70
72
// Marks the summon to despawn after its duration has expired. If disabled, the summon will just die.
71
73
voidSetDespawnWhenExpired(bool set);
74
+
// Returns true when the summon will inherit its summoner's faction.
75
+
boolUsesSummonerFaction() const;
76
+
// Marks the summon to inherit its summoner's faction.
77
+
voidSetUseSummonerFaction(bool set);
78
+
// Returns true when the summon is either a Guardian, Pet, Vehicle or Possessed summon
79
+
boolIsControlledBySummoner() const;
72
80
73
81
private:
74
82
Creature* _summonedCreature;
75
-
Optional<ObjectGuid> _summonerGUID;
83
+
ObjectGuid _summonerGUID;
76
84
Optional<Milliseconds> _remainingDuration; // NYI
77
-
Optional<uint64> _maxHealth; //NYI
78
-
Optional<uint32> _summonSpellId; //NYI
79
-
Optional<uint32> _factionId; //NYI
80
-
bool _despawnOnSummonerLogout; // NYI
81
-
bool _despawnOnSummonerDeath; // NYI
82
-
bool _despawnWhenExpired; // NYI
85
+
Optional<uint64> _maxHealth; //Implemented in Creature::UpdateLevelDependantStats
86
+
Optional<uint32> _factionId; //Implemented in Creature::UpdateEntry
87
+
Optional<uint8> _creatureLevel; //Implemented in Creature::SelectLevel
Copy file name to clipboardExpand all lines: src/server/game/Entities/Creature/SummonInfo/SummonInfoArgs.h
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -21,16 +21,17 @@
21
21
#include"Define.h"
22
22
#include"Duration.h"
23
23
#include"Optional.h"
24
-
#include"ObjectGuid.h"
24
+
25
+
classWorldObject;
25
26
26
27
// Controls the behavior of a summoned creature and must be set with extreme care. If you want a blank summon that just exists as a permanent spawn, leave all fields untouched.
0 commit comments