Advertisement
Guest User

Untitled

a guest
May 24th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.50 KB | None | 0 0
  1. //EquipmentManagerObject.h
  2. // Fill out your copyright notice in the Description page of Project Settings.
  3.  
  4. #pragma once
  5.  
  6.  
  7. #include "EquipableItem.h"
  8. #include "InventoryObject.h"
  9. #include "MMO.h"
  10. #include "EquipmentMannequin.h"
  11. #include "EquipmentSlotWidget.h"
  12. #include "Object.h"
  13. #include "EquipmentManagerObject.generated.h"
  14.  
  15. /**
  16. *
  17. */
  18. UCLASS()
  19. class MMO_API UEquipmentManagerObject : public UObject
  20. {
  21.     GENERATED_BODY()
  22.  
  23.  
  24. public:
  25.  
  26.  
  27.     TSubclassOf<AEquipmentMannequin> ManequinClass;
  28.     UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = Inventory, meta = (AllowPrivateAccess = "true"))
  29.         bool IsVisible = false;
  30.  
  31.     //UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = EquipmentSlot, meta = (AllowPrivateAccess = "true"))
  32.     //  AInventory* Inventory;
  33.  
  34.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = EquipmentManager, meta = (AllowPrivateAccess = "true"))
  35.         AMMOCharacter* CharacterRef;
  36.  
  37.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = EquipmentManager, meta = (AllowPrivateAccess = "true"))
  38.         TArray<UEquipmentSlotWidget*> EquipSlots;
  39.  
  40.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = EquipmentManager, meta = (AllowPrivateAccess = "true"))
  41.         USkeletalMeshComponent* MasterBoneComponent;
  42.  
  43.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = EquipmentManager, meta = (AllowPrivateAccess = "true"))
  44.         USkeletalMeshComponent* ManqeuinMasterBoneComponent;
  45.  
  46.     UPROPERTY(Replicated, EditAnywhere, BlueprintReadWrite, Category = EquipmentManager, meta = (AllowPrivateAccess = "true"))
  47.         TArray<USkeletalMeshComponent*> SkeletalMeshArray;
  48.  
  49.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = EquipmentManager, meta = (AllowPrivateAccess = "true"))
  50.         TArray<USkeletalMeshComponent*> ManqeuinSkeletalMeshArray;
  51.  
  52.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = EquipmentManager, meta = (AllowPrivateAccess = "true"))
  53.         TArray<TSubclassOf<AEquipableItem>> ObjectArray;
  54.  
  55.     UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
  56.         bool EquipItem(AInventorySlot* Slot, int index);
  57.  
  58.  
  59.  
  60.     UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
  61.         void ShowEquipment();
  62.  
  63.     UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
  64.         void RotateManequin(float rotation);
  65.  
  66.  
  67.     UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
  68.         void HideEquipment();
  69.  
  70.     UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
  71.         bool EquipItemToSlot(AInventorySlot* SlotObject, int Slot, int InvIndex);
  72.  
  73.     UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
  74.         bool SwapInventoryEquipmentItems(AInventorySlot* InvSlot, UEquipmentSlotWidget* EquipSlot, int InvIndex);
  75.  
  76.  
  77.     UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
  78.         bool UpdateSkeletalMesh(int Slot);
  79.  
  80.     UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
  81.         void SpawnManequin();
  82.  
  83.     UFUNCTION(BlueprintCallable, Category = "EquipmentManager")
  84.         bool AddFromInventory(AInventorySlot* InvSlot, UEquipmentSlotWidget* EquipSlot, int InvIndex);
  85.  
  86.     AEquipmentMannequin* ManequinRef;
  87.     // Sets default values for this actor's properties
  88.     UEquipmentManagerObject();
  89.  
  90.     void Init(AMMOCharacter * aCharacterRef, USkeletalMeshComponent* aMasterBoneComponent);
  91.  
  92.     UFUNCTION(Server, Reliable, WithValidation) //Se llama des del Cliente, se replica en el server
  93.         void EquipMesh_Server(int object, int slot);
  94.  
  95.     UFUNCTION(NetMulticast, Reliable, WithValidation) //se llama des del server, se ejecuta en los clients (incluido el que lo ha llamado)
  96.         void EquipMesh_Client(int object, int slot);
  97.  
  98.  
  99.  
  100.  
  101.  
  102. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement