mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-05 06:50:04 +00:00
dongresource
7f9cdfc9ae
We had avoided putting STL containers into Players back when we thought Players was still POD and needed to remain POD, but it turned out that neither were the case all along, so there's no need for the indirection.
38 lines
985 B
C++
38 lines
985 B
C++
#pragma once
|
|
|
|
#include "Chunking.hpp"
|
|
|
|
class BaseNPC {
|
|
public:
|
|
sNPCAppearanceData appearanceData;
|
|
NPCClass npcClass;
|
|
uint64_t instanceID;
|
|
ChunkPos chunkPos;
|
|
std::set<Chunk*> viewableChunks;
|
|
|
|
int playersInView;
|
|
|
|
BaseNPC() {};
|
|
BaseNPC(int x, int y, int z, int angle, uint64_t iID, int type, int id) {
|
|
appearanceData.iX = x;
|
|
appearanceData.iY = y;
|
|
appearanceData.iZ = z;
|
|
appearanceData.iNPCType = type;
|
|
appearanceData.iHP = 400;
|
|
appearanceData.iAngle = angle;
|
|
appearanceData.iConditionBitFlag = 0;
|
|
appearanceData.iBarkerType = 0;
|
|
appearanceData.iNPC_ID = id;
|
|
|
|
npcClass = NPCClass::NPC_BASE;
|
|
|
|
instanceID = iID;
|
|
|
|
chunkPos = std::make_tuple(0, 0, 0);
|
|
playersInView = 0;
|
|
};
|
|
BaseNPC(int x, int y, int z, int angle, uint64_t iID, int type, int id, NPCClass classType) : BaseNPC(x, y, z, angle, iID, type, id) {
|
|
npcClass = classType;
|
|
}
|
|
};
|