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