Skip to content

Commit

Permalink
Merge branch 'main' into more-r4n
Browse files Browse the repository at this point in the history
  • Loading branch information
valarnin authored Jul 22, 2024
2 parents e885140 + bd77b71 commit 7c007d9
Show file tree
Hide file tree
Showing 27 changed files with 805 additions and 20 deletions.
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ will immediately update the overlay,
prompting a refresh within the overlay itself.
This is the recommended approach of validating local code changes.

For convenience, webpack has access to the `/user/webpack/` directory
inside your local git root.
You can use this directory to store assets for your persoonal user confiiguration (if any).
The `/user/` directory is also suppressed for change tracking by `/.gitignore`.

Alternatively, `npm run build` will locally create a production distribution
of cactbot. This shouldn't be necessary for developing
and will be slower than running `npm start` for validating changes,
Expand Down
49 changes: 49 additions & 0 deletions plugin/CactbotEventSource/FFXIVProcessIntl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ public unsafe override JObject GetJobSpecificData(EntityJob job) {
return JObject.FromObject(*(SageJobMemory*)&p[0]);
case EntityJob.RPR:
return JObject.FromObject(*(ReaperJobMemory*)&p[0]);
case EntityJob.VPR:
return JObject.FromObject(*(ViperJobMemory*)&p[0]);
case EntityJob.PCT:
return JObject.FromObject(*(PictomancerJobMemory*)&p[0]);
}
Expand Down Expand Up @@ -548,6 +550,12 @@ public bool paradox {
return enochian_state.HasFlag(EnochianFlags.Paradox);
}
}

public int astralSoulStacks {
get {
return ((int)enochian_state >> 2) & 0x7; // = 0b111, to get the last 3 bits.
}
}
};

[StructLayout(LayoutKind.Explicit)]
Expand Down Expand Up @@ -924,6 +932,47 @@ public struct ReaperJobMemory {
public byte voidShroud;
}

[StructLayout(LayoutKind.Explicit)]
public struct ViperJobMemory {
public enum AdvancedCombo : byte {
Dreadwinder = 1,
HuntersCoil = 2,
SwiftskinsCoil = 3,
PitOfDread = 4,
HuntersDen = 5,
SwiftskinsDen = 6,
Reawaken = 7,
FirstGeneration = 8,
SecondGeneration = 9,
ThirdGeneration = 10,
FourthGeneration = 11,
}

[FieldOffset(0x00)]
public byte rattlingCoilStacks;

[FieldOffset(0x01)]
public byte anguineTribute;

[FieldOffset(0x02)]
public byte serpentOffering;

[NonSerialized]
[FieldOffset(0x03)]
private AdvancedCombo _advancedCombo;

public string advancedCombo {
get {
return _advancedCombo.ToString();
}
}

[FieldOffset(0x06)]
public ushort reawakenedTimer;
}



[StructLayout(LayoutKind.Explicit)]
public struct PictomancerJobMemory {
[Flags]
Expand Down
2 changes: 2 additions & 0 deletions resources/effect_id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,7 @@ const data = {
'HpBoost3': '618',
'HpBoost4': '619',
'Hubris': 'A2B',
'HuntersInstinct': 'E54',
'HuntersVenom': 'E49',
'HydrobulletTarget': 'EA4',
'HydrofallTarget': 'EA3',
Expand Down Expand Up @@ -1286,6 +1287,7 @@ const data = {
'Normal': '89C',
'NormalStance': '1CB',
'NoseForBattle': '486',
'NoxiousGnash': 'E53',
'Nuisance': 'F6E',
'NullBlack': 'A4B',
'NullWhite': 'A4A',
Expand Down
1 change: 1 addition & 0 deletions resources/outputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default {
en: 'Avoid Tank Tethers',
fr: 'Évitez les liens des Tanks',
ja: 'タンクの線を避けて',
cn: '远离坦克连线',
},
tankCleave: {
en: 'Tank cleave',
Expand Down
19 changes: 19 additions & 0 deletions types/event.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,24 @@ export interface JobDetail {
lemureShroud: number;
voidShroud: number;
};
'VPR': {
rattlingCoilStacks: number;
anguineTribute: number;
serpentOffering: number;
advancedCombo:
| 'Dreadwinder'
| 'HuntersCoil'
| 'SwiftskinsCoil'
| 'PitOfDread'
| 'HuntersDen'
| 'SwiftskinsDen'
| 'Reawaken'
| 'FirstGeneration'
| 'SecondGeneration'
| 'ThirdGeneration'
| 'FourthGeneration';
reawakenedTimer: number;
};
'BRD': {
songName: BardSongType;
lastPlayed: BardSongType;
Expand Down Expand Up @@ -130,6 +148,7 @@ export interface JobDetail {
umbralHearts: number;
polyglot: number;
nextPolyglotMilliseconds: number;
astralSoulStacks: number;
};
'ACN': {
aetherflowStacks: number;
Expand Down
6 changes: 5 additions & 1 deletion ui/jobs/bars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
kMPUI3Rate,
} from './constants';
import { JobsEventEmitter } from './event_emitter';
import { FfxivVersion } from './jobs';
import './jobs_config';
import { JobsOptions } from './jobs_options';
import { Player } from './player';
Expand Down Expand Up @@ -589,6 +590,7 @@ export class Bars {
prevMp?: number;
umbralStacks?: number;
inCombat: boolean;
ffxivVersion: FfxivVersion;
}): void {
if (!this.o.mpTicker)
return;
Expand All @@ -608,7 +610,9 @@ export class Bars {
if (data.umbralStacks === -3)
umbralTick = kMPUI3Rate;

const mpTick = Math.floor(data.maxMp * baseTick) + Math.floor(data.maxMp * umbralTick);
const mpTick = data.ffxivVersion < 700
? Math.floor(data.maxMp * baseTick) + Math.floor(data.maxMp * umbralTick)
: data.maxMp * baseTick;
if (delta === mpTick && data.umbralStacks <= 0) // MP ticks disabled in AF
this.o.mpTicker.duration = kMPTickInterval;

Expand Down
Loading

0 comments on commit 7c007d9

Please sign in to comment.