Mercurial > mm7
comparison UI/UICharacter.cpp @ 1822:5f9eeb7bf8e6
Finishing Player.cpp, fixing some bugs
author | Grumpy7 |
---|---|
date | Wed, 09 Oct 2013 08:06:26 +0200 |
parents | 0f1543750bf8 |
children | 211dfe2d8db1 |
comparison
equal
deleted
inserted
replaced
1821:49a4db499c0a | 1822:5f9eeb7bf8e6 |
---|---|
1135 && !player->GetItem(&PlayerEquipment::uShield) ) | 1135 && !player->GetItem(&PlayerEquipment::uShield) ) |
1136 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], | 1136 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], |
1137 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1])); | 1137 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1])); |
1138 } | 1138 } |
1139 //--------------------------------(Shoulder/Плечи)--------------------------------------------- | 1139 //--------------------------------(Shoulder/Плечи)--------------------------------------------- |
1140 item = player->GetArmorItem(); | 1140 if (player->GetItem(&PlayerEquipment::uArmor)) |
1141 switch ( item->uItemID ) | 1141 { |
1142 { | 1142 item = player->GetArmorItem(); |
1143 switch ( item->uItemID ) | |
1144 { | |
1143 case ITEM_ARTIFACT_GOVERNORS_ARMOR: | 1145 case ITEM_ARTIFACT_GOVERNORS_ARMOR: |
1144 index = 15; | 1146 index = 15; |
1145 break; | 1147 break; |
1146 case ITEM_ARTIFACT_YORUBA: | 1148 case ITEM_ARTIFACT_YORUBA: |
1147 index = 14; | 1149 index = 14; |
1153 index = 16; | 1155 index = 16; |
1154 break; | 1156 break; |
1155 default: | 1157 default: |
1156 index = item->uItemID - 66; | 1158 index = item->uItemID - 66; |
1157 break; | 1159 break; |
1158 } | 1160 } |
1159 if ( index >= 0 && index < 17 ) | 1161 if ( index >= 0 && index < 17 ) |
1160 { | 1162 { |
1161 if ( player->GetItem(&PlayerEquipment::uMainHand) | 1163 if ( player->GetItem(&PlayerEquipment::uMainHand) |
1162 && (player->GetMainHandItem()->GetItemEquipType() == EQUIP_MAIN_HAND | 1164 && (player->GetMainHandItem()->GetItemEquipType() == EQUIP_MAIN_HAND |
1163 || player->GetMainHandItem()->GetPlayerSkillType() == PLAYER_SKILL_SPEAR | 1165 || player->GetMainHandItem()->GetPlayerSkillType() == PLAYER_SKILL_SPEAR |
1164 && !player->GetItem(&PlayerEquipment::uShield) ))//без щита | 1166 && !player->GetItem(&PlayerEquipment::uShield) ))//без щита |
1165 { | |
1166 v94 = paperdoll_armor_texture[pBodyComplection][index][2]; | |
1167 if ( paperdoll_armor_texture[pBodyComplection][index][2] == pIcons_LOD->FindTextureByName("pending") ) | |
1168 { | 1167 { |
1169 v94 = paperdoll_armor_texture[pBodyComplection][index][1]; | 1168 v94 = paperdoll_armor_texture[pBodyComplection][index][2]; |
1170 item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0]; | 1169 if ( paperdoll_armor_texture[pBodyComplection][index][2] == pIcons_LOD->FindTextureByName("pending") ) |
1171 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1]; | |
1172 } | |
1173 else | |
1174 { | |
1175 item_X = pPaperdoll_BodyX + paperdoll_shoulder_second_coord[pBodyComplection][index][0]; | |
1176 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_second_coord[pBodyComplection][index][1]; | |
1177 } | |
1178 if ( v94 != pIcons_LOD->FindTextureByName("pending") ) | |
1179 { | |
1180 if ( !(item->uAttributes & 0xF0) ) | |
1181 { | 1170 { |
1182 if ( item->uAttributes & 2 ) | 1171 v94 = paperdoll_armor_texture[pBodyComplection][index][1]; |
1183 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v94)); | 1172 item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0]; |
1184 else | 1173 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1]; |
1185 { | |
1186 if ( item->uAttributes & 1 ) | |
1187 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v94)); | |
1188 else | |
1189 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v94)); | |
1190 } | |
1191 } | 1174 } |
1192 else | 1175 else |
1193 { | 1176 { |
1194 if ( paperdoll_armor_texture[pBodyComplection][index][2] != pIcons_LOD->FindTextureByName("pending") ) | 1177 item_X = pPaperdoll_BodyX + paperdoll_shoulder_second_coord[pBodyComplection][index][0]; |
1178 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_second_coord[pBodyComplection][index][1]; | |
1179 } | |
1180 if ( v94 != pIcons_LOD->FindTextureByName("pending") ) | |
1181 { | |
1182 if ( !(item->uAttributes & 0xF0) ) | |
1195 { | 1183 { |
1196 if ( item->uAttributes & 0xF0 ) | 1184 if ( item->uAttributes & 2 ) |
1185 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v94)); | |
1186 else | |
1197 { | 1187 { |
1198 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) | 1188 if ( item->uAttributes & 1 ) |
1199 container = "sptext01"; | 1189 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v94)); |
1200 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) | 1190 else |
1201 container = "sp28a"; | 1191 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v94)); |
1202 if ( ( item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) | 1192 } |
1203 container = "sp30a"; | 1193 } |
1204 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) | 1194 else |
1205 container = "sp91a"; | 1195 { |
1206 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1196 if ( paperdoll_armor_texture[pBodyComplection][index][2] != pIcons_LOD->FindTextureByName("pending") ) |
1207 if ( _50C9A8_item_enchantment_timer <= 0 ) | 1197 { |
1198 if ( item->uAttributes & 0xF0 ) | |
1208 { | 1199 { |
1209 _50C9A8_item_enchantment_timer = 0; | 1200 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) |
1210 item->uAttributes &= 0xFFFFFF0Fu; | 1201 container = "sptext01"; |
1211 ptr_50C9A4_ItemToEnchant = 0; | 1202 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) |
1203 container = "sp28a"; | |
1204 if ( ( item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) | |
1205 container = "sp30a"; | |
1206 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) | |
1207 container = "sp91a"; | |
1208 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | |
1209 if ( _50C9A8_item_enchantment_timer <= 0 ) | |
1210 { | |
1211 _50C9A8_item_enchantment_timer = 0; | |
1212 item->uAttributes &= 0xFFFFFF0Fu; | |
1213 ptr_50C9A4_ItemToEnchant = 0; | |
1214 } | |
1215 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v94), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), | |
1216 GetTickCount() * 0.1, 0, 255); | |
1212 } | 1217 } |
1213 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v94), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), | |
1214 GetTickCount() * 0.1, 0, 255); | |
1215 } | 1218 } |
1216 } | 1219 } |
1217 } | 1220 } |
1218 } | 1221 } |
1219 } | 1222 else//без ничего или с щитом |
1220 else//без ничего или с щитом | |
1221 { | |
1222 //v94 = paperdoll_armor_texture[pBodyComplection][index][1]; | |
1223 if ( paperdoll_armor_texture[pBodyComplection][index][1] != pIcons_LOD->FindTextureByName("pending") ) | |
1224 { | 1223 { |
1225 item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0]; | 1224 //v94 = paperdoll_armor_texture[pBodyComplection][index][1]; |
1226 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1]; | 1225 if ( paperdoll_armor_texture[pBodyComplection][index][1] != pIcons_LOD->FindTextureByName("pending") ) |
1227 if ( !(item->uAttributes & 0xF0) ) | |
1228 { | 1226 { |
1229 if ( item->uAttributes & 2 ) | 1227 item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0]; |
1230 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); | 1228 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1]; |
1229 if ( !(item->uAttributes & 0xF0) ) | |
1230 { | |
1231 if ( item->uAttributes & 2 ) | |
1232 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); | |
1233 else | |
1234 { | |
1235 if ( item->uAttributes & 1 ) | |
1236 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); | |
1237 else | |
1238 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); | |
1239 } | |
1240 } | |
1231 else | 1241 else |
1232 { | 1242 { |
1233 if ( item->uAttributes & 1 ) | 1243 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) |
1234 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); | 1244 container = "sptext01"; |
1235 else | 1245 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) |
1236 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); | 1246 container = "sp28a"; |
1247 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) | |
1248 container = "sp30a"; | |
1249 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) | |
1250 container = "sp91a"; | |
1251 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | |
1252 if ( _50C9A8_item_enchantment_timer <= 0 ) | |
1253 { | |
1254 _50C9A8_item_enchantment_timer = 0; | |
1255 item->uAttributes &= 0xFFFFFF0Fu; | |
1256 ptr_50C9A4_ItemToEnchant = 0; | |
1257 } | |
1258 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]), | |
1259 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); | |
1237 } | 1260 } |
1238 } | |
1239 else | |
1240 { | |
1241 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) | |
1242 container = "sptext01"; | |
1243 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) | |
1244 container = "sp28a"; | |
1245 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) | |
1246 container = "sp30a"; | |
1247 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) | |
1248 container = "sp91a"; | |
1249 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | |
1250 if ( _50C9A8_item_enchantment_timer <= 0 ) | |
1251 { | |
1252 _50C9A8_item_enchantment_timer = 0; | |
1253 item->uAttributes &= 0xFFFFFF0Fu; | |
1254 ptr_50C9A4_ItemToEnchant = 0; | |
1255 } | |
1256 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]), | |
1257 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); | |
1258 } | 1261 } |
1259 } | 1262 } |
1260 } | 1263 } |
1261 } | 1264 } |
1262 //----------------------------------------------(Cloak collar/воротник плаща)------------------------------------- | 1265 //----------------------------------------------(Cloak collar/воротник плаща)------------------------------------- |