Advertisement
Guest User

Untitled

a guest
Feb 27th, 2015
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.08 KB | None | 0 0
  1. /////////////HEADER///////////////////////
  2. #include "Types.h"
  3. #include "GameFramework/Character.h"
  4. #include "WaPrototype.h"
  5. #include "WaCharacterBase.generated.h"
  6.  
  7. #pragma once
  8.  
  9. UCLASS()
  10. class WAPROTOTYPE_API AWaCharacterBase : public ACharacter
  11. {
  12.     GENERATED_BODY()
  13.  
  14.     //A bunch of functions and properties
  15.  
  16. public:
  17.     AWaCharacterBase();
  18. }
  19.  
  20.  
  21. ////////////////CPP///////////////////////
  22. AWaCharacterBase::AWaCharacterBase()
  23. {
  24.     Super();
  25.     PrimaryActorTick.bCanEverTick = true;
  26.     MagicInputQueue = TArray<EWaMagicInput>();
  27.     WaSpellList = TArray<FWaSpell*>();
  28.  
  29.     ConstructorHelpers::FObjectFinder<UDataTable> SpellsLookupTable_BP(TEXT("DataTable'/Game/DataTables/DT_WaSpells.DT_WaSpells'"));
  30.     SpellsLookupTable.DataTable = SpellsLookupTable_BP.Object;
  31.  
  32.     if (SpellsLookupTable.DataTable)
  33.     {
  34.         int32 maxItems = SpellsLookupTable.DataTable->GetTableData().Num();
  35.         for (int32 i = 1; i < maxItems; i++)
  36.         {
  37.             SpellsLookupTable.RowName = FName(*FString::FromInt(i));
  38.             FWaSpell*  spellData = SpellsLookupTable.GetRow<FWaSpell>();
  39.  
  40.             WaSpellList.Add(spellData);
  41.         }
  42.     }
  43.  
  44.    
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement