diff --git a/Laptop/email.cpp b/Laptop/email.cpp index 44f5f2d56..25c709f02 100644 --- a/Laptop/email.cpp +++ b/Laptop/email.cpp @@ -31,8 +31,6 @@ #define EMAIL_EDT_FILE_JA2 "BINARYDATA\\Email.edt" #endif -#define EMAIL_EDT_CUSTOM_FILE "BINARYDATA\\Email_Custom.edt" - using namespace std; //static EmailPtr pEmailList; @@ -656,24 +654,6 @@ void RenderEmail( void ) // invalidate region to force update } -//-----------Custom email -void AddCustomEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition, INT16 iCurrentShipmentDestinationID, UINT8 EmailType ) -{ - CHAR16 pSubject[MAIL_STRING_SIZE]; - - LoadEncryptedDataFromFile(EMAIL_EDT_CUSTOM_FILE, pSubject, MAIL_STRING_SIZE*(iMessageOffset), MAIL_STRING_SIZE); - // add message to list - AddEmailMessage(iMessageOffset,iMessageLength, pSubject, iDate, ubSender, FALSE, 0, 0, 0, 0, 0, 0, iCurrentIMPPosition, iCurrentShipmentDestinationID, EmailType, TYPE_E_NONE ); - - // if we are in fact int he laptop, redraw icons, might be change in mail status - - if( fCurrentlyInLaptop ) - { - // redraw icons, might be new mail - DrawLapTopIcons(); - } -} - //-- void AddEmailWithSpecialData(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iFirstData, UINT32 uiSecondData, UINT8 EmailType, UINT32 EmailAIM, UINT16 EnumEmailXML) diff --git a/Laptop/email.h b/Laptop/email.h index 72177753f..92b70ef20 100644 --- a/Laptop/email.h +++ b/Laptop/email.h @@ -586,8 +586,6 @@ void ReDisplayBoxes( void ); void ShutDownEmailList(); void AddMessageToPages(INT32 iMessageId); -void AddCustomEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition, INT16 iCurrentShipmentDestinationID, UINT8 EmailType); - #ifdef JA2BETAVERSION void AddAllEmails(); #endif @@ -681,8 +679,6 @@ enum { TYPE_EMAIL_JOHN_KULBA, TYPE_EMAIL_AIM_SITE, TYPE_EMAIL_XML, - - TYPE_EMAIL_OTHER, }; enum { diff --git a/Strategic/LuaInitNPCs.cpp b/Strategic/LuaInitNPCs.cpp index c1bd96461..49b110f9a 100644 --- a/Strategic/LuaInitNPCs.cpp +++ b/Strategic/LuaInitNPCs.cpp @@ -112,8 +112,6 @@ static int l_CheckMission(lua_State* L); void FatigueCharacter(SOLDIERTYPE* pSoldier); -static int l_AddCustomEmail(lua_State* L); - static int l_SetDefaultArrivalSector(lua_State* L); static int l_GetDefaultArrivalSector(lua_State* L); static int l_SetMercArrivalLocation(lua_State* L); @@ -1642,8 +1640,6 @@ static void IniFunction(lua_State* L, BOOLEAN bQuests) lua_register(L, "ReStartingGame", l_ReStartingGame); - lua_register(L, "AddCustomEmail", l_AddCustomEmail); - lua_register(L, "SetDefaultArrivalSector", l_SetDefaultArrivalSector); lua_register(L, "GetDefaultArrivalSector", l_GetDefaultArrivalSector); lua_register(L, "SetDefaultArrivalGridNo", l_SetMercArrivalLocation); @@ -2002,20 +1998,6 @@ static int l_SetHandleGlobalLoyaltyEvent(lua_State* L) return 0; } -static int l_AddCustomEmail(lua_State* L) -{ - if (lua_gettop(L) >= 3) - { - INT32 iMessageOffset = lua_tointeger(L, 1); - INT32 iMessageLength = lua_tointeger(L, 2); - UINT8 ubSender = lua_tointeger(L, 3); - - AddCustomEmail(iMessageOffset, iMessageLength, ubSender, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_OTHER); - } - - return 0; -} - static int l_gMercProfileGearset(lua_State* L) { if (lua_gettop(L) >= 8)