OnFireBallDamage
OxideCarbonWeaponCalled when a fire ball is damaged.
void OnFireBallDamage(FireBall fireBall, BaseCombatEntity local4, HitInfo local2)Method changed — check — the game method differs from the one the hook is recorded for in Oxide. The hook is still called, but its place may have shifted — worth checking after an update.
Parameters
- fireBall
- FireBall
- local4
- BaseCombatEntity
- local2
- HitInfo
Return value
voidThe return value is ignored — the hook only notifies.
Example
private void OnFireBallDamage(FireBall fireBall, BaseCombatEntity local4, HitInfo local2)
{
Puts("OnFireBallDamage");
}Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.
Injection point
Rust.opj (Oxide)
void FireBall.DoRadialDamage()
Passes: FireBall fireBall, BaseCombatEntity local4, HitInfo local2
Method changed — checkReturnBehavior: ContinueArgumentBehavior: UseArgumentString (this, l4, l2)Assembly-CSharp.dll
Where it is called (this branch's game code)
// …
float num = damagePerSecond * tickRate;
if (item is BaseSiegeWeapon || item is BaseMountedWeapon)
{
num *= siegeWeaponDamageScale;
}
hitInfo.PointEnd = item.transform.position;
hitInfo.HitPositionWorld = item.transform.position;
hitInfo.damageTypes.Set(DamageType.Heat, num);
Interface.CallHook("OnFireBallDamage", this, local4, hitInfo);
item.OnAttacked(hitInfo);
}
}
Pool.FreeUnmanaged(ref obj);
}Sources: Rust.opj from OxideMod/Oxide.Rust (MIT) and hook metadata of the Carbon documentation (MIT). Method code is decompiled from this branch's server.