added definition for different cores

added definition for Azerothcore and Trinity.
Other cores do not return a value.
This commit is contained in:
55Honey
2021-03-11 20:48:47 +01:00
parent ce0c5bdc26
commit 9941dc1ba3

View File

@@ -2158,12 +2158,19 @@ namespace LuaGlobalFunctions
#endif #endif
draft.AddItem(item); draft.AddItem(item);
#if defined AZEROTHCORE
if (mailGUID <= 0) if (mailGUID <= 0)
{ {
mailGUID = item->GetGUIDLow(); mailGUID = item->GetGUIDLow();
Eluna::Push(L, mailGUID); Eluna::Push(L, mailGUID);
} }
#elif defined TRINITY
if (mailGUID <= 0)
{
mailGUID = item->GetGUID();
Eluna::Push(L, mailGUID);
}
#endif
++addedItems; ++addedItems;
} }
} }
@@ -2175,7 +2182,11 @@ namespace LuaGlobalFunctions
#else #else
draft.SendMailTo(MailReceiver(receiverPlayer, MAKE_NEW_GUID(receiverGUIDLow, 0, HIGHGUID_PLAYER)), sender); draft.SendMailTo(MailReceiver(receiverPlayer, MAKE_NEW_GUID(receiverGUIDLow, 0, HIGHGUID_PLAYER)), sender);
#endif #endif
#if defined TRINITY || AZEROTHCORE
return 1; return 1;
#else
return 0;
#endif
} }
/** /**