Пример #1
0
        //-------------------------------------------------------------------------------------------------------

        /**
         * @brief 显示玩家以及其附属宠物和召唤物
         * @param
         */
        private void ShowPlayerAndSuite(IPlayer player, bool bShow)
        {
            if (player == null)
            {
                return;
            }

            player.SendMessage(EntityMessage.EntityCommand_EnableShowModel, bShow);
            if (bShow)
            {
                PlayAnimation(player, EntityAction.Stand);
            }

            IControllerSystem cs = EntitySystem.m_ClientGlobal.GetControllerSystem();

            if (cs == null)
            {
                return;
            }

            IControllerHelper ch = cs.GetControllerHelper();

            if (ch == null)
            {
                return;
            }

            ch.GetOwnNpcByPlayerID(player.GetID(), ref lstNpc);
            if (lstNpc == null)
            {
                return;
            }

            for (int i = 0; i < lstNpc.Count; ++i)
            {
                if (lstNpc[i] != null)
                {
                    lstNpc[i].SendMessage(EntityMessage.EntityCommand_EnableShowModel, bShow);
                }
            }
            lstNpc.Clear();
        }