From 79d271e8b87848860baf114d00219e51914d1e75 Mon Sep 17 00:00:00 2001 From: Kargatum Date: Fri, 22 Oct 2021 22:37:35 +0700 Subject: [PATCH] feat(ItemMethods): add support chatcommands for AzerothCore (#6) --- ItemMethods.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ItemMethods.h b/ItemMethods.h index 35a595c..ca45c63 100644 --- a/ItemMethods.h +++ b/ItemMethods.h @@ -274,7 +274,7 @@ namespace LuaItem #if defined(CATA) || defined (MISTS) char* suffix = NULL; #else -#ifdef TRINITY +#if TRINITY || AZEROTHCORE std::array 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)];