Upload from upload_mods.ps1
This commit is contained in:
68
Harmony/Harmony_ItemActionAttack.cs
Normal file
68
Harmony/Harmony_ItemActionAttack.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Harmony.EntityPlayerPatches
|
||||
{
|
||||
internal class ItemActionAttackPatches
|
||||
{
|
||||
[HarmonyPatch(typeof(ItemActionAttack), "Hit")]
|
||||
public class HitPatchEx
|
||||
{
|
||||
// 22 args, wow
|
||||
public static bool Prefix(
|
||||
WorldRayHitInfo hitInfo,
|
||||
int _attackerEntityId,
|
||||
EnumDamageTypes _damageType,
|
||||
float _blockDamage,
|
||||
float _entityDamage,
|
||||
float _staminaDamageMultiplier,
|
||||
float _weaponCondition,
|
||||
float _criticalHitChanceOLD,
|
||||
float _dismemberChance,
|
||||
string _attackingDeviceMadeOf,
|
||||
DamageMultiplier _damageMultiplier,
|
||||
List<string> _buffActions,
|
||||
ItemActionAttack.AttackHitInfo _attackDetails,
|
||||
int _flags = 1,
|
||||
int _actionExp = 0,
|
||||
float _actionExpBonus = 0f,
|
||||
ItemActionAttack rangeCheckedAction = null,
|
||||
Dictionary<string, ItemActionAttack.Bonuses> _toolBonuses = null,
|
||||
ItemActionAttack.EnumAttackMode _attackMode = ItemActionAttack.EnumAttackMode.RealNoHarvesting,
|
||||
Dictionary<string, string> _hitSoundOverrides = null,
|
||||
int ownedEntityId = -1,
|
||||
ItemValue damagingItemValue = null)
|
||||
{
|
||||
// our hook will simply call our replacement method
|
||||
//Log.Out($"HitPatchEx - Attacker id: {_attackerEntityId}, dmg type: {_damageType}, blk dmg: {_blockDamage}, ent dmg: {_entityDamage}");
|
||||
|
||||
ItemActionAttackRebirth.Hit(
|
||||
hitInfo,
|
||||
_attackerEntityId,
|
||||
_damageType,
|
||||
_blockDamage,
|
||||
_entityDamage,
|
||||
_staminaDamageMultiplier,
|
||||
_weaponCondition,
|
||||
_criticalHitChanceOLD,
|
||||
_dismemberChance,
|
||||
_attackingDeviceMadeOf,
|
||||
_damageMultiplier,
|
||||
_buffActions,
|
||||
_attackDetails,
|
||||
_flags,
|
||||
_actionExp,
|
||||
_actionExpBonus,
|
||||
rangeCheckedAction,
|
||||
_toolBonuses,
|
||||
_attackMode,
|
||||
_hitSoundOverrides,
|
||||
ownedEntityId,
|
||||
damagingItemValue);
|
||||
|
||||
return false; // don't process the original method
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user