Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //EquipmentManagerObject.h
- // Fill out your copyright notice in the Description page of Project Settings.
- #pragma once
- #include "EquipableItem.h"
- #include "InventoryObject.h"
- #include "MMO.h"
- #include "EquipmentMannequin.h"
- #include "EquipmentSlotWidget.h"
- #include "Object.h"
- #include "EquipmentManagerObject.generated.h"
- /**
- *
- */
- UCLASS()
- class MMO_API UEquipmentManagerObject : public UObject
- {
- GENERATED_BODY()
- public:
- TSubclassOf<AEquipmentMannequin> ManequinClass;
- UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = Inventory, meta = (AllowPrivateAccess = "true"))
- bool IsVisible = false;
- //UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = EquipmentSlot, meta = (AllowPrivateAccess = "true"))
- // AInventory* Inventory;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = EquipmentManager, meta = (AllowPrivateAccess = "true"))
- AMMOCharacter* CharacterRef;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = EquipmentManager, meta = (AllowPrivateAccess = "true"))
- TArray<UEquipmentSlotWidget*> EquipSlots;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = EquipmentManager, meta = (AllowPrivateAccess = "true"))
- USkeletalMeshComponent* MasterBoneComponent;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = EquipmentManager, meta = (AllowPrivateAccess = "true"))
- USkeletalMeshComponent* ManqeuinMasterBoneComponent;
- UPROPERTY(Replicated, EditAnywhere, BlueprintReadWrite, Category = EquipmentManager, meta = (AllowPrivateAccess = "true"))
- TArray<USkeletalMeshComponent*> SkeletalMeshArray;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = EquipmentManager, meta = (AllowPrivateAccess = "true"))
- TArray<USkeletalMeshComponent*> ManqeuinSkeletalMeshArray;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = EquipmentManager, meta = (AllowPrivateAccess = "true"))
- TArray<TSubclassOf<AEquipableItem>> ObjectArray;
- UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
- bool EquipItem(AInventorySlot* Slot, int index);
- UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
- void ShowEquipment();
- UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
- void RotateManequin(float rotation);
- UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
- void HideEquipment();
- UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
- bool EquipItemToSlot(AInventorySlot* SlotObject, int Slot, int InvIndex);
- UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
- bool SwapInventoryEquipmentItems(AInventorySlot* InvSlot, UEquipmentSlotWidget* EquipSlot, int InvIndex);
- UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
- bool UpdateSkeletalMesh(int Slot);
- UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
- void SpawnManequin();
- UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
- bool AddFromInventory(AInventorySlot* InvSlot, UEquipmentSlotWidget* EquipSlot, int InvIndex);
- AEquipmentMannequin* ManequinRef;
- // Sets default values for this actor's properties
- UEquipmentManagerObject();
- void Init(AMMOCharacter * aCharacterRef, USkeletalMeshComponent* aMasterBoneComponent);
- UFUNCTION(Server, Reliable, WithValidation) //Se llama des del Cliente, se replica en el server
- void EquipMesh_Server(int object, int slot);
- UFUNCTION(NetMulticast, Reliable, WithValidation) //se llama des del server, se ejecuta en los clients (incluido el que lo ha llamado)
- void EquipMesh_Client(int object, int slot);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement