From ed98f4a2a453f532a5b0273dffa7b0198bc87499 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 8 Sep 2021 23:41:06 -0400 Subject: [PATCH] Some fixes --- Source/Game/Entities/Item/Item.cs | 4 ++-- Source/Game/Entities/Object/WorldObject.cs | 2 +- Source/Game/Entities/Unit/Unit.cs | 2 +- Source/Game/Spells/Spell.cs | 2 +- Source/Game/Spells/SpellInfo.cs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/Game/Entities/Item/Item.cs b/Source/Game/Entities/Item/Item.cs index 56bf46af0..40a5ba670 100644 --- a/Source/Game/Entities/Item/Item.cs +++ b/Source/Game/Entities/Item/Item.cs @@ -704,7 +704,7 @@ namespace Game.Entities return Global.ObjectMgr.GetItemTemplate(GetEntry()); } - public Player GetOwner() + public override Player GetOwner() { return Global.ObjAccessor.FindPlayer(GetOwnerGUID()); } @@ -2475,7 +2475,7 @@ namespace Game.Entities public BonusData GetBonus() { return _bonusData; } - public ObjectGuid GetOwnerGUID() { return m_itemData.Owner; } + public override ObjectGuid GetOwnerGUID() { return m_itemData.Owner; } public void SetOwnerGUID(ObjectGuid guid) { SetUpdateFieldValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.Owner), guid); } public ObjectGuid GetContainedIn() { return m_itemData.ContainedIn; } public void SetContainedIn(ObjectGuid guid) { SetUpdateFieldValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.ContainedIn), guid); } diff --git a/Source/Game/Entities/Object/WorldObject.cs b/Source/Game/Entities/Object/WorldObject.cs index 4bea72248..af3fc70d7 100644 --- a/Source/Game/Entities/Object/WorldObject.cs +++ b/Source/Game/Entities/Object/WorldObject.cs @@ -1611,7 +1611,7 @@ namespace Game.Entities return Global.ObjAccessor.GetUnit(this, GetOwnerGUID()); } - public Unit GetCharmerOrOwner() + public virtual Unit GetCharmerOrOwner() { Unit unit = ToUnit(); if (unit != null) diff --git a/Source/Game/Entities/Unit/Unit.cs b/Source/Game/Entities/Unit/Unit.cs index 9a6649821..a98240aee 100644 --- a/Source/Game/Entities/Unit/Unit.cs +++ b/Source/Game/Entities/Unit/Unit.cs @@ -1835,7 +1835,7 @@ namespace Game.Entities return Global.ObjAccessor.GetUnit(this, charmerid); return null; } - public Unit GetCharmerOrOwner() + public override Unit GetCharmerOrOwner() { return !GetCharmerGUID().IsEmpty() ? GetCharmer() : GetOwner(); } diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index 37942aa5a..1c19cb98c 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -6560,7 +6560,7 @@ namespace Game.Spells // check if gameobject ignores LOS GameObject gobCaster = m_caster.ToGameObject(); if (gobCaster != null) - if (!gobCaster.GetGoInfo().GetRequireLOS()) + if (gobCaster.GetGoInfo().GetRequireLOS() == 0) return true; // if spell is triggered, need to check for LOS disable on the aura triggering it and inherit that behaviour diff --git a/Source/Game/Spells/SpellInfo.cs b/Source/Game/Spells/SpellInfo.cs index dd9ebd571..785b29326 100644 --- a/Source/Game/Spells/SpellInfo.cs +++ b/Source/Game/Spells/SpellInfo.cs @@ -3669,7 +3669,7 @@ namespace Game.Spells switch (spellEffectInfo.ApplyAuraName) { // has other non positive effect? - // then it should be marked negative despite of targets (ex 8510, 8511, 8893, 10267) + // then it should be marked negative if has same target as negative effect (ex 8510, 8511, 8893, 10267) case AuraType.Dummy: case AuraType.ModStun: case AuraType.ModFear: