diff --git a/ChangeLog b/ChangeLog index 89af19958..97736274d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2020-09-01 Daniel Hawkins + * python/items/lose_buffs_on_drop.py, + python/events/gkill/sword_of_souls.py: Update to use TotalExp field over PermExp. + Requires server r21326 to properly function. + 2020-08-25 Rick Tanner * planes/astral-vault: Numerous cosmetic, design and functional changes to Astral Vault (planes/astral-vault) diff --git a/python/events/gkill/sword_of_souls.py b/python/events/gkill/sword_of_souls.py index a72f1630d..7e3fe55c8 100644 --- a/python/events/gkill/sword_of_souls.py +++ b/python/events/gkill/sword_of_souls.py @@ -20,13 +20,13 @@ if killer.Owner is None and killer.Type == Crossfire.Type.PLAYER: victim = Crossfire.WhoAmI() if victim is not None: old_level = weap.ItemPower - old_xp = weap.PermExp - # Add experience to the weapon (though we only care about the perm_exp field) + old_xp = weap.TotalExp + # Add experience to the weapon (though we only care about the total_exp field) # As the weapon gets stronger, it takes a larger share of the exp weap.AddExp((victim.Exp * (1.0 + weap.ItemPower / 115.0)) // 1) # Determine the change in XP - delta_exp = weap.PermExp - old_xp + delta_exp = weap.TotalExp - old_xp # DEBUGGING INFO: # Crossfire.Log(Crossfire.LogInfo, str(victim.Exp) + " -> " + str(delta_exp) + " & " + str(victim.Exp - delta_exp)) diff --git a/python/items/lose_buffs_on_drop.py b/python/items/lose_buffs_on_drop.py index f412336c3..fcdade809 100644 --- a/python/items/lose_buffs_on_drop.py +++ b/python/items/lose_buffs_on_drop.py @@ -23,6 +23,6 @@ if me.PermExp > 0: me.AttackType = me.Archetype.Clone.AttackType me.Food = me.Archetype.Clone.Food # Experience should be affected before Item Power, since it affects that field - me.AddExp(-me.PermExp) + me.AddExp(-me.TotalExp) me.ItemPower = me.Archetype.Clone.ItemPower ac.Write("The "+me.Name+" shudders and looks almost like a normal weapon again.")