Update Economy.cs

fixed mine display and fish lvl calc
master
Lan 2 years ago
parent f0eadb0a16
commit d1382af0dc
  1. 13
      Kehyeedra3/Commands/Economy.cs

@ -149,7 +149,7 @@ namespace Kehyeedra3.Commands
end += (long)res + 3; end += (long)res + 3;
for (int i = 0; i < 5; i++) for (int i = 0; i < 5; i++)
{ {
if (i < res / 2) if (i < res / 4)
{ {
bonus += $"{ye}"; bonus += $"{ye}";
} }
@ -646,11 +646,12 @@ namespace Kehyeedra3.Commands
} }
while (user.TXp >= user.Xp) while (user.TXp >= user.Xp)
{ {
user.Lvl += 1;
times += 1; times += 1;
lvlXp = 50; lvlXp = 50;
result = user.Lvl.GetLevelXp(); result = user.Lvl.GetLevelXp();
user.Lvl += 1;
lvlXp = result[0]; lvlXp = result[0];
user.FXp = result[1]; user.FXp = result[1];
@ -1156,6 +1157,10 @@ namespace Kehyeedra3.Commands
message += $"**{item.Name}**: **{entry.Value[0]}**\n"; message += $"**{item.Name}**: **{entry.Value[0]}**\n";
} }
} }
if (message == $"")
{
message += "You have no items.";
}
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\n{message}"); await Context.Channel.SendMessageAsync($"{Context.User.Mention}\n{message}");
} }
} }
@ -1438,7 +1443,7 @@ namespace Kehyeedra3.Commands
users.Remove(skuld); users.Remove(skuld);
int placing = 0; int placing = 0;
string leaderboardMessage = "**Top Ten Most Jewish Users**:"; string leaderboardMessage = "**Top Ten Greediest Jews**:";
for (int i = 0; i < 10; i++) for (int i = 0; i < 10; i++)
{ {
placing += 1; placing += 1;
@ -1453,7 +1458,7 @@ namespace Kehyeedra3.Commands
List<Fishing> users; List<Fishing> users;
using (var Database = new ApplicationDbContextFactory().CreateDbContext()) using (var Database = new ApplicationDbContextFactory().CreateDbContext())
{ {
users = Database.Fishing.AsQueryable().OrderByDescending(user => user.TXp).ToList(); users = Database.Fishing.AsQueryable().OrderByDescending(user => user.TXp+(ulong)user.Prestige*500000).ToList();
string leaderboardMessage = "**Top Ten Smelliest Fishermen**:"; string leaderboardMessage = "**Top Ten Smelliest Fishermen**:";
int placing = 0; int placing = 0;
for (int i = 0; i < 10; i++) for (int i = 0; i < 10; i++)

Loading…
Cancel
Save