Mercurial > mm7
comparison mm7_2.cpp @ 436:4a42c2f97aa2
some itemgen crashes fixed
author | Gloval |
---|---|
date | Sun, 24 Feb 2013 10:13:00 +0400 |
parents | 137c59c3dbc4 |
children | 17c90e543e28 |
comparison
equal
deleted
inserted
replaced
435:4f451a616d3d | 436:4a42c2f97aa2 |
---|---|
7909 v2 = a1; | 7909 v2 = a1; |
7910 v3 = a2; | 7910 v3 = a2; |
7911 v4 = rand(); | 7911 v4 = rand(); |
7912 v34 = 0; | 7912 v34 = 0; |
7913 v5 = v4 % 100; | 7913 v5 = v4 % 100; |
7914 v6 = 2 * (v2->Treasure_prob + 7 * v3->uIndex) - 14; | 7914 // v6 = 2 * (v2->Treasure_prob + 7 * v3->uIndex) - 14; |
7915 v7 = (unsigned __int8)byte_4E8168[v6 + 16]; | 7915 v7 = (unsigned __int8)byte_4E8168[v3->uIndex-1][2*v2->Treasure_prob]; |
7916 v8 = (unsigned __int8)byte_4E8168[v6 + 17]; | 7916 v8 = (unsigned __int8)byte_4E8168[v3->uIndex-1][2*v2->Treasure_prob+1]; |
7917 v32 = v5; | 7917 v32 = v5; |
7918 v33 = v7; | 7918 v33 = v7; |
7919 v9 = rand(); | 7919 v9 = rand(); |
7920 v10 = v8 - v33 + 1; | 7920 v10 = v8 - v33 + 1; |
7921 v12 = v9; | 7921 v12 = v9; |
8087 do | 8087 do |
8088 { | 8088 { |
8089 if ( (v3->uItemID & 0x80000000u) == 0 ) | 8089 if ( (v3->uItemID & 0x80000000u) == 0 ) |
8090 goto LABEL_56; | 8090 goto LABEL_56; |
8091 v4 = rand() % 5 + 1; | 8091 v4 = rand() % 5 + 1; |
8092 v5 = (unsigned __int8)byte_4E8168[2 * (v2->Treasure_prob + 7 * abs((int)v3->uItemID)) + 2]; | 8092 v5 = (unsigned __int8)byte_4E8168[abs((int)v3->uItemID)-1][2*v2->Treasure_prob];//[2 * (v2->Treasure_prob + 7 * abs((int)v3->uItemID)) + 2]; |
8093 v6 = (unsigned __int8)byte_4E8168[2 * (v2->Treasure_prob + 7 * abs((int)v3->uItemID)) + 3]; | 8093 v6 = (unsigned __int8)byte_4E8168[abs((int)v3->uItemID)-1][2*v2->Treasure_prob+1];//[2 * (v2->Treasure_prob + 7 * abs((int)v3->uItemID)) + 3]; |
8094 v7 = rand(); | 8094 v7 = rand(); |
8095 v8 = v6 - v5 + 1; | 8095 v8 = v6 - v5 + 1; |
8096 v9 = v5 + v7 % v8; | 8096 v9 = v5 + v7 % v8; |
8097 v19 = v5 + v7 % v8; | 8097 v19 = v5 + v7 % v8; |
8098 if ( v9 < 7 ) | 8098 if ( v9 < 7 ) |