Permalink
Browse files

Update for Rocket 3.8.0.0 and fix for selling ammo

  • Loading branch information...
1 parent 162a952 commit 13f236d0abb0d915bab02995a37351e1add54acd @Zamirathe Zamirathe committed May 6, 2015
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.2.0.0")]
-[assembly: AssemblyFileVersion("1.2.0.0")]
+[assembly: AssemblyVersion("1.2.0.1")]
+[assembly: AssemblyFileVersion("1.2.0.1")]
@@ -471,6 +471,7 @@ public void Sell(RocketPlayer playerid, string msg)
break;
default:
// This is ammo or magazines
+ byte amttosell1 = amttosell;
while (amttosell > 0)
{
if (playerid.Player.Equipment.checkSelection(list[0].InventoryGroup, list[0].ItemJar.PositionX, list[0].ItemJar.PositionY))
@@ -480,6 +481,7 @@ public void Sell(RocketPlayer playerid, string msg)
if (list[0].ItemJar.Item.Amount >= amttosell)
{
byte left = (byte)(list[0].ItemJar.Item.Amount - amttosell);
+ list[0].ItemJar.Item.Amount = left;
playerid.Inventory.sendUpdateAmount(list[0].InventoryGroup, list[0].ItemJar.PositionX, list[0].ItemJar.PositionY, left);
amttosell = 0;
if (left == 0)
@@ -496,7 +498,7 @@ public void Sell(RocketPlayer playerid, string msg)
list.RemoveAt(0);
}
}
- peritemprice = price * amttosell;
+ peritemprice = decimal.Round(price * ((decimal)amttosell1 / (decimal)vAsset.Amount), 2);
addmoney += peritemprice;
break;
}
@@ -4,7 +4,7 @@
namespace UconomyBasicShop
{
- public class UconomyBasicShopConfiguration : RocketConfiguration
+ public class UconomyBasicShopConfiguration : IRocketConfiguration
{
public string ItemShopTableName;
public string VehicleShopTableName;
@@ -13,7 +13,7 @@ public class UconomyBasicShopConfiguration : RocketConfiguration
public bool CanSellItems;
public bool QualityCounts;
- public RocketConfiguration DefaultConfiguration
+ public IRocketConfiguration DefaultConfiguration
{
get
{

0 comments on commit 13f236d

Please sign in to comment.