Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: Golden gun profile image issue

  1. #1

    Default Golden gun profile image issue

    Apparently when you use the golden gun, it changes your profile image to gold. However, it does this by encoding the entire image in the data "data:image/png;base64"

    In mafia, the image shows up as a broken image.

    The properties of the gun aren't recorded yet (I was trying to do this very thing), so I'm not sure if it is time-sensitive. But you might be able to see the issue by pulling up QVamp's profile. I'm using no more turns tonight, so if it is turn based, it should stay that way.

  2. #2

    Default

    sorry, I realized I didn't specify... the <img src=""> attribute is the data:image.

    And to help more, Mafia ultimately says:

    <img crossorigin="Anonymous" src="/iii/otherimages/ed_av1.gif" width="60" height="100" border="0">

    ... I have no idea where this src comes from.

  3. #3

    Default

    My brief bit of time looking at this a while ago leads me to believe this falls somewhere in Not a (mafia) Bug or Won't Fix. Maybe someone else will see a straightforward fix though.

  4. #4
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,268

    Default

    Not a mafia bug? How so? I have noticed that this bug does not happen when I use native KoL, so it seems likely that mafia is failing to handle a KoL feature.

  5. #5
    Developer
    Join Date
    Aug 2009
    Posts
    2,688

    Default

    The /iii/ prefix is also present in KoL. I imagine the issue is that we're not treating that as an image URL, so we're not caching it.

  6. #6
    Developer
    Join Date
    Aug 2009
    Posts
    2,688

    Default

    This report is not quite correct.

    HTML snippet from the profile page:
    PHP Code:
    <table><tr><td><script language="javascript" src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/ocrs.20151224.js"></script><link rel="stylesheet" href="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/ocrs.css" /><div class='gold' style='position: relative'><img  src="/iii/otherimages/jarlsberg_avatar.gif" width=60 height=100 border=0></div></td> 
    This is implemented by piggybacking off the OCRS image manipulation javascript. I would surmise that modifying the images regex to include /iii as a possible prefix is the simplest fix.

  7. #7
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,131

    Default

    I went to look at QVamp's profile page and am seeing none of the HTML you cite.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  8. #8
    Developer
    Join Date
    Aug 2009
    Posts
    2,688

    Default

    Yes, that's because it looks to be expired (or something). I used a golden gun on my multi, sleepyone (#1964444), so you can see it there for now.

    Secondary wrinkle I noticed (after adding "/iii" to the regex in RelayAgent.java) is that KoL modified ocrs.20151224.js without bumping the version number; we're over-aggressively caching, unfortunately. I removed the cached copy, restarted Mafia, and it displays as expected.

  9. #9
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,131

    Default

    However, I had a multi buy a golden gun and use it on himself, so now I can experiment.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  10. #10
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,131

    Default

    Secondary wrinkle I noticed (after adding "/iii" to the regex in RelayAgent.java) is that KoL modified ocrs.20151224.js without bumping the version number; we're over-aggressively caching, unfortunately. I removed the cached copy, restarted Mafia, and it displays as expected.
    Originally Posted by heeheehee View Post
    KoL modified it? Did it, at lease, update the modified date?
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •