Jump to content

[Patch][7840] Hunter's pet size fix


Guest Naicisum

Recommended Posts

What bug does the patch fix? What features does the patch add?

- Hunter's pet incorrectly scales based on pet level and DBC values

For which repository revision was the patch created?

- 7814

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

- https://mangos.lighthouseapp.com/projects/18208/tickets/129-7814-bugpatch-hunters-pet-incorrectly-scales

Who has been writing this patch? Please include either forum user names or email addresses.

- me

Reproduce Steps: Created night-elf hunter, set char level to 45 and learned associated training skills and pet training via quest. Go to Arathai Highlands, and train a raptor of level < 40. Should gain pet of L40 but size is too small.

Verification: Did a tracepoint using VS2008 and evaluated the math, because its a mix of UInt32 and Float values the math is incorrectly calculated and the result ends up being only the value of cFamily->minScale (for raptor is 0.5f). By typecasting the UInt32's to floats, the correct value gets specified and used (level 40 raptor should be 0.695f)

Proposed Fix: Add float type casts to calculation.

scale = cFamily->minScale + (float)(getLevel() - cFamily->minScaleLevel) / (float)cFamily->maxScaleLevel * (cFamily->maxScale - cFamily->minScale);

Patch: https://mangos.lighthouseapp.com/attachments/121767/7814_hunterpet.patch

Link to comment
Share on other sites

  • 4 months later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use