diff options
author | Revolution | 2010-01-22 18:09:33 -0600 |
---|---|---|
committer | Melanie | 2010-01-23 15:18:52 +0000 |
commit | ec3c31e61e5e540f822891110df9bc978655bbaf (patch) | |
tree | b0b34a239eab48e163a3ca064edcd7567948423c /OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | |
parent | add a target position to agent updates to ScenePresence to support alternativ... (diff) | |
download | opensim-SC-ec3c31e61e5e540f822891110df9bc978655bbaf.zip opensim-SC-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.gz opensim-SC-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.bz2 opensim-SC-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.xz |
Updates all IRegionModules to the new style region modules.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 61b6d65..b7d12aa 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using Mono.Addins; | ||
30 | using Nini.Config; | 31 | using Nini.Config; |
31 | using OpenSim.Region.Framework.Interfaces; | 32 | using OpenSim.Region.Framework.Interfaces; |
32 | using OpenSim.Region.Framework.Scenes; | 33 | using OpenSim.Region.Framework.Scenes; |
@@ -34,7 +35,8 @@ using OpenMetaverse; | |||
34 | 35 | ||
35 | namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | 36 | namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule |
36 | { | 37 | { |
37 | public class CombatModule : IRegionModule | 38 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
39 | public class CombatModule : ISharedRegionModule | ||
38 | { | 40 | { |
39 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 41 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
40 | 42 | ||
@@ -53,7 +55,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
53 | /// </summary> | 55 | /// </summary> |
54 | /// <param name="scene"></param> | 56 | /// <param name="scene"></param> |
55 | /// <param name="config"></param> | 57 | /// <param name="config"></param> |
56 | public void Initialise(Scene scene, IConfigSource config) | 58 | public void Initialise(IConfigSource config) |
59 | { | ||
60 | |||
61 | } | ||
62 | |||
63 | public Type ReplaceableInterface | ||
64 | { | ||
65 | get { return null; } | ||
66 | } | ||
67 | |||
68 | public void AddRegion(Scene scene) | ||
57 | { | 69 | { |
58 | lock (m_scenel) | 70 | lock (m_scenel) |
59 | { | 71 | { |
@@ -71,6 +83,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
71 | scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; | 83 | scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; |
72 | } | 84 | } |
73 | 85 | ||
86 | public void RegionLoaded(Scene scene) | ||
87 | { | ||
88 | } | ||
89 | |||
90 | public void RemoveRegion(Scene scene) | ||
91 | { | ||
92 | scene.EventManager.OnAvatarKilled -= KillAvatar; | ||
93 | scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel; | ||
94 | m_scenel.Remove(scene.RegionInfo.RegionHandle); | ||
95 | } | ||
96 | |||
74 | public void PostInitialise() | 97 | public void PostInitialise() |
75 | { | 98 | { |
76 | } | 99 | } |
@@ -84,11 +107,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
84 | get { return "CombatModule"; } | 107 | get { return "CombatModule"; } |
85 | } | 108 | } |
86 | 109 | ||
87 | public bool IsSharedModule | ||
88 | { | ||
89 | get { return true; } | ||
90 | } | ||
91 | |||
92 | private void KillAvatar(uint killerObjectLocalID, ScenePresence DeadAvatar) | 110 | private void KillAvatar(uint killerObjectLocalID, ScenePresence DeadAvatar) |
93 | { | 111 | { |
94 | if (killerObjectLocalID == 0) | 112 | if (killerObjectLocalID == 0) |