[Commands] Add #feature Command. (#2142)

* [Commands] Add #feature Command.
- Removes #beard, #beardcolor, #details, #face, #hair, #haircolor, #helm, #heritage, #size, and #tattoo commands.
- Cleanup messages and logic.
- Consolidate 13 different feature settings to this one command.
- Unique commands including #gender, #race, and #texture were not removed.

* Add missing feature.cpp.

* Update feature.cpp
This commit is contained in:
Kinglykrab
2022-05-06 19:49:56 -04:00
committed by GitHub
parent 6d31786456
commit 5aaaaed6f1
14 changed files with 255 additions and 415 deletions
+16 -6
View File
@@ -537,19 +537,29 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "featuresave") == 0) {
c->Message(
Chat::Yellow,
fmt::format("NPC ID {} saved with all current facial feature settings.", npc_id).c_str());
fmt::format("NPC ID {} saved with all current body and facial feature settings.", npc_id).c_str());
Mob *target = c->GetTarget();
std::string query = fmt::format(
"UPDATE npc_types "
"SET luclin_haircolor = {}, luclin_beardcolor = {}, "
"luclin_hairstyle = {}, luclin_beard = {}, "
"face = {}, drakkin_heritage = {}, "
"drakkin_tattoo = {}, drakkin_details = {} "
"drakkin_tattoo = {}, drakkin_details = {}, "
"texture = {}, helmtexture = {}, "
"gender = {}, size = {:.2f}"
"WHERE id = {}",
target->GetHairColor(), target->GetBeardColor(),
target->GetHairStyle(), target->GetBeard(),
target->GetLuclinFace(), target->GetDrakkinHeritage(),
target->GetDrakkinTattoo(), target->GetDrakkinDetails(),
target->GetHairColor(),
target->GetBeardColor(),
target->GetHairStyle(),
target->GetBeard(),
target->GetLuclinFace(),
target->GetDrakkinHeritage(),
target->GetDrakkinTattoo(),
target->GetDrakkinDetails(),
target->GetTexture(),
target->GetHelmTexture(),
target->GetGender(),
target->GetSize(),
npc_id
);
content_db.QueryDatabase(query);