mirror of
https://github.com/NathanHandley/mod-ah-bot-plus.git
synced 2026-02-06 12:27:50 +00:00
Update ahbot.patch
This commit is contained in:
34
ahbot.patch
34
ahbot.patch
@@ -1,5 +1,16 @@
|
|||||||
|
From 147a844c7a6fe88c3f1a07aed48fdba499a20754 Mon Sep 17 00:00:00 2001
|
||||||
|
From: BarbzYHOOL <professor_barbz@gmx.com>
|
||||||
|
Date: Thu, 30 Jan 2020 23:49:28 +0100
|
||||||
|
Subject: [PATCH] fix: ah_bot.patch
|
||||||
|
|
||||||
|
---
|
||||||
|
.../game/AuctionHouse/AuctionHouseMgr.cpp | 23 ++++++++++++++++++-
|
||||||
|
src/server/game/Mails/Mail.cpp | 12 ++++++++++
|
||||||
|
src/server/game/World/World.cpp | 12 ++++++++++
|
||||||
|
3 files changed, 46 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
|
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
|
||||||
index 4aba5703b2..5c9a332016 100644
|
index b8363279..05318818 100644
|
||||||
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
|
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
|
||||||
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
|
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
|
||||||
@@ -21,6 +21,9 @@
|
@@ -21,6 +21,9 @@
|
||||||
@@ -12,7 +23,7 @@ index 4aba5703b2..5c9a332016 100644
|
|||||||
|
|
||||||
enum eAuctionHouse
|
enum eAuctionHouse
|
||||||
{
|
{
|
||||||
@@ -139,8 +142,11 @@ void AuctionHouseMgr::SendAuctionSuccessfulMail(AuctionEntry* auction, SQLTransa
|
@@ -145,8 +148,11 @@ void AuctionHouseMgr::SendAuctionSuccessfulMail(AuctionEntry* auction, SQLTransa
|
||||||
if (owner || owner_accId)
|
if (owner || owner_accId)
|
||||||
{
|
{
|
||||||
uint32 profit = auction->bid + auction->deposit - auction->GetAuctionCut();
|
uint32 profit = auction->bid + auction->deposit - auction->GetAuctionCut();
|
||||||
@@ -25,7 +36,7 @@ index 4aba5703b2..5c9a332016 100644
|
|||||||
{
|
{
|
||||||
owner->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GOLD_EARNED_BY_AUCTIONS, profit);
|
owner->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GOLD_EARNED_BY_AUCTIONS, profit);
|
||||||
owner->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_SOLD, auction->bid);
|
owner->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_SOLD, auction->bid);
|
||||||
@@ -183,7 +189,11 @@ void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry* auction, SQLTransacti
|
@@ -189,7 +195,11 @@ void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry* auction, SQLTransacti
|
||||||
// owner exist
|
// owner exist
|
||||||
if (owner || owner_accId)
|
if (owner || owner_accId)
|
||||||
{
|
{
|
||||||
@@ -37,7 +48,7 @@ index 4aba5703b2..5c9a332016 100644
|
|||||||
owner->GetSession()->SendAuctionOwnerNotification(auction);
|
owner->GetSession()->SendAuctionOwnerNotification(auction);
|
||||||
|
|
||||||
MailDraft(auction->BuildAuctionMailSubject(AUCTION_EXPIRED), AuctionEntry::BuildAuctionMailBody(0, 0, auction->buyout, auction->deposit, 0))
|
MailDraft(auction->BuildAuctionMailSubject(AUCTION_EXPIRED), AuctionEntry::BuildAuctionMailBody(0, 0, auction->buyout, auction->deposit, 0))
|
||||||
@@ -207,6 +217,11 @@ void AuctionHouseMgr::SendAuctionOutbiddedMail(AuctionEntry* auction, uint32 new
|
@@ -213,6 +223,11 @@ void AuctionHouseMgr::SendAuctionOutbiddedMail(AuctionEntry* auction, uint32 new
|
||||||
// old bidder exist
|
// old bidder exist
|
||||||
if (oldBidder || oldBidder_accId)
|
if (oldBidder || oldBidder_accId)
|
||||||
{
|
{
|
||||||
@@ -49,7 +60,7 @@ index 4aba5703b2..5c9a332016 100644
|
|||||||
if (oldBidder && newBidder)
|
if (oldBidder && newBidder)
|
||||||
oldBidder->GetSession()->SendAuctionBidderNotification(auction->GetHouseId(), auction->Id, newBidder->GetGUID(), newPrice, auction->GetAuctionOutBid(), auction->item_template);
|
oldBidder->GetSession()->SendAuctionBidderNotification(auction->GetHouseId(), auction->Id, newBidder->GetGUID(), newPrice, auction->GetAuctionOutBid(), auction->item_template);
|
||||||
|
|
||||||
@@ -407,10 +422,16 @@ void AuctionHouseObject::AddAuction(AuctionEntry* auction)
|
@@ -413,10 +428,16 @@ void AuctionHouseObject::AddAuction(AuctionEntry* auction)
|
||||||
|
|
||||||
AuctionsMap[auction->Id] = auction;
|
AuctionsMap[auction->Id] = auction;
|
||||||
sScriptMgr->OnAuctionAdd(this, auction);
|
sScriptMgr->OnAuctionAdd(this, auction);
|
||||||
@@ -67,7 +78,7 @@ index 4aba5703b2..5c9a332016 100644
|
|||||||
|
|
||||||
sScriptMgr->OnAuctionRemove(this, auction);
|
sScriptMgr->OnAuctionRemove(this, auction);
|
||||||
diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp
|
diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp
|
||||||
index 6683fe2f15..9fcd209454 100644
|
index 6683fe2f..9fcd2094 100644
|
||||||
--- a/src/server/game/Mails/Mail.cpp
|
--- a/src/server/game/Mails/Mail.cpp
|
||||||
+++ b/src/server/game/Mails/Mail.cpp
|
+++ b/src/server/game/Mails/Mail.cpp
|
||||||
@@ -15,6 +15,9 @@
|
@@ -15,6 +15,9 @@
|
||||||
@@ -97,10 +108,10 @@ index 6683fe2f15..9fcd209454 100644
|
|||||||
|
|
||||||
//expire time if COD 3 days, if no COD 30 days, if auction sale pending 1 hour
|
//expire time if COD 3 days, if no COD 30 days, if auction sale pending 1 hour
|
||||||
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
|
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
|
||||||
index d1a82ee70f..7ea4386788 100644
|
index 53ce3fc1..3b39a994 100644
|
||||||
--- a/src/server/game/World/World.cpp
|
--- a/src/server/game/World/World.cpp
|
||||||
+++ b/src/server/game/World/World.cpp
|
+++ b/src/server/game/World/World.cpp
|
||||||
@@ -82,6 +82,10 @@
|
@@ -83,6 +83,10 @@
|
||||||
#include "LuaEngine.h"
|
#include "LuaEngine.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -111,7 +122,7 @@ index d1a82ee70f..7ea4386788 100644
|
|||||||
ACE_Atomic_Op<ACE_Thread_Mutex, bool> World::m_stopEvent = false;
|
ACE_Atomic_Op<ACE_Thread_Mutex, bool> World::m_stopEvent = false;
|
||||||
uint8 World::m_ExitCode = SHUTDOWN_EXIT_CODE;
|
uint8 World::m_ExitCode = SHUTDOWN_EXIT_CODE;
|
||||||
uint32 World::m_worldLoopCounter = 0;
|
uint32 World::m_worldLoopCounter = 0;
|
||||||
@@ -1709,6 +1713,11 @@ void World::SetInitialWorldSettings()
|
@@ -1739,6 +1743,11 @@ void World::SetInitialWorldSettings()
|
||||||
sLog->outString("Loading Completed Achievements...");
|
sLog->outString("Loading Completed Achievements...");
|
||||||
sAchievementMgr->LoadCompletedAchievements();
|
sAchievementMgr->LoadCompletedAchievements();
|
||||||
|
|
||||||
@@ -123,7 +134,7 @@ index d1a82ee70f..7ea4386788 100644
|
|||||||
///- Load dynamic data tables from the database
|
///- Load dynamic data tables from the database
|
||||||
sLog->outString("Loading Item Auctions...");
|
sLog->outString("Loading Item Auctions...");
|
||||||
sAuctionMgr->LoadAuctionItems();
|
sAuctionMgr->LoadAuctionItems();
|
||||||
@@ -2114,6 +2128,9 @@ void World::Update(uint32 diff)
|
@@ -2165,6 +2174,9 @@ void World::Update(uint32 diff)
|
||||||
// pussywizard: handle auctions when the timer has passed
|
// pussywizard: handle auctions when the timer has passed
|
||||||
if (m_timers[WUPDATE_AUCTIONS].Passed())
|
if (m_timers[WUPDATE_AUCTIONS].Passed())
|
||||||
{
|
{
|
||||||
@@ -133,3 +144,6 @@ index d1a82ee70f..7ea4386788 100644
|
|||||||
m_timers[WUPDATE_AUCTIONS].Reset();
|
m_timers[WUPDATE_AUCTIONS].Reset();
|
||||||
|
|
||||||
// pussywizard: handle expired auctions, auctions expired when realm was offline are also handled here (not during loading when many required things aren't loaded yet)
|
// pussywizard: handle expired auctions, auctions expired when realm was offline are also handled here (not during loading when many required things aren't loaded yet)
|
||||||
|
--
|
||||||
|
2.17.0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user