From 4bbc28e4459d1801ef1a8bc1864866bad30d5aaa Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 16 Oct 2008 20:50:28 +0000 Subject: Split the currency module into currency and a new Combat module, because the combat function really doesn't belong into currency --- .../Currency/SampleMoney/SampleMoneyModule.cs | 55 ---------------------- 1 file changed, 55 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/Avatar/Currency') diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs index 1f57fb5..4de6fa2 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs @@ -180,7 +180,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney scene.EventManager.OnClientClosed += ClientLoggedOut; scene.EventManager.OnValidateLandBuy += ValidateLandBuy; scene.EventManager.OnLandBuy += processLandBuy; - scene.EventManager.OnAvatarKilled += KillAvatar; } } @@ -1492,60 +1491,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney //m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString()); } - private void KillAvatar(uint killerObjectLocalID, ScenePresence DeadAvatar) - { - if (killerObjectLocalID == 0) - DeadAvatar.ControllingClient.SendAgentAlertMessage("You committed suicide!", true); - else - { - bool foundResult = false; - string resultstring = ""; - List allav = DeadAvatar.Scene.GetScenePresences(); - try - { - foreach (ScenePresence av in allav) - { - if (av.LocalId == killerObjectLocalID) - { - av.ControllingClient.SendAlertMessage("You fragged " + DeadAvatar.Firstname + " " + DeadAvatar.Lastname); - resultstring = av.Firstname + " " + av.Lastname; - foundResult = true; - } - } - } catch (System.InvalidOperationException) - { - - } - - if (!foundResult) - { - SceneObjectPart part = DeadAvatar.Scene.GetSceneObjectPart(killerObjectLocalID); - if (part != null) - { - ScenePresence av = DeadAvatar.Scene.GetScenePresence(part.OwnerID); - if (av != null) - { - av.ControllingClient.SendAlertMessage("You fragged " + DeadAvatar.Firstname + " " + DeadAvatar.Lastname); - resultstring = av.Firstname + " " + av.Lastname; - DeadAvatar.ControllingClient.SendAgentAlertMessage("You got killed by " + resultstring + "!", true); - } - else - { - string killer = DeadAvatar.Scene.CommsManager.UUIDNameRequestString(part.OwnerID); - DeadAvatar.ControllingClient.SendAgentAlertMessage("You impaled yourself on " + part.Name + " owned by " + killer +"!", true); - } - //DeadAvatar.Scene. part.ObjectOwner - } - else - { - DeadAvatar.ControllingClient.SendAgentAlertMessage("You died!", true); - } - } - } - DeadAvatar.Health = 100; - DeadAvatar.Scene.TeleportClientHome(DeadAvatar.UUID, DeadAvatar.ControllingClient); - } - public int GetBalance(IClientAPI client) { GetClientFunds(client); -- cgit v1.1