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')
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