mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
Logs::Spells to LogSpells
This commit is contained in:
parent
b83c0f8bf9
commit
af4c630ede
@ -1653,7 +1653,7 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
|
||||
}
|
||||
|
||||
if(results.ColumnCount() <= SPELL_LOAD_FIELD_COUNT) {
|
||||
Log(Logs::Detail, Logs::Spells, "Fatal error loading spells: Spell field count < SPELL_LOAD_FIELD_COUNT(%u)", SPELL_LOAD_FIELD_COUNT);
|
||||
LogSpells("Fatal error loading spells: Spell field count < SPELL_LOAD_FIELD_COUNT([{}])", SPELL_LOAD_FIELD_COUNT);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1663,7 +1663,7 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
tempid = atoi(row[0]);
|
||||
if(tempid >= max_spells) {
|
||||
Log(Logs::Detail, Logs::Spells, "Non fatal error: spell.id >= max_spells, ignoring.");
|
||||
LogSpells("Non fatal error: spell.id >= max_spells, ignoring");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@ -850,7 +850,7 @@ DmgShieldType GetDamageShieldType(uint16 spell_id, int32 DSType)
|
||||
// If we have a DamageShieldType for this spell from the damageshieldtypes table, return that,
|
||||
// else, make a guess, based on the resist type. Default return value is DS_THORNS
|
||||
if (IsValidSpell(spell_id)) {
|
||||
Log(Logs::Detail, Logs::Spells, "DamageShieldType for spell %i (%s) is %X\n", spell_id,
|
||||
LogSpells("DamageShieldType for spell [{}] ([{}]) is %X\n", spell_id,
|
||||
spells[spell_id].name, spells[spell_id].DamageShieldType);
|
||||
|
||||
if (spells[spell_id].DamageShieldType)
|
||||
|
||||
@ -3054,16 +3054,14 @@ int32 Mob::ReduceDamage(int32 damage)
|
||||
int damage_to_reduce = damage * spellbonuses.MeleeThresholdGuard[0] / 100;
|
||||
if (damage_to_reduce >= buffs[slot].melee_rune)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Mob::ReduceDamage SE_MeleeThresholdGuard %d damage negated, %d"
|
||||
" damage remaining, fading buff.", damage_to_reduce, buffs[slot].melee_rune);
|
||||
LogSpells("Mob::ReduceDamage SE_MeleeThresholdGuard [{}] damage negated, [{}] damage remaining, fading buff", damage_to_reduce, buffs[slot].melee_rune);
|
||||
damage -= buffs[slot].melee_rune;
|
||||
if (!TryFadeEffect(slot))
|
||||
BuffFadeBySlot(slot);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Mob::ReduceDamage SE_MeleeThresholdGuard %d damage negated, %d"
|
||||
" damage remaining.", damage_to_reduce, buffs[slot].melee_rune);
|
||||
LogSpells("Mob::ReduceDamage SE_MeleeThresholdGuard [{}] damage negated, [{}] damage remaining", damage_to_reduce, buffs[slot].melee_rune);
|
||||
buffs[slot].melee_rune = (buffs[slot].melee_rune - damage_to_reduce);
|
||||
damage -= damage_to_reduce;
|
||||
}
|
||||
@ -3081,16 +3079,14 @@ int32 Mob::ReduceDamage(int32 damage)
|
||||
|
||||
if (spellbonuses.MitigateMeleeRune[3] && (damage_to_reduce >= buffs[slot].melee_rune))
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Mob::ReduceDamage SE_MitigateMeleeDamage %d damage negated, %d"
|
||||
" damage remaining, fading buff.", damage_to_reduce, buffs[slot].melee_rune);
|
||||
LogSpells("Mob::ReduceDamage SE_MitigateMeleeDamage [{}] damage negated, [{}] damage remaining, fading buff", damage_to_reduce, buffs[slot].melee_rune);
|
||||
damage -= buffs[slot].melee_rune;
|
||||
if (!TryFadeEffect(slot))
|
||||
BuffFadeBySlot(slot);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Mob::ReduceDamage SE_MitigateMeleeDamage %d damage negated, %d"
|
||||
" damage remaining.", damage_to_reduce, buffs[slot].melee_rune);
|
||||
LogSpells("Mob::ReduceDamage SE_MitigateMeleeDamage [{}] damage negated, [{}] damage remaining", damage_to_reduce, buffs[slot].melee_rune);
|
||||
|
||||
if (spellbonuses.MitigateMeleeRune[3])
|
||||
buffs[slot].melee_rune = (buffs[slot].melee_rune - damage_to_reduce);
|
||||
@ -3207,16 +3203,14 @@ int32 Mob::AffectMagicalDamage(int32 damage, uint16 spell_id, const bool iBuffTi
|
||||
|
||||
if (spellbonuses.MitigateSpellRune[3] && (damage_to_reduce >= buffs[slot].magic_rune))
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Mob::ReduceDamage SE_MitigateSpellDamage %d damage negated, %d"
|
||||
" damage remaining, fading buff.", damage_to_reduce, buffs[slot].magic_rune);
|
||||
LogSpells("Mob::ReduceDamage SE_MitigateSpellDamage [{}] damage negated, [{}] damage remaining, fading buff", damage_to_reduce, buffs[slot].magic_rune);
|
||||
damage -= buffs[slot].magic_rune;
|
||||
if (!TryFadeEffect(slot))
|
||||
BuffFadeBySlot(slot);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Mob::ReduceDamage SE_MitigateMeleeDamage %d damage negated, %d"
|
||||
" damage remaining.", damage_to_reduce, buffs[slot].magic_rune);
|
||||
LogSpells("Mob::ReduceDamage SE_MitigateMeleeDamage [{}] damage negated, [{}] damage remaining", damage_to_reduce, buffs[slot].magic_rune);
|
||||
|
||||
if (spellbonuses.MitigateSpellRune[3])
|
||||
buffs[slot].magic_rune = (buffs[slot].magic_rune - damage_to_reduce);
|
||||
|
||||
20
zone/bot.cpp
20
zone/bot.cpp
@ -5268,7 +5268,7 @@ int32 Bot::CalcBotFocusEffect(BotfocusType bottype, uint16 focus_id, uint16 spel
|
||||
break;
|
||||
}
|
||||
default:
|
||||
Log(Logs::General, Logs::Spells, "CalcFocusEffect: unknown effectid %d", focus_spell.effectid[i]);
|
||||
LogSpells("CalcFocusEffect: unknown effectid [{}]", focus_spell.effectid[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -6435,14 +6435,14 @@ bool Bot::CastSpell(uint16 spell_id, uint16 target_id, EQEmu::spells::CastingSlo
|
||||
uint32* oSpellWillFinish, uint32 item_slot, int16 *resist_adjust, uint32 aa_id) {
|
||||
bool Result = false;
|
||||
if(zone && !zone->IsSpellBlocked(spell_id, glm::vec3(GetPosition()))) {
|
||||
Log(Logs::Detail, Logs::Spells, "CastSpell called for spell %s (%d) on entity %d, slot %d, time %d, mana %d, from item slot %d", spells[spell_id].name, spell_id, target_id, slot, cast_time, mana_cost, (item_slot==0xFFFFFFFF)?999:item_slot);
|
||||
LogSpells("CastSpell called for spell [{}] ([{}]) on entity [{}], slot [{}], time [{}], mana [{}], from item slot [{}]", spells[spell_id].name, spell_id, target_id, slot, cast_time, mana_cost, (item_slot==0xFFFFFFFF)?999:item_slot);
|
||||
|
||||
if(casting_spell_id == spell_id)
|
||||
ZeroCastingVars();
|
||||
|
||||
if(GetClass() != BARD) {
|
||||
if(!IsValidSpell(spell_id) || casting_spell_id || delaytimer || spellend_timer.Enabled() || IsStunned() || IsFeared() || IsMezzed() || (IsSilenced() && !IsDiscipline(spell_id)) || (IsAmnesiad() && IsDiscipline(spell_id))) {
|
||||
Log(Logs::Detail, Logs::Spells, "Spell casting canceled: not able to cast now. Valid? %d, casting %d, waiting? %d, spellend? %d, stunned? %d, feared? %d, mezed? %d, silenced? %d", IsValidSpell(spell_id), casting_spell_id, delaytimer, spellend_timer.Enabled(), IsStunned(), IsFeared(), IsMezzed(), IsSilenced() );
|
||||
LogSpells("Spell casting canceled: not able to cast now. Valid? [{}], casting [{}], waiting? [{}], spellend? [{}], stunned? [{}], feared? [{}], mezed? [{}], silenced? [{}]", IsValidSpell(spell_id), casting_spell_id, delaytimer, spellend_timer.Enabled(), IsStunned(), IsFeared(), IsMezzed(), IsSilenced() );
|
||||
if(IsSilenced() && !IsDiscipline(spell_id))
|
||||
MessageString(Chat::Red, SILENCED_STRING);
|
||||
|
||||
@ -6466,7 +6466,7 @@ bool Bot::CastSpell(uint16 spell_id, uint16 target_id, EQEmu::spells::CastingSlo
|
||||
}
|
||||
|
||||
if(DivineAura()) {
|
||||
Log(Logs::Detail, Logs::Spells, "Spell casting canceled: cannot cast while Divine Aura is in effect.");
|
||||
LogSpells("Spell casting canceled: cannot cast while Divine Aura is in effect");
|
||||
InterruptSpell(173, 0x121, false);
|
||||
return false;
|
||||
}
|
||||
@ -6476,13 +6476,13 @@ bool Bot::CastSpell(uint16 spell_id, uint16 target_id, EQEmu::spells::CastingSlo
|
||||
InterruptSpell(fizzle_msg, 0x121, spell_id);
|
||||
|
||||
uint32 use_mana = ((spells[spell_id].mana) / 4);
|
||||
Log(Logs::Detail, Logs::Spells, "Spell casting canceled: fizzled. %d mana has been consumed", use_mana);
|
||||
LogSpells("Spell casting canceled: fizzled. [{}] mana has been consumed", use_mana);
|
||||
SetMana(GetMana() - use_mana);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (HasActiveSong()) {
|
||||
Log(Logs::Detail, Logs::Spells, "Casting a new spell/song while singing a song. Killing old song %d.", bardsong);
|
||||
LogSpells("Casting a new spell/song while singing a song. Killing old song [{}]", bardsong);
|
||||
bardsong = 0;
|
||||
bardsong_target_id = 0;
|
||||
bardsong_slot = EQEmu::spells::CastingSlot::Gem1;
|
||||
@ -6596,19 +6596,19 @@ bool Bot::IsImmuneToSpell(uint16 spell_id, Mob *caster) {
|
||||
if(caster->IsBot()) {
|
||||
if(spells[spell_id].targettype == ST_Undead) {
|
||||
if((GetBodyType() != BT_SummonedUndead) && (GetBodyType() != BT_Undead) && (GetBodyType() != BT_Vampire)) {
|
||||
Log(Logs::Detail, Logs::Spells, "Bot's target is not an undead.");
|
||||
LogSpells("Bot's target is not an undead");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(spells[spell_id].targettype == ST_Summoned) {
|
||||
if((GetBodyType() != BT_SummonedUndead) && (GetBodyType() != BT_Summoned) && (GetBodyType() != BT_Summoned2) && (GetBodyType() != BT_Summoned3)) {
|
||||
Log(Logs::Detail, Logs::Spells, "Bot's target is not a summoned creature.");
|
||||
LogSpells("Bot's target is not a summoned creature");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Spells, "No bot immunities to spell %d found.", spell_id);
|
||||
LogSpells("No bot immunities to spell [{}] found", spell_id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -6759,7 +6759,7 @@ bool Bot::DoFinishedSpellSingleTarget(uint16 spell_id, Mob* spellTarget, EQEmu::
|
||||
if((spelltypeequal || spelltypetargetequal) || spelltypeclassequal || slotequal) {
|
||||
if(((spells[thespell].effectid[0] == 0) && (spells[thespell].base[0] < 0)) &&
|
||||
(spellTarget->GetHP() < ((spells[thespell].base[0] * (-1)) + 100))) {
|
||||
Log(Logs::General, Logs::Spells, "Bot::DoFinishedSpellSingleTarget - GroupBuffing failure");
|
||||
LogSpells("Bot::DoFinishedSpellSingleTarget - GroupBuffing failure");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -576,7 +576,7 @@ int32 Client::CalcMaxMana()
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
Log(Logs::Detail, Logs::Spells, "Invalid Class '%c' in CalcMaxMana", GetCasterClass());
|
||||
LogSpells("Invalid Class [{}] in CalcMaxMana", GetCasterClass());
|
||||
max_mana = 0;
|
||||
break;
|
||||
}
|
||||
@ -594,7 +594,7 @@ int32 Client::CalcMaxMana()
|
||||
current_mana = curMana_cap;
|
||||
}
|
||||
}
|
||||
Log(Logs::Detail, Logs::Spells, "Client::CalcMaxMana() called for %s - returning %d", GetName(), max_mana);
|
||||
LogSpells("Client::CalcMaxMana() called for [{}] - returning [{}]", GetName(), max_mana);
|
||||
return max_mana;
|
||||
}
|
||||
|
||||
@ -1597,8 +1597,9 @@ uint32 Mob::GetInstrumentMod(uint16 spell_id) const
|
||||
effectmod = 10;
|
||||
if (!nocap && effectmod > effectmodcap) // if the cap is calculated to be 0 using new rules, no cap.
|
||||
effectmod = effectmodcap;
|
||||
Log(Logs::Detail, Logs::Spells, "%s::GetInstrumentMod() spell=%d mod=%d modcap=%d\n", GetName(), spell_id,
|
||||
effectmod, effectmodcap);
|
||||
|
||||
LogSpells("[{}]::GetInstrumentMod() spell=[{}] mod=[{}] modcap=[{}]\n", GetName(), spell_id, effectmod, effectmodcap);
|
||||
|
||||
return effectmod;
|
||||
}
|
||||
|
||||
|
||||
@ -3868,7 +3868,7 @@ void Client::Handle_OP_Buff(const EQApplicationPacket *app)
|
||||
|
||||
SpellBuffPacket_Struct* sbf = (SpellBuffPacket_Struct*)app->pBuffer;
|
||||
uint32 spid = sbf->buff.spellid;
|
||||
Log(Logs::Detail, Logs::Spells, "Client requested that buff with spell id %d be canceled.", spid);
|
||||
LogSpells("Client requested that buff with spell id [{}] be canceled", spid);
|
||||
|
||||
//something about IsDetrimentalSpell() crashes this portion of code..
|
||||
//tbh we shouldn't use it anyway since this is a simple red vs blue buff check and
|
||||
@ -4027,7 +4027,7 @@ void Client::Handle_OP_CastSpell(const EQApplicationPacket *app)
|
||||
|
||||
m_TargetRing = glm::vec3(castspell->x_pos, castspell->y_pos, castspell->z_pos);
|
||||
|
||||
Log(Logs::General, Logs::Spells, "OP CastSpell: slot=%d, spell=%d, target=%d, inv=%lx", castspell->slot, castspell->spell_id, castspell->target_id, (unsigned long)castspell->inventoryslot);
|
||||
LogSpells("OP CastSpell: slot=[{}], spell=[{}], target=[{}], inv=%lx", castspell->slot, castspell->spell_id, castspell->target_id, (unsigned long)castspell->inventoryslot);
|
||||
CastingSlot slot = static_cast<CastingSlot>(castspell->slot);
|
||||
|
||||
/* Memorized Spell */
|
||||
@ -4123,7 +4123,7 @@ void Client::Handle_OP_CastSpell(const EQApplicationPacket *app)
|
||||
/* Discipline -- older clients use the same slot as items, but we translate to it's own */
|
||||
else if (slot == CastingSlot::Discipline) {
|
||||
if (!UseDiscipline(castspell->spell_id, castspell->target_id)) {
|
||||
Log(Logs::General, Logs::Spells, "Unknown ability being used by %s, spell being cast is: %i\n", GetName(), castspell->spell_id);
|
||||
LogSpells("Unknown ability being used by [{}], spell being cast is: [{}]\n", GetName(), castspell->spell_id);
|
||||
InterruptSpell(castspell->spell_id);
|
||||
return;
|
||||
}
|
||||
@ -12091,7 +12091,7 @@ void Client::Handle_OP_RezzAnswer(const EQApplicationPacket *app)
|
||||
|
||||
const Resurrect_Struct* ra = (const Resurrect_Struct*)app->pBuffer;
|
||||
|
||||
Log(Logs::Detail, Logs::Spells, "Received OP_RezzAnswer from client. Pendingrezzexp is %i, action is %s",
|
||||
LogSpells("Received OP_RezzAnswer from client. Pendingrezzexp is [{}], action is [{}]",
|
||||
PendingRezzXP, ra->action ? "ACCEPT" : "DECLINE");
|
||||
|
||||
|
||||
|
||||
@ -988,7 +988,7 @@ void Client::OPRezzAnswer(uint32 Action, uint32 SpellID, uint16 ZoneID, uint16 I
|
||||
{
|
||||
if(PendingRezzXP < 0) {
|
||||
// pendingrezexp is set to -1 if we are not expecting an OP_RezzAnswer
|
||||
Log(Logs::Detail, Logs::Spells, "Unexpected OP_RezzAnswer. Ignoring it.");
|
||||
LogSpells("Unexpected OP_RezzAnswer. Ignoring it");
|
||||
Message(Chat::Red, "You have already been resurrected.\n");
|
||||
return;
|
||||
}
|
||||
@ -998,7 +998,7 @@ void Client::OPRezzAnswer(uint32 Action, uint32 SpellID, uint16 ZoneID, uint16 I
|
||||
// Mark the corpse as rezzed in the database, just in case the corpse has buried, or the zone the
|
||||
// corpse is in has shutdown since the rez spell was cast.
|
||||
database.MarkCorpseAsRezzed(PendingRezzDBID);
|
||||
Log(Logs::Detail, Logs::Spells, "Player %s got a %i Rezz, spellid %i in zone%i, instance id %i",
|
||||
LogSpells("Player [{}] got a [{}] Rezz, spellid [{}] in zone[{}], instance id [{}]",
|
||||
this->name, (uint16)spells[SpellID].base[0],
|
||||
SpellID, ZoneID, InstanceID);
|
||||
|
||||
@ -2004,7 +2004,7 @@ void Client::HandleRespawnFromHover(uint32 Option)
|
||||
{
|
||||
if (PendingRezzXP < 0 || PendingRezzSpellID == 0)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Unexpected Rezz from hover request.");
|
||||
LogSpells("Unexpected Rezz from hover request");
|
||||
return;
|
||||
}
|
||||
SetHP(GetMaxHP() / 5);
|
||||
@ -2038,10 +2038,10 @@ void Client::HandleRespawnFromHover(uint32 Option)
|
||||
|
||||
if (corpse && corpse->IsCorpse())
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Hover Rez in zone %s for corpse %s",
|
||||
LogSpells("Hover Rez in zone [{}] for corpse [{}]",
|
||||
zone->GetShortName(), PendingRezzCorpseName.c_str());
|
||||
|
||||
Log(Logs::Detail, Logs::Spells, "Found corpse. Marking corpse as rezzed.");
|
||||
LogSpells("Found corpse. Marking corpse as rezzed");
|
||||
|
||||
corpse->IsRezzed(true);
|
||||
corpse->CompleteResurrection();
|
||||
|
||||
@ -835,7 +835,7 @@ void Group::CastGroupSpell(Mob* caster, uint16 spell_id) {
|
||||
caster->SpellOnTarget(spell_id, members[z]->GetPet());
|
||||
#endif
|
||||
} else
|
||||
Log(Logs::Detail, Logs::Spells, "Group spell: %s is out of range %f at distance %f from %s", members[z]->GetName(), range, distance, caster->GetName());
|
||||
LogSpells("Group spell: [{}] is out of range [{}] at distance [{}] from [{}]", members[z]->GetName(), range, distance, caster->GetName());
|
||||
}
|
||||
}
|
||||
|
||||
@ -874,7 +874,7 @@ void Group::GroupBardPulse(Mob* caster, uint16 spell_id) {
|
||||
members[z]->GetPet()->BardPulse(spell_id, caster);
|
||||
#endif
|
||||
} else
|
||||
Log(Logs::Detail, Logs::Spells, "Group bard pulse: %s is out of range %f at distance %f from %s", members[z]->GetName(), range, distance, caster->GetName());
|
||||
LogSpells("Group bard pulse: [{}] is out of range [{}] at distance [{}] from [{}]", members[z]->GetName(), range, distance, caster->GetName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1840,9 +1840,7 @@ void Mob::SendIllusionPacket(
|
||||
/* Refresh armor and tints after send illusion packet */
|
||||
this->SendArmorAppearance();
|
||||
|
||||
Log(Logs::Detail,
|
||||
Logs::Spells,
|
||||
"Illusion: Race = %i, Gender = %i, Texture = %i, HelmTexture = %i, HairColor = %i, BeardColor = %i, EyeColor1 = %i, EyeColor2 = %i, HairStyle = %i, Face = %i, DrakkinHeritage = %i, DrakkinTattoo = %i, DrakkinDetails = %i, Size = %f",
|
||||
LogSpells("Illusion: Race = [{}], Gender = [{}], Texture = [{}], HelmTexture = [{}], HairColor = [{}], BeardColor = [{}], EyeColor1 = [{}], EyeColor2 = [{}], HairStyle = [{}], Face = [{}], DrakkinHeritage = [{}], DrakkinTattoo = [{}], DrakkinDetails = [{}], Size = [{}]",
|
||||
race,
|
||||
gender,
|
||||
new_texture,
|
||||
@ -3063,7 +3061,7 @@ void Mob::ExecWeaponProc(const EQEmu::ItemInstance *inst, uint16 spell_id, Mob *
|
||||
if(!IsValidSpell(spell_id)) { // Check for a valid spell otherwise it will crash through the function
|
||||
if(IsClient()){
|
||||
Message(0, "Invalid spell proc %u", spell_id);
|
||||
Log(Logs::Detail, Logs::Spells, "Player %s, Weapon Procced invalid spell %u", this->GetName(), spell_id);
|
||||
LogSpells("Player [{}], Weapon Procced invalid spell [{}]", this->GetName(), spell_id);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2034,7 +2034,7 @@ bool NPC::AI_IdleCastCheck() {
|
||||
//last duration it was set to... try to put up a more reasonable timer...
|
||||
AIautocastspell_timer->Start(RandomTimer(AISpellVar.idle_no_sp_recast_min, AISpellVar.idle_no_sp_recast_max), false);
|
||||
|
||||
Log(Logs::Moderate, Logs::Spells, "Triggering AI_IdleCastCheck :: Mob %s - Min : %u Max : %u", this->GetCleanName(), AISpellVar.idle_no_sp_recast_min, AISpellVar.idle_no_sp_recast_max);
|
||||
LogSpells("Triggering AI_IdleCastCheck :: Mob [{}] - Min : [{}] Max : [{}]", this->GetCleanName(), AISpellVar.idle_no_sp_recast_min, AISpellVar.idle_no_sp_recast_max);
|
||||
|
||||
} //else, spell casting finishing will reset the timer.
|
||||
} //else, spell casting finishing will reset the timer.
|
||||
|
||||
@ -547,7 +547,7 @@ void Raid::CastGroupSpell(Mob* caster, uint16 spellid, uint32 gid)
|
||||
#endif
|
||||
}
|
||||
else{
|
||||
Log(Logs::Detail, Logs::Spells, "Raid spell: %s is out of range %f at distance %f from %s", members[x].member->GetName(), range, distance, caster->GetName());
|
||||
LogSpells("Raid spell: [{}] is out of range [{}] at distance [{}] from [{}]", members[x].member->GetName(), range, distance, caster->GetName());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -848,7 +848,7 @@ void Raid::GroupBardPulse(Mob* caster, uint16 spellid, uint32 gid){
|
||||
members[z].member->GetPet()->BardPulse(spellid, caster);
|
||||
#endif
|
||||
} else
|
||||
Log(Logs::Detail, Logs::Spells, "Group bard pulse: %s is out of range %f at distance %f from %s", members[z].member->GetName(), range, distance, caster->GetName());
|
||||
LogSpells("Group bard pulse: [{}] is out of range [{}] at distance [{}] from [{}]", members[z].member->GetName(), range, distance, caster->GetName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1678,7 +1678,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
if (IsCorpse() && CastToCorpse()->IsPlayerCorpse()) {
|
||||
|
||||
if(caster)
|
||||
Log(Logs::Detail, Logs::Spells, " corpse being rezzed using spell %i by %s",
|
||||
LogSpells(" corpse being rezzed using spell [{}] by [{}]",
|
||||
spell_id, caster->GetName());
|
||||
|
||||
CastToCorpse()->CastRezz(spell_id, caster);
|
||||
@ -3060,7 +3060,7 @@ int Mob::CalcSpellEffectValue(uint16 spell_id, int effect_id, int caster_level,
|
||||
int oval = effect_value;
|
||||
int mod = ApplySpellEffectiveness(spell_id, instrument_mod, true, caster_id);
|
||||
effect_value = effect_value * mod / 10;
|
||||
Log(Logs::Detail, Logs::Spells, "Effect value %d altered with bard modifier of %d to yeild %d",
|
||||
LogSpells("Effect value [{}] altered with bard modifier of [{}] to yeild [{}]",
|
||||
oval, mod, effect_value);
|
||||
}
|
||||
|
||||
@ -3123,7 +3123,7 @@ snare has both of them negative, yet their range should work the same:
|
||||
updownsign = 1;
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Spells, "CSEV: spell %d, formula %d, base %d, max %d, lvl %d. Up/Down %d",
|
||||
LogSpells("CSEV: spell [{}], formula [{}], base [{}], max [{}], lvl [{}]. Up/Down [{}]",
|
||||
spell_id, formula, base, max, caster_level, updownsign);
|
||||
|
||||
switch(formula)
|
||||
@ -3370,7 +3370,7 @@ snare has both of them negative, yet their range should work the same:
|
||||
if (base < 0 && result > 0)
|
||||
result *= -1;
|
||||
|
||||
Log(Logs::Detail, Logs::Spells, "Result: %d (orig %d), cap %d %s", result, oresult, max, (base < 0 && result > 0)?"Inverted due to negative base":"");
|
||||
LogSpells("Result: [{}] (orig [{}]), cap [{}] [{}]", result, oresult, max, (base < 0 && result > 0)?"Inverted due to negative base":"");
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -3397,12 +3397,12 @@ void Mob::BuffProcess()
|
||||
--buffs[buffs_i].ticsremaining;
|
||||
|
||||
if (buffs[buffs_i].ticsremaining < 0) {
|
||||
Log(Logs::Detail, Logs::Spells, "Buff %d in slot %d has expired. Fading.", buffs[buffs_i].spellid, buffs_i);
|
||||
LogSpells("Buff [{}] in slot [{}] has expired. Fading", buffs[buffs_i].spellid, buffs_i);
|
||||
BuffFadeBySlot(buffs_i);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Buff %d in slot %d has %d tics remaining.", buffs[buffs_i].spellid, buffs_i, buffs[buffs_i].ticsremaining);
|
||||
LogSpells("Buff [{}] in slot [{}] has [{}] tics remaining", buffs[buffs_i].spellid, buffs_i, buffs[buffs_i].ticsremaining);
|
||||
}
|
||||
}
|
||||
else if (IsClient() && !(CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoFAndLater))
|
||||
@ -3733,7 +3733,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
|
||||
if (IsClient() && !CastToClient()->IsDead())
|
||||
CastToClient()->MakeBuffFadePacket(buffs[slot].spellid, slot);
|
||||
|
||||
Log(Logs::Detail, Logs::Spells, "Fading buff %d from slot %d", buffs[slot].spellid, slot);
|
||||
LogSpells("Fading buff [{}] from slot [{}]", buffs[slot].spellid, slot);
|
||||
|
||||
if(spells[buffs[slot].spellid].viral_targets > 0) {
|
||||
bool last_virus = true;
|
||||
|
||||
334
zone/spells.cpp
334
zone/spells.cpp
File diff suppressed because it is too large
Load Diff
@ -747,7 +747,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
//pendingrezexp is the amount of XP on the corpse. Setting it to a value >= 0
|
||||
//also serves to inform Client::OPRezzAnswer to expect a packet.
|
||||
client->SetPendingRezzData(srs->exp, srs->dbid, srs->rez.spellid, srs->rez.corpse_name);
|
||||
Log(Logs::Detail, Logs::Spells, "OP_RezzRequest in zone %s for %s, spellid:%i",
|
||||
LogSpells("OP_RezzRequest in zone [{}] for [{}], spellid:[{}]",
|
||||
zone->GetShortName(), client->GetName(), srs->rez.spellid);
|
||||
auto outapp = new EQApplicationPacket(OP_RezzRequest,
|
||||
sizeof(Resurrect_Struct));
|
||||
@ -762,10 +762,10 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
// to the zone that the corpse is in.
|
||||
Corpse* corpse = entity_list.GetCorpseByName(srs->rez.corpse_name);
|
||||
if (corpse && corpse->IsCorpse()) {
|
||||
Log(Logs::Detail, Logs::Spells, "OP_RezzComplete received in zone %s for corpse %s",
|
||||
LogSpells("OP_RezzComplete received in zone [{}] for corpse [{}]",
|
||||
zone->GetShortName(), srs->rez.corpse_name);
|
||||
|
||||
Log(Logs::Detail, Logs::Spells, "Found corpse. Marking corpse as rezzed if needed.");
|
||||
LogSpells("Found corpse. Marking corpse as rezzed if needed");
|
||||
// I don't know why Rezzed is not set to true in CompleteRezz().
|
||||
if (!IsEffectInSpell(srs->rez.spellid, SE_SummonToCorpse)) {
|
||||
corpse->IsRezzed(true);
|
||||
@ -2103,7 +2103,7 @@ bool WorldServer::SendVoiceMacro(Client* From, uint32 Type, char* Target, uint32
|
||||
|
||||
bool WorldServer::RezzPlayer(EQApplicationPacket* rpack, uint32 rezzexp, uint32 dbid, uint16 opcode)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "WorldServer::RezzPlayer rezzexp is %i (0 is normal for RezzComplete", rezzexp);
|
||||
LogSpells("WorldServer::RezzPlayer rezzexp is [{}] (0 is normal for RezzComplete", rezzexp);
|
||||
auto pack = new ServerPacket(ServerOP_RezzPlayer, sizeof(RezzPlayer_Struct));
|
||||
RezzPlayer_Struct* sem = (RezzPlayer_Struct*)pack->pBuffer;
|
||||
sem->rezzopcode = opcode;
|
||||
@ -2112,9 +2112,9 @@ bool WorldServer::RezzPlayer(EQApplicationPacket* rpack, uint32 rezzexp, uint32
|
||||
sem->dbid = dbid;
|
||||
bool ret = SendPacket(pack);
|
||||
if (ret)
|
||||
Log(Logs::Detail, Logs::Spells, "Sending player rezz packet to world spellid:%i", sem->rez.spellid);
|
||||
LogSpells("Sending player rezz packet to world spellid:[{}]", sem->rez.spellid);
|
||||
else
|
||||
Log(Logs::Detail, Logs::Spells, "NOT Sending player rezz packet to world");
|
||||
LogSpells("NOT Sending player rezz packet to world");
|
||||
|
||||
safe_delete(pack);
|
||||
return ret;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user