mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-10 07:05:41 +12:00
Re-Time Every Event.
This commit is contained in:
parent
b5ae6946a9
commit
d7e350fef6
2 changed files with 16 additions and 6 deletions
|
@ -22,6 +22,7 @@ namespace HISP.Game.Events
|
||||||
public string[] Answers;
|
public string[] Answers;
|
||||||
public bool Active;
|
public bool Active;
|
||||||
public int Reward;
|
public int Reward;
|
||||||
|
public static bool LastWon = false;
|
||||||
private Timer riddleTimeout;
|
private Timer riddleTimeout;
|
||||||
private const int RIDDLE_TIMEOUT = 5;
|
private const int RIDDLE_TIMEOUT = 5;
|
||||||
|
|
||||||
|
@ -58,6 +59,8 @@ namespace HISP.Game.Events
|
||||||
if (Database.HasPlayerCompletedRealTimeRiddle(RiddleId, winner.Id))
|
if (Database.HasPlayerCompletedRealTimeRiddle(RiddleId, winner.Id))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
LastWon = true;
|
||||||
|
|
||||||
Database.CompleteRealTimeRiddle(RiddleId, winner.Id);
|
Database.CompleteRealTimeRiddle(RiddleId, winner.Id);
|
||||||
|
|
||||||
winner.TrackedItems.GetTrackedItem(Tracking.TrackableItem.RiddleWin).Count++;
|
winner.TrackedItems.GetTrackedItem(Tracking.TrackableItem.RiddleWin).Count++;
|
||||||
|
@ -97,6 +100,7 @@ namespace HISP.Game.Events
|
||||||
if (client.LoggedIn)
|
if (client.LoggedIn)
|
||||||
client.SendPacket(riddleTimedOutMessage);
|
client.SendPacket(riddleTimedOutMessage);
|
||||||
}
|
}
|
||||||
|
LastWon = false;
|
||||||
EndEvent();
|
EndEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -135,41 +135,47 @@ namespace HISP.Server
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* EVENTS
|
||||||
|
*/
|
||||||
|
|
||||||
// Mods Revenge
|
// Mods Revenge
|
||||||
if(totalMinutesElapsed % (((60*8)+5)+10) == 0)
|
if(totalMinutesElapsed % ((60*8)+15) == 0)
|
||||||
{
|
{
|
||||||
ModsRevengeEvent.StartEvent();
|
ModsRevengeEvent.StartEvent();
|
||||||
}
|
}
|
||||||
// Isle Card Trading Game
|
// Isle Card Trading Game
|
||||||
if(totalMinutesElapsed % ((60 + 50)+5) == 0)
|
if(totalMinutesElapsed % (60 *2) == 0)
|
||||||
{
|
{
|
||||||
IsleCardTrading = new IsleCardTradingGame();
|
IsleCardTrading = new IsleCardTradingGame();
|
||||||
IsleCardTrading.StartEvent();
|
IsleCardTrading.StartEvent();
|
||||||
}
|
}
|
||||||
// Water Balloon Game
|
// Water Balloon Game
|
||||||
if(totalMinutesElapsed % ((60 * 2)+5) == 0)
|
if(totalMinutesElapsed % (60 * 2) == 0)
|
||||||
{
|
{
|
||||||
WaterBalloonEvent.StartEvent();
|
WaterBalloonEvent.StartEvent();
|
||||||
}
|
}
|
||||||
// Tack Shop Giveaway
|
// Tack Shop Giveaway
|
||||||
if(totalMinutesElapsed % ((60 * 3)+2) == 0)
|
if(totalMinutesElapsed % ((60 * 3)+5) == 0)
|
||||||
{
|
{
|
||||||
TackShopGiveawayEvent = new TackShopGiveaway();
|
TackShopGiveawayEvent = new TackShopGiveaway();
|
||||||
TackShopGiveawayEvent.StartEvent();
|
TackShopGiveawayEvent.StartEvent();
|
||||||
}
|
}
|
||||||
// Real Time Riddle
|
// Real Time Riddle
|
||||||
if(totalMinutesElapsed % (30) == 0)
|
if(totalMinutesElapsed % (RealTimeRiddle.LastWon ? 20 : 15) == 0)
|
||||||
{
|
{
|
||||||
RiddleEvent = RealTimeRiddle.GetRandomRiddle();
|
RiddleEvent = RealTimeRiddle.GetRandomRiddle();
|
||||||
RiddleEvent.StartEvent();
|
RiddleEvent.StartEvent();
|
||||||
}
|
}
|
||||||
// Real Time Quiz
|
// Real Time Quiz
|
||||||
if(totalMinutesElapsed % ((60 + 15)+5) == 0)
|
if(totalMinutesElapsed % (60 + 30) == 0)
|
||||||
{
|
{
|
||||||
QuizEvent = new RealTimeQuiz();
|
QuizEvent = new RealTimeQuiz();
|
||||||
QuizEvent.StartEvent();
|
QuizEvent.StartEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (totalMinutesElapsed % 60 == 0) // Do spoils
|
if (totalMinutesElapsed % 60 == 0) // Do spoils
|
||||||
{
|
{
|
||||||
foreach (HorseInstance horse in Database.GetMostSpoiledHorses())
|
foreach (HorseInstance horse in Database.GetMostSpoiledHorses())
|
||||||
|
|
Loading…
Add table
Reference in a new issue