From fb92f3e1f3bd8d8aa6fbc3509f0143e122dcc2c8 Mon Sep 17 00:00:00 2001 From: Ziggy Date: Wed, 20 Jul 2022 21:41:22 +0200 Subject: [PATCH] Entertainers get Dancing XP by dancing Relates to GitHub issue #691 --- .../entertainment/EntertainmentService.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/projectswg/holocore/services/gameplay/entertainment/EntertainmentService.java b/src/main/java/com/projectswg/holocore/services/gameplay/entertainment/EntertainmentService.java index 0a70af98a..79686f06b 100644 --- a/src/main/java/com/projectswg/holocore/services/gameplay/entertainment/EntertainmentService.java +++ b/src/main/java/com/projectswg/holocore/services/gameplay/entertainment/EntertainmentService.java @@ -249,7 +249,7 @@ public class EntertainmentService extends Service { * @return true if {@code performer} is a Novice Entertainer and false if not */ private boolean isEntertainer(CreatureObject performer) { - return performer.hasSkill("class_entertainer_phase1_novice"); // First entertainer skillbox + return performer.hasSkill("social_entertainer_novice"); // First entertainer skillbox } private void scheduleExperienceTask(CreatureObject performer, String performanceName) { @@ -435,12 +435,19 @@ public class EntertainmentService extends Service { int xpGained = performanceCounter * flourishXpMod; if (xpGained > 0) { - if (isEntertainer(performer)) - new ExperienceIntent(performer, performer, "entertainer", xpGained, true).broadcast(); + if (isEntertainer(performer)) { + if (isDancing()) { + new ExperienceIntent(performer, performer, "dance", xpGained, true).broadcast(); + } + } performer.setPerformanceCounter(performanceCounter - 1); } } + private boolean isDancing() { + return performer.getPerformanceId() == 0; + } + } }