spaceninjaserver / SpaceNinjaServer

A simple server for a small space ninja game
GNU General Public License v3.0
69 stars 38 forks source link

Buying from Faction Vendors does not appear to consume Reputation #566

Open VampireKitten opened 2 weeks ago

VampireKitten commented 2 weeks ago

I am unsure if this also applies to any other rep vendors. Possibly related to #555 and #463?

2024-10-18T23:10:20:862 [0.1.0] debug:  purchase request {
  PurchaseParams: {
    Source: 2,
    StoreItem: '/Lotus/StoreItems/Types/Items/MiscItems/LibraryScannerRechargeUpgrade',
    StorePage: '',
    SearchTerm: '',
    CurrentLocation: '',
    Quantity: 1,
    UsePremium: false,
    ExpectedPrice: 0
  },
  buildLabel: '2024.10.09.16.31/9tezi8eY3T7s1ZMKjhUbFA'
}
2024-10-18T23:10:20:863 [0.1.0] debug:  handling acquision of /Lotus/StoreItems/Types/Items/MiscItems/LibraryScannerRechargeUpgrade
2024-10-18T23:10:20:865 [0.1.0] debug:  store category Types
2024-10-18T23:10:20:865 [0.1.0] debug:  type category Items
2024-10-18T23:10:20:925 [0.1.0] debug:  currency changes  { currencyChanges: {} }
2024-10-18T23:10:20:945 [0.1.0] http:   POST /api/purchase.php?accountId=670ac77e9d079e34ab018ed7&nonce=1729718044658248&ct=MSI 200 85.251 ms - 124
2024-10-18T23:10:36:637 [0.1.0] debug:  purchase request {
  PurchaseParams: {
    Source: 2,
    StoreItem: '/Lotus/StoreItems/Types/Items/MiscItems/LibraryScannerScanSpeedUpgrade',
    StorePage: '',
    SearchTerm: '',
    CurrentLocation: '',
    Quantity: 1,
    UsePremium: false,
    ExpectedPrice: 0
  },
  buildLabel: '2024.10.09.16.31/9tezi8eY3T7s1ZMKjhUbFA'
}
2024-10-18T23:10:36:638 [0.1.0] debug:  handling acquision of /Lotus/StoreItems/Types/Items/MiscItems/LibraryScannerScanSpeedUpgrade
2024-10-18T23:10:36:640 [0.1.0] debug:  store category Types
2024-10-18T23:10:36:640 [0.1.0] debug:  type category Items
2024-10-18T23:10:36:692 [0.1.0] debug:  currency changes  { currencyChanges: {} }
2024-10-18T23:10:36:717 [0.1.0] http:   POST /api/purchase.php?accountId=670ac77e9d079e34ab018ed7&nonce=1729718044658248&ct=MSI 200 80.528 ms - 125
Sainan commented 2 weeks ago

I guess Source: 2 is the relevant part here, maybe a bit of a special case, even.

VampireKitten commented 2 weeks ago

It seems that Source: 2 may indicate any purchase made with reputation, as it's also on all these purchases from Old Man Suumbaat in Cetus.

2024-10-19T02:01:08:145 [0.1.0] debug:  purchase request {
  PurchaseParams: {
    Source: 2,
    StoreItem: '/Lotus/StoreItems/Types/Restoratives/Consumable/MiningLaser',
    StorePage: '',
    SearchTerm: '',
    CurrentLocation: '',
    Quantity: 1,
    UsePremium: false,
    ExpectedPrice: 0
  },
  buildLabel: '2024.10.09.16.31/9tezi8eY3T7s1ZMKjhUbFA'
}
2024-10-19T02:01:08:146 [0.1.0] debug:  handling acquision of /Lotus/StoreItems/Types/Restoratives/Consumable/MiningLaser
2024-10-19T02:01:08:147 [0.1.0] debug:  store category Types
2024-10-19T02:01:08:147 [0.1.0] debug:  type category Restoratives
2024-10-19T02:01:08:212 [0.1.0] debug:  currency changes  { currencyChanges: {} }
2024-10-19T02:01:08:242 [0.1.0] http:   POST /api/purchase.php?accountId=670ac77e9d079e34ab018ed7&nonce=3590945910898660&ct=MSI 200 98.462 ms - 116
2024-10-19T02:01:13:360 [0.1.0] debug:  purchase request {
  PurchaseParams: {
    Source: 2,
    StoreItem: '/Lotus/StoreItems/Types/Recipes/EidolonRecipes/Prospecting/CommonGemACutABlueprint',
    StorePage: '',
    SearchTerm: '',
    CurrentLocation: '',
    Quantity: 1,
    UsePremium: false,
    ExpectedPrice: 0
  },
  buildLabel: '2024.10.09.16.31/9tezi8eY3T7s1ZMKjhUbFA'
}
2024-10-19T02:01:13:361 [0.1.0] debug:  handling acquision of /Lotus/StoreItems/Types/Recipes/EidolonRecipes/Prospecting/CommonGemACutABlueprint
2024-10-19T02:01:13:362 [0.1.0] debug:  store category Types
2024-10-19T02:01:13:363 [0.1.0] debug:  type category Recipes
2024-10-19T02:01:13:418 [0.1.0] debug:  currency changes  { currencyChanges: {} }
2024-10-19T02:01:13:438 [0.1.0] http:   POST /api/purchase.php?accountId=670ac77e9d079e34ab018ed7&nonce=3590945910898660&ct=MSI 200 78.916 ms - 135
2024-10-19T02:01:17:304 [0.1.0] debug:  purchase request {
  PurchaseParams: {
    Source: 2,
    StoreItem: '/Lotus/StoreItems/Types/Recipes/EidolonRecipes/Prospecting/CommonOreAAlloyABlueprint',
    StorePage: '',
    SearchTerm: '',
    CurrentLocation: '',
    Quantity: 1,
    UsePremium: false,
    ExpectedPrice: 0
  },
  buildLabel: '2024.10.09.16.31/9tezi8eY3T7s1ZMKjhUbFA'
}
2024-10-19T02:01:17:305 [0.1.0] debug:  handling acquision of /Lotus/StoreItems/Types/Recipes/EidolonRecipes/Prospecting/CommonOreAAlloyABlueprint
2024-10-19T02:01:17:310 [0.1.0] debug:  store category Types
2024-10-19T02:01:17:311 [0.1.0] debug:  type category Recipes
2024-10-19T02:01:17:355 [0.1.0] debug:  currency changes  { currencyChanges: {} }
2024-10-19T02:01:17:373 [0.1.0] http:   POST /api/purchase.php?accountId=670ac77e9d079e34ab018ed7&nonce=3590945910898660&ct=MSI 200 70.417 ms - 137
2024-10-19T02:01:20:561 [0.1.0] debug:  purchase request {
  PurchaseParams: {
    Source: 2,
    StoreItem: '/Lotus/StoreItems/Types/Recipes/EidolonRecipes/Prospecting/CommonGemBCutABlueprint',
    StorePage: '',
    SearchTerm: '',
    CurrentLocation: '',
    Quantity: 1,
    UsePremium: false,
    ExpectedPrice: 0
  },
  buildLabel: '2024.10.09.16.31/9tezi8eY3T7s1ZMKjhUbFA'
}
2024-10-19T02:01:20:561 [0.1.0] debug:  handling acquision of /Lotus/StoreItems/Types/Recipes/EidolonRecipes/Prospecting/CommonGemBCutABlueprint
2024-10-19T02:01:20:567 [0.1.0] debug:  store category Types
2024-10-19T02:01:20:568 [0.1.0] debug:  type category Recipes
2024-10-19T02:01:20:624 [0.1.0] debug:  currency changes  { currencyChanges: {} }
2024-10-19T02:01:20:659 [0.1.0] http:   POST /api/purchase.php?accountId=670ac77e9d079e34ab018ed7&nonce=3590945910898660&ct=MSI 200 99.033 ms - 135
2024-10-19T02:01:23:729 [0.1.0] debug:  purchase request {
  PurchaseParams: {
    Source: 2,
    StoreItem: '/Lotus/StoreItems/Types/Recipes/EidolonRecipes/Prospecting/CommonOreBAlloyABlueprint',
    StorePage: '',
    SearchTerm: '',
    CurrentLocation: '',
    Quantity: 1,
    UsePremium: false,
    ExpectedPrice: 0
  },
  buildLabel: '2024.10.09.16.31/9tezi8eY3T7s1ZMKjhUbFA'
}
2024-10-19T02:01:23:730 [0.1.0] debug:  handling acquision of /Lotus/StoreItems/Types/Recipes/EidolonRecipes/Prospecting/CommonOreBAlloyABlueprint
2024-10-19T02:01:23:737 [0.1.0] debug:  store category Types
2024-10-19T02:01:23:737 [0.1.0] debug:  type category Recipes
2024-10-19T02:01:23:788 [0.1.0] debug:  currency changes  { currencyChanges: {} }
2024-10-19T02:01:23:809 [0.1.0] http:   POST /api/purchase.php?accountId=670ac77e9d079e34ab018ed7&nonce=3590945910898660&ct=MSI 200 81.952 ms - 137
VampireKitten commented 2 weeks ago

And it seems that the way purchases are handled is somewhat incorrect, as the request sent and how we process it don't match:

{
  PurchaseParams: {
    Source: 2,
    StoreItem: '/Lotus/StoreItems/Types/Restoratives/Consumable/FishingBoosts/AnglerVision',
    StorePage: '',
    SearchTerm: '',
    CurrentLocation: '',
    Quantity: 1,
    UsePremium: false,
    ExpectedPrice: 0,
    SyndicateTag: 'CetusSyndicate',
    UseFreeFavor: false
  },
  buildLabel: '2024.10.09.16.31/9tezi8eY3T7s1ZMKjhUbFA'
}
2024-10-19T02:05:48:903 [0.1.0] debug:  purchase request {
  PurchaseParams: {
    Source: 2,
    StoreItem: '/Lotus/StoreItems/Types/Restoratives/Consumable/FishingBoosts/AnglerVision',
    StorePage: '',
    SearchTerm: '',
    CurrentLocation: '',
    Quantity: 1,
    UsePremium: false,
    ExpectedPrice: 0
  },
  buildLabel: '2024.10.09.16.31/9tezi8eY3T7s1ZMKjhUbFA'
}

I'm assuming the price is pulled in some way from the StoreItem after Source: 2 tells it to use rep, and SyndicateTag is then used to know which faction's rep to reduce.

VampireKitten commented 2 weeks ago

Unsure if I should add it to this issue or make a new one, but it seems that Ticker (and presumably other vendors that consume resources?) uses Source: 7 for Debt-Bonds. It even includes an ExtraPurchaseInfoJson, though no idea what it could be for:

{
  PurchaseParams: {
    Source: 7,
    SourceId: '5be4a159b144f3cdf1c22efa',
    StoreItem: '/Lotus/Types/StoreItems/Packages/DebtTokenBundles/DebtTokenBundleCommonG',
    StorePage: '',
    SearchTerm: '',
    CurrentLocation: '',
    Quantity: 1,
    UsePremium: false,
    ExpectedPrice: 0,
    ExtraPurchaseInfoJson: '{"ItemId":"67112582cc115756985e73a4"}'
  },
  buildLabel: '2024.10.09.16.31/9tezi8eY3T7s1ZMKjhUbFA'
}
2024-10-19T03:36:31:777 [0.1.0] debug:  purchase request {
  PurchaseParams: {
    Source: 7,
    StoreItem: '/Lotus/Types/StoreItems/Packages/DebtTokenBundles/DebtTokenBundleCommonG',
    StorePage: '',
    SearchTerm: '',
    CurrentLocation: '',
    Quantity: 1,
    UsePremium: false,
    ExpectedPrice: 0
  },
  buildLabel: '2024.10.09.16.31/9tezi8eY3T7s1ZMKjhUbFA'
}
2024-10-19T03:36:31:780 [0.1.0] debug:  handling acquision of /Lotus/Types/StoreItems/Packages/DebtTokenBundles/DebtTokenBundleCommonG
2024-10-19T03:36:31:781 [0.1.0] debug:  acquiring bundle {
  icon: '/Lotus/Interface/Icons/Npcs/Solaris/Silhouettes/Theme/SilhouettesQ.png',
  components: [
    {
      typeName: '/Lotus/StoreItems/Types/Items/Solaris/DebtTokenA',
      purchaseQuantity: 8,
      durability: 'COMMON'
    },
    {
      typeName: '/Lotus/StoreItems/Types/Items/Solaris/DebtTokenB',
      purchaseQuantity: 7,
      durability: 'COMMON'
    }
  ]
}
2024-10-19T03:36:31:783 [0.1.0] debug:  handling acquision of /Lotus/StoreItems/Types/Items/Solaris/DebtTokenA
2024-10-19T03:36:31:783 [0.1.0] debug:  store category Types
2024-10-19T03:36:31:784 [0.1.0] debug:  type category Items
2024-10-19T03:36:31:882 [0.1.0] debug:  handling acquision of /Lotus/StoreItems/Types/Items/Solaris/DebtTokenB
2024-10-19T03:36:31:883 [0.1.0] debug:  store category Types
2024-10-19T03:36:31:884 [0.1.0] debug:  type category Items
2024-10-19T03:36:31:988 [0.1.0] debug:  currency changes  { currencyChanges: {} }
2024-10-19T03:36:32:034 [0.1.0] http:   POST /api/purchase.php?accountId=670ac77e9d079e34ab018ed7&nonce=5733951597445925&ct=MSI 200 259.819 ms - 170