Skip to content

Commit ec10abd

Browse files
authored
Merge pull request wowsims#105 from wowsims/feature/db-parsing-on-hit
DB parsing: On Hit + Stacks
2 parents 1b8736a + c9359b3 commit ec10abd

27 files changed

Lines changed: 14997 additions & 2666 deletions

assets/database/db.bin

84.1 KB
Binary file not shown.

assets/database/db.json

Lines changed: 1902 additions & 1901 deletions
Large diffs are not rendered by default.

assets/database/leftover_db.bin

347 Bytes
Binary file not shown.

assets/database/leftover_db.json

Lines changed: 22 additions & 21 deletions
Large diffs are not rendered by default.

proto/db.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ message SimEnchant {
2222
string name = 2; // Only needed for unit tests.
2323
ItemType type = 3; // Only needed for unit tests.
2424
repeated double stats = 4;
25-
ItemEffect enchant_effect = 5;
25+
repeated ItemEffect enchant_effect = 5;
2626
}
2727

2828
// Contains only the Item info needed by the sim.
@@ -44,7 +44,7 @@ message SimItem {
4444
int32 set_id = 12;
4545

4646
map<int32, ScalingItemProperties> scaling_options = 13; // keys are the all ItemLevelState variants that this item could potentially have
47-
ItemEffect item_effect = 14;
47+
repeated ItemEffect item_effects = 14;
4848
}
4949

5050
message Consumable {

proto/spell.proto

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,36 @@ message ScalingItemEffectProperties {
1010
// keys are the numeric values of proto.common.Stat
1111
map<int32, double> stats = 1;
1212
}
13-
message ItemEffect {
14-
int32 buff_id = 1;
13+
14+
message ItemEffect {
15+
int32 buff_id= 1;
1516
string buff_name = 6;
16-
int32 effect_duration_ms = 2; // milliseconds
17+
int32 effect_duration_ms = 2; // milliseconds
18+
int32 max_cumulative_stacks = 7;
1719
// Keyed to itemlevelstate
18-
map<int32, ScalingItemEffectProperties> scaling_options = 3;
20+
map<int32, ScalingItemEffectProperties> scaling_options = 3;
1921

2022
oneof effect {
21-
ProcEffect proc = 4;
22-
OnUseEffect on_use = 5;
23+
ProcEffect proc = 4;
24+
OnUseEffect on_use = 5;
2325
}
24-
}
26+
}
2527

26-
message ProcEffect {
27-
int32 icd_ms = 1; // internal cooldown in milliseconds
28+
message ProcEffect {
29+
int32 icd_ms = 1; // internal cooldown in milliseconds
2830
oneof procRate {
2931
double proc_chance = 2; // e.g. 0.20 = 20%
3032
double ppm = 3;
3133
}
32-
}
34+
}
3335

34-
message OnUseEffect {
36+
message OnUseEffect {
3537
int32 cooldown_ms = 1; // milliseconds between uses
3638

3739
int32 category_id = 11;
3840

3941
int32 category_cooldown_ms = 8; // category cooldown in milliseconds
40-
}
42+
}
4143

4244
message SpellEffect {
4345
int32 id = 1;

proto/ui.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ message UIItem {
9797

9898
FactionRestriction faction_restriction = 25;
9999
map<int32, ScalingItemProperties> scaling_options = 29; // keys are the other ilvl variants that this item could potentially have
100-
ItemEffect item_effect = 30;
100+
repeated ItemEffect item_effects = 30;
101101
}
102102

103103
enum Expansion {
@@ -233,7 +233,7 @@ message UIEnchant {
233233
// Classes that are allowed to use the enchant. Empty indicates no special class restrictions.
234234
repeated Class class_allowlist = 11;
235235
Profession required_profession = 12;
236-
ItemEffect enchant_effect = 14;
236+
repeated ItemEffect enchant_effects = 14;
237237
}
238238

239239
message UIGem {

0 commit comments

Comments
 (0)