XxShadyxX
I abused the rep system.
- Reaction score
- 81
I'm making a Equip System.
I am still new to Jass and vJass but know enough to start this. Anyway I have this:
Now I need to add the information to a hashtable and be able to load it in the system. My questions are:
a) How should I go along doing this?
b) Is using a Stack the best method?
I am still new to Jass and vJass but know enough to start this. Anyway I have this:
JASS:
scope WEInit initializer Init
private struct equip
integer eq //ItemType rawcode
integer req //Item Requirement Level
integer icon //Item Icon
integer stat //Item Ability
integer type //Item Attack/Defense type
integer db //Item Defense Bonus
integer ab //Item Attack Bonus
integer asb //Item Strength Bonus
integer aab //Item Agility Bonus
integer aib //Item intelligence Bonus
integer ms //Item Movement Bonus
integer as //Item Attack Speed Bonus
integer hp //Item Health Bonus
integer mp //Item Mana Bonus
integer slot //Item Slot
endstruct
private function Init takes nothing returns nothing
// _____________________________________
local equip RecruitsSword=equip.create()
local equip RecruitsArmor=equip.create()
// Recruits Sword
set RecruitsSword.req=5
set RecruitsSword.eq=039;i000039;
set RecruitsSword.icon=039;a001039;
set RecruitsSword.stat=039;a002039;
set RecruitsSword.type=039;a003039;
set RecruitsSword.db=0
set RecruitsSword.asb=5
set RecruitsSword.slot=1
//______________________________________
// Recruits Armor
set RecruitsArmor.req=5
set RecruitsArmor.eq=039;i001039;
set RecruitsArmor.icon=039;a004039;
set RecruitsArmor.stat=039;a005039;
set RecruitsArmor.type=039;a006039;
set RecruitsArmor.db=100
set RecruitsArmor.slot=3
//______________________________________
endfunction
endscope
Now I need to add the information to a hashtable and be able to load it in the system. My questions are:
a) How should I go along doing this?
b) Is using a Stack the best method?