diff --git a/HarmonySrc/SnakeControl.cs b/HarmonySrc/SnakeControl.cs
index 0a5fb95..78e4c97 100644
--- a/HarmonySrc/SnakeControl.cs
+++ b/HarmonySrc/SnakeControl.cs
@@ -95,6 +95,9 @@ namespace NecromancerTome
/// Убитые змеёй: с них не падает мешок с добычей (указание 28.09: «в режиме змеи
/// лут не выпадал вообще»). Снимается в патче dropItemOnDeath.
public static readonly System.Collections.Generic.HashSet NoLoot = new System.Collections.Generic.HashSet();
+ /// Убитые змеёй: опыт за них - ноль (указание 28.09: «форма не для повышения уровней
+ /// или лута, она для повышения уровня Некромантии»). Снимается в патче AddKillXP.
+ public static readonly System.Collections.Generic.HashSet NoXp = new System.Collections.Generic.HashSet();
/// Зомби, которые заметили змею (указание 28.09: «встречные зомби просто стоят,
/// скучно - пусть начинают ходить, если змея рядом»): не дальше StirRange идут к ней, как на
@@ -349,6 +352,7 @@ namespace NecromancerTome
_freeze = KillFreeze;
_killId = target.entityId;
NoLoot.Add(target.entityId);
+ NoXp.Add(target.entityId);
NecroBurst.Pending.Add(target.entityId);
target.DamageEntity(new DamageSourceEntity(EnumDamageSource.External, EnumDamageTypes.Piercing, _player.entityId),
99999, false);
@@ -356,6 +360,7 @@ namespace NecromancerTome
{
NecroBurst.Pending.Remove(target.entityId);
NoLoot.Remove(target.entityId);
+ NoXp.Remove(target.entityId);
}
Debug.Log("[NecromancerTome] SnakeControl: удар по " + target.EntityName + ", " + (target.IsDead() ? "убит" : "ВЫЖИЛ"));
}
@@ -1209,4 +1214,17 @@ namespace NecromancerTome
public static void Prefix(out Vector3 __state) { __state = SnakeAudioSwap.Prefix(); }
public static void Postfix(Vector3 __state) { SnakeAudioSwap.Postfix(__state); }
}
+
+ /// Ноль опыта за убийство змеёй. EntityPlayer.AddKillXP - единственное место, где игра
+ /// начисляет опыт за убийство; префикс пропускает его целиком. Некромантия НЕ теряется: её счёт -
+ /// постфикс на том же методе (NecromancyKillCreditPatch), а Harmony вызывает постфиксы и тогда,
+ /// когда префикс отменил оригинал. Рост урона ножа идёт от того же счётчика.
+ [HarmonyPatch(typeof(EntityPlayer), "AddKillXP")]
+ public static class Patch_EntityPlayer_AddKillXP_SnakeNoXp
+ {
+ public static bool Prefix(EntityAlive killedEntity)
+ {
+ return killedEntity == null || !SnakeControl.NoXp.Remove(killedEntity.entityId);
+ }
+ }
}
diff --git a/NecromancerHarmony.dll b/NecromancerHarmony.dll
index 2694904..53d166b 100644
Binary files a/NecromancerHarmony.dll and b/NecromancerHarmony.dll differ
diff --git a/NecromancerHarmony.pdb b/NecromancerHarmony.pdb
index 60c21e3..fa2d3a9 100644
Binary files a/NecromancerHarmony.pdb and b/NecromancerHarmony.pdb differ