aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs29
1 files changed, 25 insertions, 4 deletions
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;
33using OpenSim.Region.Framework.Scenes; 33using OpenSim.Region.Framework.Scenes;
34using OpenMetaverse; 34using OpenMetaverse;
35 35
36using Mono.Addins;
37
36namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule 38namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
37{ 39{
38 public class CombatModule : IRegionModule 40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
41 public class CombatModule : ISharedRegionModule
39 { 42 {
40 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 44
@@ -54,7 +57,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
54 /// </summary> 57 /// </summary>
55 /// <param name="scene"></param> 58 /// <param name="scene"></param>
56 /// <param name="config"></param> 59 /// <param name="config"></param>
57 public void Initialise(Scene scene, IConfigSource config) 60 public void Initialise(IConfigSource config)
61 {
62 }
63
64 public void AddRegion(Scene scene)
58 { 65 {
59 lock (m_scenel) 66 lock (m_scenel)
60 { 67 {
@@ -72,6 +79,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
72 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; 79 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
73 } 80 }
74 81
82 public void RemoveRegion(Scene scene)
83 {
84 if (m_scenel.ContainsKey(scene.RegionInfo.RegionHandle))
85 m_scenel.Remove(scene.RegionInfo.RegionHandle);
86
87 scene.EventManager.OnAvatarKilled -= KillAvatar;
88 scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel;
89 }
90
91 public void RegionLoaded(Scene scene)
92 {
93 }
94
75 public void PostInitialise() 95 public void PostInitialise()
76 { 96 {
77 } 97 }
@@ -85,11 +105,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
85 get { return "CombatModule"; } 105 get { return "CombatModule"; }
86 } 106 }
87 107
88 public bool IsSharedModule 108 public Type ReplaceableInterface
89 { 109 {
90 get { return true; } 110 get { return null; }
91 } 111 }
92 112
113
93 private void KillAvatar(uint killerObjectLocalID, ScenePresence deadAvatar) 114 private void KillAvatar(uint killerObjectLocalID, ScenePresence deadAvatar)
94 { 115 {
95 string deadAvatarMessage; 116 string deadAvatarMessage;