Eluna change definition checks from mangos to tc
This commit is contained in:
@@ -88,7 +88,7 @@ namespace LuaGlobalFunctions
|
||||
{
|
||||
if (Player* player = it->second->GetPlayer())
|
||||
{
|
||||
#ifdef MANGOS
|
||||
#ifndef TRINITY
|
||||
if (player->GetSession() && ((team >= TEAM_NEUTRAL || player->GetTeamId() == team) && (!onlyGM || player->isGameMaster())))
|
||||
#else
|
||||
if (player->GetSession() && ((team >= TEAM_NEUTRAL || player->GetTeamId() == team) && (!onlyGM || player->IsGameMaster())))
|
||||
@@ -123,7 +123,7 @@ namespace LuaGlobalFunctions
|
||||
Map::PlayerList const& players = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
#ifdef MANGOS
|
||||
#ifndef TRINITY
|
||||
Player* player = itr->getSource();
|
||||
#else
|
||||
Player* player = itr->GetSource();
|
||||
@@ -437,7 +437,7 @@ namespace LuaGlobalFunctions
|
||||
const char* query = Eluna::CHECKVAL<const char*>(L, 1);
|
||||
|
||||
QueryResult* result = NULL;
|
||||
#ifdef MANGOS
|
||||
#ifndef TRINITY
|
||||
result = WorldDatabase.Query(query);
|
||||
#else
|
||||
QueryResult res = WorldDatabase.Query(query);
|
||||
@@ -463,7 +463,7 @@ namespace LuaGlobalFunctions
|
||||
const char* query = Eluna::CHECKVAL<const char*>(L, 1);
|
||||
|
||||
QueryResult* result = NULL;
|
||||
#ifdef MANGOS
|
||||
#ifndef TRINITY
|
||||
result = CharacterDatabase.Query(query);
|
||||
#else
|
||||
QueryResult res = CharacterDatabase.Query(query);
|
||||
@@ -489,7 +489,7 @@ namespace LuaGlobalFunctions
|
||||
const char* query = Eluna::CHECKVAL<const char*>(L, 1);
|
||||
|
||||
QueryResult* result = NULL;
|
||||
#ifdef MANGOS
|
||||
#ifndef TRINITY
|
||||
result = LoginDatabase.Query(query);
|
||||
#else
|
||||
QueryResult res = LoginDatabase.Query(query);
|
||||
@@ -570,7 +570,7 @@ namespace LuaGlobalFunctions
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MANGOS
|
||||
#ifndef TRINITY
|
||||
Map* map = eMapMgr->FindMap(mapID, instanceID);
|
||||
if (!map)
|
||||
{
|
||||
@@ -883,7 +883,7 @@ namespace LuaGlobalFunctions
|
||||
uint32 incrtime = Eluna::CHECKVAL<uint32>(L, 4);
|
||||
uint32 extendedcost = Eluna::CHECKVAL<uint32>(L, 5);
|
||||
|
||||
#ifdef MANGOS
|
||||
#ifndef TRINITY
|
||||
if (!eObjectMgr->IsVendorItemValid(false, "npc_vendor", entry, item, maxcount, incrtime, extendedcost, 0))
|
||||
return 0;
|
||||
#ifndef CLASSIC
|
||||
@@ -1013,7 +1013,7 @@ namespace LuaGlobalFunctions
|
||||
MailSender sender(MAIL_NORMAL, senderGUIDLow, (MailStationery)stationary);
|
||||
MailDraft draft(subject, text);
|
||||
|
||||
#ifndef MANGOS
|
||||
#ifdef TRINITY
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
#endif
|
||||
uint8 addedItems = 0;
|
||||
@@ -1022,7 +1022,7 @@ namespace LuaGlobalFunctions
|
||||
uint32 entry = luaL_checkunsigned(L, ++i);
|
||||
uint32 amount = luaL_checkunsigned(L, ++i);
|
||||
|
||||
#ifdef MANGOS
|
||||
#ifndef TRINITY
|
||||
ItemTemplate const* item_proto = ObjectMgr::GetItemPrototype(entry);
|
||||
#else
|
||||
ItemTemplate const* item_proto = eObjectMgr->GetItemTemplate(entry);
|
||||
@@ -1039,7 +1039,7 @@ namespace LuaGlobalFunctions
|
||||
}
|
||||
if (Item* item = Item::CreateItem(entry, amount))
|
||||
{
|
||||
#ifdef MANGOS
|
||||
#ifndef TRINITY
|
||||
item->SaveToDB();
|
||||
#else
|
||||
item->SaveToDB(trans);
|
||||
@@ -1050,7 +1050,7 @@ namespace LuaGlobalFunctions
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MANGOS
|
||||
#ifndef TRINITY
|
||||
draft.SendMailTo(MailReceiver(MAKE_NEW_GUID(receiverGUIDLow, 0, HIGHGUID_PLAYER)), sender);
|
||||
#else
|
||||
draft.SendMailTo(trans, MailReceiver(receiverGUIDLow), sender, MAIL_CHECK_MASK_NONE, delay);
|
||||
@@ -1243,7 +1243,7 @@ namespace LuaGlobalFunctions
|
||||
int FindWeather(lua_State* L)
|
||||
{
|
||||
uint32 zoneId = Eluna::CHECKVAL<uint32>(L, 1);
|
||||
#ifdef MANGOS
|
||||
#ifndef TRINITY
|
||||
Weather* weather = eWorld->FindWeather(zoneId);
|
||||
#else
|
||||
Weather* weather = WeatherMgr::FindWeather(zoneId);
|
||||
@@ -1255,7 +1255,7 @@ namespace LuaGlobalFunctions
|
||||
int AddWeather(lua_State* L)
|
||||
{
|
||||
uint32 zoneId = Eluna::CHECKVAL<uint32>(L, 1);
|
||||
#ifdef MANGOS
|
||||
#ifndef TRINITY
|
||||
Weather* weather = eWorld->AddWeather(zoneId);
|
||||
#else
|
||||
Weather* weather = WeatherMgr::AddWeather(zoneId);
|
||||
@@ -1267,7 +1267,7 @@ namespace LuaGlobalFunctions
|
||||
int RemoveWeather(lua_State* L)
|
||||
{
|
||||
uint32 zoneId = Eluna::CHECKVAL<uint32>(L, 1);
|
||||
#ifdef MANGOS
|
||||
#ifndef TRINITY
|
||||
eWorld->RemoveWeather(zoneId);
|
||||
#else
|
||||
WeatherMgr::RemoveWeather(zoneId);
|
||||
@@ -1278,7 +1278,7 @@ namespace LuaGlobalFunctions
|
||||
int SendFineWeatherToPlayer(lua_State* L)
|
||||
{
|
||||
Player* player = Eluna::CHECKOBJ<Player>(L, 1);
|
||||
#ifdef MANGOS
|
||||
#ifndef TRINITY
|
||||
Weather::SendFineWeatherUpdateToPlayer(player);
|
||||
#else
|
||||
WeatherMgr::SendFineWeatherUpdateToPlayer(player);
|
||||
|
||||
Reference in New Issue
Block a user