本文整理汇总了C#中Server.Mobiles.BaseCreature.InitStats方法的典型用法代码示例。如果您正苦于以下问题:C# BaseCreature.InitStats方法的具体用法?C# BaseCreature.InitStats怎么用?C# BaseCreature.InitStats使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobiles.BaseCreature
的用法示例。
在下文中一共展示了BaseCreature.InitStats方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CloneMe_OnCommand
public static void CloneMe_OnCommand(CommandEventArgs e)
{
BaseCreature m = new BaseCreature(AIType.AI_None, FightMode.None, 10, 1, 0.2, 0.4);
m.InitStats(10, 10, 10);
m.SetSkill(SkillName.Cooking, 65, 88);
m.SetSkill(SkillName.Snooping, 65, 88);
m.SetSkill(SkillName.Stealing, 65, 88);
if (m.Female = Utility.RandomBool())
{
m.Body = 0x1A6;
m.Name = NameList.RandomName("female");
}
else
{
m.Body = 0x1A4;
m.Name = NameList.RandomName("male");
}
e.Mobile.Hidden = true;
m.Dex = e.Mobile.Dex;
m.Int = e.Mobile.Int;
m.Str = e.Mobile.Str;
m.Fame = e.Mobile.Fame;
m.Karma = e.Mobile.Karma;
m.NameHue = e.Mobile.NameHue;
m.SpeechHue = e.Mobile.SpeechHue;
m.Criminal = e.Mobile.Criminal;
m.Name = e.Mobile.Name;
m.Title = e.Mobile.Title;
m.Female = e.Mobile.Female;
m.Body = e.Mobile.Body;
m.Hue = e.Mobile.Hue;
m.Hits = e.Mobile.HitsMax;
m.Mana = e.Mobile.ManaMax;
m.Stam = e.Mobile.StamMax;
m.BodyMod = e.Mobile.Body;
m.Map = e.Mobile.Map;
m.Location = e.Mobile.Location;
m.Direction = e.Mobile.Direction;
m.HairItemID = e.Mobile.HairItemID;
m.FacialHairItemID = e.Mobile.FacialHairItemID;
m.HairHue = e.Mobile.HairHue;
m.FacialHairHue = e.Mobile.FacialHairHue;
for (int i = 0; i < e.Mobile.Skills.Length; i++)
m.Skills[i].Base = e.Mobile.Skills[i].Base;
ArrayList items = new ArrayList(e.Mobile.Items);
for (int i = 0; i < items.Count; i++)
{
Item item = (Item)items[i]; //my favorite line of code, ever.
if (((item != null) && (item.Parent == e.Mobile) && (item != e.Mobile.Backpack)))
{
Type t = item.GetType();
ConstructorInfo c = t.GetConstructor(Type.EmptyTypes);
if (c != null)
{
try
{
object o = c.Invoke(null);
if (o != null && o is Item)
{
Item newItem = (Item)o;
CopyProperties(newItem, item);
item.OnAfterDuped(newItem);
newItem.Parent = null;
m.AddItem(newItem);
}
}
catch
{
}
}
}
}
}