Core/Spells: Implemented battle pet experience related spell effects and auras
Port From (https://github.com/TrinityCore/TrinityCore/commit/9354b4ac8ec63f0b2ee5ceb3c8b6a3c6a75bd99f)
This commit is contained in:
@@ -5508,6 +5508,22 @@ namespace Game.Spells
|
||||
ChatMsg chatType = (ChatMsg)effectInfo.MiscValueB;
|
||||
unitCaster.Talk(broadcastTextId, chatType, Global.CreatureTextMgr.GetRangeForChatType(chatType), unitTarget);
|
||||
}
|
||||
|
||||
[SpellEffectHandler(SpellEffectName.GrantBattlepetExperience)]
|
||||
void EffectGrantBattlePetExperience()
|
||||
{
|
||||
if (effectHandleMode != SpellEffectHandleMode.HitTarget)
|
||||
return;
|
||||
|
||||
Player playerCaster = m_caster.ToPlayer();
|
||||
if (playerCaster == null)
|
||||
return;
|
||||
|
||||
if (!unitTarget || !unitTarget.IsCreature())
|
||||
return;
|
||||
|
||||
playerCaster.GetSession().GetBattlePetMgr().GrantBattlePetExperience(unitTarget.GetBattlePetCompanionGUID(), (ushort)damage, BattlePetXpSource.SpellEffect);
|
||||
}
|
||||
}
|
||||
|
||||
public class DispelableAura
|
||||
|
||||
Reference in New Issue
Block a user