OpenFusion/src/NPC.hpp

39 lines
1.0 KiB
C++
Raw Normal View History

#pragma once
2020-08-20 21:43:48 +00:00
#include "Chunking.hpp"
2020-08-20 21:43:48 +00:00
class BaseNPC {
public:
sNPCAppearanceData appearanceData;
2020-09-23 03:41:43 +00:00
NPCClass npcClass;
2020-10-12 16:55:41 +00:00
uint64_t instanceID;
2020-11-16 14:59:53 +00:00
ChunkPos chunkPos;
2020-11-19 22:19:46 +00:00
std::set<Chunk*>* viewableChunks;
2020-08-20 21:43:48 +00:00
int playersInView;
2020-08-20 21:43:48 +00:00
BaseNPC() {};
2020-10-12 16:55:41 +00:00
BaseNPC(int x, int y, int z, int angle, uint64_t iID, int type, int id) {
2020-08-20 21:43:48 +00:00
appearanceData.iX = x;
appearanceData.iY = y;
appearanceData.iZ = z;
appearanceData.iNPCType = type;
appearanceData.iHP = 400;
2020-10-14 00:30:54 +00:00
appearanceData.iAngle = angle;
2020-08-20 21:43:48 +00:00
appearanceData.iConditionBitFlag = 0;
appearanceData.iBarkerType = 0;
appearanceData.iNPC_ID = id;
2020-11-26 14:05:44 +00:00
npcClass = NPCClass::NPC_BASE;
2020-10-01 01:44:37 +00:00
instanceID = iID;
2020-11-19 01:37:58 +00:00
chunkPos = std::make_tuple(0, 0, 0);
2020-11-19 22:19:46 +00:00
viewableChunks = new std::set<Chunk*>();
playersInView = 0;
2020-08-20 21:43:48 +00:00
};
2020-10-12 16:55:41 +00:00
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) {
2020-09-23 03:41:43 +00:00
npcClass = classType;
}
};