- random items can also be results of merges and item transformations

- removed a few instances of incorrect random item spawning

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5598 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2012-10-01 20:42:55 +00:00
parent 7ef76bbe35
commit fc49b33398
3 changed files with 38 additions and 4 deletions
+4 -1
View File
@@ -1328,10 +1328,13 @@ OBJECTTYPE& OBJECTTYPE::operator=(const OLD_OBJECTTYPE_101& src)
}
// Flugente: random items
UINT16 newitemfromrandom = 0;
UINT16 newitemfromrandom = NONE;
if ( GetItemFromRandomItem(src.usItem, &newitemfromrandom) )
this->usItem = newitemfromrandom;
if ( Item[this->usItem].randomitem > 0 )
this->usItem = NONE;
//and now the big change, the union
//copy the old data, making sure not to write over, since the old size is actually 9 bytes
if (ubNumberOfObjects == 1) {