//! textmacro CATALOG_2
struct ItemCatalog2 extends array
//can be changed to arrays if adding charged reg items that collide with these
readonly static integer CHARGE_99_0 = 0
readonly static integer CHARGE_99_1 = 0
readonly static integer CHARGE_20_0 = 0
readonly static integer CHARGE_20_1 = 0
private static integer array catalogs
private static integer array classCatalogs
method raw takes integer va returns integer
return CatalogRaw(this, va)
endmethod
method id takes integer va returns integer
return CatalogId(this, va)
endmethod
method operator count takes nothing returns integer
return CatalogCount(this)
endmethod
static method operator [] takes integer i returns thistype
return classCatalogs[GetUnitPointValueByType(i)]
endmethod
private static method onInit takes nothing returns nothing
//item classes
/*
0 -------------------------- Off-Hand
1 -------------------------- Clothes
2 -------------------------- Leather
3 -------------------------- Chain
4 -------------------------- Plated
5 -------------------------- Sword/Axe/Hammer/Two-Handed
6 -------------------------- Dagger/Katar/Fist
7 -------------------------- Mace/Wand/Staff/Book/Runes
8 -------------------------- Bow/Crossbow
*/
set catalogs[0] = CatalogCreate()
set catalogs[1] = CatalogCreate()
set catalogs[2] = CatalogCreate()
set catalogs[3] = CatalogCreate()
set catalogs[4] = CatalogCreate()
set catalogs[5] = CatalogCreate()
set catalogs[6] = CatalogCreate()
set catalogs[7] = CatalogCreate()
set catalogs[8] = CatalogCreate()
//can be split up into each class and so forth if wanting super class specific items
//0
// warrior, warlord, legionaire, brigand, pikeman, lancer
// 0,1,2,3,4,5, rune
//
//1
// rogue, elu, slayer, shadow slayer, blader, executioner
// 0,1,2,3,6, rune
//2
// oracles, prophet, medium, sage, trickster, dualist, shaman, witch doctor
// 0,1,7, rune
//3
// ranger
// 0,1,2,8, rune
//4
// Refugee
// 0
set classCatalogs[0] = CatalogCreate() //war
set classCatalogs[1] = CatalogCreate() //rog
set classCatalogs[2] = CatalogCreate() //medium
set classCatalogs[3] = CatalogCreate() //ranger
set classCatalogs[4] = CatalogCreate() //refugee
//class 0
set CHARGE_99_0 = 1
call CatalogAdd(catalogs[0], '0') //Stone
set CHARGE_99_1 = 1
set CHARGE_20_0 = 2
call CatalogAdd(catalogs[0], '0') //Minor Healing Potion 0
call CatalogAdd(catalogs[0], '0') //Greater Healing Potion 0
call CatalogAdd(catalogs[0], '0') //Minor Mana Potion 0
call CatalogAdd(catalogs[0], '0') //Greater Mana Potion 0
call CatalogAdd(catalogs[0], '0') //Minor Rejuvenation Potion 0
call CatalogAdd(catalogs[0], '0') //Greater Rejuvenation Potion 0
call CatalogAdd(catalogs[0], '0') //Green Potion 0
call CatalogAdd(catalogs[0], '0') //Sleep Potion 0
call CatalogAdd(catalogs[0], '0') //Blue Herbs 0
call CatalogAdd(catalogs[0], '0') //Green Herbs 0
call CatalogAdd(catalogs[0], '0') //Mushroom 0
call CatalogAdd(catalogs[0], '0') //Red Herbs 0
call CatalogAdd(catalogs[0], '0') //Yellow Herbs 0
set CHARGE_20_1 = CatalogCount(catalogs[0])
call CatalogAdd(catalogs[0], '0') //Boar Tusk 0
call CatalogAdd(catalogs[0], '0') //Iron Shield 0
call CatalogAdd(catalogs[0], '0') //Wooden Shield 0
call CatalogAdd(catalogs[0], '0') //Blood Stone Heart 0
call CatalogAdd(catalogs[0], '0') //Necklace of Nobleman 0
call CatalogAdd(catalogs[0], '0') //Silverkey of Brotherhood 0
call CatalogAdd(catalogs[0], '0') //Medal of Great Honor 0
//auto added on loading refugee, no need to save
//call CatalogAdd(catalogs[], 'I04Q') //Refugee's Blade 0
//call CatalogAdd(catalogs[], 'I04S') //Refugee's Boots 0
//call CatalogAdd(catalogs[], 'I04R') //Refugee's Suit 0
//class 1
call CatalogAdd(catalogs[1], '0') //Bandana 1
call CatalogAdd(catalogs[1], '0') //Bandit Hat 1
call CatalogAdd(catalogs[1], '0') //Hawk Mask 1
call CatalogAdd(catalogs[1], '0') //Hood 1
call CatalogAdd(catalogs[1], '0') //Hood Cape 1
call CatalogAdd(catalogs[1], '0') //Mage Hat 1
call CatalogAdd(catalogs[1], '0') //Mantle 1
call CatalogAdd(catalogs[1], '0') //Robe 1
call CatalogAdd(catalogs[1], '0') //Royal Cape 1
call CatalogAdd(catalogs[1], '0') //Sandals 1
call CatalogAdd(catalogs[1], '0') //Vestment 1
call CatalogAdd(catalogs[1], '0') //Peasant 1
call CatalogAdd(catalogs[1], '0') //Zyria Reinforcer Coat 1
call CatalogAdd(catalogs[1], '0') //Pirate Hat 1
call CatalogAdd(catalogs[1], '0') //Wirs Legs 1
//class 2
call CatalogAdd(catalogs[2], '0') //Bandits Armor 2
call CatalogAdd(catalogs[2], '0') //Boots of Speed 2
call CatalogAdd(catalogs[2], '0') //Full Leather Armor 2
call CatalogAdd(catalogs[2], '0') //Hard Leather Armor 2
call CatalogAdd(catalogs[2], '0') //Hat 2
call CatalogAdd(catalogs[2], '0') //Leather Armor 2
call CatalogAdd(catalogs[2], '0') //Hard Scales Armor 2
call CatalogAdd(catalogs[2], '0') //Zyria Reinforcer Armor 2
//class 3
call CatalogAdd(catalogs[3], '0') //Naga Armor 3
//class 4
call CatalogAdd(catalogs[4], '0') //Plated Boots 4
call CatalogAdd(catalogs[4], '0') //Plated Helm 4
call CatalogAdd(catalogs[4], '0') //Full Pated Mail 4
call CatalogAdd(catalogs[4], '0') //Bronze Helm 4
call CatalogAdd(catalogs[4], '0') //Boots of Horde 4
call CatalogAdd(catalogs[4], '0') //Mythril Helm 4
//class 5
call CatalogAdd(catalogs[5], '0') //Axe 5
call CatalogAdd(catalogs[5], '0') //Iron Sword 5
call CatalogAdd(catalogs[5], '0') //Lance 5
call CatalogAdd(catalogs[5], '0') //Large Axe 5
call CatalogAdd(catalogs[5], '0') //Long Horn 5
call CatalogAdd(catalogs[5], '0') //Long Sword 5
call CatalogAdd(catalogs[5], '0') //Small Axe 5
call CatalogAdd(catalogs[5], '0') //Spear 5
call CatalogAdd(catalogs[5], '0') //Pike 5
call CatalogAdd(catalogs[5], '0') //Mythril Sword 5
call CatalogAdd(catalogs[5], '0') //Pick Axe 5
call CatalogAdd(catalogs[5], '0') //Enforcer Axe 5
//class 6
call CatalogAdd(catalogs[6], '0') //Dagger 6
call CatalogAdd(catalogs[6], '0') //Mythril Dagger 6
call CatalogAdd(catalogs[6], '0') //Spider Claw 6
call CatalogAdd(catalogs[6], '0') //Wild Fangs 6
call CatalogAdd(catalogs[6], '0') //Heretic Blade 6
call CatalogAdd(catalogs[6], '0') //Hammer Forge 6
//class 7
call CatalogAdd(catalogs[7], '0') //Bone Wand 7
call CatalogAdd(catalogs[7], '0') //Novice Stick 7
call CatalogAdd(catalogs[7], '0') //Mind Staff 7
//class 8
call CatalogAdd(catalogs[8], 'I046') //Wooden Bow 8
call CatalogAddCatalog(classCatalogs[0], catalogs[0])
call CatalogAddCatalog(classCatalogs[0], catalogs[1])
call CatalogAddCatalog(classCatalogs[0], catalogs[2])
call CatalogAddCatalog(classCatalogs[0], catalogs[3])
call CatalogAddCatalog(classCatalogs[0], catalogs[4])
call CatalogAddCatalog(classCatalogs[0], catalogs[5])
call CatalogAddCatalog(classCatalogs[1], catalogs[0])
call CatalogAddCatalog(classCatalogs[1], catalogs[1])
call CatalogAddCatalog(classCatalogs[1], catalogs[2])
call CatalogAddCatalog(classCatalogs[1], catalogs[3])
call CatalogAddCatalog(classCatalogs[1], catalogs[6])
call CatalogAddCatalog(classCatalogs[2], catalogs[0])
call CatalogAddCatalog(classCatalogs[2], catalogs[1])
call CatalogAddCatalog(classCatalogs[2], catalogs[7])
call CatalogAddCatalog(classCatalogs[3], catalogs[0])
call CatalogAddCatalog(classCatalogs[3], catalogs[1])
call CatalogAddCatalog(classCatalogs[3], catalogs[2])
call CatalogAddCatalog(classCatalogs[3], catalogs[8])
call CatalogAddCatalog(classCatalogs[4], catalogs[0])
endmethod
endstruct
struct HeroCatalog2 extends array
implement Catalog
readonly static integer HERO_0_0 = 0
readonly static integer HERO_0_1 = 0
readonly static integer HERO_1_0 = 0
readonly static integer HERO_1_1 = 0
readonly static integer HERO_2_0 = 0
readonly static integer HERO_2_1 = 0
readonly static integer HERO_3_0 = 0
readonly static integer HERO_3_1 = 0
readonly static integer HERO_4_0 = 0
readonly static integer HERO_4_1 = 0
private static method onInit takes nothing returns nothing
//0
set HERO_0_0 = 1
call add('0') //Warrior
call add('0') //Warlord
call add('0') //Legionaire
call add('0') //Brigand
call add('0') //Pikeman
call add('0') //Lancer
set HERO_0_1 = count
//1
set HERO_1_0 = count+1
call add('0') //Rogue
call add('0') //Eluminator
call add('0') //Slayers
call add('0') //Shadow Slayer
call add('0') //Blader
call add('0') //Executioner
set HERO_1_1 = count
//2
set HERO_2_0 = count+1
call add('0') //Oracles
call add('0') //Medium
call add('0') //Shaman
call add('0') //Trickster
call add('0') //Dualist
call add('0') //Prophet
call add('0') //Sage
call add('0') //Witch Doctor
set HERO_2_1 = count
//3
set HERO_3_0 = count+1
call add('0') //Ranger
set HERO_3_1 = HERO_3_0
//solo??
call add('0') //Wanderer
//4
set HERO_4_0 = HERO_3_1+2
call add('0') //Refugee
set HERO_4_1 = HERO_4_0
endmethod
endstruct
//! endtextmacro