Added posture checks, radial script for player objects, bug fixes

(Bug Fix) Must now wait before performing multiple flourishes
(Bug Fix) Can no longer propose to yourself (aka your hand)
(Bug Fix) Fixed some strings that didn't have variables
(Added) Posture checks before Skill Animating
(Added) Additional radial options show on players
This commit is contained in:
Waverunner
2014-03-19 15:56:52 -04:00
parent 9f04884aa3
commit d210dc7ad7
27 changed files with 110 additions and 15 deletions
+31 -2
View File
@@ -429,8 +429,7 @@ public class EntertainmentService implements INetworkDispatch {
public void run() {
if (spectator.getPosition().getDistance2D(performer.getWorldPosition()) > (float) 70) {
String pType = (performer.getPerformanceType()) ? "dance" : "music";
if(pType.equals("dance")) {
if(((performer.getPerformanceType()) ? "dance" : "music").equals("dance")) {
spectator.setPerformanceWatchee(null);
spectator.sendSystemMessage("You stop watching " + performer.getCustomName() + " because " + performer.getCustomName()
+ " is out of range.", (byte) 0);
@@ -452,6 +451,36 @@ public class EntertainmentService implements INetworkDispatch {
spectator.setSpectatorTask(spectatorTask);
}
public void performFlourish(final CreatureObject performer, int flourish) {
if (performer.getFlourishCount() > 0) {
performer.sendSystemMessage("@performance:wait_flourish_self", (byte) 0);
return;
}
Performance performance = getPerformanceByIndex(performer.getPerformanceId());
if(performance == null)
return;
String anmFlo = "skill_action_" + flourish;
if (flourish == 9)
anmFlo = "mistake";
performer.setFlourishCount(1);
performer.sendSystemMessage("@performance:flourish_perform", (byte) 0);
performer.doSkillAnimation(anmFlo);
scheduler.schedule(new Runnable() {
@Override
public void run() {
performer.setFlourishCount(0);
}
}, (long) performance.getLoopDuration(), TimeUnit.SECONDS);
}
@Override
public void shutdown() {