CGUnit_C::GetMerchantDiscount
function · objectlayer · primitive
- Address
0x612b80· 101 bytes, up to0x612be4- Meaning
- Returns a vendor's discount: 0.1 at reaction 5, plus 0.05 at honor rank 6 and 8 for a PvP vendor
- Confidence
- verified, proof one
- Finding
- objectlayer/vendordiscount#the-discount
- Test
objectlayer::vendor_price_discount_difftest
Finding: The discount in objectlayer: the vendor discount
0x612b80(vendor, player) is the sum of three terms: 0.1 when the vendor's reaction toward the player is 5 or
more; 0.05 when the vendor has the PvP flag and the player's honor rank byte is 6 or more; 0.05 more when that
byte is 8 or more. The sum is left on the FPU stack unrounded, so the values are 0, 0.05, 0.1, 0.15 and 0.2. At 53-bit x87 precision 0.15 is not a float;
at 24-bit precision the sum rounds to a float.
The derivation is in the doc.
Callers 2
Callees 1
- CGUnit_C::UnitReaction objectlayer
Calls and jumps by a bare address, from tables/calls.tsv.