Bug - Fixed Cyrpt details not showing up in relay browser

I was happily adventuring on, and started doing the cyrpt - and noticed that the evilometer info wasn't showing up on the side. After some poking around in the code, it looks like the evil level of the various areas only gets properly set if kolmafia sees you get the evilometer. I could have sworn I got the quest with this kolmafia instance, but I play from multiple locations so I very well could not have gotten the evilometer, and thus not had it show up properly. But hey, that's bad - my take is it shouldn't matter where the user played before, kolmafia should figure out the right details, and if the cyrpt quest is active at all, we should figure out and properly set the various evil levels. So, I whipped up a patch to do that. I *think* this is in the right place - as a part of the initial login process, but after the QuestLogRequest calls happen so we know that the status of the quest is properly set - the patch is very simple, it basically checks if the cyrpt quest is active at all, and if it is, goes and uses the evilometer which then does the right thing around setting the evil levels, and thus has it properly display in the relay browser. Patch is against r10906, and builds/runs/does what it's supposed to. If this is better suited somewhere else, let me know, I'm happy to put together an improved version.

In my 30 seconds of thinking about it, I don't believe there are any other quests where this sort of checking is appropriate, but if so, let me know and I'll try to get those in as well.
 

Attachments

  • get_evilness_on_start.patch
    1.1 KB · Views: 28

roippi

Developer
r10909. I made it only use the evilometer if cyrptTotalEvilness also == 0. If we know the evil, no need for the server hit.
 
Fair enough - I didn't do that because there's still a chance someone started adventuring with another KoLmafia instance and cut down on some of the evil levels - I don't believe we'll get the right values then without using the evilometer. I.e., even if we know the evil levels, there's no guarantee we're right about them. But certainly that's an edge case.
 

Theraze

Active member
That, and it causes extra server hits if they're exclusively using mafia. If they care about the relay hints and they're using Vanilla/mafia or multiple non-synced computers, it's on them to force the server hit. This way, we save a bunch of hits in general though...
 
Top