adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] items & inventory


From: Kai Sterker
Subject: Re: [Adonthell-devel] items & inventory
Date: Sun, 24 Mar 2002 22:31:47 +0100

On Sun, 24 Mar 2002 20:48:35 +0100 Thorsten Riess wrote:

> The item_base class looks fine for me (so far), and I thought about 
> creating a inventory class where item_base objects are stored. Each 
> character_base then has an associated inventory object. Therefore it
> is reasonable to store the amount of money that a character posseses
> in that inventory class as well.

Yes. That's reasonable.

However, the inventory(_base) shouldn't get too character specific. For
instance, containers like chests or bags and the like would possibly
have an inventory as well. As might have whole maps, to store all items
located on the map. Each of them will have special requirements, but it
would probably make sense if they'd share a common base class.


> The inventory class has member functions that allow to add/remove 
> items, add/subtract money, iterate through the inventory and move
> items from one inventory to another.
> Of course the character_base has to hold a pointer of the character's 
> inventory.
> 
> So we have the dependencies
> character_base --> inventory_base --> item_base
> 
> I think there should also be pointers to the respective parents in the
> item_base/inventory_base classes.
> Well, tell me what you think :-)

Yes, looks good so far :). 
 

> PS: some general note on the CVS code: the _only_ versions of 
> autoconf/automake/libtool that worked for me were autoconf 
> 2.13/automake 1.4 and libtool 1.3.4... especially newer libtool 
> versions seem to be a problem. Just to let you know, maybe there
> should be some hint on the webpage...

Oh. I'll add a note on this tomorrow. Never really tried anything else.
Currently running 2.13/1.4/1.35 on this box.

Kai



reply via email to

[Prev in Thread] Current Thread [Next in Thread]