Depop and cleanup existing node npc's when command executed again. Also remove string from "name" and leave metadata in "lastname" otherwise it is visually too busy

This commit is contained in:
Akkadius
2018-07-09 01:39:14 -05:00
parent 0d094754db
commit dc87b8e78b
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -2044,6 +2044,16 @@ void command_grid(Client *c, const Seperator *sep)
return;
}
/**
* Depop any node npc's already spawned
*/
auto &mob_list = entity_list.GetMobList();
for (auto itr = mob_list.begin(); itr != mob_list.end(); ++itr) {
Mob *mob = itr->second;
if (mob->IsNPC() && mob->GetRace() == 2254)
mob->Depop();
}
/**
* Spawn grid nodes
*/