repop.h
./mud++0.26/src/repop.h · 1.6 KB
From the archive mud++0.26f.tar.gz
Download the archive « Back to the archive contents
/*
....[@@@..[@@@..............[@.................. 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-list@mailhost.net
------------------------------------------------------------------------------
repop.h
*/
#ifndef _REPOP_H
#define _REPOP_H
#include "thing.h"
#include "io.h"
#include "index.h"
class Repop
{
private:
static int total_count;
public:
char type; // O-load object,M-load mob,G-give obj,P-put obj in obj
Index index; // Obj/Mob index
short int chance; // 1-1000 , 0 is bootup only
short int val;
Thing *ptr;
Repop()
: type('@'),chance(0),val(0),ptr(0)
{
total_count++;
}
Repop( char t, const String & i, int c )
: type(t),index(i),chance(c),ptr(0)
{
total_count++;
}
Repop( char t, const Index & i, int c )
: type(t),index(i),chance(c),ptr(0)
{
}
~Repop() { total_count--; }
int readFrom( InFile & );
void writeTo( OutFile & );
void setPtr( Thing * x ) { ptr = x; }
Thing * getPtr() { return ptr; }
static int getTotalCount() { return total_count; }
};
#endif