Few adjustments

This commit is contained in:
Akkadius
2018-11-19 02:40:10 -06:00
parent 1061788610
commit d215ccfa8c
4 changed files with 40 additions and 7 deletions
+21 -2
View File
@@ -408,13 +408,13 @@ uint32 NpcScaleManager::GetClassLevelDamageMod(uint32 level, uint32 npc_class)
/**
* @param npc
* @return
* @return int8
*/
int8 NpcScaleManager::GetNPCScalingType(NPC *&npc)
{
std::string npc_name = npc->GetName();
if (npc->IsRareSpawn() || npc_name.find('#') != std::string::npos) {
if (npc->IsRareSpawn() || npc_name.find('#') != std::string::npos || isupper(npc_name[0])) {
return 1;
}
@@ -425,6 +425,25 @@ int8 NpcScaleManager::GetNPCScalingType(NPC *&npc)
return 0;
}
/**
* @param npc
* @return std::string
*/
std::string NpcScaleManager::GetNPCScalingTypeName(NPC *&npc)
{
int8 scaling_type = GetNPCScalingType(npc);
if (scaling_type == 1) {
return "Named";
}
if (npc->IsRaidTarget()) {
return "Raid";
}
return "Trash";
}
/**
* Returns false if scaling data not found
* @param npc