public override bool OnGoldGiven( Mobile from, Gold dropped )
{
if ( from is PlayerMobile && dropped.Amount == JoinCost )
{
PlayerMobile pm = (PlayerMobile)from;
if ( pm.NpcGuild == this.NpcGuild )
{
SayTo( from, 501047 ); // Thou art already a member of our guild.
}
else if ( pm.NpcGuild != NpcGuild.None )
{
SayTo( from, 501046 ); // Thou must resign from thy other guild first.
}
else if ( pm.GameTime < JoinGameAge || (pm.CreationTime + JoinAge) > DateTime.Now )
{
SayTo( from, 501048 ); // You are too young to join my guild...
}
else if ( CheckCustomReqs( pm ) )
{
SayWelcomeTo( from );
pm.NpcGuild = this.NpcGuild;
pm.NpcGuildJoinTime = DateTime.Now;
pm.NpcGuildGameTime = pm.GameTime;
dropped.Delete();
return true;
}
return false;
}
return base.OnGoldGiven( from, dropped );
}