本文整理汇总了C#中DOL.GS.GameNPC.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# GameNPC.GetType方法的具体用法?C# GameNPC.GetType怎么用?C# GameNPC.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DOL.GS.GameNPC
的用法示例。
在下文中一共展示了GameNPC.GetType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NpcTemplate
public NpcTemplate( GameNPC mob )
{
if (mob == null)
throw new ArgumentNullException("data");
m_translationId = mob.TranslationId;
m_blockChance = mob.BlockChance;
m_race = (ushort)mob.Race;
m_bodyType = mob.BodyType;
m_charisma = mob.Charisma;
m_classType = mob.GetType().ToString();
m_constitution = mob.Constitution;
m_dexterity = mob.Dexterity;
m_empathy = mob.Empathy;
m_equipmentTemplateID = mob.EquipmentTemplateID;
m_evadeChance = mob.EvadeChance;
m_flags = (ushort)mob.Flags;
m_guildName = mob.GuildName;
m_examineArticle = mob.ExamineArticle;
m_messageArticle = mob.MessageArticle;
m_intelligence = mob.Intelligence;
m_maxdistance = mob.MaxDistance;
m_maxSpeed = (short)mob.MaxSpeedBase;
m_meleeDamageType = (eDamageType)mob.MeleeDamageType;
m_model = mob.Model.ToString();
m_leftHandSwingChance = mob.LeftHandSwingChance;
m_level = mob.Level.ToString();
m_name = mob.Name;
m_suffix = mob.Suffix;
m_parryChance = mob.ParryChance;
m_piety = mob.Piety;
m_quickness = mob.Quickness;
m_strength = mob.Strength;
m_size = mob.Size.ToString();
m_templateId = GetNextFreeTemplateId();
m_tetherRange = mob.TetherRange;
m_visibleActiveWeaponSlot = mob.VisibleActiveWeaponSlots;
if ( mob.Abilities != null && mob.Abilities.Count > 0 )
{
try
{
if (m_abilities == null)
m_abilities = new ArrayList(mob.Abilities.Count);
foreach (Ability mobAbility in mob.Abilities.Values)
{
m_abilities.Add(mobAbility);
}
}
catch (Exception ex)
{
log.Error("Trapped Error: ", ex);
}
}
if ( mob.Spells != null && mob.Spells.Count > 0 )
{
try
{
if (m_spells == null)
m_spells = new ArrayList(mob.Spells.Count);
foreach (Spell mobSpell in mob.Spells)
{
m_spells.Add(mobSpell);
}
}
catch (Exception ex)
{
log.Error("Trapped Error: ", ex);
}
}
if ( mob.Styles != null && mob.Styles.Count > 0 )
{
try
{
if (m_styles == null)
m_styles = new ArrayList(mob.Styles.Count);
foreach (Style mobStyle in mob.Styles)
{
m_styles.Add(mobStyle);
}
}
catch (Exception ex)
{
log.Error("Trapped Error: ", ex);
}
}
AI.Brain.StandardMobBrain brain = mob.Brain as AI.Brain.StandardMobBrain;
if (brain != null)
{
m_aggroLevel = (byte)brain.AggroLevel;
m_aggroRange = brain.AggroRange;
}
if (string.IsNullOrEmpty(ItemsListTemplateID) == false)
//.........这里部分代码省略.........