Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////HEADER///////////////////////
- #include "Types.h"
- #include "GameFramework/Character.h"
- #include "WaPrototype.h"
- #include "WaCharacterBase.generated.h"
- #pragma once
- UCLASS()
- class WAPROTOTYPE_API AWaCharacterBase : public ACharacter
- {
- GENERATED_BODY()
- //A bunch of functions and properties
- public:
- AWaCharacterBase();
- }
- ////////////////CPP///////////////////////
- AWaCharacterBase::AWaCharacterBase()
- {
- Super();
- PrimaryActorTick.bCanEverTick = true;
- MagicInputQueue = TArray<EWaMagicInput>();
- WaSpellList = TArray<FWaSpell*>();
- ConstructorHelpers::FObjectFinder<UDataTable> SpellsLookupTable_BP(TEXT("DataTable'/Game/DataTables/DT_WaSpells.DT_WaSpells'"));
- SpellsLookupTable.DataTable = SpellsLookupTable_BP.Object;
- if (SpellsLookupTable.DataTable)
- {
- int32 maxItems = SpellsLookupTable.DataTable->GetTableData().Num();
- for (int32 i = 1; i < maxItems; i++)
- {
- SpellsLookupTable.RowName = FName(*FString::FromInt(i));
- FWaSpell* spellData = SpellsLookupTable.GetRow<FWaSpell>();
- WaSpellList.Add(spellData);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement