pete318 28f51306d4 Improved Auction house deposit handling.
Including the weird quirks.

Changes:
* Deposit caculated according to same rule as client. (detailed below). Should always match client deposit now
* Deposit for multiple auctions now only collected once. Deferred calculation of deposit until all auctions listed.

Deposit calculation is as follows:

Base deposit calculation = MSV x 15/75% (depending on AH). However this is not rounded. Case to int is used (so always round down)
The remainder is held in a float.
The base is then multiplied by number of items, and the time multiplier (x2 for 24 hour, x4 for 48 hour)
The nearest (no of items or lower) no of items when multiplied by the remainder that creates a whole number is then multiplied by the time multiplier (x1/x2/x4) and then added to deposit.

Example:

Item sell price 1s25. Deposit 18.75c (15% of 1s25). So base deposit = 18, remainder 0.75. Time 24h (x2) Item count 1 = 36c. Remainder = 0.75 (n) Min = 1s. Deposit 1s
Item sell price 1s25. Deposit 18.75c (15% of 1s25). So base deposit = 18, remainder 0.75. Time 24h (x2) Item count 2 = 72c. Remainder = 1.50 (n)  Min = 1s. Deposit 1s
Item sell price 1s25. Deposit 18.75c (15% of 1s25). So base deposit = 18, remainder 0.75. Time 24h (x2) Item count 3 = 108c. Remainder = 2.25 (n) Min = 1s. Deposit 1s08c
Item sell price 1s25. Deposit 18.75c (15% of 1s25). So base deposit = 18, remainder 0.75. Time 24h (x2) Item count 4 = 144c. Remainder = 3.00 (n) Min = 1s. Deposit 1s50c (144c + (3c * 2))

Horrible kludge, to re-create a very weird deposit method.

Closes #15674 (PR)
Closes #15643 (Issue)

(cherry picked from commit 0ac442f19f)

# Conflicts:
#	src/server/game/AuctionHouse/AuctionHouseMgr.h
2016-03-23 00:28:03 +00:00
2016-01-01 00:34:25 +01:00
2016-03-20 19:00:12 +01:00
2016-01-01 00:34:25 +01:00
2016-03-22 23:40:31 +01:00
2015-06-30 14:39:02 +02:00
2015-11-07 11:22:16 +01:00
2013-01-21 02:47:51 +00:00
2014-12-05 23:49:46 +01:00
2016-01-01 00:34:25 +01:00
2015-11-07 11:22:16 +01:00

logo TrinityCore

Issue Stats Issue Stats Bountysource

Build Status

6.x 3.3.5
6.x Build Status 3.3.5 Build Status
Coverity Scan Build Status Coverity Scan Build Status

Introduction

TrinityCore is a MMORPG Framework based mostly in C++.

It is derived from MaNGOS, the Massive Network Game Object Server, and is based on the code of that project with extensive changes over time to optimize, improve and cleanup the codebase at the same time as improving the in-game mechanics and functionality.

It is completely open source; community involvement is highly encouraged.

If you wish to contribute ideas or code please visit our site linked below or make pull requests to our Github repository.

For further information on the TrinityCore project, please visit our project website at TrinityCore.org.

Requirements

Software requirements are available in the wiki for Windows, Linux and Mac OSX.

Install

Detailed installation guides are available in the wiki for Windows, Linux and Mac OSX.

Reporting issues

Issues can be reported via the Github issue tracker.

Please take the time to review existing issues before submitting your own to prevent duplicates.

In addition, thoroughly read through the issue tracker guide to ensure your report contains the required information. Incorrect or poorly formed reports are wasteful and are subject to deletion.

Submitting fixes

Fixes are submitted as pull requests via Github. For more information on how to properly submit a pull request, read the how-to: maintain a remote fork.

License: GPL 2.0

Read file COPYING

Authors & Contributors

Read file THANKS

Site

Wiki

Documentation (powered by Doxygen)

Forums

Description
Server emulator for World of Warcraft 3.3.5.12340 and other versions
Readme 10 GiB
Languages
C++ 89%
C 10.4%
CMake 0.4%