Exemplo n.º 1
0
 // Offline timer tick event
 public void offlineAllocatorTick(object sender, ElapsedEventArgs e)
 {
     if (Common.StreamRefresher.isOnline())
     {
         offlineAllocator.Stop();
         onlineAllocator.Start();
     }
     if (!WebCalls.distibuteDoubloons(1).Result)
     {
         Common.ChatClient.SendMessage("Failed to distributre doubloons.");
     }
 }
Exemplo n.º 2
0
        private void postRaid()
        {
            if (postRaidFired)
            {
                return;
            }
            else
            {
                postRaidFired = true;
            }
            if (participants.Count != 0)
            {
                Common.RaidClient.Disconnect();
                if (boarders.Count == 0 || gunners.Count == 0)
                {
                    Common.ChatClient.SendMessage(string.Format("The raid has ended! There were {0} ( R) ) boarders and {1} ( burkeShip burkeFire burkeFire ) gunners!! In total, there were {2} participants in this raid, with boarder {3} and gunner {4} leading the charge! Your doubloon counts will be updated shortly!", boarders.Count, gunners.Count, participants.Count, boarders[0], gunners[0]), Common.DryRun);
                }
                else
                {
                    Common.ChatClient.SendMessage(string.Format("The raid has ended! There were {0} ( R) ) boarders and {1} ( burkeShip burkeFire burkeFire ) gunners!! In total, there were {2} participants in this raid! Your doubloon counts will be updated shortly!", boarders.Count, gunners.Count, participants.Count), Common.DryRun);
                }

                if (WebCalls.distibuteDoubloons(participants.Count).Result)
                {
                    Common.ChatClient.SendMessage("[Auto] Doubloon counts updated successfully!");
                }
                else
                {
                    Common.ChatClient.SendMessage("[Auto] Doubloon counts FAILED TO UPDATE");
                }
            }
            else
            {
                Common.ChatClient.SendMessage("No one participated in the raid! :(", Common.DryRun);
            }
        }