Useful queries: Difference between revisions

From PSwiki
Jump to navigation Jump to search
Created page with " ===Guildhouse containers=== Extracts all items inside guildhouse containers without a proper loc_instance . This is required by the code to properly load items in guildhouses. select parent_item_id, id,loc_instance ,loc_sector_id from item_instances where loc_instance =0 and parent_item_id in ( select ii.id from item_instances ii, item_stats s where ii.item_stats_id_standard = s.id and loc_sector_id in (11,73,81,82,204) and s.container_max_slots > 0);"
 
No edit summary
 
Line 4: Line 4:
  select parent_item_id, id,loc_instance ,loc_sector_id from item_instances where loc_instance =0 and parent_item_id in (
  select parent_item_id, id,loc_instance ,loc_sector_id from item_instances where loc_instance =0 and parent_item_id in (
  select ii.id from item_instances ii, item_stats s where ii.item_stats_id_standard = s.id and loc_sector_id in (11,73,81,82,204) and s.container_max_slots > 0);
  select ii.id from item_instances ii, item_stats s where ii.item_stats_id_standard = s.id and loc_sector_id in (11,73,81,82,204) and s.container_max_slots > 0);
=== Invalid sectors ===
With PSunreal we removed a number of sectors, this check verifies if there is anything in those sectors. Result should be zero.
select * from natural_resources nr where loc_sector_id in (1,2,3,6,20,21,23,24,27,28,29,30,33,34,35,36,37,54,55,56,57,58,62,63,64,65,68,69,70,74,78,79);
select * from hunt_locations where sector in (1,2,3,6,20,21,23,24,27,28,29,30,33,34,35,36,37,54,55,56,57,58,62,63,64,65,68,69,70,74,78,79);

Latest revision as of 20:35, 28 March 2023

Guildhouse containers

Extracts all items inside guildhouse containers without a proper loc_instance . This is required by the code to properly load items in guildhouses.

select parent_item_id, id,loc_instance ,loc_sector_id from item_instances where loc_instance =0 and parent_item_id in (
select ii.id from item_instances ii, item_stats s where ii.item_stats_id_standard = s.id and loc_sector_id in (11,73,81,82,204) and s.container_max_slots > 0);

Invalid sectors

With PSunreal we removed a number of sectors, this check verifies if there is anything in those sectors. Result should be zero.

select * from natural_resources nr where loc_sector_id in (1,2,3,6,20,21,23,24,27,28,29,30,33,34,35,36,37,54,55,56,57,58,62,63,64,65,68,69,70,74,78,79);
select * from hunt_locations where sector in (1,2,3,6,20,21,23,24,27,28,29,30,33,34,35,36,37,54,55,56,57,58,62,63,64,65,68,69,70,74,78,79);