mud++0.35/etc/
mud++0.35/etc/guilds/
mud++0.35/help/propert/
mud++0.35/mudC/
mud++0.35/player/
mud++0.35/src/interface/
mud++0.35/src/os/cygwin32/
mud++0.35/src/os/win32/
mud++0.35/src/os/win32/bcppbuilder/
mud++0.35/src/osaddon/
mud++0.35/src/util/
/*
....[@@@..[@@@..............[@.................. MUD++ is a written from
....[@..[@..[@..[@..[@..[@@@@@....[@......[@.... scratch multi-user swords and
....[@..[@..[@..[@..[@..[@..[@..[@@@@@..[@@@@@.. sorcery game written in C++.
....[@......[@..[@..[@..[@..[@....[@......[@.... This server is an ongoing
....[@......[@..[@@@@@..[@@@@@.................. development project.  All 
................................................ contributions are welcome. 
....Copyright(C).1995.Melvin.Smith.............. Enjoy. 
------------------------------------------------------------------------------
Melvin Smith (aka Fusion)         msmith@hom.net
MUD++ development mailing list    mudpp@van.ml.org
------------------------------------------------------------------------------
guild.h
*/

#include "skill.h"
#include "spell.h"
#include "array.h"
#include "llist.h"

#define GUILD_DIR "../etc/guilds/"
#define GUILD_FILE "guilds.lst"

class Guild : public Streamable
{
	protected:
		String name;
		String description;
		int min_level;
		int xp_penalty;
		// etc...

		// we can add bitfields for quick have/have_not skill/spell lookups

	public:
		Array< struct GuildSkill > skills;
		Array< struct GuildSpell > spells;

		Guild()
		: min_level(1), xp_penalty(10)
		{}

		Guild( const String & nam )
		: name(nam), min_level(1), xp_penalty(10)
		{}

		~Guild()
		{}

		String & getName() { return name; }

		virtual int readFrom( StaticInput & );
		virtual int writeTo( Output & ) const;

		// read and write guild, skill and spell data to separate files
		int load();
		int save();
};

extern LList< Guild > guilds;

void saveGuilds();
void loadGuilds();