Slight cleanup in the cInventory / cItemGrid API
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1504 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -346,6 +346,15 @@ int cItemGrid::ChangeSlotCount(int a_SlotNum, int a_AddToCount)
|
||||
|
||||
|
||||
|
||||
int cItemGrid::ChangeSlotCount(int a_X, int a_Y, int a_AddToCount)
|
||||
{
|
||||
return ChangeSlotCount(GetSlotNum(a_X, a_Y), a_AddToCount);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int cItemGrid::HowManyItems(const cItem & a_Item)
|
||||
{
|
||||
int res = 0;
|
||||
@@ -443,6 +452,15 @@ bool cItemGrid::DamageItem(int a_SlotNum, short a_Amount)
|
||||
|
||||
|
||||
|
||||
bool cItemGrid::DamageItem(int a_X, int a_Y, short a_Amount)
|
||||
{
|
||||
return DamageItem(GetSlotNum(a_X, a_Y), a_Amount);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cItemGrid::GenerateRandomLootWithBooks(const cLootProbab * a_LootProbabs, int a_CountLootProbabs, int a_NumSlots, int a_Seed)
|
||||
{
|
||||
// Calculate the total weight:
|
||||
|
||||
Reference in New Issue
Block a user