Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void setAffixes() {
- int numberAffixes = 5;
- int x1 = rand.nextInt(numberAffixes) + 1;
- int x2 = rand.nextInt(numberAffixes) + 1;
- int x3 = rand.nextInt(numberAffixes) + 1;
- if (quality == 1) {
- setItemAttributes(type, x1);
- }
- if (quality == 2) {
- while (x1 == x2) {
- x2 = rand.nextInt(numberAffixes) + 1;
- }
- setItemAttributes(type, x1);
- setItemAttributes(type, x2);
- }
- if (quality == 3) {
- while (x1 == x2) {
- x2 = rand.nextInt(numberAffixes) + 1;
- }
- while (x3 == x1 || x3 == x2) {
- x3 = rand.nextInt(numberAffixes) + 1;
- }
- setItemAttributes(type, x1);
- setItemAttributes(type, x2);
- setItemAttributes(type, x3);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement