Gisela
Bug Hunter
[COMPLETE] Prisoners Should Give Double Compassion
Type: OSI inconsistency
Basic Description: Prisoner rescues should give double compassion points. Currently they give the same as normal escortables.
Way to experience: Save a prisoner and escort him to his destination. Use admin commands to check compassion point gains.
Detailed Description: As Basic, above
Links:
http://update.uo.com/design_412.html
http://uo.stratics.com/content/virtues/compassion.shtml
http://www.uoguide.com/Compassion
Code:
Tested:
- compiles
- does not crash the server
- works as intended
Comments:
I don't know whether this is the right way to do it.
I can't find the code for brigand camps, so they haven't been updated.
Type: OSI inconsistency
Basic Description: Prisoner rescues should give double compassion points. Currently they give the same as normal escortables.
Way to experience: Save a prisoner and escort him to his destination. Use admin commands to check compassion point gains.
Detailed Description: As Basic, above
Links:
http://update.uo.com/design_412.html
http://uo.stratics.com/content/virtues/compassion.shtml
http://www.uoguide.com/Compassion
Code:
Code:
Index: Scripts/Engines/AI/Creature/BaseCreature.cs
===================================================================
--- Scripts/Engines/AI/Creature/BaseCreature.cs (revision 319)
+++ Scripts/Engines/AI/Creature/BaseCreature.cs (working copy)
@@ -239,6 +239,8 @@
private bool m_Paragon;
+ private bool m_IsPrisoner;
+
#endregion
public virtual InhumanSpeech SpeechType{ get{ return null; } }
@@ -249,6 +251,13 @@
set{ m_IsStabled = value; }
}
+ [CommandProperty( AccessLevel.GameMaster )]
+ public bool IsPrisoner
+ {
+ get{ return m_IsPrisoner; }
+ set{ m_IsPrisoner = value; }
+ }
+
protected DateTime SummonEnd
{
get { return m_SummonEnd; }
Index: Scripts/Mobiles/Townfolk/BaseEscortable.cs
===================================================================
--- Scripts/Mobiles/Townfolk/BaseEscortable.cs (revision 319)
+++ Scripts/Mobiles/Townfolk/BaseEscortable.cs (working copy)
@@ -332,7 +332,7 @@
{
pm.SendLocalizedMessage( 1053004 ); // You must wait about a day before you can gain in compassion again.
}
- else if ( VirtueHelper.Award( pm, VirtueName.Compassion, 200, ref gainedPath ) )
+ else if ( VirtueHelper.Award( pm, VirtueName.Compassion, this.IsPrisoner ? 400 : 200, ref gainedPath ) )
{
if ( gainedPath )
pm.SendLocalizedMessage( 1053005 ); // You have achieved a path in compassion!
Index: Scripts/Multis/Camps/OrcCamp.cs
===================================================================
--- Scripts/Multis/Camps/OrcCamp.cs (revision 319)
+++ Scripts/Multis/Camps/OrcCamp.cs (working copy)
@@ -17,6 +17,8 @@
public override void AddComponents()
{
+ BaseCreature bc;
+
IronGate gate = new IronGate( DoorFacing.EastCCW );
m_Gate = gate;
@@ -46,6 +48,8 @@
case 1: m_Prisoner = new SeekerOfAdventure(); break;
}
+ bc = (BaseCreature)m_Prisoner;
+ bc.IsPrisoner = true;
m_Prisoner.YellHue = Utility.RandomList( 0x57, 0x67, 0x77, 0x87, 0x117 );
AddMobile( m_Prisoner, 2, -2, 0, 0 );
Index: Scripts/Multis/Camps/RatCamp.cs
===================================================================
--- Scripts/Multis/Camps/RatCamp.cs (revision 319)
+++ Scripts/Multis/Camps/RatCamp.cs (working copy)
@@ -17,6 +17,8 @@
public override void AddComponents()
{
+ BaseCreature bc;
+
IronGate gate = new IronGate( DoorFacing.EastCCW );
m_Gate = gate;
@@ -46,6 +48,8 @@
case 1: m_Prisoner = new SeekerOfAdventure(); break;
}
+ bc = (BaseCreature)m_Prisoner;
+ bc.IsPrisoner = true;
m_Prisoner.YellHue = Utility.RandomList( 0x57, 0x67, 0x77, 0x87, 0x117 );
AddMobile( m_Prisoner, 2, -2, 0, 0 );
- compiles
- does not crash the server
- works as intended
Comments:
I don't know whether this is the right way to do it.
I can't find the code for brigand camps, so they haven't been updated.