Core/Transmog: Implemented transmog sets

Closes #20133
Closes #20135
This commit is contained in:
Golrag
2017-08-24 20:39:22 +02:00
committed by Shauren
parent a93a5ad379
commit fd73bedd73
13 changed files with 333 additions and 2 deletions

View File

@@ -328,7 +328,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
&Spell::EffectTeleportUnits, //252 SPELL_EFFECT_TELEPORT_UNITS
&Spell::EffectGiveHonor, //253 SPELL_EFFECT_GIVE_HONOR
&Spell::EffectNULL, //254 SPELL_EFFECT_254
&Spell::EffectNULL, //255 SPELL_EFFECT_LEARN_TRANSMOG_SET
&Spell::EffectLearnTransmogSet, //255 SPELL_EFFECT_LEARN_TRANSMOG_SET
};
void Spell::EffectNULL(SpellEffIndex /*effIndex*/)
@@ -5901,3 +5901,14 @@ void Spell::EffectGiveHonor(SpellEffIndex /*effIndex*/)
playerTarget->AddHonorXP(damage);
playerTarget->SendDirectMessage(packet.Write());
}
void Spell::EffectLearnTransmogSet(SpellEffIndex /*effIndex*/)
{
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
unitTarget->ToPlayer()->GetSession()->GetCollectionMgr()->AddTransmogSet(effectInfo->MiscValue);
}