Mercurial > mm7
diff mm7_6.cpp @ 490:cc4b7981c1bb
Wands
author | Nomad |
---|---|
date | Wed, 27 Feb 2013 23:13:02 +0200 |
parents | a3939d5067c4 |
children | cb0ad52d6a26 |
line wrap: on
line diff
--- a/mm7_6.cpp Wed Feb 27 22:16:48 2013 +0200 +++ b/mm7_6.cpp Wed Feb 27 23:13:02 2013 +0200 @@ -2560,7 +2560,7 @@ //int v10; // eax@45 unsigned __int16 v11; // cx@45 signed int v12; // ecx@48 - int v13; // eax@53 + //int v13; // eax@53 unsigned __int8 v14; // zf@53 //unsigned int v15; // edx@53 //signed int v16; // eax@53 @@ -3409,7 +3409,6 @@ } v730 = v3->spellnum; - v13 = v12 + 10 * v3->spellnum; if (v3->forced_spell_skill_level) uRequiredMana = 0; else @@ -3417,7 +3416,7 @@ sRecoveryTime = pSpellDatas[v3->spellnum].recovery_per_skill[v12 - 1]; if (LODWORD(v725) == PLAYER_SKILL_DARK && pParty->uCurrentHour == 0 && pParty->uCurrentMinute == 0 || - LODWORD(v725) == PLAYER_SKILL_LIGHT && pParty->uCurrentHour == 12 && pParty->uCurrentMinute) + LODWORD(v725) == PLAYER_SKILL_LIGHT && pParty->uCurrentHour == 12 && pParty->uCurrentMinute == 0) uRequiredMana = 0; if (v3->spellnum >= PLAYER_SKILL_BOW || pPlayer->sMana >= uRequiredMana) @@ -3508,7 +3507,7 @@ } goto play_sound_and_continue; - case SPELL_102: + case SPELL_LASER_PROJECTILE: sRecoveryTime = pPlayer->GetAttackRecoveryTime(0); a1.stru_24.Reset(); a1.field_48 = v3->spellnum; @@ -7759,14 +7758,14 @@ if (laser_weapon_item_id) { shotting_laser = true; - _42777D_CastSpell_UseWand_ShootArrow(102, uActiveCharacter - 1, 0, 0, uActiveCharacter + 8); + _42777D_CastSpell_UseWand_ShootArrow(SPELL_LASER_PROJECTILE, uActiveCharacter - 1, 0, 0, uActiveCharacter + 8); } else if (wand_item_id) { shooting_wand = true; int main_hand_idx = player->pEquipment.uMainHand; - _42777D_CastSpell_UseWand_ShootArrow(*((int *)&pSpellDatas[66].uNormalLevelRecovery + player->pInventoryItems[main_hand_idx - 1].uItemID), uActiveCharacter - 1, 8, 0, uActiveCharacter + 8); + _42777D_CastSpell_UseWand_ShootArrow(wand_spell_ids[player->pInventoryItems[main_hand_idx - 1].uItemID - ITEM_WAND_FIRE], uActiveCharacter - 1, 8, 0, uActiveCharacter + 8); if (!--player->pInventoryItems[main_hand_idx - 1].uNumCharges) player->pEquipment.uMainHand = 0; @@ -7790,7 +7789,7 @@ else if (bow_idx) { shooting_bow = true; - _42777D_CastSpell_UseWand_ShootArrow(100, uActiveCharacter - 1, 0, 0, 0); + _42777D_CastSpell_UseWand_ShootArrow(SPELL_BOW_ARROW, uActiveCharacter - 1, 0, 0, 0); } else {