Re-Time Every Event.

This commit is contained in:
SilicaAndPina 2021-05-12 08:24:39 +12:00
parent b5ae6946a9
commit d7e350fef6
2 changed files with 16 additions and 6 deletions

View file

@ -22,6 +22,7 @@ namespace HISP.Game.Events
public string[] Answers;
public bool Active;
public int Reward;
public static bool LastWon = false;
private Timer riddleTimeout;
private const int RIDDLE_TIMEOUT = 5;
@ -58,6 +59,8 @@ namespace HISP.Game.Events
if (Database.HasPlayerCompletedRealTimeRiddle(RiddleId, winner.Id))
return;
LastWon = true;
Database.CompleteRealTimeRiddle(RiddleId, winner.Id);
winner.TrackedItems.GetTrackedItem(Tracking.TrackableItem.RiddleWin).Count++;
@ -97,6 +100,7 @@ namespace HISP.Game.Events
if (client.LoggedIn)
client.SendPacket(riddleTimedOutMessage);
}
LastWon = false;
EndEvent();
}

View file

@ -135,41 +135,47 @@ namespace HISP.Server
}
}
}
/*
* EVENTS
*/
// Mods Revenge
if(totalMinutesElapsed % (((60*8)+5)+10) == 0)
if(totalMinutesElapsed % ((60*8)+15) == 0)
{
ModsRevengeEvent.StartEvent();
}
// Isle Card Trading Game
if(totalMinutesElapsed % ((60 + 50)+5) == 0)
if(totalMinutesElapsed % (60 *2) == 0)
{
IsleCardTrading = new IsleCardTradingGame();
IsleCardTrading.StartEvent();
}
// Water Balloon Game
if(totalMinutesElapsed % ((60 * 2)+5) == 0)
if(totalMinutesElapsed % (60 * 2) == 0)
{
WaterBalloonEvent.StartEvent();
}
// Tack Shop Giveaway
if(totalMinutesElapsed % ((60 * 3)+2) == 0)
if(totalMinutesElapsed % ((60 * 3)+5) == 0)
{
TackShopGiveawayEvent = new TackShopGiveaway();
TackShopGiveawayEvent.StartEvent();
}
// Real Time Riddle
if(totalMinutesElapsed % (30) == 0)
if(totalMinutesElapsed % (RealTimeRiddle.LastWon ? 20 : 15) == 0)
{
RiddleEvent = RealTimeRiddle.GetRandomRiddle();
RiddleEvent.StartEvent();
}
// Real Time Quiz
if(totalMinutesElapsed % ((60 + 15)+5) == 0)
if(totalMinutesElapsed % (60 + 30) == 0)
{
QuizEvent = new RealTimeQuiz();
QuizEvent.StartEvent();
}
if (totalMinutesElapsed % 60 == 0) // Do spoils
{
foreach (HorseInstance horse in Database.GetMostSpoiledHorses())