/* 
 * Script decompiled by jagdecs2 v3.2
 * Decompiler opts:
 * --------------
 * t1LocalAnalyzer:true
 * t2LocalAnalyzer:true
 * beautifier:true
 * --------------
 * Made by mgi125 ;)
 */


script_4792_struct(6,0,0) script_4792(int a0,int a1) {
	int v20 = 0;
	int v29 = 0;
	int v15 = 0;
	int v22 = 0;
	int v23 = 0;
	int v9 = 0;
	int v24 = 0;
	int v14 = 0;
	int v4 = 0;
	int v30 = 0;
	int v8 = 0;
	int v31 = 0;
	int v25 = idx17mapData('i', 'J', 4008, a0);
	int v7 = 0;
	int v1 = 0;
	int v17 = 0;
	int v28 = 0;
	int v27 = 0;
	int v5 = 0;
	int v21 = -1;
	object v0 = "";
	if (a0 < 1 || a0 > 900) {
		cs2method_10810("Clan Build Tick : Attempting to look up build cost for invalid job " + (string)cs2method_10379(a0) + ".");
		return new script_4792_struct(0, 0, 0, 0, 0, 0);
	}
	int v18 = a0;
	script_4791_struct(7,1,0) v19 = script_4791(v18);
	int v10 = v19.intpart_6;
	int v26 = v19.intpart_5;
	int v2 = v19.intpart_4;
	int v16 = v19.intpart_3;
	int v3 = v19.intpart_2;
	int v11 = v19.intpart_1;
	object v6 = v19.objectpart_0;
	int v12 = v19.intpart_0;
	int v13 = -1;
	if (a0 < 600) {
		switch (v2) {
			case 1:
				v13 = 2021;
				break;
			case 2:
				v13 = 2022;
				break;
			case 3:
				v13 = 2023;
				break;
			case 4:
				v13 = idx17mapData('i', 'J', 4010, v10);
				break;
			case 5:
				v13 = v25;
		}
	} else {
		switch (v2) {
			case 1:
				v13 = 2031;
				break;
			case 2:
				v13 = 2032;
				break;
			case 3:
				v13 = 2033;
				break;
			case 4:
				v13 = idx17mapData('i', 'J', 4009, v10);
				break;
			case 5:
				v13 = v25;
		}
	}
	if (a1 == 0) {
		return new script_4792_struct(0, 0, 0, 0, 0, 0);
	}
	switch (a1) {
		case 1:
			return new script_4792_struct(idx22mapAttribute(v13, 1483), idx22mapAttribute(v13, 1490), idx22mapAttribute(v13, 1497), idx22mapAttribute(v13, 1504), idx22mapAttribute(v13, 1511), idx22mapAttribute(v13, 1518));
		case 2:
			return new script_4792_struct(idx22mapAttribute(v13, 1484), idx22mapAttribute(v13, 1491), idx22mapAttribute(v13, 1498), idx22mapAttribute(v13, 1505), idx22mapAttribute(v13, 1512), idx22mapAttribute(v13, 1519));
		case 3:
			return new script_4792_struct(idx22mapAttribute(v13, 1485), idx22mapAttribute(v13, 1492), idx22mapAttribute(v13, 1499), idx22mapAttribute(v13, 1506), idx22mapAttribute(v13, 1513), idx22mapAttribute(v13, 1520));
		case 4:
			return new script_4792_struct(idx22mapAttribute(v13, 1486), idx22mapAttribute(v13, 1493), idx22mapAttribute(v13, 1500), idx22mapAttribute(v13, 1507), idx22mapAttribute(v13, 1514), idx22mapAttribute(v13, 1521));
		case 5:
			return new script_4792_struct(idx22mapAttribute(v13, 1487), idx22mapAttribute(v13, 1494), idx22mapAttribute(v13, 1501), idx22mapAttribute(v13, 1508), idx22mapAttribute(v13, 1515), idx22mapAttribute(v13, 1522));
		case 6:
			return new script_4792_struct(idx22mapAttribute(v13, 1488), idx22mapAttribute(v13, 1495), idx22mapAttribute(v13, 1502), idx22mapAttribute(v13, 1509), idx22mapAttribute(v13, 1516), idx22mapAttribute(v13, 1523));
		case 7:
			return new script_4792_struct(idx22mapAttribute(v13, 1489), idx22mapAttribute(v13, 1496), idx22mapAttribute(v13, 1503), idx22mapAttribute(v13, 1510), idx22mapAttribute(v13, 1517), idx22mapAttribute(v13, 1524));
	}
	return new script_4792_struct(0, 0, 0, 0, 0, 0);
}
