SHARE
TWEET

Untitled

a guest Feb 27th, 2015 253 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top