mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-14 20:12:26 +00:00
Few adjustments
This commit is contained in:
parent
1061788610
commit
d215ccfa8c
@ -22,6 +22,7 @@
|
|||||||
#include "mob.h"
|
#include "mob.h"
|
||||||
#include "../common/races.h"
|
#include "../common/races.h"
|
||||||
#include "../common/say_link.h"
|
#include "../common/say_link.h"
|
||||||
|
#include "npc_scale_manager.h"
|
||||||
|
|
||||||
std::string commify(const std::string &number)
|
std::string commify(const std::string &number)
|
||||||
{
|
{
|
||||||
@ -588,9 +589,13 @@ inline void NPCCommandsMenu(Client* client, NPC* npc)
|
|||||||
menu_commands += "[" + EQEmu::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Emotes") + "] ";
|
menu_commands += "[" + EQEmu::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Emotes") + "] ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (npc->GetLoottableID() > 0) {
|
||||||
|
menu_commands += "[" + EQEmu::SayLinkEngine::GenerateQuestSaylink("#npcloot show", false, "Loot") + "] ";
|
||||||
|
}
|
||||||
|
|
||||||
if (menu_commands.length() > 0) {
|
if (menu_commands.length() > 0) {
|
||||||
client->Message(0, "| # Show Commmands");
|
// client->Message(0, "| # Show Commmands");
|
||||||
client->Message(0, "| %s", menu_commands.c_str());
|
client->Message(0, "| [Show Commands] %s", menu_commands.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -676,6 +681,7 @@ void Mob::DisplayInfo(Mob *mob)
|
|||||||
"DSMit",
|
"DSMit",
|
||||||
"avoidance",
|
"avoidance",
|
||||||
};
|
};
|
||||||
|
|
||||||
window_text += WriteDisplayInfoSection(mob, "Mod Defensive", mod_defensive, 1, true);
|
window_text += WriteDisplayInfoSection(mob, "Mod Defensive", mod_defensive, 1, true);
|
||||||
|
|
||||||
std::vector<std::string> mod_offensive = {
|
std::vector<std::string> mod_offensive = {
|
||||||
@ -764,13 +770,20 @@ void Mob::DisplayInfo(Mob *mob)
|
|||||||
window_text += WriteDisplayInfoSection(mob, "Proximity", npc_proximity, 1, true);
|
window_text += WriteDisplayInfoSection(mob, "Proximity", npc_proximity, 1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
npc->QueryLoot(client);
|
int8 npc_type = npc_scale_manager->GetNPCScalingType(npc);
|
||||||
|
std::string npc_type_string = npc_scale_manager->GetNPCScalingTypeName(npc);
|
||||||
|
|
||||||
|
client->Message(
|
||||||
|
0,
|
||||||
|
"| # Target: %s Type: %i (%s)",
|
||||||
|
npc->GetCleanName(),
|
||||||
|
npc_type,
|
||||||
|
npc_type_string.c_str());
|
||||||
|
|
||||||
NPCCommandsMenu(client, npc);
|
NPCCommandsMenu(client, npc);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "Window Length: " << window_text.length() << std::endl;
|
std::cout << "Window Length: " << window_text.length() << std::endl;
|
||||||
// std::cout << "Window " << window_text << std::endl;
|
|
||||||
|
|
||||||
if (client->GetDisplayMobInfoWindow()) {
|
if (client->GetDisplayMobInfoWindow()) {
|
||||||
client->SendFullPopup(
|
client->SendFullPopup(
|
||||||
|
|||||||
@ -603,7 +603,7 @@ void NPC::ClearItemList() {
|
|||||||
|
|
||||||
void NPC::QueryLoot(Client* to)
|
void NPC::QueryLoot(Client* to)
|
||||||
{
|
{
|
||||||
to->Message(0, "| # Loot [%s]", GetName());
|
to->Message(0, "| # Current Loot (%s) LootTableID: %i", GetName(), GetLoottableID());
|
||||||
|
|
||||||
int item_count = 0;
|
int item_count = 0;
|
||||||
for (auto cur = itemlist.begin(); cur != itemlist.end(); ++cur, ++item_count) {
|
for (auto cur = itemlist.begin(); cur != itemlist.end(); ++cur, ++item_count) {
|
||||||
|
|||||||
@ -408,13 +408,13 @@ uint32 NpcScaleManager::GetClassLevelDamageMod(uint32 level, uint32 npc_class)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param npc
|
* @param npc
|
||||||
* @return
|
* @return int8
|
||||||
*/
|
*/
|
||||||
int8 NpcScaleManager::GetNPCScalingType(NPC *&npc)
|
int8 NpcScaleManager::GetNPCScalingType(NPC *&npc)
|
||||||
{
|
{
|
||||||
std::string npc_name = npc->GetName();
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -425,6 +425,25 @@ int8 NpcScaleManager::GetNPCScalingType(NPC *&npc)
|
|||||||
return 0;
|
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
|
* Returns false if scaling data not found
|
||||||
* @param npc
|
* @param npc
|
||||||
|
|||||||
@ -95,6 +95,7 @@ public:
|
|||||||
std::map<std::pair<int, int>, global_npc_scale> npc_global_base_scaling_data;
|
std::map<std::pair<int, int>, global_npc_scale> npc_global_base_scaling_data;
|
||||||
|
|
||||||
int8 GetNPCScalingType(NPC * &npc);
|
int8 GetNPCScalingType(NPC * &npc);
|
||||||
|
std::string GetNPCScalingTypeName(NPC * &npc);
|
||||||
bool ApplyGlobalBaseScalingToNPCStatically(NPC * &npc);
|
bool ApplyGlobalBaseScalingToNPCStatically(NPC * &npc);
|
||||||
bool ApplyGlobalBaseScalingToNPCDynamically(NPC * &npc);
|
bool ApplyGlobalBaseScalingToNPCDynamically(NPC * &npc);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user