Core/Entities: Added GetStringId helper methods
Port From (https://github.com/TrinityCore/TrinityCore/commit/5cea37153eb6675bf0a25320a1c11cd0ec4969b6)
This commit is contained in:
@@ -1024,6 +1024,13 @@ namespace Framework.Constants
|
|||||||
BelongsToLayer = 0x100000,
|
BelongsToLayer = 0x100000,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum StringIdType
|
||||||
|
{
|
||||||
|
Template = 0,
|
||||||
|
Spawn = 1,
|
||||||
|
Script = 2
|
||||||
|
}
|
||||||
|
|
||||||
// values based at Holidays.dbc
|
// values based at Holidays.dbc
|
||||||
public enum HolidayIds
|
public enum HolidayIds
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2935,6 +2935,7 @@ namespace Game.Entities
|
|||||||
}
|
}
|
||||||
|
|
||||||
public string[] GetStringIds() { return m_stringIds; }
|
public string[] GetStringIds() { return m_stringIds; }
|
||||||
|
public string GetStringId(StringIdType type) { return m_stringIds[(int)type]; }
|
||||||
|
|
||||||
public VendorItemData GetVendorItems()
|
public VendorItemData GetVendorItems()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2685,6 +2685,7 @@ namespace Game.Entities
|
|||||||
}
|
}
|
||||||
|
|
||||||
public string[] GetStringIds() { return m_stringIds; }
|
public string[] GetStringIds() { return m_stringIds; }
|
||||||
|
public string GetStringId(StringIdType type) { return m_stringIds[(int)type]; }
|
||||||
|
|
||||||
public override string GetName(Locale locale = Locale.enUS)
|
public override string GetName(Locale locale = Locale.enUS)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user