Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/ACE.Server/WorldObjects/Creature_Death.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public void OnDeath_HandleKillTask(string killQuest)
TryHandleKillTask(playerDamager, killQuest, killTaskCredits, cap);
}
// check option that requires killer to have killtask to pass to fellows
else if (!PropertyManager.GetBool("fellow_kt_killer").Item)
else if (PropertyManager.GetBool("fellow_kt_killer").Item)
{
continue;
}
Expand Down
5 changes: 3 additions & 2 deletions Source/ACE.Server/WorldObjects/Managers/EnchantmentManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public virtual AddEnchantmentResult Add(Spell spell, WorldObject caster, WorldOb

if (refreshSpell == null)
{
var newEntry = BuildEntry(spell, caster, weapon, equip);
var newEntry = BuildEntry(spell, caster, weapon, equip, isWeaponSpell);
newEntry.LayerId = result.NextLayerId;
WorldObject.Biota.PropertiesEnchantmentRegistry.AddEnchantment(newEntry, WorldObject.BiotaDatabaseLock);

Expand Down Expand Up @@ -1405,7 +1405,8 @@ public void ApplyDamageTick(List<PropertiesEnchantmentRegistry> enchantments, Da
if (isDead) break;
}

creature.TakeDamageOverTime(tickAmountTotal, damageType);
if (!creature.Invincible)
creature.TakeDamageOverTime(tickAmountTotal, damageType);

if (!creature.IsAlive) return;

Expand Down
2 changes: 1 addition & 1 deletion Source/ACE.Server/WorldObjects/Player_Vitals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public override int UpdateVital(CreatureVital vital, int newVal)
// check for exhaustion
if (vital.Vital == PropertyAttribute2nd.Stamina || vital.Vital == PropertyAttribute2nd.MaxStamina)
{
if (newVal == 0)
if (vital.Current == 0)
{
OnExhausted();
}
Expand Down
4 changes: 2 additions & 2 deletions Source/ACE.Server/WorldObjects/SpellProjectile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public override void OnCollideObject(WorldObject target)
var sourcePlayer = source as Player;
var targetPlayer = target as Player;

if (source == null || !target.IsAlive || targetPlayer != null && targetPlayer.Invincible)
if (source == null || !target.IsAlive || target.Invincible)
return null;

// check lifestone protection
Expand Down Expand Up @@ -688,7 +688,7 @@ public void DamageTarget(Creature target, float damage, bool critical, bool crit
{
var targetPlayer = target as Player;

if (targetPlayer != null && targetPlayer.Invincible || target.IsDead)
if (target.Invincible || target.IsDead)
return;

var sourceCreature = ProjectileSource as Creature;
Expand Down
6 changes: 3 additions & 3 deletions Source/ACE.Server/WorldObjects/WorldObject_Magic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ public bool TryResistSpell(WorldObject target, Spell spell, WorldObject itemCast
var player = this as Player;
var targetPlayer = target as Player;

if (targetCreature.Invincible)
resisted = true;

if (targetPlayer != null)
{
if (targetPlayer.Invincible)
resisted = true;

if (targetPlayer.UnderLifestoneProtection)
{
targetPlayer.HandleLifestoneProtection();
Expand Down