- Opening a corpse while hidden is not anymore considered a revealing action. Also other tweaks about corpses and revealing
(http://www.uodemise.com/forum/showthread.php?t=142122) - Herding now works on creatures from champion spawns and on all of tameable creatures (http://www.uodemise.com/forum/showthread.php?t=121415) - I hate leading spaces too! (especially on Corpse.cs)
This commit is contained in:
parent
f2a557ac05
commit
3956b8c804
6 changed files with 224 additions and 158 deletions
|
|
@ -3,6 +3,7 @@ using Server.Network;
|
|||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.CannedEvil;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -71,7 +72,7 @@ namespace Server.Items
|
|||
{
|
||||
BaseCreature bc = (BaseCreature)targ;
|
||||
|
||||
if ( bc.Body.IsAnimal )
|
||||
if ( IsHerdable( bc ) )
|
||||
{
|
||||
if ( bc.Controlled )
|
||||
{
|
||||
|
|
@ -94,6 +95,44 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
private static Type[] m_ChampTamables = new Type[]
|
||||
{
|
||||
typeof( StrongMongbat ), typeof( Imp ), typeof( Scorpion ), typeof( GiantSpider ),
|
||||
typeof( Snake ), typeof( LavaLizard ), typeof( Drake ), typeof( Dragon ),
|
||||
typeof( Kirin ), typeof( Unicorn ), typeof( GiantRat ), typeof( Slime ),
|
||||
typeof( DireWolf ), typeof( HellHound ), typeof( DeathwatchBeetle ),
|
||||
typeof( LesserHiryu ), typeof( Hiryu )
|
||||
};
|
||||
|
||||
private bool IsHerdable( BaseCreature bc )
|
||||
{
|
||||
if ( bc.IsParagon )
|
||||
return false;
|
||||
|
||||
if ( bc.Tamable )
|
||||
return true;
|
||||
|
||||
Map map = bc.Map;
|
||||
|
||||
ChampionSpawnRegion region = Region.Find( bc.Home, map ) as ChampionSpawnRegion;
|
||||
|
||||
if ( region != null )
|
||||
{
|
||||
ChampionSpawn spawn = region.ChampionSpawn;
|
||||
|
||||
if ( spawn != null && spawn.IsChampionSpawn( bc ) )
|
||||
{
|
||||
Type t = bc.GetType();
|
||||
|
||||
foreach ( Type type in m_ChampTamables )
|
||||
if ( type == t )
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private BaseCreature m_Creature;
|
||||
|
|
@ -107,9 +146,20 @@ namespace Server.Items
|
|||
{
|
||||
if ( targ is IPoint2D )
|
||||
{
|
||||
if ( from.CheckTargetSkill( SkillName.Herding, m_Creature, 0, 100 ) )
|
||||
double min = m_Creature.MinTameSkill - 30;
|
||||
double max = m_Creature.MinTameSkill + 30 + Utility.Random( 10 );
|
||||
|
||||
if ( max <= from.Skills[ SkillName.Herding ].Value )
|
||||
m_Creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 502471, from.NetState ); // That wasn't even challenging.
|
||||
|
||||
if ( from.CheckTargetSkill( SkillName.Herding, m_Creature, min, max ) )
|
||||
{
|
||||
m_Creature.TargetLocation = new Point2D( (IPoint2D)targ );
|
||||
IPoint2D p = (IPoint2D) targ;
|
||||
|
||||
if ( targ != from )
|
||||
p = new Point2D( p.X, p.Y );
|
||||
|
||||
m_Creature.TargetLocation = p;
|
||||
from.SendLocalizedMessage( 502479 ); // The animal walks where it was instructed to.
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue