Page 1 of 1

race types again

Posted: Sat May 25, 2019 9:52 am
by Ememjr
so i am going to try and make use of the race_types table again, so we can try and determine the race of an spawn by model_id, we have no data for it that i know of

this does not affect the race in the spawn table that is NPC Race from race.h (only about 20 of them)

there are 6 fields in that table
id --
category
subcategory
model_type
model_name
race_id

i am going to populate the best i can model_type and race_type, as these are the only ones used in the db at this time

model_type is will be the same id currently used in the model_id in spawn table
race_id will be id's from the modified race_types.h table ( orginal number +100) i think its better to put the actual number we will be using instead of adding 100 in code, so that it is not confusing when having to trace/debug

the reason for adding 100 is so when using in a quest/spell that targets a class or race the code will know whether its a class (param <100) or a race (param >100) without us having to add another param several functions

there may be duplicate model_types in this table since some models have mulitple race type they cover
examples
model_id 137 orc-- raceid 317
model_id 139 skeletonorc -- raceid 317 and 340

i woul appreciate feedback but please make it contructive, with reasons and examples of whats wrong with it, and examples would be nice

Re: race types again

Posted: Sat May 25, 2019 2:40 pm
by Jabantiz
Ememjr wrote: Sat May 25, 2019 9:52 am race_id will be id's from the modified race_types.h table ( orginal number +100) i think its better to put the actual number we will be using instead of adding 100 in code, so that it is not confusing when having to trace/debug
In this case I would actually change the defines as well so the number in the db matches the defines to make it consistent.

Re: race types again

Posted: Sat May 25, 2019 3:56 pm
by Ememjr
i did change the defines already

Re: race types again

Posted: Sat May 25, 2019 4:00 pm
by Ememjr
i am building the race type table with data on my server now, it will take some time, becuase i am going through the entire spawn table we have and making sure i have all the model types we are using in the raceid table. of course there will be spawns that will not have there model id in the race id table , only npc/mob spawns will have them