diff options
author | Dan Lake | 2012-02-17 13:43:14 -0800 |
---|---|---|
committer | Dan Lake | 2012-02-17 13:45:45 -0800 |
commit | 784263f5e334aeda15effee599efc8bf546aa010 (patch) | |
tree | f8a42eeb59461af845479f88a50f36335b2dba56 /OpenSim/Region/Framework/Scenes/EventManager.cs | |
parent | Refactor appearance saving for NPC to use AvatarFactoryModule interface. (diff) | |
download | opensim-SC_OLD-784263f5e334aeda15effee599efc8bf546aa010.zip opensim-SC_OLD-784263f5e334aeda15effee599efc8bf546aa010.tar.gz opensim-SC_OLD-784263f5e334aeda15effee599efc8bf546aa010.tar.bz2 opensim-SC_OLD-784263f5e334aeda15effee599efc8bf546aa010.tar.xz |
Added the TriggerAvatarAppearanceChanged to EventManager. It's triggered by AvatarFactoryModule after an avatar's appearance has been succesfully changed and persisted (if the persist option is set).
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index d31d380..6586437 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -173,6 +173,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
173 | public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID); | 173 | public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID); |
174 | public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; | 174 | public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; |
175 | 175 | ||
176 | public delegate void AvatarAppearanceChange(ScenePresence avatar); | ||
177 | public event AvatarAppearanceChange OnAvatarAppearanceChange; | ||
178 | |||
176 | public event Action<ScenePresence> OnSignificantClientMovement; | 179 | public event Action<ScenePresence> OnSignificantClientMovement; |
177 | 180 | ||
178 | public delegate void IncomingInstantMessage(GridInstantMessage message); | 181 | public delegate void IncomingInstantMessage(GridInstantMessage message); |
@@ -1238,6 +1241,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
1238 | } | 1241 | } |
1239 | } | 1242 | } |
1240 | 1243 | ||
1244 | public void TriggerAvatarAppearanceChanged(ScenePresence avatar) | ||
1245 | { | ||
1246 | AvatarAppearanceChange handler = OnAvatarAppearanceChange; | ||
1247 | if (handler != null) | ||
1248 | { | ||
1249 | foreach (AvatarAppearanceChange d in handler.GetInvocationList()) | ||
1250 | { | ||
1251 | try | ||
1252 | { | ||
1253 | d(avatar); | ||
1254 | } | ||
1255 | catch (Exception e) | ||
1256 | { | ||
1257 | m_log.ErrorFormat( | ||
1258 | "[EVENT MANAGER]: Delegate for TriggerAvatarAppearanceChanged failed - continuing. {0} {1}", | ||
1259 | e.Message, e.StackTrace); | ||
1260 | } | ||
1261 | } | ||
1262 | } | ||
1263 | } | ||
1264 | |||
1241 | public void TriggerIncomingInstantMessage(GridInstantMessage message) | 1265 | public void TriggerIncomingInstantMessage(GridInstantMessage message) |
1242 | { | 1266 | { |
1243 | IncomingInstantMessage handlerIncomingInstantMessage = OnIncomingInstantMessage; | 1267 | IncomingInstantMessage handlerIncomingInstantMessage = OnIncomingInstantMessage; |