Mercurial > mm7
changeset 2197:42c8807225a2
UIMSG_SpellBook_PressTab continue
author | Ritor1 |
---|---|
date | Fri, 31 Jan 2014 17:30:36 +0600 |
parents | 628a0ad87136 |
children | d9caf2b3d8d5 |
files | CastSpellInfo.cpp Game.cpp Player.cpp UI/Books/UIMapBook.cpp UI/Books/UISpellBook.cpp UI/UICharacter.cpp mm7_2.cpp mm7_4.cpp |
diffstat | 8 files changed, 21 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/CastSpellInfo.cpp Fri Jan 31 00:37:26 2014 +0100 +++ b/CastSpellInfo.cpp Fri Jan 31 17:30:36 2014 +0600 @@ -1607,7 +1607,7 @@ spell_sound_flag = true; break; } - else if ( skill_level == 3 || skill_level == 4)//мастер и гранд + else if ( skill_level == 3 || skill_level == 4)//for master & GM not refactored(для мастера и гранда не отрефакторено) { v258 = 0; v725 = 0;
--- a/Game.cpp Fri Jan 31 00:37:26 2014 +0100 +++ b/Game.cpp Fri Jan 31 17:30:36 2014 +0600 @@ -3730,29 +3730,22 @@ pPlayer10->PlaySound(SPEECH_12, 0); byte_506550 = 0; continue; - case UIMSG_SpellBook_PressTab: - //__debugbreak(); + case UIMSG_SpellBook_PressTab://перелистывание страниц клавишей Tab if ( !uActiveCharacter ) continue; - pPlayer3 = pPlayers[uActiveCharacter]; pNPCData4 = 0; uAction = 0; - v101 = 0; - thisl = (int)&pPlayer3->pActiveSkills[12]; - do + for ( uint i = 0; i < 9; i++ ) { - if ( *(short *)thisl ) + if ( pPlayers[uActiveCharacter]->pActiveSkills[PLAYER_SKILL_FIRE + i] ) { - if ( pPlayer3->lastOpenedSpellbookPage == v101 ) + if ( pPlayers[uActiveCharacter]->lastOpenedSpellbookPage == i ) uAction = (int)pNPCData4; v102 = (int)pNPCData4; pNPCData4 = (NPCData *)((char *)pNPCData4 + 1); - v217[v102] = v101; + v217[v102] = i; } - thisl += 2; - ++v101; } - while ( v101 < 9 ); if ( !pNPCData4 ) { v127 = rand() % 2 + 204;
--- a/Player.cpp Fri Jan 31 00:37:26 2014 +0100 +++ b/Player.cpp Fri Jan 31 17:30:36 2014 +0600 @@ -1587,7 +1587,7 @@ totalDmg *= 2; } } - if ( (signed int)SkillToMastery(this->pActiveSkills[2]) >= 3 + if ( (signed int)SkillToMastery(this->pActiveSkills[PLAYER_SKILL_DAGGER]) >= 3 && pItemsTable->pItems[itemId].uSkillType == 2 && rand() % 100 < 10 ) totalDmg *= 3; @@ -1936,7 +1936,7 @@ } else { - v6 = this->pActiveSkills[34]; + v6 = this->pActiveSkills[PLAYER_SKILL_STEALING]; v7 = v6 & 0x3F; v8 = SkillToMastery(v6); itemvalue = itemToSteal->GetValue(); @@ -1999,7 +1999,7 @@ pGlobalTXT_LocalizationStrings[1]; if ( !(BYTE2(actroPtr->uAttributes) & 0x80) ) actroPtr->SetRandomGoldIfTheresNoItem(); - unsigned __int16 v6 = this->pActiveSkills[34]; + unsigned __int16 v6 = this->pActiveSkills[PLAYER_SKILL_STEALING]; v7 = v6 & 0x3F; stealingMastery = SkillToMastery(v6); int v30 = StealingMasteryBonuses[stealingMastery];
--- a/UI/Books/UIMapBook.cpp Fri Jan 31 00:37:26 2014 +0100 +++ b/UI/Books/UIMapBook.cpp Fri Jan 31 17:30:36 2014 +0600 @@ -112,13 +112,13 @@ } pRenderer->DrawTextureTransparent(pBtn_Book_2->uX, pBtn_Book_2->uY, v19); uNumMaxBeacons = 1; - if ( HIBYTE(pPlayer->pActiveSkills[14]) & 1 || (pPlayer->pActiveSkills[14] & 0x80u) != 0 ) + if ( HIBYTE(pPlayer->pActiveSkills[PLAYER_SKILL_WATER]) & 1 || (pPlayer->pActiveSkills[PLAYER_SKILL_WATER] & 0x80u) != 0 ) { uNumMaxBeacons = 5; } else { - if ( pPlayer->pActiveSkills[14] & 0x40 ) + if ( pPlayer->pActiveSkills[PLAYER_SKILL_WATER] & 0x40 ) uNumMaxBeacons = 3; } if ( uNumMaxBeacons > 0 )
--- a/UI/Books/UISpellBook.cpp Fri Jan 31 00:37:26 2014 +0100 +++ b/UI/Books/UISpellBook.cpp Fri Jan 31 17:30:36 2014 +0600 @@ -129,11 +129,11 @@ pRenderer->DrawTextureIndexed(pX_coord, pY_coord, SBPageCSpellsTextureList[v10]); } } - pX_coord = (unsigned int)&player->pActiveSkills[12]; - pY_coord = (unsigned int)&player->pActiveSkills[12]; + //pX_coord = (unsigned int)&player->pActiveSkills[PLAYER_SKILL_FIRE]; + //pY_coord = (unsigned int)&player->pActiveSkills[PLAYER_SKILL_FIRE]; for ( uint i = 0; i < 9; i++ ) { - if ( player->pActiveSkills[12 + i] ) + if ( player->pActiveSkills[PLAYER_SKILL_FIRE + i] ) { if ( player->lastOpenedSpellbookPage == i ) {
--- a/UI/UICharacter.cpp Fri Jan 31 00:37:26 2014 +0100 +++ b/UI/UICharacter.cpp Fri Jan 31 17:30:36 2014 +0600 @@ -2517,8 +2517,8 @@ return; } v50 = 0; - if ( pSkillType == 2 && (unsigned __int16)(pPlayers[uActiveCharacter]->pActiveSkills[2] & 0xFFC0) - || pSkillType == 1 && (signed int)SkillToMastery(pPlayers[uActiveCharacter]->pActiveSkills[1]) >= 3 ) + if ( pSkillType == 2 && (unsigned __int16)(pPlayers[uActiveCharacter]->pActiveSkills[PLAYER_SKILL_DAGGER] & 0xFFC0) + || pSkillType == 1 && (signed int)SkillToMastery(pPlayers[uActiveCharacter]->pActiveSkills[PLAYER_SKILL_SWORD]) >= 3 ) { v18 = pMouse->uMouseClickX; v19 = pMouse->uMouseClickY;
--- a/mm7_2.cpp Fri Jan 31 00:37:26 2014 +0100 +++ b/mm7_2.cpp Fri Jan 31 17:30:36 2014 +0600 @@ -137,13 +137,13 @@ memset(player->pConditions.data(), 0, 0xA0u); __debugbreak(); - *(int *)&player->pActiveSkills[8] = v5; - *(int *)&player->pActiveSkills[10] = v6; + *(int *)&player->pActiveSkills[PLAYER_SKILL_SHIELD] = v5; + *(int *)&player->pActiveSkills[PLAYER_SKILL_CHAIN] = v6; } } break; - case Cook: + case Cook://Повар { if (pParty->uNumFoodRations >= 13) return 1;
--- a/mm7_4.cpp Fri Jan 31 00:37:26 2014 +0100 +++ b/mm7_4.cpp Fri Jan 31 17:30:36 2014 +0600 @@ -2195,14 +2195,14 @@ } return v35; case 30: - v18 = LOBYTE(pPlayers[uActiveCharacter]->pActiveSkills[31]); + v18 = LOBYTE(pPlayers[uActiveCharacter]->pActiveSkills[PLAYER_SKILL_UNARMED]); if ( (v18 & 0x3Fu) < 0xA ) return v35; if ( !gold_transaction_amount ) goto LABEL_79; goto LABEL_42; case 31: - v18 = LOBYTE(pPlayers[uActiveCharacter]->pActiveSkills[30]); + v18 = LOBYTE(pPlayers[uActiveCharacter]->pActiveSkills[PLAYER_SKILL_DODGE]); if ( (v18 & 0x3Fu) < 0xA ) return v35; if ( !gold_transaction_amount )