Quote:
Originally Posted by Nibiuno
Does anyone have a current vwBotCharacterMobs table thats working with the 'laston' column? I need to fix my database to get RoF2 fully working.
Im getting an error about the 'laston' column not existing when you login to my test server (Test Server for Imperium), and not sure how to set that column up, or what Im missing SQL update wise since I ran the utility and updated the db.
|
Not sure if this helps, but I went looking for a vwBotCharacterMobs table, because the world bootup was giving error that it didn't exist, but showing all was updated. I found this table and have no problems using UF client;
Code:
DROP VIEW IF EXISTS `vwBotCharacterMobs`;
CREATE VIEW `vwBotCharacterMobs` AS
select _utf8'C' AS `mobtype`,
`c`.`id` AS `id`,
`c`.`name` AS `name`,
`c`.`class` AS `class`,
`c`.`level` AS `level`,
`c`.`last_login` AS `timelaston`,
`c`.`zone_id` AS `zoneid`
from `character_data` `c`
union all
select _utf8'B' AS `mobtype`,
`b`.`BotID` AS `id`,
`b`.`Name` AS `name`,
`b`.`Class` AS `class`,
`b`.`BotLevel` AS `level`,
0 AS `timelaston`,
0 AS `zoneid`
from `bots` `b`;
DELIMITER $$
DROP FUNCTION IF EXISTS `GetMobType` $$
CREATE FUNCTION `GetMobType` (mobname VARCHAR(64)) RETURNS CHAR(1)
BEGIN
DECLARE Result CHAR(1);
SET Result = NULL;
IF (select count(*) from character_data where name = mobname) > 0 THEN
SET Result = 'C';
ELSEIF (select count(*) from bots where Name = mobname) > 0 THEN
SET Result = 'B';
END IF;
RETURN Result;
END $$
DELIMITER ;
DROP VIEW IF EXISTS `vwGroups`;
CREATE VIEW `vwGroups` AS
select g.groupid as groupid,
GetMobType(g.name) as mobtype,
g.name as name,
g.charid as mobid,
ifnull(c.level, b.BotLevel) as level
from group_id as g
left join character_data as c on g.name = c.name
left join bots as b on g.name = b.Name;
DROP VIEW IF EXISTS `vwBotGroups`;
CREATE VIEW `vwBotGroups` AS
select g.BotGroupId,
g.BotGroupName,
g.BotGroupLeaderBotId,
b.Name as BotGroupLeaderName,
b.BotOwnerCharacterId,
c.name as BotOwnerCharacterName
from botgroup as g
join bots as b on g.BotGroupLeaderBotId = b.BotID
join character_data as c on b.BotOwnerCharacterID = c.id
order by b.BotOwnerCharacterId, g.BotGroupName;
I'm new to this whole git/cmake system. But I like it so far. I was running a 4 year old server/db version until this week.