One more module converted: Combat/CombatModule.

integration
Diva Canto 2012-11-10 16:42:52 -08:00
parent 74dd38db70
commit fe2fa70c74
1 changed files with 25 additions and 4 deletions

View File

@ -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
/// </summary>
/// <param name="scene"></param>
/// <param name="config"></param>
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;