Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] you mean an update join for the "slot" column?

[DiscordArchive] you mean an update join for the "slot" column?

[DiscordArchive] you mean an update join for the "slot" column?

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
05-31-2020, 04:23 PM
#1
Archived author: Barbz • Posted: 2020-05-31T16:23:02.274000+00:00
Original source

you mean an update join for the "slot" column?
rektbyfaith
05-31-2020, 04:23 PM #1

Archived author: Barbz • Posted: 2020-05-31T16:23:02.274000+00:00
Original source

you mean an update join for the "slot" column?

rektbyfaith
Administrator
0
05-31-2020, 04:24 PM
#2
Archived author: MaloW • Posted: 2020-05-31T16:24:27.472000+00:00
Original source

If I were to guess there's some optimization setting the core uses to do selects where it operates on a sort of "find first" rather than "maintain original order" if no specific order is asked for. Probably has to do with different internal partitions of the DB or something. I'm no DB expert but I've heard DB experts talk about these things hehe
rektbyfaith
05-31-2020, 04:24 PM #2

Archived author: MaloW • Posted: 2020-05-31T16:24:27.472000+00:00
Original source

If I were to guess there's some optimization setting the core uses to do selects where it operates on a sort of "find first" rather than "maintain original order" if no specific order is asked for. Probably has to do with different internal partitions of the DB or something. I'm no DB expert but I've heard DB experts talk about these things hehe

rektbyfaith
Administrator
0
05-31-2020, 04:24 PM
#3
Archived author: MaloW • Posted: 2020-05-31T16:24:55.891000+00:00
Original source

Yeah, basically like pulling the ilvl from item_template and inserting the ilvl into "slot" for each item, that way they will all be sorted by ilvl
rektbyfaith
05-31-2020, 04:24 PM #3

Archived author: MaloW • Posted: 2020-05-31T16:24:55.891000+00:00
Original source

Yeah, basically like pulling the ilvl from item_template and inserting the ilvl into "slot" for each item, that way they will all be sorted by ilvl

rektbyfaith
Administrator
0
05-31-2020, 04:25 PM
#4
Archived author: Barbz • Posted: 2020-05-31T16:25:46.794000+00:00
Original source

i think the slot is tinyint (255 max)
rektbyfaith
05-31-2020, 04:25 PM #4

Archived author: Barbz • Posted: 2020-05-31T16:25:46.794000+00:00
Original source

i think the slot is tinyint (255 max)

rektbyfaith
Administrator
0
05-31-2020, 04:26 PM
#5
Archived author: Barbz • Posted: 2020-05-31T16:26:13.927000+00:00
Original source

no
rektbyfaith
05-31-2020, 04:26 PM #5

Archived author: Barbz • Posted: 2020-05-31T16:26:13.927000+00:00
Original source

no

rektbyfaith
Administrator
0
05-31-2020, 04:26 PM
#6
Archived author: Barbz • Posted: 2020-05-31T16:26:15.886000+00:00
Original source

it's smallint
rektbyfaith
05-31-2020, 04:26 PM #6

Archived author: Barbz • Posted: 2020-05-31T16:26:15.886000+00:00
Original source

it's smallint

rektbyfaith
Administrator
0
05-31-2020, 04:26 PM
#7
Archived author: Barbz • Posted: 2020-05-31T16:26:33.244000+00:00
Original source

with insert join, you can't get the right order too, i had to make crazy queries with temporary tables + subqueries and it still didn't order correctly
i had to make a loop in sql to put the slot number right but it's hacky and awful (took me two hours)
rektbyfaith
05-31-2020, 04:26 PM #7

Archived author: Barbz • Posted: 2020-05-31T16:26:33.244000+00:00
Original source

with insert join, you can't get the right order too, i had to make crazy queries with temporary tables + subqueries and it still didn't order correctly
i had to make a loop in sql to put the slot number right but it's hacky and awful (took me two hours)

rektbyfaith
Administrator
0
05-31-2020, 04:26 PM
#8
Archived author: MaloW • Posted: 2020-05-31T16:26:38.242000+00:00
Original source

UPDATE npc_vendor INNER JOIN item_template ON npc_vendor.item = item_template.entry
SET npc_vendor.slot = item_template.RequiredLevel WHERE X
This for example will order all the items based on required level to use it. I used that to order all food and water on vendors correctly
rektbyfaith
05-31-2020, 04:26 PM #8

Archived author: MaloW • Posted: 2020-05-31T16:26:38.242000+00:00
Original source

UPDATE npc_vendor INNER JOIN item_template ON npc_vendor.item = item_template.entry
SET npc_vendor.slot = item_template.RequiredLevel WHERE X
This for example will order all the items based on required level to use it. I used that to order all food and water on vendors correctly

rektbyfaith
Administrator
0
05-31-2020, 04:27 PM
#9
Archived author: Barbz • Posted: 2020-05-31T16:27:21.191000+00:00
Original source

ok cool but still the items with same slot will be ordered seemingly randomly and we are still clueless as to why it happens
rektbyfaith
05-31-2020, 04:27 PM #9

Archived author: Barbz • Posted: 2020-05-31T16:27:21.191000+00:00
Original source

ok cool but still the items with same slot will be ordered seemingly randomly and we are still clueless as to why it happens

rektbyfaith
Administrator
0
05-31-2020, 04:27 PM
#10
Archived author: Barbz • Posted: 2020-05-31T16:27:40.060000+00:00
Original source

while the original NPC vendor is ordered logically
rektbyfaith
05-31-2020, 04:27 PM #10

Archived author: Barbz • Posted: 2020-05-31T16:27:40.060000+00:00
Original source

while the original NPC vendor is ordered logically

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)