示例#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
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
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