forked from Da-Teach/Questor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bugged scheduler, reverted to traditional command line.
Added Ganondorf's fitting code, modified to use char xml files instead of mission files.
- Loading branch information
Showing
16 changed files
with
459 additions
and
203 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
// ------------------------------------------------------------------------------ | ||
// <copyright from='2010' to='2015' company='THEHACKERWITHIN.COM'> | ||
// Copyright (c) TheHackerWithin.COM. All Rights Reserved. | ||
// | ||
// Please look in the accompanying license.htm file for the license that | ||
// applies to this source code. (a copy can also be found at: | ||
// http://www.thehackerwithin.com/license.htm) | ||
// </copyright> | ||
// ------------------------------------------------------------------------------- | ||
|
||
|
||
namespace Questor.Modules | ||
{ | ||
using System.Xml.Linq; | ||
using System.Globalization; | ||
using Questor.Modules; | ||
using System; | ||
//using System.Windows.Forms; | ||
|
||
public class CharSchedule | ||
{ | ||
public CharSchedule(XElement element) | ||
{ | ||
CultureInfo enUS = new CultureInfo("en-US"); | ||
User = (string)element.Attribute("user"); | ||
PW = (string)element.Attribute("pw"); | ||
Name = (string)element.Attribute("name"); | ||
|
||
stopTimeSpecified = false; | ||
startTimeSpecified = false; | ||
string _start = (string)element.Attribute("start"); | ||
string _stop = (string)element.Attribute("stop"); | ||
DateTime _startTime = new DateTime(); | ||
DateTime _stopTime = new DateTime(); | ||
if (_start != null) | ||
{ | ||
if (!DateTime.TryParseExact(_start, "HH:mm", enUS, DateTimeStyles.None, out _startTime)) | ||
{ | ||
Logging.Log("[CharSchedule] Couldn't parse starttime. Starting now."); | ||
_startTime = DateTime.Now; | ||
} | ||
else | ||
startTimeSpecified = true; | ||
} | ||
else | ||
{ | ||
Logging.Log("[CharSchedule] No start time specified. Starting now."); | ||
_startTime = DateTime.Now; | ||
} | ||
Start = _startTime; | ||
|
||
if (_stop != null) | ||
{ | ||
if (!DateTime.TryParseExact(_stop, "HH:mm", enUS, DateTimeStyles.None, out _stopTime)) | ||
{ | ||
Logging.Log("[CharSchedule] Couldn't parse stoptime."); | ||
_stopTime = DateTime.Now.AddHours(24); | ||
} | ||
else | ||
stopTimeSpecified = true; | ||
} | ||
else | ||
{ | ||
Logging.Log("[CharSchedule] No stop time specified."); | ||
_stopTime = DateTime.Now.AddHours(24); | ||
} | ||
Stop = _stopTime; | ||
|
||
if ((string)element.Attribute("runtime") != null) | ||
{ | ||
RunTime = (double)element.Attribute("runtime"); | ||
stopTimeSpecified = true; | ||
} | ||
else | ||
RunTime = -1; | ||
} | ||
|
||
|
||
|
||
public string User { get; private set; } | ||
public string PW { get; private set; } | ||
public string Name { get; private set; } | ||
public DateTime Start { get; set; } | ||
public DateTime Stop { get; set; } | ||
public double RunTime { get; set; } | ||
public bool stopTimeSpecified { get; set; } | ||
public bool startTimeSpecified { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// ------------------------------------------------------------------------------ | ||
// <copyright from='2010' to='2015' company='THEHACKERWITHIN.COM'> | ||
// Copyright (c) TheHackerWithin.COM. All Rights Reserved. | ||
// | ||
// Please look in the accompanying license.htm file for the license that | ||
// applies to this source code. (a copy can also be found at: | ||
// http://www.thehackerwithin.com/license.htm) | ||
// </copyright> | ||
// ------------------------------------------------------------------------------- | ||
namespace Questor.Modules | ||
{ | ||
using System; | ||
using System.Xml.Linq; | ||
|
||
public class FactionFitting | ||
{ | ||
public FactionFitting() | ||
{ | ||
} | ||
|
||
public FactionFitting(XElement factionfitting) | ||
{ | ||
Faction = (string)factionfitting.Attribute("faction") ?? ""; | ||
Fitting = (string)factionfitting.Attribute("fitting") ?? ""; | ||
} | ||
|
||
public string Faction { get; private set; } | ||
public string Fitting { get; private set; } | ||
} | ||
|
||
public class MissionFitting | ||
{ | ||
public MissionFitting() | ||
{ | ||
} | ||
|
||
public MissionFitting(XElement missionfitting) | ||
{ | ||
Mission = (string)missionfitting.Attribute("mission") ?? ""; | ||
Faction = (string)missionfitting.Attribute("faction") ?? "Default"; | ||
Fitting = (string)missionfitting.Attribute("fitting") ?? ""; | ||
} | ||
|
||
public string Mission { get; private set; } | ||
public string Faction { get; private set; } | ||
public string Fitting { get; private set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.