changed DISABLED_ cmake variable to ENABLED_ and implemented for all disabled logs

This commit is contained in:
Yehonal
2017-08-19 19:42:48 +02:00
parent f888e8c86b
commit c1586e0d99
109 changed files with 3620 additions and 1228 deletions

View File

@@ -789,10 +789,14 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
return 0;
}
;//sLog->outStaticDebug("DealDamageStart");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("DealDamageStart");
#endif
uint32 health = victim->GetHealth();
;//sLog->outDetail("deal dmg:%d to health:%d ", damage, health);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDetail("deal dmg:%d to health:%d ", damage, health);
#endif
// duel ends when player has 1 or less hp
bool duel_hasEnded = false;
@@ -856,7 +860,9 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
if (health <= damage)
{
;//sLog->outStaticDebug("DealDamage: victim just died");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("DealDamage: victim just died");
#endif
//if (attacker && victim->GetTypeId() == TYPEID_PLAYER && victim != attacker)
//victim->ToPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_TOTAL_DAMAGE_RECEIVED, health); // pussywizard: optimization
@@ -865,7 +871,9 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
}
else
{
;//sLog->outStaticDebug("DealDamageAlive");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("DealDamageAlive");
#endif
//if (victim->GetTypeId() == TYPEID_PLAYER)
// victim->ToPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_TOTAL_DAMAGE_RECEIVED, damage); // pussywizard: optimization
@@ -956,7 +964,9 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
}
}
;//sLog->outStaticDebug("DealDamageEnd returned %d damage", damage);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("DealDamageEnd returned %d damage", damage);
#endif
return damage;
}
@@ -1216,7 +1226,9 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage* damageInfo, bool durabilityLoss)
SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(damageInfo->SpellID);
if (spellProto == NULL)
{
;//sLog->outDebug(LOG_FILTER_UNITS, "Unit::DealSpellDamage has wrong damageInfo->SpellID: %u", damageInfo->SpellID);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_UNITS, "Unit::DealSpellDamage has wrong damageInfo->SpellID: %u", damageInfo->SpellID);
#endif
return;
}
@@ -2149,10 +2161,14 @@ void Unit::AttackerStateUpdate (Unit* victim, WeaponAttackType attType, bool ext
ProcDamageAndSpell(damageInfo.target, damageInfo.procAttacker, damageInfo.procVictim, damageInfo.procEx, damageInfo.damage, damageInfo.attackType);
/*if (GetTypeId() == TYPEID_PLAYER)
;//sLog->outStaticDebug("AttackerStateUpdate: (Player) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.",
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("AttackerStateUpdate: (Player) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.",
#endif
GetGUIDLow(), victim->GetGUIDLow(), victim->GetTypeId(), damageInfo.damage, damageInfo.absorb, damageInfo.blocked_amount, damageInfo.resist);
else
;//sLog->outStaticDebug("AttackerStateUpdate: (NPC) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.",
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("AttackerStateUpdate: (NPC) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.",
#endif
GetGUIDLow(), victim->GetGUIDLow(), victim->GetTypeId(), damageInfo.damage, damageInfo.absorb, damageInfo.blocked_amount, damageInfo.resist);*/
}
}
@@ -2223,7 +2239,9 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
// always crit against a sitting target (except 0 crit chance)
if (victim->GetTypeId() == TYPEID_PLAYER && crit_chance > 0 && !victim->IsStandState())
{
;//sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRIT (sitting victim)");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRIT (sitting victim)");
#endif
return MELEE_HIT_CRIT;
}
@@ -2257,7 +2275,9 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
&& ((tmp -= skillBonus) > 0)
&& roll < (sum += tmp))
{
;//sLog->outStaticDebug ("RollMeleeOutcomeAgainst: DODGE <%d, %d)", sum-tmp, sum);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug ("RollMeleeOutcomeAgainst: DODGE <%d, %d)", sum-tmp, sum);
#endif
return MELEE_HIT_DODGE;
}
}
@@ -2266,7 +2286,9 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
// check if attack comes from behind, nobody can parry or block if attacker is behind
if (!victim->HasInArc(M_PI, this) && !victim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION))
;//sLog->outStaticDebug ("RollMeleeOutcomeAgainst: attack came from behind.");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug ("RollMeleeOutcomeAgainst: attack came from behind.");
#endif
else
{
// Reduce parry chance by attacker expertise rating
@@ -2287,7 +2309,9 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
&& (tmp -= skillBonus) > 0
&& roll < (sum += tmp))
{
;//sLog->outStaticDebug ("RollMeleeOutcomeAgainst: PARRY <%d, %d)", sum-tmp2, sum);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug ("RollMeleeOutcomeAgainst: PARRY <%d, %d)", sum-tmp2, sum);
#endif
return MELEE_HIT_PARRY;
}
}
@@ -2304,7 +2328,9 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
&& (tmp -= skillBonus) > 0
&& roll < (sum += tmp))
{
;//sLog->outStaticDebug ("RollMeleeOutcomeAgainst: BLOCK <%d, %d)", sum-tmp, sum);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug ("RollMeleeOutcomeAgainst: BLOCK <%d, %d)", sum-tmp, sum);
#endif
return MELEE_HIT_BLOCK;
}
}
@@ -2325,7 +2351,9 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
tmp = tmp > 4000 ? 4000 : tmp;
if (roll < (sum += tmp))
{
;//sLog->outStaticDebug ("RollMeleeOutcomeAgainst: GLANCING <%d, %d)", sum-4000, sum);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug ("RollMeleeOutcomeAgainst: GLANCING <%d, %d)", sum-4000, sum);
#endif
return MELEE_HIT_GLANCING;
}
}
@@ -2349,7 +2377,9 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
tmp = tmp * 200 - 1500;
if (roll < (sum += tmp))
{
;//sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRUSHING <%d, %d)", sum-tmp, sum);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRUSHING <%d, %d)", sum-tmp, sum);
#endif
return MELEE_HIT_CRUSHING;
}
}
@@ -2360,14 +2390,20 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
if (tmp > 0 && roll < (sum += tmp))
{
;//sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRIT <%d, %d)", sum-tmp, sum);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRIT <%d, %d)", sum-tmp, sum);
#endif
if (GetTypeId() == TYPEID_UNIT && (ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_CRIT))
;//sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRIT DISABLED)");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRIT DISABLED)");
#endif
else
return MELEE_HIT_CRIT;
}
;//sLog->outStaticDebug ("RollMeleeOutcomeAgainst: NORMAL");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug ("RollMeleeOutcomeAgainst: NORMAL");
#endif
return MELEE_HIT_NORMAL;
}
@@ -2439,7 +2475,9 @@ void Unit::SendMeleeAttackStart(Unit* victim, Player* sendTo)
sendTo->SendDirectMessage(&data);
else
SendMessageToSet(&data, true);
;//sLog->outStaticDebug("WORLD: Sent SMSG_ATTACKSTART");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("WORLD: Sent SMSG_ATTACKSTART");
#endif
}
void Unit::SendMeleeAttackStop(Unit* victim)
@@ -2453,12 +2491,18 @@ void Unit::SendMeleeAttackStop(Unit* victim)
data.append(victim ? victim->GetPackGUID() : 0);
data << uint32(0); //! Can also take the value 0x01, which seems related to updating rotation
SendMessageToSet(&data, true);
;//sLog->outStaticDebug("WORLD: Sent SMSG_ATTACKSTOP");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("WORLD: Sent SMSG_ATTACKSTOP");
#endif
/*if (victim)
;//sLog->outDetail("%s %u stopped attacking %s %u", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow(), (victim->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), victim->GetGUIDLow());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDetail("%s %u stopped attacking %s %u", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow(), (victim->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), victim->GetGUIDLow());
#endif
else
;//sLog->outDetail("%s %u stopped attacking", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow());*/
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDetail("%s %u stopped attacking", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow());*/
#endif
}
bool Unit::isSpellBlocked(Unit* victim, SpellInfo const* spellProto, WeaponAttackType attackType)
@@ -2617,7 +2661,9 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spell)
case MELEE_HIT_BLOCK: canBlock = false; break;
case MELEE_HIT_PARRY: canParry = false; break;
default:
;//sLog->outStaticDebug("Spell %u SPELL_AURA_IGNORE_COMBAT_RESULT has unhandled state %d", (*i)->GetId(), (*i)->GetMiscValue());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("Spell %u SPELL_AURA_IGNORE_COMBAT_RESULT has unhandled state %d", (*i)->GetId(), (*i)->GetMiscValue());
#endif
break;
}
}
@@ -3899,7 +3945,9 @@ void Unit::_UnapplyAura(AuraApplicationMap::iterator &i, AuraRemoveMode removeMo
aurApp->SetRemoveMode(removeMode);
Aura* aura = aurApp->GetBase();
;//sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura %u now is remove mode %d", aura->GetId(), removeMode);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura %u now is remove mode %d", aura->GetId(), removeMode);
#endif
// dead loop is killing the server probably
ASSERT(m_removedAurasCount < 0xFFFFFFFF);
@@ -4734,7 +4782,9 @@ void Unit::DelayOwnedAuras(uint32 spellId, uint64 caster, int32 delaytime)
// update for out of range group members (on 1 slot use)
aura->SetNeedClientUpdateForTargets();
;//sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura %u partially interrupted on unit %u, new duration: %u ms", aura->GetId(), GetGUIDLow(), aura->GetDuration());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura %u partially interrupted on unit %u, new duration: %u ms", aura->GetId(), GetGUIDLow(), aura->GetDuration());
#endif
}
}
}
@@ -5642,7 +5692,9 @@ void Unit::SendSpellDamageImmune(Unit* target, uint32 spellId)
void Unit::SendAttackStateUpdate(CalcDamageInfo* damageInfo)
{
;//sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Sending SMSG_ATTACKERSTATEUPDATE");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Sending SMSG_ATTACKERSTATEUPDATE");
#endif
uint32 count = 1;
size_t maxsize = 4+5+5+4+4+1+4+4+4+4+4+1+4+4+4+4+4*12;
@@ -9686,7 +9738,9 @@ Unit* Unit::GetCharm() const
void Unit::SetMinion(Minion *minion, bool apply)
{
;//sLog->outDebug(LOG_FILTER_UNITS, "SetMinion %u for %u, apply %u", minion->GetEntry(), GetEntry(), apply);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_UNITS, "SetMinion %u for %u, apply %u", minion->GetEntry(), GetEntry(), apply);
#endif
if (apply)
{
@@ -15026,7 +15080,9 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
// "handled" is needed as long as proc can be handled in multiple places
if (!handled && HandleAuraProc(target, damage, i->aura, procSpell, procFlag, procExtra, cooldown, &handled))
{
;//sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), Id);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), Id);
#endif
takeCharges = true;
}
@@ -15050,7 +15106,9 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
{
case SPELL_AURA_PROC_TRIGGER_SPELL:
{
;//sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell %u (triggered by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell %u (triggered by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
#endif
// Don`t drop charge or add cooldown for not started trigger
if (HandleProcTriggerSpell(target, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
takeCharges = true;
@@ -15069,7 +15127,9 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
case SPELL_AURA_MANA_SHIELD:
case SPELL_AURA_DUMMY:
{
;//sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
#endif
if (HandleDummyAuraProc(target, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
takeCharges = true;
break;
@@ -15083,14 +15143,18 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
break;
case SPELL_AURA_OVERRIDE_CLASS_SCRIPTS:
{
;//sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
#endif
if (HandleOverrideClassScriptAuraProc(target, damage, triggeredByAura, procSpell, cooldown))
takeCharges = true;
break;
}
case SPELL_AURA_RAID_PROC_FROM_CHARGE_WITH_VALUE:
{
;//sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)",
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)",
#endif
// (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (damage > 0)
@@ -15102,7 +15166,9 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
}
case SPELL_AURA_RAID_PROC_FROM_CHARGE:
{
;//sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)",
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)",
#endif
// (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
HandleAuraRaidProcFromCharge(triggeredByAura);
@@ -15111,7 +15177,9 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
}
case SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE:
{
;//sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
#endif
if (HandleProcTriggerSpell(target, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
takeCharges = true;
@@ -16085,7 +16153,9 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue(AuraEffect* triggeredByAura)
// Currently only Prayer of Mending
if (!(spellProto->SpellFamilyName == SPELLFAMILY_PRIEST && spellProto->SpellFamilyFlags[1] & 0x20))
{
;//sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Unit::HandleAuraRaidProcFromChargeWithValue, received not handled spell: %u", spellProto->Id);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Unit::HandleAuraRaidProcFromChargeWithValue, received not handled spell: %u", spellProto->Id);
#endif
return false;
}
@@ -16389,7 +16459,9 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
if (!spiritOfRedemption)
{
;//sLog->outStaticDebug("SET JUST_DIED");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("SET JUST_DIED");
#endif
victim->setDeathState(JUST_DIED);
}
@@ -16414,7 +16486,9 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
// only if not player and not controlled by player pet. And not at BG
if ((durabilityLoss && !player && !plrVictim->InBattleground()) || (player && sWorld->getBoolConfig(CONFIG_DURABILITY_LOSS_IN_PVP)))
{
;//sLog->outStaticDebug("We are dead, losing %f percent durability", sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH));
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("We are dead, losing %f percent durability", sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH));
#endif
plrVictim->DurabilityLossAll(sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH), false);
// durability lost message
WorldPacket data(SMSG_DURABILITY_DAMAGE_DEATH, 0);
@@ -16434,7 +16508,9 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
}
else // creature died
{
;//sLog->outStaticDebug("DealDamageNotPlayer");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("DealDamageNotPlayer");
#endif
if (!creature->IsPet() && creature->GetLootMode() > 0)
{
@@ -16835,7 +16911,9 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
throw 1;
ASSERT((type == CHARM_TYPE_VEHICLE) == IsVehicle());
;//sLog->outDebug(LOG_FILTER_UNITS, "SetCharmedBy: charmer %u (GUID %u), charmed %u (GUID %u), type %u.", charmer->GetEntry(), charmer->GetGUIDLow(), GetEntry(), GetGUIDLow(), uint32(type));
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_UNITS, "SetCharmedBy: charmer %u (GUID %u), charmed %u (GUID %u), type %u.", charmer->GetEntry(), charmer->GetGUIDLow(), GetEntry(), GetGUIDLow(), uint32(type));
#endif
if (this == charmer)
{
@@ -18043,7 +18121,9 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a
{
if (seatId >= 0 && seatId != GetTransSeat())
{
;//sLog->outDebug(LOG_FILTER_VEHICLES, "EnterVehicle: %u leave vehicle %u seat %d and enter %d.", GetEntry(), m_vehicle->GetBase()->GetEntry(), GetTransSeat(), seatId);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_VEHICLES, "EnterVehicle: %u leave vehicle %u seat %d and enter %d.", GetEntry(), m_vehicle->GetBase()->GetEntry(), GetTransSeat(), seatId);
#endif
ChangeSeat(seatId);
}
@@ -18051,7 +18131,9 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a
}
else
{
;//sLog->outDebug(LOG_FILTER_VEHICLES, "EnterVehicle: %u exit %u and enter %u.", GetEntry(), m_vehicle->GetBase()->GetEntry(), vehicle->GetBase()->GetEntry());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_VEHICLES, "EnterVehicle: %u exit %u and enter %u.", GetEntry(), m_vehicle->GetBase()->GetEntry(), vehicle->GetBase()->GetEntry());
#endif
ExitVehicle();
}
}
@@ -18421,7 +18503,9 @@ void Unit::SendChangeCurrentVictimOpcode(HostileReference* pHostileReference)
{
uint32 count = getThreatManager().getThreatList().size();
;//sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Send SMSG_HIGHEST_THREAT_UPDATE Message");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Send SMSG_HIGHEST_THREAT_UPDATE Message");
#endif
WorldPacket data(SMSG_HIGHEST_THREAT_UPDATE, 8 + 8 + count * 8);
data.append(GetPackGUID());
data.appendPackGUID(pHostileReference->getUnitGuid());
@@ -18438,7 +18522,9 @@ void Unit::SendChangeCurrentVictimOpcode(HostileReference* pHostileReference)
void Unit::SendClearThreatListOpcode()
{
;//sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Send SMSG_THREAT_CLEAR Message");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Send SMSG_THREAT_CLEAR Message");
#endif
WorldPacket data(SMSG_THREAT_CLEAR, 8);
data.append(GetPackGUID());
SendMessageToSet(&data, false);
@@ -18446,7 +18532,9 @@ void Unit::SendClearThreatListOpcode()
void Unit::SendRemoveFromThreatListOpcode(HostileReference* pHostileReference)
{
;//sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Send SMSG_THREAT_REMOVE Message");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Send SMSG_THREAT_REMOVE Message");
#endif
WorldPacket data(SMSG_THREAT_REMOVE, 8 + 8);
data.append(GetPackGUID());
data.appendPackGUID(pHostileReference->getUnitGuid());