mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Eluna: Add cod and money to sendmail, add missing spawn types for mangos and tc for SpawnCreature
This commit is contained in:
@@ -1230,11 +1230,25 @@ namespace LuaGlobalFunctions
|
||||
uint32 senderGUIDLow = Eluna::CHECKVAL<uint32>(L, ++i, 0);
|
||||
uint32 stationary = Eluna::CHECKVAL<uint32>(L, ++i, MAIL_STATIONERY_DEFAULT);
|
||||
uint32 delay = Eluna::CHECKVAL<uint32>(L, ++i, 0);
|
||||
uint32 money = Eluna::CHECKVAL<uint32>(L, ++i, 0);
|
||||
uint32 cod = Eluna::CHECKVAL<uint32>(L, ++i, 0);
|
||||
int argAmount = lua_gettop(L);
|
||||
|
||||
MailSender sender(MAIL_NORMAL, senderGUIDLow, (MailStationery)stationary);
|
||||
MailDraft draft(subject, text);
|
||||
|
||||
#ifdef TRINITY
|
||||
if (cod)
|
||||
draft.AddCOD(cod);
|
||||
if (money)
|
||||
draft.AddMoney(money);
|
||||
#else
|
||||
if (cod)
|
||||
draft.SetCOD(cod);
|
||||
if (money)
|
||||
draft.SetMoney(money);
|
||||
#endif
|
||||
|
||||
#ifdef TRINITY
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user