Looking for a little assistance with item class design...
I have been working on my rpg game for a long time, which started just as a test of my abilities, but now I am really trying to get it looking and working good.
I have the graphics engine down(pretty much bug-free), but the rest of the game code looks butchered.
I am working on random bits and pieces adding functionality,etc where I think it may be necessary.
Now onto my question. I have a very basic item design. Pretty much every item is the same as every other item, just the effect stack is different.
Code:
class Item
{
private:
int iValue;
int iModelID;//used for rendering
boost::ptr_vector<bEffect*> vEffects;//Everything an item can or cant do is in this.
public:
//all the other stuff
};
What i am wondering is how to design a item class/effect class/etc/etc to work similar to the Diablo 2 items. Any item can have any effect(I will modify this a bit), only difference that i will have really is each item regardless of type only takes up one inventory slot.
Any help or insight will be greatly appreciated.