Loading...   


 zone/npc.cpp | 40 ++++++++++++++++++++++++++++++++++++++++
 zone/npc.h   |  1 +
 2 files changed, 41 insertions(+)

diff --git a/zone/npc.cpp b/zone/npc.cpp
index fd7f688..9d39f4a 100644
--- a/zone/npc.cpp
+++ b/zone/npc.cpp
@@ -843,6 +843,46 @@ bool NPC::DatabaseCastAccepted(int spell_id) {
 	return false;
 }
 
+bool NPC::SpawnZoneController(){
+
+	NPCType* npc_type = new NPCType;
+	memset(npc_type, 0, sizeof(NPCType));
+
+	strncpy(npc_type->name, "zone_controller", 60);
+	npc_type->cur_hp = 2000000000;
+	npc_type->max_hp = 2000000000;
+	npc_type->race = 240;
+	npc_type->gender = 0;
+	npc_type->class_ = 1;
+	npc_type->deity = 1;
+	npc_type->level = 200;
+	npc_type->npc_id = 0;
+	npc_type->loottable_id = 0;
+	npc_type->texture = 3;
+	npc_type->runspeed = 0;
+	npc_type->d_melee_texture1 = 0;
+	npc_type->d_melee_texture2 = 0;
+	npc_type->merchanttype = 0;
+	npc_type->bodytype = 11;
+
+	npc_type->prim_melee_type = 28;
+	npc_type->sec_melee_type = 28;
+
+	strcpy(npc_type->special_abilities, "12,1^13,1^14,1^15,1^16,1^17,1^19,1^22,1^24,1^25,1^28,1^31,1^35,1^39,1^42,1");
+
+	glm::vec4 point;
+	point.x = 5000;
+	point.y = 5000;
+	point.z = -5000;
+
+	NPC* npc = new NPC(npc_type, nullptr, point, FlyMode3);
+	npc->GiveNPCTypeData(npc_type);
+
+	entity_list.AddNPC(npc);
+
+	return true;
+}
+
 NPC* NPC::SpawnNPC(const char* spawncommand, const glm::vec4& position, Client* client) {
 	if(spawncommand == 0 || spawncommand[0] == 0) {
 		return 0;
diff --git a/zone/npc.h b/zone/npc.h
index 32afd0a..0ce8908 100644
--- a/zone/npc.h
+++ b/zone/npc.h
@@ -96,6 +96,7 @@ class NPC : public Mob
 {
 public:
 	static NPC* SpawnNPC(const char* spawncommand, const glm::vec4& position, Client* client = nullptr);
+	bool	SpawnZoneController();
 	static int8 GetAILevel(bool iForceReRead = false);
 
 	NPC(const NPCType* data, Spawn2* respawn, const glm::vec4& position, int iflymode, bool IsCorpse = false);

Raw Paste Data