eveBroadcastStuffGPCS.py (7851B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\common\script\net\eveBroadcastStuffGPCS.py 2 from carbon.common.script.net import machoNetAddress, machoNetPacket 3 from carbon.common.script.net.BroadcastStuffGPCS import CoreBroadcastStuff 4 from carbon.common.script.sys import basesession 5 6 class BroadcastStuff(CoreBroadcastStuff): 7 __guid__ = 'gpcs.BroadcastStuff' 8 9 def SinglecastByRegionID(self, regionid, method, *args): 10 callTimer = basesession.CallTimer('SinglecastByRegionID::%s (Broadcast\\Client)' % method) 11 try: 12 self.ForwardNotifyDown(machoNetPacket.Notification(destination=machoNetAddress.MachoAddress(broadcastID=method, idtype='regionid', narrowcast=[regionid]), payload=(1, args))) 13 finally: 14 callTimer.Done() 15 16 def NarrowcastBySolarSystemIDs(self, solarsystemids, method, *args): 17 if not solarsystemids: 18 return 19 callTimer = basesession.CallTimer('NarrowcastBySolarSystemIDs::%s (Broadcast\\Client)' % method) 20 try: 21 self.ForwardNotifyDown(machoNetPacket.Notification(destination=machoNetAddress.MachoAddress(broadcastID=method, idtype='solarsystemid', narrowcast=solarsystemids), payload=(1, args))) 22 finally: 23 callTimer.Done() 24 25 def SinglecastBySolarSystemID(self, solarsystemid, method, *args): 26 callTimer = basesession.CallTimer('SinglecastBySolarSystemID::%s (Broadcast\\Client)' % method) 27 try: 28 self.ForwardNotifyDown(machoNetPacket.Notification(destination=machoNetAddress.MachoAddress(broadcastID=method, idtype='solarsystemid', narrowcast=[solarsystemid]), payload=(1, args))) 29 finally: 30 callTimer.Done() 31 32 def NarrowcastBySolarSystemID2s(self, solarsystemid2s, method, *args): 33 if not solarsystemid2s: 34 return 35 callTimer = basesession.CallTimer('NarrowcastBySolarSystemID2s::%s (Broadcast\\Client)' % method) 36 try: 37 self.ForwardNotifyDown(machoNetPacket.Notification(destination=machoNetAddress.MachoAddress(broadcastID=method, idtype='solarsystemid2', narrowcast=solarsystemid2s), payload=(1, args))) 38 finally: 39 callTimer.Done() 40 41 def SinglecastBySolarSystemID2(self, solarsystemid2, method, *args): 42 callTimer = basesession.CallTimer('SinglecastBySolarSystemID2::%s (Broadcast\\Client)' % method) 43 try: 44 self.ForwardNotifyDown(machoNetPacket.Notification(destination=machoNetAddress.MachoAddress(broadcastID=method, idtype='solarsystemid2', narrowcast=[solarsystemid2]), payload=(1, args))) 45 finally: 46 callTimer.Done() 47 48 def NarrowcastByCorporationIDs(self, corpids, method, *args): 49 if not corpids: 50 return 51 callTimer = basesession.CallTimer('NarrowcastByCorporationIDs::%s (Broadcast\\Client)' % method) 52 try: 53 self.ForwardNotifyDown(machoNetPacket.Notification(destination=machoNetAddress.MachoAddress(broadcastID=method, idtype='corpid', narrowcast=corpids), payload=(1, args))) 54 finally: 55 callTimer.Done() 56 57 def SinglecastByCorporationID(self, corpid, method, *args): 58 callTimer = basesession.CallTimer('SinglecastByCorporationID::%s (Broadcast\\Client)' % method) 59 try: 60 self.ForwardNotifyDown(machoNetPacket.Notification(destination=machoNetAddress.MachoAddress(broadcastID=method, idtype='corpid', narrowcast=[corpid]), payload=(1, args))) 61 finally: 62 callTimer.Done() 63 64 def NarrowcastByAllianceIDs(self, allianceids, method, *args): 65 if not allianceids: 66 return 67 callTimer = basesession.CallTimer('NarrowcastByAllianceIDs::%s (Broadcast\\Client)' % method) 68 try: 69 self.ForwardNotifyDown(machoNetPacket.Notification(destination=machoNetAddress.MachoAddress(broadcastID=method, idtype='allianceid', narrowcast=allianceids), payload=(1, args))) 70 finally: 71 callTimer.Done() 72 73 def SinglecastByAllianceID(self, allianceid, method, *args): 74 callTimer = basesession.CallTimer('SinglecastByAllianceID::%s (Broadcast\\Client)' % method) 75 try: 76 self.ForwardNotifyDown(machoNetPacket.Notification(destination=machoNetAddress.MachoAddress(broadcastID=method, idtype='allianceid', narrowcast=[allianceid]), payload=(1, args))) 77 finally: 78 callTimer.Done() 79 80 def NarrowcastByFleetIDs(self, fleetids, method, *args): 81 if not fleetids: 82 return 83 callTimer = basesession.CallTimer('NarrowcastByFleetIDs::%s (Broadcast\\Client)' % method) 84 try: 85 self.ForwardNotifyDown(machoNetPacket.Notification(destination=machoNetAddress.MachoAddress(broadcastID=method, idtype='fleetid', narrowcast=fleetids), payload=(1, args))) 86 finally: 87 callTimer.Done() 88 89 def SinglecastByFleetID(self, fleetid, method, *args): 90 callTimer = basesession.CallTimer('SinglecastByFleetID::%s (Broadcast\\Client)' % method) 91 try: 92 self.ForwardNotifyDown(machoNetPacket.Notification(destination=machoNetAddress.MachoAddress(broadcastID=method, idtype='fleetid', narrowcast=[fleetid]), payload=(1, args))) 93 finally: 94 callTimer.Done() 95 96 def NarrowcastByShipIDs(self, shipids, method, *args): 97 if not shipids: 98 return 99 callTimer = basesession.CallTimer('NarrowcastByShipIDs::%s (Broadcast\\Client)' % method) 100 try: 101 self.ForwardNotifyDown(machoNetPacket.Notification(destination=machoNetAddress.MachoAddress(broadcastID=method, idtype='shipid', narrowcast=shipids), payload=(1, args))) 102 finally: 103 callTimer.Done() 104 105 def SinglecastByShipID(self, shipid, method, *args): 106 callTimer = basesession.CallTimer('SinglecastByShipID::%s (Broadcast\\Client)' % method) 107 try: 108 self.ForwardNotifyDown(machoNetPacket.Notification(destination=machoNetAddress.MachoAddress(broadcastID=method, idtype='shipid', narrowcast=[shipid]), payload=(1, args))) 109 finally: 110 callTimer.Done() 111 112 def NarrowcastByStationIDs(self, stationids, method, *args): 113 if not stationids: 114 return 115 callTimer = basesession.CallTimer('NarrowcastByStationIDs::%s (Broadcast\\Client)' % method) 116 try: 117 self.ForwardNotifyDown(machoNetPacket.Notification(destination=machoNetAddress.MachoAddress(broadcastID=method, idtype='stationid', narrowcast=stationids), payload=(1, args))) 118 finally: 119 callTimer.Done() 120 121 def SinglecastByStationID(self, stationid, method, *args): 122 callTimer = basesession.CallTimer('SinglecastByStationID::%s (Broadcast\\Client)' % method) 123 try: 124 self.ForwardNotifyDown(machoNetPacket.Notification(destination=machoNetAddress.MachoAddress(broadcastID=method, idtype='stationid', narrowcast=[stationid]), payload=(1, args))) 125 finally: 126 callTimer.Done() 127 128 def NarrowcastByStructureIDs(self, structureids, method, *args): 129 if not structureids: 130 return 131 callTimer = basesession.CallTimer('NarrowcastByStructureIDs::%s (Broadcast\\Client)' % method) 132 try: 133 self.ForwardNotifyDown(machoNetPacket.Notification(destination=machoNetAddress.MachoAddress(broadcastID=method, idtype='structureid', narrowcast=structureids), payload=(1, args))) 134 finally: 135 callTimer.Done() 136 137 def SinglecastByStructureID(self, structureid, method, *args): 138 callTimer = basesession.CallTimer('SinglecastByStructureID::%s (Broadcast\\Client)' % method) 139 try: 140 self.ForwardNotifyDown(machoNetPacket.Notification(destination=machoNetAddress.MachoAddress(broadcastID=method, idtype='structureid', narrowcast=[structureid]), payload=(1, args))) 141 finally: 142 callTimer.Done()