-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathitem.go
4394 lines (4320 loc) · 128 KB
/
item.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package d2s
// Item describes any type of item and all it's data.
type Item struct {
Identified uint64 `json:"identified"`
Socketed uint64 `json:"socketed"`
New uint64 `json:"new"`
IsEar uint64 `json:"is_ear"`
StarterItem uint64 `json:"starter_item"`
SimpleItem uint64 `json:"simple_item"`
Ethereal uint64 `json:"ethereal"`
Personalized uint64 `json:"personalized"`
PersonalizedName string `json:"personalized_name,omitempty"`
GivenRuneword uint64 `json:"given_runeword"`
Version uint64 `json:"version"`
LocationID uint64 `json:"location_id"`
EquippedID uint64 `json:"equipped_id,omitempty"`
PositionX uint64 `json:"position_x"`
PositionY uint64 `json:"position_y"`
AltPositionID uint64 `json:"alt_position_id"`
Type string `json:"type"`
TypeID uint64 `json:"type_id"`
TypeName string `json:"type_name"`
NrOfItemsInSockets uint64 `json:"nr_of_items_in_sockets"`
ID uint64 `json:"id"`
Level uint64 `json:"level"`
Quality uint64 `json:"quality"`
MultiplePictures uint64 `json:"multiple_pictures"`
PictureID uint64 `json:"picture_id"`
ClassSpecific uint64 `json:"class_specific"`
LowQualityID uint64 `json:"low_quality_id"`
Timestamp uint64 `json:"timestamp"`
EarAttributes earAttributes `json:"ear_attributes"`
DefenseRating int64 `json:"defense_rating,omitempty"`
MaxDurability uint64 `json:"max_durability,omitempty"`
CurrentDurability uint64 `json:"current_durability,omitempty"`
TotalNrOfSockets uint64 `json:"total_nr_of_sockets"`
Quantity uint64 `json:"quantity,omitempty"`
MagicPrefix uint64 `json:"magic_prefix,omitempty"`
MagicPrefixName string `json:"magic_prefix_name,omitempty"`
MagicSuffix uint64 `json:"magic_suffix,omitempty"`
MagicSuffixName string `json:"magic_suffix_name,omitempty"`
RunewordID uint64 `json:"runeword_id,omitempty"`
RunewordName string `json:"runeword_name,omitempty"`
RunewordAttributes []MagicAttribute `json:"runeword_attributes"`
SetID uint64 `json:"set_id"`
SetName string `json:"set_name,omitempty"`
SetListCount uint64 `json:"set_list_count"`
SetAttributes [][]MagicAttribute `json:"set_attributes"`
SetAttributesNumReq []uint `json:"set_attributes_num_req,omitempty"`
SetAttributesIDsReq []uint64 `json:"set_attributes_ids_req,omitempty"`
RareName string `json:"rare_name,omitempty"`
RareName2 string `json:"rare_name2,omitempty"`
MagicalNameIDs []uint64 `json:"magical_name_ids,omitempty"`
UniqueID uint64 `json:"unique_id"`
UniqueName string `json:"unique_name,omitempty"`
MagicAttributes []MagicAttribute `json:"magic_attributes"`
SocketedItems []Item `json:"socketed_items"`
BaseDamage *WeaponDamage `json:"base_damage,omitempty"`
}
func (i *Item) getTypeID() uint64 {
if _, ok := armorCodes[i.Type]; ok {
return armor
}
if _, ok := shieldCodes[i.Type]; ok {
return shield
}
if _, ok := weaponCodes[i.Type]; ok {
return weapon
}
return other
}
// Item code value constant used as an internal reference or "ID".
const (
// Armor
AlphaHelm string = "dr6"
AncientArmor string = "aar"
Antlers string = "dr3"
ArchonPlate string = "utp"
Armet string = "ulm"
AssaultHelmet string = "ba4"
AvengerGuard string = "ba5"
BalrogSkin string = "upl"
Basinet string = "xhl"
BattleBelt string = "ztb"
BattleBoots string = "xtb"
BattleGauntlets string = "xtg"
Belt string = "mbl"
BloodSpirit string = "drb"
BoneHelm string = "bhm"
BoneVisage string = "uh9"
Boneweave string = "uhn"
BoneweaveBoots string = "umb"
Bracers string = "mgl"
BrambleMitts string = "ulg"
BreastPlate string = "brs"
Cap string = "cap"
CarnageHelm string = "bab"
Casque string = "xlm"
ChainBoots string = "mbt"
ChainMail string = "chn"
ChaosArmor string = "xul"
Circlet string = "ci0"
ColossusGirdle string = "uhc"
ConquerorCrown string = "bae"
Corona string = "urn"
Coronet string = "ci1"
Crown string = "crn"
CrusaderGauntlets string = "utg"
Cuirass string = "xrs"
DeathMask string = "xsk"
Demonhead string = "usk"
DemonhideArmor string = "xla"
DemonhideBoots string = "xlb"
DemonhideGloves string = "xlg"
DemonhideSash string = "zlb"
DestroyerHelm string = "bad"
Diadem string = "ci3"
DiamondMail string = "ung"
DreamSpirit string = "drf"
DuskShroud string = "uui"
EarthSpirit string = "drd"
EmbossedPlate string = "xth"
FalconMask string = "dr4"
FangedHelm string = "ba2"
FieldPlate string = "fld"
FullHelm string = "fhl"
PlateMail string = "plt"
FullPlateMail string = "ful"
FuryVisor string = "bac"
Gauntlets string = "hgl"
GhostArmor string = "xui"
GiantConch string = "uhl"
Girdle string = "hbl"
Gloves string = "lgl"
GothicPlate string = "gth"
GrandCrown string = "xrn"
GreatHauberk string = "urs"
GreatHelm string = "ghm"
GriffonHeadress string = "dr7"
GrimHelm string = "xh9"
GuardianCrown string = "baf"
HardLeatherArmor string = "hla"
HawkHelm string = "dr2"
HeavyBelt string = "tbl"
HeavyBoots string = "vbt"
HeavyBracers string = "xmg"
HeavyGloves string = "vgl"
HellforgedPlate string = "ult"
Helm string = "hlm"
HornedHelm string = "ba3"
HuntersGuise string = "dr8"
Hydraskull string = "ukp"
Hyperion string = "urg"
JawboneCap string = "ba1"
JawboneVisor string = "ba6"
KrakenShell string = "uld"
LacqueredPlate string = "uth"
LeatherArmor string = "lea"
LeatherBoots string = "lbt"
LightBelt string = "vbl"
LightGauntlets string = "tgl"
LightPlate string = "ltp"
LightPlatedBoots string = "tbt"
LinkedMail string = "xng"
LionHelm string = "ba7"
LoricatedMail string = "ucl"
MagePlate string = "xtp"
Mask string = "msk"
MeshArmor string = "xhn"
MeshBelt string = "zmb"
MeshBoots string = "xmb"
MirroredBoots string = "utb"
MithrilCoil string = "umc"
MyrmidonGreaves string = "uhb"
OgreGauntlets string = "uhg"
OrnatePlate string = "xar"
PlateBoots string = "hbt"
QuiltedArmor string = "qui"
RageMask string = "ba8"
RingMail string = "rng"
RussetArmor string = "xpl"
SacredArmor string = "uar"
SacredFeathers string = "dr9"
Sallet string = "xkp"
Sash string = "lbl"
SavageHelmet string = "ba9"
ScaleMail string = "scl"
ScarabHusk string = "ula"
ScarabshellBoots string = "uvb"
SerpentskinArmor string = "xea"
ShadowPlate string = "uul"
Shako string = "uap"
SharkskinBelt string = "zvb"
SharkskinBoots string = "xvb"
SharkskinGloves string = "xvg"
SharktoothArmor string = "xld"
SkullCap string = "skp"
SkySpirit string = "dre"
SlayerGuard string = "baa"
SpiderwebSash string = "ulc"
SpiredHelm string = "uhm"
SpiritMask string = "dr5"
SplintMail string = "spl"
StuddedLeather string = "stu"
SunSpirit string = "drc"
TemplarCoat string = "xlt"
Tiara string = "ci2"
TigulatedMail string = "xcl"
TotemicMask string = "dra"
TrellisedArmor string = "xtu"
TrollBelt string = "utc"
Vambraces string = "umg"
VampireboneGloves string = "uvg"
VampirefangBelt string = "uvc"
WarBelt string = "zhb"
WarBoots string = "xhb"
WarGauntlets string = "xhg"
WarHat string = "xap"
WingedHelm string = "xhm"
WireFleece string = "utu"
WolfHead string = "dr1"
Wyrmhide string = "uea"
WyrmhideBoots string = "ulb"
// Misc
Amethyst string = "gsv"
AmnRune string = "r11"
Amulet string = "amu"
AntidotePotion string = "yps"
Arrows string = "aqv"
BaalsEye string = "bey"
BarkScroll string = "bks"
BerRune string = "r30"
Bolts string = "cqv"
BookofSkill string = "ass"
BurningEssenceofTerror string = "bet"
ChamRune string = "r32"
ChargedEssenceofHatred string = "ceh"
GrandCharm string = "cm3"
LargeCharm string = "cm2"
SmallCharm string = "cm1"
ChippedAmethyst string = "gcv"
ChippedDiamond string = "gcw"
ChippedEmerald string = "gcg"
ChippedRuby string = "gcr"
ChippedSapphire string = "gcb"
ChippedSkull string = "skc"
ChippedTopaz string = "gcy"
DecipheredBarkScroll string = "bkd"
DiablosHorn string = "dhn"
Diamond string = "gsw"
DolRune string = "r14"
ElRune string = "r01"
EldRune string = "r02"
Elixir string = "elx"
Emerald string = "gsg"
EthRune string = "r05"
FalRune string = "r19"
FesteringEssenceofDestruction string = "fed"
FlawedAmethyst string = "gfv"
FlawedDiamond string = "gfw"
FlawedEmerald string = "gfg"
FlawedRuby string = "gfr"
FlawedSapphire string = "gfb"
FlawedSkull string = "skf"
FlawedTopaz string = "gfy"
FlawlessAmethyst string = "gzv"
FlawlessDiamond string = "glw"
FlawlessEmerald string = "glg"
FlawlessRuby string = "glr"
FlawlessSapphire string = "glb"
FlawlessSkull string = "skl"
FlawlessTopaz string = "gly"
FullHealingPotion string = "hpf"
FullManaPotion string = "mpf"
FullRejuvenationPotion string = "rvl"
Gold string = "gld"
GoldBird string = "g34"
GreaterHealingPotion string = "hp5"
GreaterManaPotion string = "mp5"
GulRune string = "r25"
HealingPotion string = "hp3"
HealingPotionMid string = "hpo"
HelRune string = "r15"
Herb string = "hrb"
HoradricCube string = "box"
IdentifyBook string = "ibk"
IdentifyScroll string = "isc"
IoRune string = "r16"
IstRune string = "r24"
IthRune string = "r06"
JadeFigurine string = "j34"
JahRune string = "r31"
Jewel string = "jew"
KeyofDestruction string = "pk3"
KeyofHate string = "pk2"
KeyofTerror string = "pk1"
KhalimsBrain string = "qbr"
KhalimsEye string = "qey"
KhalimsHeart string = "qhr"
KoRune string = "r18"
LamEsensTome string = "bbb"
LargeBluePotion string = "bpl"
LargeRedPotion string = "rpl"
LemRune string = "r20"
LesserHealingPotion string = "hp1"
LesserManaPotion string = "mp1"
LightHealingPotion string = "hp2"
LightManaPotion string = "mp2"
LoRune string = "r28"
LumRune string = "r17"
Maguffin string = "ice"
MalRune string = "r23"
ManaPotion string = "mp3"
ManaPotionMid string = "mpo"
MephistosBrain string = "mbr"
MephistoKey string = "luv"
MephistoSoulStone string = "mss"
NefRune string = "r04"
OhmRune string = "r27"
OrtRune string = "r09"
PerfectAmethyst string = "gpv"
PerfectDiamond string = "gpw"
PerfectEmerald string = "gpg"
PerfectRuby string = "gpr"
PerfectSapphire string = "gpb"
PerfectSkull string = "skz"
PerfectTopaz string = "gpy"
PlayerEar string = "ear"
PulRune string = "r21"
RalRune string = "r08"
RejuvenationPotion string = "rvs"
Ring string = "rin"
Ruby string = "gsr"
Sapphire string = "gsb"
Scroll string = "0sc"
ScrollofHoradric string = "tr1"
ScrollofMalah string = "tr2"
PotionofLife string = "xyz"
ShaelRune string = "r13"
SkeletonKey string = "key"
Skull string = "sku"
SmallBluePotion string = "bps"
SmallRedPotion string = "rps"
SolRune string = "r12"
StaminaPotion string = "vps"
StandardofHeroes string = "std"
StrongHealingPotion string = "hp4"
StrongManaPotion string = "mp4"
SurRune string = "r29"
TalRune string = "r07"
ThawingPotion string = "wms"
ThulRune string = "r10"
TirRune string = "r03"
TokenofAbsolution string = "toa"
Topaz string = "gsy"
Torch string = "tch"
TownPortalBook string = "tbk"
TownPortalScroll string = "tsc"
TwistedEssenceofSuffering string = "tes"
UmRune string = "r22"
VexRune string = "r26"
ViperAmulet string = "vip"
ZodRune string = "r33"
// Shields
Aegis string = "uow"
AerinShield string = "pa4"
AkaranRondache string = "pa7"
AkaranTarge string = "pa6"
KurastShield string = "pad"
AncientShield string = "xts"
BarbedShield string = "xpk"
BladeBarrier string = "upk"
BloodlordSkull string = "nef"
BoneShield string = "bsh"
Buckler string = "buc"
CantorTrophy string = "ne9"
CrownShield string = "pa5"
Defender string = "xuc"
DemonHead string = "ne5"
DragonShield string = "xit"
FetishTrophy string = "ne7"
GargoyleHead string = "ne4"
GothicShield string = "gts"
GrimShield string = "xsh"
GildedShield string = "pa9"
HeirophantTrophy string = "nea"
Heater string = "uuc"
HellspawnSkull string = "neg"
HeraldicShield string = "pa3"
KiteShield string = "kit"
LargeShield string = "lrg"
Luna string = "uml"
MinionSkull string = "neb"
Monarch string = "uit"
MummifiedTrophy string = "ne6"
OverseerSkull string = "ned"
Pavise string = "xow"
PreservedHead string = "ne1"
ProtectorShield string = "pa8"
Rondache string = "pa2"
RoundShield string = "xml"
RoyalShield string = "paa"
SacredRondache string = "pac"
SacredTarge string = "pab"
Scutum string = "xrg"
SextonTrophy string = "ne8"
SmallShield string = "sml"
SpikedShield string = "spk"
SuccubusSkull string = "nee"
Targe string = "pa1"
TowerShield string = "tow"
TrollNest string = "ush"
UnravellerHead string = "ne3"
VortexShield string = "paf"
Ward string = "uts"
ZakarumShield string = "pae"
ZombieHead string = "ne2"
// Weapons
AncientAxe string = "9gi"
AncientSword string = "9wd"
Arbalest string = "8lx"
ArchonStaff string = "6ws"
AshwoodBow string = "am6"
Ataghan string = "7sm"
Axe string = "axe"
BalancedAxe string = "bal"
BalancedKnife string = "bkf"
Balista string = "8hx"
BalrogBlade string = "7gs"
BalrogSpear string = "7s7"
BarbedClub string = "9sp"
Bardiche string = "bar"
BastardSword string = "bsw"
BattleAxe string = "btx"
BattleCestus string = "7cs"
BattleDart string = "9tk"
BattleHammer string = "9wh"
BattleScythe string = "9s8"
BattleStaff string = "bst"
BattleSword string = "9bs"
BeardedAxe string = "9ba"
BecDeCorbin string = "9h9"
BerserkerAxe string = "7wa"
Bill string = "9vo"
Blade string = "bld"
BladeBow string = "6hb"
BladeTalons string = "btl"
BoneKnife string = "7dg"
BoneWand string = "bwn"
Brandistock string = "brn"
BroadAxe string = "bax"
BroadSword string = "bsd"
BurntWand string = "9wn"
Caduceus string = "7ws"
CedarBow string = "8lb"
CedarStaff string = "8cs"
CeremonialBow string = "am7"
CeremonialJavelin string = "ama"
CeremonialPike string = "am9"
CeremonialSpear string = "am8"
Cestus string = "ces"
ChampionAxe string = "7ga"
ChampionSword string = "7b7"
ChokingGasPotion string = "gpm"
ChuKoNu string = "8rx"
Cinquedeas string = "9kr"
ClaspedOrb string = "ob4"
Claws string = "clw"
Claymore string = "clm"
Cleaver string = "9ax"
CloudySphere string = "ob8"
Club string = "clb"
ColossalSword string = "7fb"
ColossalBlade string = "7gd"
ColossusCrossbow string = "6hx"
ColossusVoulge string = "7vo"
CompositeBow string = "cbw"
ConquestSword string = "7bs"
Crossbow string = "mxb"
Crowbill string = "9mp"
CrusaderBow string = "6l7"
CrypticAxe string = "7pa"
CrypticSword string = "7ls"
CrystalSword string = "crs"
CrystallineGlobe string = "ob7"
Cudgel string = "9cl"
Cutlass string = "9sm"
DacianFalx string = "9cm"
Dagger string = "dgr"
Decapitator string = "7bt"
DecoyDagger string = "d33"
DemonCrossbow string = "6rx"
DemonHeart string = "obd"
DevilStar string = "7mt"
DiamondBow string = "6s7"
DimensionalBlade string = "9cr"
DimensionalShard string = "obf"
Dirk string = "dir"
DivineScepter string = "9ws"
DoubleAxe string = "2ax"
DoubleBow string = "8cb"
DragonStone string = "ob5"
EableOrb string = "ob1"
EdgeBow string = "8sb"
ElderStaff string = "6cs"
EldritchOrb string = "obc"
ElegantBlade string = "7sb"
Espadon string = "92h"
EttinAxe string = "72a"
ExecutionerSword string = "9gd"
ExplodingPotion string = "opm"
Falcata string = "7ss"
Falchion string = "flc"
FangedKnife string = "7kr"
Fascia string = "9xf"
FeralAxe string = "7la"
FeralClaws string = "7lw"
Flail string = "fla"
Flamberge string = "flb"
FlangedMace string = "9ma"
FlyingAxe string = "7ta"
FlyingKnife string = "7tk"
Francisca string = "9ta"
FulmatingPotion string = "opl"
Fuscina string = "9tr"
GhostGlaive string = "7gl"
GhostSpear string = "7st"
GhostWand string = "7yw"
GiantAxe string = "gix"
GiantSword string = "gis"
GiantThresher string = "7wc"
Gidbinn string = "g33"
Gladius string = "9ss"
Glaive string = "glv"
GloriousAxe string = "7gi"
GlowingOrb string = "ob6"
GnarledStaff string = "cst"
GorgonCrossbow string = "6mx"
GothicAxe string = "9ga"
GothicBow string = "8lw"
GothicStaff string = "8bs"
GothicSword string = "9b9"
GrandMatronBow string = "amc"
GrandScepter string = "gsc"
GraveWand string = "9gw"
GreatAxe string = "gax"
GreatBow string = "6cb"
GreatMaul string = "gma"
GreatPilum string = "9pi"
GreatPoleaxe string = "7h7"
GreatSword string = "gsd"
GreaterClaws string = "9lw"
GreaterTalons string = "9tw"
GrimScythe string = "9wc"
GrimWand string = "gwn"
Halberd string = "hal"
HandAxe string = "hax"
HandScythe string = "9cs"
Harpoon string = "9ts"
Hatchet string = "9ha"
HatchetHands string = "axf"
HeavenlyStone string = "obb"
HeavyCrossbow string = "hxb"
HellforgeHammer string = "hfh"
HighlandBlade string = "7cm"
HolyWaterSprinkler string = "9qs"
HoradricMalus string = "hdm"
HoradricStaff string = "hst"
HuntersBow string = "hbw"
Hurlbat string = "9b8"
HydraBow string = "6lw"
HydraEdge string = "7fc"
HyperionJavelin string = "7ja"
HyperionSpear string = "7sr"
JaggedStar string = "9mt"
Javelin string = "jav"
JoStaff string = "8ss"
Katar string = "ktr"
KhalimFlail string = "qf1"
Knout string = "9fl"
Kriss string = "kri"
Lance string = "9p9"
LargeAxe string = "lax"
LegendSpike string = "7bl"
LegendSword string = "72h"
LegendaryMallet string = "7wh"
LichWand string = "7bw"
LightCrossbow string = "lxb"
LochaberAxe string = "9b7"
LongBattleBow string = "lbb"
LongBow string = "lbw"
LongSiegeBow string = "8l8"
LongStaff string = "lst"
LongSword string = "lsd"
LongWarBow string = "lwb"
Mace string = "mac"
MaidenJavelin string = "am5"
MaidenPike string = "am4"
MaidenSpear string = "am3"
Mancatcher string = "7br"
MarteldeFer string = "9gm"
MatriarchalBow string = "amb"
MatriarchalPike string = "ame"
MatriarchalSpear string = "amd"
MatriarchalJavelin string = "amf"
Maul string = "mau"
MightyScepter string = "7sc"
MilitaryAxe string = "9la"
MilitaryPick string = "mpi"
MithralPoint string = "7di"
MorningStar string = "mst"
MythicalSword string = "7wd"
Naga string = "9wa"
OgreAxe string = "7o7"
OgreMaul string = "7m7"
OilPotion string = "ops"
Partizan string = "9pa"
PelletBow string = "6lx"
PetrifiedWand string = "9yw"
PhaseBlade string = "7cr"
Pike string = "pik"
Pilum string = "pil"
Poignard string = "9dg"
Poleaxe string = "pax"
PolishedWand string = "7wn"
QuarterStaff string = "8ls"
Quhab string = "9ar"
RancidGasPotion string = "gps"
RazorBow string = "8hb"
ReflexBow string = "am2"
ReinforcedMace string = "7ma"
RepeatingCrossbow string = "rxb"
Rondel string = "9di"
RuneBow string = "8sw"
RuneScepter string = "9sc"
RuneStaff string = "8ws"
RuneSword string = "9ls"
RunicTalons string = "7tw"
Sabre string = "sbr"
SacredGlobe string = "ob2"
Scepter string = "scp"
Scimitar string = "scm"
ScissorsKatar string = "skr"
ScissorsQuhab string = "9qr"
ScissorsSuwayyah string = "7qr"
Scourge string = "7fl"
Scythe string = "scy"
SeraphRod string = "7qs"
ShadowBow string = "6lb"
Shamshir string = "9sb"
Shillelah string = "6bs"
ShortBattleBow string = "sbb"
ShortBow string = "sbw"
ShortSiegeBow string = "8s8"
ShortSpear string = "ssp"
ShortStaff string = "sst"
ShortSword string = "ssd"
ShortWarBow string = "swb"
SiegeCrossbow string = "8mx"
SilverEdgedAxe string = "7ba"
Simbilan string = "9s9"
SmallCrescent string = "7ax"
SmokedSphere string = "ob3"
SparklingBall string = "ob9"
Spear string = "spr"
Spetum string = "spt"
Spiculum string = "9gl"
SpiderBow string = "6sb"
SpikedClub string = "spc"
StaffOfTheKings string = "msf"
StagBow string = "am1"
Stalagmite string = "6ls"
Stilleto string = "9bl"
StranglingGasPotion string = "gpl"
StygianPike string = "7tr"
StygianPilum string = "7pi"
SuperKhalimFlail string = "qf2"
Suwayyah string = "7ar"
SwirlingCrystal string = "oba"
Tabar string = "9bt"
Thresher string = "7s8"
ThrowingAxe string = "tax"
ThrowingKnife string = "tkf"
ThrowingSpear string = "tsp"
ThunderMaul string = "7gm"
Tomahawk string = "7ha"
TombWand string = "9bw"
Trident string = "tri"
Truncheon string = "7cl"
Tulwar string = "9fc"
TuskSword string = "9gs"
TwinAxe string = "92a"
TwoHandedSword string = "2hs"
TyrantClub string = "7sp"
UnearthedWand string = "7gw"
VortexOrb string = "obe"
Voulge string = "vou"
WalkingStick string = "6ss"
Wand string = "wnd"
WarAxe string = "wax"
WarClub string = "9m9"
WarDart string = "9bk"
WarFist string = "7xf"
WarFork string = "9br"
WarHammer string = "whm"
WarJavelin string = "9ja"
WarPike string = "7p7"
WarScepter string = "wsp"
WarScythe string = "wsc"
WarSpear string = "9sr"
WarSpike string = "7mp"
WarStaff string = "wst"
WarSword string = "wsd"
WardBow string = "6sw"
WingedAxe string = "7b8"
WingedHarpoon string = "7ts"
WingedKnife string = "7bk"
WirtsLeg string = "leg"
WristBlade string = "wrb"
WristSpike string = "9wb"
WristSword string = "7wb"
Yari string = "9st"
YewWand string = "ywn"
Zweihander string = "9fb"
)
// Attributes that only exists on a player ear.
type earAttributes struct {
Class uint64 `json:"class"`
Level uint64 `json:"level"`
Name string `json:"name"`
}
// MagicAttribute describes one of potentially many attributes on an item.
//
// The values array is replaced into the name string using the value's own array
// index wrapped in curly braces, e.g., `{i}`. Some values will need to be
// denormalized before replacing, such as class names, and various calculations.
//
// Note the values array is of the type int64, this is because some properties
// contain negative values, such as - % requirements.
type MagicAttribute struct {
ID uint64 `json:"id"`
Name string `json:"name"`
Values []int64 `json:"values"`
}
// MagicalProperty describes a string template, bias, and bit length for a
// particular kind of magical property, such as bonuses to all resistences or
// magic item finding.
type MagicalProperty struct {
Bits []uint
Bias uint64
Name string
}
// WeaponDamage contains integer ranges for any weapon's one-handed, two-handed
// (and maybe soon throwing as well?) damage.
type WeaponDamage struct {
Min int `json:"min,omitempty"`
Max int `json:"max,omitempty"`
TwoMin int `json:"twohand_min,omitempty"`
TwoMax int `json:"twohand_max,omitempty"`
}
var weaponDamageMap = map[string]WeaponDamage{
// Axes
HandAxe: {Min: 3, Max: 6},
Axe: {Min: 4, Max: 11},
DoubleAxe: {Min: 5, Max: 13},
MilitaryPick: {Min: 7, Max: 11},
WarAxe: {Min: 10, Max: 18},
LargeAxe: {Min: 6, Max: 13},
BroadAxe: {Min: 10, Max: 18},
Hatchet: {Min: 10, Max: 21},
Cleaver: {Min: 10, Max: 33},
TwinAxe: {Min: 13, Max: 38},
Crowbill: {Min: 14, Max: 34},
Naga: {Min: 16, Max: 45},
MilitaryAxe: {Min: 14, Max: 34},
Tomahawk: {Min: 33, Max: 58},
SmallCrescent: {Min: 38, Max: 60},
EttinAxe: {Min: 33, Max: 66},
WarSpike: {Min: 30, Max: 48},
BerserkerAxe: {Min: 24, Max: 71},
// Two-Handed Axes
BattleAxe: {TwoMin: 12, TwoMax: 32},
GreatAxe: {TwoMin: 9, TwoMax: 30},
GiantAxe: {TwoMin: 22, TwoMax: 45},
BeardedAxe: {TwoMin: 21, TwoMax: 49},
Tabar: {TwoMin: 24, TwoMax: 77},
GothicAxe: {TwoMin: 18, TwoMax: 70},
AncientAxe: {TwoMin: 43, TwoMax: 85},
FeralAxe: {TwoMin: 25, TwoMax: 123},
SilverEdgedAxe: {TwoMin: 62, TwoMax: 110},
Decapitator: {TwoMin: 49, TwoMax: 137},
ChampionAxe: {TwoMin: 59, TwoMax: 94},
GloriousAxe: {TwoMin: 60, TwoMax: 124},
// Maces
Club: {Min: 1, Max: 6},
SpikedClub: {Min: 5, Max: 8},
Mace: {Min: 3, Max: 10},
MorningStar: {Min: 7, Max: 16},
Flail: {Min: 1, Max: 24},
WarHammer: {Min: 19, Max: 29},
Cudgel: {Min: 6, Max: 21},
BarbedClub: {Min: 13, Max: 25},
FlangedMace: {Min: 15, Max: 23},
JaggedStar: {Min: 20, Max: 31},
Knout: {Min: 13, Max: 35},
BattleHammer: {Min: 35, Max: 58},
Truncheon: {Min: 35, Max: 43},
TyrantClub: {Min: 32, Max: 58},
ReinforcedMace: {Min: 41, Max: 49},
DevilStar: {Min: 42, Max: 53},
Scourge: {Min: 3, Max: 80},
LegendaryMallet: {Min: 50, Max: 61},
// Two-Handed Maces
Maul: {TwoMin: 30, TwoMax: 43},
GreatMaul: {TwoMin: 38, TwoMax: 58},
WarClub: {TwoMin: 53, TwoMax: 78},
MarteldeFer: {TwoMin: 61, TwoMax: 99},
OgreMaul: {TwoMin: 77, TwoMax: 106},
ThunderMaul: {TwoMin: 33, TwoMax: 180},
// Polearms
Bardiche: {TwoMin: 1, TwoMax: 27},
Voulge: {TwoMin: 6, TwoMax: 21},
Scythe: {TwoMin: 8, TwoMax: 20},
Poleaxe: {TwoMin: 18, TwoMax: 39},
Halberd: {TwoMin: 21, TwoMax: 45},
WarScythe: {TwoMin: 15, TwoMax: 36},
LochaberAxe: {TwoMin: 6, TwoMax: 58},
Bill: {TwoMin: 14, TwoMax: 53},
BattleScythe: {TwoMin: 18, TwoMax: 45},
Partizan: {TwoMin: 34, TwoMax: 75},
BecDeCorbin: {TwoMin: 13, TwoMax: 85},
GrimScythe: {TwoMin: 30, TwoMax: 70},
OgreAxe: {TwoMin: 28, TwoMax: 145},
ColossusVoulge: {TwoMin: 17, TwoMax: 165},
Thresher: {TwoMin: 12, TwoMax: 141},
CrypticAxe: {TwoMin: 33, TwoMax: 150},
GreatPoleaxe: {TwoMin: 46, TwoMax: 127},
GiantThresher: {TwoMin: 40, TwoMax: 127},
// Swords
ShortSword: {Min: 2, Max: 7},
Scimitar: {Min: 2, Max: 6},
Sabre: {Min: 3, Max: 8},
Falchion: {Min: 9, Max: 17},
CrystalSword: {Min: 5, Max: 15},
BroadSword: {Min: 7, Max: 14},
LongSword: {Min: 3, Max: 19},
WarSword: {Min: 8, Max: 20},
Gladius: {Min: 8, Max: 22},
Cutlass: {Min: 8, Max: 21},
Shamshir: {Min: 10, Max: 24},
Tulwar: {Min: 16, Max: 35},
DimensionalBlade: {Min: 13, Max: 35},
BattleSword: {Min: 16, Max: 34},
RuneSword: {Min: 10, Max: 42},
AncientSword: {Min: 18, Max: 43},
Falcata: {Min: 31, Max: 59},
Ataghan: {Min: 26, Max: 46},
ElegantBlade: {Min: 33, Max: 45},
HydraEdge: {Min: 28, Max: 68},
PhaseBlade: {Min: 31, Max: 35},
ConquestSword: {Min: 37, Max: 53},
CrypticSword: {Min: 5, Max: 77},
MythicalSword: {Min: 40, Max: 50},
// Two-handed swords
TwoHandedSword: {Min: 2, Max: 9, TwoMin: 5, TwoMax: 17},
Claymore: {Min: 5, Max: 12, TwoMin: 13, TwoMax: 30},
GiantSword: {Min: 3, Max: 16, TwoMin: 9, TwoMax: 28},
BastardSword: {Min: 7, Max: 19, TwoMin: 20, TwoMax: 28},
Flamberge: {Min: 9, Max: 15, TwoMin: 13, TwoMax: 26},
GreatSword: {Min: 12, Max: 20, TwoMin: 25, TwoMax: 42},
Espadon: {Min: 8, Max: 26, TwoMin: 18, TwoMax: 40},
DacianFalx: {Min: 13, Max: 30, TwoMin: 26, TwoMax: 61},
TuskSword: {Min: 10, Max: 37, TwoMin: 19, TwoMax: 58},
GothicSword: {Min: 14, Max: 40, TwoMin: 39, TwoMax: 60},
Zweihander: {Min: 19, Max: 35, TwoMin: 29, TwoMax: 54},
ExecutionerSword: {Min: 24, Max: 40, TwoMin: 47, TwoMax: 80},
HighlandBlade: {Min: 22, Max: 62, TwoMin: 67, TwoMax: 96},
BalrogBlade: {Min: 15, Max: 75, TwoMin: 55, TwoMax: 118},
ChampionSword: {Min: 24, Max: 54, TwoMin: 71, TwoMax: 83},
ColossalSword: {Min: 26, Max: 70, TwoMin: 61, TwoMax: 121},
ColossalBlade: {Min: 25, Max: 65, TwoMin: 58, TwoMax: 115},
// Bows
ShortBow: {TwoMin: 1, TwoMax: 4},
HuntersBow: {TwoMin: 2, TwoMax: 6},
LongBow: {TwoMin: 3, TwoMax: 10},
CompositeBow: {TwoMin: 4, TwoMax: 8},
ShortBattleBow: {TwoMin: 3, TwoMax: 18},
ShortWarBow: {TwoMin: 6, TwoMax: 14},
LongWarBow: {TwoMin: 3, TwoMax: 23},
EdgeBow: {TwoMin: 6, TwoMax: 19},
RazorBow: {TwoMin: 8, TwoMax: 22},
CedarBow: {TwoMin: 10, TwoMax: 29},
DoubleBow: {TwoMin: 11, TwoMax: 26},
ShortSiegeBow: {TwoMin: 13, TwoMax: 30},
LongSiegeBow: {TwoMin: 10, TwoMax: 42},
RuneBow: {TwoMin: 14, TwoMax: 35},
GothicBow: {TwoMin: 10, TwoMax: 50},
SpiderBow: {TwoMin: 23, TwoMax: 50},
BladeBow: {TwoMin: 21, TwoMax: 41},
ShadowBow: {TwoMin: 15, TwoMax: 59},
GreatBow: {TwoMin: 12, TwoMax: 52},
DiamondBow: {TwoMin: 33, TwoMax: 40},
CrusaderBow: {TwoMin: 15, TwoMax: 63},
WardBow: {TwoMin: 20, TwoMax: 53},
HydraBow: {TwoMin: 10, TwoMax: 68},
// Crossbows
LightCrossbow: {TwoMin: 6, TwoMax: 9},
Crossbow: {TwoMin: 9, TwoMax: 16},
HeavyCrossbow: {TwoMin: 14, TwoMax: 26},
RepeatingCrossbow: {TwoMin: 6, TwoMax: 12},
Arbalest: {TwoMin: 14, TwoMax: 27},
SiegeCrossbow: {TwoMin: 20, TwoMax: 42},
Balista: {TwoMin: 33, TwoMax: 55},
ChuKoNu: {TwoMin: 14, TwoMax: 32},
PelletBow: {TwoMin: 28, TwoMax: 73},
GorgonCrossbow: {TwoMin: 25, TwoMax: 87},
ColossusCrossbow: {TwoMin: 32, TwoMax: 91},
DemonCrossbow: {TwoMin: 26, TwoMax: 40},
// Javelins (throw damage, should update fields)
Javelin: {Min: 6, Max: 14},
Pilum: {Min: 7, Max: 20},
ShortSpear: {Min: 10, Max: 22},
Glaive: {Min: 16, Max: 22},
ThrowingSpear: {Min: 12, Max: 30},
WarJavelin: {Min: 14, Max: 32},
GreatPilum: {Min: 16, Max: 42},
Simbilan: {Min: 27, Max: 50},
Spiculum: {Min: 32, Max: 60},
Harpoon: {Min: 18, Max: 54},
HyperionJavelin: {Min: 28, Max: 55},
StygianPilum: {Min: 21, Max: 75},
BalrogSpear: {Min: 40, Max: 62},
GhostGlaive: {Min: 30, Max: 85},
WingedHarpoon: {Min: 11, Max: 77},
// Amazon-only Weapons (throw damage, should update fields)
StagBow: {Min: 7, Max: 12},
ReflexBow: {Min: 9, Max: 19},
MaidenSpear: {Min: 18, Max: 24},
MaidenPike: {Min: 23, Max: 55},
MaidenJavelin: {Min: 6, Max: 22},
AshwoodBow: {Min: 16, Max: 29},
CeremonialBow: {Min: 19, Max: 41},
CeremonialSpear: {Min: 34, Max: 51},
CeremonialPike: {Min: 42, Max: 101},
CeremonialJavelin: {Min: 18, Max: 54},
MatriarchalBow: {Min: 20, Max: 47},
GrandMatronBow: {Min: 14, Max: 72},
MatriarchalSpear: {Min: 65, Max: 95},
MatriarchalPike: {Min: 37, Max: 153},
MatriarchalJavelin: {Min: 35, Max: 66},
// Scepters
Scepter: {Min: 6, Max: 11},
GrandScepter: {Min: 8, Max: 18},
WarScepter: {Min: 10, Max: 17},
RuneScepter: {Min: 13, Max: 24},
HolyWaterSprinkler: {Min: 14, Max: 36},
DivineScepter: {Min: 16, Max: 38},
MightyScepter: {Min: 40, Max: 52},
SeraphRod: {Min: 45, Max: 54},
Caduceus: {Min: 37, Max: 43},
// Spears
Spear: {TwoMin: 3, TwoMax: 15},
Trident: {TwoMin: 9, TwoMax: 15},
Brandistock: {TwoMin: 7, TwoMax: 17},
Spetum: {TwoMin: 15, TwoMax: 23},
Pike: {TwoMin: 14, TwoMax: 63},
WarSpear: {TwoMin: 10, TwoMax: 37},
Fuscina: {TwoMin: 19, TwoMax: 37},
WarFork: {TwoMin: 16, TwoMax: 40},
Yari: {TwoMin: 29, TwoMax: 59},
Lance: {TwoMin: 27, TwoMax: 114},
HyperionSpear: {TwoMin: 35, TwoMax: 119},
StygianPike: {TwoMin: 29, TwoMax: 144},
Mancatcher: {TwoMin: 42, TwoMax: 92},