Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void FirstDraw(RandomGenerator rnd, ReferenceHub hub/*, MySqlConnection conn*/)
- {
- string rank = ServerStatic.GetPermissionsHandler()._groups.FirstOrDefault(g => g.Value == hub.serverRoles.Group).Key;
- RoleType role = hub.characterClassManager.CurClass;
- if (rank == "VIP" && !_forbiddenTeams.Contains(role))
- {
- //int dropchance = GetDropChance(player, conn);
- var percentage = rnd.Next(0, 100);
- Plugin.Info("1d vip procent: " + percentage);
- if (percentage <= 20)
- {
- SecondDraw(rnd, hub, rank);
- //bool ResetChance = true;
- //RaiseorDeleteDropChance(player, conn, ResetChance);
- }
- else
- {
- //_plugin.Info("Nic " + percentage);
- hub.inventory.AddNewItem(ItemType.Coin);
- //bool ResetChance = false;
- //RaiseorDeleteDropChance(player, conn, ResetChance);
- }
- }
- else if (rank == "SVIP" && !_forbiddenTeams.Contains(role))
- {
- //int dropchance = GetDropChance(player, conn);
- var percentage = _random.Next(0, 100);
- Plugin.Info("1d svip procent: " + percentage);
- //_plugin.Info(percentage + " FirstDraw" + player.Name);
- if (percentage <= 35)
- {
- SecondDraw(rnd, hub, rank);
- //bool ResetChance = true;
- //RaiseorDeleteDropChance(player, conn, ResetChance);
- }
- else
- {
- //_plugin.Info("Nic " + percentage);
- hub.inventory.AddNewItem(ItemType.Coin);
- //bool ResetChance = false;
- //RaiseorDeleteDropChance(player, conn, ResetChance);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement