Skip to content

Commit

Permalink
[Fix] - Naming and whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
TacoConKvass authored Oct 12, 2024
1 parent 3b56669 commit a756c33
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 35 deletions.
67 changes: 35 additions & 32 deletions RL2.API/APIEndpoints/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ internal static void ResolveFlat_Invoke(ref float additive) {
///
/// </summary>
/// <param name="multiplicative"></param>
public delegate void ResolveMultiplier_delegate(ref float multiplicative);
public delegate void ResolveMultiplier_delegate(ref float multiplier;

/// <inheritdoc cref="ResolveMultiplier_delegate"/>
public static event ResolveMultiplier_delegate? ResolveMultiplier;

internal static void ResolveMultiplier_Invoke(ref float additive) {
ResolveMultiplier?.Invoke(ref additive);
internal static void ResolveMultiplier_Invoke(ref float multiplier) {
ResolveMultiplier?.Invoke(ref multiplier);
}
#endregion

Expand All @@ -116,13 +116,13 @@ internal static void DexterityFlat_Invoke(ref float additive) {
///
/// </summary>
/// <param name="multiplicative"></param>
public delegate void DexterityMultiplier_delegate(ref float multiplicative);
public delegate void DexterityMultiplier_delegate(ref float multiplier;

/// <inheritdoc cref="DexterityMultiplier_delegate"/>
public static event DexterityMultiplier_delegate? DexterityMultiplier;

internal static void DexterityMultiplier_Invoke(ref float additive) {
DexterityMultiplier?.Invoke(ref additive);
internal static void DexterityMultiplier_Invoke(ref float multiplier) {
DexterityMultiplier?.Invoke(ref multiplier);
}
#endregion

Expand Down Expand Up @@ -174,13 +174,13 @@ internal static void FocusFlat_Invoke(ref float additive) {
///
/// </summary>
/// <param name="multiplicative"></param>
public delegate void FocusMultiplier_delegate(ref float multiplicative);
public delegate void FocusMultiplier_delegate(ref float multiplier;

/// <inheritdoc cref="FocusMultiplier_delegate"/>
public static event FocusMultiplier_delegate? FocusMultiplier;

internal static void FocusMultiplier_Invoke(ref float additive) {
FocusMultiplier?.Invoke(ref additive);
internal static void FocusMultiplier_Invoke(ref float multiplier) {
FocusMultiplier?.Invoke(ref multiplier);
}
#endregion

Expand Down Expand Up @@ -232,13 +232,13 @@ internal static void ArmorFlat_Invoke(ref int additive) {
///
/// </summary>
/// <param name="multiplicative"></param>
public delegate void ArmorMultiplier_delegate(ref float multiplicative);
public delegate void ArmorMultiplier_delegate(ref float multiplier;

/// <inheritdoc cref="ArmorMultiplier_delegate"/>
public static event ArmorMultiplier_delegate? ArmorMultiplier;

internal static void ArmorMultiplier_Invoke(ref float additive) {
ArmorMultiplier?.Invoke(ref additive);
internal static void ArmorMultiplier_Invoke(ref float multiplier) {
ArmorMultiplier?.Invoke(ref multiplier);
}
#endregion

Expand All @@ -260,13 +260,13 @@ internal static void StrengthFlat_Invoke(ref float additive) {
///
/// </summary>
/// <param name="multiplicative"></param>
public delegate void StrengthMultiplier_delegate(ref float multiplicative);
public delegate void StrengthMultiplier_delegate(ref float multiplier;

/// <inheritdoc cref="StrengthMultiplier_delegate"/>
public static event StrengthMultiplier_delegate? StrengthMultiplier;

internal static void StrengthMultiplier_Invoke(ref float additive) {
StrengthMultiplier?.Invoke(ref additive);
internal static void StrengthMultiplier_Invoke(ref float multiplier) {
StrengthMultiplier?.Invoke(ref multiplier);
}
#endregion

Expand All @@ -288,13 +288,13 @@ internal static void IntelligenceFlat_Invoke(ref float additive) {
///
/// </summary>
/// <param name="multiplicative"></param>
public delegate void IntelligenceMultiplier_delegate(ref float multiplicative);
public delegate void IntelligenceMultiplier_delegate(ref float multiplier;

/// <inheritdoc cref="IntelligenceMultiplier_delegate"/>
public static event IntelligenceMultiplier_delegate? IntelligenceMultiplier;

internal static void IntelligenceMultiplier_Invoke(ref float additive) {
IntelligenceMultiplier?.Invoke(ref additive);
internal static void IntelligenceMultiplier_Invoke(ref float multiplier) {
IntelligenceMultiplier?.Invoke(ref multiplier);
}
#endregion

Expand All @@ -316,13 +316,13 @@ internal static void VitalityFlat_Invoke(ref int additive) {
///
/// </summary>
/// <param name="multiplicative"></param>
public delegate void VitalityMultiplier_delegate(ref float multiplicative);
public delegate void VitalityMultiplier_delegate(ref float multiplier;

/// <inheritdoc cref="VitalityMultiplier_delegate"/>
public static event VitalityMultiplier_delegate? VitalityMultiplier;

internal static void VitalityMultiplier_Invoke(ref float additive) {
VitalityMultiplier?.Invoke(ref additive);
internal static void VitalityMultiplier_Invoke(ref float multiplier) {
VitalityMultiplier?.Invoke(ref multiplier);
}
#endregion

Expand All @@ -344,13 +344,13 @@ internal static void MaxHealthFlat_Invoke(ref int additive) {
///
/// </summary>
/// <param name="multiplicative"></param>
public delegate void MaxHealthMultiplier_delegate(ref float multiplicative);
public delegate void MaxHealthMultiplier_delegate(ref float multiplier;

/// <inheritdoc cref="MaxHealthMultiplier_delegate"/>
public static event MaxHealthMultiplier_delegate? MaxHealthMultiplier;

internal static void MaxHealthMultiplier_Invoke(ref float additive) {
MaxHealthMultiplier?.Invoke(ref additive);
internal static void MaxHealthMultiplier_Invoke(ref float multiplier) {
MaxHealthMultiplier?.Invoke(ref multiplier);
}
#endregion

Expand All @@ -372,13 +372,13 @@ internal static void MaxManaFlat_Invoke(ref int additive) {
///
/// </summary>
/// <param name="multiplicative"></param>
public delegate void MaxManaMultiplier_delegate(ref float multiplicative);
public delegate void MaxManaMultiplier_delegate(ref float multiplier;

/// <inheritdoc cref="MaxManaMultiplier_delegate"/>
public static event MaxManaMultiplier_delegate? MaxManaMultiplier;

internal static void MaxManaMultiplier_Invoke(ref float additive) {
MaxManaMultiplier?.Invoke(ref additive);
internal static void MaxManaMultiplier_Invoke(ref float multiplier) {
MaxManaMultiplier?.Invoke(ref multiplier);
}
#endregion

Expand Down Expand Up @@ -425,19 +425,21 @@ public static class HeirGeneration

/// <inheritdoc cref="ModifyCharacterRandomization_delegate"/>
public static event ModifyCharacterRandomization_delegate? ModifyCharacterRandomization;

internal static void ModifyCharacterRandomization_Invoke(CharacterData data) {
ModifyCharacterRandomization?.Invoke(data);
}

/// <summary>
///
/// </summary>
public delegate void ModifyGeneratedCharacterData_delegate(CharacterData data, bool classLocked, bool spellLocked);
public delegate void ModifyCharacterData_delegate(CharacterData data, bool classLocked, bool spellLocked);

/// <inheritdoc cref="ModifyGeneratedCharacterData_delegate"/>
public static event ModifyGeneratedCharacterData_delegate? ModifyGeneratedCharacterData;
internal static void ModifyGeneratedCharacterData_Invoke(CharacterData data, bool classLocked, bool spellLocked) {
ModifyGeneratedCharacterData?.Invoke(data, classLocked, spellLocked);
/// <inheritdoc cref="ModifyCharacterData_delegate"/>
public static event ModifyCharacterData_delegate? ModifyCharacterData;

internal static void ModifyGeneratedData_Invoke(CharacterData data, bool classLocked, bool spellLocked) {
ModifyCharacterData?.Invoke(data, classLocked, spellLocked);
}

/// <summary>
Expand All @@ -447,6 +449,7 @@ internal static void ModifyGeneratedCharacterData_Invoke(CharacterData data, boo

/// <inheritdoc cref="ModifyCharacterLook_delegate"/>
public static event ModifyCharacterLook_delegate? ModifyCharacterLook;

internal static void ModifyCharacterLook_Invoke(PlayerLookController lookData, CharacterData data) {
ModifyCharacterLook?.Invoke(lookData, data);
}
Expand Down
6 changes: 3 additions & 3 deletions RL2.API/Hooks/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,9 @@ public partial class RL2API


/// <summary>
/// Handles calling <see cref="Player.HeirGeneration.ModifyGeneratedCharacterData"/>
/// Handles calling <see cref="Player.HeirGeneration.ModifyCharacterData"/>
/// </summary>
internal static ILHook ModifyGeneratedCharacterData = new ILHook(
internal static ILHook ModifyCharacterData = new ILHook(
typeof(LineageWindowController).GetMethod("CreateRandomCharacters", BindingFlags.NonPublic | BindingFlags.Instance),
(ILContext il) => {
ILCursor ilCursor = new ILCursor(il);
Expand Down Expand Up @@ -595,7 +595,7 @@ public partial class RL2API
ilCursor.EmitDelegate((CharacterData characterData, int index, CharacterData[] array) => {
bool classLocked = index == array.Length - 1 && SaveManager.ModeSaveData.GetSoulShopObj(SoulShopType.ChooseYourClass).CurrentEquippedLevel > 0;
bool spellLocked = index == array.Length - 1 && SaveManager.ModeSaveData.GetSoulShopObj(SoulShopType.ChooseYourSpell).CurrentEquippedLevel > 0;
Player.HeirGeneration.ModifyGeneratedCharacterData_Invoke(characterData, classLocked, spellLocked);
Player.HeirGeneration.ModifyCharacterData_Invoke(characterData, classLocked, spellLocked);
});
}
);
Expand Down

0 comments on commit a756c33

Please sign in to comment.