Eluna: Add cod and money to sendmail, add missing spawn types for mangos and tc for SpawnCreature

This commit is contained in:
Rochet2
2014-09-14 00:32:25 +03:00
parent 9add43bf2a
commit d9ff37d78d
4 changed files with 56 additions and 1 deletions

View File

@@ -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