Quote:
Originally Posted by KLS
Here's where I left off last time I was thinking about potential ways to track them.
Code:
CREATE TABLE `raid_ungrouped_members` (
`raidid` int(4) NOT NULL,
`charid` int(4) NOT NULL,
`name` varchar(64) NOT NULL,
`ismaintank` tinyint(1) NOT NULL,
PRIMARY KEY (`raidid`, `charid`)
)
CREATE TABLE `raid_groups` (
`raidid` int(4) NOT NULL,
`groupid` int(4) NOT NULL,
`groupindex` tinyint(1) NOT NULL,
PRIMARY KEY (`raidid`, `groupid`)
)
CREATE TABLE `raid_leader` (
`raidid` int(4) NOT NULL,
`name` varchar(64) NOT NULL,
PRIMARY KEY (`raidid`)
)
|
I am not very familiar with how the raids work either but from looking at your tables here could you just do something like this:
Code:
CREATE TABLE `raid_members` (
`raidid` int(4) NOT NULL,
`charid` int(4) NOT NULL,
`name` varchar(64) NOT NULL,
`ismaintank` tinyint(1) NOT NULL,
`isgrouped` tinyint(1) NOT NULL,
`isleader` tinyint(1) NOT NULL,
PRIMARY KEY (`raidid`, `charid`)
)
CREATE TABLE `raid_groups` (
`raidid` int(4) NOT NULL,
`groupid` int(4) NOT NULL,
`groupindex` tinyint(1) NOT NULL,
PRIMARY KEY (`raidid`, `groupid`)
)
Using one table for all of your raid members (same table as your ungrouped_members tables) and add a isgrouped flag and a isleader flag.
One of the issues that I seen with devnoob's suggestion of adding the raid leader flag to the raid_groups table was that the charid is not referenced in that table and therefore does not point the leader to a specific character but only to a group.
Just a suggestion from that I seen only by looking at what you have posted so if this is completely off base I am sorry for that.