• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Item System

Status
Not open for further replies.
Level 12
Joined
May 12, 2012
Messages
631
Hi Hivers! :grin:
I'm looking for the item system that when you pick up an item which is not appropriate for your job that item will be dropped/cannot be buy... I don't know the name of that system so i cannot search for it... can somebody link me to it..? :wink:
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
You basically have to create an Item-Type array, asigning a number based on profesion (1. Warrior, 2.Mage, 3.Wizard, etc.) Then, when you acquire the item, you check the number in the array (or custom value of the item) and check it with the Unit-Type of the triggering unit.

I would use a Hashtable, since it allows adding level, class, slot requirements, and else.
 
Status
Not open for further replies.
Top