diff --git a/GlobalMethods.h b/GlobalMethods.h index 4dbf972..839d24e 100644 --- a/GlobalMethods.h +++ b/GlobalMethods.h @@ -2093,6 +2093,7 @@ namespace LuaGlobalFunctions * @param uint32 cod = 0 : cod money amount * @param uint32 entry = 0 : entry of an [Item] to send with mail * @param uint32 amount = 0 : amount of the [Item] to send with mail + * @return uint32 itemGUIDlow : low GUID of the item. Up to 12 values returned, returns nil if no further items are sent */ int SendMail(lua_State* L) { @@ -2156,6 +2157,11 @@ namespace LuaGlobalFunctions item->SaveToDB(); #endif draft.AddItem(item); +#if defined TRINITY + Eluna::Push(L, item->GetGUID().GetCounter()); +#else + Eluna::Push(L, item->GetGUIDLow()); +#endif ++addedItems; } } @@ -2167,7 +2173,7 @@ namespace LuaGlobalFunctions #else draft.SendMailTo(MailReceiver(receiverPlayer, MAKE_NEW_GUID(receiverGUIDLow, 0, HIGHGUID_PLAYER)), sender); #endif - return 0; + return addedItems; } /**