aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-10-16 20:50:28 +0000
committerMelanie Thielker2008-10-16 20:50:28 +0000
commit4bbc28e4459d1801ef1a8bc1864866bad30d5aaa (patch)
tree4217a66ab4f6dfda8f9ea3188496b1df8a9dcb8f /OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
parent* minor: get rid of pointless ipeSender (diff)
downloadopensim-SC-4bbc28e4459d1801ef1a8bc1864866bad30d5aaa.zip
opensim-SC-4bbc28e4459d1801ef1a8bc1864866bad30d5aaa.tar.gz
opensim-SC-4bbc28e4459d1801ef1a8bc1864866bad30d5aaa.tar.bz2
opensim-SC-4bbc28e4459d1801ef1a8bc1864866bad30d5aaa.tar.xz
Split the currency module into currency and a new Combat module, because
the combat function really doesn't belong into currency
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs55
1 files changed, 0 insertions, 55 deletions
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
180 scene.EventManager.OnClientClosed += ClientLoggedOut; 180 scene.EventManager.OnClientClosed += ClientLoggedOut;
181 scene.EventManager.OnValidateLandBuy += ValidateLandBuy; 181 scene.EventManager.OnValidateLandBuy += ValidateLandBuy;
182 scene.EventManager.OnLandBuy += processLandBuy; 182 scene.EventManager.OnLandBuy += processLandBuy;
183 scene.EventManager.OnAvatarKilled += KillAvatar;
184 } 183 }
185 } 184 }
186 185
@@ -1492,60 +1491,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1492 //m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString()); 1491 //m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString());
1493 } 1492 }
1494 1493
1495 private void KillAvatar(uint killerObjectLocalID, ScenePresence DeadAvatar)
1496 {
1497 if (killerObjectLocalID == 0)
1498 DeadAvatar.ControllingClient.SendAgentAlertMessage("You committed suicide!", true);
1499 else
1500 {
1501 bool foundResult = false;
1502 string resultstring = "";
1503 List<ScenePresence> allav = DeadAvatar.Scene.GetScenePresences();
1504 try
1505 {
1506 foreach (ScenePresence av in allav)
1507 {
1508 if (av.LocalId == killerObjectLocalID)
1509 {
1510 av.ControllingClient.SendAlertMessage("You fragged " + DeadAvatar.Firstname + " " + DeadAvatar.Lastname);
1511 resultstring = av.Firstname + " " + av.Lastname;
1512 foundResult = true;
1513 }
1514 }
1515 } catch (System.InvalidOperationException)
1516 {
1517
1518 }
1519
1520 if (!foundResult)
1521 {
1522 SceneObjectPart part = DeadAvatar.Scene.GetSceneObjectPart(killerObjectLocalID);
1523 if (part != null)
1524 {
1525 ScenePresence av = DeadAvatar.Scene.GetScenePresence(part.OwnerID);
1526 if (av != null)
1527 {
1528 av.ControllingClient.SendAlertMessage("You fragged " + DeadAvatar.Firstname + " " + DeadAvatar.Lastname);
1529 resultstring = av.Firstname + " " + av.Lastname;
1530 DeadAvatar.ControllingClient.SendAgentAlertMessage("You got killed by " + resultstring + "!", true);
1531 }
1532 else
1533 {
1534 string killer = DeadAvatar.Scene.CommsManager.UUIDNameRequestString(part.OwnerID);
1535 DeadAvatar.ControllingClient.SendAgentAlertMessage("You impaled yourself on " + part.Name + " owned by " + killer +"!", true);
1536 }
1537 //DeadAvatar.Scene. part.ObjectOwner
1538 }
1539 else
1540 {
1541 DeadAvatar.ControllingClient.SendAgentAlertMessage("You died!", true);
1542 }
1543 }
1544 }
1545 DeadAvatar.Health = 100;
1546 DeadAvatar.Scene.TeleportClientHome(DeadAvatar.UUID, DeadAvatar.ControllingClient);
1547 }
1548
1549 public int GetBalance(IClientAPI client) 1494 public int GetBalance(IClientAPI client)
1550 { 1495 {
1551 GetClientFunds(client); 1496 GetClientFunds(client);