mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-30 00:15:57 -04:00
Fix for inspiration and group buffs
Fix for inspiration and group buffs, they used distance check with different coordinate systems. Now watching and inspiration buff is possible.
This commit is contained in:
@@ -34,7 +34,7 @@ def run(core, actor, target, commandString):
|
||||
actor.sendSystemMessage('@performance:insp_buff_must_listen', 2)
|
||||
return
|
||||
|
||||
if target.getPosition().getDistance2D(actor.getWorldPosition()) > float(20):
|
||||
if target.getWorldPosition().getDistance2D(actor.getWorldPosition()) > float(20):
|
||||
actor.sendSystemMessage(target.getCustomName() + ' is too far away to inspire.', 0)
|
||||
return
|
||||
|
||||
|
||||
@@ -687,7 +687,7 @@ public class EntertainmentService implements INetworkDispatch {
|
||||
|
||||
final ScheduledFuture<?> spectatorTask = scheduler.scheduleAtFixedRate(() -> {
|
||||
try {
|
||||
if (spectator.getPosition().getDistance2D(performer.getWorldPosition()) > (float) 70) {
|
||||
if (spectator.getWorldPosition().getDistance2D(performer.getWorldPosition()) > (float) 70) {
|
||||
|
||||
if(((performer.getPerformanceType()) ? "dance" : "music").equals("dance")) {
|
||||
spectator.setPerformanceWatchee(null);
|
||||
|
||||
@@ -209,7 +209,7 @@ public class GroupService implements INetworkDispatch {
|
||||
for(SWGObject otherMember : group.getMemberList()) {
|
||||
if(otherMember != member) {
|
||||
for(Buff buff : ((CreatureObject) otherMember).getBuffList().get()) {
|
||||
if(buff.isGroupBuff() && otherMember.getPlanet() == member.getPlanet() && otherMember.getPosition().getDistance2D(member.getWorldPosition()) <= 80) {
|
||||
if(buff.isGroupBuff() && otherMember.getPlanet() == member.getPlanet() && otherMember.getWorldPosition().getDistance2D(member.getWorldPosition()) <= 80) {
|
||||
core.buffService.addBuffToCreature((CreatureObject) otherMember, buff.getBuffName(), member);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user