魔兽改图吧 关注:1,373贴子:8,039
  • 3回复贴,共1

这种是格式转换吗

只看楼主收藏回复

物品ID显示这种$73686377 技能ID也是这种 $414E6874 怎么还原啊


IP属地:湖北1楼2025-08-13 16:27回复
    是ascii转16进制 倒转一下可以得出ID


    IP属地:湖北2楼2025-08-13 16:56
    回复
      2026-01-23 08:18:37
      广告
      不感兴趣
      开通SVIP免广告
      16进制转回去就行,问ai要了个py代码帮忙转
      def fourcc_to_string(fourcc_hex):
      # 去掉$符号,将十六进制转换为整数
      hex_val = int(fourcc_hex.replace('$', ''), 16)
      # 将32位整数转换为4个字节(大端序)
      return hex_val.to_bytes(4, 'big').decode('ascii', errors='ignore').strip('\x00')
      # 你的示例
      item_id = "$73686377"
      skill_id = "$414E6874"
      print(f"物品ID: {fourcc_to_string(item_id)}") # 输出: shcw
      print(f"技能ID: {fourcc_to_string(skill_id)}") # 输出: ANht


      IP属地:北京3楼2025-10-16 17:42
      回复
        16转256


        IP属地:湖南来自Android客户端4楼2025-10-21 13:46
        回复