feat(ItemMethods): add support chatcommands for AzerothCore (#6)

This commit is contained in:
Kargatum
2021-10-22 22:37:35 +07:00
committed by GitHub
parent bbd8f12e57
commit 79d271e8b8

View File

@@ -274,7 +274,7 @@ namespace LuaItem
#if defined(CATA) || defined (MISTS)
char* suffix = NULL;
#else
#ifdef TRINITY
#if TRINITY || AZEROTHCORE
std::array<char const*, 16> const* suffix = NULL;
#else
char* const* suffix = NULL;
@@ -284,7 +284,7 @@ namespace LuaItem
{
const ItemRandomSuffixEntry* itemRandEntry = sItemRandomSuffixStore.LookupEntry(-item->GetItemRandomPropertyId());
if (itemRandEntry)
#ifdef TRINITY
#if TRINITY || AZEROTHCORE
suffix = &itemRandEntry->Name;
#else
suffix = itemRandEntry->nameSuffix;
@@ -294,7 +294,7 @@ namespace LuaItem
{
const ItemRandomPropertiesEntry* itemRandEntry = sItemRandomPropertiesStore.LookupEntry(item->GetItemRandomPropertyId());
if (itemRandEntry)
#ifdef TRINITY
#if TRINITY || AZEROTHCORE
suffix = &itemRandEntry->Name;
#else
suffix = itemRandEntry->nameSuffix;
@@ -303,7 +303,7 @@ namespace LuaItem
if (suffix)
{
name += ' ';
#if defined TRINITY
#if TRINITY || AZEROTHCORE
name += (*suffix)[(name != temp->Name1) ? locale : uint8(DEFAULT_LOCALE)];
#else
name += suffix[(name != temp->Name1) ? locale : uint8(DEFAULT_LOCALE)];