Jump to content
  • 0

Instant Gear - Equip item automatically


Go to solution Solved by Elmsroth,

Question

Hello guys,

I'm looking for equipping automatically the items provided by a NPC (Quest) to do like an instant gear function.

 

I was not able to find much documentation on this.

 

Any idea how to do it or where to find such info?

 

Thank you

Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0
  • Solution

Hello @Karibu 

You will have to modify the core on how bought items are handled.
The modfication would act as follow :

  • Before buying, check if player has enough space for storing the item ;
  • Then if buy is OK, check if item is equipable ;
  • Determine the equipment slot the item belongs to ; 
  • Remove current equiped item on destination slot and put it on an empty bag slot ;
  • Add the item in the destination slot (proeprty stored in the items itself to help finding the correct equipment slot)

On another hand, the feature as described is not really a good idea since all players do not want to equip items directly after buying them from an NPC.
If they have big bags it will force them to search for the undesired equiped item.

Can you explain more uses cases ?

For the technical side you will find the BuyItemFromVendor method in the core in Player.cpp file.

image.png.677360911e8f29e0f34b72710e7424a6.png

Link to post
Share on other sites
  • 0

Big thanks for your answer.


We are looking to setup pvp realm where players will have the same stuff/spells/level to compete as equal.

And this will be from scratch / starting the game.

Link to post
Share on other sites
  • 0

Ok !

Well, since player can change equiped stuff they would be able to tweak it by themself. So even if you "force" equiping, the player will always be able to switch.
Perhaps you can try to investigate another way to ensure player have same items equiped before fighting for each class, but using vendors is not the recommended way to be honest :)

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use