DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ SortMagazineAfterLoad()

void WeaponManager::SortMagazineAfterLoad ( )
inlineprivate

См. определение в файле WeaponManager.c строка 1203

1204 {
1205 array<MagazineStorage> magazines = new array<MagazineStorage>;
1206 array<Magazine> magazines_piles = new array<Magazine>;
1207 int low_mag1, high_mag1;
1208 int low_mag2, high_mag2;
1209 int i, j;
1210
1211 for(i = 0; i < m_MagazineStorageInInventory.Count(); i++ )
1212 {
1213 MagazineStorage mag = m_MagazineStorageInInventory.Get(i);
1214 mag.GetNetworkID(low_mag1,high_mag1);
1215 for( j = 0; j < magazines.Count(); j++)
1216 {
1217 magazines.Get(j).GetNetworkID(low_mag2,high_mag2);
1218 if(low_mag1 > low_mag2)
1219 {
1220 break;
1221 }
1222 else if (low_mag1 == low_mag2)
1223 {
1224 if( high_mag1 > high_mag2 )
1225 {
1226 break;
1227 }
1228 }
1229 }
1230 magazines.InsertAt(mag,j);
1231 }
1232
1234 m_MagazineStorageInInventory.Copy(magazines);
1235
1236 for(i = 0; i < m_MagazinePilesInInventory.Count(); i++ )
1237 {
1238 Magazine pile = m_MagazinePilesInInventory.Get(i);
1239 pile.GetNetworkID(low_mag1,high_mag1);
1240 for( j = 0; j < magazines_piles.Count(); j++)
1241 {
1242 magazines_piles.Get(j).GetNetworkID(low_mag2,high_mag2);
1243 if(low_mag1 > low_mag2)
1244 {
1245 break;
1246 }
1247 else if (low_mag1 == low_mag2)
1248 {
1249 if( high_mag1 > high_mag2 )
1250 {
1251 break;
1252 }
1253 }
1254 }
1255 magazines_piles.InsertAt(pile,j);
1256 }
1257
1259 m_MagazinePilesInInventory.Copy(magazines_piles);
1260
1262 }
void SetSutableMagazines()
Определения WeaponManager.c:1264
ref array< Magazine > m_MagazinePilesInInventory
Определения WeaponManager.c:33
ref array< MagazineStorage > m_MagazineStorageInInventory
Определения WeaponManager.c:34

Перекрестные ссылки m_MagazinePilesInInventory, m_MagazineStorageInInventory и SetSutableMagazines().