Skip to content

Commit

Permalink
Update references
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed Nov 1, 2024
1 parent 89a6037 commit 6639232
Show file tree
Hide file tree
Showing 13 changed files with 131 additions and 131 deletions.
4 changes: 2 additions & 2 deletions Fika.Core/Coop/BotClasses/BotPlayerBridge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ public bool UsingSimplifiedSkeleton
}
}

public void ApplyDamageInfo(GStruct421 damageInfo, EBodyPart bodyPartType, EBodyPartColliderType bodyPartCollider, float absorbed)
public void ApplyDamageInfo(DamageInfo damageInfo, EBodyPart bodyPartType, EBodyPartColliderType bodyPartCollider, float absorbed)
{
bot.ApplyDamageInfo(damageInfo, bodyPartType, bodyPartCollider, absorbed);
}

public ShotInfoClass ApplyShot(GStruct421 damageInfo, EBodyPart bodyPart, EBodyPartColliderType bodyPartCollider, EArmorPlateCollider armorPlateCollider, GStruct420 shotId)
public ShotInfoClass ApplyShot(DamageInfo damageInfo, EBodyPart bodyPart, EBodyPartColliderType bodyPartCollider, EArmorPlateCollider armorPlateCollider, GStruct420 shotId)
{
if (damageInfo.Player != null && (damageInfo.Player.iPlayer.IsYourPlayer || damageInfo.Player.IsAI))
{
Expand Down
4 changes: 2 additions & 2 deletions Fika.Core/Coop/Custom/FikaDebug.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private void AddPlayer(CoopPlayer player)
alivePlayers.Add(player);
}

private void PlayerDied(EFT.Player player, EFT.IPlayer lastAggressor, GStruct421 damageInfo, EBodyPart part)
private void PlayerDied(EFT.Player player, EFT.IPlayer lastAggressor, DamageInfo damageInfo, EBodyPart part)
{
player.OnPlayerDead -= PlayerDied;
alivePlayers.Remove((CoopPlayer)player);
Expand All @@ -137,7 +137,7 @@ private void AddBot(CoopPlayer bot)
aliveBots.Add(bot);
}

private void BotDied(EFT.Player player, EFT.IPlayer lastAggressor, GStruct421 damageInfo, EBodyPart part)
private void BotDied(EFT.Player player, EFT.IPlayer lastAggressor, DamageInfo damageInfo, EBodyPart part)
{
player.OnPlayerDead -= BotDied;
aliveBots.Remove((CoopPlayer)player);
Expand Down
2 changes: 1 addition & 1 deletion Fika.Core/Coop/Custom/FikaHealthBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ private void HealthController_BodyPartDestroyedEvent(EBodyPart arg1, EDamageType
UpdateHealth();
}

private void HealthController_HealthChangedEvent(EBodyPart arg1, float arg2, GStruct421 arg3)
private void HealthController_HealthChangedEvent(EBodyPart arg1, float arg2, DamageInfo arg3)
{
UpdateHealth();
}
Expand Down
4 changes: 2 additions & 2 deletions Fika.Core/Coop/ObservedClasses/ObservedStatisticsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ public void Init(Player player)

}

public void OnEnemyDamage(GStruct421 damage, EBodyPart bodyPart, string playerProfileId, EPlayerSide playerSide, WildSpawnType role, string groupId, float fullHealth, bool isHeavyDamage, float distance, int hour, List<string> targetEquipment, HealthEffects enemyEffects, List<string> zoneIds)
public void OnEnemyDamage(DamageInfo damage, EBodyPart bodyPart, string playerProfileId, EPlayerSide playerSide, WildSpawnType role, string groupId, float fullHealth, bool isHeavyDamage, float distance, int hour, List<string> targetEquipment, HealthEffects enemyEffects, List<string> zoneIds)
{
// Do nothing
}

public void OnEnemyKill(GStruct421 damage, EDamageType lethalDamageType, EBodyPart bodyPart, EPlayerSide playerSide, WildSpawnType role, string playerAccountId, string playerProfileId, string playerName, string groupId, int level, int killExp, float distance, int hour, List<string> targetEquipment, HealthEffects enemyEffects, List<string> zoneIds, bool isFriendly, bool isAI)
public void OnEnemyKill(DamageInfo damage, EDamageType lethalDamageType, EBodyPart bodyPart, EPlayerSide playerSide, WildSpawnType role, string playerAccountId, string playerProfileId, string playerName, string groupId, int level, int killExp, float distance, int hour, List<string> targetEquipment, HealthEffects enemyEffects, List<string> zoneIds, bool isFriendly, bool isAI)
{
// Do nothing
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public bool UsingSimplifiedSkeleton
}
}

public void ApplyDamageInfo(GStruct421 damageInfo, EBodyPart bodyPartType, EBodyPartColliderType bodyPartCollider, float absorbed)
public void ApplyDamageInfo(DamageInfo damageInfo, EBodyPart bodyPartType, EBodyPartColliderType bodyPartCollider, float absorbed)
{
if (damageInfo.DamageType.IsEnvironmental() || damageInfo.DamageType is EDamageType.Landmine or EDamageType.Artillery)
{
Expand All @@ -47,7 +47,7 @@ public void ApplyDamageInfo(GStruct421 damageInfo, EBodyPart bodyPartType, EBody
}
}

public ShotInfoClass ApplyShot(GStruct421 damageInfo, EBodyPart bodyPart, EBodyPartColliderType bodyPartCollider, EArmorPlateCollider armorPlateCollider, GStruct420 shotId)
public ShotInfoClass ApplyShot(DamageInfo damageInfo, EBodyPart bodyPart, EBodyPartColliderType bodyPartCollider, EArmorPlateCollider armorPlateCollider, GStruct420 shotId)
{
if (damageInfo.Player != null && damageInfo.Player.iPlayer.IsYourPlayer)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public bool UsingSimplifiedSkeleton
}
}

public void ApplyDamageInfo(GStruct421 damageInfo, EBodyPart bodyPartType, EBodyPartColliderType bodyPartCollider, float absorbed)
public void ApplyDamageInfo(DamageInfo damageInfo, EBodyPart bodyPartType, EBodyPartColliderType bodyPartCollider, float absorbed)
{
if (damageInfo.DamageType.IsEnvironmental())
{
Expand All @@ -53,7 +53,7 @@ public void ApplyDamageInfo(GStruct421 damageInfo, EBodyPart bodyPartType, EBody
}
}

public ShotInfoClass ApplyShot(GStruct421 damageInfo, EBodyPart bodyPart, EBodyPartColliderType bodyPartCollider, EArmorPlateCollider armorPlateCollider, GStruct420 shotId)
public ShotInfoClass ApplyShot(DamageInfo damageInfo, EBodyPart bodyPart, EBodyPartColliderType bodyPartCollider, EArmorPlateCollider armorPlateCollider, GStruct420 shotId)
{
if (damageInfo.DamageType is EDamageType.Sniper)
{
Expand Down
12 changes: 6 additions & 6 deletions Fika.Core/Coop/Patches/Lighthouse/Zyriachy_Patches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal class Zyriachy_Patches
{
public static void Enable()
{
new GClass414_Activate_Patch().Enable();
new GClass422_Activate_Patch().Enable();

#if DEBUG
new zryachiydebugpatch1().Enable();
Expand All @@ -24,11 +24,11 @@ public static void Enable()
#endif
}

internal class GClass414_Activate_Patch : ModulePatch
internal class GClass422_Activate_Patch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return typeof(GClass414).GetMethod(nameof(GClass414.Activate));
return typeof(GClass422).GetMethod(nameof(GClass422.Activate));
}

[PatchPostfix]
Expand All @@ -37,7 +37,7 @@ public static void Postfix(ref BotOwner ___botOwner_0)
___botOwner_0.GetPlayer.OnPlayerDead += OnZryachiyDead;
}

private static void OnZryachiyDead(Player player, IPlayer lastAggressor, GStruct421 damageInfo, EBodyPart part)
private static void OnZryachiyDead(Player player, IPlayer lastAggressor, DamageInfo damageInfo, EBodyPart part)
{
player.OnPlayerDead -= OnZryachiyDead;

Expand All @@ -49,7 +49,7 @@ internal class zryachiydebugpatch1 : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return typeof(GClass414).GetMethod(nameof(GClass422.IsEnemyNow));
return typeof(GClass422).GetMethod(nameof(GClass422.IsEnemyNow));
}

[PatchPostfix]
Expand All @@ -63,7 +63,7 @@ internal class zryachiydebugpatch2 : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return typeof(GClass414).GetMethod(nameof(GClass422.method_6));
return typeof(GClass422).GetMethod(nameof(GClass422.method_6));
}

[PatchPostfix]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ private static async Task HandleJoinAsSpectator()
// Small delay to ensure the teleport command is processed first
await Task.Delay(250);

GStruct421 damageInfo = new()
DamageInfo damageInfo = new()
{
Damage = 1000,
DamageType = EDamageType.Impact
Expand Down
8 changes: 4 additions & 4 deletions Fika.Core/Coop/Players/CoopBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public override void CreateMovementContext()
MovementContext = BotMovementContext.Create(this, GetBodyAnimatorCommon, GetCharacterControllerCommon, movement_MASK);
}

public override void OnBeenKilledByAggressor(IPlayer aggressor, GStruct421 damageInfo, EBodyPart bodyPart, EDamageType lethalDamageType)
public override void OnBeenKilledByAggressor(IPlayer aggressor, DamageInfo damageInfo, EBodyPart bodyPart, EDamageType lethalDamageType)
{
base.OnBeenKilledByAggressor(aggressor, damageInfo, bodyPart, lethalDamageType);

Expand All @@ -147,7 +147,7 @@ public override void OnBeenKilledByAggressor(IPlayer aggressor, GStruct421 damag
}
}

public override ShotInfoClass ApplyShot(GStruct421 damageInfo, EBodyPart bodyPartType, EBodyPartColliderType colliderType, EArmorPlateCollider armorPlateCollider, GStruct420 shotId)
public override ShotInfoClass ApplyShot(DamageInfo damageInfo, EBodyPart bodyPartType, EBodyPartColliderType colliderType, EArmorPlateCollider armorPlateCollider, GStruct420 shotId)
{
ActiveHealthController activeHealthController = ActiveHealthController;
if (activeHealthController != null && !activeHealthController.IsAlive)
Expand Down Expand Up @@ -186,7 +186,7 @@ public override ShotInfoClass ApplyShot(GStruct421 damageInfo, EBodyPart bodyPar
return hitInfo;
}

public override void ApplyDamageInfo(GStruct421 damageInfo, EBodyPart bodyPartType, EBodyPartColliderType colliderType, float absorbed)
public override void ApplyDamageInfo(DamageInfo damageInfo, EBodyPart bodyPartType, EBodyPartColliderType colliderType, float absorbed)
{
if (damageInfo.Weapon != null)
{
Expand All @@ -195,7 +195,7 @@ public override void ApplyDamageInfo(GStruct421 damageInfo, EBodyPart bodyPartTy
base.ApplyDamageInfo(damageInfo, bodyPartType, colliderType, absorbed);
}

public override void ApplyExplosionDamageToArmor(Dictionary<GStruct209, float> armorDamage, GStruct421 damageInfo)
public override void ApplyExplosionDamageToArmor(Dictionary<GStruct209, float> armorDamage, DamageInfo damageInfo)
{
_preAllocatedArmorComponents.Clear();
Inventory.GetPutOnArmorsNonAlloc(_preAllocatedArmorComponents);
Expand Down
14 changes: 7 additions & 7 deletions Fika.Core/Coop/Players/CoopPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public override void OnWeaponMastered(MasterSkillClass masterSkill)
masterSkill.Level.ToString()), ENotificationDurationType.Default, ENotificationIconType.Default, null);
}

public override void ApplyDamageInfo(GStruct421 damageInfo, EBodyPart bodyPartType, EBodyPartColliderType colliderType, float absorbed)
public override void ApplyDamageInfo(DamageInfo damageInfo, EBodyPart bodyPartType, EBodyPartColliderType colliderType, float absorbed)
{
if (IsYourPlayer)
{
Expand Down Expand Up @@ -236,7 +236,7 @@ public override void ApplyDamageInfo(GStruct421 damageInfo, EBodyPart bodyPartTy
base.ApplyDamageInfo(damageInfo, bodyPartType, colliderType, absorbed);
}

public override ShotInfoClass ApplyShot(GStruct421 damageInfo, EBodyPart bodyPartType, EBodyPartColliderType colliderType, EArmorPlateCollider armorPlateCollider, GStruct420 shotId)
public override ShotInfoClass ApplyShot(DamageInfo damageInfo, EBodyPart bodyPartType, EBodyPartColliderType colliderType, EArmorPlateCollider armorPlateCollider, GStruct420 shotId)
{
if (damageInfo.DamageType is EDamageType.Sniper or EDamageType.Landmine)
{
Expand All @@ -255,7 +255,7 @@ public override ShotInfoClass ApplyShot(GStruct421 damageInfo, EBodyPart bodyPar
return null;
}

private ShotInfoClass SimulatedApplyShot(GStruct421 damageInfo, EBodyPart bodyPartType, EBodyPartColliderType colliderType, EArmorPlateCollider armorPlateCollider)
private ShotInfoClass SimulatedApplyShot(DamageInfo damageInfo, EBodyPart bodyPartType, EBodyPartColliderType colliderType, EArmorPlateCollider armorPlateCollider)
{
ActiveHealthController activeHealthController = ActiveHealthController;
if (activeHealthController != null && !activeHealthController.IsAlive)
Expand Down Expand Up @@ -412,7 +412,7 @@ public override void DropCurrentController(Action callback, bool fastDrop, Item
base.DropCurrentController(callback, fastDrop, nextControllerItem);
}

public override void OnBeenKilledByAggressor(IPlayer aggressor, GStruct421 damageInfo, EBodyPart bodyPart, EDamageType lethalDamageType)
public override void OnBeenKilledByAggressor(IPlayer aggressor, DamageInfo damageInfo, EBodyPart bodyPart, EDamageType lethalDamageType)
{
base.OnBeenKilledByAggressor(aggressor, damageInfo, bodyPart, lethalDamageType);

Expand All @@ -436,7 +436,7 @@ public override void OnBeenKilledByAggressor(IPlayer aggressor, GStruct421 damag
}
}

public void HandleTeammateKill(ref GStruct421 damage, EBodyPart bodyPart,
public void HandleTeammateKill(ref DamageInfo damage, EBodyPart bodyPart,
EPlayerSide playerSide, WildSpawnType role, string playerProfileId,
float distance, List<string> targetEquipment,
HealthEffects enemyEffects, List<string> zoneIds, CoopPlayer killer, int experience)
Expand Down Expand Up @@ -1183,7 +1183,7 @@ public void HandleCallbackFromServer(OperationCallbackPacket operationCallbackPa
}
}

public override void ApplyExplosionDamageToArmor(Dictionary<GStruct209, float> armorDamage, GStruct421 damageInfo)
public override void ApplyExplosionDamageToArmor(Dictionary<GStruct209, float> armorDamage, DamageInfo damageInfo)
{
if (IsYourPlayer)
{
Expand Down Expand Up @@ -1239,7 +1239,7 @@ public void QueueArmorDamagePackets(ArmorComponent[] armorComponents)

public virtual void HandleDamagePacket(ref DamagePacket packet)
{
GStruct421 damageInfo = new()
DamageInfo damageInfo = new()
{
Damage = packet.Damage,
DamageType = packet.DamageType,
Expand Down
Loading

0 comments on commit 6639232

Please sign in to comment.