[Cleanup] Default skill type to Hand to Hand in #npcedit meleetype (#3422)

# Notes
- We default to `28` in the database, so we need to default to this in `#npcedit meleetype` in case the operator only sets the first melee type this avoids the NPC hitting with `1H Blunt (Skill ID 0)`.
This commit is contained in:
Alex King 2023-06-19 02:32:13 -04:00 committed by GitHub
parent 5fcc83b4b6
commit 71ca7f9b39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -549,7 +549,7 @@ void command_npcedit(Client *c, const Seperator *sep)
} else if (!strcasecmp(sep->arg[1], "meleetype")) { } else if (!strcasecmp(sep->arg[1], "meleetype")) {
if (sep->IsNumber(2)) { if (sep->IsNumber(2)) {
auto primary_type = Strings::ToUnsignedInt(sep->arg[2]); auto primary_type = Strings::ToUnsignedInt(sep->arg[2]);
uint32_t secondary_type = sep->IsNumber(3) ? Strings::ToUnsignedInt(sep->arg[3]) : 0; uint32_t secondary_type = sep->IsNumber(3) ? Strings::ToUnsignedInt(sep->arg[3]) : EQ::skills::SkillHandtoHand;
auto primary_skill = EQ::skills::GetSkillName(static_cast<EQ::skills::SkillType>(primary_type)); auto primary_skill = EQ::skills::GetSkillName(static_cast<EQ::skills::SkillType>(primary_type));
auto secondary_skill = EQ::skills::GetSkillName(static_cast<EQ::skills::SkillType>(secondary_type)); auto secondary_skill = EQ::skills::GetSkillName(static_cast<EQ::skills::SkillType>(secondary_type));