[SOlVED] animal_drop_items issue.

Have some feedback for Life is Feudal? Post it here!
User avatar
Razoreqx
 
Posts: 91
Joined: 06 Oct 2014, 13:13

[SOlVED] animal_drop_items issue.

Post by Razoreqx » 03 Apr 2015, 02:16

I found an issue where our server is no longer adding animal heads to bear and deer corpses after skinning.
Digging into the sql database I found under table: "animal_drop_items" was empty . The structures are still there, only the INSERT INTO are missing.

I did some checking and found this.

Under the new.sql script you'll see this.

Code: Select all
new.sql

/*!40000 ALTER TABLE `animal_breeds_spawn_units` DISABLE KEYS */;
INSERT INTO `animal_breeds_spawn_units` (`animal_id`, `spawn_pattern_id`, `count_min`, `count_max`, `random_animal_quality_delta_min`, `random_animal_quality_delta_max`) VALUES
   (752, 2, 1, 1, -20, 10),
   (753, 4, 1, 2, -30, 10),
   (754, 1, 1, 1, -10, 20),
   (757, 3, 1, 1, -20, 10),
   (758, 3, 1, 1, -20, 0),
   (760, 1, 1, 1, -10, 20);
/*!40000 ALTER TABLE `animal_breeds_spawn_units` ENABLE KEYS */;


-- Dumping structure for table cm.animal_drop_items
DROP TABLE IF EXISTS `animal_drop_items`;
CREATE TABLE IF NOT EXISTS `animal_drop_items` (
  `animal_id` int(10) unsigned NOT NULL,
  `drop_item_id` int(10) unsigned NOT NULL,
  `probability` float unsigned NOT NULL,
  `count_min` smallint(5) unsigned NOT NULL,
  `count_max` smallint(5) unsigned NOT NULL,
  PRIMARY KEY (`animal_id`,`drop_item_id`),
  KEY `FK_animal_drop_items_objectstypeID` (`drop_item_id`),
  KEY `FK_animal_id_objectstypeID` (`animal_id`),
  CONSTRAINT `FK_animal_drop_items_objectstypeID` FOREIGN KEY (`drop_item_id`) REFERENCES `objects_types` (`ID`),
  CONSTRAINT `FK_animal_drop_items__animal_breeds` FOREIGN KEY (`animal_id`) REFERENCES `animal_breeds` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*!40000 ALTER TABLE `animal_drop_items` DISABLE KEYS */;
INSERT INTO `animal_drop_items` (`animal_id`, `drop_item_id`, `probability`, `count_min`, `count_max`) VALUES
   (752, 336, 1, 2, 3),
   (752, 342, 0.5, 10, 15),
   (752, 386, 1, 3, 5),
   (752, 474, 1, 3, 5),
   (753, 336, 1, 3, 4),
   (753, 342, 0.5, 8, 14),
   (753, 386, 1, 3, 5),
   (753, 475, 1, 3, 5),
   (754, 386, 1, 1, 4),
   (754, 474, 0.2, 1, 4),
   (757, 336, 1, 1, 2),
   (757, 342, 0.5, 5, 9),
   (757, 386, 1, 2, 3),
   (757, 475, 1, 2, 3),
   (758, 336, 1, 1, 2),
   (758, 342, 0.5, 5, 9),
   (758, 386, 1, 2, 3),
   (758, 475, 1, 2, 3);
/*!40000 ALTER TABLE `animal_drop_items` ENABLE KEYS */;


-- Dumping structure for table cm.animal_spawn_patterns
DROP TABLE IF EXISTS `animal_spawn_patterns`;
CREATE TABLE IF NOT EXISTS `animal_spawn_patterns` (
  `ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `spawn_probability` float unsigned NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;


I cross checked this with the patch.sql

Code: Select all
-- delete all duplicated loot from animal_drop_items
delete from animal_drop_items;


when I removed the line under patch.sql "delete from animal_drop_items" the values above are not deleted but the server loads but several ERR messages appear in the logs before the steam connction is made and anyone who connects to the server gets the interal DB error.

I put the patch.sql line back in:
delete from animal_drop_items
and everything is fine but the INSERT INTO items are again missing.

Anyone see this issue? Thoughts?
Last edited by Razoreqx on 04 Apr 2015, 10:44, edited 1 time in total.
Razors Edge
A Life is Feudal Persistent World
http://razors-edge.org
22 Custom MODS / Custom Graphics models Planned. Visit our Gallery.

User avatar
Razoreqx
 
Posts: 91
Joined: 06 Oct 2014, 13:13

Re: animal_drop_items issue.

Post by Razoreqx » 03 Apr 2015, 19:55

My guess this is an issue surrounding the use of foreign keys and there constraints.. Did ID's somehow get change since the claims system patch revolving around these foreign key table declarations?
Razors Edge
A Life is Feudal Persistent World
http://razors-edge.org
22 Custom MODS / Custom Graphics models Planned. Visit our Gallery.

User avatar
Razoreqx
 
Posts: 91
Joined: 06 Oct 2014, 13:13

Re: animal_drop_items issue.

Post by Razoreqx » 04 Apr 2015, 10:45

Razoreqx wrote:My guess this is an issue surrounding the use of foreign keys and there constraints.. Did ID's somehow get change since the claims system patch revolving around these foreign key table declarations?



Solved myself. BTW this was also part of the issue with tanning tubs and racks. I saw a post about /cache That's the 2nd part of the issue with those. Fixed both problems in one update of the SQL DB..
Razors Edge
A Life is Feudal Persistent World
http://razors-edge.org
22 Custom MODS / Custom Graphics models Planned. Visit our Gallery.

Return to Feedback Section

cron