mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-01 02:16:15 -04:00
Range checks for /inspire and /watch
This commit is contained in:
@@ -28,7 +28,11 @@ def run(core, actor, target, commandString):
|
||||
else:
|
||||
actor.sendSystemMessage('@performance:insp_buff_must_listen', 2)
|
||||
return
|
||||
|
||||
|
||||
if target.getPosition().getDistance2D(actor.getWorldPosition()) > float(20):
|
||||
actor.sendSystemMessage(target.getCustomName() + ' is too far away to inspire.')
|
||||
return
|
||||
|
||||
builderWindow = BuffBuilderStartMessage(actor.getObjectId(), actor.getObjectId(), target.getObjectId())
|
||||
objController = ObjControllerMessage(11, builderWindow)
|
||||
actor.getClient().getSession().write(objController.serialize())
|
||||
|
||||
@@ -11,7 +11,12 @@ def run(core, actor, target, commandString):
|
||||
|
||||
if target is None:
|
||||
return
|
||||
|
||||
|
||||
|
||||
if target.getPosition().getDistance2D(actor.getWorldPosition()) > float(20):
|
||||
actor.sendSystemMessage(target.getCustomName() + ' is too far away to watch.', 0)
|
||||
return
|
||||
|
||||
if not target.isPlayer():
|
||||
actor.sendSystemMessage('@performance:dance_watch_npc', 0)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user