massive branch sync

This commit is contained in:
mark 2010-04-25 06:09:43 +00:00
parent 489bbabe93
commit b3e8ec0a08
192 changed files with 1249 additions and 1124 deletions

View file

@ -36,6 +36,8 @@ namespace Server.Misc
string pathReg = GetExePath( "Ultima Online" );
string pathTD = GetExePath( "Ultima Online Third Dawn" ); //These refer to 2D & 3D, not the Third Dawn expansion
string newPath = GetExePath("Ultima Online", "KR Legacy Beta"); //After KR, This is the new registry key for the 2D client
if ( CustomPath != null )
Core.DataDirectories.Add( CustomPath );
@ -43,7 +45,10 @@ namespace Server.Misc
Core.DataDirectories.Add( pathReg );
if ( pathTD != null )
Core.DataDirectories.Add( pathTD );
Core.DataDirectories.Add( pathTD );
if ( newPath != null )
Core.DataDirectories.Add( newPath );
if ( Core.DataDirectories.Count == 0 && !Core.Service )
{
@ -54,18 +59,23 @@ namespace Server.Misc
}
}
private static string GetExePath( string subName )
private static string GetExePath( string subName )
{
return GetExePath( subName, "1.0" );
}
private static string GetExePath( string subName, string version )
{
try
{
String keyString;
if( Core.Is64Bit )
keyString = @"SOFTWARE\Wow6432Node\Origin Worlds Online\{0}\1.0";
keyString = @"SOFTWARE\Wow6432Node\Origin Worlds Online\{0}\{1}";
else
keyString = @"SOFTWARE\Origin Worlds Online\{0}\1.0";
keyString = @"SOFTWARE\Origin Worlds Online\{0}\{1}";
using( RegistryKey key = Registry.LocalMachine.OpenSubKey( String.Format( keyString, subName ) ) )
using( RegistryKey key = Registry.LocalMachine.OpenSubKey( String.Format( keyString, subName, version ) ) )
{
if( key == null )
return null;

View file

@ -603,9 +603,10 @@ namespace Server.Guilds
{
Guild g = null;
int id = Utility.GetInt32( arg, -1 );
if( id != -1 )
g = Guild.Find( id ) as Guild;
int id;
if( int.TryParse( arg, out id ) )
g = Guild.Find( id ) as Guild;
if( g == null )
{
@ -615,11 +616,13 @@ namespace Server.Guilds
g = Guild.FindByName( arg ) as Guild;
}
if( g != null )
if ( g != null )
{
from.SendGump( new PropertiesGump( from, g ) );
if( NewGuildSystem && from.AccessLevel >= AccessLevel.GameMaster && from is PlayerMobile )
from.SendGump( new GuildInfoGump( (PlayerMobile)from, g ) );
if ( NewGuildSystem && from.AccessLevel >= AccessLevel.GameMaster && from is PlayerMobile )
from.SendGump( new GuildInfoGump( (PlayerMobile)from, g ) );
}
}
}
@ -1607,7 +1610,6 @@ namespace Server.Guilds
public void CalculateGuildmaster()
{
//Hashtable votes = new Hashtable();
Dictionary<Mobile, int> votes = new Dictionary<Mobile, int>();
int votingMembers = 0;
@ -1621,7 +1623,6 @@ namespace Server.Guilds
Mobile m = memb.GuildFealty;
//if ( m == null || m.Deleted || m.Guild != this )
if( !CanBeVotedFor( m ) )
{
if ( m_Leader != null && !m_Leader.Deleted && m_Leader.Guild == this )
@ -1639,13 +1640,6 @@ namespace Server.Guilds
votes[m] = 1;
else
votes[m] = v + 1;
/*
if ( votes[m] == null )
votes[m] = (int)1;
else
votes[m] = (int)(votes[m]) + 1;
* */
votingMembers++;
}

View file

@ -20,6 +20,7 @@ namespace Server
private string m_VCDescription;
private string m_Language;
private string m_Unknown;
private DateTime m_TimeReceived;
[CommandProperty( AccessLevel.GameMaster )]
public int CpuModel{ get{ return m_CpuModel; } }
@ -96,6 +97,9 @@ namespace Server
[CommandProperty( AccessLevel.GameMaster )]
public string Unknown{ get{ return m_Unknown; } }
[CommandProperty( AccessLevel.GameMaster )]
public DateTime TimeReceived { get { return m_TimeReceived; } }
public static void Initialize()
{
PacketHandlers.Register( 0xD9, 0x10C, false, new OnPacketReceive( OnReceive ) );
@ -174,6 +178,8 @@ namespace Server
info.m_Language = pvSrc.ReadUnicodeStringLESafe( 4 );
info.m_Unknown = pvSrc.ReadStringSafe( 64 );
info.m_TimeReceived = DateTime.Now;
Account acct = state.Account as Account;
if ( acct != null )

View file

@ -295,7 +295,7 @@ namespace Server.Misc
return Notoriety.Enemy;
}
if ( target.Kills >= 5 || ( target.Body.IsMonster && IsSummoned( target as BaseCreature ) && !( target is BaseFamiliar ) && !( target is ArcaneFey ) && !( target is Golem ) ) || ( target is BaseCreature && ( ( (BaseCreature)target ).AlwaysMurderer || ( (BaseCreature)target ).IsAnimatedDead ) ) )
if ( target.Kills >= 5 || ( target.Body.IsMonster && IsSummoned( target as BaseCreature ) && !( target is BaseFamiliar ) && !( target is ArcaneFey ) && !( target is Golem ) ) || ( target is BaseCreature && ( ( (BaseCreature)target ).AlwaysMurderer || ( (BaseCreature)target ).IsAnimatedDead ) ) )
return Notoriety.Murderer;
if( target.Criminal )
@ -327,7 +327,7 @@ namespace Server.Misc
if( CheckHouseFlag( source, target, target.Location, target.Map ) )
return Notoriety.CanBeAttacked;
if( !(target is BaseCreature && ((BaseCreature)target).InitialInnocent) )
if( !(target is BaseCreature && ((BaseCreature)target).InitialInnocent) ) //If Target is NOT A baseCreature, OR it's a BC and the BC is initial innocent...
{
if( !target.Body.IsHuman && !target.Body.IsGhost && !IsPet( target as BaseCreature ) && !(target is PlayerMobile) || !Core.ML && !target.CanBeginAction( typeof( Server.Spells.Seventh.PolymorphSpell ) ) )
return Notoriety.CanBeAttacked;

View file

@ -1,6 +1,7 @@
using System;
using Server;
using Server.Mobiles;
using Server.Factions;
namespace Server.Misc
{
@ -179,6 +180,9 @@ namespace Server.Misc
private static bool AllowGain( Mobile from, Skill skill, object obj )
{
if ( Core.AOS && Faction.InSkillLoss( from ) ) //Changed some time between the introduction of AoS and SE.
return false;
if ( AntiMacroCode && from is PlayerMobile && UseAntiMacro[skill.Info.SkillID] )
return ((PlayerMobile)from).AntiMacroCheck( skill, obj );
else

View file

@ -127,7 +127,7 @@ namespace Server.Misc
}
}
public static string[] HarrowerTitles = new string[] { "Spite", "Opponent", "Hunter", "Venom", "Executioner", "Annihilator", "Champion" };
public static string[] HarrowerTitles = new string[] { "Spite", "Opponent", "Hunter", "Venom", "Executioner", "Annihilator", "Champion", "Assailant", "Purifier", "Nullifier" };
public static string ComputeTitle( Mobile beholder, Mobile beheld )
{

View file

@ -51,6 +51,7 @@ namespace Server
}
catch
{
Console.WriteLine( "Warning: Error in Line '{0}' of Data/treasure.cfg", line );
}
}
}