public void SetOutfit(PlayerOutfit outfit)
    {
        APICall <SetOutfitOperation> aPICall = clubPenguinClient.PlayerApi.SetOutfit(outfit);

        aPICall.OnResponse += outfitChangeComplete;
        aPICall.OnError    += handleCPResponseError;
        aPICall.OnError    += outfitChangeError;
        aPICall.Execute();
    }
        public void Execute()
        {
            PlayerOutfit playerOutfit = new PlayerOutfit();

            playerOutfit.parts = outfitToWear;
            Service.Get <INetworkServicesManager>().PlayerStateService.SetOutfit(playerOutfit);
            CPDataEntityCollection cPDataEntityCollection = Service.Get <CPDataEntityCollection>();
            DataEntityHandle       localPlayerHandle      = cPDataEntityCollection.LocalPlayerHandle;

            cPDataEntityCollection.GetComponent <AvatarDetailsData>(localPlayerHandle).Outfit = outfitToWearData;
        }
示例#3
0
        public Player(Injector injector, uint actorPtr, uint acdPtr, int snoID, uint worldID, uint sceneID)
            : base(snoID)
        {
            Injector   = injector;
            ActorPtr   = actorPtr;
            AcdPtr     = acdPtr;
            SkillSlots = new SkillSlots();
            Outfit     = new PlayerOutfit();
            WorldID    = worldID;
            SceneID    = sceneID;

            PrimaryResourceType   = ResourceType.None;
            SecondaryResourceType = ResourceType.None;
        }
示例#4
0
        public Player(Injector injector, uint actorPtr, uint acdPtr, int snoID, uint worldID, uint sceneID)
            : base(snoID)
        {
            Injector = injector;
            ActorPtr = actorPtr;
            AcdPtr = acdPtr;
            SkillSlots = new SkillSlots();
            Outfit = new PlayerOutfit();
            WorldID = worldID;
            SceneID = sceneID;

            PrimaryResourceType = ResourceType.None;
            SecondaryResourceType = ResourceType.None;
        }
        private void LoadOutfitImage(PlayerOutfit o)
        {
            int id = (int)o;

            if (OutfitUris.Count > id)
            {
                BitmapImage img = new BitmapImage();
                img.BeginInit();
                img.DecodePixelWidth = 420;
                img.UriSource        = new Uri(OutfitUris[id]);
                img.EndInit();
                OutfitImage = img;
            }
            else
            {
                OutfitImage = null;
            }
        }
    public APICall <SetOutfitOperation> SetOutfit(PlayerOutfit outfit)
    {
        SetOutfitOperation operation = new SetOutfitOperation(outfit);

        return(new APICall <SetOutfitOperation>(clubPenguinClient, operation));
    }
 public SetOutfitOperation(PlayerOutfit outfit)
 {
     RequestBody = outfit;
 }