Merge pull request #49 from solero/increase-puffle-interval

Increase Puffle killer interval to 30 minutes
This commit is contained in:
Ben 2020-06-21 15:53:48 +01:00 committed by GitHub
commit 1bd6f590ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 3 deletions

View File

@ -140,3 +140,14 @@ async def handle_epf_grant_reward(p, medals: int):
await p.update(career_medals=p.career_medals + medals,
agent_medals=p.agent_medals + medals).apply()
await p.send_xt('epfgr', p.career_medals, p.agent_medals)
@handlers.handler(XTPacket('epfsf', ext='z'))
async def handle_epf_medal_check(p, stamp_id: int):
if not p.agent_status:
await p.send_xt('epfsf', 'naa')
if stamp_id not in p.stamps:
await p.send_xt('epfsf', 'nem', stamp_id)
else:
await p.send_xt('epfsf', 'ahm')

View File

@ -12,7 +12,7 @@ from houdini.data.pet import PenguinPuffle, PenguinPuffleCollection, PenguinPuff
from houdini.data.room import PenguinBackyardRoom, PenguinIglooRoom
from houdini.handlers import Priority, XMLPacket, XTPacket
PuffleKillerInterval = 600
PuffleKillerInterval = 1800
LegacyPuffleIds = [0, 1, 2, 3, 4, 5, 6, 7, 8]
BrushCareItemId = 1
@ -651,8 +651,8 @@ async def handle_set_puffle_handler(p):
@handlers.handler(XTPacket('p', 'puphi'), client=ClientType.Vanilla)
async def handle_puffle_visitor_hat_update(p, puffle: PenguinPuffle, hat_id: int):
if hat_id in p.puffle_items:
await puffle.update(hat=hat_id).apply()
if hat_id in p.puffle_items or hat_id == 0:
await puffle.update(hat=hat_id if hat_id > 0 else None).apply()
await p.room.send_xt('puphi', puffle.id, hat_id)