GetEntityInfo() public method

public GetEntityInfo ( int id ) : EntityInfo
id int
return EntityInfo
        private void OnHightlightPrompt(int userId, string dict, object[] args)
        {
            Msg_RC_HighlightPrompt builder = new Msg_RC_HighlightPrompt();

            builder.dict_id = dict;
            foreach (object arg in args)
            {
                builder.argument.Add(arg.ToString());
            }
            if (userId > 0)
            {
                EntityInfo info = EntityManager.GetEntityInfo(userId);
                if (null != info)
                {
                    User user = info.CustomData as User;
                    if (null != user)
                    {
                        user.SendMessage(RoomMessageDefine.Msg_RC_HighlightPrompt, builder);
                    }
                }
            }
            else
            {
                NotifyAllUser(RoomMessageDefine.Msg_RC_HighlightPrompt, builder);
            }
        }
示例#2
0
        private void UpdateKillCount(EntityInfo npc)
        {
            if (null == npc)
            {
                return;
            }
            EntityInfo killer = null;
            EntityInfo user   = EntityManager.GetEntityInfo(npc.KillerId);

            if (null != user)
            {
                killer = user;
            }
            else
            {
                EntityInfo parter = EntityManager.GetEntityInfo(npc.KillerId);
                if (null != parter && parter.OwnerId > 0)
                {
                    killer = EntityManager.GetEntityInfo(parter.OwnerId);
                }
            }
            if (null != killer)
            {
                killer.GetCombatStatisticInfo().AddKillNpcCount(1);
            }
        }
示例#3
0
 private void CalcKillIncome(EntityInfo npc)
 {
     if (null == npc)
     {
         return;
     }
     UpdateKillCount(npc);
     //死亡掉落
     EntityInfo userKiller = EntityManager.GetEntityInfo(npc.KillerId);
 }
示例#4
0
 static public int GetEntityInfo(IntPtr l)
 {
     try {
         GameFramework.EntityManager self = (GameFramework.EntityManager)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         var ret = self.GetEntityInfo(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }