コード例 #1
0
def handleSelection(core, owner, target, option):

    if option == 21 and target:
        tpm = EnterTicketPurchaseModeMessage(owner.getPlanet().getName(), core.mapService.getClosestCityName(owner))
        owner.getClient().getSession().write(tpm.serialize())
        #print ('Planet name: ' + owner.getPlanet().getName())
        #print ('City name: ' + core.mapService.getClosestCityName(owner))
    return
コード例 #2
0
ファイル: travel_terminal.py プロジェクト: amack3926/NGECore2
def handleSelection(core, owner, target, option):

    if option == 21 and target:

        if owner is not None:
            tpm = EnterTicketPurchaseModeMessage(owner.getPlanet().getName(), core.mapService.getClosestCityName(owner), owner)
            owner.getClient().getSession().write(tpm.serialize())
            return
    return
コード例 #3
0
ファイル: travel_terminal.py プロジェクト: Avasia/NGECore2
def handleSelection(core, owner, target, option):

    if option == 21 and target:

        if owner is not None:
            if owner.getCombatFlag() == 1:
				owner.sendSystemMessage('You can\'t use that while in combat.', 0)
				return
            tpm = EnterTicketPurchaseModeMessage(owner.getPlanet().getName(), core.mapService.getClosestCityName(owner), False)
            owner.getClient().getSession().write(tpm.serialize())
            return
    return
コード例 #4
0
def handleSelection(core, owner, target, option):

    if option == 21 and target:

        if owner is not None:
            if owner.getCombatFlag() == 1:
                owner.sendSystemMessage('You can\'t use that while in combat.',
                                        0)
                return
            tpm = EnterTicketPurchaseModeMessage(
                owner.getPlanet().getName(),
                core.mapService.getClosestCityName(owner), True)
            owner.getClient().getSession().write(tpm.serialize())
            return
    return