mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-14 04:13:14 -04:00
Refactored CreatureObject
This commit is contained in:
@@ -688,12 +688,14 @@ public class EntertainmentService implements INetworkDispatch {
|
||||
}
|
||||
|
||||
public void startPerformance(CreatureObject actor, int performanceId, int performanceCounter, String skillName, boolean isDance) {
|
||||
actor.setPerformanceId(performanceId, isDance);
|
||||
actor.setPerformanceId((isDance) ? 0 : performanceId);
|
||||
actor.setPerformanceCounter(performanceCounter);
|
||||
actor.setCurrentAnimation(skillName);
|
||||
actor.setPerformanceType(isDance);
|
||||
|
||||
actor.startPerformance();
|
||||
if (!actor.isPerforming()) {
|
||||
actor.setPerforming(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void startPerformanceExperience(final CreatureObject entertainer) {
|
||||
@@ -722,13 +724,13 @@ public class EntertainmentService implements INetworkDispatch {
|
||||
|
||||
}
|
||||
|
||||
public void startSpectating(final CreatureObject spectator, final CreatureObject performer, boolean spectateType) {
|
||||
public void startSpectating(final CreatureObject spectator, final CreatureObject performer, String spectateType) {
|
||||
|
||||
// visual
|
||||
if (spectator.getPerformanceWatchee() == performer && spectateType)
|
||||
if (spectator.getPerformanceWatchee() == performer && spectateType.equals("dance"))
|
||||
spectator.getPerformanceWatchee().removeSpectator(spectator);
|
||||
// music
|
||||
else if (spectator.getPerformanceListenee() == performer && !spectateType)
|
||||
else if (spectator.getPerformanceListenee() == performer && spectateType.equals("musci"))
|
||||
spectator.getPerformanceListenee().removeSpectator(spectator);
|
||||
|
||||
spectator.setPerformanceWatchee(performer);
|
||||
@@ -739,7 +741,7 @@ public class EntertainmentService implements INetworkDispatch {
|
||||
try {
|
||||
if (spectator.getWorldPosition().getDistance2D(performer.getWorldPosition()) > (float) 70) {
|
||||
|
||||
if(((performer.getPerformanceType()) ? "dance" : "music").equals("dance")) {
|
||||
if(performer.getPerformanceType().equals("dance")) {
|
||||
spectator.setPerformanceWatchee(null);
|
||||
spectator.sendSystemMessage("You stop watching " + performer.getCustomName() + " because " + performer.getCustomName()
|
||||
+ " is out of range.", (byte) 0);
|
||||
@@ -770,7 +772,7 @@ public class EntertainmentService implements INetworkDispatch {
|
||||
handleInspirationTicks(spectator, performer);
|
||||
}
|
||||
|
||||
if(spectateType)
|
||||
if(spectateType.equals("dance"))
|
||||
spectator.sendSystemMessage("You start watching " + performer.getCustomName() + ".", (byte) 0);
|
||||
else
|
||||
spectator.sendSystemMessage("You start listening to " + performer.getCustomName() + ".", (byte) 0);
|
||||
@@ -778,7 +780,7 @@ public class EntertainmentService implements INetworkDispatch {
|
||||
}
|
||||
|
||||
public void performFlourish(final CreatureObject performer, int flourish) {
|
||||
|
||||
// FIXME There wasn't a limit on flourishes; they just queued up.
|
||||
if (performer.getFlourishCount() > 0 || performer.isPerformingFlourish()) {
|
||||
performer.sendSystemMessage("@performance:flourish_wait_self", (byte) 0);
|
||||
return;
|
||||
@@ -814,7 +816,7 @@ public class EntertainmentService implements INetworkDispatch {
|
||||
if(pEffect == null)
|
||||
return false;
|
||||
|
||||
String performance = (performer.getPerformanceType()) ? "dance" : "music";
|
||||
String performance = performer.getPerformanceType();
|
||||
|
||||
if(performer.isPerformingEffect()) {
|
||||
performer.sendSystemMessage("@performance:effect_wait_self", (byte) 0);
|
||||
|
||||
Reference in New Issue
Block a user