Mercurial > mm7
diff mm7_6.cpp @ 486:7887a9cf9e7b
Spells
author | Nomad |
---|---|
date | Wed, 27 Feb 2013 17:29:05 +0200 |
parents | 9898e6b413d8 |
children | a3939d5067c4 |
line wrap: on
line diff
--- a/mm7_6.cpp Wed Feb 27 02:26:16 2013 +0400 +++ b/mm7_6.cpp Wed Feb 27 17:29:05 2013 +0200 @@ -2174,17 +2174,17 @@ void _42777D_CastSpell_UseWand_ShootArrow(int a1, unsigned int uPlayerID, unsigned int a4, __int16 a5, int a6) { //bool result; // eax@2 - __int16 v6; // bx@4 + //__int16 v6; // bx@4 //Player *v7; // eax@4 - char v8; // zf@12 + //char v8; // zf@12 unsigned __int16 v9; // cx@16 unsigned int v10; // eax@18 unsigned __int8 v11; // sf@18 unsigned __int8 v12; // of@18 unsigned __int16 v13; // cx@21 unsigned int v14; // eax@23 - stru277 *v15; // esi@27 - stru277 *v16; // eax@28 + //stru277 *v15; // esi@27 + //stru277 *v16; // eax@28 GUIWindow *v17; // eax@43 GUIWindow *v18; // [sp-30h] [bp-48h]@44 unsigned int v19; // [sp-2Ch] [bp-44h]@44 @@ -2198,11 +2198,11 @@ unsigned __int8 v27; // [sp-Ch] [bp-24h]@43 char *v28; // [sp-8h] [bp-20h]@43 Texture *v29; // [sp-4h] [bp-1Ch]@43 - __int16 a3a; // [sp+10h] [bp-8h]@1 - __int16 a2a; // [sp+14h] [bp-4h]@1 - - a3a = uPlayerID; - a2a = a1; + //__int16 a3a; // [sp+10h] [bp-8h]@1 + //__int16 a2a; // [sp+14h] [bp-4h]@1 + + //a3a = uPlayerID; + //a2a = a1; //if ( pParty->bTurnBasedModeOn != 1 // || (result = pTurnEngine->field_4, pTurnEngine->field_4 != 1) && pTurnEngine->field_4 != 3 ) @@ -2213,7 +2213,7 @@ } - v6 = a5; + //v6 = a5; //v7 = &pParty->pPlayers[uPlayerID]; assert(uPlayerID < 4); auto player = &pParty->pPlayers[uPlayerID]; @@ -2221,72 +2221,79 @@ { switch ( a1 ) { - case 47: - case 68: - case 89: - HIBYTE(v6) = HIBYTE(a5) | 1; + case SPELL_SPIRIT_FATE: + case SPELL_BODY_FIRST_AID: + case SPELL_DARK_REANIMATE: + //HIBYTE(v6) = HIBYTE(a5) | 1; + a5 |= 0x0100; break; - case 4: - case 28: - case 30: - case 91: - LOBYTE(v6) = a5 | 0x80; + + case SPELL_FIRE_FIRE_AURA: + case SPELL_WATER_RECHARGE_ITEM: + case SPELL_WATER_ENCHANT_ITEM: + case SPELL_DARK_VAMPIRIC_WEAPON: + //LOBYTE(v6) = a5 | 0x80; + a5 |= 0x0080; break; - case 2: - case 6: - case 11: - case 18: - case 20: - case 24: - case 26: - case 29: - case 32: - case 34: - case 35: - case 37: - case 39: - case 44: - case 52: - case 57: - case 60: - case 65: - case 70: - case 76: - case 78: - case 79: - case 87: - case 90: - case 92: - case 93: - case 97: + + case SPELL_FIRE_FIRE_BOLT: + case SPELL_FIRE_FIREBALL: + case SPELL_FIRE_INCINERATE: + case SPELL_AIR_LIGHNING_BOLT: + case SPELL_AIR_IMPLOSION: + case SPELL_WATER_POISON_SPRAY: + case SPELL_WATER_ICE_BOLT: + case SPELL_WATER_ACID_BURST: + case SPELL_WATER_ICE_BLAST: + case SPELL_EARTH_STUN: + case SPELL_EARTH_SLOW: + case SPELL_EARTH_DEADLY_SWARM: + case SPELL_EARTH_BLADES: + case SPELL_EARTH_MASS_DISTORTION: + case SPELL_SPIRIT_SPIRIT_LASH: + case SPELL_MIND_MIND_BLAST: + case SPELL_MIND_CHARM: + case SPELL_MIND_PSYCHIC_SHOCK: + case SPELL_BODY_HARM: + case SPELL_BODY_FLYING_FIST: + case SPELL_LIGHT_LIGHT_BOLT: + case SPELL_LIGHT_DESTROY_UNDEAD: + case SPELL_LIGHT_SUNRAY: + case SPELL_DARK_TOXIC_CLOUD: + case SPELL_DARK_SHRINKING_RAY: + case SPELL_DARK_SHARPMETAL: + case SPELL_DARK_DRAGON_BREATH: if ( !a6 ) - goto LABEL_9; - break; - case 59: - case 62: - case 66: - case 81: - case 94: -LABEL_9: - v6 = a5 | 8; + a5 |= 0x0008; break; - case 42: - v6 = a5 | 0x40; + case SPELL_MIND_TELEPATHY: + case SPELL_MIND_BERSERK: + case SPELL_MIND_ENSLAVE: + case SPELL_LIGHT_PARALYZE: + case SPELL_DARK_CONTROL_UNDEAD: +//LABEL_9: + //v6 = a5 | 8; + a5 |= 0x0008; break; - case 46: - if ( a4 ) - v8 = (a4 & 0x1C0) == 0; - else - v8 = (player->pActiveSkills[PLAYER_SKILL_SPIRIT] & 0x1C0) == 0; - if ( v8 ) + + case SPELL_EARTH_TELEKINESIS: + a5 |= 0x0040; + break; + + case SPELL_SPIRIT_BLESS: + if (a4 && ~a4 & 0x01C0) + goto LABEL_25; + else if ((player->pActiveSkills[PLAYER_SKILL_SPIRIT] & 0x1C0) == 0); goto LABEL_25; break; - case 50: + + case SPELL_SPIRIT_PRESERVATION: v9 = a4; if ( !a4 ) v9 = player->pActiveSkills[PLAYER_SKILL_SPIRIT]; goto LABEL_18; - case 95: + + case SPELL_DARK_PAIN_REFLECTION: v9 = a4; if ( !a4 ) v9 = player->pActiveSkills[PLAYER_SKILL_DARK]; @@ -2295,7 +2302,8 @@ v12 = __OFSUB__(v10, 3); v11 = ((v10 - 3) & 0x80000000u) != 0; goto LABEL_24; - case 73: + + case SPELL_BODY_HAMMERHANDS: v13 = a4; if ( !a4 ) v13 = player->pActiveSkills[PLAYER_SKILL_BODY]; @@ -2306,64 +2314,67 @@ if ( v11 ^ v12 ) goto LABEL_25; break; - case 40: - case 49: - case 53: - case 55: - case 56: - case 61: - case 64: - case 67: - case 71: - case 72: - case 74: + + case SPELL_EARTH_STONE_TO_FLESH: + case SPELL_SPIRIT_REMOVE_CURSE: + case SPELL_SPIRIT_RAISE_DEAD: + case SPELL_SPIRIT_RESSURECTION: + case SPELL_MIND_REMOVE_FEAR: + case SPELL_MIND_CURE_PARALYSIS: + case SPELL_MIND_CURE_INSANITY: + case SPELL_BODY_CURE_WEAKNESS: + case SPELL_BODY_REGENERATION: + case SPELL_BODY_CURE_POISON: + case SPELL_BODY_CURE_DISEASE: LABEL_25: - v6 = a5 | 2; + //v6 = a5 | 2; + a5 |= 0x0002; break; - case 96: - HIBYTE(v6) = HIBYTE(a5) | 2; + + case SPELL_DARK_SACRIFICE: + //HIBYTE(v6) = HIBYTE(a5) | 2; + a5 |= 0x0200; break; default: break; } } - v15 = pStru277; - if ( v6 & 0x3CA ) + + if (a5 & 0x3CA) { - v16 = pStru277; - while ( !(v16->field_8 & 0x3CA) ) - { - ++v16; - if ( (signed int)v16 >= (signed int)&unk_50C190 ) - goto LABEL_33; - } - v16->spellnum = 0; + assert(sizeof(pStru277) / sizeof(*pStru277) == 10); + for (uint i = 0; i < 10; ++i) + if (pStru277[i].field_8 & 0x3CA) + { + pStru277[i].spellnum = 0; + break; + } } - do + + assert(sizeof(pStru277) / sizeof(*pStru277) == 10); + for (uint i = 0; i < 10; ++i) { -LABEL_33: - if ( v15->spellnum ) + auto spell = pStru277 + i; + if (!spell->spellnum) + continue; + + spell->spellnum = 0; + if (spell->field_8 & 0x3CA) { - v8 = (v15->field_8 & 0x3CA) == 0; - v15->spellnum = 0; - if ( !v8 ) - { - pGUIWindow_Settings->Release(); - pGUIWindow_Settings = 0; - pMouse->SetCursorBitmap("MICON1"); - GameUI_StatusBar_TimedStringTimeLeft = 0; - unk_50C9A0 = 0; - back_to_game(); - } + pGUIWindow_Settings->Release(); + pGUIWindow_Settings = nullptr; + pMouse->SetCursorBitmap("MICON1"); + GameUI_StatusBar_TimedStringTimeLeft = 0; + unk_50C9A0 = 0; + back_to_game(); } - ++v15; } - while (v15 < pStru277 + 10); - int result = pStru277->PushStru277(a2a, a3a, a4, v6, a6); + + int result = pStru277->PushStru277(a1, uPlayerID, a4, a5, a6); if ( result != -1 ) { - if ( v6 & 2 ) + if ( a5 & 2 ) { if ( pGUIWindow_Settings ) return; @@ -2375,7 +2386,7 @@ sub_421B2C_PlaceInInventory_or_DropPickedItem(); return; } - if ( v6 & 8 ) + if ( a5 & 8 ) { if ( pGUIWindow_Settings ) return; @@ -2399,7 +2410,7 @@ sub_421B2C_PlaceInInventory_or_DropPickedItem(); return; } - if ( v6 & 0x40 ) + if ( a5 & 0x40 ) { if ( pGUIWindow_Settings ) return; @@ -2411,7 +2422,7 @@ v25 = 190; goto LABEL_44; } - if ( (char)v6 < 0 ) + if ( (char)a5 < 0 ) { if ( pGUIWindow_Settings ) return; @@ -2424,7 +2435,7 @@ sub_421B2C_PlaceInInventory_or_DropPickedItem(); return; } - if ( HIBYTE(v6) & 1 ) + if ( HIBYTE(a5) & 1 ) { if ( pGUIWindow_Settings ) return; @@ -2436,7 +2447,7 @@ pGUIWindow_Settings->CreateButton(8, 8, 460, 344, 1, 0, 140, 0, 0, "", NULL); sub_421B2C_PlaceInInventory_or_DropPickedItem(); } - if ( HIBYTE(v6) & 2 && !pGUIWindow_Settings ) + if ( HIBYTE(a5) & 2 && !pGUIWindow_Settings ) { pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); pBtn_NPCLeft = pGUIWindow_Settings->CreateButton( @@ -2537,7 +2548,7 @@ //----- (00427E01) -------------------------------------------------------- void stru277::_427E01_cast_spell() { - int v1; // esi@1 + //int v1; // esi@1 int v2; // edi@1 stru277 *v3; // ebx@2 signed int v4; // eax@8 @@ -3283,7 +3294,7 @@ LayingItem a1; // [sp+DDCh] [bp-A8h]@1 //LayingItem::LayingItem(&a1); - v1 = 0; + //v1 = 0; v2 = 0; amount = 0; LODWORD(v733) = 0; @@ -3294,10 +3305,12 @@ { v3 = &v711[n]; HIDWORD(v733) = (int)v3; - if ( v3->spellnum == (short)v1 ) + if ( v3->spellnum == 0 ) goto LABEL_1166; - if ( pParty->pPartyBuffs[11].NotExpired() ) - pParty->pPartyBuffs[11].Reset(); + + if (pParty->Invisible()) + pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].Reset(); + if ( v3->field_8 & 0x3CA ) { if ( !pParty->pPlayers[v3->uPlayerID].CanAct() ) @@ -3306,29 +3319,29 @@ } pPlayer = &pParty->pPlayers[v3->uPlayerID]; v4 = *(int *)&v3->field_C; - if ( v4 != v1 ) + if (v4) goto LABEL_18; v5 = v3->spellnum; if ( v3->spellnum == 79 || v5 == 48 || v5 == 94 ) v666 = 1; else - v666 = v1; + v666 = 0; a2 = stru_50C198.FindClosestActor(5120, 1, v666); v6 = pMouse->uPointingObjectID; - if ( pMouse->uPointingObjectID != v1 && (v6 & 7) == OBJECT_Actor && pActors[v6 >> 3].CanAct() ) + if ( pMouse->uPointingObjectID && (v6 & 7) == OBJECT_Actor && pActors[v6 >> 3].CanAct() ) { v4 = pMouse->uPointingObjectID; LABEL_18: a2 = v4; } a1.uItemType = stru_4E3ACC[v3->spellnum].uItemType; - if ( (short)a1.uItemType != (short)v1 ) + if (a1.uItemType) { if ( (a2 & 7) == OBJECT_Actor) { memcpy(&v715, Actor::GetDirectionInfo((8 * v3->uPlayerID + 8) | OBJECT_Player, a2, &a3, 0), sizeof(v715)); v2 = v723; - v1 = 0; + //v1 = 0; } else { @@ -3337,9 +3350,9 @@ } } v7 = v3->field_A; - LODWORD(v725) = v1; - _this = (ItemGen *)v1; - if ( v7 == (short)v1 ) + LODWORD(v725) = 0; + _this = 0; + if (!v7) { v8 = v3->spellnum; if ( v3->spellnum >= 12 ) @@ -3445,29 +3458,29 @@ LOWORD(v10) = v3->spellnum; v730 = v10; v13 = v12 + 10 * (signed __int16)v10; - v14 = v3->field_A == (short)v1; + v14 = v3->field_A == 0; v15 = (unsigned __int16)word_4E3C66[v13]; // pSpellDatas [negoffset] indexing v16 = *(unsigned __int16 *)((char *)&pSpellDatas[0].uMagisterLevelMana + v13 * 2); uRequiredMana = v15; sRecoveryTime = v16; if ( !v14 ) - uRequiredMana = v1; - if ( pParty->uCurrentHour == v1 ) + uRequiredMana = 0; + if ( pParty->uCurrentHour == 0 ) { - if ( pParty->uCurrentMinute != v1 ) + if ( pParty->uCurrentMinute != 0 ) goto LABEL_62; if ( LODWORD(v725) == 20 ) goto LABEL_61; } - if ( pParty->uCurrentHour == 12 && pParty->uCurrentMinute == v1 && LODWORD(v725) == 19 ) + if ( pParty->uCurrentHour == 12 && pParty->uCurrentMinute == 0 && LODWORD(v725) == 19 ) LABEL_61: - uRequiredMana = v1; + uRequiredMana = 0; LABEL_62: if ( (signed __int16)v730 >= 100 || ((pPlayer->sMana - uRequiredMana) & 0x80000000u) == 0 ) break; ShowStatusBarString(pGlobalTXT_LocalizationStrings[586], 2u); LABEL_203: - v3->spellnum = v1; + v3->spellnum = 0; LABEL_1166: ++n; if ( n >= 10 ) @@ -3582,8 +3595,8 @@ } if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; - v668 = v1; - v658 = v1; + v668 = 0; + v658 = 0; v653 = amount; v651 = v731; v26 = (signed __int64)((double)(signed int)v733 * 4.2666669); @@ -3611,16 +3624,16 @@ amount = 5; } v31 = v3->uPlayerID; - HIDWORD(v733) = v1; + HIDWORD(v733) = 0; v32 = 8 * v31; - LOBYTE(v32) = v32 | 4; - if ( (signed int)uNumLayingItems > v1 ) + LOBYTE(v32) = v32 | OBJECT_Player; + if ( (signed int)uNumLayingItems > 0 ) { v33 = (char *)&pLayingItems[0].field_48; v730 = uNumLayingItems; do { - if ( *((short *)v33 - 36) != (short)v1 && *(int *)v33 == 7 && *((int *)v33 + 4) == v32 ) + if ( *((short *)v33 - 36) && *(int *)v33 == 7 && *((int *)v33 + 4) == v32 ) ++HIDWORD(v733); v33 += 112; --v730; @@ -3638,13 +3651,13 @@ a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); a1.vPosition.y = pParty->vPosition.y; a1.vPosition.x = pParty->vPosition.x; - a1.uAttributes = v1; + a1.uAttributes = 0; a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; a1.uSectorID = pIndoor->GetSector( pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); - a1.uSpriteFrameID = v1; + a1.uSpriteFrameID = 0; v34 = 8 * v3->uPlayerID; LOBYTE(v34) = v34 | OBJECT_Player; a1.field_58_pid = v34; @@ -3661,26 +3674,26 @@ case 20: if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; - if ( a2 == v1 ) + if (!a2) goto LABEL_200; if ( (a2 & 7) != OBJECT_Actor) goto LABEL_1056; - v699 = v1; - v698 = v1; - v697 = v1; + v699 = 0; + v698 = 0; + v697 = 0; a1.stru_24.Reset(); a1.field_48 = v3->spellnum; a1.field_4C = v2; a1.field_50 = v731; a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); - a1.uAttributes = v1; - a1.uSectorID = v1; - a1.uSpriteFrameID = v1; + a1.uAttributes = 0; + a1.uSectorID = 0; + a1.uSpriteFrameID = 0; v37 = v3->uPlayerID; a1.field_60_distance_related_prolly_lod = 0; v37 *= 8; LOBYTE(v37) = v37 | OBJECT_Player; - a1.uFacing = v1; + a1.uFacing = 0; a1.field_58_pid = v37; v38 = a2 >> 3; a1.uSoundID = LOWORD(v3->field_10); @@ -3690,9 +3703,9 @@ a1.vPosition.z = pActors[v39].vPosition.z; v41 = 8 * (a2 >> 3); a1.vPosition.y = v40; - LOBYTE(v41) = v41 | 3; + LOBYTE(v41) = v41 | OBJECT_Actor; a1.field_5C = v41; - v42 = a1.Create(0, v1, v1, v1); + v42 = a1.Create(0, 0, 0, 0); v43 = &v697; goto LABEL_133; case 44: @@ -3703,25 +3716,21 @@ if ( !stru_50C198.GetMagicalResistance(&pActors[a2 >> 3], 3u) ) goto LABEL_1056; pActors[a2 >> 3].pActorBuffs[10].Apply( - pMiscTimer->uTotalGameTimeElapsed + 128, - v1, - v1, - v1, - v1); - v706 = v1; - v705 = v1; - v704 = v1; + pMiscTimer->uTotalGameTimeElapsed + 128, 0, 0, 0, 0); + v706 = 0; + v705 = 0; + v704 = 0; a1.stru_24.Reset(); a1.field_48 = v3->spellnum; a1.field_4C = v2; a1.field_50 = v731; a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); - a1.uAttributes = v1; - a1.uSectorID = v1; - a1.uSpriteFrameID = v1; + a1.uAttributes = 0; + a1.uSectorID = 0; + a1.uSpriteFrameID = 0; v44 = v3->uPlayerID; a1.field_60_distance_related_prolly_lod = 0; - a1.uFacing = v1; + a1.uFacing = 0; v44 *= 8; LOBYTE(v44) = v44 | OBJECT_Player; v38 = (signed int)v726; @@ -3732,22 +3741,22 @@ a1.vPosition.z = *(__int16 *)((char *)&pActors[0].vPosition.z + HIDWORD(v733)); v46 = 8 * (int)v726; a1.vPosition.y = v45; - LOBYTE(v46) = 8 * (char)v726 | 3; + LOBYTE(v46) = 8 * (char)v726 | OBJECT_Actor; a1.field_5C = v46; - v42 = a1.Create(0, v1, v1, v1); + v42 = a1.Create(0, 0, 0, 0); v43 = &v704; LABEL_133: v670 = (Vec3_int_ *)v43; v47 = v38; goto LABEL_139; case 79: - if ( !pPlayer->CanCastSpell(uRequiredMana) || a2 == v1 || (a2 & 7) != OBJECT_Actor) + if ( !pPlayer->CanCastSpell(uRequiredMana) || !a2 || (a2 & 7) != OBJECT_Actor) goto LABEL_83; v730 = a2 >> 3; - v693 = v1; + v693 = 0; HIDWORD(v733) = (int)&pActors[a2 >> 3]; - v692 = v1; - v691 = v1; + v692 = 0; + v691 = 0; a1.stru_24.Reset(); a1.field_48 = v3->spellnum; a1.field_4C = v2; @@ -3757,9 +3766,9 @@ a1.vPosition.y = *(short *)(HIDWORD(v733) + 144); v48 = *(short *)(HIDWORD(v733) + 138); a1.vPosition.z = *(short *)(HIDWORD(v733) + 138); - a1.uAttributes = v1; + a1.uAttributes = 0; a1.uSectorID = pIndoor->GetSector(a1.vPosition.x, a1.vPosition.y, v48); - a1.uSpriteFrameID = v1; + a1.uSpriteFrameID = 0; v49 = 8 * v3->uPlayerID; LOBYTE(v49) = v49 | OBJECT_Player; a1.field_58_pid = v49; @@ -3769,7 +3778,7 @@ LOWORD(v49) = LOWORD(v3->field_10); LOBYTE(a1.uAttributes) |= 0x80u; a1.uSoundID = v49; - v726 = (Player *)a1.Create(0, v1, v1, v1); + v726 = (Player *)a1.Create(0, 0, 0, 0); if ( !MonsterStats::BelongsToSupertype(*(short *)(HIDWORD(v733) + 96), MONSTER_SUPERTYPE_UNDEAD) ) goto LABEL_200; v47 = v730; @@ -3800,13 +3809,13 @@ a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); a1.vPosition.y = pParty->vPosition.y; a1.vPosition.x = pParty->vPosition.x; - a1.uAttributes = v1; + a1.uAttributes = 0; a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; a1.uSectorID = pIndoor->GetSector( pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); - a1.uSpriteFrameID = v1; + a1.uSpriteFrameID = 0; v50 = 8 * v3->uPlayerID; LOBYTE(v50) = v50 | OBJECT_Player; a1.field_58_pid = v50; @@ -3845,21 +3854,21 @@ case 81: if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; - if ( a2 == v1 + if ( !a2 || (a2 & 7) != OBJECT_Actor || (v730 = a2 >> 3, v721 = (int)&pActors[a2 >> 3], !stru_50C198.GetMagicalResistance(&pActors[a2 >> 3], 9u)) ) goto LABEL_1056; - Actor::AI_Stand(v730, 4u, 0x80u, (AIDirection *)v1); + Actor::AI_Stand(v730, 4u, 0x80u, 0); v726 = (Player *)(23040 * v2); v54 = (signed __int64)((double)(23040 * v2) * 0.033333335); v55 = v721; - ((SpellBuff *)(v721 + 308))->Apply(pParty->uTimePlayed + (signed int)v54, v731, v1, v1, v1); + ((SpellBuff *)(v721 + 308))->Apply(pParty->uTimePlayed + (signed int)v54, v731, 0, 0, 0); *(char *)(v55 + 38) |= 8u; - *(short *)(v55 + 148) = v1; - v672 = v1; - *(short *)(v55 + 150) = v1; + *(short *)(v55 + 148) = 0; + v672 = 0; + *(short *)(v55 + 150) = 0; v661 = (Actor *)v55; goto LABEL_165; case 35: @@ -3901,10 +3910,10 @@ pParty->uTimePlayed + (signed int)v58, v731, amount, - v1, - v1); + 0, + 0); *((char *)&pActors[0].uAttributes + v59 + 2) |= 8u; - v672 = v1; + v672 = 0; v661 = (Actor *)LODWORD(v718); goto LABEL_165; case 60: @@ -3931,10 +3940,7 @@ //((SpellBuff *)((char *)&pActors[0].pActorBuffs[1] + v730))->Apply( pActors[a2 >> 3].pActorBuffs[1].Apply( pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335), - v731, - v1, - v1, - v1); + v731, 0, 0, 0); a1.stru_24.Reset(); a1.field_48 = v3->spellnum; a1.field_4C = v2; @@ -3949,13 +3955,13 @@ a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); a1.vPosition.x = pParty->vPosition.x; a1.vPosition.y = pParty->vPosition.y; - a1.uAttributes = v1; + a1.uAttributes = 0; a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; a1.uSectorID = pIndoor->GetSector( pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); - a1.uSpriteFrameID = v1; + a1.uSpriteFrameID = 0; v62 = 8 * v3->uPlayerID; LOBYTE(v62) = v62 | OBJECT_Player; a1.field_58_pid = v62; @@ -3990,7 +3996,7 @@ } if ( v65 == 1 ) { - LODWORD(v733) = v1; + LODWORD(v733) = 0; amount = 12; } LABEL_196: @@ -4003,9 +4009,9 @@ { if (!v730c->Broken()) { - if ( v730c->uSpecEnchantmentType == v1 ) + if (!v730c->uSpecEnchantmentType) { - if ( v730c->uEncantmentType == v1 ) + if (!v730c->uEncantmentType) { v68 = BYTE4(v726->pConditions[3]); if ( !v68 || v68 == 1 || v68 == 2 ) @@ -4067,7 +4073,7 @@ } } v3->spellnum = 0; - v1 = 0; + //v1 = 0; LABEL_1165: v2 = v723; goto LABEL_1166; @@ -4079,7 +4085,7 @@ } LABEL_199: dword_50C9D0 = 113; - dword_50C9D4 = v1; + dword_50C9D4 = 0; dword_50C9D8 = 1; LABEL_200: v66 = pGlobalTXT_LocalizationStrings[428]; @@ -4087,7 +4093,7 @@ v67 = 2; LABEL_202: ShowStatusBarString(v66, v67); - pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, v1, v1, -1, v1, v1, v1, v1); + pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); goto LABEL_203; case 71: v70 = v12 - 1; @@ -4115,8 +4121,8 @@ v74 = v3->spellnum; v75 = pGame->GetStru6(); pGame->GetStru6()->SetPlayerBuffAnim(v74, v73); - v668 = v1; - v658 = v1; + v668 = 0; + v658 = 0; v653 = amount; v651 = v731; v28 = pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)v733 * 4.2666669); @@ -4165,7 +4171,7 @@ LODWORD(v725) = 6; break; case 14: - LODWORD(v725) = v1; + LODWORD(v725) = 0; break; case 25: LODWORD(v725) = 17; @@ -4186,21 +4192,21 @@ goto LABEL_83; v81 = v3->spellnum; v82 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v81, v1); + pGame->GetStru6()->SetPlayerBuffAnim(v81, 0); v83 = 1; v84 = v3->spellnum; v85 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v84, 1u); + pGame->GetStru6()->SetPlayerBuffAnim(v84, 1); v86 = v3->spellnum; v87 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v86, 2u); + pGame->GetStru6()->SetPlayerBuffAnim(v86, 2); v88 = v3->spellnum; v89 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v88, 3u); + pGame->GetStru6()->SetPlayerBuffAnim(v88, 3); v90 = (double)(signed int)v733 * 4.2666669; goto LABEL_304; case 5: - if ( v12 <= v1 ) + if ( v12 <= 0 ) goto LABEL_254; if ( v12 <= 2 ) { @@ -4228,31 +4234,28 @@ do { if ( v92->pConditions ) - LODWORD(v727) = v1; + LODWORD(v727) = 0; ++v92; } while ( v92 <= &pParty->pPlayers[3] ); - if ( LODWORD(v727) != v1 ) + if (LODWORD(v727)) { v726 = (Player *)((int)v733 << 7); pParty->pPartyBuffs[8].Apply( pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335), - v731, - v1, - v1, - v1); + v731, 0, 0, 0); v93 = v3->spellnum; v94 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v93, v1); + pGame->GetStru6()->SetPlayerBuffAnim(v93, 0); v95 = v3->spellnum; v96 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v95, 1u); + pGame->GetStru6()->SetPlayerBuffAnim(v95, 1); v97 = v3->spellnum; v98 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v97, 2u); + pGame->GetStru6()->SetPlayerBuffAnim(v97, 2); v99 = v3->spellnum; v100 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v99, 3u); + pGame->GetStru6()->SetPlayerBuffAnim(v99, 3); } } goto LABEL_83; @@ -4287,8 +4290,8 @@ v109 = v3->spellnum; v110 = pGame->GetStru6(); pGame->GetStru6()->SetPlayerBuffAnim(v109, v108); - v111 = pOtherOverlayList->_4418B1(10000, v3->uPlayerID_2 + 310, v1, 65536); - v668 = v1; + v111 = pOtherOverlayList->_4418B1(10000, v3->uPlayerID_2 + 310, 0, 65536); + v668 = 0; v716 = v111; v658 = v111; v653 = amount; @@ -4307,15 +4310,15 @@ v106 = v3->spellnum; v107 = pGame->GetStru6(); pGame->GetStru6()->SetPlayerBuffAnim(v106, v105); - v716 = pOtherOverlayList->_4418B1(10000, v105 + 310, v1, 65536); - v730b->pPlayerBuffs[1].Apply(pParty->uTimePlayed + v717, v731, amount, v716, v1); + v716 = pOtherOverlayList->_4418B1(10000, v105 + 310, 0, 65536); + v730b->pPlayerBuffs[1].Apply(pParty->uTimePlayed + v717, v731, amount, v716, 0); ++v730b; ++v105; } while ( v730b <= &pParty->pPlayers[3] ); goto LABEL_1056; case 52: - if ( pPlayer->CanCastSpell(uRequiredMana) && a2 != v1 && (a2 & 7) == OBJECT_Actor) + if ( pPlayer->CanCastSpell(uRequiredMana) && a2 && (a2 & 7) == OBJECT_Actor) { v730 = a2 >> 3; v112 = &pActors[a2 >> 3]; @@ -4411,7 +4414,7 @@ v127 = v3->spellnum; if ( v127 == 17 ) { - amount = v1; + amount = 0; LODWORD(v725) = 14; } else @@ -4433,22 +4436,22 @@ goto LABEL_83; v128 = v3->spellnum; v129 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v128, v1); + pGame->GetStru6()->SetPlayerBuffAnim(v128, 0); v83 = 1; v130 = v3->spellnum; v131 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v130, 1u); + pGame->GetStru6()->SetPlayerBuffAnim(v130, 1); v132 = v3->spellnum; v133 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v132, 2u); + pGame->GetStru6()->SetPlayerBuffAnim(v132, 2); v134 = v3->spellnum; v135 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v134, 3u); + pGame->GetStru6()->SetPlayerBuffAnim(v134, 3); v726 = (Player *)((int)v733 << 7); v90 = (double)(signed int)((int)v733 << 7) * 0.033333335; LABEL_304: - v673 = v1; - v662 = v1; + v673 = 0; + v662 = 0; v655 = amount; v652 = v731; v136 = pParty->uTimePlayed + (signed int)(signed __int64)v90; @@ -4465,19 +4468,19 @@ goto LABEL_83; v141 = v3->spellnum; v142 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v141, v1); + pGame->GetStru6()->SetPlayerBuffAnim(v141, 0); v143 = v3->spellnum; v144 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v143, 1u); + pGame->GetStru6()->SetPlayerBuffAnim(v143, 1); v145 = v3->spellnum; v146 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v145, 2u); + pGame->GetStru6()->SetPlayerBuffAnim(v145, 2); v147 = v3->spellnum; v148 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v147, 3u); - v668 = v1; + pGame->GetStru6()->SetPlayerBuffAnim(v147, 3); + v668 = 0; v726 = (Player *)((int)v733 << 7); - v658 = v1; + v658 = 0; v653 = v2; v651 = v731; v26 = (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335); @@ -4520,9 +4523,9 @@ } HIDWORD(v733) = v154; v713 = v154 + 2500; - v721 = v1; - LODWORD(v718) = v1; - if ( (signed int)this > v1 ) + v721 = 0; + LODWORD(v718) = 0; + if ( (signed int)this > 0 ) { *(float *)&y = (double)SHIDWORD(v733); *(float *)&v732 = (double)v713; @@ -4541,8 +4544,8 @@ *(float *)&_this = v158 * v158; if ( sqrt(*((float *)&v733 + 1) * *((float *)&v733 + 1) + *(float *)&_this + v725) <= 1.0 ) { - LODWORD(v687) = v1; - HIDWORD(v687) = v1; + LODWORD(v687) = 0; + HIDWORD(v687) = 0; } else { @@ -4556,12 +4559,12 @@ a1.field_4C = v2; a1.field_50 = v731; a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); - a1.uAttributes = v1; + a1.uAttributes = 0; a1.vPosition.x = uRequiredMana; a1.vPosition.y = LODWORD(v727); - a1.uSectorID = v1; + a1.uSectorID = 0; a1.vPosition.z = a2 + v713; - a1.uSpriteFrameID = v1; + a1.uSpriteFrameID = 0; a1.field_58_pid = 8 * v3->uPlayerID | OBJECT_Player; a1.field_5C = v730; a1.field_60_distance_related_prolly_lod = stru_50C198._427546(a2 + 2500); @@ -4573,7 +4576,7 @@ v687, SHIDWORD(v687), pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed, - v1) != -1 + 0) != -1 && pParty->bTurnBasedModeOn == 1 ) ++pTurnEngine->field_1C; LODWORD(v718) = rand() % 1024 - 512; @@ -4595,26 +4598,26 @@ if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; v726 = (Player *)sub_46A6AC((int)dword_50BF30, 100, 4096); - v700.z = v1; - v700.y = v1; - v700.x = v1; + v700.z = 0; + v700.y = 0; + v700.x = 0; a1.stru_24.Reset(); a1.field_48 = v3->spellnum; a1.field_4C = v2; a1.field_50 = v731; a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); - a1.uAttributes = v1; - a1.uSectorID = v1; - a1.uSpriteFrameID = v1; + a1.uAttributes = 0; + a1.uSectorID = 0; + a1.uSpriteFrameID = 0; v161 = v3->uPlayerID; a1.field_60_distance_related_prolly_lod = 0; - a1.uFacing = v1; + a1.uFacing = 0; v161 *= 8; LOBYTE(v161) = v161 | OBJECT_Player; a1.field_58_pid = v161; a1.uSoundID = LOWORD(v3->field_10); - a2 = v1; - if ( (signed int)v726 > v1 ) + a2 = 0; + if ( (signed int)v726 > 0 ) { do { @@ -4624,9 +4627,9 @@ v732 = pActors[v162].uActorHeight; a1.vPosition.z = pActors[v162].vPosition.z - (unsigned int)(signed __int64)((double)v732 * unk_4D8548); v163 = 8 * dword_50BF30[a2]; - LOBYTE(v163) = v163 | 3; + LOBYTE(v163) = v163 | OBJECT_Actor; a1.field_5C = v163; - v164 = a1.Create(0, v1, v1, v1); + v164 = a1.Create(0, 0, 0, 0); v165 = a2; DamageMonsterFromParty(8 * v164 | AI_OBJECT_LAYING_ITEM, dword_50BF30[a2], &v700); v166 = pGame->GetStru6(); @@ -4645,14 +4648,14 @@ v168 = 0; do { - v169 = pOtherOverlayList->_4418B1(2000, v168++ + 100, v1, 65536); + v169 = pOtherOverlayList->_4418B1(2000, v168++ + 100, 0, 65536); v716 = v169; } while ( v168 < 4 ); - v668 = v1; + v668 = 0; v732 = (int)v733 << 7; - v658 = v1; - v653 = v1; + v658 = 0; + v653 = 0; v651 = v731; v28 = pParty->uTimePlayed + (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335); goto LABEL_992; @@ -4680,25 +4683,25 @@ goto LABEL_83; v174 = 0; do - pOtherOverlayList->_4418B1(2010, v174++ + 100, v1, 65536); + pOtherOverlayList->_4418B1(2010, v174++ + 100, 0, 65536); while ( v174 < 4 ); v175 = v3->spellnum; v176 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v175, v1); + pGame->GetStru6()->SetPlayerBuffAnim(v175, 0); v83 = 1; v177 = v3->spellnum; v178 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v177, 1u); + pGame->GetStru6()->SetPlayerBuffAnim(v177, 1); v179 = v3->spellnum; v180 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v179, 2u); + pGame->GetStru6()->SetPlayerBuffAnim(v179, 2); v181 = v3->spellnum; v182 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v181, 3u); - v673 = v1; + pGame->GetStru6()->SetPlayerBuffAnim(v181, 3); + v673 = 0; v732 = (int)v733 << 7; - v662 = v1; - v655 = v1; + v662 = 0; + v655 = 0; v652 = v731; v183 = (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335); v137 = (char *)&pParty->pPartyBuffs[5]; @@ -4741,13 +4744,13 @@ a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); a1.vPosition.y = pParty->vPosition.y; a1.vPosition.x = pParty->vPosition.x; - a1.uAttributes = v1; + a1.uAttributes = 0; a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; a1.uSectorID = pIndoor->GetSector( pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); - a1.uSpriteFrameID = v1; + a1.uSpriteFrameID = 0; v187 = 8 * v3->uPlayerID; LOBYTE(v187) = v187 | OBJECT_Player; a1.field_58_pid = v187; @@ -4781,7 +4784,7 @@ goto LABEL_83; v191 = 0; do - pOtherOverlayList->_4418B1(2040, v191++ + 100, v1, 65536); + pOtherOverlayList->_4418B1(2040, v191++ + 100, 0, 65536); while ( v191 < 4 ); BYTE1(pParty->uFlags) |= 1u; pParty->uFallSpeed = 1000; @@ -4825,20 +4828,20 @@ { v197 = v3->spellnum; v198 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v197, v1); + pGame->GetStru6()->SetPlayerBuffAnim(v197, 0); v83 = 1; v199 = v3->spellnum; v200 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v199, 1u); + pGame->GetStru6()->SetPlayerBuffAnim(v199, 1); v201 = v3->spellnum; v202 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v201, 2u); + pGame->GetStru6()->SetPlayerBuffAnim(v201, 2); v203 = v3->spellnum; v204 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v203, 3u); - v673 = v1; + pGame->GetStru6()->SetPlayerBuffAnim(v203, 3); + v673 = 0; v732 = (int)v733 << 7; - v662 = v1; + v662 = 0; v655 = amount; v652 = v731; v183 = (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335); @@ -4857,7 +4860,7 @@ v190 = pGlobalTXT_LocalizationStrings[494]; LABEL_462: ShowStatusBarString(v190, 2u); - pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, v1, v1, -1, v1, v1, v1, v1); + pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); goto LABEL_83; } if ( !pPlayers[v3->uPlayerID + 1]->GetMaxMana() ) @@ -4867,15 +4870,15 @@ goto LABEL_462; } LODWORD(v733) = 3600 * v2; - if ( v731 == 2 || v731 == 3 || (amount = v1, v731 != 4) ) + if ( v731 == 2 || v731 == 3 || (amount = 0, v731 != 4) ) amount = 1; if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; v205 = 0; do - pOtherOverlayList->_4418B1(2090, v205++ + 100, v1, 65536); + pOtherOverlayList->_4418B1(2090, v205++ + 100, 0, 65536); while ( v205 < 4 ); - v206 = pOtherOverlayList->_4418B1(10008, 203, v1, 65536); + v206 = pOtherOverlayList->_4418B1(10008, 203, 0, 65536); v207 = v3->uPlayerID + 1; v716 = v206; v668 = v207; @@ -4925,10 +4928,10 @@ v208 = LODWORD(v725); } v726 = (Player *)v211; - HIDWORD(v733) = v1; + HIDWORD(v733) = 0; *(float *)&v732 = (double)v211; LODWORD(v725) = v211 + 2500; - v721 = v1; + v721 = 0; *(float *)&y = (double)(v211 + 2500); v730 = v208 == 3 ? a2 : 0; a2 = 20; @@ -4945,8 +4948,8 @@ *(float *)&v726 = v216 * v216; if ( sqrt(*((float *)&v733 + 1) * *((float *)&v733 + 1) + *(float *)&v726 + *(float *)&v721) <= 1.0 ) { - LODWORD(v685) = v1; - HIDWORD(v685) = v1; + LODWORD(v685) = 0; + HIDWORD(v685) = 0; } else { @@ -4960,12 +4963,12 @@ a1.field_4C = v2; a1.field_50 = v731; a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); - a1.uAttributes = v1; + a1.uAttributes = 0; a1.vPosition.x = LODWORD(v718); a1.vPosition.y = v713; - a1.uSectorID = v1; + a1.uSectorID = 0; a1.vPosition.z = (int)((char *)_this + LODWORD(v725)); - a1.uSpriteFrameID = v1; + a1.uSpriteFrameID = 0; a1.field_58_pid = 8 * v3->uPlayerID | OBJECT_Player; a1.field_5C = v730; a1.field_60_distance_related_prolly_lod = stru_50C198._427546((int)&_this[69].uNumCharges); @@ -4977,7 +4980,7 @@ v685, SHIDWORD(v685), pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed, - v1) != -1 + 0) != -1 && pParty->bTurnBasedModeOn == 1 ) ++pTurnEngine->field_1C; v721 = rand() % 1024 - 512; @@ -4996,7 +4999,7 @@ { if ( v220 == 1 ) { - amount = v1; + amount = 0; goto LABEL_433; } v221 = 180 * v2; @@ -5054,11 +5057,11 @@ v671 = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; v660 = pParty->vPosition.y; LABEL_153: - a1.uAttributes = v1; + a1.uAttributes = 0; a1.vPosition.x = pParty->vPosition.x; a1.vPosition.z = v51; v52 = pIndoor->GetSector(pParty->vPosition.x, v660, v671); - a1.uSpriteFrameID = v1; + a1.uSpriteFrameID = 0; a1.uSectorID = v52; v53 = 8 * v3->uPlayerID; LOBYTE(v53) = v53 | OBJECT_Player; @@ -5089,13 +5092,13 @@ a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); a1.vPosition.y = pParty->vPosition.y; a1.vPosition.x = pParty->vPosition.x; - a1.uAttributes = v1; + a1.uAttributes = 0; a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; a1.uSectorID = pIndoor->GetSector( pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); - a1.uSpriteFrameID = v1; + a1.uSpriteFrameID = 0; v226 = 8 * v3->uPlayerID; LOBYTE(v226) = v226 | OBJECT_Player; a1.field_58_pid = v226; @@ -5135,20 +5138,20 @@ LODWORD(v733) = v229; if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; - v716 = pOtherOverlayList->_4418B1(10005, 201, v1, 65536); + v716 = pOtherOverlayList->_4418B1(10005, 201, 0, 65536); v230 = v3->spellnum; v231 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v230, v1); + pGame->GetStru6()->SetPlayerBuffAnim(v230, 0); v232 = 1; v233 = v3->spellnum; v234 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v233, 1u); + pGame->GetStru6()->SetPlayerBuffAnim(v233, 1); v235 = v3->spellnum; v236 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v235, 2u); + pGame->GetStru6()->SetPlayerBuffAnim(v235, 2); v237 = v3->spellnum; v238 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v237, 3u); + pGame->GetStru6()->SetPlayerBuffAnim(v237, 3); v239 = v3->uPlayerID + 1; v732 = v229 << 7; pParty->pPartyBuffs[18].Apply( @@ -5196,15 +5199,15 @@ v243 = y; y[25] = v242; *((int *)v243 + 4) = (unsigned __int8)v242; - if ( (unsigned __int8)v242 <= v1 ) - { - *(int *)v243 = v1; + if ( (unsigned __int8)v242 <= 0 ) + { + *(int *)v243 = 0; dword_50C9D0 = 113; - dword_50C9D4 = v1; + dword_50C9D4 = 0; dword_50C9D8 = 1; ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2u); - pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, v1, v1, -1, v1, v1, v1, v1); - v3->spellnum = v1; + pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); + v3->spellnum = 0; goto LABEL_1165; } *((int *)v243 + 5) |= 0x40u; @@ -5212,7 +5215,7 @@ case 30: if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; - uRequiredMana = v1; + uRequiredMana = 0; HIDWORD(v733) = 10 * v2; v730 = 1; v244 = (char *)&pParty->pPlayers[v3->uPlayerID_2]; @@ -5227,11 +5230,11 @@ LODWORD(v725) = (int)(char *)&pItemsTable + 48 * *(int *)v245 + 4; if ( (unsigned __int8)(v310 ^ v311) | v14 ) { - if ( *(int *)&v244[36 * a2 + 544] == v1 ) + if ( *(int *)&v244[36 * a2 + 544] == 0 ) { - if ( *(int *)&v244[36 * a2 + 536] == v1 ) + if ( *(int *)&v244[36 * a2 + 536] == 0 ) { - if ( *(int *)&v244[36 * a2 + 540] == v1 ) + if ( *(int *)&v244[36 * a2 + 540] == 0 ) { v312 = v309[28]; if ( v312 ) @@ -5246,11 +5249,11 @@ if ( ((ItemGen *)v245)->GetValue() < 0x1C2 ) { uRequiredMana = 1; - v730 = v1; + v730 = 0; } if ( rand() % 100 >= SHIDWORD(v733) ) uRequiredMana = 1; - if ( uRequiredMana == v1 ) + if (!uRequiredMana) { v313 = *(char *)(LODWORD(v725) + 28); if ( v313 == 3 | v313 == 4 | v313 == 5 | v313 == 6 | v313 == 7 | v313 == 8 | v313 == 9 | v313 == 10 | v313 == 11 ) @@ -5294,16 +5297,16 @@ } } LABEL_616: - if ( LODWORD(v727) == v1 ) + if ( LODWORD(v727) == 0 ) { v317 = pGlobalTXT_LocalizationStrings[428]; - if ( v730 == v1 ) + if ( v730 == 0 ) v317 = pGlobalTXT_LocalizationStrings[585]; ShowStatusBarString(v317, 2u); - pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, v1, v1, -1, v1, v1, v1, v1); + pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); v318 = v726; - v3->spellnum = v1; - v318->PlaySound(SPEECH_43, v1); + v3->spellnum = 0; + v318->PlaySound(SPEECH_43, 0); } goto LABEL_83; } @@ -5314,9 +5317,9 @@ v245 = (int)&v244[36 * a2 + 532]; v269 = *(int *)v245; if ( *(int *)v245 > 134 - || *(int *)(v245 + 12) != v1 - || *(int *)(v245 + 4) != v1 - || *(int *)(v245 + 8) != v1 + || *(int *)(v245 + 12) != 0 + || *(int *)(v245 + 4) != 0 + || *(int *)(v245 + 8) != 0 || (_this = (ItemGen *)(v245 + 20), *(char *)(v245 + 20) & 2) ) goto LABEL_616; v270 = (char *)&pItemsTable->pItems[v269].pIconName; @@ -5329,11 +5332,11 @@ if ( v272 ) { uRequiredMana = 1; - v730 = v1; + v730 = 0; } if ( rand() % 100 >= SHIDWORD(v733) ) uRequiredMana = 1; - if ( uRequiredMana != v1 ) + if (uRequiredMana) goto LABEL_613; v273 = v725; v274 = *(char *)(LODWORD(v725) + 28); @@ -5412,9 +5415,9 @@ { if ( v731 != 4 || (v245 = (int)&v726->pInventoryItems[a2], v246 = *(int *)v245, *(int *)v245 > 134) - || v726->pInventoryItems[a2].uSpecEnchantmentType != v1 - || v726->pInventoryItems[a2].uEncantmentType != v1 - || v726->pInventoryItems[a2]._bonus_strength != v1 + || v726->pInventoryItems[a2].uSpecEnchantmentType != 0 + || v726->pInventoryItems[a2].uEncantmentType != 0 + || v726->pInventoryItems[a2]._bonus_strength != 0 || (_this = (ItemGen *)((char *)&v726->pInventoryItems[a2] + 20), v726->pInventoryItems[a2].Broken()) ) goto LABEL_616; v247 = (char *)&pItemsTable->pItems[v246].pIconName; @@ -5427,11 +5430,11 @@ if ( v249 ) { uRequiredMana = 1; - v730 = v1; + v730 = 0; } if ( rand() % 100 >= SHIDWORD(v733) ) uRequiredMana = 1; - if ( uRequiredMana != v1 ) + if (uRequiredMana) goto LABEL_613; v250 = v725; v251 = *(char *)(LODWORD(v725) + 28); @@ -5509,7 +5512,7 @@ } } LABEL_615: - v1 = 0; + //v1 = 0; goto LABEL_616; } v289 = (ItemGen *)&v244[36 * a2 + 532]; @@ -5517,9 +5520,9 @@ v290 = v289->uItemID; LODWORD(v725) = (int)(char *)&pItemsTable + 48 * v290 + 4; if ( v290 > 134 - || _this->uSpecEnchantmentType != v1 - || _this->uEncantmentType != v1 - || _this->_bonus_strength != v1 + || _this->uSpecEnchantmentType != 0 + || _this->uEncantmentType != 0 + || _this->_bonus_strength != 0 || (v291 = pItemsTable->pItems[v290].uEquipType) == 0 || v291 == 1 || v291 == 2 @@ -5529,13 +5532,13 @@ uRequiredMana = 1; if ( rand() % 100 >= SHIDWORD(v733) ) uRequiredMana = 1; - if ( uRequiredMana != v1 ) + if ( uRequiredMana != 0 ) goto LABEL_199; v292 = *(char *)(LODWORD(v725) + 28); if ( !(v292 == 3 | v292 == 4 | v292 == 5 | v292 == 6 | v292 == 7 | v292 == 8 | v292 == 9 | v292 == 10 | v292 == 11) ) { v2 = v723; - v1 = 0; + //v1 = 0; goto LABEL_199; } if ( rand() % 100 >= 80 ) @@ -5615,7 +5618,7 @@ if ( pParty->uFlags & 0x30 && v12 != 4 || rand() % 100 >= amount && v731 != 4 ) goto LABEL_200; byte_50C0C0 = LOBYTE(v3->uPlayerID); - pMessageQueue_50CBD0->AddMessage(UIMSG_C3, v1, v1); + pMessageQueue_50CBD0->AddMessage(UIMSG_C3, 0, 0); goto LABEL_1056; case 33: LODWORD(v733) = 604800 * v2; @@ -5625,7 +5628,7 @@ if ( pPlayer->sMana >= (signed int)uRequiredMana ) { pEventTimer->Pause(); - pMessageQueue_50CBD0->AddMessage(UIMSG_B1, v1, v1); + pMessageQueue_50CBD0->AddMessage(UIMSG_B1, 0, 0); qword_506350 = (signed int)v733; _506348_current_lloyd_playerid = v3->uPlayerID; ::uRequiredMana = v319; @@ -5675,13 +5678,13 @@ a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); a1.vPosition.y = pParty->vPosition.y; a1.vPosition.x = pParty->vPosition.x; - a1.uAttributes = v1; + a1.uAttributes = 0; a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; a1.uSectorID = pIndoor->GetSector( pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); - a1.uSpriteFrameID = v1; + a1.uSpriteFrameID = 0; v326 = 8 * v3->uPlayerID; LOBYTE(v326) = v326 | OBJECT_Player; a1.field_58_pid = v326; @@ -5708,9 +5711,9 @@ a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); a1.vPosition.x = pParty->vPosition.x; a1.vPosition.y = pParty->vPosition.y; - a1.uAttributes = v1; - a1.uSectorID = v1; - a1.uSpriteFrameID = v1; + a1.uAttributes = 0; + a1.uSectorID = 0; + a1.uSpriteFrameID = 0; a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; v327 = 8 * v3->uPlayerID; LOBYTE(v327) = v327 | OBJECT_Player; @@ -5721,7 +5724,7 @@ a1.uSoundID = LOWORD(v3->field_10); if ( pParty->bTurnBasedModeOn == 1 ) a1.uAttributes = 4; - v669 = v1; + v669 = 0; v659 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed; v35 = (signed int)stru_5C6E00->uIntegerHalfPi / 2; LABEL_124: @@ -5748,21 +5751,21 @@ goto LABEL_83; v331 = v3->spellnum; v332 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v331, v1); + pGame->GetStru6()->SetPlayerBuffAnim(v331, 0); v83 = 1; v333 = v3->spellnum; v334 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v333, 1u); + pGame->GetStru6()->SetPlayerBuffAnim(v333, 1); v335 = v3->spellnum; v336 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v335, 2u); + pGame->GetStru6()->SetPlayerBuffAnim(v335, 2); v337 = v3->spellnum; v338 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v337, 3u); - v673 = v1; + pGame->GetStru6()->SetPlayerBuffAnim(v337, 3); + v673 = 0; v732 = (int)v733 << 7; - v662 = v1; - v655 = v1; + v662 = 0; + v655 = 0; v652 = v731; v183 = (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335); v137 = (char *)&pParty->pPartyBuffs[3]; @@ -5796,29 +5799,29 @@ if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; v342 = *(int *)&v3->field_C; - if ( v342 == v1 ) + if ( v342 == 0 ) { v345 = v3->uPlayerID_2; v346 = v3->spellnum; v347 = pGame->GetStru6(); pGame->GetStru6()->SetPlayerBuffAnim(v346, v345); - v668 = v1; - v658 = v1; + v668 = 0; + v658 = 0; v653 = amount; LODWORD(v28) = LODWORD(pParty->uTimePlayed) + 1280; v651 = v731; - HIDWORD(v650) = v1 + ((pParty->uTimePlayed + 1280) >> 32); + HIDWORD(v650) = 0 + ((pParty->uTimePlayed + 1280) >> 32); v27 = (char *)&pParty->pPlayers[v3->uPlayerID_2].pPlayerBuffs[4]; goto LABEL_104; } if ( (v342 & 7) == OBJECT_Actor) { v343 = v342 >> 3; - HIDWORD(v344) = v1 + ((pParty->uTimePlayed + 1280) >> 32); + HIDWORD(v344) = 0 + ((pParty->uTimePlayed + 1280) >> 32); LODWORD(v344) = LODWORD(pParty->uTimePlayed) + 1280; - pActors[v343].pActorBuffs[11].Apply(v344, v731, amount, v1, v1); + pActors[v343].pActorBuffs[11].Apply(v344, v731, amount, 0, 0); BYTE2(pActors[v343].uAttributes) |= 8u; - v672 = v1; + v672 = 0; v661 = &pActors[v343]; LABEL_165: v56 = pGame->GetStru6(); @@ -5834,7 +5837,7 @@ { if ( v349 == 1 ) { - amount = v1; + amount = 0; goto LABEL_679; } LABEL_677: @@ -5853,13 +5856,13 @@ goto LABEL_1056; if ( v731 == 4 ) { - LODWORD(v351->pConditions[0]) = v1; - HIDWORD(v351->pConditions[0]) = v1; + LODWORD(v351->pConditions[0]) = 0; + HIDWORD(v351->pConditions[0]) = 0; goto LABEL_904; } v732 = amount << 7; v351->DiscardConditionIfLastsLongerThan( - v1, + 0, (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335)); if ( HIDWORD(pParty->pPlayers[v3->uPlayerID_2].pConditions[0]) | LODWORD(pParty->pPlayers[v3->uPlayerID_2].pConditions[0]) ) goto LABEL_1056; @@ -5880,16 +5883,16 @@ v362 = v3->spellnum; v363 = pGame->GetStru6(); pGame->GetStru6()->SetPlayerBuffAnim(v362, v361); - v668 = v1; + v668 = 0; v732 = (int)v733 << 7; - v658 = v1; - v653 = v1; + v658 = 0; + v653 = 0; v651 = v731; v28 = pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335); v27 = (char *)&pParty->pPlayers[v3->uPlayerID_2].pPlayerBuffs[11]; goto LABEL_103; } - a2 = v1; + a2 = 0; v732 = (int)v733 << 7; v717 = (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335); v357 = pParty->pPlayers;//[0].pPlayerBuffs[11]; @@ -5899,7 +5902,7 @@ v359 = v3->spellnum; v360 = pGame->GetStru6(); pGame->GetStru6()->SetPlayerBuffAnim(v359, v358); - v357->pPlayerBuffs[11].Apply(pParty->uTimePlayed + v717, v731, v1, v1, v1); + v357->pPlayerBuffs[11].Apply(pParty->uTimePlayed + v717, v731, 0, 0, 0); ++a2; ++v357;// = (SpellBuff *)((char *)v357 + 6972); } @@ -5923,17 +5926,17 @@ a1.field_4C = v2; a1.field_50 = v731; a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); - a1.uAttributes = v1; - a1.uSectorID = v1; - a1.uSpriteFrameID = v1; + a1.uAttributes = 0; + a1.uSectorID = 0; + a1.uSpriteFrameID = 0; v368 = v3->uPlayerID; a1.field_60_distance_related_prolly_lod = 0; - a1.uFacing = v1; + a1.uFacing = 0; v368 *= 8; LOBYTE(v368) = v368 | OBJECT_Player; a1.field_58_pid = v368; a1.uSoundID = LOWORD(v3->field_10); - for ( a2 = v1; a2 < (signed int)v726; ++a2 ) + for ( a2 = 0; a2 < (signed int)v726; ++a2 ) { v369 = &pActors[dword_50BF30[a2]]; if ( MonsterStats::BelongsToSupertype(v369->pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) ) @@ -5943,28 +5946,25 @@ v732 = v369->uActorHeight; a1.vPosition.z = v369->vPosition.z - (unsigned int)(signed __int64)((double)v732 * unk_4D8548); v370 = 8 * dword_50BF30[a2]; - LOBYTE(v370) = v370 | 3; + LOBYTE(v370) = v370 | OBJECT_Actor; a1.field_5C = v370; - a1.Create(0, v1, v1, v1); + a1.Create(0, 0, 0, 0); v732 = (int)v733 << 7; v369->pActorBuffs[4].Apply( pParty->uTimePlayed + (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335), - v731, - v1, - v1, - v1); + v731, 0, 0, 0); } } goto LABEL_1056; case 53: v371 = v12 - 2; if ( v371 && (v372 = v371 - 1) != 0 && v372 == 1 ) - amount = v1; + amount = 0; else amount = 86400 * v2; if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; - pOtherOverlayList->_4418B1(5080, v3->uPlayerID_2 + 100, v1, 65536); + pOtherOverlayList->_4418B1(5080, v3->uPlayerID_2 + 100, 0, 65536); v373 = v3->uPlayerID_2; if ( !(HIDWORD(pParty->pPlayers[v373].pConditions[14]) | LODWORD(pParty->pPlayers[v373].pConditions[14])) ) goto LABEL_1056; @@ -5973,11 +5973,11 @@ if ( v14 ) { v374 = v3->uPlayerID_2; - LODWORD(pParty->pPlayers[v374].pConditions[14]) = v1; - HIDWORD(pParty->pPlayers[v374].pConditions[14]) = v1; + LODWORD(pParty->pPlayers[v374].pConditions[14]) = 0; + HIDWORD(pParty->pPlayers[v374].pConditions[14]) = 0; v376 = v3->uPlayerID_2; - LODWORD(pParty->pPlayers[v376].pConditions[13]) = v1; - HIDWORD(pParty->pPlayers[v376].pConditions[13]) = v1; + LODWORD(pParty->pPlayers[v376].pConditions[13]) = 0; + HIDWORD(pParty->pPlayers[v376].pConditions[13]) = 0; } else { @@ -6015,15 +6015,15 @@ while ( v382 <= 4 ); v384 = 0; v730 = v381; - if ( v381 > v1 ) + if ( v381 > 0 ) { do HIDWORD(v733) += pPlayers[v682[v384++]]->sHealth; while ( v384 < v381 ); } v732 = (signed __int64)((double)SHIDWORD(v733) / (double)v730); - HIDWORD(v733) = v1; - if ( v381 > v1 ) + HIDWORD(v733) = 0; + if ( v381 > 0 ) { do { @@ -6034,10 +6034,10 @@ if ( v726->sHealth > v386 ) *(int *)(*(int *)v385 + 6460) = v726->GetMaxHealth(); v387 = *(Player **)v385; - if ( v387->sHealth > v1 ) + if ( v387->sHealth > 0 ) { - LODWORD(v387->pConditions[13]) = v1; - HIDWORD(v387->pConditions[13]) = v1; + LODWORD(v387->pConditions[13]) = 0; + HIDWORD(v387->pConditions[13]) = 0; } v388 = HIDWORD(v733); v389 = LOWORD(v682[HIDWORD(v733)]) - 1; @@ -6071,7 +6071,7 @@ goto LABEL_751; } if ( v394 == 1 ) - amount = v1; + amount = 0; LABEL_751: if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; @@ -6080,18 +6080,18 @@ || HIDWORD(pParty->pPlayers[v396].pConditions[14]) | LODWORD(pParty->pPlayers[v396].pConditions[14]) ) { if ( !(HIDWORD(pParty->pPlayers[v396].pConditions[1]) | LODWORD(pParty->pPlayers[v396].pConditions[1])) ) - pParty->pPlayers[v396].PlaySound(SPEECH_25, v1); + pParty->pPlayers[v396].PlaySound(SPEECH_25, 0); if ( v731 == 4 ) { v397 = v3->uPlayerID_2; - LODWORD(pParty->pPlayers[v397].pConditions[16]) = v1; - HIDWORD(pParty->pPlayers[v397].pConditions[16]) = v1; + LODWORD(pParty->pPlayers[v397].pConditions[16]) = 0; + HIDWORD(pParty->pPlayers[v397].pConditions[16]) = 0; v398 = v3->uPlayerID_2; - LODWORD(pParty->pPlayers[v398].pConditions[14]) = v1; - HIDWORD(pParty->pPlayers[v398].pConditions[14]) = v1; + LODWORD(pParty->pPlayers[v398].pConditions[14]) = 0; + HIDWORD(pParty->pPlayers[v398].pConditions[14]) = 0; v399 = v3->uPlayerID_2; - LODWORD(pParty->pPlayers[v399].pConditions[13]) = v1; - HIDWORD(pParty->pPlayers[v399].pConditions[13]) = v1; + LODWORD(pParty->pPlayers[v399].pConditions[13]) = 0; + HIDWORD(pParty->pPlayers[v399].pConditions[13]) = 0; } else { @@ -6130,7 +6130,7 @@ { if ( v406 == 1 ) { - amount = v1; + amount = 0; goto LABEL_768; } LABEL_766: @@ -6167,7 +6167,7 @@ { if ( v412 == 1 ) { - amount = v1; + amount = 0; goto LABEL_780; } v413 = 180 * v2; @@ -6202,7 +6202,7 @@ case 59: if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; - if ( a2 == v1 || (a2 & 7) != OBJECT_Actor) + if ( a2 == 0 || (a2 & 7) != OBJECT_Actor) goto LABEL_1056; v417 = (int)&pActors[a2 >> 3]; v730 = v417; @@ -6212,7 +6212,7 @@ v417 = v730; } v418 = *(int *)(v417 + 672); - HIDWORD(v733) = v1; + HIDWORD(v733) = 0; if ( pItemsTable->pItems[v418].uEquipType == 18 ) HIDWORD(v733) = *(int *)(v417 + 684); @@ -6220,14 +6220,14 @@ v683.Reset(); v419 = *(short *)(v730 + 180); - if ( v419 != (short)v1 ) + if (v419) { v683.uItemID = v419; goto LABEL_799; } v420 = 0; v421 = v730 + 564; - while ( *(int *)v421 == v1 || pItemsTable->pItems[*(int *)v421].uEquipType == 18 ) + while ( !*(int *)v421 || pItemsTable->pItems[*(int *)v421].uEquipType == 18 ) { ++v420; v421 += 36; @@ -6236,12 +6236,12 @@ } memcpy(&v683, (const void *)(v730 + 36 * v420 + 564), sizeof(v683)); v2 = v723; - v1 = 0; + //v1 = 0; LABEL_799: - if ( HIDWORD(v733) != v1 ) + if ( HIDWORD(v733) != 0 ) { v675 = (const char *)HIDWORD(v733); - if ( v683.uItemID != v1 ) + if (v683.uItemID) { v422 = v683.GetDisplayName(); sprintf(pTmpBuf2, "(%s), and %d gold", v422, v675); @@ -6250,7 +6250,7 @@ v664 = "%d gold"; goto LABEL_803; } - if ( v683.uItemID != v1 ) + if (v683.uItemID) { v675 = v683.GetDisplayName(); v664 = "(%s)"; @@ -6304,10 +6304,7 @@ v732 = amount << 7; pActors[v426].pActorBuffs[9].Apply( pParty->uTimePlayed + (signed __int64)((double)(amount << 7) * 0.033333335), - v731, - v1, - v1, - v1); + v731, 0, 0, 0); pActors[v426].pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Long; } a1.stru_24.Reset(); @@ -6334,10 +6331,7 @@ v732 = amount << 7; pActors[v427].pActorBuffs[12].Apply( pParty->uTimePlayed + (signed __int64)((double)(amount << 7) * 0.033333335), - v731, - v1, - v1, - v1); + v731, 0, 0, 0); } a1.stru_24.Reset(); a1.field_48 = v3->spellnum; @@ -6364,17 +6358,17 @@ a1.field_4C = v2; a1.field_50 = v731; a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); - a1.uAttributes = v1; - a1.uSectorID = v1; - a1.uSpriteFrameID = v1; + a1.uAttributes = 0; + a1.uSectorID = 0; + a1.uSpriteFrameID = 0; v432 = v3->uPlayerID; a1.field_60_distance_related_prolly_lod = 0; - a1.uFacing = v1; + a1.uFacing = 0; v432 *= 8; LOBYTE(v432) = v432 | OBJECT_Player; a1.field_58_pid = v432; a1.uSoundID = LOWORD(v3->field_10); - for ( a2 = v1; a2 < (signed int)v726; ++a2 ) + for ( a2 = 0; a2 < (signed int)v726; ++a2 ) { v433 = &pActors[dword_50BF30[a2]]; if ( MonsterStats::BelongsToSupertype(v433->pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) ) @@ -6384,25 +6378,22 @@ v732 = v433->uActorHeight; a1.vPosition.z = v433->vPosition.z - (unsigned int)(signed __int64)((double)v732 * unk_4D8548); v434 = 8 * dword_50BF30[a2]; - LOBYTE(v434) = v434 | 3; + LOBYTE(v434) = v434 | OBJECT_Actor; a1.field_5C = v434; - a1.Create(0, v1, v1, v1); + a1.Create(0, 0, 0, 0); if ( stru_50C198.GetMagicalResistance(v433, 7u) ) { v732 = amount << 7; v433->pActorBuffs[4].Apply( pParty->uTimePlayed + (signed __int64)((double)(amount << 7) * 0.033333335), - v731, - v1, - v1, - v1); + v731, 0, 0, 0); } } goto LABEL_1056; case 64: v435 = v12 - 2; if ( v435 && (v436 = v435 - 1) != 0 && v436 == 1 ) - amount = v1; + amount = 0; else amount = 86400 * v2; if ( !pPlayer->CanCastSpell(uRequiredMana) ) @@ -6415,12 +6406,12 @@ if ( HIDWORD(pParty->pPlayers[v440].pConditions[5]) | LODWORD(pParty->pPlayers[v440].pConditions[5]) ) { if ( !(HIDWORD(pParty->pPlayers[v440].pConditions[1]) | LODWORD(pParty->pPlayers[v440].pConditions[1])) ) - pParty->pPlayers[v440].PlaySound(SPEECH_25, v1); + pParty->pPlayers[v440].PlaySound(SPEECH_25, 0); if ( v731 == 4 ) { v441 = v3->uPlayerID_2; - LODWORD(pParty->pPlayers[v441].pConditions[5]) = v1; - HIDWORD(pParty->pPlayers[v441].pConditions[5]) = v1; + LODWORD(pParty->pPlayers[v441].pConditions[5]) = 0; + HIDWORD(pParty->pPlayers[v441].pConditions[5]) = 0; } else { @@ -6431,7 +6422,7 @@ } v377 = &pParty->pPlayers[v3->uPlayerID_2]; LABEL_720: - v377->SetCondition(1u, v1); + v377->SetCondition(1, 0); } goto LABEL_1056; case 42: @@ -6496,7 +6487,7 @@ v447 = &pLevelDecorations[v445]; dword_507CD8 = 1; v448 = v447->field_16_event_id; - if ( v448 != (short)v1 ) + if (v448) { v677 = 1; v446 = v448; @@ -6508,7 +6499,7 @@ { GlobalEventInfo = (int)v447; EventProcessor(stru_5E4C90._decor_events[v447->_idx_in_stru123 - 75] + 380, 0, 1); - GlobalEventInfo = v1; + GlobalEventInfo = 0; } } } @@ -6522,7 +6513,7 @@ { if ( v452 == 1 ) { - amount = v1; + amount = 0; goto LABEL_883; } v453 = 180 * v2; @@ -6551,8 +6542,8 @@ if ( v731 == 4 ) { LABEL_637: - *(int *)v324 = v1; - *((int *)v324 + 1) = v1; + *(int *)v324 = 0; + *((int *)v324 + 1) = 0; goto LABEL_1056; } v732 = amount << 7; @@ -6586,7 +6577,7 @@ if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; v460 = *(int *)&v3->field_C; - if ( v460 == v1 ) + if (!v460) { pParty->pPlayers[v3->uPlayerID_2].Heal(amount); LABEL_904: @@ -6630,7 +6621,7 @@ { if ( v465 == 1 ) { - amount = v1; + amount = 0; goto LABEL_912; } LABEL_910: @@ -6655,14 +6646,14 @@ goto LABEL_1056; if ( v731 == 4 ) { - LODWORD(pParty->pPlayers[v470].pConditions[6]) = v1; - HIDWORD(pParty->pPlayers[v470].pConditions[6]) = v1; + LODWORD(pParty->pPlayers[v470].pConditions[6]) = 0; + HIDWORD(pParty->pPlayers[v470].pConditions[6]) = 0; v471 = v3->uPlayerID_2; - LODWORD(pParty->pPlayers[v471].pConditions[8]) = v1; - HIDWORD(pParty->pPlayers[v471].pConditions[8]) = v1; + LODWORD(pParty->pPlayers[v471].pConditions[8]) = 0; + HIDWORD(pParty->pPlayers[v471].pConditions[8]) = 0; v472 = v3->uPlayerID_2; - LODWORD(pParty->pPlayers[v472].pConditions[10]) = v1; - HIDWORD(pParty->pPlayers[v472].pConditions[10]) = v1; + LODWORD(pParty->pPlayers[v472].pConditions[10]) = 0; + HIDWORD(pParty->pPlayers[v472].pConditions[10]) = 0; goto LABEL_1056; } v732 = amount << 7; @@ -6683,19 +6674,19 @@ goto LABEL_83; v474 = v3->spellnum; v475 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v474, v1); + pGame->GetStru6()->SetPlayerBuffAnim(v474, 0); v476 = v3->spellnum; v477 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v476, 1u); + pGame->GetStru6()->SetPlayerBuffAnim(v476, 1); v478 = v3->spellnum; v479 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v478, 2u); + pGame->GetStru6()->SetPlayerBuffAnim(v478, 2); v480 = v3->spellnum; v481 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v480, 3u); - v668 = v1; + pGame->GetStru6()->SetPlayerBuffAnim(v480, 3); + v668 = 0; v732 = (int)v733 << 7; - v658 = v1; + v658 = 0; v653 = v2; v651 = v731; v26 = (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335); @@ -6710,22 +6701,22 @@ { v482 = v3->spellnum; v483 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v482, v1); + pGame->GetStru6()->SetPlayerBuffAnim(v482, 0); v484 = v3->spellnum; v485 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v484, 1u); + pGame->GetStru6()->SetPlayerBuffAnim(v484, 1); v486 = v3->spellnum; v487 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v486, 2u); + pGame->GetStru6()->SetPlayerBuffAnim(v486, 2); v488 = v3->spellnum; v489 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v488, 3u); + pGame->GetStru6()->SetPlayerBuffAnim(v488, 3); v732 = (int)v733 << 7; v717 = (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335); - pParty->pPlayers[0].pPlayerBuffs[6].Apply(pParty->uTimePlayed + v717, 4u, v2, v2, v1); - pParty->pPlayers[1].pPlayerBuffs[6].Apply(pParty->uTimePlayed + v717, 4u, v2, v2, v1); - pParty->pPlayers[2].pPlayerBuffs[6].Apply(pParty->uTimePlayed + v717, 4u, v2, v2, v1); - v668 = v1; + pParty->pPlayers[0].pPlayerBuffs[6].Apply(pParty->uTimePlayed + v717, 4u, v2, v2, 0); + pParty->pPlayers[1].pPlayerBuffs[6].Apply(pParty->uTimePlayed + v717, 4u, v2, v2, 0); + pParty->pPlayers[2].pPlayerBuffs[6].Apply(pParty->uTimePlayed + v717, 4u, v2, v2, 0); + v668 = 0; v658 = v2; v653 = v2; LODWORD(v28) = LODWORD(pParty->uTimePlayed) + v717; @@ -6738,7 +6729,7 @@ v491 = v3->spellnum; v492 = pGame->GetStru6(); pGame->GetStru6()->SetPlayerBuffAnim(v491, v490); - v668 = v1; + v668 = 0; v732 = (int)v733 << 7; v658 = v2; v653 = v2; @@ -6749,7 +6740,7 @@ case 74: v493 = v12 - 2; if ( v493 && (v494 = v493 - 1) != 0 && v494 == 1 ) - amount = v1; + amount = 0; else amount = 86400 * v2; if ( !pPlayer->CanCastSpell(uRequiredMana) ) @@ -6765,14 +6756,14 @@ goto LABEL_1056; if ( v731 == 4 ) { - LODWORD(pParty->pPlayers[v498].pConditions[7]) = v1; - HIDWORD(pParty->pPlayers[v498].pConditions[7]) = v1; + LODWORD(pParty->pPlayers[v498].pConditions[7]) = 0; + HIDWORD(pParty->pPlayers[v498].pConditions[7]) = 0; v499 = v3->uPlayerID_2; - LODWORD(pParty->pPlayers[v499].pConditions[9]) = v1; - HIDWORD(pParty->pPlayers[v499].pConditions[9]) = v1; + LODWORD(pParty->pPlayers[v499].pConditions[9]) = 0; + HIDWORD(pParty->pPlayers[v499].pConditions[9]) = 0; v500 = v3->uPlayerID_2; - LODWORD(pParty->pPlayers[v500].pConditions[11]) = v1; - HIDWORD(pParty->pPlayers[v500].pConditions[11]) = v1; + LODWORD(pParty->pPlayers[v500].pConditions[11]) = 0; + HIDWORD(pParty->pPlayers[v500].pConditions[11]) = 0; } else { @@ -6793,10 +6784,12 @@ } goto LABEL_1056; case 77: + { amount = 5 * v2 + 10; if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; v501 = pParty->pPlayers; + int v1 = 0; do { v502 = v3->spellnum; @@ -6808,6 +6801,7 @@ } while ( (signed int)v501 < (signed int)pParty->pHirelings ); goto LABEL_1056; + } case 80: sRecoveryTime -= v2; if ( !pPlayer->CanCastSpell(uRequiredMana) ) @@ -6817,26 +6811,26 @@ v505 = sub_46A6AC((int)dword_50BF30, 100, 4096); ++a1.uItemType; HIDWORD(v733) = v505; - v690 = v1; - v689 = v1; - v688 = v1; + v690 = 0; + v689 = 0; + v688 = 0; a1.stru_24.Reset(); a1.field_48 = v3->spellnum; a1.field_4C = v2; a1.field_50 = v731; a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); - a1.uAttributes = v1; - a1.uSectorID = v1; - a1.uSpriteFrameID = v1; + a1.uAttributes = 0; + a1.uSectorID = 0; + a1.uSpriteFrameID = 0; v506 = v3->uPlayerID; a1.field_60_distance_related_prolly_lod = 0; - a1.uFacing = v1; + a1.uFacing = 0; v506 *= 8; LOBYTE(v506) = v506 | OBJECT_Player; a1.field_58_pid = v506; a1.uSoundID = LOWORD(v3->field_10); - a2 = v1; - if ( SHIDWORD(v733) > v1 ) + a2 = 0; + if ( SHIDWORD(v733) > 0 ) { do { @@ -6846,16 +6840,16 @@ v732 = pActors[v507].uActorHeight; a1.vPosition.z = pActors[v507].vPosition.z - (unsigned int)(signed __int64)((double)v732 * unk_4D8548); v508 = 8 * dword_50BF30[a2]; - LOBYTE(v508) = v508 | 3; + LOBYTE(v508) = v508 | OBJECT_Actor; a1.field_5C = v508; - v509 = a1.Create(0, v1, v1, v1); + v509 = a1.Create(0, 0, 0, 0); v510 = a2; - DamageMonsterFromParty(8 * v509 | 2, dword_50BF30[a2], (Vec3_int_ *)&v688); + DamageMonsterFromParty(8 * v509 | OBJECT_Item, dword_50BF30[a2], (Vec3_int_ *)&v688); a2 = v510 + 1; } while ( v510 + 1 < SHIDWORD(v733) ); } - for ( a2 = v1; a2 < SHIDWORD(v733); ++a2 ) + for ( a2 = 0; a2 < SHIDWORD(v733); ++a2 ) { v511 = &pActors[dword_50BF30[a2]]; a1.vPosition.x = v511->vPosition.x; @@ -6863,9 +6857,9 @@ v732 = v511->uActorHeight; a1.vPosition.z = v511->vPosition.z - (unsigned int)(signed __int64)((double)v732 * unk_4D8548); v512 = 8 * dword_50BF30[a2]; - LOBYTE(v512) = v512 | 3; + LOBYTE(v512) = v512 | OBJECT_Actor; a1.field_5C = v512; - a1.Create(0, v1, v1, v1); + a1.Create(0, 0, 0, 0); v513 = v511->pActorBuffs; v726 = (Player *)22; do @@ -6901,10 +6895,10 @@ v516 = 900 * v2; amount = 3; } - v733 = __PAIR__(v1, v516); + v733 = __PAIR__(0, v516); v517 = 8 * v3->uPlayerID; LOBYTE(v517) = v517 | 4; - if ( (signed int)uNumActors > v1 ) + if ( (signed int)uNumActors > 0 ) { v518 = pActors;//[0].uAIState; v726b = uNumActors; @@ -6956,20 +6950,20 @@ goto LABEL_83; v523 = v3->spellnum; v524 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v523, v1); + pGame->GetStru6()->SetPlayerBuffAnim(v523, 0); v83 = 1; v525 = v3->spellnum; v526 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v525, 1u); + pGame->GetStru6()->SetPlayerBuffAnim(v525, 1); v527 = v3->spellnum; v528 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v527, 2u); + pGame->GetStru6()->SetPlayerBuffAnim(v527, 2); v529 = v3->spellnum; v530 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v529, 3u); - v673 = v1; + pGame->GetStru6()->SetPlayerBuffAnim(v529, 3); + v673 = 0; v732 = (int)v733 << 7; - v662 = v1; + v662 = 0; v655 = amount; v652 = v731; v183 = (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335); @@ -6987,26 +6981,26 @@ v531 = sub_46A6AC((int)dword_50BF30, 100, 4096); ++a1.uItemType; v726 = (Player *)v531; - v696 = v1; - v695 = v1; - v694 = v1; + v696 = 0; + v695 = 0; + v694 = 0; a1.stru_24.Reset(); a1.field_48 = v3->spellnum; a1.field_4C = v2; a1.field_50 = v731; a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); - a1.uAttributes = v1; - a1.uSectorID = v1; - a1.uSpriteFrameID = v1; + a1.uAttributes = 0; + a1.uSectorID = 0; + a1.uSpriteFrameID = 0; v532 = v3->uPlayerID; a1.field_60_distance_related_prolly_lod = 0; - a1.uFacing = v1; + a1.uFacing = 0; v532 *= 8; LOBYTE(v532) = v532 | OBJECT_Player; a1.field_58_pid = v532; a1.uSoundID = LOWORD(v3->field_10); - a2 = v1; - if ( (signed int)v726 > v1 ) + a2 = 0; + if ( (signed int)v726 > 0 ) { do { @@ -7016,11 +7010,11 @@ v732 = pActors[v533].uActorHeight; a1.vPosition.z = pActors[v533].vPosition.z - (unsigned int)(signed __int64)((double)v732 * unk_4D8548); v534 = 8 * dword_50BF30[a2]; - LOBYTE(v534) = v534 | 3; + LOBYTE(v534) = v534 | OBJECT_Actor; a1.field_5C = v534; - v535 = a1.Create(0, v1, v1, v1); + v535 = a1.Create(0, 0, 0, 0); v536 = a2; - DamageMonsterFromParty(8 * v535 | 2, dword_50BF30[a2], (Vec3_int_ *)&v694); + DamageMonsterFromParty(8 * v535 | OBJECT_Item, dword_50BF30[a2], (Vec3_int_ *)&v694); a2 = v536 + 1; } while ( v536 + 1 < (signed int)v726 ); @@ -7046,35 +7040,33 @@ goto LABEL_83; v541 = v3->spellnum; v542 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v541, v1); + pGame->GetStru6()->SetPlayerBuffAnim(v541, 0); v543 = v3->spellnum; v544 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v543, 1u); + pGame->GetStru6()->SetPlayerBuffAnim(v543, 1); v545 = v3->spellnum; v546 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v545, 2u); + pGame->GetStru6()->SetPlayerBuffAnim(v545, 2); v547 = v3->spellnum; v548 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v547, 3u); + pGame->GetStru6()->SetPlayerBuffAnim(v547, 3); v732 = v730 << 7; v549 = (double)(v730 << 7) * 0.033333335; *((float *)&v733 + 1) = v549; v712 = (signed __int64)v549; - pParty->pPartyBuffs[ 1].Apply(pParty->uTimePlayed + (signed __int64)v549, v731, amount, v1, v1); - pParty->pPartyBuffs[12].Apply(pParty->uTimePlayed + v712, v731, amount, v1, v1); - pParty->pPartyBuffs[ 6].Apply(pParty->uTimePlayed + v712, v731, amount, v1, v1); - pParty->pPartyBuffs[17].Apply(pParty->uTimePlayed + v712, v731, amount, v1, v1); - pParty->pPartyBuffs[ 0].Apply(pParty->uTimePlayed + v712, v731, amount, v1, v1); - pParty->pPartyBuffs[ 4].Apply(pParty->uTimePlayed + v712, v731, amount, v1, v1); + pParty->pPartyBuffs[ 1].Apply(pParty->uTimePlayed + (signed __int64)v549, v731, amount, 0, 0); + pParty->pPartyBuffs[12].Apply(pParty->uTimePlayed + v712, v731, amount, 0, 0); + pParty->pPartyBuffs[ 6].Apply(pParty->uTimePlayed + v712, v731, amount, 0, 0); + pParty->pPartyBuffs[17].Apply(pParty->uTimePlayed + v712, v731, amount, 0, 0); + pParty->pPartyBuffs[ 0].Apply(pParty->uTimePlayed + v712, v731, amount, 0, 0); + pParty->pPartyBuffs[ 4].Apply(pParty->uTimePlayed + v712, v731, amount, 0, 0); v550 = v2 + 5; pParty->pPartyBuffs[ 5].Apply( (signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1)), v731, - v550, - v1, - v1); - v668 = v1; - v658 = v1; + v550, 0, 0); + v668 = 0; + v658 = 0; v653 = v550; v651 = v731; v28 = (signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1)); @@ -7109,30 +7101,27 @@ y = (char *)(60 * (v2 * HIDWORD(v733) + 60)); v732 = (300 * amount * v2 + 60) << 7; v730 = v2 + 5; - v726 = (Player *)v1; + v726 = 0; v553 = pParty->pPlayers;//[0].pConditions[1]; *((float *)&v733 + 1) = (double)v732 * 0.033333335; do { v554 = v3->spellnum; v555 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v554, v1); + pGame->GetStru6()->SetPlayerBuffAnim(v554, 0); v556 = v3->spellnum; v557 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v556, 1u); + pGame->GetStru6()->SetPlayerBuffAnim(v556, 1); v558 = v3->spellnum; v559 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v558, 2u); + pGame->GetStru6()->SetPlayerBuffAnim(v558, 2); v560 = v3->spellnum; v561 = pGame->GetStru6(); - pGame->GetStru6()->SetPlayerBuffAnim(v560, 3u); + pGame->GetStru6()->SetPlayerBuffAnim(v560, 3); //((SpellBuff *)(v553 + 6056))->Apply( v553->pPlayerBuffs[4].Apply( (signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1)), - v731, - v730, - v1, - v1); + v731, v730, 0, 0); if ( *(_QWORD *)v553 ) v726 = (Player *)1; ++v553; @@ -7141,27 +7130,18 @@ v562 = v731; pParty->pPartyBuffs[9].Apply( (signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1)), - v731, - v730, - v1, - v1); + v731, v730, 0, 0); pParty->pPartyBuffs[14].Apply( (signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1)), - v562, - v1, - v1, - v1); + v562, 0, 0, 0); pParty->pPartyBuffs[15].Apply( (signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1)), - v562, - v730, - v1, - v1); - if ( v726 != (Player *)v1 ) + v562, v730, 0, 0); + if (v726) goto LABEL_1056; - v668 = v1; + v668 = 0; v732 = (int)y << 7; - v658 = v1; + v658 = 0; v653 = v730; v651 = v562; v28 = (signed __int64)((double)(signed int)((int)y << 7) * 0.033333335 @@ -7174,7 +7154,7 @@ goto LABEL_200; if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; - a2 = v1; + a2 = 0; _this = (ItemGen *)&pPlayers[1]; do { @@ -7182,9 +7162,9 @@ do { v564 = _this->uItemID; - *(int *)(v563 + _this->uItemID) = v1; + *(int *)(v563 + _this->uItemID) = 0; v563 += 8; - *(int *)(v563 + v564 - 4) = v1; + *(int *)(v563 + v564 - 4) = 0; } while ( v563 <= 128 ); v565 = ((Player *)_this->uItemID)->GetMaxHealth(); @@ -7234,7 +7214,7 @@ if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; v576 = *(int *)&v3->field_C; - if ( v576 == v1 ) + if (!v576) { v583 = v3->uPlayerID_2; v584 = v3->spellnum; @@ -7259,7 +7239,7 @@ } v578 = (int)&pActors[(int)v577]; v721 = v578; - if ( *(short *)(v578 + 40) > (signed __int16)v1 || (v579 = *(short *)(v578 + 176), v579 != 5) && v579 != 4 ) + if ( *(short *)(v578 + 40) > 0 || (v579 = *(short *)(v578 + 176), v579 != 5) && v579 != 4 ) goto LABEL_200; ++a1.uItemType; a1.stru_24.Reset(); @@ -7267,15 +7247,15 @@ a1.field_4C = v2; a1.field_50 = v731; a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); - a1.uAttributes = v1; - a1.uSectorID = v1; - a1.uSpriteFrameID = v1; + a1.uAttributes = 0; + a1.uSectorID = 0; + a1.uSpriteFrameID = 0; v580 = v3->uPlayerID; a1.field_60_distance_related_prolly_lod = 0; v581 = v721; v580 *= 8; LOBYTE(v580) = v580 | OBJECT_Player; - a1.uFacing = v1; + a1.uFacing = 0; a1.field_58_pid = v580; a1.uSoundID = LOWORD(v3->field_10); a1.vPosition.x = *(short *)(v721 + 142); @@ -7283,9 +7263,9 @@ v732 = *(short *)(v721 + 138); v582 = 8 * (int)v726; a1.vPosition.z = *(short *)(v721 + 146) - (unsigned int)(signed __int64)((double)v732 * unk_4D8548); - LOBYTE(v582) = 8 * (char)v726 | 3; + LOBYTE(v582) = 8 * (char)v726 | OBJECT_Actor; a1.field_5C = v582; - a1.Create(0, v1, v1, v1); + a1.Create(0, 0, 0, 0); if ( *(char *)(v581 + 52) > amount ) goto LABEL_83; Actor::Resurrect((unsigned int)v726); @@ -7297,7 +7277,7 @@ *(char *)(v581 + 57) = 0; *(int *)(v581 + 712) = 9999; *(char *)(v581 + 38) &= 0xF7u; - *(int *)(v581 + 708) = v1; + *(int *)(v581 + 708) = 0; ((SpellBuff *)(v581 + 356))->Reset(); ((SpellBuff *)(v581 + 228))->Reset(); ((SpellBuff *)(v581 + 404))->Reset(); @@ -7310,7 +7290,7 @@ if ( v588 && (v589 = v588 - 1) != 0 && (v590 = v589 - 1) != 0 ) { if ( v590 == 1 ) - LODWORD(v733) = v1; + LODWORD(v733) = 0; } else { @@ -7323,8 +7303,8 @@ ((ItemGen *)HIDWORD(v733))->UpdateTempBonus(pParty->uTimePlayed); if ( *(int *)HIDWORD(v733) >= 64 && *(int *)HIDWORD(v733) <= 65 || *(char *)(HIDWORD(v733) + 20) & 2 - || *(int *)(HIDWORD(v733) + 12) != v1 - || *(int *)(HIDWORD(v733) + 4) != v1 + || *(int *)(HIDWORD(v733) + 12) != 0 + || *(int *)(HIDWORD(v733) + 4) != 0 || (v591 = *(char *)(v732 + 28)) != 0 && v591 != 1 && v591 != 2 || pItemsTable->IsMaterialNonCommon((ItemGen *)HIDWORD(v733)) ) goto LABEL_199; @@ -7368,13 +7348,13 @@ a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); a1.vPosition.x = pParty->vPosition.x; a1.vPosition.y = pParty->vPosition.y; - a1.uAttributes = v1; + a1.uAttributes = 0; a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 2; a1.uSectorID = pIndoor->GetSector( pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + (signed int)pParty->uPartyHeight / 2); - a1.uSpriteFrameID = v1; + a1.uSpriteFrameID = 0; v595 = 8 * v3->uPlayerID; LOBYTE(v595) = v595 | OBJECT_Player; a1.field_58_pid = v595; @@ -7434,10 +7414,7 @@ v732 = (int)v733 << 7; pActors[v599].pActorBuffs[12].Apply( pParty->uTimePlayed + (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335), - v731, - v1, - v1, - v1); + v731, 0, 0, 0); a1.stru_24.Reset(); a1.field_48 = v3->spellnum; a1.field_4C = v2; @@ -7457,9 +7434,9 @@ a1.vPosition.z = v603 + v602; v657 = v601; LABEL_1087: - a1.uAttributes = v1; + a1.uAttributes = 0; a1.uSectorID = pIndoor->GetSector(v657, v665, v676); - a1.uSpriteFrameID = v1; + a1.uSpriteFrameID = 0; v604 = 8 * v3->uPlayerID; LOBYTE(v604) = v604 | OBJECT_Player; a1.field_58_pid = v604; @@ -7469,18 +7446,18 @@ LOWORD(v604) = LOWORD(v3->field_10); LOBYTE(a1.uAttributes) |= 0x80u; a1.uSoundID = v604; - a1.Create(0, v1, v1, v3->uPlayerID + 1); + a1.Create(0, 0, 0, v3->uPlayerID + 1); goto LABEL_1056; case 96: if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; - HIDWORD(v733) = v1; - memset(&pStru179, v1, 0xFA0u); - _this = (ItemGen *)v1; + HIDWORD(v733) = 0; + memset(&pStru179, 0, 0xFA0u); + _this = 0; v605 = (char *)pParty->pHirelings; do { - if ( *(int *)v605 != v1 ) + if ( *(int *)v605) { v606 = HIDWORD(v733)++; pStru179.field_0[v606] = (int)((char *)&_this->uItemID + 1); @@ -7489,16 +7466,16 @@ v605 += 76; } while ( (signed int)v605 < (signed int)&pParty->pPickedItem ); - _this = (ItemGen *)v1; - if ( (signed int)pNPCStats->uNumNewNPCs > v1 ) + _this = 0; + if ( (signed int)pNPCStats->uNumNewNPCs > 0) { v730 = (int)pNPCStats->pNewNPCData; HIDWORD(v733) = 4 * HIDWORD(v733) + 6043152; do { if ( *(char *)(v730 + 8) & 0x80 - && (pParty->pHirelings[0].pName == (char *)v1 || strcmp(*(const char **)v730, pParty->pHirelings[0].pName)) - && (pParty->pHirelings[1].pName == (char *)v1 || strcmp(*(const char **)v730, pParty->pHirelings[1].pName)) ) + && (!pParty->pHirelings[0].pName || strcmp(*(const char **)v730, pParty->pHirelings[0].pName)) + && (!pParty->pHirelings[1].pName || strcmp(*(const char **)v730, pParty->pHirelings[1].pName)) ) { v607 = HIDWORD(v733); HIDWORD(v733) += 4; @@ -7511,11 +7488,11 @@ } v608 = v3->uPlayerID_2; if ( v608 != 4 && v608 != 5 - || (v609 = (signed int)*(&pFontCChar + v608 + (unsigned __int8)pParty->field_709), v609 <= v1) + || (v609 = (signed int)*(&pFontCChar + v608 + (unsigned __int8)pParty->field_709), v609 <= 0) || v609 >= 3 ) goto LABEL_200; v610 = 76 * v609; - *((int *)&pParty->pPlayers[3].pInstalledBeacons[4].uBeaconTime + 19 * v609) = v1; + *((int *)&pParty->pPlayers[3].pInstalledBeacons[4].uBeaconTime + 19 * v609) = 0; v611 = pIconsFrameTable->FindIcon("spell96"); *(int *)((char *)&pParty->pPlayers[3].pInstalledBeacons[4].uBeaconTime + v610 + 4) = pIconsFrameTable->GetIconAnimLength( v611); @@ -7538,7 +7515,7 @@ LODWORD(v727) = v232; goto LABEL_83; case 95: - if ( v12 <= v1 ) + if ( v12 <= 0 ) goto LABEL_1119; if ( v12 <= 3 ) { @@ -7562,7 +7539,7 @@ v617 = v3->spellnum; v618 = pGame->GetStru6(); pGame->GetStru6()->SetPlayerBuffAnim(v617, v616); - v668 = v1; + v668 = 0; v658 = v716; v732 = (int)v733 << 7; v653 = v615; @@ -7571,7 +7548,7 @@ v27 = (char *)&pParty->pPlayers[v3->uPlayerID_2].pPlayerBuffs[10]; goto LABEL_103; } - a2 = v1; + a2 = 0; v732 = (int)v733 << 7; v717 = (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335); v619 = pParty->pPlayers;//[0].pPlayerBuffs[10]; @@ -7581,7 +7558,7 @@ v621 = v3->spellnum; v622 = pGame->GetStru6(); pGame->GetStru6()->SetPlayerBuffAnim(v621, v620); - v619->pPlayerBuffs[10].Apply(pParty->uTimePlayed + v717, v731, amount, v716, v1); + v619->pPlayerBuffs[10].Apply(pParty->uTimePlayed + v717, v731, amount, v716, 0); ++a2; ++v619; } @@ -7590,30 +7567,30 @@ case 99: if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; - v726 = (Player *)v1; + v726 = 0; pGame->GetIndoorCamera(); v623 = (signed __int64)GetPickDepth(); HIDWORD(v733) = sub_46A6AC((int)dword_50BF30, 100, v623); - v709 = v1; - v708 = v1; - v707 = v1; + v709 = 0; + v708 = 0; + v707 = 0; a1.stru_24.Reset(); a1.field_48 = v3->spellnum; a1.field_4C = v2; a1.field_50 = v731; a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType); - a1.uAttributes = v1; - a1.uSectorID = v1; - a1.uSpriteFrameID = v1; + a1.uAttributes = 0; + a1.uSectorID = 0; + a1.uSpriteFrameID = 0; v624 = v3->uPlayerID; a1.field_60_distance_related_prolly_lod = 0; - a1.uFacing = v1; + a1.uFacing = 0; v624 *= 8; LOBYTE(v624) = v624 | OBJECT_Player; a1.field_58_pid = v624; a1.uSoundID = LOWORD(v3->field_10); - a2 = v1; - if ( SHIDWORD(v733) > v1 ) + a2 = 0; + if ( SHIDWORD(v733) > 0 ) { v726 = (Player *)(HIDWORD(v733) * (7 * v2 + 25)); do @@ -7624,16 +7601,16 @@ v732 = pActors[v625].uActorHeight; a1.vPosition.z = pActors[v625].vPosition.z - (unsigned int)(signed __int64)((double)v732 * unk_4D8548); v626 = 8 * dword_50BF30[a2]; - LOBYTE(v626) = v626 | 3; + LOBYTE(v626) = v626 | OBJECT_Actor; a1.field_5C = v626; - v627 = a1.Create(0, v1, v1, v1); + v627 = a1.Create(0, 0, 0, 0); v628 = a2; DamageMonsterFromParty(8 * v627 | 2, dword_50BF30[a2], (Vec3_int_ *)&v707); a2 = v628 + 1; } while ( v628 + 1 < SHIDWORD(v733) ); } - v730 = v1; + v730 = 0; v629 = 1; do { @@ -7652,8 +7629,8 @@ } while ( v629 <= 4 ); v732 = (signed __int64)((double)(signed int)v726 / (double)v730); - HIDWORD(v733) = v1; - if ( v730 > v1 ) + HIDWORD(v733) = 0; + if ( v730 > 0 ) { do { @@ -7674,7 +7651,7 @@ while ( v635 + 1 < v730 ); } v639 = pGame->GetStru6(); - pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(v1, 0x40u); + pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0, 0x40u); goto LABEL_1056; case 98: if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) @@ -7685,7 +7662,7 @@ v640 = v12 - 2; if ( !v640 || (v641 = v640 - 1) == 0 || (amount = 4, v641 != 1) ) amount = 3; - if ( pPlayer->uNumArmageddonCasts >= amount || pParty->armageddon_timer > v1 ) + if ( pPlayer->uNumArmageddonCasts >= amount || pParty->armageddon_timer > 0 ) goto LABEL_200; if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; @@ -7701,9 +7678,9 @@ v643 = rand(); v721 = v642 + pParty->vPosition.x; y = (char *)(pParty->vPosition.y + v643 % 4096 - 2048); - v732 = GetTerrainHeightsAroundParty2(v642 + pParty->vPosition.x, (int)y, (int *)&v710, v1); + v732 = GetTerrainHeightsAroundParty2(v642 + pParty->vPosition.x, (int)y, (int *)&v710, 0); v644 = rand(); - sub_42F7EB_DropItemAt(0xFE6u, v721, (int)y, v732 + 16, v644 % 500 + 500, 1, v1, v1, (ItemGen *)v1); + sub_42F7EB_DropItemAt(0xFE6u, v721, (int)y, v732 + 16, v644 % 500 + 500, 1, 0, 0, 0); v726 = (Player *)((char *)v726 - 1); } while ( *(float *)&v726 != 0.0 ); @@ -7717,8 +7694,8 @@ { if ( *((_QWORD *)v222 + 2) ) { - *((int *)v222 + 4) = v1; - *((int *)v222 + 5) = v1; + *((int *)v222 + 4) = 0; + *((int *)v222 + 5) = 0; goto LABEL_439; } } @@ -7731,7 +7708,7 @@ v222 = (char *)HIDWORD(v733); if ( v223 ) LABEL_439: - ((Player *)v222)->PlaySound(SPEECH_103, v1); + ((Player *)v222)->PlaySound(SPEECH_103, 0); } v222 += 6972; HIDWORD(v733) = (int)v222; @@ -7740,7 +7717,7 @@ continue; } } - if ( pParty->bTurnBasedModeOn == v1 ) + if ( pParty->bTurnBasedModeOn == 0 ) { v646 = pPlayer; pPlayer->SetRecoveryTime((signed __int64)(flt_6BE3A4_debug_recmod1 * 213.3333333333333)); @@ -7757,8 +7734,8 @@ pTurnEngine->_40471C(); } ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2u); - pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, v1, v1, -1, v1, v1, v1, v1); - v711[v647].spellnum = v1; + pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); + v711[v647].spellnum = 0; v646->sMana -= uRequiredMana; } //----- (0042EB42) -------------------------------------------------------- @@ -8938,7 +8915,7 @@ } //pParty->uFlags2 |= PARTY_FLAGS_2_RUNNING; -LABEL_6: +//LABEL_6: if ( !pEventTimer->bPaused ) { inputAction = (InputAction)0;