mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Logging] Remove function prefixes (#2766)
This commit is contained in:
+34
-34
@@ -1622,7 +1622,7 @@ int32 Bot::acmod() {
|
||||
else
|
||||
return (65 + ((agility - 300) / 21));
|
||||
|
||||
LogError("[Bot::acmod] Agility [{}] Level [{}]",agility,level);
|
||||
LogError("Agility [{}] Level [{}]",agility,level);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2146,7 +2146,7 @@ bool Bot::Process()
|
||||
|
||||
if (mob_close_scan_timer.Check()) {
|
||||
LogAIScanCloseDetail(
|
||||
"[Bot::Process] is_moving [{}] bot [{}] timer [{}]",
|
||||
"is_moving [{}] bot [{}] timer [{}]",
|
||||
moving ? "true" : "false",
|
||||
GetCleanName(),
|
||||
mob_close_scan_timer.GetDuration()
|
||||
@@ -2304,7 +2304,7 @@ void Bot::BotRangedAttack(Mob* other) {
|
||||
//make sure the attack and ranged timers are up
|
||||
//if the ranged timer is disabled, then they have no ranged weapon and shouldent be attacking anyhow
|
||||
if((attack_timer.Enabled() && !attack_timer.Check(false)) || (ranged_timer.Enabled() && !ranged_timer.Check())) {
|
||||
LogCombatDetail("[Bot::BotRangedAttack] Bot Archery attack canceled. Timer not up. Attack [{}] ranged [{}]", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
|
||||
LogCombatDetail("Bot Archery attack canceled. Timer not up. Attack [{}] ranged [{}]", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
|
||||
Message(0, "Error: Timer not up. Attack %d, ranged %d", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
|
||||
return;
|
||||
}
|
||||
@@ -2322,7 +2322,7 @@ void Bot::BotRangedAttack(Mob* other) {
|
||||
if(!RangeWeapon || !Ammo)
|
||||
return;
|
||||
|
||||
LogCombatDetail("[Bot::BotRangedAttack] Shooting [{}] with bow [{}] ([{}]) and arrow [{}] ([{}])", other->GetCleanName(), RangeWeapon->Name, RangeWeapon->ID, Ammo->Name, Ammo->ID);
|
||||
LogCombatDetail("Shooting [{}] with bow [{}] ([{}]) and arrow [{}] ([{}])", other->GetCleanName(), RangeWeapon->Name, RangeWeapon->ID, Ammo->Name, Ammo->ID);
|
||||
if(!IsAttackAllowed(other) || IsCasting() || DivineAura() || IsStunned() || IsMezzed() || (GetAppearance() == eaDead))
|
||||
return;
|
||||
|
||||
@@ -3506,7 +3506,7 @@ void Bot::AI_Process()
|
||||
|
||||
if (GetTarget() && !IsRooted()) {
|
||||
|
||||
LogAIDetail("[Bot::AI_Process] Pursuing [{}] while engaged", GetTarget()->GetCleanName());
|
||||
LogAIDetail("Pursuing [{}] while engaged", GetTarget()->GetCleanName());
|
||||
Goal = GetTarget()->GetPosition();
|
||||
if (DistanceSquared(m_Position, Goal) <= leash_distance) {
|
||||
RunTo(Goal.x, Goal.y, Goal.z);
|
||||
@@ -3892,7 +3892,7 @@ void Bot::PetAIProcess() {
|
||||
else if (botPet->GetTarget() && botPet->GetAIMovementTimer()->Check()) {
|
||||
botPet->SetRunAnimSpeed(0);
|
||||
if(!botPet->IsRooted()) {
|
||||
LogAIDetail("[Bot::AI_Process] Pursuing [{}] while engaged", botPet->GetTarget()->GetCleanName());
|
||||
LogAIDetail("Pursuing [{}] while engaged", botPet->GetTarget()->GetCleanName());
|
||||
botPet->RunTo(botPet->GetTarget()->GetX(), botPet->GetTarget()->GetY(), botPet->GetTarget()->GetZ());
|
||||
return;
|
||||
} else {
|
||||
@@ -4454,7 +4454,7 @@ void Bot::AddBotItem(
|
||||
|
||||
if (!inst) {
|
||||
LogError(
|
||||
"[Bot::AI_Process] Bot:AddItem Invalid Item data: ID [{}] Charges [{}] Aug1 [{}] Aug2 [{}] Aug3 [{}] Aug4 [{}] Aug5 [{}] Aug6 [{}] Attuned [{}]",
|
||||
"Bot:AddItem Invalid Item data: ID [{}] Charges [{}] Aug1 [{}] Aug2 [{}] Aug3 [{}] Aug4 [{}] Aug5 [{}] Aug6 [{}] Attuned [{}]",
|
||||
item_id,
|
||||
charges,
|
||||
augment_one,
|
||||
@@ -4469,7 +4469,7 @@ void Bot::AddBotItem(
|
||||
}
|
||||
|
||||
if (!database.botdb.SaveItemBySlot(this, slot_id, inst)) {
|
||||
LogError("[Bot::AI_Process] Failed to save item by slot to slot [{}] for [{}].", slot_id, GetCleanName());
|
||||
LogError("Failed to save item by slot to slot [{}] for [{}].", slot_id, GetCleanName());
|
||||
safe_delete(inst);
|
||||
return;
|
||||
}
|
||||
@@ -4720,7 +4720,7 @@ void Bot::PerformTradeWithClient(int16 begin_slot_id, int16 end_slot_id, Client*
|
||||
}
|
||||
|
||||
if (!trade_instance->GetItem()) {
|
||||
LogError("[Bot::PerformTradeWithClient] could not find item from instance in trade for [{}] with [{}] in slot [{}].", client->GetCleanName(), GetCleanName(), trade_index);
|
||||
LogError("could not find item from instance in trade for [{}] with [{}] in slot [{}].", client->GetCleanName(), GetCleanName(), trade_index);
|
||||
client->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
@@ -4739,7 +4739,7 @@ void Bot::PerformTradeWithClient(int16 begin_slot_id, int16 end_slot_id, Client*
|
||||
auto item_link = linker.GenerateLink();
|
||||
|
||||
if (trade_index != invslot::slotCursor && !trade_instance->IsDroppable()) {
|
||||
LogError("[Bot::PerformTradeWithClient] trade hack detected by [{}] with [{}].", client->GetCleanName(), GetCleanName());
|
||||
LogError("trade hack detected by [{}] with [{}].", client->GetCleanName(), GetCleanName());
|
||||
client->Message(Chat::White, "Trade hack detected, the trade has been cancelled.");
|
||||
client->ResetTrade();
|
||||
return;
|
||||
@@ -4828,14 +4828,14 @@ void Bot::PerformTradeWithClient(int16 begin_slot_id, int16 end_slot_id, Client*
|
||||
}
|
||||
|
||||
if (trade_instance->GetItem()->LoreGroup == -1 && check_iterator.trade_item_instance->GetItem()->ID == trade_instance->GetItem()->ID) {
|
||||
LogError("[Bot::PerformTradeWithClient] trade hack detected by [{}] with [{}].", client->GetCleanName(), GetCleanName());
|
||||
LogError("trade hack detected by [{}] with [{}].", client->GetCleanName(), GetCleanName());
|
||||
client->Message(Chat::White, "Trade hack detected, the trade has been cancelled.");
|
||||
client->ResetTrade();
|
||||
return;
|
||||
}
|
||||
|
||||
if ((trade_instance->GetItem()->LoreGroup > 0) && (check_iterator.trade_item_instance->GetItem()->LoreGroup == trade_instance->GetItem()->LoreGroup)) {
|
||||
LogError("[Bot::PerformTradeWithClient] trade hack detected by [{}] with [{}].", client->GetCleanName(), GetCleanName());
|
||||
LogError("trade hack detected by [{}] with [{}].", client->GetCleanName(), GetCleanName());
|
||||
client->Message(Chat::White, "Trade hack detected, the trade has been cancelled.");
|
||||
client->ResetTrade();
|
||||
return;
|
||||
@@ -4959,7 +4959,7 @@ void Bot::PerformTradeWithClient(int16 begin_slot_id, int16 end_slot_id, Client*
|
||||
}
|
||||
|
||||
if (!return_instance->GetItem()) {
|
||||
LogError("[Bot::PerformTradeWithClient] error processing bot slot [{}] for [{}] in trade with [{}].", return_iterator.from_bot_slot, GetCleanName(), client->GetCleanName());
|
||||
LogError("error processing bot slot [{}] for [{}] in trade with [{}].", return_iterator.from_bot_slot, GetCleanName(), client->GetCleanName());
|
||||
client->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
@@ -5285,7 +5285,7 @@ void Bot::Damage(Mob *from, int64 damage, uint16 spell_id, EQ::skills::SkillType
|
||||
|
||||
//handle EVENT_ATTACK. Resets after we have not been attacked for 12 seconds
|
||||
if(attacked_timer.Check()) {
|
||||
LogCombat("[Bot::Damage] Triggering EVENT_ATTACK due to attack by [{}]", from->GetName());
|
||||
LogCombat("Triggering EVENT_ATTACK due to attack by [{}]", from->GetName());
|
||||
parse->EventBot(EVENT_ATTACK, this, from, "", 0);
|
||||
}
|
||||
|
||||
@@ -5293,7 +5293,7 @@ void Bot::Damage(Mob *from, int64 damage, uint16 spell_id, EQ::skills::SkillType
|
||||
// if spell is lifetap add hp to the caster
|
||||
if (spell_id != SPELL_UNKNOWN && IsLifetapSpell(spell_id)) {
|
||||
int64 healed = GetActSpellHealing(spell_id, damage);
|
||||
LogCombatDetail("[Bot::Damage] Applying lifetap heal of [{}] to [{}]", healed, GetCleanName());
|
||||
LogCombatDetail("Applying lifetap heal of [{}] to [{}]", healed, GetCleanName());
|
||||
HealDamage(healed);
|
||||
entity_list.FilteredMessageClose(this, true, RuleI(Range, SpellMessages), Chat::Emote, FilterSocials, "%s beams a smile at %s", GetCleanName(), from->GetCleanName() );
|
||||
}
|
||||
@@ -5324,7 +5324,7 @@ void Bot::Damage(Mob *from, int64 damage, uint16 spell_id, EQ::skills::SkillType
|
||||
bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, bool IsFromSpell, ExtraAttackOptions *opts) {
|
||||
if (!other) {
|
||||
SetTarget(nullptr);
|
||||
LogErrorDetail("[Bot::Attack] A null Mob object was passed to Bot::Attack for evaluation!");
|
||||
LogErrorDetail("A null Mob object was passed to Bot::Attack for evaluation!");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5342,20 +5342,20 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
// takes more to compare a call result, load for a call, load a compare to address and compare, and finally
|
||||
// push a value to an address than to just load for a call and push a value to an address.
|
||||
|
||||
LogCombat("[Bot::Attack] Attacking [{}] with hand [{}] [{}]", other->GetCleanName(), Hand, (FromRiposte ? "(this is a riposte)" : ""));
|
||||
LogCombat("Attacking [{}] with hand [{}] [{}]", other->GetCleanName(), Hand, (FromRiposte ? "(this is a riposte)" : ""));
|
||||
if ((IsCasting() && (GetClass() != BARD) && !IsFromSpell) || (!IsAttackAllowed(other))) {
|
||||
if(GetOwnerID())
|
||||
entity_list.MessageClose(this, 1, 200, 10, "%s says, '%s is not a legal target master.'", GetCleanName(), GetTarget()->GetCleanName());
|
||||
|
||||
if(other) {
|
||||
RemoveFromHateList(other);
|
||||
LogCombat("[Bot::Attack] I am not allowed to attack [{}]", other->GetCleanName());
|
||||
LogCombat("I am not allowed to attack [{}]", other->GetCleanName());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if(DivineAura()) {//cant attack while invulnerable
|
||||
LogCombat("[Bot::Attack] Attack canceled, Divine Aura is in effect");
|
||||
LogCombat("Attack canceled, Divine Aura is in effect");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5373,19 +5373,19 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
|
||||
if(weapon != nullptr) {
|
||||
if (!weapon->IsWeapon()) {
|
||||
LogCombat("[Bot::Attack] Attack canceled, Item [{}] ([{}]) is not a weapon", weapon->GetItem()->Name, weapon->GetID());
|
||||
LogCombat("Attack canceled, Item [{}] ([{}]) is not a weapon", weapon->GetItem()->Name, weapon->GetID());
|
||||
return false;
|
||||
}
|
||||
LogCombat("[Bot::Attack] Attacking with weapon: [{}] ([{}])", weapon->GetItem()->Name, weapon->GetID());
|
||||
LogCombat("Attacking with weapon: [{}] ([{}])", weapon->GetItem()->Name, weapon->GetID());
|
||||
}
|
||||
else
|
||||
LogCombat("[Bot::Attack] Attacking without a weapon");
|
||||
LogCombat("Attacking without a weapon");
|
||||
|
||||
// calculate attack_skill and skillinuse depending on hand and weapon
|
||||
// also send Packet to near clients
|
||||
DamageHitInfo my_hit;
|
||||
my_hit.skill = AttackAnimation(Hand, weapon);
|
||||
LogCombat("[Bot::Attack] Attacking with [{}] in slot [{}] using skill [{}]", weapon?weapon->GetItem()->Name:"Fist", Hand, my_hit.skill);
|
||||
LogCombat("Attacking with [{}] in slot [{}] using skill [{}]", weapon?weapon->GetItem()->Name:"Fist", Hand, my_hit.skill);
|
||||
|
||||
// Now figure out damage
|
||||
my_hit.damage_done = 1;
|
||||
@@ -5433,7 +5433,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
}
|
||||
}
|
||||
|
||||
LogCombat("[Bot::Attack] Damage calculated: base [{}] min damage [{}] skill [{}]", my_hit.base_damage, my_hit.min_damage, my_hit.skill);
|
||||
LogCombat("Damage calculated: base [{}] min damage [{}] skill [{}]", my_hit.base_damage, my_hit.min_damage, my_hit.skill);
|
||||
|
||||
int hit_chance_bonus = 0;
|
||||
my_hit.offense = offense(my_hit.skill);
|
||||
@@ -5451,7 +5451,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
|
||||
DoAttack(other, my_hit, opts, FromRiposte);
|
||||
|
||||
LogCombat("[Bot::Attack] Final damage after all reductions: [{}]", my_hit.damage_done);
|
||||
LogCombat("Final damage after all reductions: [{}]", my_hit.damage_done);
|
||||
} else {
|
||||
my_hit.damage_done = DMG_INVULNERABLE;
|
||||
}
|
||||
@@ -5515,7 +5515,7 @@ float Bot::GetProcChances(float ProcBonus, uint16 hand) {
|
||||
ProcChance += (ProcChance * ProcBonus / 100.0f);
|
||||
}
|
||||
|
||||
LogCombat("[Bot::GetProcChances] Proc chance [{}] ([{}] from bonuses)", ProcChance, ProcBonus);
|
||||
LogCombat("Proc chance [{}] ([{}] from bonuses)", ProcChance, ProcBonus);
|
||||
return ProcChance;
|
||||
}
|
||||
|
||||
@@ -5569,13 +5569,13 @@ bool Bot::TryFinishingBlow(Mob *defender, int64 &damage)
|
||||
int fb_damage = aabonuses.FinishingBlow[1];
|
||||
int levelreq = aabonuses.FinishingBlowLvl[0];
|
||||
if (defender->GetLevel() <= levelreq && (chance >= zone->random.Int(1, 1000))) {
|
||||
LogCombat("[Bot::TryFinishingBlow] Landed a finishing blow: levelreq at [{}] other level [{}]",
|
||||
LogCombat("Landed a finishing blow: levelreq at [{}] other level [{}]",
|
||||
levelreq, defender->GetLevel());
|
||||
entity_list.MessageCloseString(this, false, 200, Chat::MeleeCrit, FINISHING_BLOW, GetName());
|
||||
damage = fb_damage;
|
||||
return true;
|
||||
} else {
|
||||
LogCombat("[Bot::TryFinishingBlow] failed a finishing blow: levelreq at [{}] other level [{}]",
|
||||
LogCombat("failed a finishing blow: levelreq at [{}] other level [{}]",
|
||||
levelreq, defender->GetLevel());
|
||||
return false;
|
||||
}
|
||||
@@ -5584,14 +5584,14 @@ bool Bot::TryFinishingBlow(Mob *defender, int64 &damage)
|
||||
}
|
||||
|
||||
void Bot::DoRiposte(Mob* defender) {
|
||||
LogCombatDetail("[Bot::DoRiposte] Preforming a riposte");
|
||||
LogCombatDetail("Preforming a riposte");
|
||||
if (!defender)
|
||||
return;
|
||||
|
||||
defender->Attack(this, EQ::invslot::slotPrimary, true);
|
||||
int32 DoubleRipChance = (defender->GetAABonuses().GiveDoubleRiposte[0] + defender->GetSpellBonuses().GiveDoubleRiposte[0] + defender->GetItemBonuses().GiveDoubleRiposte[0]);
|
||||
if(DoubleRipChance && (DoubleRipChance >= zone->random.Int(0, 100))) {
|
||||
LogCombatDetail("[Bot::DoRiposte] Preforming a double riposte ([{}] percent chance)", DoubleRipChance);
|
||||
LogCombatDetail("Preforming a double riposte ([{}] percent chance)", DoubleRipChance);
|
||||
defender->Attack(this, EQ::invslot::slotPrimary, true);
|
||||
}
|
||||
|
||||
@@ -6327,7 +6327,7 @@ int64 Bot::CalcMaxMana() {
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
LogDebug("[Bot::CalcMaxMana] Invalid Class [{}] in CalcMaxMana", GetCasterClass());
|
||||
LogDebug("Invalid Class [{}] in CalcMaxMana", GetCasterClass());
|
||||
max_mana = 0;
|
||||
break;
|
||||
}
|
||||
@@ -6527,7 +6527,7 @@ bool Bot::CastSpell(
|
||||
}
|
||||
|
||||
if (DivineAura()) {
|
||||
LogSpellsDetail("[Bot::CastSpell] Spell casting canceled: cannot cast while Divine Aura is in effect");
|
||||
LogSpellsDetail("Spell casting canceled: cannot cast while Divine Aura is in effect");
|
||||
InterruptSpell(173, 0x121, false);
|
||||
return false;
|
||||
}
|
||||
@@ -6543,7 +6543,7 @@ bool Bot::CastSpell(
|
||||
}
|
||||
|
||||
if (HasActiveSong()) {
|
||||
LogSpellsDetail("[Bot::CastSpell] Casting a new spell/song while singing a song. Killing old song [{}]", bardsong);
|
||||
LogSpellsDetail("Casting a new spell/song while singing a song. Killing old song [{}]", bardsong);
|
||||
bardsong = 0;
|
||||
bardsong_target_id = 0;
|
||||
bardsong_slot = EQ::spells::CastingSlot::Gem1;
|
||||
@@ -6758,7 +6758,7 @@ bool Bot::DoFinishedSpellSingleTarget(uint16 spell_id, Mob* spellTarget, EQ::spe
|
||||
if((spelltypeequal || spelltypetargetequal) || spelltypeclassequal || slotequal) {
|
||||
if(((spells[thespell].effect_id[0] == 0) && (spells[thespell].base_value[0] < 0)) &&
|
||||
(spellTarget->GetHP() < ((spells[thespell].base_value[0] * (-1)) + 100))) {
|
||||
LogSpells("[Bot::DoFinishedSpellSingleTarget] GroupBuffing failure");
|
||||
LogSpells("GroupBuffing failure");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user