Add support for unique instances

This commit is contained in:
Gent
2020-10-12 12:55:41 -04:00
parent c1fd51b721
commit d4aed0abf4
11 changed files with 55 additions and 47 deletions

View File

@@ -45,7 +45,7 @@ struct Mob : public BaseNPC {
// temporary; until we're sure what's what
nlohmann::json data;
Mob(int x, int y, int z, int angle, int iID, int type, int hp, nlohmann::json d, int32_t id)
Mob(int x, int y, int z, int angle, uint64_t iID, int type, int hp, nlohmann::json d, int32_t id)
: BaseNPC(x, y, z, angle, iID, type, id), maxHealth(hp) {
state = MobState::ROAMING;
@@ -71,7 +71,7 @@ struct Mob : public BaseNPC {
}
// constructor for /summon
Mob(int x, int y, int z, int iID, int type, nlohmann::json d, int32_t id)
Mob(int x, int y, int z, uint64_t iID, int type, nlohmann::json d, int32_t id)
: Mob(x, y, z, 0, iID, type, 0, d, id) {
summoned = true; // will be despawned and deallocated when killed
appearanceData.iHP = maxHealth = d["m_iHP"];