Sotho Tal Ker's BaseHat treasure fix (http://runuo.com/forums/showthread.php?t=76341).
Thanks to Carmina for submitting the patches.
This commit is contained in:
zippy 2006-11-14 02:43:42 +00:00
parent a2be513b24
commit f74af73c5a
4 changed files with 55 additions and 7 deletions

View file

@ -642,7 +642,23 @@ namespace Server.Items
DropItem( item );
}
else if ( item is BaseJewel )
else if( item is BaseHat )
{
BaseHat hat = (BaseHat)item;
if( Core.AOS )
{
int attributeCount;
int min, max;
GetRandomAOSStats( out attributeCount, out min, out max );
BaseRunicTool.ApplyAttributesTo( hat, attributeCount, min, max );
}
DropItem( item );
}
else if( item is BaseJewel )
{
int attributeCount;
int min, max;
@ -785,4 +801,4 @@ namespace Server.Items
int version = reader.ReadEncodedInt();
}
}
}
}

View file

@ -153,7 +153,23 @@ namespace Server.Items
DropItem( item );
}
else if ( item is BaseJewel )
else if( item is BaseHat )
{
BaseHat hat = (BaseHat)item;
if( Core.AOS )
{
int attributeCount;
int min, max;
GetRandomAOSStats( out attributeCount, out min, out max );
BaseRunicTool.ApplyAttributesTo( hat, attributeCount, min, max );
}
DropItem( item );
}
else if( item is BaseJewel )
{
int attributeCount;
int min, max;
@ -204,4 +220,4 @@ namespace Server.Items
m_Name = Utility.Intern( reader.ReadString() );
}
}
}
}

View file

@ -190,7 +190,23 @@ namespace Server.Items
cont.DropItem( item );
}
else if ( item is BaseJewel )
else if( item is BaseHat )
{
BaseHat hat = (BaseHat)item;
if( Core.AOS )
{
int attributeCount;
int min, max;
GetRandomAOSStats( out attributeCount, out min, out max );
BaseRunicTool.ApplyAttributesTo( hat, attributeCount, min, max );
}
cont.DropItem( item );
}
else if( item is BaseJewel )
{
int attributeCount;
int min, max;
@ -505,4 +521,4 @@ namespace Server.Items
}
}
}
}
}

View file

@ -104,7 +104,7 @@ namespace Server.Mobiles
private void DoCounter( Mobile attacker )
{
if ( this.Map == null && attacker is BaseCreature && ((BaseCreature)attacker).BardProvoked )
if ( this.Map == null || ( attacker is BaseCreature && ((BaseCreature)attacker).BardProvoked ) )
return;
if ( 0.2 > Utility.RandomDouble() )