Cannot recall from any champ spawns, not just felucca.
http://www.uodemise.com/forum/showthread.php?t=155452 Party functions context menu bypasses various checks. http://www.uodemise.com/forum/showthread.php?t=150643 Insurance consumption notifications. http://www.uodemise.com/forum/showthread.php?t=152421
This commit is contained in:
parent
f660f8160b
commit
0988eec597
4 changed files with 75 additions and 8 deletions
|
|
@ -17,7 +17,23 @@ namespace Server.ContextMenus
|
|||
|
||||
public override void OnClick()
|
||||
{
|
||||
Party.Invite( m_From, m_Target );
|
||||
Party p = Party.Get( m_From );
|
||||
Party mp = Party.Get( m_Target );
|
||||
|
||||
if ( m_From == m_Target )
|
||||
m_From.SendLocalizedMessage( 1005439 ); // You cannot add yourself to a party.
|
||||
else if ( p != null && p.Leader != m_From )
|
||||
m_From.SendLocalizedMessage( 1005453 ); // You may only add members to the party if you are the leader.
|
||||
else if ( p != null && (p.Members.Count + p.Candidates.Count) >= Party.Capacity )
|
||||
m_From.SendLocalizedMessage( 1008095 ); // You may only have 10 in your party (this includes candidates).
|
||||
else if ( !m_Target.Player )
|
||||
m_From.SendLocalizedMessage( 1005444 ); // The creature ignores your offer.
|
||||
else if ( mp != null && mp == p )
|
||||
m_From.SendLocalizedMessage( 1005440 ); // This person is already in your party!
|
||||
else if ( mp != null )
|
||||
m_From.SendLocalizedMessage( 1005441 ); // This person is already in a party!
|
||||
else
|
||||
Party.Invite( m_From, m_Target );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
31
Scripts/Engines/Party/RemoveFromParty.cs
Normal file
31
Scripts/Engines/Party/RemoveFromParty.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.PartySystem;
|
||||
|
||||
namespace Server.ContextMenus
|
||||
{
|
||||
public class RemoveFromPartyEntry : ContextMenuEntry
|
||||
{
|
||||
private Mobile m_From;
|
||||
private Mobile m_Target;
|
||||
|
||||
public RemoveFromPartyEntry( Mobile from, Mobile target ) : base( 0198, 12 )
|
||||
{
|
||||
m_From = from;
|
||||
m_Target = target;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
Party p = Party.Get( m_From );
|
||||
|
||||
if ( p == null || p.Leader != m_From || !p.Contains( m_Target ) )
|
||||
return;
|
||||
|
||||
if ( m_From == m_Target )
|
||||
m_From.SendLocalizedMessage( 1005446 ); // You may only remove yourself from a party if you are not the leader.
|
||||
else
|
||||
p.Remove( m_Target );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -24,6 +24,7 @@ using Server.Accounting;
|
|||
using Server.Engines.CannedEvil;
|
||||
using Server.Engines.Craft;
|
||||
using Server.Spells.Spellweaving;
|
||||
using Server.Engines.PartySystem;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
|
|
@ -103,6 +104,7 @@ namespace Server.Mobiles
|
|||
private int m_Profession;
|
||||
private bool m_IsStealthing; // IsStealthing should be moved to Server.Mobiles
|
||||
private bool m_IgnoreMobiles; // IgnoreMobiles should be moved to Server.Mobiles
|
||||
private int m_NonAutoreinsuredItems; // number of items that could not be automaitically reinsured because gold in bank was not enough
|
||||
|
||||
/*
|
||||
* a value of zero means, that the mobile is not executing the spell. Otherwise,
|
||||
|
|
@ -1491,9 +1493,19 @@ namespace Server.Mobiles
|
|||
}
|
||||
if ( from != this )
|
||||
{
|
||||
|
||||
if ( Alive && Core.Expansion >= Expansion.AOS )
|
||||
list.Add( new AddToPartyEntry( from, this ) );
|
||||
{
|
||||
if ( from.Party == null && this.Party == null )
|
||||
list.Add( new AddToPartyEntry( from, this ) );
|
||||
|
||||
else if ( from.Party != null && ((Party)from.Party).Leader == from )
|
||||
{
|
||||
if ( this.Party == null )
|
||||
list.Add( new AddToPartyEntry( from, this ) );
|
||||
else if ( this.Party == from.Party )
|
||||
list.Add( new RemoveFromPartyEntry( from, this ) );
|
||||
}
|
||||
}
|
||||
|
||||
BaseHouse curhouse = BaseHouse.FindHouseAt( this );
|
||||
|
||||
|
|
@ -2059,6 +2071,7 @@ namespace Server.Mobiles
|
|||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
m_NonAutoreinsuredItems = 0;
|
||||
m_InsuranceCost = 0;
|
||||
m_InsuranceAward = base.FindMostRecentDamager( false );
|
||||
|
||||
|
|
@ -2098,12 +2111,14 @@ namespace Server.Mobiles
|
|||
{
|
||||
m_InsuranceCost += cost;
|
||||
item.PayedInsurance = true;
|
||||
}
|
||||
SendLocalizedMessage(1060398, cost.ToString()); // ~1_AMOUNT~ gold has been withdrawn from your bank box.
|
||||
}
|
||||
else
|
||||
{
|
||||
SendLocalizedMessage( 1061079, "", 0x23 ); // You lack the funds to purchase the insurance
|
||||
item.PayedInsurance = false;
|
||||
item.Insured = false;
|
||||
m_NonAutoreinsuredItems++;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -2155,7 +2170,12 @@ namespace Server.Mobiles
|
|||
|
||||
public override void OnDeath( Container c )
|
||||
{
|
||||
base.OnDeath( c );
|
||||
if (m_NonAutoreinsuredItems > 0)
|
||||
{
|
||||
SendMessage("You do not have the gold to automatically reinsure all your items.");
|
||||
}
|
||||
|
||||
base.OnDeath(c);
|
||||
|
||||
HueMod = -1;
|
||||
NameMod = null;
|
||||
|
|
@ -2474,7 +2494,7 @@ namespace Server.Mobiles
|
|||
/* Per EA's UO Herald Pub48 (ML):
|
||||
* ((resist spellsx10)/20 + 10=percentage of damage resisted)
|
||||
*/
|
||||
|
||||
|
||||
if ( oath == this )
|
||||
{
|
||||
amount = (int)(amount * 1.1);
|
||||
|
|
@ -3399,7 +3419,7 @@ namespace Server.Mobiles
|
|||
if ( context != null && context.Type == typeof( ReaperFormSpell ) )
|
||||
return Mobile.WalkFoot;
|
||||
|
||||
bool running = ( (dir & Direction.Running) != 0 );
|
||||
bool running = ( (dir & Direction.Running) != 0 );
|
||||
|
||||
bool onHorse = ( this.Mount != null );
|
||||
|
||||
|
|
|
|||
|
|
@ -553,7 +553,7 @@ namespace Server.Spells
|
|||
private static bool[,] m_Rules = new bool[,]
|
||||
{
|
||||
/*T2A(Fel) Ilshenar Wind(Tram), Wind(Fel), Dungeons(Fel), Solen(Tram), Solen(Fel), CrystalCave(Malas), Gauntlet(Malas), Gauntlet(Ferry), Stronghold, ChampionSpawn, Dungeons(Tokuno[Malas]), LampRoom(Doom), GuardianRoom(Doom) */
|
||||
/* Recall From */ { false, true, true, false, false, true, false, false, false, false, true, true, true, false, false },
|
||||
/* Recall From */ { false, true, true, false, false, true, false, false, false, false, true, false, true, false, false },
|
||||
/* Recall To */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
|
||||
/* Gate From */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
|
||||
/* Gate To */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue