TribesReplay/base/scripts/webemail.cs

1287 lines
38 KiB
C#
Raw Normal View History

2017-07-17 22:51:48 -04:00
//------------------------------------------
// Email code
//------------------------------------------
// email format is:
// id
// From
// read flag
// send date
// To
// CC
// Subject
// message body
//echo("Added email: " @ %tag SPC %text);
$EmailCachePath = "webcache/" @ getField(getRecord(wonGetAuthInfo(),0),3) @ "/";
$EmailColumnCount = 0;
$EmailColumnName[0] = "Status";
$EmailColumnRange[0] = "50 75";
$EmailColumnCount++;
$EmailColumnName[1] = "From";
$EmailColumnRange[1] = "50 300";
$EmailColumnCount++;
$EmailColumnName[2] = "Subject";
$EmailColumnRange[2] = "50 300";
$EmailColumnCount++;
$EmailColumnName[3] = "Received";
$EmailColumnRange[3] = "50 300";
$EmailColumnCount++;
//-----------------------------------------------------------------------------
if(!isObject(EmailMessageVector))
{
new MessageVector(EmailMessageVector);
$EmailNextSeq = 0;
}
//-----------------------------------------------------------------------------
function LaunchEmail()
{
LaunchTabView.viewTab( "EMAIL", EmailGui, 0 );
v22228 (04/06/01): * Fixed a problem that could have caused texture leaking in the interiors * Fixed an AI problem in Training 2 * Chinese "simplified" keyboard supported * Korean keyboard supported * A bug where infinite ammo could be gained by tossing the ammo was prevented. * Fixed a problem in Training 2 where a waypoint wouldn't update properly. * Thundersword and Havoc hold steady now when players try to jump in so they don't invert and detonate. * CD is now required in the drive for on-line play. * Scoring has been fixed so that it isn't blanked any longer if the admin changes the time limit during a game. * Active server queries will be cancelled now when you join a game (loads game faster now). * If standing in an inventory station when it is destroyed you no longer permanently lose weapons. * Fixed two issues that *could* cause crashes. * Fixed a problem where the bombardier could create a permanent targeting laser. * Cleaned up Chat text to remove programming characters. * Fixed "highlight text with my nick" option so it saves preference to file correctly. * Made MPB able to climb hills more easily and reduced damage from impact with the ground. * Added button to stop server queries in progress on "JOIN" screen. * Observers can now only chat with other observers (no one else can hear them). * Made deployable inv stations have smaller trigger so they don't "suck you in" from so far away. * Bots will now claim switches in CnH more accurately. * Added a "max distance" ring for sensors on the commander map so players can more accurately assess how well they placed the sensor in relation to how much area it is actually sensing. * Added a "ding" sound when you have filled up a text buffer so that you know why your text isn't showing up. * Fixed Chat HUD so that page up/page down works better. * Fixed a situation where Heavies could end up being permanently cloaked. * The MPBs on the "Alcatraz" map now deploy correctly (Siege map). * The "edited post" date stamp now works correctly. * If you jump into a vehicle while zoomed in, the zoom will reset correctly therafter now. * The Score Screen (F2) is now available while in a vehicle. * You can now vote to kick observers, if desired. * The ELF turret is fixed so it no longer fires at players when destroyed (an intermittent bug) * Some console spam associated with the Wildcat has been removed. * There was a situation where a player could die twice if he fell out of bounds. That has been resolved. * Screen resolution information should update properly now when restarting the application. * The camera should no longer be able to dip below terrain when in third person mode.
2017-07-17 23:05:21 -04:00
EmailGui.checkSchedule = schedule(1000,0, CheckEmail, false);
2017-07-17 22:51:48 -04:00
}
//-----------------------------------------------------------------------------
function EmailMessageNew()
{
$EmailToAddress = "";
$EmailCCAddress = "";
$EmailSubject = "";
EMailComposeDlg.state = "sendMail";
Canvas.pushDialog(EmailComposeDlg);
EmailBodyText.setValue("");
Email_ToEdit.makeFirstResponder(1);
}
//-----------------------------------------------------------------------------
function EmailMessageReply()
{
EMailComposeDlg.state = "replyMail";
%text = EmailMessageVector.getLineTextByTag( EM_Browser.getSelectedId() );
$EmailToAddress = getField(getRecord(%text, 1), 0);
$EmailCCAddress = "";
$EmailSubject = "RE: " @ getRecord(%text, 6);
%date = getRecord(%text, 3);
Canvas.pushDialog(EmailComposeDlg);
EmailBodyText.setValue("\n\n----------------------------------\n On " @ %date SPC $EmailToAddress @ " wrote:\n\n" @ EmailGetBody(%text) );
EmailBodyText.SetCursorPosition(0);
EmailBodyText.makeFirstResponder(1);
}
//-----------------------------------------------------------------------------
function EmailMessageForward()
{
%text = EmailMessageVector.getLineTextByTag( EM_Browser.getSelectedId() );
$EmailToAddress = "";
$EmailCCAddress = "";
$EmailSubject = "FW: " @ getRecord(%text, 6);
Canvas.pushDialog(EmailComposeDlg);
EmailBodyText.setValue("\n\n\n--- Begin Forwarded Message ---\n\n" @ EmailGetTextDisplay(%text));
Email_toEdit.makeFirstResponder(1);
EmailBodyText.SetCursorPosition(0);
EMailComposeDlg.state = "forwardMail";
}
//-----------------------------------------------------------------------------
function EmailMessageReplyAll()
{
EMailComposeDlg.state = "replyAll";
%text = EmailMessageVector.getLineTextByTag( EM_Browser.getSelectedId() );
$EmailToAddress = getField(getRecord(%text, 1), 0);
$EmailCCAddress = getRecord(%text, 4) @ getRecord(%text,5);
$EmailSubject = "RE: " @ getRecord(%text, 6);
%date = getRecord(%text, 3);
Canvas.pushDialog(EmailComposeDlg);
EmailBodyText.setValue("\n\n===========================\n On " @ %date SPC $EmailToAddress @ " wrote:\n\n" @ EmailGetBody(%text) );
EmailBodyText.makeFirstResponder(1);
EmailBodyText.SetCursorPosition(0);
}
//-----------------------------------------------------------------------------
function EmailMessageDelete()
{
%id = EM_Browser.getSelectedId();
if ( %id == -1 )
return;
%row = EM_Browser.findById( %id );
EMailComposeDlg.key = LaunchGui.key++;
// Make these buttons inactive until another message is selected:
if(rbInbox.getValue())
{
%nx = 6;
EMailComposeDlg.state = "deleteMail";
DoEmailDelete(%nx,%id,EMailComposeDlg, EMailComposeDlg.key, %row);
}
else
{
%nx = 35;
EMailComposeDlg.state = "removeMail";
MessageBoxYesNo("CONFIRM","Permanently Remove Selected EMail?","DoEmailDelete(" @ %nx @ "," @ %id @ "," @ EmailComposeDlg @ "," @ EmailComposeDlg.key @ "," @ %row @ ");");
}
}
//-----------------------------------------------------------------------------
function DoEmailDelete(%qnx, %mid, %owner, %key, %row)
{
EM_ReplyBtn.setActive( false );
EM_ReplyToAllBtn.setActive( false );
EM_ForwardBtn.setActive( false );
EM_DeleteBtn.setActive( false );
EM_BlockBtn.setActive( false );
EM_Browser.removeRowByIndex( %row );
2017-07-17 22:55:25 -04:00
EmailMessageVector.deleteLine(EmailMessageVector.getLineIndexByTag(%mid));
2017-07-17 22:51:48 -04:00
if(%qnx==6)
EmailGui.dumpCache();
if ( EM_Browser.rowCount() == 0 )
EMailInboxBodyText.setText("");
else
EM_Browser.setSelectedRow(%row);
DatabaseQuery(%qnx, %mid, %owner, %key);
}
//-----------------------------------------------------------------------------
function EmailSend()
{
EMailComposeDlg.key = LaunchGui.key++;
CheckEmailNames();
EMailComposeDlg.state = "sendMail";
%text = $EMailToAddress TAB $EMailCCAddress TAB $EmailSubject TAB EMailBodyText.getValue();
DatabaseQuery(5,getsubstr(%text,0,3600),EMailComposeDlg,EMailComposeDlg.key);
Canvas.popDialog(EmailComposeDlg);
}
//-----------------------------------------------------------------------------
function EmailMessageAddRow(%text, %tag)
{
EM_Browser.addRow( %tag, getField( getRecord( %text, 1 ) ,0 ),
getRecord( %text, 6 ),
getRecord( %text, 3 ),
getRecord( %text, 2 ));
}
//-----------------------------------------------------------------------------
function EmailGetBody(%text)
{
%msgText = "";
%rc = getRecordCount(%text);
for(%i = 7; %i < %rc; %i++)
%msgText = %msgText @ getRecord(%text, %i) @ "\n";
return %msgText;
}
//-----------------------------------------------------------------------------
function getNameList(%line)
{
if(%line $= "")
return "";
%ret = getField(getTextName(%line, 0), 0);
%count = getFieldCount(%line) / 4;
for(%i = 1; %i < %count; %i++)
%ret = %ret @ ", " @ getField(getTextName(%line, %i * 4), 0);
}
//-----------------------------------------------------------------------------
function getLinkNameOnly(%line)
{
if(%line $= "" || %line $= " ")
return "";
%name = getField(%line,0);
%str = "<color:FFFFFF>" @ %name;
%ret = "<a:player" TAB %name @ "><spush>" @ %str @ "<spop></a>";
return %ret;
}
//-----------------------------------------------------------------------------
function getLinkNameList(%line)
{
if(%line $= "")
return "";
%ret = getLinkName(%line, 0);
%count = getFieldCount(%line) / 4;
for(%i = 1; %i < %count; %i++)
%ret = %ret @ ", " @ getLinkName(%line, %i * 4);
}
//-----------------------------------------------------------------------------
function CheckEmailNames()
{
$EmailTOAddress = strUpr(trim($EmailTOAddress));
$EmailCCAddress = strUpr(trim($EmailCCAddress));
%toLength = strLen($EmailTOAddress);
%ccLength = strLen($EmailCCAddress);
%checkList = "";
if(%toLength > 0)
{
if(trim(getSubStr($EmailTOAddress,%toLength-1,1)) !$= "," || trim(getSubStr($EmailTOAddress,%toLength,1)) !$= ",")
$EmailTOAddress = $EmailTOAddress @ ",";
}
else
$EmailTOAddress = ",";
if(%ccLength > 0)
{
if(trim(getSubStr($EmailCCAddress,%ccLength-1,1)) !$= "," || trim(getSubStr($EmailCCAddress,%ccLength,1)) !$= ",")
$EmailCCAddress = $EmailCCAddress @ ",";
}
else
%ccList = ",";
for(%x=0;%x<2;%x++)
{
%pos = 0;
%start = 0;
if(%x == 0)
%nList = $EmailTOAddress;
else if(%x == 1)
{
$EmailTOAddress = %nList;
%nList = $EmailCCAddress;
}
if(strLen(%nList)>1)
{
while((%pos = strPos(%nList,",",%start)) != -1 && %cx++ < 40)
{
%name = getSubStr(%nList,%start,%pos-%start);
%nameLength = strLen(%name);
%name = trim(%name);
if((%checkStr = strStr(%checkList,%name)) != -1)
{
if(%checkStr == 0)
%checkVal = ",";
else
%checkVal = getSubStr(%checkList,strStr(%checkList,%name)-1,1);
if(%checkVal $= "," || %checkVal $= " ")
{
if(%pos-%nameLength == %start && %start == 0)
{
%nList = trim(getSubStr(%nList,%pos+1,strLen(%nList)));
}
else
{
%nList = trim(getSubStr(%nList,0,(%pos-%nameLength))) @
trim(getSubStr(%nList,%pos+1,strLen(%nList)));
%start = %pos-%nameLength;
}
}
else
{
if(strLen(%checkList)==0)
%checkList = %name;
else
%checkList = %checkList @ "," @ %name;
%start = %pos+1;
}
}
else
{
if(strLen(%checkList)==0)
%checkList = %name;
else
%checkList = %checkList @ "," @ %name;
%start = %pos+1;
}
}
}
}
$EmailCCAddress = %nList;
}
//-----------------------------------------------------------------------------
function EmailGetTextDisplay(%text)
{
%pos = 0;
%strStart = 0;
%curList = strupr(getRecord(%text,4));
%to = "";
if(strLen(%curList) > 1)
{
if(trim(getSubStr(%curList,strLen(%curList)-1,1)) !$= ",")
%curList = %curList @ ",";
}
else
%curList = ",";
2017-07-17 22:55:25 -04:00
while((%pos = strpos(%curList, ",", %strStart)) != -1)
2017-07-17 22:51:48 -04:00
{
if(%strStart==0)
%to = trim(getLinkNameOnly(getSubStr(%curList, %strStart, %pos-%strStart)));
else
%to = %to @ "," @ trim(getLinkNameOnly(getSubStr(%curList, %strStart, %pos-%strStart)));
%strStart = %pos+1;
}
%pos = 0;
%strStart = 0;
%curList = strupr(getRecord(%text,5));
%ccLine = "";
if(strLen(%curList) > 1)
{
if(trim(getSubStr(%curList,strLen(%curList)-1,1)) !$= ",")
%curList = %curList @ ",";
}
else
%curList = ",";
2017-07-17 22:55:25 -04:00
while((%pos = strpos(%curList, ",", %strStart)) != -1)
2017-07-17 22:51:48 -04:00
{
if(%strStart==0)
%ccLine = getLinkNameOnly(getSubStr(%curList, %strStart, %pos-%strStart));
else
%ccLine = %ccLine @ "," @ getLinkNameOnly(getSubStr(%curList, %strStart, %pos-%strStart));
%strStart = %pos+1;
}
%from = getLinkName(getRecord(%text, 1), 0);
%msgtext = "From: " @ %from NL
"To: " @ %to NL
"CC: " @ %ccLine NL
"Subject: " @ getRecord(%text, 6) NL
"Date Sent: " @ getRecord(%text, 3) @ "\n\n" @
EmailGetBody(%text);
}
//-----------------------------------------------------------------------------
function EmailNewMessageArrived(%message, %seq)
{
$EmailNextSeq = %seq;
EmailMessageVector.pushBackLine(%message, %seq);
EmailMessageAddRow(%message, %seq);
}
//-----------------------------------------------------------------------------
function GetEMailBtnClick()
{
v22228 (04/06/01): * Fixed a problem that could have caused texture leaking in the interiors * Fixed an AI problem in Training 2 * Chinese "simplified" keyboard supported * Korean keyboard supported * A bug where infinite ammo could be gained by tossing the ammo was prevented. * Fixed a problem in Training 2 where a waypoint wouldn't update properly. * Thundersword and Havoc hold steady now when players try to jump in so they don't invert and detonate. * CD is now required in the drive for on-line play. * Scoring has been fixed so that it isn't blanked any longer if the admin changes the time limit during a game. * Active server queries will be cancelled now when you join a game (loads game faster now). * If standing in an inventory station when it is destroyed you no longer permanently lose weapons. * Fixed two issues that *could* cause crashes. * Fixed a problem where the bombardier could create a permanent targeting laser. * Cleaned up Chat text to remove programming characters. * Fixed "highlight text with my nick" option so it saves preference to file correctly. * Made MPB able to climb hills more easily and reduced damage from impact with the ground. * Added button to stop server queries in progress on "JOIN" screen. * Observers can now only chat with other observers (no one else can hear them). * Made deployable inv stations have smaller trigger so they don't "suck you in" from so far away. * Bots will now claim switches in CnH more accurately. * Added a "max distance" ring for sensors on the commander map so players can more accurately assess how well they placed the sensor in relation to how much area it is actually sensing. * Added a "ding" sound when you have filled up a text buffer so that you know why your text isn't showing up. * Fixed Chat HUD so that page up/page down works better. * Fixed a situation where Heavies could end up being permanently cloaked. * The MPBs on the "Alcatraz" map now deploy correctly (Siege map). * The "edited post" date stamp now works correctly. * If you jump into a vehicle while zoomed in, the zoom will reset correctly therafter now. * The Score Screen (F2) is now available while in a vehicle. * You can now vote to kick observers, if desired. * The ELF turret is fixed so it no longer fires at players when destroyed (an intermittent bug) * Some console spam associated with the Wildcat has been removed. * There was a situation where a player could die twice if he fell out of bounds. That has been resolved. * Screen resolution information should update properly now when restarting the application. * The camera should no longer be able to dip below terrain when in third person mode.
2017-07-17 23:05:21 -04:00
if(isEventPending(EMailGUI.checkSchedule))
cancel(EmailGui.checkSchedule);
2017-07-17 22:51:48 -04:00
EMailGui.btnClicked = true;
EMailGui.checkingEMail = false;
v22228 (04/06/01): * Fixed a problem that could have caused texture leaking in the interiors * Fixed an AI problem in Training 2 * Chinese "simplified" keyboard supported * Korean keyboard supported * A bug where infinite ammo could be gained by tossing the ammo was prevented. * Fixed a problem in Training 2 where a waypoint wouldn't update properly. * Thundersword and Havoc hold steady now when players try to jump in so they don't invert and detonate. * CD is now required in the drive for on-line play. * Scoring has been fixed so that it isn't blanked any longer if the admin changes the time limit during a game. * Active server queries will be cancelled now when you join a game (loads game faster now). * If standing in an inventory station when it is destroyed you no longer permanently lose weapons. * Fixed two issues that *could* cause crashes. * Fixed a problem where the bombardier could create a permanent targeting laser. * Cleaned up Chat text to remove programming characters. * Fixed "highlight text with my nick" option so it saves preference to file correctly. * Made MPB able to climb hills more easily and reduced damage from impact with the ground. * Added button to stop server queries in progress on "JOIN" screen. * Observers can now only chat with other observers (no one else can hear them). * Made deployable inv stations have smaller trigger so they don't "suck you in" from so far away. * Bots will now claim switches in CnH more accurately. * Added a "max distance" ring for sensors on the commander map so players can more accurately assess how well they placed the sensor in relation to how much area it is actually sensing. * Added a "ding" sound when you have filled up a text buffer so that you know why your text isn't showing up. * Fixed Chat HUD so that page up/page down works better. * Fixed a situation where Heavies could end up being permanently cloaked. * The MPBs on the "Alcatraz" map now deploy correctly (Siege map). * The "edited post" date stamp now works correctly. * If you jump into a vehicle while zoomed in, the zoom will reset correctly therafter now. * The Score Screen (F2) is now available while in a vehicle. * You can now vote to kick observers, if desired. * The ELF turret is fixed so it no longer fires at players when destroyed (an intermittent bug) * Some console spam associated with the Wildcat has been removed. * There was a situation where a player could die twice if he fell out of bounds. That has been resolved. * Screen resolution information should update properly now when restarting the application. * The camera should no longer be able to dip below terrain when in third person mode.
2017-07-17 23:05:21 -04:00
EMailGui.checkSchedule = schedule(1000 * 2, 0, CheckEmail, false);
2017-07-17 22:51:48 -04:00
canvas.SetCursor(ArrowWaitCursor);
}
//-----------------------------------------------------------------------------
function CheckEmail(%calledFromSched)
{
if(EmailGui.checkingEmail)
{
2017-07-17 22:55:25 -04:00
// echo("Check In Progress");
2017-07-17 22:51:48 -04:00
return;
}
if(EmailGui.checkSchedule && !%calledFromSched)
{
2017-07-17 22:55:25 -04:00
// echo("Email Schedule " @ EmailGui.checkSchedule @ "Cancelled");
2017-07-17 22:51:48 -04:00
cancel(EmailGui.checkSchedule); // cancel schedule
}
EmailGui.checkSchedule = "";
EMailGui.key = LaunchGui.key++;
EmailGui.state = "getMail";
v22337 (04/13/01): **SIEGE GAMEPLAY CHANGE**: When attacking a base, you will see red waypoints on the generators. When those generators are destroyed, the waypoints will change to green. If the generators are repaired thereafter, they will return to red. If you are on the defender team, these colors are reversed (green normally, red if destroyed, green if repaired again). This will help teams coordinate attack and defense more easily. **FLARE GREANDE GAMEPLAY CHANGE**: Each flare will only attract ONE missile now. When the missile hits the flare, the flare will be destroyed. Only the first missile fired after the flare is thrown will be fooled by that flare. Other missiles must be attracted by other flares in order to be avoided. *There was a problem where emails were getting cloned multiple times for some folks. This is fixed now and no longer occurs. *There was an issue where the single player game type was not being properly cleared for folks when they left single player and went to other games. This is fixed now. *A stray underground generator was removed from Caldera. *The name column will no longer jump to the top when folks leave and join a room, thus making it easier to stay focused on a particular player's name. *If you steal a vehicle, the vehicle's sensor radius will not switch to the stealing player's team. In otherwords, the sensor of the vehicle will still report to the original team's sensor net...not the team that stole the vehicle. That's as design and is one of the drawbacks of using a stolen vehicle. *Bounty & Hunter: The player icons on the command maps are now the correct colors. *More items have correct names and tags on the command map and in the HUD. There were instances like "East Generator Generator". Those have been eliminated. *The last patch accidentally eliminated the "PlayerXXX joined YYYY game. Click here to join." links from the CHAT. This has been resolved and is now available again. *Players are no longer able to squeeze in under the tires of vehicles and play Superman by lifting them off the ground. ; ) *Bots were getting stuck in Riverdance when the fell in the water near the bridge. This has been fixed. *Added more filtering options so that the filters for the server query (JOIN) screen are more powerful and flexible. *Added a Linux indicator so users can tell whether they are joining a Win32 or Linux server. (Shouldn't make any difference to game play, but we felt you'd like to know.) *Fixed a small texture leak on 3Space objects. *Added an underwater satchel charge effect. Slightly increased the delay time between activating the satchel and the time that it actually explodes (this was as designed...a minor bug was causing it to explode too soon).
2017-07-17 23:07:50 -04:00
EM_Browser.clear();
EmailGui.LoadCache();
2017-07-17 22:51:48 -04:00
DatabaseQueryArray(1,0,$EmailNextSeq, EMailGui, EMailGui.key);
EmailGui.checkingEmail = true;
}
//-----------------------------------------------------------------------------
function EmailEditBlocks()
{
Canvas.pushDialog(EmailBlockDlg);
EmailBlockList.clear();
EMailBlockDlg.key = LaunchGui.key++;
EmailBlockDlg.state = "getBlocklist";
DatabaseQueryArray(2,0,"",EMailBLockDlg,EMailBLockDlg.key);
}
//-----------------------------------------------------------------------------
function EmailBlockSender()
{
%id = EM_Browser.getSelectedId();
if ( %id == -1 )
{
MessageBoxOK("WARNING","You cannot block a non-existent sender.");
return;
}
else
{
%text = EmailMessageVector.getLineTextByTag( EM_Browser.getSelectedId() );
%blockAddress = getField(getRecord(%text, 1), 0);
if(trim(%blockAddress) !$= "")
{
EMailBlockDlg.state = "setBlock";
EMailBlockDlg.key = LaunchGui.key++;
DatabaseQuery(9,%blockAddress,EmailBlockDlg,EMailBlockDlg.key);
}
}
}
//-----------------------------------------------------------------------------
function EmailBlockRemove()
{
%rowId = EmailBlockList.getSelectedId();
if(%rowId == -1)
{
MessageBoxOK("WARNING","You cannot remove a non-existent block.");
return;
}
else
{
%line = EmailBlockList.getRowTextById(%rowId);
%name = getField(%line, 2);
EMailBlockDlg.state = "removeBlock";
EMailBlockDlg.key = LaunchGui.key++;
DatabaseQuery(8,%name,EMailBLockDlg,EMailBLockDlg.key);
EmailBlockList.removeRowById(%rowId);
}
}
//-- EMailComposeDlg ----------------------------------------------------------------
function EMailComposeDlg::onDatabaseQueryResult(%this, %status, %RowCount_Result, %key)
{
if(%this.key != %key)
return;
2017-07-17 22:55:25 -04:00
// echo("RECV: " @ %status TAB %RowCount_Result);
2017-07-17 22:51:48 -04:00
if(getField(%status,0)==0)
{
switch$(%this.state)
{
case "deleteMail":
%this.state = "done";
case "removeMail":
%this.state = "done";
case "sendMail":
%this.state = "done";
}
}
else if (getSubStr(getField(%status,1),0,9) $= "ORA-04061")
{
%this.state = "error";
MessageBoxOK("ERROR","There was an error processing your request, please wait a few moments and try again.");
}
else
MessageBoxOK("ERROR",getField(%status,1));
}
//-----------------------------------------------------------------------------
function EmailComposeDlg::Cancel(%this)
{
Canvas.PopDialog(EmailComposeDlg);
}
//-----------------------------------------------------------------------------
function EmailComposeDlg::SendMail(%this)
{
2017-07-17 22:55:25 -04:00
$EmailToAddress = Email_ToEdit.getValue();
$EmailSubject = EMail_Subject.getValue();
2017-07-17 22:51:48 -04:00
// NEED TO CHECK FOR DUPLICATES
if(trim($EmailToAddress) $= "")
MessageBoxOK("No Address","TO Address may not be left blank. Please enter a player name to send this message to.");
else
{
if(trim($EmailSubject) $= "")
MessageBoxOK("No Subject","Please enter a Subject for your message.");
else
EMailSend();
}
}
//-- EMailBlockDlg -----------------------------------------------------------
function EMailBlockDlg::onDatabaseQueryResult(%this,%status,%ResultString,%key)
{
if(%this.key != %key)
return;
2017-07-17 22:55:25 -04:00
// echo("RECV: " @ %status TAB %ResultString);
2017-07-17 22:51:48 -04:00
if(getField(%status,0)==0)
{
switch$(%this.state)
{
case "getBlocklist":
%this.state = "names";
%this.blockCount = getField(%ResultString,0);
case "removeBlock":
MessageBoxOK("NOTICE",getField(%status,1));
case "setBlock":
MessageBoxOK("NOTICE",getField(%status,1));
}
}
else if (getSubStr(getField(%status,1),0,9) $= "ORA-04061")
{
%this.state = "error";
MessageBoxOK("ERROR","There was an error processing your request, please wait a few moments and try again.");
}
else
{
%this.state = "error";
MessageBoxOK("ERROR",getField(%status,1));
}
}
//-----------------------------------------------------------------------------
function EMailBlockDlg::onDatabaseRow(%this,%row,%isLastRow,%key)
{
if(%this.key != %key)
return;
2017-07-17 22:55:25 -04:00
// echo("RECV: " @ %row TAB %isLastRow);
2017-07-17 22:51:48 -04:00
switch$(%this.state)
{
case "names":
%textName = getTextName(getFields(%row,0,4));
%id = getField(%row,3);
%blockedCount = getField(%row,4);
EmailBlockList.addRow(%id, getField(%textName,0) TAB %blockedCount TAB %row);
}
}
//-----------------------------------------------------------------------------
function CheckAllDuplicates(%player)
{
%lCount = LC_ToList.rowCount();
%cCount = LC_CCList.rowCount();
%vResult = 0;
if(%lCount>0)
{
for(%l=0;%l<%lCount;%l++)
{
%lstr = LC_ToList.getRowText(%l);
if(%lstr $= %player)
%vResult++;
}
}
if(%cCount>0)
{
for(%c=0;%c<%cCount;%c++)
{
%cstr = LC_CCList.getRowText(%c);
if(%cstr $= %player)
%vResult++;
}
}
return %vResult;
}
//-----------------------------------------------------------------------------
function LaunchAddressDlg()
{
Canvas.PushDialog("AddressDlg");
}
//-----------------------------------------------------------------------------
function ListToStr(%listName,%delim)
{
%str = "";
%rCount = %listName.rowCount();
if (%rCount > 0)
{
for(%r=0;%r<%rCount;%r++)
{
%str = %str @ %listName.getRowText(%r);
if(%r < %rCount-1)
{
%str = %str @ %delim;
}
}
return %str;
}
}
//-----------------------------------------------------------------------------
function StrToList(%listName, %str, %delim)
{
%listName.Clear();
%sCount = 0;
%sSize = strlen(%str);
if (%sSize > 0)
{
for(%l=0;%l<=%sSize;%l++)
{
%txt = getSubStr(%str,%l,1);
if( %txt $= %delim || %l == %sSize )
{
%listName.addRow(%sCount,trim(%sText));
%sText = "";
%sCount++;
}
else
{
%sText = %sText @ %txt;
}
}
}
}
//-----------------------------------------------------------------------------
function AddressDlg::onDatabaseQueryResult(%this,%status,%resultString,%key)
{
if(%this.key != %key)
return;
2017-07-17 22:55:25 -04:00
// echo("RECV: " @ %status TAB %resultString);
2017-07-17 22:51:48 -04:00
if(getField(%status,0)==0)
{
switch$(%this.state)
{
case "goSearch":
if(getField(%resultString,0)<=0)
{
%this.state = "done";
MessageBoxOK("NOTICE","No Match Found.");
}
else
{
%this.state = "memberList";
%this.linecount = -1;
LC_BigList.clear();
}
case "getBuddyList":
if(getField(%resultString,0)<=0)
{
%this.state = "done";
MessageBoxOK("NOTICE","You have no Buddies.");
}
else
{
%this.state = "buddyList";
%this.linecount = -1;
LC_BigList.clear();
}
case "getTribeMembers":
if(getField(%resultString,0)<=0)
{
%this.state = "done";
MessageBoxOK("NOTICE","Cloak Packs are engaged, Tribe Mates could not be detected.");
}
else
{
%this.state = "tribeMembers";
%this.linecount = -1;
LC_BigList.clear();
}
case "addBuddy":
MessageBoxOK("CONFIRMED",getField(%status,1));
case "dropBuddy":
MessageBoxOK("CONFIRMED",getField(%status,1));
}
}
else if (getSubStr(getField(%status,1),0,9) $= "ORA-04061")
{
%this.state = "error";
MessageBoxOK("ERROR","There was an error processing your request, please wait a few moments and try again.");
}
else
{
switch$(%this.state)
{
case "goSearch":
%this.state = "error";
MessageBoxOk("ERROR",getField(%status,1));
}
}
}
//-----------------------------------------------------------------------------
function AddressDlg::onDatabaseRow(%this,%row,%isLastRow,%key)
{
if(%this.key != %key)
return;
2017-07-17 22:55:25 -04:00
// echo("RECV : " @ %row);
2017-07-17 22:51:48 -04:00
switch$(%this.state)
{
case "memberList":
LC_BigList.addRow(%this.linecount++,getField(%row,1));
case "buddyList":
LC_BigList.addRow(%this.linecount++,getField(%row,0));
case "tribeMembers":
LC_BigList.addRow(%this.linecount++,getField(%row,0));
}
}
//-----------------------------------------------------------------------------
function AddressDlg::AddBuddylist(%this)
{
%this.key = LaunchGui.key++;
%this.lbstate = "buddylist";
switch (%this.SrcList)
{
case 0:
%addremove = LC_BuddyListBtn.direction;
%player = LC_BigList.getValue();
%selRow = LC_BigList.getRownumByID(LC_BigList.GetSelectedID());
case 1:
%addremove = 0;
%player = LC_ToList.getValue();
case 2:
%addremove = 0;
%player = LC_CCList.getValue();
}
if (%addremove==0)
{
%this.doRefresh = 1;
%this.state = "addBuddy";
DatabaseQuery(10,%player,%this,%this.key);
}
else
{
%this.state = "dropBuddy";
DatabaseQuery(11,%player,%this,%this.key);
LC_BigList.removeRowbyId(LC_BigList.getSelectedID());
if(%selRow>=LC_BigList.RowCount())
%selRow = LC_BigList.RowCount()-1;
LC_BigList.setSelectedRow(%selRow);
}
}
//-----------------------------------------------------------------------------
function AddressDlg::AddCC(%this)
{
if(LC_CCListBtn.direction == 0)
{
%addName = LC_BigList.getRowText(LC_BigList.getSelectedID());
%hasDupes = CheckAllDuplicates(%addName);
if(%hasDupes == 0)
LC_CCList.addRow(LC_CCList.RowCount()+1, %addName);
}
else
{
%selRow = LC_CCList.getRownumByID(LC_CCList.GetSelectedID());
LC_CCList.removeRowbyID(LC_CCList.getSelectedID());
if(%selRow>=LC_CCList.RowCount())
%selRow = LC_CCList.RowCount()-1;
LC_CCList.setSelectedRow(%selRow);
}
%this.DestList = 1;
}
//-----------------------------------------------------------------------------
function AddressDlg::AddTo(%this)
{
if(LC_ToListBtn.direction == 0)
{
%addName = LC_BigList.getRowText(LC_BigList.getSelectedID());
%hasDupes = CheckAllDuplicates(%addName);
if(%hasDupes == 0 )
LC_ToList.addRow(LC_ToList.RowCount()+1, %addName);
}
else
{
%selRow = LC_ToList.getRownumByID(LC_ToList.GetSelectedID());
LC_ToList.removeRowbyID(LC_ToList.getSelectedID());
if(%selRow>=LC_ToList.RowCount())
%selRow = LC_ToList.RowCount()-1;
LC_ToList.SetSelectedRow(%selRow);
}
%this.DestList = 0;
}
//-----------------------------------------------------------------------------
function AddressDlg::Cancel(%this)
{
LC_BigList.Clear();
Canvas.PopDialog("AddressDlg");
}
//-----------------------------------------------------------------------------
function AddressDlg::GoSearch(%this)
{
if(trim(LC_Search.getValue()) !$="")
{
%this.key = LaunchGui.key++;
%this.state = "goSearch";
%this.lbstate = "errorcheck";
v22337 (04/13/01): **SIEGE GAMEPLAY CHANGE**: When attacking a base, you will see red waypoints on the generators. When those generators are destroyed, the waypoints will change to green. If the generators are repaired thereafter, they will return to red. If you are on the defender team, these colors are reversed (green normally, red if destroyed, green if repaired again). This will help teams coordinate attack and defense more easily. **FLARE GREANDE GAMEPLAY CHANGE**: Each flare will only attract ONE missile now. When the missile hits the flare, the flare will be destroyed. Only the first missile fired after the flare is thrown will be fooled by that flare. Other missiles must be attracted by other flares in order to be avoided. *There was a problem where emails were getting cloned multiple times for some folks. This is fixed now and no longer occurs. *There was an issue where the single player game type was not being properly cleared for folks when they left single player and went to other games. This is fixed now. *A stray underground generator was removed from Caldera. *The name column will no longer jump to the top when folks leave and join a room, thus making it easier to stay focused on a particular player's name. *If you steal a vehicle, the vehicle's sensor radius will not switch to the stealing player's team. In otherwords, the sensor of the vehicle will still report to the original team's sensor net...not the team that stole the vehicle. That's as design and is one of the drawbacks of using a stolen vehicle. *Bounty & Hunter: The player icons on the command maps are now the correct colors. *More items have correct names and tags on the command map and in the HUD. There were instances like "East Generator Generator". Those have been eliminated. *The last patch accidentally eliminated the "PlayerXXX joined YYYY game. Click here to join." links from the CHAT. This has been resolved and is now available again. *Players are no longer able to squeeze in under the tires of vehicles and play Superman by lifting them off the ground. ; ) *Bots were getting stuck in Riverdance when the fell in the water near the bridge. This has been fixed. *Added more filtering options so that the filters for the server query (JOIN) screen are more powerful and flexible. *Added a Linux indicator so users can tell whether they are joining a Win32 or Linux server. (Shouldn't make any difference to game play, but we felt you'd like to know.) *Fixed a small texture leak on 3Space objects. *Added an underwater satchel charge effect. Slightly increased the delay time between activating the satchel and the time that it actually explodes (this was as designed...a minor bug was causing it to explode too soon).
2017-07-17 23:07:50 -04:00
DatabaseQueryArray(3,100,trim(LC_Search.getValue()) TAB 0 TAB 100 TAB 1 ,%this, %this.key,true);
2017-07-17 22:51:48 -04:00
LC_BuddyListBtn.direction = 0;
LC_BuddyListBtn.text = "ADD TO BUDDYLIST";
LC_ListBox.setSelected(0);
}
else
MessageBoxOK("WARNING","Null searches (blank) are not allowed. Please enter letter(s) to search for.");
}
//-----------------------------------------------------------------------------
function AddressDlg::GoList(%this)
{
%this.key = LaunchGui.key++;
%this.lbstate = "errorcheck";
if(LC_ListBox.getValue() $="Select List")
{
LC_BigList.clear();
}
else if(LC_ListBox.getValue() $="Buddy List")
{
%this.state = "getBuddyList";
DatabaseQueryArray(5,0,"",%this,%this.key);
LC_BuddyListBtn.direction = 1;
LC_BuddyListBtn.text = "REMOVE FROM BUDDYLIST";
}
else
{
%this.state = "getTribeMembers";
v22337 (04/13/01): **SIEGE GAMEPLAY CHANGE**: When attacking a base, you will see red waypoints on the generators. When those generators are destroyed, the waypoints will change to green. If the generators are repaired thereafter, they will return to red. If you are on the defender team, these colors are reversed (green normally, red if destroyed, green if repaired again). This will help teams coordinate attack and defense more easily. **FLARE GREANDE GAMEPLAY CHANGE**: Each flare will only attract ONE missile now. When the missile hits the flare, the flare will be destroyed. Only the first missile fired after the flare is thrown will be fooled by that flare. Other missiles must be attracted by other flares in order to be avoided. *There was a problem where emails were getting cloned multiple times for some folks. This is fixed now and no longer occurs. *There was an issue where the single player game type was not being properly cleared for folks when they left single player and went to other games. This is fixed now. *A stray underground generator was removed from Caldera. *The name column will no longer jump to the top when folks leave and join a room, thus making it easier to stay focused on a particular player's name. *If you steal a vehicle, the vehicle's sensor radius will not switch to the stealing player's team. In otherwords, the sensor of the vehicle will still report to the original team's sensor net...not the team that stole the vehicle. That's as design and is one of the drawbacks of using a stolen vehicle. *Bounty & Hunter: The player icons on the command maps are now the correct colors. *More items have correct names and tags on the command map and in the HUD. There were instances like "East Generator Generator". Those have been eliminated. *The last patch accidentally eliminated the "PlayerXXX joined YYYY game. Click here to join." links from the CHAT. This has been resolved and is now available again. *Players are no longer able to squeeze in under the tires of vehicles and play Superman by lifting them off the ground. ; ) *Bots were getting stuck in Riverdance when the fell in the water near the bridge. This has been fixed. *Added more filtering options so that the filters for the server query (JOIN) screen are more powerful and flexible. *Added a Linux indicator so users can tell whether they are joining a Win32 or Linux server. (Shouldn't make any difference to game play, but we felt you'd like to know.) *Fixed a small texture leak on 3Space objects. *Added an underwater satchel charge effect. Slightly increased the delay time between activating the satchel and the time that it actually explodes (this was as designed...a minor bug was causing it to explode too soon).
2017-07-17 23:07:50 -04:00
DatabaseQueryArray(6,0,LC_ListBox.getValue(),%this,%this.key,true);
2017-07-17 22:51:48 -04:00
LC_BuddyListBtn.direction = 0;
LC_BuddyListBtn.text = "ADD TO BUDDYLIST";
}
}
//-----------------------------------------------------------------------------
function AddressDlg::OK(%this)
{
if (LC_ToList.rowCount() > 0)
EMail_ToEdit.setValue(ListToStr(LC_ToList,","));
if (LC_CCList.rowCount() > 0)
EMail_CCEdit.setValue(ListToStr(LC_CCList,","));
LC_BigList.Clear();
Canvas.PopDialog("AddressDlg");
}
//-----------------------------------------------------------------------------
function AddressDlg::onClick(%this, %sender)
{
switch$(%sender)
{
case "BIGLIST":
LC_ToListBtn.text = "ADD";
LC_CCListBtn.text = "ADD";
LC_ToListBtn.direction = 0;
LC_CCListBtn.direction = 0;
LC_ToList.setSelectedRow(-1);
LC_CCList.setSelectedRow(-1);
%this.SrcList = 0;
LC_BuddyListBtn.setVisible(1);
if(LC_ListBox.getValue() $="Buddy List")
{
LC_BuddyListBtn.direction = 1;
LC_BuddyListBtn.SetValue("REMOVE FROM BUDDYLIST");
}
else
{
LC_BuddyListBtn.direction = 0;
LC_BuddyListBtn.SetValue("ADD TO BUDDYLIST");
}
case "TOLIST":
LC_ToListBtn.text = "DEL";
LC_ToListBtn.direction = 1;
LC_BigList.setSelectedRow(-1);
LC_CCList.setSelectedRow(-1);
%this.DestList = 0;
%this.SrcList = 1;
LC_BuddyListBtn.direction = 0;
LC_BuddyListBtn.SetValue("ADD TO BUDDYLIST");
LC_BuddyListBtn.setVisible(1);
case "CCLIST":
LC_CCListBtn.text = "DEL";
LC_CCListBtn.direction = 1;
LC_ToList.setSelectedRow(-1);
LC_BigList.setSelectedRow(-1);
%this.DestList = 1;
%this.SrcList = 2;
LC_BuddyListBtn.direction = 0;
LC_BuddyListBtn.SetValue("ADD TO BUDDYLIST");
LC_BuddyListBtn.setVisible(1);
case "LISTBOX":
LC_ToList.setSelectedRow(-1);
LC_BigList.setSelectedRow(-1);
LC_CCList.setSelectedRow(-1);
%this.SrcList = 0;
LC_BuddyListBtn.setVisible(0);
%this.GoList();
case "SEARCHBOX":
LC_ToList.setSelectedRow(-1);
LC_BigList.setSelectedRow(-1);
LC_CCList.setSelectedRow(-1);
%this.SrcList = 0;
LC_BuddyListBtn.setVisible(0);
}
Canvas.repaint();
}
//-----------------------------------------------------------------------------
function AddressDlg::onDblClick(%this,%caller)
{
switch(%caller)
{
case 0:
if(%this.DestList==0)
%this.AddTo();
else
%this.AddCC();
case 1:
LC_ToList.removeRowbyID(LC_ToList.getSelectedID());
LC_ToList.SetSelectedRow(0);
case 2:
LC_CCList.removeRowbyID(LC_CCList.getSelectedID());
LC_CCList.SetSelectedRow(0);
}
}
//-----------------------------------------------------------------------------
function AddressDlg::onWake(%this)
{
%this.doRefresh = 0;
%this.key = LaunchGui.key++;
%this.state = "loadlistbox";
%this.lbstate = "errorcheck";
%this.DestList = 0;
%this.SrcList = 0;
LC_BuddyListBtn.setVisible(0);
LC_ListBox.Clear();
LC_ListBox.Add("Select List",0);
LC_ListBox.Add("Buddy List",1);
LC_ListBox.setSelected(0);
LC_Search.clear();
StrToList(LC_ToList,$EmailToAddress,",");
StrToList(LC_CCList,$EmailCCAddress,",");
%info = WONGetAuthInfo();
%tribeCount = getField( getRecord( %info, 1 ), 0 ); //%cert
for ( %i = 0; %i < %tribeCount; %i++ )
{
%tribe = getField( getRecord( %info, %i + 2 ), 0 ); //%cert
LC_ListBox.add(%tribe,%i);
}
}
//-- EMailGui ----------------------------------------------------------------
function EmailGui::onWake(%this)
{
// Make these buttons inactive until a message is selected:
EM_ReplyBtn.setActive( false );
EM_ReplyToAllBtn.setActive( false );
EM_ForwardBtn.setActive( false );
EM_DeleteBtn.setActive( false );
EM_BlockBtn.setActive( false );
%selId = EM_Browser.getSelectedId();
Canvas.pushDialog(LaunchToolbarDlg);
// Set the minimum extent of the frame panes:
%minExtent = EM_BrowserPane.getMinExtent();
EM_Frame.frameMinExtent( 0, firstWord( %minExtent ), restWords( %minExtent ) );
%minExtent = EM_MessagePane.getMinExtent();
EM_Frame.frameMinExtent( 1, firstWord( %minExtent ), restWords( %minExtent ) );
if(!%this.cacheFile)
{
v22337 (04/13/01): **SIEGE GAMEPLAY CHANGE**: When attacking a base, you will see red waypoints on the generators. When those generators are destroyed, the waypoints will change to green. If the generators are repaired thereafter, they will return to red. If you are on the defender team, these colors are reversed (green normally, red if destroyed, green if repaired again). This will help teams coordinate attack and defense more easily. **FLARE GREANDE GAMEPLAY CHANGE**: Each flare will only attract ONE missile now. When the missile hits the flare, the flare will be destroyed. Only the first missile fired after the flare is thrown will be fooled by that flare. Other missiles must be attracted by other flares in order to be avoided. *There was a problem where emails were getting cloned multiple times for some folks. This is fixed now and no longer occurs. *There was an issue where the single player game type was not being properly cleared for folks when they left single player and went to other games. This is fixed now. *A stray underground generator was removed from Caldera. *The name column will no longer jump to the top when folks leave and join a room, thus making it easier to stay focused on a particular player's name. *If you steal a vehicle, the vehicle's sensor radius will not switch to the stealing player's team. In otherwords, the sensor of the vehicle will still report to the original team's sensor net...not the team that stole the vehicle. That's as design and is one of the drawbacks of using a stolen vehicle. *Bounty & Hunter: The player icons on the command maps are now the correct colors. *More items have correct names and tags on the command map and in the HUD. There were instances like "East Generator Generator". Those have been eliminated. *The last patch accidentally eliminated the "PlayerXXX joined YYYY game. Click here to join." links from the CHAT. This has been resolved and is now available again. *Players are no longer able to squeeze in under the tires of vehicles and play Superman by lifting them off the ground. ; ) *Bots were getting stuck in Riverdance when the fell in the water near the bridge. This has been fixed. *Added more filtering options so that the filters for the server query (JOIN) screen are more powerful and flexible. *Added a Linux indicator so users can tell whether they are joining a Win32 or Linux server. (Shouldn't make any difference to game play, but we felt you'd like to know.) *Fixed a small texture leak on 3Space objects. *Added an underwater satchel charge effect. Slightly increased the delay time between activating the satchel and the time that it actually explodes (this was as designed...a minor bug was causing it to explode too soon).
2017-07-17 23:07:50 -04:00
%this.cacheFile = "email1";
2017-07-17 22:51:48 -04:00
EmailGui.getCache();
}
if ( !EmailGui.cacheLoaded || EM_Browser.rowCount() == 0 )
{
EmailGui.checkingEmail = false;
if(!rbInbox.getValue())
rbInbox.setValue(1);
else
{
EmailGui.GetCache();
EmailGui.OutputVector();
}
}
if ( EM_Browser.rowCount() > 0 )
{
%row = EM_Browser.findById( %selId );
if ( %row == -1 )
EM_Browser.setSelectedRow( 0 );
else
EM_Browser.setSelectedRow( %row );
}
}
//-----------------------------------------------------------------------------
function EmailGui::ButtonClick(%this,%ord)
{
switch(%ord)
{
case 0: em_GetMailBtn.setVisible(1);
GetEmailBtnClick();
case 1: em_GetMailBtn.setVisible(0);
EM_Browser.clear();
EMailMessageVector.clear();
EmailInboxBodyText.setText("");
EMailGui.state = "getDeletedMail";
EmailGui.key = LaunchGui.key++;
v22337 (04/13/01): **SIEGE GAMEPLAY CHANGE**: When attacking a base, you will see red waypoints on the generators. When those generators are destroyed, the waypoints will change to green. If the generators are repaired thereafter, they will return to red. If you are on the defender team, these colors are reversed (green normally, red if destroyed, green if repaired again). This will help teams coordinate attack and defense more easily. **FLARE GREANDE GAMEPLAY CHANGE**: Each flare will only attract ONE missile now. When the missile hits the flare, the flare will be destroyed. Only the first missile fired after the flare is thrown will be fooled by that flare. Other missiles must be attracted by other flares in order to be avoided. *There was a problem where emails were getting cloned multiple times for some folks. This is fixed now and no longer occurs. *There was an issue where the single player game type was not being properly cleared for folks when they left single player and went to other games. This is fixed now. *A stray underground generator was removed from Caldera. *The name column will no longer jump to the top when folks leave and join a room, thus making it easier to stay focused on a particular player's name. *If you steal a vehicle, the vehicle's sensor radius will not switch to the stealing player's team. In otherwords, the sensor of the vehicle will still report to the original team's sensor net...not the team that stole the vehicle. That's as design and is one of the drawbacks of using a stolen vehicle. *Bounty & Hunter: The player icons on the command maps are now the correct colors. *More items have correct names and tags on the command map and in the HUD. There were instances like "East Generator Generator". Those have been eliminated. *The last patch accidentally eliminated the "PlayerXXX joined YYYY game. Click here to join." links from the CHAT. This has been resolved and is now available again. *Players are no longer able to squeeze in under the tires of vehicles and play Superman by lifting them off the ground. ; ) *Bots were getting stuck in Riverdance when the fell in the water near the bridge. This has been fixed. *Added more filtering options so that the filters for the server query (JOIN) screen are more powerful and flexible. *Added a Linux indicator so users can tell whether they are joining a Win32 or Linux server. (Shouldn't make any difference to game play, but we felt you'd like to know.) *Fixed a small texture leak on 3Space objects. *Added an underwater satchel charge effect. Slightly increased the delay time between activating the satchel and the time that it actually explodes (this was as designed...a minor bug was causing it to explode too soon).
2017-07-17 23:07:50 -04:00
DatabaseQueryArray(14,100,EmailGui.state,EMailGui,EMailGui.key,true);
2017-07-17 22:51:48 -04:00
}
}
//-----------------------------------------------------------------------------
function EMailGui::onDatabaseQueryResult(%this, %status, %RowCount_Result, %key)
{
if(%this.key != %key)
return;
2017-07-17 22:55:25 -04:00
// echo("RECV: " @ %status);
2017-07-17 22:51:48 -04:00
if(getField(%status,0)==0)
{
switch$(%this.state)
{
case "getMail":
%this.soundPlayed = false;
if(getField(%RowCount_Result,0)>0)
{
%this.messageCount = 0;
%this.message = "";
%this.state = "NewMail";
2017-07-17 22:55:25 -04:00
%this.getCache();
2017-07-17 22:51:48 -04:00
}
else
{
%this.state = "done";
EMailGui.getCache();
EMailGui.outputVector();
if(EMailGui.btnClicked)
EmailGui.btnClicked = false;
v22337 (04/13/01): **SIEGE GAMEPLAY CHANGE**: When attacking a base, you will see red waypoints on the generators. When those generators are destroyed, the waypoints will change to green. If the generators are repaired thereafter, they will return to red. If you are on the defender team, these colors are reversed (green normally, red if destroyed, green if repaired again). This will help teams coordinate attack and defense more easily. **FLARE GREANDE GAMEPLAY CHANGE**: Each flare will only attract ONE missile now. When the missile hits the flare, the flare will be destroyed. Only the first missile fired after the flare is thrown will be fooled by that flare. Other missiles must be attracted by other flares in order to be avoided. *There was a problem where emails were getting cloned multiple times for some folks. This is fixed now and no longer occurs. *There was an issue where the single player game type was not being properly cleared for folks when they left single player and went to other games. This is fixed now. *A stray underground generator was removed from Caldera. *The name column will no longer jump to the top when folks leave and join a room, thus making it easier to stay focused on a particular player's name. *If you steal a vehicle, the vehicle's sensor radius will not switch to the stealing player's team. In otherwords, the sensor of the vehicle will still report to the original team's sensor net...not the team that stole the vehicle. That's as design and is one of the drawbacks of using a stolen vehicle. *Bounty & Hunter: The player icons on the command maps are now the correct colors. *More items have correct names and tags on the command map and in the HUD. There were instances like "East Generator Generator". Those have been eliminated. *The last patch accidentally eliminated the "PlayerXXX joined YYYY game. Click here to join." links from the CHAT. This has been resolved and is now available again. *Players are no longer able to squeeze in under the tires of vehicles and play Superman by lifting them off the ground. ; ) *Bots were getting stuck in Riverdance when the fell in the water near the bridge. This has been fixed. *Added more filtering options so that the filters for the server query (JOIN) screen are more powerful and flexible. *Added a Linux indicator so users can tell whether they are joining a Win32 or Linux server. (Shouldn't make any difference to game play, but we felt you'd like to know.) *Fixed a small texture leak on 3Space objects. *Added an underwater satchel charge effect. Slightly increased the delay time between activating the satchel and the time that it actually explodes (this was as designed...a minor bug was causing it to explode too soon).
2017-07-17 23:07:50 -04:00
v22228 (04/06/01): * Fixed a problem that could have caused texture leaking in the interiors * Fixed an AI problem in Training 2 * Chinese "simplified" keyboard supported * Korean keyboard supported * A bug where infinite ammo could be gained by tossing the ammo was prevented. * Fixed a problem in Training 2 where a waypoint wouldn't update properly. * Thundersword and Havoc hold steady now when players try to jump in so they don't invert and detonate. * CD is now required in the drive for on-line play. * Scoring has been fixed so that it isn't blanked any longer if the admin changes the time limit during a game. * Active server queries will be cancelled now when you join a game (loads game faster now). * If standing in an inventory station when it is destroyed you no longer permanently lose weapons. * Fixed two issues that *could* cause crashes. * Fixed a problem where the bombardier could create a permanent targeting laser. * Cleaned up Chat text to remove programming characters. * Fixed "highlight text with my nick" option so it saves preference to file correctly. * Made MPB able to climb hills more easily and reduced damage from impact with the ground. * Added button to stop server queries in progress on "JOIN" screen. * Observers can now only chat with other observers (no one else can hear them). * Made deployable inv stations have smaller trigger so they don't "suck you in" from so far away. * Bots will now claim switches in CnH more accurately. * Added a "max distance" ring for sensors on the commander map so players can more accurately assess how well they placed the sensor in relation to how much area it is actually sensing. * Added a "ding" sound when you have filled up a text buffer so that you know why your text isn't showing up. * Fixed Chat HUD so that page up/page down works better. * Fixed a situation where Heavies could end up being permanently cloaked. * The MPBs on the "Alcatraz" map now deploy correctly (Siege map). * The "edited post" date stamp now works correctly. * If you jump into a vehicle while zoomed in, the zoom will reset correctly therafter now. * The Score Screen (F2) is now available while in a vehicle. * You can now vote to kick observers, if desired. * The ELF turret is fixed so it no longer fires at players when destroyed (an intermittent bug) * Some console spam associated with the Wildcat has been removed. * There was a situation where a player could die twice if he fell out of bounds. That has been resolved. * Screen resolution information should update properly now when restarting the application. * The camera should no longer be able to dip below terrain when in third person mode.
2017-07-17 23:05:21 -04:00
%this.checkingEmail = false;
2017-07-17 22:51:48 -04:00
%this.checkSchedule = schedule(1000 * 60 * 5, 0, CheckEmail, true);
2017-07-17 22:55:25 -04:00
// echo("scheduling Email check " @ %this.checkSchedule @ " in 5 minutes");
2017-07-17 22:51:48 -04:00
}
case "sendMail":
%this.state = "done";
CheckEMail();
case "deleteMail":
%this.state = "done";
CheckEMail();
case "forwardMail":
%this.state = "done";
CheckEMail();
case "replyMail":
%this.state = "done";
CheckEMail();
case "replyAllMail":
%this.state = "done";
CheckEMail();
case "blockSender":
%this.state = "done";
case "Refresh":
%this.state = "done";
CheckEMail();
case "getDeletedMail":
if(getField(%RowCount_Result,0)>0)
{
%this.messageCount = 0;
%this.message = "";
%this.state = "DeletedMail";
}
else
{
%this.state = "done";
MessageBoxOK("NOTICE",getField(%status,2));
}
}
}
else if (getSubStr(getField(%status,1),0,9) $= "ORA-04061")
{
%this.state = "error";
MessageBoxOK("ERROR","There was an error processing your request, please wait a few moments and try again.");
}
else
{
%this.state = "error";
MessageBoxOK("ERROR","Error Retrieving Messages");
}
canvas.SetCursor(DefaultCursor);
}
//-----------------------------------------------------------------------------
function EMailGui::onDatabaseRow(%this, %row,%isLastRow,%key)
{
if(%this.key != %key)
return;
2017-07-17 22:55:25 -04:00
// echo("RECV: " @ %row NL %isLastRow);
2017-07-17 22:51:48 -04:00
switch$(%this.state)
{
case "DeletedMail":
%ID = getField(%row,0);
%senderQuad = getFields(%row,1,4);
%recipientQuad = getFields(%row,5,8);
%created = getField(%row,9);
%isCC = getField(%row,10);
%isDel = getField(%row,11);
%isRead = getField(%row,12);
%TList = getField(%row,13);
%CCList = getField(%row,14);
%subject = getField(%row,15);
%bodyCount = getField(%row,16);
%body = getFields(%row,17);
%msg = %ID NL %senderQuad NL %isRead NL %created NL %TList NL %CCList NL %subject NL %body @ "\n";
%this.message = %msg;
EmailMessageVector.pushBackLine(%this.message, getField(%this.message, 0));
if(%isLastRow)
%this.outputVector();
2017-07-17 22:55:25 -04:00
case "NewMail":
2017-07-17 22:51:48 -04:00
%this.checkingEmail = "";
%ID = getField(%row,0);
%senderQuad = getFields(%row,1,4);
%recipientQuad = getFields(%row,5,8);
%created = getField(%row,9);
%isCC = getField(%row,10);
%isDel = getField(%row,11);
%isRead = getField(%row,12);
%TList = getField(%row,13);
%CCList = getField(%row,14);
%subject = getField(%row,15);
%bodyCount = getField(%row,16);
%body = getFields(%row,17);
%msg = %ID NL %senderQuad NL %isRead NL %created NL %TList NL %CCList NL %subject NL %body @ "\n";
%this.message = %msg;
$EmailNextSeq = %ID;
EmailMessageVector.pushBackLine(%this.message, getField(%this.message, 0));
if(!%this.soundPlayed)
{
if(!getRecord(%this.message, 2))//are there any unread messages in this group?
{
%this.soundPlayed = true;
alxPlay(sGotMail, 0, 0, 0);
}
}
if(%isLastRow)
{
EmailGui.dumpCache();
EmailGui.loadCache();
v22228 (04/06/01): * Fixed a problem that could have caused texture leaking in the interiors * Fixed an AI problem in Training 2 * Chinese "simplified" keyboard supported * Korean keyboard supported * A bug where infinite ammo could be gained by tossing the ammo was prevented. * Fixed a problem in Training 2 where a waypoint wouldn't update properly. * Thundersword and Havoc hold steady now when players try to jump in so they don't invert and detonate. * CD is now required in the drive for on-line play. * Scoring has been fixed so that it isn't blanked any longer if the admin changes the time limit during a game. * Active server queries will be cancelled now when you join a game (loads game faster now). * If standing in an inventory station when it is destroyed you no longer permanently lose weapons. * Fixed two issues that *could* cause crashes. * Fixed a problem where the bombardier could create a permanent targeting laser. * Cleaned up Chat text to remove programming characters. * Fixed "highlight text with my nick" option so it saves preference to file correctly. * Made MPB able to climb hills more easily and reduced damage from impact with the ground. * Added button to stop server queries in progress on "JOIN" screen. * Observers can now only chat with other observers (no one else can hear them). * Made deployable inv stations have smaller trigger so they don't "suck you in" from so far away. * Bots will now claim switches in CnH more accurately. * Added a "max distance" ring for sensors on the commander map so players can more accurately assess how well they placed the sensor in relation to how much area it is actually sensing. * Added a "ding" sound when you have filled up a text buffer so that you know why your text isn't showing up. * Fixed Chat HUD so that page up/page down works better. * Fixed a situation where Heavies could end up being permanently cloaked. * The MPBs on the "Alcatraz" map now deploy correctly (Siege map). * The "edited post" date stamp now works correctly. * If you jump into a vehicle while zoomed in, the zoom will reset correctly therafter now. * The Score Screen (F2) is now available while in a vehicle. * You can now vote to kick observers, if desired. * The ELF turret is fixed so it no longer fires at players when destroyed (an intermittent bug) * Some console spam associated with the Wildcat has been removed. * There was a situation where a player could die twice if he fell out of bounds. That has been resolved. * Screen resolution information should update properly now when restarting the application. * The camera should no longer be able to dip below terrain when in third person mode.
2017-07-17 23:05:21 -04:00
%this.checkingEmail = false;
2017-07-17 22:51:48 -04:00
%this.checkSchedule = schedule(1000 * 60 * 5, 0, CheckEmail, true);
2017-07-17 22:55:25 -04:00
// echo("scheduling Email check " @ %this.checkSchedule @ " in 5 minutes");
2017-07-17 22:51:48 -04:00
}
}
}
//-----------------------------------------------------------------------------
function EmailGui::getCache(%this)
{
EM_Browser.clear();
EMailMessageVector.clear();
EmailInboxBodyText.setText("");
v22337 (04/13/01): **SIEGE GAMEPLAY CHANGE**: When attacking a base, you will see red waypoints on the generators. When those generators are destroyed, the waypoints will change to green. If the generators are repaired thereafter, they will return to red. If you are on the defender team, these colors are reversed (green normally, red if destroyed, green if repaired again). This will help teams coordinate attack and defense more easily. **FLARE GREANDE GAMEPLAY CHANGE**: Each flare will only attract ONE missile now. When the missile hits the flare, the flare will be destroyed. Only the first missile fired after the flare is thrown will be fooled by that flare. Other missiles must be attracted by other flares in order to be avoided. *There was a problem where emails were getting cloned multiple times for some folks. This is fixed now and no longer occurs. *There was an issue where the single player game type was not being properly cleared for folks when they left single player and went to other games. This is fixed now. *A stray underground generator was removed from Caldera. *The name column will no longer jump to the top when folks leave and join a room, thus making it easier to stay focused on a particular player's name. *If you steal a vehicle, the vehicle's sensor radius will not switch to the stealing player's team. In otherwords, the sensor of the vehicle will still report to the original team's sensor net...not the team that stole the vehicle. That's as design and is one of the drawbacks of using a stolen vehicle. *Bounty & Hunter: The player icons on the command maps are now the correct colors. *More items have correct names and tags on the command map and in the HUD. There were instances like "East Generator Generator". Those have been eliminated. *The last patch accidentally eliminated the "PlayerXXX joined YYYY game. Click here to join." links from the CHAT. This has been resolved and is now available again. *Players are no longer able to squeeze in under the tires of vehicles and play Superman by lifting them off the ground. ; ) *Bots were getting stuck in Riverdance when the fell in the water near the bridge. This has been fixed. *Added more filtering options so that the filters for the server query (JOIN) screen are more powerful and flexible. *Added a Linux indicator so users can tell whether they are joining a Win32 or Linux server. (Shouldn't make any difference to game play, but we felt you'd like to know.) *Fixed a small texture leak on 3Space objects. *Added an underwater satchel charge effect. Slightly increased the delay time between activating the satchel and the time that it actually explodes (this was as designed...a minor bug was causing it to explode too soon).
2017-07-17 23:07:50 -04:00
%fileName = $EmailCachePath @ "email1";
2017-07-17 22:51:48 -04:00
%file = new FileObject();
if ( %this.cacheFile $= "" )
{
if ( %file.openForRead( %fileName ) )
{
%guid = %file.readLine();
if ( %guid $= getField( WonGetAuthInfo(), 3 ) )
{
// This is the right one!
v22337 (04/13/01): **SIEGE GAMEPLAY CHANGE**: When attacking a base, you will see red waypoints on the generators. When those generators are destroyed, the waypoints will change to green. If the generators are repaired thereafter, they will return to red. If you are on the defender team, these colors are reversed (green normally, red if destroyed, green if repaired again). This will help teams coordinate attack and defense more easily. **FLARE GREANDE GAMEPLAY CHANGE**: Each flare will only attract ONE missile now. When the missile hits the flare, the flare will be destroyed. Only the first missile fired after the flare is thrown will be fooled by that flare. Other missiles must be attracted by other flares in order to be avoided. *There was a problem where emails were getting cloned multiple times for some folks. This is fixed now and no longer occurs. *There was an issue where the single player game type was not being properly cleared for folks when they left single player and went to other games. This is fixed now. *A stray underground generator was removed from Caldera. *The name column will no longer jump to the top when folks leave and join a room, thus making it easier to stay focused on a particular player's name. *If you steal a vehicle, the vehicle's sensor radius will not switch to the stealing player's team. In otherwords, the sensor of the vehicle will still report to the original team's sensor net...not the team that stole the vehicle. That's as design and is one of the drawbacks of using a stolen vehicle. *Bounty & Hunter: The player icons on the command maps are now the correct colors. *More items have correct names and tags on the command map and in the HUD. There were instances like "East Generator Generator". Those have been eliminated. *The last patch accidentally eliminated the "PlayerXXX joined YYYY game. Click here to join." links from the CHAT. This has been resolved and is now available again. *Players are no longer able to squeeze in under the tires of vehicles and play Superman by lifting them off the ground. ; ) *Bots were getting stuck in Riverdance when the fell in the water near the bridge. This has been fixed. *Added more filtering options so that the filters for the server query (JOIN) screen are more powerful and flexible. *Added a Linux indicator so users can tell whether they are joining a Win32 or Linux server. (Shouldn't make any difference to game play, but we felt you'd like to know.) *Fixed a small texture leak on 3Space objects. *Added an underwater satchel charge effect. Slightly increased the delay time between activating the satchel and the time that it actually explodes (this was as designed...a minor bug was causing it to explode too soon).
2017-07-17 23:07:50 -04:00
%this.cacheFile = "email1";
2017-07-17 22:51:48 -04:00
%this.messageCount = %file.readLine();
while( !%file.isEOF() )
{
%line = %file.readLine();
%id = firstWord( %line );
%msg = collapseEscape( restWords( %line ) );
$EmailNextSeq = %id;
EMailMessageVector.pushBackLine(%msg, %id);
}
%file.close();
}
}
}
else if ( %file.openForRead( %fileName ) )
{
%guid = %file.readLine();
%this.messageCount = %file.readLine();
while( !%file.isEOF() )
{
%line = %file.readLine();
%id = firstWord( %line );
%msg = collapseEscape( restWords( %line ) );
$EmailNextSeq = %id;
EMailMessageVector.pushBackLine(%msg, %id);
}
%file.close();
}
%file.delete();
%this.cacheLoaded = true;
}
//-----------------------------------------------------------------------------
function EmailGui::outputVector(%this)
{
for(%i = 0; %i < EmailMessageVector.getNumLines(); %i++)
EmailMessageAddRow(EmailMessageVector.getLineText(%i),
EmailMessageVector.getLineTag(%i));
EM_Browser.setSelectedRow( 0 );
}
//-----------------------------------------------------------------------------
function EmailGui::loadCache( %this )
{
EM_Browser.clear();
EMailMessageVector.clear();
EMailInboxBodyText.setText("");
v22337 (04/13/01): **SIEGE GAMEPLAY CHANGE**: When attacking a base, you will see red waypoints on the generators. When those generators are destroyed, the waypoints will change to green. If the generators are repaired thereafter, they will return to red. If you are on the defender team, these colors are reversed (green normally, red if destroyed, green if repaired again). This will help teams coordinate attack and defense more easily. **FLARE GREANDE GAMEPLAY CHANGE**: Each flare will only attract ONE missile now. When the missile hits the flare, the flare will be destroyed. Only the first missile fired after the flare is thrown will be fooled by that flare. Other missiles must be attracted by other flares in order to be avoided. *There was a problem where emails were getting cloned multiple times for some folks. This is fixed now and no longer occurs. *There was an issue where the single player game type was not being properly cleared for folks when they left single player and went to other games. This is fixed now. *A stray underground generator was removed from Caldera. *The name column will no longer jump to the top when folks leave and join a room, thus making it easier to stay focused on a particular player's name. *If you steal a vehicle, the vehicle's sensor radius will not switch to the stealing player's team. In otherwords, the sensor of the vehicle will still report to the original team's sensor net...not the team that stole the vehicle. That's as design and is one of the drawbacks of using a stolen vehicle. *Bounty & Hunter: The player icons on the command maps are now the correct colors. *More items have correct names and tags on the command map and in the HUD. There were instances like "East Generator Generator". Those have been eliminated. *The last patch accidentally eliminated the "PlayerXXX joined YYYY game. Click here to join." links from the CHAT. This has been resolved and is now available again. *Players are no longer able to squeeze in under the tires of vehicles and play Superman by lifting them off the ground. ; ) *Bots were getting stuck in Riverdance when the fell in the water near the bridge. This has been fixed. *Added more filtering options so that the filters for the server query (JOIN) screen are more powerful and flexible. *Added a Linux indicator so users can tell whether they are joining a Win32 or Linux server. (Shouldn't make any difference to game play, but we felt you'd like to know.) *Fixed a small texture leak on 3Space objects. *Added an underwater satchel charge effect. Slightly increased the delay time between activating the satchel and the time that it actually explodes (this was as designed...a minor bug was causing it to explode too soon).
2017-07-17 23:07:50 -04:00
%fileName = $EmailCachePath @ "email1";
2017-07-17 22:51:48 -04:00
%file = new FileObject();
if ( %this.cacheFile $= "" )
{
if ( %file.openForRead( %fileName ) )
{
%guid = %file.readLine();
if ( %guid $= getField( WonGetAuthInfo(), 3 ) )
{
// This is the right one!
v22337 (04/13/01): **SIEGE GAMEPLAY CHANGE**: When attacking a base, you will see red waypoints on the generators. When those generators are destroyed, the waypoints will change to green. If the generators are repaired thereafter, they will return to red. If you are on the defender team, these colors are reversed (green normally, red if destroyed, green if repaired again). This will help teams coordinate attack and defense more easily. **FLARE GREANDE GAMEPLAY CHANGE**: Each flare will only attract ONE missile now. When the missile hits the flare, the flare will be destroyed. Only the first missile fired after the flare is thrown will be fooled by that flare. Other missiles must be attracted by other flares in order to be avoided. *There was a problem where emails were getting cloned multiple times for some folks. This is fixed now and no longer occurs. *There was an issue where the single player game type was not being properly cleared for folks when they left single player and went to other games. This is fixed now. *A stray underground generator was removed from Caldera. *The name column will no longer jump to the top when folks leave and join a room, thus making it easier to stay focused on a particular player's name. *If you steal a vehicle, the vehicle's sensor radius will not switch to the stealing player's team. In otherwords, the sensor of the vehicle will still report to the original team's sensor net...not the team that stole the vehicle. That's as design and is one of the drawbacks of using a stolen vehicle. *Bounty & Hunter: The player icons on the command maps are now the correct colors. *More items have correct names and tags on the command map and in the HUD. There were instances like "East Generator Generator". Those have been eliminated. *The last patch accidentally eliminated the "PlayerXXX joined YYYY game. Click here to join." links from the CHAT. This has been resolved and is now available again. *Players are no longer able to squeeze in under the tires of vehicles and play Superman by lifting them off the ground. ; ) *Bots were getting stuck in Riverdance when the fell in the water near the bridge. This has been fixed. *Added more filtering options so that the filters for the server query (JOIN) screen are more powerful and flexible. *Added a Linux indicator so users can tell whether they are joining a Win32 or Linux server. (Shouldn't make any difference to game play, but we felt you'd like to know.) *Fixed a small texture leak on 3Space objects. *Added an underwater satchel charge effect. Slightly increased the delay time between activating the satchel and the time that it actually explodes (this was as designed...a minor bug was causing it to explode too soon).
2017-07-17 23:07:50 -04:00
%this.cacheFile = "email1";
2017-07-17 22:51:48 -04:00
%this.messageCount = %file.readLine();
while( !%file.isEOF() )
{
%line = %file.readLine();
%id = firstWord( %line );
%msg = collapseEscape( restWords( %line ) );
EmailNewMessageArrived( %msg, %id );
}
%file.close();
}
}
}
else if ( %file.openForRead( %fileName ) )
{
%guid = %file.readLine();
%this.messageCount = %file.readLine();
while( !%file.isEOF() )
{
%line = %file.readLine();
%id = firstWord( %line );
%msg = collapseEscape( restWords( %line ) );
EmailNewMessageArrived( %msg, %id );
}
%file.close();
}
%file.delete();
%this.cacheLoaded = true;
}
//-----------------------------------------------------------------------------
function EmailGui::dumpCache( %this )
{
%guid = getField( WONGetAuthInfo(), 3 );
v22337 (04/13/01): **SIEGE GAMEPLAY CHANGE**: When attacking a base, you will see red waypoints on the generators. When those generators are destroyed, the waypoints will change to green. If the generators are repaired thereafter, they will return to red. If you are on the defender team, these colors are reversed (green normally, red if destroyed, green if repaired again). This will help teams coordinate attack and defense more easily. **FLARE GREANDE GAMEPLAY CHANGE**: Each flare will only attract ONE missile now. When the missile hits the flare, the flare will be destroyed. Only the first missile fired after the flare is thrown will be fooled by that flare. Other missiles must be attracted by other flares in order to be avoided. *There was a problem where emails were getting cloned multiple times for some folks. This is fixed now and no longer occurs. *There was an issue where the single player game type was not being properly cleared for folks when they left single player and went to other games. This is fixed now. *A stray underground generator was removed from Caldera. *The name column will no longer jump to the top when folks leave and join a room, thus making it easier to stay focused on a particular player's name. *If you steal a vehicle, the vehicle's sensor radius will not switch to the stealing player's team. In otherwords, the sensor of the vehicle will still report to the original team's sensor net...not the team that stole the vehicle. That's as design and is one of the drawbacks of using a stolen vehicle. *Bounty & Hunter: The player icons on the command maps are now the correct colors. *More items have correct names and tags on the command map and in the HUD. There were instances like "East Generator Generator". Those have been eliminated. *The last patch accidentally eliminated the "PlayerXXX joined YYYY game. Click here to join." links from the CHAT. This has been resolved and is now available again. *Players are no longer able to squeeze in under the tires of vehicles and play Superman by lifting them off the ground. ; ) *Bots were getting stuck in Riverdance when the fell in the water near the bridge. This has been fixed. *Added more filtering options so that the filters for the server query (JOIN) screen are more powerful and flexible. *Added a Linux indicator so users can tell whether they are joining a Win32 or Linux server. (Shouldn't make any difference to game play, but we felt you'd like to know.) *Fixed a small texture leak on 3Space objects. *Added an underwater satchel charge effect. Slightly increased the delay time between activating the satchel and the time that it actually explodes (this was as designed...a minor bug was causing it to explode too soon).
2017-07-17 23:07:50 -04:00
if ( %this.cacheFile $= "" ) %this.cacheFile = "email1";
2017-07-17 22:51:48 -04:00
EmailMessageVector.dump( $EmailCachePath @ %this.cacheFile, %guid );
}
//-----------------------------------------------------------------------------
function EmailGui::onSleep( %this )
{
v22228 (04/06/01): * Fixed a problem that could have caused texture leaking in the interiors * Fixed an AI problem in Training 2 * Chinese "simplified" keyboard supported * Korean keyboard supported * A bug where infinite ammo could be gained by tossing the ammo was prevented. * Fixed a problem in Training 2 where a waypoint wouldn't update properly. * Thundersword and Havoc hold steady now when players try to jump in so they don't invert and detonate. * CD is now required in the drive for on-line play. * Scoring has been fixed so that it isn't blanked any longer if the admin changes the time limit during a game. * Active server queries will be cancelled now when you join a game (loads game faster now). * If standing in an inventory station when it is destroyed you no longer permanently lose weapons. * Fixed two issues that *could* cause crashes. * Fixed a problem where the bombardier could create a permanent targeting laser. * Cleaned up Chat text to remove programming characters. * Fixed "highlight text with my nick" option so it saves preference to file correctly. * Made MPB able to climb hills more easily and reduced damage from impact with the ground. * Added button to stop server queries in progress on "JOIN" screen. * Observers can now only chat with other observers (no one else can hear them). * Made deployable inv stations have smaller trigger so they don't "suck you in" from so far away. * Bots will now claim switches in CnH more accurately. * Added a "max distance" ring for sensors on the commander map so players can more accurately assess how well they placed the sensor in relation to how much area it is actually sensing. * Added a "ding" sound when you have filled up a text buffer so that you know why your text isn't showing up. * Fixed Chat HUD so that page up/page down works better. * Fixed a situation where Heavies could end up being permanently cloaked. * The MPBs on the "Alcatraz" map now deploy correctly (Siege map). * The "edited post" date stamp now works correctly. * If you jump into a vehicle while zoomed in, the zoom will reset correctly therafter now. * The Score Screen (F2) is now available while in a vehicle. * You can now vote to kick observers, if desired. * The ELF turret is fixed so it no longer fires at players when destroyed (an intermittent bug) * Some console spam associated with the Wildcat has been removed. * There was a situation where a player could die twice if he fell out of bounds. That has been resolved. * Screen resolution information should update properly now when restarting the application. * The camera should no longer be able to dip below terrain when in third person mode.
2017-07-17 23:05:21 -04:00
// EMailGui.checkingEMail = false;
// %this.checkSchedule = schedule(1000 * 0 * 1, 0, CheckEmail, true);
2017-07-17 22:51:48 -04:00
Canvas.popDialog( LaunchToolbarDlg );
}
//-----------------------------------------------------------------------------
function EMailGui::getEmail(%this,%fromSchedule)
{
checkEmail(%fromSchedule);
}
//-----------------------------------------------------------------------------
function EmailGui::setKey( %this, %key )
{
}
//-- EM_Browser --------------------------------------------------------------
function EM_Browser::onAdd( %this )
{
// Add the columns with widths from the prefs:
for ( %i = 0; %i < $EmailColumnCount; %i++ )
%this.addColumn( %i, $EmailColumnName[%i], $pref::Email::Column[%i], firstWord( $EmailColumnRange[%i] ), getWord( $EmailColumnRange[%i], 1 ) );
%this.setSortColumn( $pref::Email::SortColumnKey );
%this.setSortIncreasing( $pref::Email::SortInc );
}
//-----------------------------------------------------------------------------
function EM_Browser::onSelect( %this, %id )
{
%text = EmailMessageVector.getLineTextByTag(%id);
if(rbinbox.getValue())
{
if(!getRecord(%text, 2)) // read flag
{
%line = EmailMessageVector.getLineIndexByTag(%id);
%text = setRecord(%text, 2, 1);
DatabaseQuery(7, %id);
// Update the GUI:
%this.setRowFlags( %id, 1 );
EmailMessageVector.deleteLine(%line);
EmailMessageVector.insertLine(%line, %text, %id);
EmailGui.dumpCache();
}
}
EmailInboxBodyText.setValue(EmailGetTextDisplay(%text));
EM_ReplyBtn.setActive( true );
EM_ReplyToAllBtn.setActive( true );
EM_ForwardBtn.setActive( true );
EM_DeleteBtn.setActive( true );
EM_BlockBtn.setActive( true );
}
//-----------------------------------------------------------------------------
function EM_Browser::onSetSortKey( %this, %sortKey, %isIncreasing )
{
$pref::Email::SortColumnKey = %sortKey;
$pref::Email::SortInc = %isIncreasing;
}
//-----------------------------------------------------------------------------
function EM_Browser::onColumnResize( %this, %column, %newSize )
{
$pref::Email::Column[%column] = %newSize;
}