Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#include "inventory.h"
inv::inv()
{
}
void inv::addArmour(int item, int itemID)
{
}
void inv::addPotion(int item, int itemID)
{
}
void inv::addItem(int itemType, int item, int itemID)
{
Inv.push_back(new item);
if (itemType == 0) // questuri
{
addQItem(item, itemID);
}
if (itemType == 1) // weapon
{
addArma(item, itemID);
}
if (itemType == 2) // armours
{
addArmour(item, itemID);
}
if (itemType == 3) // potion
{
addPotion(item, itemID);
}
}
void inv::addQItem(int item, int itemID)
{
}
void inv::addArma(int item, int itemID)
{
if (item == 0) // unarmed
{
}
if (item == 1) // daggers
{
}
if (item == 2) // swords
{
sabie getsabie;
getSword.getsabieName(itemID, Inv.back()->itemName);
getSword.getsabiePrices(itemID, Inv.back()->cost, Inv.back()->value);
getSword.getsabieStats(itemID, Inv.back()->attackRates, Inv.back()->dmg);
delete &getsabie;
}
}
void inv::removeItem(unsigned short int b)
{
delete Inv.at(b);
Inv.erase(Inv.begin() + b);
}