6 Commits
Author SHA1 Message Date
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 0ac442f19fcfa8c39775c5ae06bba8f3bcbd0407)

# Conflicts:
#	src/server/game/AuctionHouse/AuctionHouseMgr.h
2016-03-23 00:28:03 +00:00
pete318 b099e4e43a Only read and delete from corpse table for current map instance. Not for
all. Prevents assert stop upon entering an instance on second character
after first one is a corpse in the same dungeon on different instance ID.
2015-08-27 01:07:14 +01:00
pete318 ef387cb6ff Implement correction from 3.3.5 into 6.x for runeforging skill learnt from
Death Knight quest.
2015-07-22 15:59:48 +01:00
pete318 97a074def2 Core/Spells: Support for targetting spells onto in flight units
* This adds support to spell_custom_attr to allow a spell to be cast
  upon a unit on a taxi/in flight.
* This will allow the Issue #11880 with Horde quest Test At Sea (11170) to be corrected.
* closes #14235

Signed-off-by: Naios <[email protected]>

(cherry picked from commit f9cba93985d79ae352a9e6371da1d580a119fb51)
2015-06-04 13:38:53 +02:00
pete318 fe3772df74 Core: NPC Interaction change for unfriendly reputation.
For units with unfriendly reputation, check using the normal reaction function, instead of reading faction directly.

This allows specific buffs that alter creature reaction to work on the player, this allowing players to complete quests.

Closes #13629

(cherry picked from commit 17f6dcb76282523ac43d8a1e6cebbe0043ab44fa)

Conflicts:
	src/server/game/Entities/Player/Player.cpp
2014-12-28 19:04:20 +00:00
pete318 27137ca06e Scripts/Quests: Fix Quest A Spirit Guide
- Ensures rep adjustment buff is always applied (overrides evade, implements existing evade + re-apply buff)
- Removes un-owned ravagers with incorrect faction from DB (the correct ones are spawned with their masters without the DB entries)
- Create some extra steps in the wolf's waypoints in order to generate some AI events for the Ryga NPC. I think it's a bit of a dirty solution, but it seems to work with minimal changes.
- Created RP series of events with Ryga NPC and Ancestral Wolf Spirit (Ryga Kneels, talks to wolf, then returns to spawn position after around a minute).

Closes #13619
Fix #4028

(cherry picked from commit f2444eedf92fce39f7685eafead61d88d4ad89ef)

Conflicts:
	sql/updates/world/2014_12_28_02_world.sql
2014-12-28 18:46:58 +00:00