This commit is contained in:
parent
ab636feb59
commit
27a3e68588
9 changed files with 33 additions and 14 deletions
|
|
@ -150,11 +150,11 @@ namespace Server.Guilds
|
|||
{
|
||||
if( m_Member == pm.GuildFealty && guild.Leader != m_Member )
|
||||
pm.SendLocalizedMessage( 1063158 ); // You have cleared your vote for guild leader.
|
||||
else if( playerRank.GetFlag( RankFlags.CanVote ) )
|
||||
else if( guild.CanVote( m_Member ) )//( playerRank.GetFlag( RankFlags.CanVote ) )
|
||||
{
|
||||
if( m_Member == guild.Leader )
|
||||
pm.SendLocalizedMessage( 1063424 ); // You can't vote for the current guild leader.
|
||||
else if( guild.CanBeVotedFor( m_Member ) )
|
||||
else if( !guild.CanBeVotedFor( m_Member ) )
|
||||
pm.SendLocalizedMessage( 1063425 ); // You can't vote for an inactive guild member.
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ namespace Server.Items
|
|||
public override int ArmorBase{ get{ return 40; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
public override Race RequiredRace { get { return Race.Elf; } }
|
||||
|
||||
[Constructable]
|
||||
public WoodlandArms() : base( 0x2B6C )
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ namespace Server.Items
|
|||
public override int ArmorBase{ get{ return 40; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
public override Race RequiredRace { get { return Race.Elf; } }
|
||||
|
||||
[Constructable]
|
||||
public WoodlandChest() : base( 0x2B67 )
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ namespace Server.Items
|
|||
public override int ArmorBase{ get{ return 40; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
public override Race RequiredRace { get { return Race.Elf; } }
|
||||
|
||||
[Constructable]
|
||||
public WoodlandGloves() : base( 0x2B6A )
|
||||
|
|
|
|||
|
|
@ -21,11 +21,11 @@ namespace Server.Items
|
|||
public override int ArmorBase{ get{ return 40; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
public override Race RequiredRace { get { return Race.Elf; } }
|
||||
|
||||
[Constructable]
|
||||
public WoodlandGorget() : base( 0x2B69 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public WoodlandGorget( Serial serial ) : base( serial )
|
||||
|
|
@ -36,7 +36,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
writer.WriteEncodedInt( 1 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
|
|
@ -44,6 +44,9 @@ namespace Server.Items
|
|||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
if( version == 0 )
|
||||
Weight = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -21,6 +21,7 @@ namespace Server.Items
|
|||
public override int ArmorBase{ get{ return 40; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
public override Race RequiredRace { get { return Race.Elf; } }
|
||||
|
||||
[Constructable]
|
||||
public WoodlandLegs() : base( 0x2B6B )
|
||||
|
|
|
|||
|
|
@ -101,6 +101,8 @@ namespace Server.Items
|
|||
[FlipableAttribute( 0x2B68, 0x315F )]
|
||||
public class WoodlandBelt : BaseWaist
|
||||
{
|
||||
public override Race RequiredRace { get { return Race.Elf; } }
|
||||
|
||||
[Constructable]
|
||||
public WoodlandBelt() : this( 0 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1467,7 +1467,7 @@ namespace Server.Guilds
|
|||
return false;
|
||||
}
|
||||
|
||||
return ( m == null || m.Deleted || m.Guild != this );
|
||||
return ( m != null && !m.Deleted && m.Guild == this );
|
||||
}
|
||||
public bool CanBeVotedFor( Mobile m )
|
||||
{
|
||||
|
|
@ -1478,12 +1478,13 @@ namespace Server.Guilds
|
|||
return false;
|
||||
}
|
||||
|
||||
return ( m == null || m.Deleted || m.Guild != this );
|
||||
return ( m != null && !m.Deleted && m.Guild == this );
|
||||
}
|
||||
|
||||
public void CalculateGuildmaster()
|
||||
{
|
||||
Hashtable votes = new Hashtable();
|
||||
//Hashtable votes = new Hashtable();
|
||||
Dictionary<Mobile, int> votes = new Dictionary<Mobile, int>();
|
||||
|
||||
int votingMembers = 0;
|
||||
|
||||
|
|
@ -1508,10 +1509,19 @@ namespace Server.Guilds
|
|||
if ( m == null )
|
||||
continue;
|
||||
|
||||
int v;
|
||||
|
||||
if( !votes.TryGetValue( m, out v ) )
|
||||
votes[m] = 1;
|
||||
else
|
||||
votes[m] = v + 1;
|
||||
|
||||
/*
|
||||
if ( votes[m] == null )
|
||||
votes[m] = (int)1;
|
||||
else
|
||||
votes[m] = (int)(votes[m]) + 1;
|
||||
* */
|
||||
|
||||
votingMembers++;
|
||||
}
|
||||
|
|
@ -1519,10 +1529,10 @@ namespace Server.Guilds
|
|||
Mobile winner = null;
|
||||
int highVotes = 0;
|
||||
|
||||
foreach ( DictionaryEntry de in votes )
|
||||
foreach ( KeyValuePair<Mobile, int> kvp in votes )
|
||||
{
|
||||
Mobile m = (Mobile)de.Key;
|
||||
int val = (int)de.Value;
|
||||
Mobile m = (Mobile)kvp.Key;
|
||||
int val = (int)kvp.Value;
|
||||
|
||||
if ( winner == null || val > highVotes )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ namespace Server.Mobiles
|
|||
Add( new GenericBuyInfo( typeof( RawFishSteak ), 3, 20, 0x97A, 0 ) );
|
||||
//TODO: Add( new GenericBuyInfo( typeof( SmallFish ), 3, 20, 0xDD6, 0 ) );
|
||||
//TODO: Add( new GenericBuyInfo( typeof( SmallFish ), 3, 20, 0xDD7, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Fish ), 3, 80, 0x9CC, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Fish ), 3, 80, 0x9CD, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Fish ), 3, 80, 0x9CE, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Fish ), 3, 80, 0x9CF, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Fish ), 6, 80, 0x9CC, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Fish ), 6, 80, 0x9CD, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Fish ), 6, 80, 0x9CE, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Fish ), 6, 80, 0x9CF, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( FishingPole ), 15, 20, 0xDC0, 0 ) );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue