mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 08:26:36 +00:00
[Commands] Cleanup #npcstats Command. (#1690)
- Cleanup menu and add stats that were not there before. - Only display some data if necessary (i.e only show loot/money if they have loot/money) - Add skill name helper method. - Add faction name helper method. - Add Charmed stats and other getter methods. - Cleanup QueryLoot() method.
This commit is contained in:
+14
-96
@@ -177,8 +177,7 @@ bool EQ::skills::IsMeleeDmg(SkillType skill)
|
||||
|
||||
const std::map<EQ::skills::SkillType, std::string>& EQ::skills::GetSkillTypeMap()
|
||||
{
|
||||
/* VS2013 code
|
||||
static const std::map<SkillUseTypes, std::string> skill_use_types_map = {
|
||||
static const std::map<SkillType, std::string> skill_type_map = {
|
||||
{ Skill1HBlunt, "1H Blunt" },
|
||||
{ Skill1HSlashing, "1H Slashing" },
|
||||
{ Skill2HBlunt, "2H Blunt" },
|
||||
@@ -258,103 +257,22 @@ const std::map<EQ::skills::SkillType, std::string>& EQ::skills::GetSkillTypeMap(
|
||||
{ SkillTripleAttack, "Triple Attack" },
|
||||
{ Skill2HPiercing, "2H Piercing" }
|
||||
};
|
||||
*/
|
||||
|
||||
/* VS2012 code - begin */
|
||||
|
||||
static const char* skill_use_names[SkillCount] = {
|
||||
"1H Blunt",
|
||||
"1H Slashing",
|
||||
"2H Blunt",
|
||||
"2H Slashing",
|
||||
"Abjuration",
|
||||
"Alteration",
|
||||
"Apply Poison",
|
||||
"Archery",
|
||||
"Backstab",
|
||||
"Bind Wound",
|
||||
"Bash",
|
||||
"Block",
|
||||
"Brass Instruments",
|
||||
"Channeling",
|
||||
"Conjuration",
|
||||
"Defense",
|
||||
"Disarm",
|
||||
"Disarm Traps",
|
||||
"Divination",
|
||||
"Dodge",
|
||||
"Double Attack",
|
||||
"Dragon Punch",
|
||||
"Dual Wield",
|
||||
"Eagle Strike",
|
||||
"Evocation",
|
||||
"Feign Death",
|
||||
"Flying Kick",
|
||||
"Forage",
|
||||
"Hand to Hand",
|
||||
"Hide",
|
||||
"Kick",
|
||||
"Meditate",
|
||||
"Mend",
|
||||
"Offense",
|
||||
"Parry",
|
||||
"Pick Lock",
|
||||
"1H Piercing",
|
||||
"Riposte",
|
||||
"Round Kick",
|
||||
"Safe Fall",
|
||||
"Sense Heading",
|
||||
"Singing",
|
||||
"Sneak",
|
||||
"Specialize Abjuration",
|
||||
"Specialize Alteration",
|
||||
"Specialize Conjuration",
|
||||
"Specialize Divination",
|
||||
"Specialize Evocation",
|
||||
"Pick Pockets",
|
||||
"Stringed Instruments",
|
||||
"Swimming",
|
||||
"Throwing",
|
||||
"Tiger Claw",
|
||||
"Tracking",
|
||||
"Wind Instruments",
|
||||
"Fishing",
|
||||
"Make Poison",
|
||||
"Tinkering",
|
||||
"Research",
|
||||
"Alchemy",
|
||||
"Baking",
|
||||
"Tailoring",
|
||||
"Sense Traps",
|
||||
"Blacksmithing",
|
||||
"Fletching",
|
||||
"Brewing",
|
||||
"Alcohol Tolerance",
|
||||
"Begging",
|
||||
"Jewelry Making",
|
||||
"Pottery",
|
||||
"Percussion Instruments",
|
||||
"Intimidation",
|
||||
"Berserking",
|
||||
"Taunt",
|
||||
"Frenzy",
|
||||
"Remove Traps",
|
||||
"Triple Attack",
|
||||
"2H Piercing"
|
||||
};
|
||||
|
||||
static std::map<SkillType, std::string> skill_type_map;
|
||||
|
||||
skill_type_map.clear();
|
||||
|
||||
for (int i = Skill1HBlunt; i < SkillCount; ++i)
|
||||
skill_type_map[(SkillType)i] = skill_use_names[i];
|
||||
|
||||
/* VS2012 code - end */
|
||||
|
||||
return skill_type_map;
|
||||
}
|
||||
|
||||
std::string EQ::skills::GetSkillName(SkillType skill)
|
||||
{
|
||||
if (skill >= Skill1HBlunt && skill <= Skill2HPiercing) {
|
||||
std::map<SkillType, std::string> skills = GetSkillTypeMap();
|
||||
for (auto current_skill : skills) {
|
||||
if (skill == current_skill.first) {
|
||||
return current_skill.second;
|
||||
}
|
||||
}
|
||||
}
|
||||
return std::string();
|
||||
}
|
||||
|
||||
EQ::SkillProfile::SkillProfile()
|
||||
{
|
||||
memset(&Skill, 0, (sizeof(uint32) * PACKET_SKILL_ARRAY_SIZE));
|
||||
|
||||
Reference in New Issue
Block a user