diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 25322a1..a5fcb49 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | |||
@@ -115,10 +115,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
115 | // Try to find the avatar wielding the killing object | 115 | // Try to find the avatar wielding the killing object |
116 | killingAvatar = deadAvatar.Scene.GetScenePresence(part.OwnerID); | 116 | killingAvatar = deadAvatar.Scene.GetScenePresence(part.OwnerID); |
117 | if (killingAvatar == null) | 117 | if (killingAvatar == null) |
118 | deadAvatarMessage = String.Format("You impaled yourself on {0} owned by {1}!", part.Name, deadAvatar.Scene.GetUserName(part.OwnerID)); | 118 | { |
119 | IUserManagement userManager = deadAvatar.Scene.RequestModuleInterface<IUserManagement>(); | ||
120 | string userName = "Unkown User"; | ||
121 | if (userManager != null) | ||
122 | userName = userManager.GetUserName(part.OwnerID); | ||
123 | deadAvatarMessage = String.Format("You impaled yourself on {0} owned by {1}!", part.Name, userName); | ||
124 | } | ||
119 | else | 125 | else |
120 | { | 126 | { |
121 | // killingAvatarMessage = String.Format("You fragged {0}!", deadAvatar.Name); | 127 | // killingAvatarMessage = String.Format("You fragged {0}!", deadAvatar.Name); |
122 | deadAvatarMessage = String.Format("You got killed by {0}!", killingAvatar.Name); | 128 | deadAvatarMessage = String.Format("You got killed by {0}!", killingAvatar.Name); |
123 | } | 129 | } |
124 | } | 130 | } |