mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-05 09:10:29 +00:00
XEEN: Fixes for initializing blacksmith wares
This commit is contained in:
parent
6f3e8ed396
commit
48a1f37869
@ -1666,20 +1666,15 @@ int Character::makeItem(int p1, int itemIndex, int p3) {
|
||||
rval = vm->getRandomNumber(1, 100);
|
||||
if (rval <= 25) {
|
||||
mult = 0;
|
||||
}
|
||||
else if (rval <= 45) {
|
||||
} else if (rval <= 45) {
|
||||
mult = 1;
|
||||
}
|
||||
else if (rval <= 60) {
|
||||
} else if (rval <= 60) {
|
||||
mult = 2;
|
||||
}
|
||||
else if (rval <= 75) {
|
||||
} else if (rval <= 75) {
|
||||
mult = 3;
|
||||
}
|
||||
else if (rval <= 95) {
|
||||
} else if (rval <= 95) {
|
||||
mult = 4;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
mult = 5;
|
||||
}
|
||||
|
||||
|
@ -1436,11 +1436,11 @@ void Party::resetBlacksmithWares() {
|
||||
|
||||
for (int idx2 = 0; idx2 < 4; ++idx2) {
|
||||
for (int idx3 = 0; idx3 < BLACKSMITH_DATA1[idx2][idx1]; ++idx3) {
|
||||
int itemCat = c.makeItem(idx2, 0, 0);
|
||||
int itemCat = c.makeItem(idx2 + 1, 0, 0);
|
||||
if (catCount[itemCat] < 8) {
|
||||
switch (itemCat) {
|
||||
case 0: {
|
||||
XeenItem &item = _blacksmithWeapons[0][idx2 * 4 + catCount[itemCat]];
|
||||
XeenItem &item = _blacksmithWeapons[0][catCount[itemCat] * 4 + idx1];
|
||||
item._id = c._weapons[0]._id;
|
||||
item._material = c._weapons[0]._material;
|
||||
item._bonusFlags = c._weapons[0]._bonusFlags;
|
||||
@ -1448,7 +1448,7 @@ void Party::resetBlacksmithWares() {
|
||||
}
|
||||
|
||||
case 1: {
|
||||
XeenItem &item = _blacksmithArmor[0][idx2 * 4 + catCount[itemCat]];
|
||||
XeenItem &item = _blacksmithArmor[0][catCount[itemCat] * 4 + idx1];
|
||||
item._id = c._weapons[0]._id;
|
||||
item._material = c._weapons[0]._material;
|
||||
item._bonusFlags = c._weapons[0]._bonusFlags;
|
||||
@ -1456,7 +1456,7 @@ void Party::resetBlacksmithWares() {
|
||||
}
|
||||
|
||||
case 2: {
|
||||
XeenItem &item = _blacksmithAccessories[0][idx2 * 4 + catCount[itemCat]];
|
||||
XeenItem &item = _blacksmithAccessories[0][catCount[itemCat] * 4 + idx1];
|
||||
item._id = c._weapons[0]._id;
|
||||
item._material = c._weapons[0]._material;
|
||||
item._bonusFlags = c._weapons[0]._bonusFlags;
|
||||
@ -1464,7 +1464,7 @@ void Party::resetBlacksmithWares() {
|
||||
}
|
||||
|
||||
case 3: {
|
||||
XeenItem &item = _blacksmithMisc[0][idx2 * 4 + catCount[itemCat]];
|
||||
XeenItem &item = _blacksmithMisc[0][catCount[itemCat] * 4 + idx1];
|
||||
item._id = c._weapons[0]._id;
|
||||
item._material = c._weapons[0]._material;
|
||||
item._bonusFlags = c._weapons[0]._bonusFlags;
|
||||
@ -1490,7 +1490,7 @@ void Party::resetBlacksmithWares() {
|
||||
if (catCount[itemCat] < 8) {
|
||||
switch (itemCat) {
|
||||
case 0: {
|
||||
XeenItem &item = _blacksmithWeapons[1][idx2 * 4 + catCount[itemCat]];
|
||||
XeenItem &item = _blacksmithWeapons[1][catCount[itemCat] * 4 + idx1];
|
||||
item._id = c._weapons[0]._id;
|
||||
item._material = c._weapons[0]._material;
|
||||
item._bonusFlags = c._weapons[0]._bonusFlags;
|
||||
@ -1498,7 +1498,7 @@ void Party::resetBlacksmithWares() {
|
||||
}
|
||||
|
||||
case 1: {
|
||||
XeenItem &item = _blacksmithArmor[1][idx2 * 4 + catCount[itemCat]];
|
||||
XeenItem &item = _blacksmithArmor[1][catCount[itemCat] * 4 + idx1];
|
||||
item._id = c._weapons[0]._id;
|
||||
item._material = c._weapons[0]._material;
|
||||
item._bonusFlags = c._weapons[0]._bonusFlags;
|
||||
@ -1506,7 +1506,7 @@ void Party::resetBlacksmithWares() {
|
||||
}
|
||||
|
||||
case 2: {
|
||||
XeenItem &item = _blacksmithAccessories[1][idx2 * 4 + catCount[itemCat]];
|
||||
XeenItem &item = _blacksmithAccessories[1][catCount[itemCat] * 4 + idx1];
|
||||
item._id = c._weapons[0]._id;
|
||||
item._material = c._weapons[0]._material;
|
||||
item._bonusFlags = c._weapons[0]._bonusFlags;
|
||||
@ -1514,7 +1514,7 @@ void Party::resetBlacksmithWares() {
|
||||
}
|
||||
|
||||
case 3: {
|
||||
XeenItem &item = _blacksmithMisc[1][idx2 * 4 + catCount[itemCat]];
|
||||
XeenItem &item = _blacksmithMisc[1][catCount[itemCat] * 4 + idx1];
|
||||
item._id = c._weapons[0]._id;
|
||||
item._material = c._weapons[0]._material;
|
||||
item._bonusFlags = c._weapons[0]._bonusFlags;
|
||||
|
Loading…
Reference in New Issue
Block a user