Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item database table structure updates #10

Closed
MishimaHaruna opened this issue Nov 14, 2013 · 1 comment
Closed

Item database table structure updates #10

MishimaHaruna opened this issue Nov 14, 2013 · 1 comment
Labels

Comments

@MishimaHaruna
Copy link
Member

The modules that read from the item_db/item_db2 table need to be updated to match the new table structure, or it'll break. Focus points:

  • Pre-RE and RE tables now have the same structure.
  • Some fields can now be NULL, and NULL means that the server decides their default values.

Table structure is (item_db2, but it's the same for item_db and item_db_re)

CREATE TABLE `item_db2` (
  `id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `name_english` varchar(50) NOT NULL DEFAULT '',
  `name_japanese` varchar(50) NOT NULL DEFAULT '',
  `type` tinyint(2) unsigned NOT NULL DEFAULT '0',
  `price_buy` mediumint(10) DEFAULT NULL,
  `price_sell` mediumint(10) DEFAULT NULL,
  `weight` smallint(5) unsigned DEFAULT NULL,
  `atk` smallint(5) unsigned DEFAULT NULL,
  `matk` smallint(5) unsigned DEFAULT NULL,
  `defence` smallint(5) unsigned DEFAULT NULL,
  `range` tinyint(2) unsigned DEFAULT NULL,
  `slots` tinyint(2) unsigned DEFAULT NULL,
  `equip_jobs` int(12) unsigned DEFAULT NULL,
  `equip_upper` tinyint(8) unsigned DEFAULT NULL,
  `equip_genders` tinyint(2) unsigned DEFAULT NULL,
  `equip_locations` smallint(4) unsigned DEFAULT NULL,
  `weapon_level` tinyint(2) unsigned DEFAULT NULL,
  `equip_level_min` smallint(5) unsigned DEFAULT NULL,
  `equip_level_max` smallint(5) unsigned DEFAULT NULL,
  `refineable` tinyint(1) unsigned DEFAULT NULL,
  `view` smallint(3) unsigned DEFAULT NULL,
  `script` text,
  `equip_script` text,
  `unequip_script` text,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM;

Discussion of each field, and their default values:

  • id No changes from before.
  • name_english No changes
  • name_japanese No changes
  • type No changes
  • price_buy If NULL, defaults to price_sell * 2 (zero if both are NULL)
  • price_sell if NULL, defaults to price_buy / 2 (zero if both are NULL)
  • weight if NULL, defaults to zero
  • atk if NULL, defaults to zero
  • matk if NULL, defaults to zero (in pre-renewal it exists but it shall be ignored and not displayed)
  • defence if NULL, defaults to zero
  • range if NULL, defaults to zero
  • slots if NULL, defaults to zero
  • equip_jobs if NULL, defaults to "All Jobs" (0xffffffff)
  • equip_upper if NULL, defaults to "No Restrictions" (0x63)
  • equip_genders if NULL, defaults to "No Restrictions" (2)
  • equip_locations if NULL, defaults to zero
  • weapon_level if NULL, defaults to zero
  • equip_level_min if NULL, defaults to zero
  • equip_level_max if NULL, defaults to the server's MAX_LEVEL, in both renewal and pre-renewal
  • refineable if NULL, defaults to true (for weapons and gears, type == 4 || type == 5 - it can be ignored for other items)
  • view if NULL, defaults to zero
  • script if NULL, defaults to no script
  • equip_script if NULL, defaults to no script
  • unequip_script if NULL, defaults to no script
@Zezicla
Copy link

Zezicla commented Nov 23, 2013

does this mean item_db 1 is alrdy updated to the new strucutre ?
edit: aah i readed it again both db needs update :D would love to see this fixed fast

datmumbles pushed a commit that referenced this issue Dec 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants