Instance table - ideas and looking for suggestions.
So I'm going to take a stab at instancing, and was thinking about storing the info for each instance in a table. I have some ideas for what to add, but I was wondering if anyone had suggestions on what else to add(or even exclude) prior to working on the code.
Here's what I have so far:
CREATE TABLE instance (
instid int(11) NOT NULL,
charid int(11) NOT NULL default 0,
zoneidnumber int(11) NOT NULL default 0,
short_name varchar(16) NOT NULL default 0,
port int(11) NOT NULL default 0,
advlevel int(4) NOT NULL default 0,
UNIQUE KEY charid (charid)
) TYPE=MyISAM;
instid - The ID of the instance.
charid - The ID of the character the instance belongs to.
zoneidnumber - The ID of the zone the instance takes place in.
short_name - The short name of the zone the instance takes place in.
port - The port number of the zoneserver.
advlevel - The adventure level, used to spawn NPCs on a certain level range.
charid will be unique, only one instance per character at any given time.
|