diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index d36d770152..5205576246 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -953,13 +953,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments return; } - // Saving attachments for NPCs messes them up for the real owner! - INPCModule module = m_scene.RequestModuleInterface(); - if (module != null) - { - if (module.IsNPC(sp.UUID, m_scene)) - return; - } + if(sp.IsNPC) + return; if (grp.HasGroupChanged) { diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 4e1958a9c4..10bc6aa188 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs @@ -77,7 +77,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule } scene.EventManager.OnAvatarKilled += KillAvatar; - scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; } public void RemoveRegion(Scene scene) @@ -86,7 +85,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule m_scenel.Remove(scene.RegionInfo.RegionHandle); scene.EventManager.OnAvatarKilled -= KillAvatar; - scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel; } public void RegionLoaded(Scene scene) @@ -177,31 +175,5 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule deadAvatar.setHealthWithUpdate(100.0f); deadAvatar.Scene.TeleportClientHome(deadAvatar.UUID, deadAvatar.ControllingClient); } - - private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) - { - try - { - ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); - if (obj == null) - return; - if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0 - || avatar.Scene.RegionInfo.RegionSettings.AllowDamage) - { - avatar.Invulnerable = false; - } - else - { - avatar.Invulnerable = true; - if (avatar.Health < 100.0f) - { - avatar.setHealthWithUpdate(100.0f); - } - } - } - catch (Exception) - { - } - } } }