Skip to content

Commit

Permalink
Update for Rocket 3.8.0.0 and fix for selling ammo
Browse files Browse the repository at this point in the history
  • Loading branch information
Zamirathe committed May 6, 2015
1 parent 162a952 commit 13f236d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions UconomyBasicShop/Properties/AssemblyInfo.cs
Expand Up @@ -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")]
4 changes: 3 additions & 1 deletion UconomyBasicShop/UconomyBasicShop.cs
Expand Up @@ -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))
Expand All @@ -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)
Expand All @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions UconomyBasicShop/UconomyBasicShopConfiguration.cs
Expand Up @@ -4,7 +4,7 @@

namespace UconomyBasicShop
{
public class UconomyBasicShopConfiguration : RocketConfiguration
public class UconomyBasicShopConfiguration : IRocketConfiguration
{
public string ItemShopTableName;
public string VehicleShopTableName;
Expand All @@ -13,7 +13,7 @@ public class UconomyBasicShopConfiguration : RocketConfiguration
public bool CanSellItems;
public bool QualityCounts;

public RocketConfiguration DefaultConfiguration
public IRocketConfiguration DefaultConfiguration
{
get
{
Expand Down

0 comments on commit 13f236d

Please sign in to comment.