if (LastKiller != null && LastKiller.Player && (Body.IsHuman || Karma < 2000))
{
var gainedPath = false;
var pointsToGain = Fame >= 10000 ? (Fame - 10000) / 500 + 1 : 1;
pointsToGain = pointsToGain > 20 ? 20 : pointsToGain;
if (VirtueHelper.Award(LastKiller, VirtueName.Justice, pointsToGain, ref gainedPath))
{
LastKiller.SendLocalizedMessage(gainedPath ? 1049367 : 1049363);
LastKiller.FixedParticles(0x375A, 9, 20, 5027, EffectLayer.Waist);
LastKiller.PlaySound(0x1F7);
}
}
using System;
using Server;
using Server.Gumps;
using Server.Network;
using Server.Mobiles;
using Server.Regions;
using Server.Targeting;
using Server.Services.Virtues;
namespace Server.Items
{
public class HonorDeed : Item
{
[Constructable]
public HonorDeed() : this( null )
{
}
[Constructable]
public HonorDeed ( string name ) : base ( 0x14F0 )
{
Name = "+100 Honor deed";
Hue = 1691;
}
public HonorDeed ( Serial serial ) : base ( serial )
{
}
public override void OnDoubleClick( Mobile from )
{
var gainedPath = false;
if ( !IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage(1042001);
}
else
{
VirtueHelper.Award(from, VirtueName.Honor, 100, ref gainedPath);
this.Delete();
}
}
public override void GetProperties( ObjectPropertyList list )
{
base.GetProperties( list );
list.Add( "<BASEFONT COLOR=#FF6DF4>[Double click to raise up Honor virtue.]<BASEFONT COLOR=#FFFFFF>");
}
public override void Serialize ( GenericWriter writer)
{
base.Serialize ( writer );
writer.Write ( (int) 0);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize ( reader );
int version = reader.ReadInt();
}
}
}
public override void OnKilledBy( Mobile from )
{
base.OnKilledBy(from);
var gainedPath = false;
if (from is BaseCreature && ((BaseCreature)creature).GetMaster() is PlayerMobile)
{
from = ((BaseCreature)creature).GetMaster();
}
if (from is PlayerMobile)
{
VirtueHelper.Award(from, VirtueName.Honor, 100, ref gainedPath);
from.PublicOverheadMessage(MessageType.Emote ,1153, true, "Honor +100!!!");
}
}
using Server.Services.Virtues;
We use essential cookies to make this site work, and optional cookies to enhance your experience.