123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using CommonAI.Zone.Formula;
- using CommonAI.Zone.Instance;
- using XmdsCommon.Message;
- using XmdsCommonServer.Plugin.Units;
- using XmdsCommonServer.XLS.Data;
- namespace XmdsCommonServer.Plugin
- {
- public class XmdsVirtual_NPC : XmdsVirtual_Monster
- {
- public XmdsVirtual_NPC(InstanceUnit unit) : base(unit)
- {
- mHateSystem.SetFindHeirs(true);
- }
- public override string GetPlayerUUID()
- {
- return mUnit.ID.ToString();
- }
- protected override void Init(bool pointLv)
- {
- //if (this.mProp.LoadDataConfig == true)
- //{
- // InitMonsterData(GetCurSceneType(), mUnit.Info.TemplateID, mUnit.Level, this.mUnit.RandomN);
- // InitMonsterData2(GetCurSceneType(), mUnit.Info.TemplateID);
- // log.Error("NPC properties loadDataConfig异常设置成false:" + this.mUnit.Info.ID + ", " + this.mUnit.Info.Name);
- //}
- //else
- {
- MonsterVisibleDataB2C edata = new MonsterVisibleDataB2C();
- NPCData npcd = XmdsDataMgr.GetInstance().GetNPCData(mUnit.Info.ID, mUnit.Level);
- string name = mUnit.Name;
- if (npcd != null)
- {
- name = npcd.Name;
- edata.Title = npcd.Title;
- edata.MonsterID = npcd.NpcID;
- edata.SenceType = "NpcList";
- mUnit.Level = npcd.Level;
- }
- else
- {
- edata.MonsterID = mUnit.Info.ID;
- }
- edata.DisplayName = name;
- edata.AttackType = MonsterVisibleDataB2C.MonsterAttackType.Passive;
- edata.Atype = MonsterVisibleDataB2C.MonsterAtype.Monster;
- edata.MType = MonsterVisibleDataB2C.MonsterType.MType0;
- edata.Qcolor = MonsterVisibleDataB2C.MonsterQcolor.Q0;
- mUnit.SetVisibleInfo(edata);
- }
- }
- }
- }
|