Skip to content

Commit

Permalink
Merge branch 'wowsims:master' into feature/implement-fe-code-linting
Browse files Browse the repository at this point in the history
  • Loading branch information
1337LutZ authored Feb 18, 2024
2 parents a060b5d + 2a47747 commit 1ed2cc4
Show file tree
Hide file tree
Showing 738 changed files with 37,115 additions and 55,630 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,7 @@ This project uses [Google Protocol Buffers](https://developers.google.com/protoc

For a new sim, make the following changes:
- Add a new value to the `Spec` enum in proto/common.proto. __NOTE: The name you give to this enum value is not just a name, it is used in our templating system. This guide will refer to this name as `$SPEC` elsewhere.__
- Add a 'proto/YOUR_CLASS.proto' file if it doesn't already exist and add data messages containing all the class/spec-specific information needed to run your sim. In general, there will be 3 pieces of information you need:
- Talents
- Rotation (the order in which your sim will use spells/abilities)
- Options (additional choices your sim needs to make)
- Add a 'proto/YOUR_CLASS.proto' file if it doesn't already exist and add data messages containing all the class/spec-specific information needed to run your sim.
- Update the `PlayerOptions.spec` field in `proto/api.proto` to include your shiny new message as an option.

That's it! Now when you run `make` there will be generated .go and .ts code in `sim/core/proto` and `ui/core/proto` respectively. If you aren't familiar with protos, take a quick look at them to see what's happening.
Expand Down
Binary file modified assets/database/db.bin
Binary file not shown.
1,351 changes: 634 additions & 717 deletions assets/database/db.json

Large diffs are not rendered by default.

Binary file modified assets/database/leftover_db.bin
Binary file not shown.
11 changes: 4 additions & 7 deletions assets/database/leftover_db.json

Large diffs are not rendered by default.

4,514 changes: 2,259 additions & 2,255 deletions assets/db_inputs/wowhead_gearplannerdb.txt

Large diffs are not rendered by default.

8,877 changes: 4,441 additions & 4,436 deletions assets/db_inputs/wowhead_item_tooltips.csv

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions proto/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ message Player {
Consumes consumes = 4;
UnitStats bonus_stats = 36;

bool enable_item_swap = 46;
ItemSwap item_swap = 45;

IndividualBuffs buffs = 15;

oneof spec {
Expand Down Expand Up @@ -62,6 +65,9 @@ message Player {

APLRotation rotation = 40;

// TODO: Move most of the remaining fields into a 'MiscellaneousPlayerOptions' message.
// This will remove a lot of the boilerplate code in the UI for each new field.

int32 reaction_time_ms = 41;
int32 channel_clip_delay_ms = 42;
bool in_front_of_target = 23;
Expand All @@ -71,6 +77,10 @@ message Player {

// Items/enchants/gems/etc to include in the database.
SimDatabase database = 35;

double nibelung_average_casts = 43;
// hack to set a proper default value
bool nibelung_average_casts_set = 44;
}

message Party {
Expand Down Expand Up @@ -311,6 +321,8 @@ message SpellStats {
bool has_dot = 4; // Whether this spell applies a DoT effect.
bool has_shield = 6; // Whether this spell applies a shield effect.
bool prepull_only = 5; // Whether this spell may only be cast during prepull.
bool encounter_only = 8; // Whether this spell may only be cast during the encounter (not prepull).
bool has_cast_time = 9; // Whether this spell has a cast time or not.
}
message APLActionStats {
repeated string warnings = 1;
Expand Down Expand Up @@ -419,6 +431,12 @@ message BulkSimRequest {
BulkSettings bulk_settings = 2;
}

message TalentLoadout {
string talents_string = 1;
Glyphs glyphs = 2;
string name = 3;
}

message BulkSettings {
repeated ItemSpec items = 1;
bool combinations = 2;
Expand All @@ -439,6 +457,9 @@ message BulkSettings {
// Number of iterations per combo.
// If set to 0 the sim core decides the optimal iterations.
int32 iterations_per_combo = 11;
// Should sim talents as well
bool sim_talents = 12;
repeated TalentLoadout talents_to_sim = 13;
}

message BulkSimResult {
Expand All @@ -450,6 +471,7 @@ message BulkSimResult {
message BulkComboResult {
repeated ItemSpecWithSlot items_added = 1;
UnitMetrics unit_metrics = 2;
TalentLoadout talent_loadout = 3;
}

message ItemSpecWithSlot {
Expand Down
81 changes: 69 additions & 12 deletions proto/apl.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ option go_package = "./proto";

import "common.proto";
import "shaman.proto";
import "druid.proto";

// Rotation options are based heavily on APL. See https://github.com/simulationcraft/simc/wiki/ActionLists.

message APLRotation {
bool enabled = 20 [deprecated = true]; // If false, use old rotation options.

enum Type {
TypeUnknown = 0;
TypeAuto = 1;
Expand All @@ -35,9 +34,6 @@ message APLPrepullAction {
APLAction action = 1;
APLValue do_at_value = 4; // When to perform this prepull action. Should be a negative value.
bool hide = 3; // Causes this item to be ignored.

// TODO: Remove after 1 month (on or after 8/30/2023).
string do_at = 2 [deprecated = true];
}

message APLListItem {
Expand All @@ -46,7 +42,7 @@ message APLListItem {
APLAction action = 3; // The action to be performed.
}

// NextIndex: 17
// NextIndex: 20
message APLAction {
APLValue condition = 1; // If set, action will only execute if value is true or != 0.

Expand All @@ -73,10 +69,17 @@ message APLAction {
APLActionActivateAura activate_aura = 13;
APLActionCancelAura cancel_aura = 10;
APLActionTriggerICD trigger_icd = 11;
APLActionItemSwap item_swap = 17;

// Class or Spec-specific actions
APLActionCatOptimalRotationAction cat_optimal_rotation_action = 18;

// Internal use only, not exposed in UI.
APLActionCustomRotation custom_rotation = 19;
}
}

// NextIndex: 59
// NextIndex: 66
message APLValue {
oneof value {
// Operators
Expand All @@ -97,6 +100,10 @@ message APLValue {
APLValueIsExecutePhase is_execute_phase = 41;
APLValueNumberTargets number_targets = 28;

// Boss values
APLValueBossSpellTimeToReady boss_spell_time_to_ready = 64;
APLValueBossSpellIsCasting boss_spell_is_casting = 65;

// Resource values
APLValueCurrentHealth current_health = 26;
APLValueCurrentHealthPercent current_health_percent = 27;
Expand Down Expand Up @@ -130,11 +137,11 @@ message APLValue {
APLValueSpellIsReady spell_is_ready = 20;
APLValueSpellTimeToReady spell_time_to_ready = 21;
APLValueSpellCastTime spell_cast_time = 35;
APLValueSpellChannelTime spell_channel_time = 36;
APLValueSpellTravelTime spell_travel_time = 37;
APLValueSpellCPM spell_cpm = 42;
APLValueSpellIsChanneling spell_is_channeling = 56;
APLValueSpellChanneledTicks spell_channeled_ticks = 57;
APLValueSpellCurrentCost spell_current_cost = 62;

// Aura values
APLValueAuraIsActive aura_is_active = 22;
Expand All @@ -156,10 +163,14 @@ message APLValue {

// Properties
APLValueChannelClipDelay channel_clip_delay = 58;
APLValueFrontOfTarget front_of_target = 63;

// Class or Spec-specific values
APLValueTotemRemainingTime totem_remaining_time = 49;
APLValueCatExcessEnergy cat_excess_energy = 52;
APLValueCatNewSavageRoarDuration cat_new_savage_roar_duration = 61;
APLValueWarlockShouldRecastDrainSoul warlock_should_recast_drain_soul = 59;
APLValueWarlockShouldRefreshCorruption warlock_should_refresh_corruption = 60;
}
}

Expand Down Expand Up @@ -240,6 +251,32 @@ message APLActionTriggerICD {
ActionID aura_id = 1;
}

message APLActionItemSwap {
enum SwapSet {
Unknown = 0;
Main = 1;
Swap1 = 2;
}

// The set to swap to.
SwapSet swap_set = 1;
}

message APLActionCatOptimalRotationAction {
FeralDruid.Rotation.AplType rotation_type = 1;
bool manual_params = 2;
float max_ff_delay = 3;
float min_roar_offset = 4;
int32 rip_leeway = 5;
bool use_rake = 6;
bool use_bite = 7;
float bite_time = 8;
bool flower_weave = 9;
}

message APLActionCustomRotation {
}

///////////////////////////////////////////////////////////////////////////
// VALUES
///////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -316,6 +353,16 @@ message APLValueIsExecutePhase {
ExecutePhaseThreshold threshold = 1;
}

message APLValueBossSpellTimeToReady {
UnitReference target_unit = 1;
ActionID spell_id = 2;
}

message APLValueBossSpellIsCasting {
UnitReference target_unit = 1;
ActionID spell_id = 2;
}

message APLValueCurrentHealth {
UnitReference source_unit = 1;
}
Expand Down Expand Up @@ -395,11 +442,11 @@ message APLValueSpellTimeToReady {
message APLValueSpellCastTime {
ActionID spell_id = 1;
}
message APLValueSpellChannelTime {
ActionID spell_id = 1;
}
message APLValueChannelClipDelay {
}
message APLValueFrontOfTarget {
}

message APLValueSpellTravelTime {
ActionID spell_id = 1;
}
Expand All @@ -412,6 +459,9 @@ message APLValueSpellIsChanneling {
message APLValueSpellChanneledTicks {
ActionID spell_id = 1;
}
message APLValueSpellCurrentCost {
ActionID spell_id = 1;
}

message APLValueAuraIsActive {
UnitReference source_unit = 2;
Expand Down Expand Up @@ -466,4 +516,11 @@ message APLValueTotemRemainingTime {
ShamanTotems.TotemType totem_type = 1;
}
message APLValueCatExcessEnergy {
}
}
message APLValueCatNewSavageRoarDuration {
}
message APLValueWarlockShouldRecastDrainSoul {
}
message APLValueWarlockShouldRefreshCorruption {
UnitReference target_unit = 1;
}
10 changes: 1 addition & 9 deletions proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,6 @@ message RaidBuffs {
// +Spell Power
bool totem_of_wrath = 18;
bool flametongue_totem = 19;
int32 demonic_pact_old = 20; // old demo SP
int32 demonic_pact = 43; // SP buff -- deprecated.
int32 demonic_pact_sp = 44; // SP buff NEW CORRECT

// +5% Spell Crit and/or +3% Haste
Expand Down Expand Up @@ -464,6 +462,7 @@ message RaidBuffs {
TristateEffect devotion_aura = 31;
TristateEffect stoneskin_totem = 42;
bool retribution_aura = 32;
bool strength_of_wrynn = 49;

// Drums
bool drums_of_forgotten_kings = 34;
Expand Down Expand Up @@ -657,7 +656,6 @@ message Target {
bool dual_wield = 9;
bool dual_wield_penalty = 10;
bool parry_haste = 12;
bool tight_enemy_damage = 17; // deprecated as of 07/12/23
bool suppress_dodge = 16; // Sunwell Radiance
SpellSchool spell_school = 13; // Allows elemental attacks.

Expand Down Expand Up @@ -784,10 +782,6 @@ message UnitReference {

// Reference to the owner, only used iff this is a pet.
UnitReference owner = 4;

// Raid index of the player to target. A value of -1 indicates no target.
// TODO: Delete this after 2 months (on or after 9/19/2023)
int32 target_index = 1 [deprecated = true];
}

// ID for actions that aren't spells or items.
Expand Down Expand Up @@ -851,8 +845,6 @@ message Cooldowns {

// % HP threshold, below which defensive cooldowns can be used.
double hp_percent_for_defensives = 2;
int32 desync_proc_trinket1_seconds = 3;
int32 desync_proc_trinket2_seconds = 4;
}

message HealingModel {
Expand Down
Loading

0 comments on commit 1ed2cc4

Please sign in to comment.