diff --git a/src/game/NPCHandler.cpp b/src/game/NPCHandler.cpp index af4b9c4c7..abbf62feb 100644 --- a/src/game/NPCHandler.cpp +++ b/src/game/NPCHandler.cpp @@ -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 diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 4a8171857..51552912e 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -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*/) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index b993ce892..6d9487ede 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12573" + #define REVISION_NR "12574" #endif // __REVISION_NR_H__