mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-13 23:28:21 +00:00
Warning fixes
This commit is contained in:
+3
-3
@@ -10580,12 +10580,12 @@ void Bot::LoadDefaultBotSettings() {
|
||||
m_bot_spell_settings.push_back(t);
|
||||
|
||||
LogBotSettingsDetail("{} says, 'Setting defaults for {} ({}) [#{}] - [{} [#{}] stance]'", GetCleanName(), t.name, t.short_name, t.spell_type, Stance::GetName(bot_stance), bot_stance);
|
||||
LogBotSettingsDetail("{} says, 'Hold = [{}] | Delay = [{}ms] | MinThreshold = [{}\%] | MaxThreshold = [{}\%]'", GetCleanName(),
|
||||
LogBotSettingsDetail("{} says, 'Hold = [{}] | Delay = [{}ms] | MinThreshold = [{}%] | MaxThreshold = [{}%]'", GetCleanName(),
|
||||
GetDefaultSpellTypeHold(i, bot_stance),
|
||||
GetDefaultSpellTypeDelay(i, bot_stance),
|
||||
GetDefaultSpellTypeMinThreshold(i, bot_stance),
|
||||
GetDefaultSpellTypeMaxThreshold(i, bot_stance));
|
||||
LogBotSettingsDetail("{} says, 'AggroCheck = [{}] | MinManaPCT = [{}\%] | MaxManaPCT = [{}\%] | MinHPPCT = [{}\% | MaxHPPCT = [{}\%]'", GetCleanName(), GetDefaultSpellTypeAggroCheck(i, bot_stance), GetDefaultSpellTypeMinManaLimit(i, bot_stance), GetDefaultSpellTypeMaxManaLimit(i, bot_stance), GetDefaultSpellTypeMinHPLimit(i, bot_stance), GetDefaultSpellTypeMaxHPLimit(i, bot_stance));
|
||||
LogBotSettingsDetail("{} says, 'AggroCheck = [{}] | MinManaPCT = [{}%] | MaxManaPCT = [{}%] | MinHPPCT = [{}% | MaxHPPCT = [{}%]'", GetCleanName(), GetDefaultSpellTypeAggroCheck(i, bot_stance), GetDefaultSpellTypeMinManaLimit(i, bot_stance), GetDefaultSpellTypeMaxManaLimit(i, bot_stance), GetDefaultSpellTypeMinHPLimit(i, bot_stance), GetDefaultSpellTypeMaxHPLimit(i, bot_stance));
|
||||
LogBotSettingsDetail("{} says, 'IdlePriority = [{}] | EngagedPriority = [{}] | PursuePriority = [{}]'", GetCleanName(), GetDefaultSpellTypeIdlePriority(i, GetClass(), bot_stance), GetDefaultSpellTypeEngagedPriority(i, GetClass(), bot_stance), GetDefaultSpellTypePursuePriority(i, GetClass(), bot_stance));
|
||||
LogBotSettingsDetail("{} says, 'TargetCount = [{}] | AnnounceCast = [{}]'", GetCleanName(), GetDefaultSpellTypeAEOrGroupTargetCount(i, bot_stance), GetDefaultSpellTypeAnnounceCast(i, bot_stance));
|
||||
}
|
||||
@@ -10636,7 +10636,7 @@ void Bot::SetBotSpellRecastTimer(uint16 spell_type, Mob* tar, bool precast) {
|
||||
|
||||
BotSpell Bot::GetSpellByHealType(uint16 spell_type, Mob* tar) {
|
||||
if (!TargetValidation(tar)) {
|
||||
BotSpell result;
|
||||
BotSpell result{};
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -458,9 +458,7 @@ uint32 helper_bot_create(Client *bot_owner, std::string bot_name, uint8 bot_clas
|
||||
return bot_id;
|
||||
}
|
||||
|
||||
bool available_flag = false;
|
||||
|
||||
!database.botdb.QueryNameAvailability(bot_name, available_flag);
|
||||
bool available_flag = database.botdb.QueryNameAvailability(bot_name);
|
||||
|
||||
if (!available_flag) {
|
||||
bot_owner->Message(
|
||||
|
||||
+8
-12
@@ -24,26 +24,22 @@
|
||||
class Client;
|
||||
class Seperator;
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
#define HP_RATIO_DELTA 5.0f
|
||||
|
||||
enum { EffectIDFirst = 1, EffectIDLast = 12 };
|
||||
enum { EffectIDFirst = 1, EffectIDLast = 12 };
|
||||
|
||||
#define VALIDATECLASSID(x) ((x >= Class::Warrior && x <= Class::Berserker) ? (x) : (0))
|
||||
|
||||
// ActionableTarget action_type
|
||||
// ActionableTarget action_type
|
||||
#define FRIENDLY true
|
||||
#define ENEMY false
|
||||
|
||||
enum {
|
||||
AFT_None = 0,
|
||||
AFT_Value,
|
||||
AFT_GenderRace,
|
||||
AFT_Race
|
||||
};
|
||||
}
|
||||
enum {
|
||||
AFT_None = 0,
|
||||
AFT_Value,
|
||||
AFT_GenderRace,
|
||||
AFT_Race
|
||||
};
|
||||
|
||||
namespace MyBots
|
||||
{
|
||||
|
||||
@@ -145,9 +145,7 @@ void bot_command_clone(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
bool available_flag = false;
|
||||
|
||||
!database.botdb.QueryNameAvailability(bot_name, available_flag);
|
||||
bool available_flag = database.botdb.QueryNameAvailability(bot_name);
|
||||
|
||||
if (!available_flag) {
|
||||
c->Message(
|
||||
|
||||
@@ -82,8 +82,8 @@ void bot_command_pickpocket(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
// Setup variables for calcs
|
||||
bool steal_skill = my_bot->GetSkill(EQ::skills::SkillPickPockets);
|
||||
bool steal_chance = steal_skill * 100 / (5 * over_level + 5);
|
||||
uint16 steal_skill = my_bot->GetSkill(EQ::skills::SkillPickPockets);
|
||||
int steal_chance = steal_skill * 100 / (5 * over_level + 5);
|
||||
|
||||
// Determine whether to steal money or an item.
|
||||
uint32 money[6] = {
|
||||
|
||||
@@ -228,7 +228,7 @@ bool BotDatabase::LoadBotSpellCastingChances()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BotDatabase::QueryNameAvailability(const std::string& bot_name, bool& available_flag)
|
||||
bool BotDatabase::QueryNameAvailability(const std::string& bot_name)
|
||||
{
|
||||
if (
|
||||
bot_name.empty() ||
|
||||
@@ -239,8 +239,6 @@ bool BotDatabase::QueryNameAvailability(const std::string& bot_name, bool& avail
|
||||
return false;
|
||||
}
|
||||
|
||||
available_flag = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public:
|
||||
|
||||
|
||||
/* Bot functions */
|
||||
bool QueryNameAvailability(const std::string& bot_name, bool& available_flag);
|
||||
bool QueryNameAvailability(const std::string& bot_name);
|
||||
bool QueryBotCount(const uint32 owner_id, int class_id, uint32& bot_count, uint32& bot_class_count);
|
||||
bool LoadBotsList(const uint32 owner_id, std::list<BotsAvailableList>& bots_list, bool by_account = false);
|
||||
|
||||
|
||||
+1
-1
@@ -252,7 +252,7 @@ void Client::LoadDefaultBotSettings() {
|
||||
m_bot_spell_settings.push_back(t);
|
||||
|
||||
LogBotSettingsDetail("{} says, 'Setting defaults for {} ({}) [#{}]'", GetCleanName(), t.name, t.short_name, t.spell_type);
|
||||
LogBotSettingsDetail("{} says, 'Delay = [{}ms] | MinThreshold = [{}\%] | MaxThreshold = [{}\%]'", GetCleanName(),
|
||||
LogBotSettingsDetail("{} says, 'Delay = [{}ms] | MinThreshold = [{}%] | MaxThreshold = [{}%]'", GetCleanName(),
|
||||
GetDefaultSpellTypeDelay(i),
|
||||
GetDefaultSpellTypeMinThreshold(i), GetDefaultSpellTypeMaxThreshold(i));
|
||||
}
|
||||
|
||||
@@ -3239,10 +3239,10 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
|
||||
}
|
||||
|
||||
if (
|
||||
((tobe_auged->IsAugmentSlotAvailable(new_aug->GetAugmentType(), in_augment->augment_index)) != -1) &&
|
||||
tobe_auged->IsAugmentSlotAvailable(new_aug->GetAugmentType(), static_cast<uint8>(in_augment->augment_index)) &&
|
||||
tobe_auged->AvailableWearSlot(new_aug->GetItem()->Slots)
|
||||
) {
|
||||
old_aug = tobe_auged->RemoveAugment(in_augment->augment_index);
|
||||
old_aug = tobe_auged->RemoveAugment(static_cast<uint8>(in_augment->augment_index));
|
||||
if (old_aug) { // An old augment was removed in order to be replaced with the new one (augment_action 2)
|
||||
CalcBonuses();
|
||||
|
||||
|
||||
+1
-1
@@ -1108,7 +1108,7 @@ void EntityList::AESpell(
|
||||
max_targets_allowed = RuleI(Spells, TargetedAOEMaxTargets);
|
||||
} else if (
|
||||
IsPBAESpell(spell_id) &&
|
||||
IsDetrimentalSpell &&
|
||||
is_detrimental_spell &&
|
||||
!is_npc
|
||||
) {
|
||||
max_targets_allowed = RuleI(Spells, PointBlankAOEMaxTargets);
|
||||
|
||||
@@ -447,15 +447,15 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
|
||||
if (arg1 == "setinclineinc") {
|
||||
std::map<float, std::string> incline_values = {
|
||||
{.01, "Upright"},
|
||||
{63.75, "45 Degrees",},
|
||||
{130, "90 Degrees"},
|
||||
{192.5, "135 Degrees"},
|
||||
{255, "180 Degrees"},
|
||||
{321.25, "225 Degrees"},
|
||||
{385, "270 Degrees"},
|
||||
{448.75, "315 Degrees"},
|
||||
{512.5, "360 Degrees"}
|
||||
{.01f, "Upright"},
|
||||
{63.75f, "45 Degrees",},
|
||||
{130.f, "90 Degrees"},
|
||||
{192.5f, "135 Degrees"},
|
||||
{255.f, "180 Degrees"},
|
||||
{321.25f, "225 Degrees"},
|
||||
{385.f, "270 Degrees"},
|
||||
{448.75f, "315 Degrees"},
|
||||
{512.5f, "360 Degrees"}
|
||||
};
|
||||
|
||||
std::vector<std::string> incline_normal_options;
|
||||
|
||||
+2
-2
@@ -624,7 +624,7 @@ void Client::SendGuildMemberRankAltBanker(uint32 guild_id, uint32 rank, std::str
|
||||
|
||||
out->guild_id = guild_id;
|
||||
out->rank_ = rank;
|
||||
out->alt_banker = (alt << 1) | banker;
|
||||
out->alt_banker = (alt ? 2 : 0) | (banker ? 1 : 0);
|
||||
strn0cpy(out->player_name, player_name.c_str(), sizeof(out->player_name));
|
||||
|
||||
QueuePacket(outapp);
|
||||
@@ -792,7 +792,7 @@ void EntityList::SendGuildMemberRankAltBanker(uint32 guild_id, uint32 rank_, std
|
||||
|
||||
out->guild_id = guild_id;
|
||||
out->rank_ = rank_;
|
||||
out->alt_banker = (alt << 1) | banker;
|
||||
out->alt_banker = (alt ? 2 : 0) | (banker ? 1 : 0);
|
||||
strn0cpy(out->player_name, player_name.c_str(), sizeof(out->player_name));
|
||||
|
||||
c.second->QueuePacket(outapp);
|
||||
|
||||
+1
-1
@@ -151,7 +151,7 @@ static const struct luaL_Reg bit_funcs[] = {
|
||||
*/
|
||||
#define BAD_SAR (bsar(-8, 2) != (SBits)-2)
|
||||
|
||||
int luaopen_bit(lua_State *L)
|
||||
int luaopen_bit_embed(lua_State *L)
|
||||
{
|
||||
UBits b;
|
||||
lua_pushnumber(L, (lua_Number)1437217655L);
|
||||
|
||||
+3
-1
@@ -17,4 +17,6 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
int luaopen_bit(lua_State *L);
|
||||
struct lua_State;
|
||||
|
||||
int luaopen_bit_embed(lua_State *L);
|
||||
|
||||
+1
-12
@@ -2779,18 +2779,7 @@ bool QuestManager::createBot(const char *name, const char *lastname, uint8 level
|
||||
}
|
||||
|
||||
std::string test_name = name;
|
||||
bool available_flag = false;
|
||||
if (!database.botdb.QueryNameAvailability(test_name, available_flag)) {
|
||||
initiator->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Failed to query name availability for '{}'.",
|
||||
test_name
|
||||
).c_str()
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool available_flag = database.botdb.QueryNameAvailability(test_name);
|
||||
if (!available_flag) {
|
||||
initiator->Message(
|
||||
Chat::White,
|
||||
|
||||
@@ -621,7 +621,7 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
|
||||
}
|
||||
|
||||
if (spec.tradeskill == EQ::skills::SkillAlchemy) {
|
||||
if (!user->GetClass() == Class::Shaman) {
|
||||
if (user->GetClass() != Class::Shaman) {
|
||||
user->Message(Chat::Red, "This tradeskill can only be performed by a shaman.");
|
||||
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
|
||||
user->QueuePacket(outapp);
|
||||
@@ -646,7 +646,7 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
|
||||
}
|
||||
}
|
||||
else if (spec.tradeskill == EQ::skills::SkillMakePoison) {
|
||||
if (!user->GetClass() == Class::Rogue) {
|
||||
if (user->GetClass() != Class::Rogue) {
|
||||
user->Message(Chat::Red, "Only rogues can mix poisons.");
|
||||
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
|
||||
user->QueuePacket(outapp);
|
||||
|
||||
Reference in New Issue
Block a user