Page 1 of 1

Harvesting percentages not loading correctly

Posted: Sun May 07, 2017 9:49 pm
by Ememjr
using the defualt tables with imbue 1% rare .7% and harvest10 .3%

with debugging on the following printout has the wrong percentages so an imbue and a singe rare do not seem to be hit

Code: Select all

LogWrite(GROUNDSPAWN__DEBUG, 3, "GSpawn", "Using Table: %i, %i, %i, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %i", 
					selected_table->min_skill_level,
					selected_table->min_adventure_level,
					selected_table->bonus_table,
					selected_table->harvest1,
					selected_table->harvest3,
					selected_table->harvest5,
					selected_table->harvest_imbue,
					selected_table->harvest_rare,
					selected_table->harvest10,
					selected_table->harvest_coin);
here is the log entry
log.JPG
although it should be 0,0,0,70.00,20.00,8.00,1.00, 0.70, 0.30, 0
it looks like
harvest imbue is getting .70 instead of 1.00
harvest rare is getting .30 instead of .70
and harvest10 is getting 1.00 instead of .30

i could not find where these values get loaded into the select table

Re: Harvesting percentages not loading correctly

Posted: Mon May 08, 2017 4:26 am
by Ememjr
okay i found a fix for this as well, in zoneserver.h change

Code: Select all

void AddGroundSpawnEntry(int32 groundspawn_id, int16 min_skill_level, int16 min_adventure_level, int8 bonus_table, float harvest1, float harvest3, float harvest5, float harvest10, float harvest_imbue, float harvest_rare, int32 harvest_coin);
to

Code: Select all

void AddGroundSpawnEntry(int32 groundspawn_id, int16 min_skill_level, int16 min_adventure_level, int8 bonus_table, float harvest1, float harvest3, float harvest5, float harvest_imbue, float harvest_rare, float harvest10, int32 harvest_coin);
AND
in
zaoneserver.cpp

Code: Select all

void ZoneServer::AddGroundSpawnEntry(int32 groundspawn_id, int16 min_skill_level, int16 min_adventure_level, int8 bonus_table, float harvest1, float harvest3, float harvest5, float harvest10, float harvest_imbue, float harvest_rare,  int32 harvest_coin)
to

Code: Select all

void ZoneServer::AddGroundSpawnEntry(int32 groundspawn_id, int16 min_skill_level, int16 min_adventure_level, int8 bonus_table, float harvest1, float harvest3, float harvest5, float harvest_imbue, float harvest_rare, float harvest10, int32 harvest_coin)

Re: Harvesting percentages not loading correctly

Posted: Mon May 08, 2017 3:10 pm
by Jabantiz
Committed this change to dev svn