Core/Quests: Implemented QUEST_OBJECTIVE_KILL_WITH_LABEL
Port From (https://github.com/TrinityCore/TrinityCore/commit/1fb4acc25ae89360e71d33a8f7cba99bcc028b32)
This commit is contained in:
@@ -4473,6 +4473,20 @@ namespace Game.Spells
|
||||
unitTarget.ToPlayer().RewardPlayerAndGroupAtEvent((uint)creatureEntry, unitTarget);
|
||||
}
|
||||
|
||||
[SpellEffectHandler(SpellEffectName.KillCreditLabel1)]
|
||||
[SpellEffectHandler(SpellEffectName.KillCreditLabel2)]
|
||||
void EffectKillCreditLabel()
|
||||
{
|
||||
if (effectHandleMode != SpellEffectHandleMode.HitTarget)
|
||||
return;
|
||||
|
||||
Player playerTarget = unitTarget?.ToPlayer();
|
||||
if (playerTarget == null)
|
||||
return;
|
||||
|
||||
playerTarget.UpdateQuestObjectiveProgress(QuestObjectiveType.KillWithLabel, effectInfo.MiscValue, Math.Max(1, effectInfo.MiscValueB));
|
||||
}
|
||||
|
||||
[SpellEffectHandler(SpellEffectName.QuestFail)]
|
||||
void EffectQuestFail()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user