Example #1
0
 public void AddNewBounty(Bounty bounty)
 {
     try
     {
         _db.Query("INSERT INTO Bounties (Name, Contractor, Target, Rewards, Hunters, Failures)"
             + " VALUES (@0, @1, @2, @3, @4, @5)",
             bounty.name, bounty.contractor, bounty.target, Utils.TurnRewardsToString(bounty.reward), "", "");
         if (!BH.bounties.Contains(bounty))
             BH.bounties.Add(bounty);
     }
     catch (Exception ex)
     {
         Log.Error(ex.ToString());
     }
 }
Example #2
0
 public void DeleteBounty(Bounty bounty)
 {
     try
     {
         _db.Query("DELETE FROM Bounties WHERE Name = @0", bounty.name);
         BH.bounties.Remove(bounty);
     }
     catch (Exception ex)
     {
         Log.Error(ex.ToString());
     }
 }
Example #3
0
 public void UpdateHunters(Bounty bounty)
 {
     try
     {
         _db.Query("UPDATE Bounties SET Hunters = @0 WHERE Name = @1", String.Join(", ", bounty.hunter), bounty.name);
     }
     catch (Exception ex)
     {
         Log.Error(ex.ToString());
     }
 }