39 {
40
41 if (item.IsRuined() || item.IsSetForDeletion())
42 return;
43
46 {
47 if (
GetGame().ConfigIsExisting(
path +
" baitTypes") &&
GetGame().ConfigIsExisting(
path +
" baitTypeChances"))
48 {
49 CachedObjectsArrays.ARRAY_INT.Clear();
50 CachedObjectsArrays.ARRAY_FLOAT.Clear();
53 int count = CachedObjectsArrays.ARRAY_INT.Count();
54 if (count == CachedObjectsArrays.ARRAY_FLOAT.Count())
55 {
56 int key;
57 float value;
58 for (int i = 0; i < count; i++)
59 {
60 key = CachedObjectsArrays.ARRAY_INT[i];
63 {
65 }
66 }
67 }
68 else
69 {
70 ErrorEx(
"'baitTypes' and 'baitTypeChances' arrray counts of " + item.GetType() +
" do not match!",
ErrorExSeverity.INFO);
71 }
72 }
73 if (
GetGame().ConfigIsExisting(
path +
" resultQuantityBaseMod"))
75 if (
GetGame().ConfigIsExisting(
path +
" resultQuantityDispersionMin"))
77 if (
GetGame().ConfigIsExisting(
path +
" resultQuantityDispersionMax"))
79 }
80 }
ref map< int, ref BaitData > m_BaitCompatibilityMap
float m_QualityDispersionMinMod
float m_QualityDispersionMaxMod
proto native float ConfigGetFloat(string path)
Get float value from config on path.
proto native void ConfigGetIntArray(string path, out TIntArray values)
Get array of integers from config on path.
proto native void ConfigGetFloatArray(string path, out TFloatArray values)
Get array of floats from config on path.
float AdjustBaitItemChance(EntityAI item)
Allows for adjustment of all catch probabilities from item qualities (damage, qty....
proto native CGame GetGame()