Closed jpw1991 closed 11 months ago
Further testing indicates it only happens if crates are not being used too.
Huh. So the plot thickens:
ZDO
for ChebGonazMinion
drops seems correctCharacterDrop
s themselves seem correct[Info :ChebsNecromancy.Patches.CharacterDrop_Patches] Drops zdo = BoneFragments:6,ArrowFire:10,BlackMetal:1
[Info :ChebsNecromancy.Patches.CharacterDrop_Patches+<>c] Drop BoneFragments min=6 max=6 chance=1
[Info :ChebsNecromancy.Patches.CharacterDrop_Patches+<>c] Drop ArrowFire min=10 max=10 chance=1
[Info :ChebsNecromancy.Patches.CharacterDrop_Patches+<>c] Drop BlackMetal min=1 max=1 chance=1
namespace ChebsNecromancy.Patches
{
[HarmonyPatch(typeof(CharacterDrop), "GenerateDropList")]
class CharacterDrop_Patches
{
[HarmonyPrefix]
static void AddBonesToDropList(ref List<CharacterDrop.Drop> ___m_drops, CharacterDrop __instance)
{
...
/// dumb testy
var undeadm = __instance.GetComponent<UndeadMinion>();
if (undeadm != null)
{
var drops = undeadm.GetComponent<ZNetView>()?.GetZDO().GetString(ChebGonazMinion.MinionDropsZdoKey, "");
Jotunn.Logger.LogInfo($"Drops zdo = {drops}");
var characterDrop = __instance.GetComponent<CharacterDrop>();
characterDrop.m_drops.ForEach(d => Jotunn.Logger.LogInfo($"Drop {d.m_prefab.name} min={d.m_amountMin} max={d.m_amountMax} chance={d.m_chance}"));
}
/// dumb testy
}
}
}
Configuring a
DropOnDeath
value ofEverything
will correctly return all ingredients used to create a skeleton, but does not seem to correctly return the quantities. For example: Creating a fire archer consumes 6 bones and 10 fire arrows, but on death, it is only dropping 1 bone and 1 fire arrow.This bug discovered while debugging issue #224
To reproduce: