From fe2fa70c74b1806df237f92be633a1552e8b9548 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 10 Nov 2012 16:42:52 -0800 Subject: One more module converted: Combat/CombatModule. --- .../CoreModules/Avatar/Combat/CombatModule.cs | 29 +++++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar/Combat') diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 3a91465..c1a22bf 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs @@ -33,9 +33,12 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenMetaverse; +using Mono.Addins; + namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule { - public class CombatModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class CombatModule : ISharedRegionModule { //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -54,7 +57,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule /// /// /// - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) + { + } + + public void AddRegion(Scene scene) { lock (m_scenel) { @@ -72,6 +79,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; } + public void RemoveRegion(Scene scene) + { + if (m_scenel.ContainsKey(scene.RegionInfo.RegionHandle)) + m_scenel.Remove(scene.RegionInfo.RegionHandle); + + scene.EventManager.OnAvatarKilled -= KillAvatar; + scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel; + } + + public void RegionLoaded(Scene scene) + { + } + public void PostInitialise() { } @@ -85,11 +105,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule get { return "CombatModule"; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return true; } + get { return null; } } + private void KillAvatar(uint killerObjectLocalID, ScenePresence deadAvatar) { string deadAvatarMessage; -- cgit v1.1 From 86903f23dd9c0e671fcc9854c031bcc0c6d6cc7f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 12 Nov 2012 18:08:02 -0800 Subject: Cleanup on region modules: gave short node id's to all of them. --- OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules/Avatar/Combat') diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index c1a22bf..343cdb5 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs @@ -37,7 +37,7 @@ using Mono.Addins; namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CombatModule")] public class CombatModule : ISharedRegionModule { //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); -- cgit v1.1