summaryrefslogtreecommitdiff
path: root/src/KingSystem/ActorSystem/actBaseProcHandle.cpp
blob: 5603b5be032e9790be8a18e99e7aacf5fd02fda3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "KingSystem/ActorSystem/actBaseProcHandle.h"

namespace ksys::act {

BaseProcHandle::BaseProcHandle() {
    mUnit = nullptr;
    mFlag = 0;
}

BaseProcHandle::~BaseProcHandle() {
    if (mUnit) {
        mUnit->deleteProc(0, this);
        mUnit = nullptr;
    }
    mFlag = 0;
}

bool BaseProcHandle::procReady() {
    return mUnit && mUnit->isReady();
}

BaseProc* BaseProcHandle::getProc() {
    if (mUnit)
        return mUnit->getProc();

    return nullptr;
}

}  // namespace ksys::act