Exemplo n.º 1
0
        private void TickUsers()
        {
            for (LinkedListNode <UserInfo> linkNode = m_UserMgr.Users.FirstValue; null != linkNode; linkNode = linkNode.Next)
            {
                UserInfo info = linkNode.Value;
                if (info.LevelChanged || info.GetShootStateInfo().WeaponChanged || info.GetSkillStateInfo().BuffChanged || info.GetEquipmentStateInfo().EquipmentChanged)
                {
                    LogSystem.Debug("UserAttrCalculate LevelChanged:{0} WeaponChanged:{1} BuffChanged:{2} EquipmentChanged:{3}", info.LevelChanged, info.GetShootStateInfo().WeaponChanged, info.GetSkillStateInfo().BuffChanged, info.GetEquipmentStateInfo().EquipmentChanged);
                    UserAttrCalculator.Calc(info);
                    info.LevelChanged = false;
                    info.GetShootStateInfo().WeaponChanged        = false;
                    info.GetSkillStateInfo().BuffChanged          = false;
                    info.GetEquipmentStateInfo().EquipmentChanged = false;
                }
            }
            UserInfo player = WorldSystem.Instance.GetPlayerSelf();

            if (null != player && player.Hp <= 0)
            {
                if (player.DeadTime <= 0)
                {
                    GfxSystem.PublishGfxEvent("ge_show_relive", "ui", null);
                    player.DeadTime = TimeUtility.GetServerMilliseconds();
                }
            }
        }