mirror of
https://github.com/solero/houdini.git
synced 2024-11-09 20:58:20 +00:00
Base ninja handlers
This commit is contained in:
parent
ef421dc957
commit
a920be3aca
@ -13,3 +13,34 @@ async def cards_load(server):
|
|||||||
@handlers.allow_once
|
@handlers.allow_once
|
||||||
async def load_ninja_inventory(p):
|
async def load_ninja_inventory(p):
|
||||||
p.cards = await PenguinCardCollection.get_collection(p.id)
|
p.cards = await PenguinCardCollection.get_collection(p.id)
|
||||||
|
|
||||||
|
|
||||||
|
@handlers.handler(XTPacket('ni', 'gnr'))
|
||||||
|
async def handle_get_ninja_ranks(p):
|
||||||
|
await p.send_xt('gnr', p.id, p.ninja_rank, p.fire_ninja_rank, p.water_ninja_rank, 0)
|
||||||
|
|
||||||
|
|
||||||
|
@handlers.handler(XTPacket('ni', 'gnl'))
|
||||||
|
async def handle_get_ninja_level(p):
|
||||||
|
await p.send_xt('gnl', p.ninja_rank, p.ninja_progress)
|
||||||
|
|
||||||
|
|
||||||
|
@handlers.handler(XTPacket('ni', 'gfl'))
|
||||||
|
async def handle_get_fire_level(p):
|
||||||
|
await p.send_xt('gfl', p.fire_ninja_rank, p.fire_ninja_progress)
|
||||||
|
|
||||||
|
|
||||||
|
@handlers.handler(XTPacket('ni', 'gwl'))
|
||||||
|
async def handle_get_water_level(p):
|
||||||
|
await p.send_xt('gwl', p.water_ninja_rank, p.water_ninja_progress)
|
||||||
|
|
||||||
|
|
||||||
|
@handlers.handler(XTPacket('ni', 'gsl'))
|
||||||
|
async def handle_get_snow_level(p):
|
||||||
|
await p.send_xt('gsl', 0, 0)
|
||||||
|
|
||||||
|
|
||||||
|
@handlers.handler(XTPacket('cd', 'gcd'))
|
||||||
|
async def handle_get_card_data(p):
|
||||||
|
await p.send_xt('gcd', '|'.join(f'{card.card_id},{card.quantity},{card.member_quantity}'
|
||||||
|
for card in p.cards.values()))
|
||||||
|
Loading…
Reference in New Issue
Block a user