summaryrefslogblamecommitdiff
path: root/src/mmo/ids.py
blob: 0d39aae989d9ae81202bf2767e01a4e2c911d983 (plain) (tree)
1
2
3
4
5
6
7
8
9






                     
                  
                        












                                        




                                           








                                                         
for s in [
        'Species',
        'AccountId',
        'CharId',
        'PartyId',
        'ItemNameId',
        'BlockId',
        'QuestId',
        'ClientVersion',
]:
    class OtherId(object):
        __slots__ = ('_value')
        name = 'tmwa::%s' % s
        enabled = True

        def __init__(self, value):
            self._value = value

        def to_string(self):
            value = self._value
            fields = value.type.fields()
            field0 = fields[-1]
            if field0.is_base_class:
                w = value.cast(field0.type)
            else:
                w = value[field0.name]
            return '%s' % w

        tests = [
                ('tmwa::wrap<tmwa::%s>(123)' % s, '123'),
        ]
    globals()[s] = OtherId
    del OtherId

class GmLevel(object):
    pass