diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 4f80dea..9c77b59 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -213,6 +213,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
213 | 213 | ||
214 | public bool Say(UUID agentID, Scene scene, string text) | 214 | public bool Say(UUID agentID, Scene scene, string text) |
215 | { | 215 | { |
216 | return Say(agentID, scene, text, 0); | ||
217 | } | ||
218 | |||
219 | public bool Say(UUID agentID, Scene scene, string text, int channel) | ||
220 | { | ||
216 | lock (m_avatars) | 221 | lock (m_avatars) |
217 | { | 222 | { |
218 | if (m_avatars.ContainsKey(agentID)) | 223 | if (m_avatars.ContainsKey(agentID)) |
@@ -220,7 +225,25 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
220 | ScenePresence sp; | 225 | ScenePresence sp; |
221 | scene.TryGetScenePresence(agentID, out sp); | 226 | scene.TryGetScenePresence(agentID, out sp); |
222 | 227 | ||
223 | m_avatars[agentID].Say(text); | 228 | m_avatars[agentID].Say(channel, text); |
229 | |||
230 | return true; | ||
231 | } | ||
232 | } | ||
233 | |||
234 | return false; | ||
235 | } | ||
236 | |||
237 | public bool Shout(UUID agentID, Scene scene, string text, int channel) | ||
238 | { | ||
239 | lock (m_avatars) | ||
240 | { | ||
241 | if (m_avatars.ContainsKey(agentID)) | ||
242 | { | ||
243 | ScenePresence sp; | ||
244 | scene.TryGetScenePresence(agentID, out sp); | ||
245 | |||
246 | m_avatars[agentID].Shout(channel, text); | ||
224 | 247 | ||
225 | return true; | 248 | return true; |
226 | } | 249 | } |
@@ -247,6 +270,24 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
247 | return false; | 270 | return false; |
248 | } | 271 | } |
249 | 272 | ||
273 | public bool Whisper(UUID agentID, Scene scene, string text, int channel) | ||
274 | { | ||
275 | lock (m_avatars) | ||
276 | { | ||
277 | if (m_avatars.ContainsKey(agentID)) | ||
278 | { | ||
279 | ScenePresence sp; | ||
280 | scene.TryGetScenePresence(agentID, out sp); | ||
281 | |||
282 | m_avatars[agentID].Whisper(channel, text); | ||
283 | |||
284 | return true; | ||
285 | } | ||
286 | } | ||
287 | |||
288 | return false; | ||
289 | } | ||
290 | |||
250 | public bool Stand(UUID agentID, Scene scene) | 291 | public bool Stand(UUID agentID, Scene scene) |
251 | { | 292 | { |
252 | lock (m_avatars) | 293 | lock (m_avatars) |