Core/Creatures: Allow overriding default gossip menu id
Port From (https://github.com/TrinityCore/TrinityCore/commit/09568736134372ec1a79b936a248eec30f071c8d)
This commit is contained in:
@@ -28,6 +28,7 @@ namespace Game.Entities
|
||||
|
||||
bool _isMissingCanSwimFlagOutOfCombat;
|
||||
|
||||
uint? _gossipMenuId;
|
||||
uint? _trainerId;
|
||||
|
||||
public ulong m_PlayerDamageReq;
|
||||
|
||||
@@ -1138,6 +1138,19 @@ namespace Game.Entities
|
||||
public bool HasFlag(CreatureStaticFlags7 flag) { return _staticFlags.HasFlag(flag); }
|
||||
public bool HasFlag(CreatureStaticFlags8 flag) { return _staticFlags.HasFlag(flag); }
|
||||
|
||||
public uint GetGossipMenuId()
|
||||
{
|
||||
if (_gossipMenuId.HasValue)
|
||||
return _gossipMenuId.Value;
|
||||
|
||||
return GetCreatureTemplate().GossipMenuId;
|
||||
}
|
||||
|
||||
public void SetGossipMenuId(uint? gossipMenuId)
|
||||
{
|
||||
_gossipMenuId = gossipMenuId;
|
||||
}
|
||||
|
||||
public uint GetTrainerId()
|
||||
{
|
||||
if (_trainerId.HasValue)
|
||||
|
||||
Reference in New Issue
Block a user