예제 #1
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_RET_PKINFO packet = (GC_RET_PKINFO )ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            if (PKInfoSetLogic.Instance() == null)
            {
                return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
            }
            PKInfoSetLogic.Instance().PKModle  = packet.PKModle;
            PKInfoSetLogic.Instance().PKCDTime = packet.PKCDTime;
            PKInfoSetLogic.Instance().PKValue  = packet.PKValue;
            PKInfoSetLogic.Instance().UpdatePKInfo();
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
예제 #2
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_RET_CHANGE_PKMODLE packet = (GC_RET_CHANGE_PKMODLE )ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            Obj _obj = Singleton <ObjManager> .GetInstance().FindObjInScene(packet.ObjId);

            if (_obj == null)
            {
                return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
            }
            if (_obj.ObjType != GameDefine_Globe.OBJ_TYPE.OBJ_OTHER_PLAYER &&
                _obj.ObjType != GameDefine_Globe.OBJ_TYPE.OBJ_MAIN_PLAYER)
            {
                return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
            }
            Obj_OtherPlayer _player = _obj.GetComponent <Obj_OtherPlayer>();

            _player.PkModle = packet.PKModle;
            _player.OptChangPKModle();
            if (PKInfoSetLogic.Instance() != null)
            {
                PKInfoSetLogic.Instance().SwitchBtnState();
            }
            if (NewFunctionLogic.Instance() != null)
            {
                NewFunctionLogic.Instance().SetPkLabel(_player.PkModle == (int)CharacterDefine.PKMODLE.KILL);
            }
            if (FunctionButtonLogic.Instance() != null)
            {
                FunctionButtonLogic.Instance().UpdateNewFunctionButtonState(FunctionButtonLogic.DynamicLogo.PKModel);
            }
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }