Suggestion...

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Suggestion...

Post by Gangrenous » Mon Jan 15, 2018 6:09 am

I suggest adding these to commands.cpp

Code: Select all

		case COMMAND_RELOAD_RULES: {
			client->SimpleMessage(CHANNEL_COLOR_YELLOW, "Reloading Rules...");
			world.ReloadRules();
			client->SimpleMessage(CHANNEL_COLOR_YELLOW, "Done!");
			break;  
								}
		case COMMAND_RELOAD_RECIPES: {
			client->SimpleMessage(CHANNEL_COLOR_YELLOW, "Reloading Recipes...");
			master_recipe_list.ClearRecipes();
			database.LoadRecipes();
			client->SimpleMessage(CHANNEL_COLOR_YELLOW, "Done!");
			break;  

Code: Select all

#define COMMAND_RELOAD_RULES            315
#define COMMAND_RELOAD_RECIPES          316
In World.cpp

Code: Select all

void World::ReloadRules() {
	LogWrite(RULESYS__DEBUG, 1, "Rules", "-ReLoading Rule Sets...");
	rule_manager.ClearRuleSets();
	database.LoadRuleSets();
	LogWrite(RULESYS__DEBUG, 1, "Rules", "-ReLoad Rule Sets complete!");
}
Of course the rules need to be added in the database commands table.

There may be some things like a supporting function missing, but it should be self explanatory.
Resident Dirty Hippy

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Suggestion...

Post by Gangrenous » Mon Jan 15, 2018 6:14 am

Also to note, new recipes do not show up until the character logs in and out. We could also reload player recipes, or would that be dangerous? Having them log is not that big of a deal.
Resident Dirty Hippy

User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

Re: Suggestion...

Post by Ememjr » Wed Jan 17, 2018 10:19 am

we should not require a player to log out to add new recipe unless its a new to the world recipe

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Suggestion...

Post by Jabantiz » Wed Jan 17, 2018 4:23 pm

If I remember right the recipe book is kind of special and there is really no way to clear it, I believe every packet sent for it appends its data to what the client was already sent. So when you scribe a new book only those recipes are sent in the packet and it gets added on to what you already had.

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Suggestion...

Post by Gangrenous » Wed Jan 17, 2018 5:05 pm

master_recipe_list.ClearRecipes();
Resident Dirty Hippy

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Suggestion...

Post by Jabantiz » Wed Jan 17, 2018 6:00 pm

I am talking about the client, once sent I don't think it is possible to clear the list on the client from the server.

User avatar
xinux
Team Member
Posts: 680
Joined: Wed Mar 10, 2010 11:10 am
Location: Destroyer of Servers

Re: Suggestion...

Post by xinux » Wed Jan 17, 2018 6:03 pm

It has been a very long time but I thought there was a opcode to remove a recipe or I could have my games mixed up but if there is you would need to cycle through the players current list removing them all from the client then resend them.
EQ II - Build=1360 (Orig) - Build=1360 (DoF) - Build=2654 (KoS) - Build=3375 (Classic) - Build=3554 (EoF)
EQ II - Build=4412 (RoK) - Build=5122 (TSO) - Build=6118 (SF) - Build=7628 (DoV) - Build=8295 (Aod)

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Suggestion...

Post by Jabantiz » Wed Jan 17, 2018 6:58 pm

xinux wrote: Wed Jan 17, 2018 6:03 pm It has been a very long time but I thought there was a opcode to remove a recipe or I could have my games mixed up but if there is you would need to cycle through the players current list removing them all from the client then resend them.
Now that you mention it I do seem to remember recipes you could only craft a certain number of times before they vanished, don't know if we ever got a collect of that or if live still does that. Figuring out that opcode is probably the only way to clear the clients list, not fond of sending that packet for each recipe though as that could be thousands of packets for a single player, unless that opcode allows an array of recipes. Something to look into at least, thanks Xinux.

User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

Re: Suggestion...

Post by Ememjr » Thu Jan 18, 2018 7:03 am

Jabantiz wrote: Wed Jan 17, 2018 6:58 pm
xinux wrote: Wed Jan 17, 2018 6:03 pm It has been a very long time but I thought there was a opcode to remove a recipe or I could have my games mixed up but if there is you would need to cycle through the players current list removing them all from the client then resend them.
Now that you mention it I do seem to remember recipes you could only craft a certain number of times before they vanished, don't know if we ever got a collect of that or if live still does that. Figuring out that opcode is probably the only way to clear the clients list, not fond of sending that packet for each recipe though as that could be thousands of packets for a single player, unless that opcode allows an array of recipes. Something to look into at least, thanks Xinux.
yes live still has limited use recipes, i have seen single use and 3x use ones in my ventures

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Suggestion...

Post by Gangrenous » Thu Jan 18, 2018 8:55 am

What would you say the cause is? All of my recipes are custom, can you think of anything that would cause this?
Resident Dirty Hippy

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests