mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[c12574] Improve debug log output for learning/unlearning spells/skills
This commit is contained in:
parent
3e2aefb538
commit
1e15277bba
3 changed files with 12 additions and 3 deletions
|
|
@ -314,6 +314,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recv_data)
|
|||
SendPacket(&data);
|
||||
|
||||
// learn explicitly or cast explicitly
|
||||
// TODO - Are these spells really cast correctly this way?
|
||||
if (trainer_spell->IsCastable())
|
||||
_player->CastSpell(_player, trainer_spell->spell, true);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -4144,7 +4144,8 @@ void Spell::EffectUnlearnSpecialization(SpellEffectEntry const* effect)
|
|||
|
||||
_player->removeSpell(spellToUnlearn);
|
||||
|
||||
DEBUG_LOG("Spell: Player %u has unlearned spell %u from NpcGUID: %u", _player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow());
|
||||
if (WorldObject const* caster = GetCastingObject())
|
||||
DEBUG_LOG("Spell: %s has unlearned spell %u at %s", _player->GetGuidStr().c_str(), spellToUnlearn, m_caster->GetGuidStr().c_str());
|
||||
}
|
||||
|
||||
void Spell::EffectPowerDrain(SpellEffectEntry const* effect)
|
||||
|
|
@ -5600,7 +5601,8 @@ void Spell::EffectLearnSpell(SpellEffectEntry const* effect)
|
|||
uint32 spellToLearn = ((m_spellInfo->Id==SPELL_ID_GENERIC_LEARN) || (m_spellInfo->Id==SPELL_ID_GENERIC_LEARN_PET)) ? damage : effect->EffectTriggerSpell;
|
||||
player->learnSpell(spellToLearn, false);
|
||||
|
||||
DEBUG_LOG("Spell: Player %u has learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow());
|
||||
if (WorldObject const* caster = GetCastingObject())
|
||||
DEBUG_LOG("Spell: %s has learned spell %u from %s", player->GetGuidStr().c_str(), spellToLearn, caster->GetGuidStr().c_str());
|
||||
}
|
||||
|
||||
void Spell::EffectDispel(SpellEffectEntry const* effect)
|
||||
|
|
@ -5847,6 +5849,9 @@ void Spell::EffectLearnSkill(SpellEffectEntry const* effect)
|
|||
uint32 skillid = effect->EffectMiscValue;
|
||||
uint16 skillval = ((Player*)unitTarget)->GetPureSkillValue(skillid);
|
||||
((Player*)unitTarget)->SetSkill(skillid, skillval ? skillval : 1, damage * 75, damage);
|
||||
|
||||
if (WorldObject const* caster = GetCastingObject())
|
||||
DEBUG_LOG("Spell: %s has learned skill %u (to maxlevel %u) from %s", unitTarget->GetGuidStr().c_str(), skillid, damage * 75, m_caster->GetGuidStr().c_str());
|
||||
}
|
||||
|
||||
void Spell::EffectAddHonor(SpellEffectEntry const* /*effect*/)
|
||||
|
|
@ -6342,6 +6347,9 @@ void Spell::EffectLearnPetSpell(SpellEffectEntry const* effect)
|
|||
|
||||
pet->SavePetToDB(PET_SAVE_AS_CURRENT);
|
||||
_player->PetSpellInitialize();
|
||||
|
||||
if (WorldObject const* caster = GetCastingObject())
|
||||
DEBUG_LOG("Spell: %s has learned spell %u from %s", pet->GetGuidStr().c_str(), learn_spellproto->Id, caster->GetGuidStr().c_str());
|
||||
}
|
||||
|
||||
void Spell::EffectTaunt(SpellEffectEntry const* /*effect*/)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12573"
|
||||
#define REVISION_NR "12574"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue