Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] if I add a fish feast to an npc vendor it just sells 1 at a time, how can I make it 20 or 100?

[DiscordArchive] if I add a fish feast to an npc vendor it just sells 1 at a time, how can I make it 20 or 100?

[DiscordArchive] if I add a fish feast to an npc vendor it just sells 1 at a time, how can I make it 20 or 100?

Pages (3): Previous 1 2 3
rektbyfaith
Administrator
0
08-30-2023, 09:10 PM
#21
Archived author: SiegeTurtlePope • Posted: 2023-08-30T21:10:12.767000+00:00
Original source

hey guys i'm trying to dev something but I can't seem to find the relevant files, to the point where i'm wondering if this logic is even in the server at all and if this is not handled client side. So when I want to craft a potion, i open my alchemy menu and i will see immediately the number of potions i can craft, right ? because it does some logic to check against the reagents present in your bag. What i would like to develop is an additional check for the items in your bank, to be able to have plants in your bank and then craft a potion using these plants even though you're in a cave, not near your bank. The end goal for this would be to be able to use the module reagent bank this way, to be able to use the reagent bank directly when I craft, not having to go to withdraw the reagents.

so far I found the function void Spell::EffectCreateItem2(SpellEffIndex effIndex)

in SpellEffects.cpp, which seems nicely check for the presence of items in your bags. Hoverer, i think this is just an added security when you are already in the process of crafting. I would like to dev at the level of right when you open your crafting menu.
rektbyfaith
08-30-2023, 09:10 PM #21

Archived author: SiegeTurtlePope • Posted: 2023-08-30T21:10:12.767000+00:00
Original source

hey guys i'm trying to dev something but I can't seem to find the relevant files, to the point where i'm wondering if this logic is even in the server at all and if this is not handled client side. So when I want to craft a potion, i open my alchemy menu and i will see immediately the number of potions i can craft, right ? because it does some logic to check against the reagents present in your bag. What i would like to develop is an additional check for the items in your bank, to be able to have plants in your bank and then craft a potion using these plants even though you're in a cave, not near your bank. The end goal for this would be to be able to use the module reagent bank this way, to be able to use the reagent bank directly when I craft, not having to go to withdraw the reagents.

so far I found the function void Spell::EffectCreateItem2(SpellEffIndex effIndex)

in SpellEffects.cpp, which seems nicely check for the presence of items in your bags. Hoverer, i think this is just an added security when you are already in the process of crafting. I would like to dev at the level of right when you open your crafting menu.

rektbyfaith
Administrator
0
08-30-2023, 09:14 PM
#22
Archived author: Foe • Posted: 2023-08-30T21:14:17.745000+00:00
Original source

This would require client edits, as well as a way to communicate your bank data to the client
rektbyfaith
08-30-2023, 09:14 PM #22

Archived author: Foe • Posted: 2023-08-30T21:14:17.745000+00:00
Original source

This would require client edits, as well as a way to communicate your bank data to the client

rektbyfaith
Administrator
0
08-30-2023, 09:15 PM
#23
Archived author: Foe • Posted: 2023-08-30T21:15:36.562000+00:00
Original source

The client handles the visual aspect of the crafting menu, when you have enough reagents the client enables the craft button. When you click craft, it sends a packet to the server to start crafting said recipe, and it then checks whether or not you have the correct amount to continue the craft.
rektbyfaith
08-30-2023, 09:15 PM #23

Archived author: Foe • Posted: 2023-08-30T21:15:36.562000+00:00
Original source

The client handles the visual aspect of the crafting menu, when you have enough reagents the client enables the craft button. When you click craft, it sends a packet to the server to start crafting said recipe, and it then checks whether or not you have the correct amount to continue the craft.

rektbyfaith
Administrator
0
08-30-2023, 09:16 PM
#24
Archived author: Foe • Posted: 2023-08-30T21:16:41.937000+00:00
Original source

By default the client doesn't know what's in your bank at any time, this is a server side concept (pretty much same as bags, but this gets cached), so you have to request this data some way. You then have to change the logic of the crafting frame to use this cached data as well.
rektbyfaith
08-30-2023, 09:16 PM #24

Archived author: Foe • Posted: 2023-08-30T21:16:41.937000+00:00
Original source

By default the client doesn't know what's in your bank at any time, this is a server side concept (pretty much same as bags, but this gets cached), so you have to request this data some way. You then have to change the logic of the crafting frame to use this cached data as well.

rektbyfaith
Administrator
0
08-30-2023, 09:16 PM
#25
Archived author: Foe • Posted: 2023-08-30T21:16:58.457000+00:00
Original source

Then you have to update the server logic to also check whether or not you have any of the resources in the bank as well as the bag
rektbyfaith
08-30-2023, 09:16 PM #25

Archived author: Foe • Posted: 2023-08-30T21:16:58.457000+00:00
Original source

Then you have to update the server logic to also check whether or not you have any of the resources in the bank as well as the bag

Pages (3): Previous 1 2 3
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)