Blizzlike ArcEmu Database Community
View unanswered posts | View active topics It is currently Sat Sep 04, 2010 10:52 pm



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
 graveyards table different? 
Author Message

Joined: Sun Mar 14, 2010 10:02 pm
Posts: 58
Location: Germany
Post graveyards table different?
Because I wanted to execute the arcscripts_full.sql script I noticed that the graveyards table is not the same as it is in the world structure:

World structure:
Code:
/*Table structure for table `graveyards` */

DROP TABLE IF EXISTS `graveyards`;

CREATE TABLE `graveyards` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `position_x` float NOT NULL default '0',
  `position_y` float NOT NULL default '0',
  `position_z` float NOT NULL default '0',
  `orientation` float NOT NULL default '0',
  `zoneid` int(10) unsigned NOT NULL default '0',
  `adjacentzoneid` int(10) unsigned NOT NULL default '0',
  `mapid` int(10) unsigned NOT NULL default '0',
  `faction` int(10) unsigned NOT NULL default '0',
  `name` varchar(255) character set utf8 collate utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Graveyard System';


WhyDB:
Code:
DROP TABLE IF EXISTS `graveyards`;
CREATE TABLE `graveyards` (
  `id` smallint(4) unsigned NOT NULL AUTO_INCREMENT,
  `position_x` float NOT NULL DEFAULT '0',
  `position_y` float NOT NULL DEFAULT '0',
  `position_z` float NOT NULL DEFAULT '0',
  `orientation` float NOT NULL DEFAULT '0',
  `zoneid` tinyint(1) unsigned NOT NULL,
  `adjacentzoneid` tinyint(1) unsigned NOT NULL,
  `mapid` smallint(3) unsigned NOT NULL,
  `faction` enum('0','1','3') NOT NULL,
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2001 DEFAULT CHARSET=latin1 COMMENT='Graveyard System';


I wanted to execute the following line:
Code:
REPLACE INTO `graveyards` VALUES ('142', '248.339', '7084.93', '36.6211', '0', '3521', '0', '530', '4', 'Twin Spire Ruins');


The differents why I can not execute the command:
1. zoneid is tinyint
2. faction is not int(10)

Remarks:
Because no one of the unfriendly arcemu guys give me an usable answer I still don't know 100% if this very old script is still needed.


Wed Jul 28, 2010 5:12 pm
Profile
Developer
User avatar

Joined: Tue Jun 17, 2008 9:51 am
Posts: 185
Post Re: graveyards table different?
You can't apply it because faction is an enum with values '0', '1' and '3'.
And you query try to set it to '4' which is not accepted.
0 mean horde, 1 mean alliance and 3 mean both.
Fix your query ;).

_________________
Sorry for my english I'm french.


Wed Jul 28, 2010 10:08 pm
Profile
Project Leader
User avatar

Joined: Sun Jul 06, 2008 7:47 pm
Posts: 874
Location: Czech Republic
Post Re: graveyards table different?
`zoneid` tinyint(1) unsigned NOT NULL,
`adjacentzoneid` tinyint(1) unsigned NOT NULL,

indeed those are bad too, how could someone set those to tinyint (tinyint supports numbers from 0 - 256 and there are zones with id over 5k !)

proper table should be:

CREATE TABLE `graveyards` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`position_x` float NOT NULL DEFAULT '0',
`position_y` float NOT NULL DEFAULT '0',
`position_z` float NOT NULL DEFAULT '0',
`orientation` float NOT NULL DEFAULT '0',
`zoneid` smallint(5) unsigned NOT NULL,
`adjacentzoneid` smallint(5) unsigned NOT NULL,
`mapid` smallint(5) unsigned NOT NULL,
`faction` enum('0','1','3') NOT NULL,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Graveyard System';

_________________
Image
----------------------------------------------------------------------
Image
Image
Image
Image


Wed Jul 28, 2010 11:00 pm
Profile ICQ WWW

Joined: Sun Mar 14, 2010 10:02 pm
Posts: 58
Location: Germany
Post Re: graveyards table different?
OK, that is what I wanted to hear. - so your table is better - OK.

The other problem is that
1. I don't know if it is neccesary to execute the arcscripts_full.sql. You see it yourself. Some Queries are even wrong in this sql script (the part I posted is a part of the whole script).
2. I don't know 100% for what the query(ies) is (are)


Thu Jul 29, 2010 7:22 am
Profile
Project Leader
User avatar

Joined: Sun Jul 06, 2008 7:47 pm
Posts: 874
Location: Czech Republic
Post Re: graveyards table different?
i will take a look when i will have a time.

_________________
Image
----------------------------------------------------------------------
Image
Image
Image
Image


Thu Jul 29, 2010 10:06 am
Profile ICQ WWW
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.