added prices table
This commit is contained in:
@@ -188,11 +188,11 @@ class MoonCalc {
|
||||
$promethiumPrice = DB::select('SELECT Price FROM Prices WHERE ItemId = ? AND Time = ?', [16652, $maxTime]);
|
||||
$thuliumPrice = DB::select('SELECT Price FROM Prices WHERE ItemId = ? AND Time = ?', [16653, $maxTime]);
|
||||
//Get the item compositions
|
||||
$items = DB::select('SELECT Name,ItemId FROM ItemComposition');
|
||||
$items = DB::select('SELECT Name,ItemId FROM item_composition');
|
||||
//Go through each of the items and update the price
|
||||
foreach($items as $item) {
|
||||
//Get the item composition
|
||||
$composition = DB::select('SELECT * FROM ItemComposition WHERE ItemId = ?', [$item['ItemId']]);
|
||||
$composition = DB::select('SELECT * FROM item_composition WHERE ItemId = ?', [$item['ItemId']]);
|
||||
//Calculate the Batch Price
|
||||
$batchPrice = ( ($composition['Tritanium'] * $tritaniumPrice) +
|
||||
($composition['Pyerite'] * $pyeritePrice) +
|
||||
@@ -270,7 +270,7 @@ class MoonCalc {
|
||||
//Specify the total pull amount
|
||||
$totalPull = 5.55 * (3600.00 * 24.00 * 30.00);
|
||||
//Find the size of the asteroid from the database
|
||||
$m3Size = DB::table('ItemComposition')->where('Name', $ore)->value('m3Size');
|
||||
$m3Size = DB::table('item_composition')->where('Name', $ore)->value('m3Size');
|
||||
//Calculate the actual m3 from the total pull amount in m3 using the percentage of the ingredient
|
||||
$actualm3 = floor($percentage * $totalPull);
|
||||
//Calculate the units once we have the size and actual m3 value
|
||||
|
||||
Reference in New Issue
Block a user