Mercurial > mm7
changeset 2267:6532bbac1a9e
Слияние
author | Ritor1 |
---|---|
date | Sat, 08 Mar 2014 23:53:09 +0600 |
parents | 01489aec3cb0 (current diff) 3d644efae786 (diff) |
children | fd788d2e9585 |
files | |
diffstat | 1 files changed, 13 insertions(+), 67 deletions(-) [+] |
line wrap: on
line diff
--- a/Items.cpp Sat Mar 08 23:53:00 2014 +0600 +++ b/Items.cpp Sat Mar 08 23:53:09 2014 +0600 @@ -373,13 +373,8 @@ materialMap["special"] = MATERIAL_SPECIAL; int i,j; - char* test_string; - unsigned char c; - bool break_loop; - unsigned int temp_str_len; - char* tmp_pos; - int decode_step; - int item_counter; + char* test_string; + int item_counter; pMapStats = new MapStats; pMapStats->Initialize(); @@ -455,9 +450,9 @@ Assert(tokens.size() >= 17, "Invalid number of tokens"); pSpecialEnchantments[i].pBonusStatement=RemoveQuotes(tokens[0]); pSpecialEnchantments[i].pNameAdd= RemoveQuotes(tokens[1]); - for (int i = 0; i < 12; i++) + for (int j = 0; j < 12; j++) { - pSpecialEnchantments[i].to_item_apply[i]=atoi(tokens[i+2]); + pSpecialEnchantments[i].to_item_apply[j]=atoi(tokens[j+2]); } int res; res=atoi(tokens[14]); @@ -476,7 +471,7 @@ memset(&pSpecialEnchantmentsSumm, 0, 96); for(i=0;i<12;++i) { - for (j=0;j<=pSpecialEnchantments_count;++j) + for (unsigned int j=0;j<=pSpecialEnchantments_count;++j) pSpecialEnchantmentsSumm[i]+=pSpecialEnchantments[j].to_item_apply[i]; } @@ -500,7 +495,7 @@ auto findResult = equipStatMap.find(tokens[4]); pItems[item_counter].uEquipType = findResult == equipStatMap.end() ? EQUIP_NONE : findResult->second; auto findResult2 = equipSkillMap.find(tokens[5]); - pItems[item_counter].uSkillType = findResult2 == equipSkillMap.end() ? PLAYER_SKILL_MISC : findResult->second; + pItems[item_counter].uSkillType = findResult2 == equipSkillMap.end() ? PLAYER_SKILL_MISC : findResult2->second; auto tokens2 = Tokenize(tokens[6], 'd'); if (tokens2.size() == 2) { @@ -519,7 +514,7 @@ } pItems[item_counter].uDamageMod=atoi(tokens[7]); auto findResult3 = materialMap.find(tokens[8]); - pItems[item_counter].uSkillType = findResult3 == materialMap.end() ? MATERIAL_COMMON : findResult->second; + pItems[item_counter].uMaterial = findResult3 == materialMap.end() ? MATERIAL_COMMON : findResult->second; pItems[item_counter].uItemID_Rep_St=atoi(tokens[9]); pItems[item_counter].pUnidentifiedName = RemoveQuotes(tokens[10]); pItems[item_counter].uSpriteID=atoi(tokens[11]); @@ -1043,62 +1038,28 @@ ItemsTable *v5; // edi@1 int v6; // ebx@3 - int *v7; // ecx@33 + //int *v7; // ecx@33 //int v8; // eax@34 //int v9; // eax@39 int current_chance; // ebx@43 int tmp_chance; // ecx@47 - unsigned int *v12; // edx@48 - unsigned int v13; // eax@49 - signed int v14; // ebx@52 - int v15; // eax@53 - signed int v16; // eax@55 int v17; // ebx@57 int v18; // edx@62 - signed int v19; // ebx@70 - unsigned __int8 v20; // al@81 - int v21; // eax@84 - int v22; // ebx@85 - int v23; // eax@86 - int v24; // ebx@86 - int special_chance; // edx@86 - int v26; // edx@89 + unsigned int special_chance; // edx@86 + unsigned int v26; // edx@89 unsigned int v27; // eax@89 - int i; // ebx@89 - unsigned int v29; // ecx@90 - int v30; // ebx@91 - int v31; // eax@91 int v32; // ecx@91 int v33; // eax@91 - int v34; // eax@97 - unsigned __int8 v35; // sf@97 - unsigned __int8 v36; // of@97 - int v37; // ebx@98 - int v38; // edx@99 - signed int v39; // ebx@101 - int v40; // ecx@102 - char v41; // zf@107 - char v42; // al@108 - char v43; // al@111 - int *v44; // edx@118 + unsigned int v34; // eax@97 int v45; // eax@120 int v46; // edx@120 int j; // eax@121 - unsigned int v48; // ecx@123 - int v49; // eax@123 - int v50; // eax@123 int val_list[800]; // [sp+Ch] [bp-C88h]@33 int total_chance; // [sp+C8Ch] [bp-8h]@33 - int v53; // [sp+C90h] [bp-4h]@1 int v54; // [sp+C9Ch] [bp+8h]@3 //int v55; // [sp+CA0h] [bp+Ch]@34 signed int v56; // [sp+CA0h] [bp+Ch]@55 int v57; // [sp+CA0h] [bp+Ch]@62 - int *v58; // [sp+CA0h] [bp+Ch]@102 - int v59; // [sp+CA0h] [bp+Ch]@123 - //signed int a2a; // [sp+CA4h] [bp+10h]@33 - int a2b; // [sp+CA4h] [bp+10h]@101 - int a2c; // [sp+CA4h] [bp+10h]@120 v5 = this; if (!out_item) @@ -1270,7 +1231,7 @@ case EQUIP_BOW : if ( !uBonusChanceWpSpecial[v6] ) return; - if ((rand() % 100)>=uBonusChanceWpSpecial[v6]) + if ((uint)(rand() % 100)>=uBonusChanceWpSpecial[v6]) return; break; case EQUIP_ARMOUR : @@ -1327,7 +1288,7 @@ int spc_sum=0; int spc; memset(&val_list, 0, 3200); - for (int i=0; i<pSpecialEnchantments_count;++i) + for (unsigned int i=0; i<pSpecialEnchantments_count;++i) { int tr_lv= pSpecialEnchantments[i].iTreasureLevel; switch ( treasure_level - 1 ) @@ -2034,29 +1995,18 @@ void GenerateItemsInChest() { unsigned int v0; // eax@1 - Chest *v1; // ebx@1 MapInfo *v2; // esi@1 ItemGen *v3; // ebx@2 int v4; // ebp@4 int v5; // edi@4 int v6; // esi@4 - int v7; // eax@4 signed int v8; // esi@4 int v9; // edx@4 int v10; // esi@8 int v11; // ebp@25 int v12; // esi@25 - signed int v13; // ebp@27 ItemGen *v14; // edi@28 - signed int v15; // edx@32 - signed __int64 v16; // qtt@32 - int v17; // esi@34 signed int v18; // [sp+10h] [bp-18h]@1 - int v19; // [sp+14h] [bp-14h]@4 - MapInfo *v20; // [sp+18h] [bp-10h]@1 - Chest *v21; // [sp+1Ch] [bp-Ch]@1 - int v22; // [sp+20h] [bp-8h]@26 - signed int v23; // [sp+24h] [bp-4h]@2 v18 = rand() % 100; //main random v0 = pMapStats->GetMapInfo(pCurrentMapName); @@ -2359,10 +2309,6 @@ { int result; // eax@2 char v5; // zf@3 - const char *v6; // [sp-Ch] [bp-18h]@88 - signed int v7; // [sp-8h] [bp-14h]@61 - int v8; // [sp-4h] [bp-10h]@61 - signed int v9; // [sp-4h] [bp-10h]@69 result = 0; //BUG fn is void if ( item_id <= 500 )