Mercurial > mm7
diff Events.cpp @ 484:4bd56919f075
avard quest guild bits
author | Gloval |
---|---|
date | Wed, 27 Feb 2013 02:25:31 +0400 |
parents | 5b6e2021c6fe |
children | 0e20e886365d 6fa3ff8ef729 |
line wrap: on
line diff
--- a/Events.cpp Tue Feb 26 17:24:53 2013 +0600 +++ b/Events.cpp Wed Feb 27 02:25:31 2013 +0400 @@ -380,7 +380,7 @@ if ( v128 == 3 ) pGameLoadingUI_ProgressBar->uType = GUIProgressBar::TYPE_Fullscreen; if ( v128 == 13 ) - pVideoPlayer->_4BF28F(pAnimatedRooms[uCurrentHouse_Animation].field_0, 1u); + pVideoPlayer->_4BF28F(pAnimatedRooms[uCurrentHouse_Animation].video_name, 1u); } if (pAsyncMouse) pAsyncMouse->Resume(); @@ -403,7 +403,7 @@ if ( v128 == 3 ) pGameLoadingUI_ProgressBar->uType = GUIProgressBar::TYPE_Fullscreen; if ( v128 == 13 ) - pVideoPlayer->_4BF28F(pAnimatedRooms[uCurrentHouse_Animation].field_0, 1u); + pVideoPlayer->_4BF28F(pAnimatedRooms[uCurrentHouse_Animation].video_name, 1u); } if (pAsyncMouse) pAsyncMouse->Resume(); @@ -427,7 +427,7 @@ if ( v128 == 3 ) pGameLoadingUI_ProgressBar->uType = GUIProgressBar::TYPE_Fullscreen; if ( v128 == 13 ) - pVideoPlayer->_4BF28F(pAnimatedRooms[uCurrentHouse_Animation].field_0, 1u); + pVideoPlayer->_4BF28F(pAnimatedRooms[uCurrentHouse_Animation].video_name, 1u); } if (pAsyncMouse) pAsyncMouse->Resume(); @@ -822,70 +822,65 @@ //v7 = ""; break; case EVENT_Compare://_evt->_e_type == 14 cmp in Global.evt event 6 - pValue = _evt->v7 + ((_evt->v8 + ((_evt->v9 + ((uint)_evt->v10 << 8)) << 8)) << 8); - if ( player_choose == 5 ) + pValue = EVT_DWORD(_evt->v7); + if ( player_choose <= 3 ) { - v130 = 0; - pPlayer = pParty->pPlayers; - while ( 1 ) + if ( pPlayers[player_choose]->CompareVariable((enum VariableType)EVT_WORD(_evt->v5), pValue) ) { - v60 = pPlayer->CompareVariable((enum VariableType)(_evt->v5 + ((uint)_evt->v6 << 8)), pValue); - if ( v60 ) - break; - ++v130; - ++pPlayer; - if ( (signed int)pPlayer >= (signed int)pParty->pHirelings ) - { - ++curr_seq_num; - v4 = v124; - - //v6 = v123; - //v7 = ""; - break; - } - } -LABEL_129: - v11 = _evt->v11; - goto LABEL_130; + v124 = -1; + curr_seq_num = _evt->v11 - 1; + }; } - if ( player_choose < 0 ) - goto LABEL_139; - v61 = player_choose; - if ( player_choose <= 3 ) - goto LABEL_137; - if ( player_choose == 4 ) + else if ( player_choose == 4 ) //active { if ( uActiveCharacter ) { - v6 = pPlayers[uActiveCharacter]; - goto LABEL_138; + if ( pPlayers[uActiveCharacter]->CompareVariable((enum VariableType)EVT_WORD(_evt->v5), pValue) ) + { + v124 = -1; + curr_seq_num = _evt->v11 - 1; + }; } } - else + else if ( player_choose == 5 )//all { - if ( player_choose != 6 ) - goto LABEL_139; + v130=0; + for(int i=0; i<4; ++i) + { + if ( pPlayers[i]->CompareVariable((enum VariableType)EVT_WORD(_evt->v5), pValue) ) + { + v124 = -1; + curr_seq_num = _evt->v11 - 1; + break; + }; + + ++v130; + } + } - v61 = rand() % 4; - -LABEL_137: - v6 = &pParty->pPlayers[v61]; -LABEL_138: - //v123 = v6; -LABEL_139: - v62 = ((Player *)v6)->CompareVariable((enum VariableType)(_evt->v5 + ((uint)_evt->v6 << 8)), pValue); -LABEL_140: - if ( v62 ) - goto LABEL_129; + else if ( player_choose == 6 ) //random + { + if ( pPlayers[rand() % 4]->CompareVariable((enum VariableType)EVT_WORD(_evt->v5), pValue) ) + { + v124 = -1; + curr_seq_num = _evt->v11 - 1; + } + } + ++curr_seq_num; v4 = v124; - //v6 = v123; //v7 = ""; break; case EVENT_IsActorAlive: - v62 = IsActorAlive(_evt->v5, _evt->v6 + ((_evt->v7 + ((_evt->v8 + ((uint)_evt->v9 << 8)) << 8)) << 8), _evt->v10); - goto LABEL_140; + if (IsActorAlive(EVT_BYTE(_evt->v5), EVT_DWORD(_evt->v6), EVT_BYTE(_evt->v10))) + { + v124 = -1; + curr_seq_num = _evt->v11 - 1; + } + ++curr_seq_num; + v4 = v124; + break; case EVENT_Substract: v63 = (void *)(_evt->v7 + ((_evt->v8 + ((_evt->v9 + ((uint)_evt->v10 << 8)) << 8)) << 8)); if ( _evt->v5 + ((uint)_evt->v6 << 8) == VAR_PlayerItemInHands ) @@ -1564,7 +1559,9 @@ v105 = curr_seq_num + 1; goto LABEL_295; case EVENT_Exit: - goto LABEL_301; + if ( v133 == 1 ) + OnMapLeave(); + return; default: ++curr_seq_num; v4 = v124;