Page 10 of 10

Re: Implementing: Tradeskills

Posted: Mon Mar 04, 2019 5:43 pm
by Jabantiz
This use to work, not sure what would have changed to break it.

Basically the spell script should be applying a spell bonus and those should be linked to the spell so when another is cast it should apply its own spell bonus. The spells bonus should then be removed when the spell expires and the remove lua function is called.

It sounds like remove is being triggered when another spell is applied or the character sheet is not correctly grabbing all the spell bonuses anymore so you could have them it is just not displaying.

i just committed a struct update to fix the character sheet i can have character sheet open and watch themods add and disapear(early)

Re: Implementing: Tradeskills

Posted: Thu Mar 07, 2019 12:25 pm
by Ememjr
i was able to create a table

Code: Select all

CREATE TABLE `eq2world7`.`spell_ts_ability_index`(  
  `id` INT(10) NOT NULL,AUTO_INCREMENT
  `spell_id` INT(10) UNSIGNED NOT NULL,
  `index` INT(10) NOT NULL,
  PRIMARY KEY (`id`)
);
and add the data to it
change .log to .sql
what i do not know how to do is get the index loaded into the world
the way i did on mine was to add a ts_loc_index to mmy spelldata struct, but unsure how to get the index db file to it

Re: Implementing: Tradeskills

Posted: Thu Mar 07, 2019 6:43 pm
by Jabantiz
If you are loading it into the spell struct then when the server loads the spells data check the spell type (spell_book_type I believe has the value for tradeskill spells) and if it is a tradeskill spell then call a function to get the index for the current spell id.

Table was added to the DB Patcher, new minor version is 29. You must set the minor version in versions.h for the server to grab the table. Also note that the Patcher adds a drop so when you do this to your server it will nuke your data.

The data itself is content related (spell id's) so it won't go up on the patcher and I will have to manually add it after the code is committed.

Re: Implementing: Tradeskills

Posted: Wed Mar 13, 2019 11:47 am
by Ememjr
Jabantiz wrote: Thu Mar 07, 2019 6:43 pm If you are loading it into the spell struct then when the server loads the spells data check the spell type (spell_book_type I believe has the value for tradeskill spells) and if it is a tradeskill spell then call a function to get the index for the current spell id.

Table was added to the DB Patcher, new minor version is 29. You must set the minor version in versions.h for the server to grab the table. Also note that the Patcher adds a drop so when you do this to your server it will nuke your data.

The data itself is content related (spell id's) so it won't go up on the patcher and I will have to manually add it after the code is committed.
have you loaded this data yet, i have committed the changes to worlddatabase(loadspells) spells.h(spell data structure) and the tradeskill packet

Re: Implementing: Tradeskills

Posted: Wed Mar 13, 2019 7:39 pm
by Jabantiz
Not yet as the table has not made it from the DB Patcher to the server yet. Did you update and commit the versions.h file with the number i posted?

Re: Implementing: Tradeskills

Posted: Wed Mar 13, 2019 8:19 pm
by Jabantiz
So the sql gave an error when I changed the version.h locally so i ended up manually creating the table and changing the sql on the patcher to this

Code: Select all

CREATE TABLE `spell_ts_ability_index` (
	`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
	`spell_id` INT(10) UNSIGNED NOT NULL,
	`index` INT(10) UNSIGNED NOT NULL,
	PRIMARY KEY (`id`)
)
COLLATE='latin1_general_ci'
ENGINE=InnoDB
;
I will commit the version.h and compile the server later tonight when no one is on it.

Re: Implementing: Tradeskills

Posted: Thu Mar 14, 2019 3:07 am
by Ememjr
Jabantiz wrote: Wed Mar 13, 2019 7:39 pm Not yet as the table has not made it from the DB Patcher to the server yet. Did you update and commit the versions.h file with the number i posted?
ah no i did not, i did not relize i would have to add it to get emu to use it

Re: Implementing: Tradeskills

Posted: Thu Mar 14, 2019 5:21 pm
by Jabantiz
This was committed last night btw and I added the data but it was after the server started so it will probably need a /reload spells assuming the info loads with spells, if not then a server restart