Posted October 26, 2016 sigh.... Pls fix that. com.wurmonline.server.creatures.Offspring static String generateMaleName() final int num = Server.rand.nextInt(100); if (num == 100) { return Offspring.MALE_NAMES[Server.rand.nextInt(Offspring.MALE_NAMES.length)]; } static String generateFemaleName() final int num = Server.rand.nextInt(100); if (num == 100) { return Offspring.FEMALE_NAMES[Server.rand.nextInt(Offspring.FEMALE_NAMES.length)]; } Share this post Link to post Share on other sites
Posted October 26, 2016 (edited) For us dumb arses that dont code, what is wrong? Edited October 27, 2016 by Pandalet Spelling correction 1 Share this post Link to post Share on other sites
Posted October 27, 2016 (edited) Documentation: The nextInt(int n) method is used to get a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence. Note the Exclusive notation. Reading: final int num = Server.rand.nextInt(100); Will pick a number from 0 to 99. So its imposible that this ever be reached: if (num == 100) { return Offspring.MALE_NAMES[Server.rand.nextInt(Offspring.MALE_NAMES.length)]; } Edited October 27, 2016 by luvable removed hidden post quoted 1 Share this post Link to post Share on other sites
Posted October 28, 2016 This is something I see a quite a bit. There's a lot of "bloat" code in the game right now. int item = 795 + Server.rand.nextInt(16); if (item == 1009) { item = 807; } else if (item == 805) { item = 808; } Share this post Link to post Share on other sites
Posted November 22, 2016 Offspring naming issue should be fixed with today's update http://forum.wurmonline.com/index.php?/topic/147250-wurm-online-13-update-patch-notes-22nov16/ Share this post Link to post Share on other sites