From 9941dc1ba355814683d789717751c3f1c568ab17 Mon Sep 17 00:00:00 2001 From: 55Honey <71938210+55Honey@users.noreply.github.com> Date: Thu, 11 Mar 2021 20:48:47 +0100 Subject: [PATCH] added definition for different cores added definition for Azerothcore and Trinity. Other cores do not return a value. --- GlobalMethods.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/GlobalMethods.h b/GlobalMethods.h index 6c6c5f9..0c1beff 100644 --- a/GlobalMethods.h +++ b/GlobalMethods.h @@ -2158,12 +2158,19 @@ namespace LuaGlobalFunctions #endif draft.AddItem(item); +#if defined AZEROTHCORE if (mailGUID <= 0) { mailGUID = item->GetGUIDLow(); Eluna::Push(L, mailGUID); } - +#elif defined TRINITY + if (mailGUID <= 0) + { + mailGUID = item->GetGUID(); + Eluna::Push(L, mailGUID); + } +#endif ++addedItems; } } @@ -2175,7 +2182,11 @@ namespace LuaGlobalFunctions #else draft.SendMailTo(MailReceiver(receiverPlayer, MAKE_NEW_GUID(receiverGUIDLow, 0, HIGHGUID_PLAYER)), sender); #endif +#if defined TRINITY || AZEROTHCORE return 1; +#else + return 0; +#endif } /**