*Moved EstateManager into a region module

0.6.0-stable
mingchen 2008-05-03 17:11:21 +00:00
parent e8acb49fef
commit 4a87d96c17
4 changed files with 761 additions and 714 deletions

View File

@ -153,7 +153,6 @@ namespace OpenSim.Region.Environment.Scenes
get { return m_authenticateHandler; }
}
protected readonly EstateManager m_estateManager;
// an instance to the physics plugin's Scene object.
public PhysicsScene PhysicsScene
{
@ -167,11 +166,6 @@ namespace OpenSim.Region.Environment.Scenes
get { return m_innerScene.m_syncRoot; }
}
public EstateManager EstateManager
{
get { return m_estateManager; }
}
public float TimeDilation
{
get { return m_timedilation; }
@ -256,8 +250,6 @@ namespace OpenSim.Region.Environment.Scenes
EventManager.OnLandObjectRemoved +=
new EventManager.LandObjectRemoved(m_storageManager.DataStore.RemoveLandObject);
m_estateManager = new EstateManager(this, m_regInfo);
m_permissionManager = permissionManager;
m_permissionManager.Initialise(this);
@ -1514,8 +1506,6 @@ namespace OpenSim.Region.Environment.Scenes
{
m_log.Info("[REGION]: Add New Scene Presence");
m_estateManager.sendRegionHandshake(client);
CreateAndAddScenePresence(client, child);
LandChannel.sendParcelOverlay(client);
@ -1572,9 +1562,7 @@ namespace OpenSim.Region.Environment.Scenes
client.OnParcelAccessListUpdateRequest +=
new ParcelAccessListUpdateRequest(LandChannel.handleParcelAccessUpdateRequest);
client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage);
client.OnRegionInfoRequest += m_estateManager.HandleRegionInfoRequest;
client.OnEstateCovenantRequest += m_estateManager.HandleEstateCovenantRequest;
client.OnRequestGodlikePowers += handleRequestGodlikePowers;
client.OnGodKickUser += HandleGodlikeKickUser;
client.OnObjectPermissions += HandleObjectPermissionsUpdate;

View File

@ -151,6 +151,10 @@ namespace OpenSim.Region.Environment.Scenes
public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete;
public delegate void RequestChangeWaterHeight(float height);
public event RequestChangeWaterHeight OnRequestChangeWaterHeight;
public delegate void AvatarKillData(uint KillerLocalID, ScenePresence avatar);
public event AvatarKillData OnAvatarKilled;
@ -269,6 +273,8 @@ namespace OpenSim.Region.Environment.Scenes
private RegisterCapsEvent handlerRegisterCaps = null; // OnRegisterCaps;
private DeregisterCapsEvent handlerDeregisterCaps = null; // OnDeregisterCaps;
private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null;
private RequestChangeWaterHeight handlerRequestChangeWaterHeight = null; //OnRequestChangeWaterHeight
private LandBuy handlerLandBuy = null;
private LandBuy handlerValidateLandBuy = null;
private AvatarKillData handlerAvatarKill = null;
@ -579,6 +585,15 @@ namespace OpenSim.Region.Environment.Scenes
handlerScriptNotAtTargetEvent(localID);
}
}
public void TriggerRequestChangeWaterHeight(float height)
{
handlerRequestChangeWaterHeight = OnRequestChangeWaterHeight;
if (handlerRequestChangeWaterHeight != null)
{
handlerRequestChangeWaterHeight(height);
}
}
public void TriggerAvatarKill(uint KillerObjectLocalID, ScenePresence DeadAvatar)
{
handlerAvatarKill = OnAvatarKilled;

View File

@ -183,8 +183,7 @@ namespace OpenSim.Region.ScriptEngine.Common
//World.PermissionsMngr.GenericEstatePermission(
if (World.PermissionsMngr.GenericEstatePermission(m_host.OwnerID))
{
World.EstateManager.setRegionSettings((float)height, 0f, 0f, false, 0.5f);
World.EstateManager.sendRegionInfoPacketToAll();
World.EventManager.TriggerRequestChangeWaterHeight((float)height);
}
}