Core/AuctionHouse: After taking a break at the start of patch 8.3 auction house is now back in business.
Port From (https://github.com/TrinityCore/TrinityCore/commit/aced88b09bd918b0ed17b6c5e8a6048788600d9d)
This commit is contained in:
@@ -13,38 +13,86 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Framework.Constants
|
namespace Framework.Constants
|
||||||
{
|
{
|
||||||
public enum AuctionError
|
public enum AuctionResult
|
||||||
{
|
{
|
||||||
Ok = 0,
|
Ok = 0,
|
||||||
Inventory = 1,
|
Inventory = 1,
|
||||||
DatabaseError = 2,
|
DatabaseError = 2,
|
||||||
NotEnoughtMoney = 3,
|
NotEnoughMoney = 3,
|
||||||
ItemNotFound = 4,
|
ItemNotFound = 4,
|
||||||
HigherBid = 5,
|
HigherBid = 5,
|
||||||
BidIncrement = 7,
|
BidIncrement = 7,
|
||||||
BidOwn = 10,
|
BidOwn = 10,
|
||||||
RestrictedAccount = 13
|
RestrictedAccountTrial = 13,
|
||||||
|
HasRestriction = 17,
|
||||||
|
AuctionHouseBusy = 18,
|
||||||
|
AuctionHouseUnavailable = 19,
|
||||||
|
CommodityPurchaseFailed = 21,
|
||||||
|
ItemHasQuote = 23
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum AuctionAction
|
public enum AuctionCommand
|
||||||
{
|
{
|
||||||
SellItem = 0,
|
SellItem = 0,
|
||||||
Cancel = 1,
|
Cancel = 1,
|
||||||
PlaceBid = 2
|
PlaceBid = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum MailAuctionAnswers
|
public enum AuctionMailType
|
||||||
{
|
{
|
||||||
Outbidded = 0,
|
Outbid = 0,
|
||||||
Won = 1,
|
Won = 1,
|
||||||
Successful = 2,
|
Sold = 2,
|
||||||
Expired = 3,
|
Expired = 3,
|
||||||
CancelledToBidder = 4,
|
Removed = 4,
|
||||||
Canceled = 5,
|
Cancelled = 5,
|
||||||
SalePending = 6
|
Invoice = 6
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum AuctionHouseResultLimits
|
||||||
|
{
|
||||||
|
Browse = 500,
|
||||||
|
Items = 50
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum AuctionHouseFilterMask
|
||||||
|
{
|
||||||
|
None = 0x0,
|
||||||
|
UncollectedOnly = 0x1,
|
||||||
|
UsableOnly = 0x2,
|
||||||
|
UpgradesOnly = 0x4,
|
||||||
|
ExactMatch = 0x8,
|
||||||
|
PoorQuality = 0x10,
|
||||||
|
CommonQuality = 0x20,
|
||||||
|
UncommonQuality = 0x40,
|
||||||
|
RareQuality = 0x80,
|
||||||
|
EpicQuality = 0x100,
|
||||||
|
LegendaryQuality = 0x200,
|
||||||
|
ArtifactQuality = 0x400,
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum AuctionHouseSortOrder
|
||||||
|
{
|
||||||
|
Price = 0,
|
||||||
|
Name = 1,
|
||||||
|
Level = 2,
|
||||||
|
Bid = 3,
|
||||||
|
Buyout = 4
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum AuctionHouseBrowseMode
|
||||||
|
{
|
||||||
|
Search = 0,
|
||||||
|
SpecificKeys = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum AuctionHouseListType
|
||||||
|
{
|
||||||
|
Commodities = 1,
|
||||||
|
Items = 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ namespace Framework.Constants
|
|||||||
AuctionListBidderItems = 0x34d4,
|
AuctionListBidderItems = 0x34d4,
|
||||||
AuctionListItemsByBucketKey = 0x34d1,
|
AuctionListItemsByBucketKey = 0x34d1,
|
||||||
AuctionListItemsByItemId = 0x34d2,
|
AuctionListItemsByItemId = 0x34d2,
|
||||||
AuctionListItemsByItemKeys = 0x34d5,
|
AuctionListBucketsByBucketKeys = 0x34d5,
|
||||||
AuctionListOwnerItems = 0x34d3,
|
AuctionListOwnerItems = 0x34d3,
|
||||||
AuctionPlaceBid = 0x34cf,
|
AuctionPlaceBid = 0x34cf,
|
||||||
AuctionRemoveItem = 0x34cd,
|
AuctionRemoveItem = 0x34cd,
|
||||||
@@ -813,11 +813,11 @@ namespace Framework.Constants
|
|||||||
AttackSwingLandedLog = 0x273a,
|
AttackSwingLandedLog = 0x273a,
|
||||||
AuctionClosedNotification = 0x2731,
|
AuctionClosedNotification = 0x2731,
|
||||||
AuctionCommandResult = 0x272e,
|
AuctionCommandResult = 0x272e,
|
||||||
AuctionCommodityPriceUpdate = 0x28c3,
|
AuctionCommodityQuote = 0x28c3,
|
||||||
|
AuctionFavoriteItems = 0x28cc,
|
||||||
AuctionHelloResponse = 0x272c,
|
AuctionHelloResponse = 0x272c,
|
||||||
AuctionListBidderItemsResult = 0x28c2,
|
AuctionListBidderItemsResult = 0x28c2,
|
||||||
AuctionListBucketItemsResult = 0x28bf,
|
AuctionListBucketsResult = 0x28bf,
|
||||||
AuctionListFavoriteItemsResult = 0x28cc,
|
|
||||||
AuctionListItemsResult = 0x28c0,
|
AuctionListItemsResult = 0x28c0,
|
||||||
AuctionListOwnerItemsResult = 0x28c1,
|
AuctionListOwnerItemsResult = 0x28c1,
|
||||||
AuctionOutbidNotification = 0x2730,
|
AuctionOutbidNotification = 0x2730,
|
||||||
|
|||||||
@@ -138,6 +138,10 @@ namespace Framework.Database
|
|||||||
PrepareStatement(CharStatements.SEL_CHARACTER_RANDOMBG, "SELECT guid FROM character_battleground_random WHERE guid = ?");
|
PrepareStatement(CharStatements.SEL_CHARACTER_RANDOMBG, "SELECT guid FROM character_battleground_random WHERE guid = ?");
|
||||||
PrepareStatement(CharStatements.SEL_CHARACTER_BANNED, "SELECT guid FROM character_banned WHERE guid = ? AND active = 1");
|
PrepareStatement(CharStatements.SEL_CHARACTER_BANNED, "SELECT guid FROM character_banned WHERE guid = ? AND active = 1");
|
||||||
PrepareStatement(CharStatements.SEL_CHARACTER_QUESTSTATUSREW, "SELECT quest FROM character_queststatus_rewarded WHERE guid = ? AND active = 1");
|
PrepareStatement(CharStatements.SEL_CHARACTER_QUESTSTATUSREW, "SELECT quest FROM character_queststatus_rewarded WHERE guid = ? AND active = 1");
|
||||||
|
PrepareStatement(CharStatements.SEL_CHARACTER_FAVORITE_AUCTIONS, "SELECT `order`, itemId, itemLevel, battlePetSpeciesId, suffixItemNameDescriptionId FROM character_favorite_auctions WHERE guid = ? ORDER BY `order`");
|
||||||
|
PrepareStatement(CharStatements.INS_CHARACTER_FAVORITE_AUCTION, "INSERT INTO character_favorite_auctions (guid, `order`, itemId, itemLevel, battlePetSpeciesId, suffixItemNameDescriptionId) VALUE (?, ?, ?, ?, ?, ?)");
|
||||||
|
PrepareStatement(CharStatements.DEL_CHARACTER_FAVORITE_AUCTION, "DELETE FROM character_favorite_auctions WHERE guid = ? AND `order` = ?");
|
||||||
|
PrepareStatement(CharStatements.DEL_CHARACTER_FAVORITE_AUCTIONS_BY_CHAR, "DELETE FROM character_favorite_auctions WHERE guid = ?");
|
||||||
PrepareStatement(CharStatements.SEL_ACCOUNT_INSTANCELOCKTIMES, "SELECT instanceId, releaseTime FROM account_instance_times WHERE accountId = ?");
|
PrepareStatement(CharStatements.SEL_ACCOUNT_INSTANCELOCKTIMES, "SELECT instanceId, releaseTime FROM account_instance_times WHERE accountId = ?");
|
||||||
|
|
||||||
PrepareStatement(CharStatements.SEL_CHARACTER_ACTIONS_SPEC, "SELECT button, action, type FROM character_action WHERE guid = ? AND spec = ? ORDER BY button");
|
PrepareStatement(CharStatements.SEL_CHARACTER_ACTIONS_SPEC, "SELECT button, action, type FROM character_action WHERE guid = ? AND spec = ? ORDER BY button");
|
||||||
@@ -152,11 +156,17 @@ namespace Framework.Database
|
|||||||
PrepareStatement(CharStatements.SEL_MAILITEMS_AZERITE_MILESTONE_POWER, "SELECT iamp.itemGuid, iamp.azeriteItemMilestonePowerId FROM item_instance_azerite_milestone_power iamp INNER JOIN mail_items mi ON iamp.itemGuid = mi.item_guid INNER JOIN mail m ON mi.mail_id = m.id WHERE m.receiver = ?");
|
PrepareStatement(CharStatements.SEL_MAILITEMS_AZERITE_MILESTONE_POWER, "SELECT iamp.itemGuid, iamp.azeriteItemMilestonePowerId FROM item_instance_azerite_milestone_power iamp INNER JOIN mail_items mi ON iamp.itemGuid = mi.item_guid INNER JOIN mail m ON mi.mail_id = m.id WHERE m.receiver = ?");
|
||||||
PrepareStatement(CharStatements.SEL_MAILITEMS_AZERITE_UNLOCKED_ESSENCE, "SELECT iaue.itemGuid, iaue.azeriteEssenceId, iaue.`rank` FROM item_instance_azerite_unlocked_essence iaue INNER JOIN mail_items mi ON iaue.itemGuid = mi.item_guid INNER JOIN mail m ON mi.mail_id = m.id WHERE m.receiver = ?");
|
PrepareStatement(CharStatements.SEL_MAILITEMS_AZERITE_UNLOCKED_ESSENCE, "SELECT iaue.itemGuid, iaue.azeriteEssenceId, iaue.`rank` FROM item_instance_azerite_unlocked_essence iaue INNER JOIN mail_items mi ON iaue.itemGuid = mi.item_guid INNER JOIN mail m ON mi.mail_id = m.id WHERE m.receiver = ?");
|
||||||
PrepareStatement(CharStatements.SEL_MAILITEMS_AZERITE_EMPOWERED, "SELECT iae.itemGuid, iae.azeritePowerId1, iae.azeritePowerId2, iae.azeritePowerId3, iae.azeritePowerId4, iae.azeritePowerId5 FROM item_instance_azerite_empowered iae INNER JOIN mail_items mi ON iae.itemGuid = mi.item_guid INNER JOIN mail m ON mi.mail_id = m.id WHERE m.receiver = ?");
|
PrepareStatement(CharStatements.SEL_MAILITEMS_AZERITE_EMPOWERED, "SELECT iae.itemGuid, iae.azeritePowerId1, iae.azeritePowerId2, iae.azeritePowerId3, iae.azeritePowerId4, iae.azeritePowerId5 FROM item_instance_azerite_empowered iae INNER JOIN mail_items mi ON iae.itemGuid = mi.item_guid INNER JOIN mail m ON mi.mail_id = m.id WHERE m.receiver = ?");
|
||||||
PrepareStatement(CharStatements.SEL_AUCTION_ITEMS, "SELECT " + SelectItemInstanceContent + " FROM auctionhouse ah JOIN item_instance ii ON ah.itemguid = ii.guid LEFT JOIN item_instance_gems ig ON ii.guid = ig.itemGuid LEFT JOIN item_instance_transmog iit ON ii.guid = iit.itemGuid LEFT JOIN item_instance_modifiers im ON ii.guid = im.itemGuid");
|
PrepareStatement(CharStatements.SEL_AUCTION_ITEMS, "SELECT " + SelectItemInstanceContent + ", ii.owner_guid, ai.auctionId FROM auction_items ai INNER JOIN item_instance ii ON ai.itemGuid = ii.guid LEFT JOIN item_instance_gems ig ON ii.guid = ig.itemGuid LEFT JOIN item_instance_transmog iit ON ii.guid = iit.itemGuid LEFT JOIN item_instance_modifiers im ON ii.guid = im.itemGuid");
|
||||||
PrepareStatement(CharStatements.SEL_AUCTIONS, "SELECT id, auctioneerguid, itemguid, itemEntry, count, itemowner, buyoutprice, time, buyguid, lastbid, startbid, deposit FROM auctionhouse ah INNER JOIN item_instance ii ON ii.guid = ah.itemguid");
|
PrepareStatement(CharStatements.SEL_AUCTIONS, "SELECT id, auctionHouseId, owner, bidder, minBid, buyoutOrUnitPrice, deposit, bidAmount, startTime, endTime FROM auctionhouse");
|
||||||
PrepareStatement(CharStatements.INS_AUCTION, "INSERT INTO auctionhouse (id, auctioneerguid, itemguid, itemowner, buyoutprice, time, buyguid, lastbid, startbid, deposit) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
PrepareStatement(CharStatements.INS_AUCTION_ITEMS, "INSERT INTO auction_items (auctionId, itemGuid) VALUES (?, ?)");
|
||||||
PrepareStatement(CharStatements.DEL_AUCTION, "DELETE FROM auctionhouse WHERE id = ?");
|
PrepareStatement(CharStatements.DEL_AUCTION_ITEMS_BY_ITEM, "DELETE FROM auction_items WHERE itemGuid = ?");
|
||||||
PrepareStatement(CharStatements.UPD_AUCTION_BID, "UPDATE auctionhouse SET buyguid = ?, lastbid = ? WHERE id = ?");
|
PrepareStatement(CharStatements.SEL_AUCTION_BIDDERS, "SELECT auctionId, playerGuid FROM auction_bidders");
|
||||||
|
PrepareStatement(CharStatements.INS_AUCTION_BIDDER, "INSERT INTO auction_bidders (auctionId, playerGuid) VALUES (?, ?)");
|
||||||
|
PrepareStatement(CharStatements.DEL_AUCTION_BIDDER_BY_PLAYER, "DELETE FROM auction_bidders WHERE playerGuid = ?");
|
||||||
|
PrepareStatement(CharStatements.INS_AUCTION, "INSERT INTO auctionhouse (id, auctionHouseId, owner, bidder, minBid, buyoutOrUnitPrice, deposit, bidAmount, startTime, endTime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
||||||
|
PrepareStatement(CharStatements.DEL_AUCTION, "DELETE a, ab, ai FROM auctionhouse a LEFT JOIN auction_items ai ON a.id = ai.auctionId LEFT JOIN auction_bidders ab ON a.id = ab.auctionId WHERE a.id = ?");
|
||||||
|
PrepareStatement(CharStatements.UPD_AUCTION_BID, "UPDATE auctionhouse SET bidder = ?, bidAmount = ? WHERE id = ?");
|
||||||
|
PrepareStatement(CharStatements.UPD_AUCTION_EXPIRATION, "UPDATE auctionhouse SET endTime = ? WHERE id = ?");
|
||||||
PrepareStatement(CharStatements.INS_MAIL, "INSERT INTO mail(id, messageType, stationery, mailTemplateId, sender, receiver, subject, body, has_items, expire_time, deliver_time, money, cod, checked) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
PrepareStatement(CharStatements.INS_MAIL, "INSERT INTO mail(id, messageType, stationery, mailTemplateId, sender, receiver, subject, body, has_items, expire_time, deliver_time, money, cod, checked) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
||||||
PrepareStatement(CharStatements.DEL_MAIL_BY_ID, "DELETE FROM mail WHERE id = ?");
|
PrepareStatement(CharStatements.DEL_MAIL_BY_ID, "DELETE FROM mail WHERE id = ?");
|
||||||
PrepareStatement(CharStatements.INS_MAIL_ITEM, "INSERT INTO mail_items(mail_id, item_guid, receiver) VALUES (?, ?, ?)");
|
PrepareStatement(CharStatements.INS_MAIL_ITEM, "INSERT INTO mail_items(mail_id, item_guid, receiver) VALUES (?, ?, ?)");
|
||||||
@@ -535,7 +545,7 @@ namespace Framework.Database
|
|||||||
PrepareStatement(CharStatements.DEL_CHAR_AURA_FROZEN, "DELETE FROM character_aura WHERE spell = 9454 AND guid = ?");
|
PrepareStatement(CharStatements.DEL_CHAR_AURA_FROZEN, "DELETE FROM character_aura WHERE spell = 9454 AND guid = ?");
|
||||||
PrepareStatement(CharStatements.SEL_CHAR_INVENTORY_COUNT_ITEM, "SELECT COUNT(itemEntry) FROM character_inventory ci INNER JOIN item_instance ii ON ii.guid = ci.item WHERE itemEntry = ?");
|
PrepareStatement(CharStatements.SEL_CHAR_INVENTORY_COUNT_ITEM, "SELECT COUNT(itemEntry) FROM character_inventory ci INNER JOIN item_instance ii ON ii.guid = ci.item WHERE itemEntry = ?");
|
||||||
PrepareStatement(CharStatements.SEL_MAIL_COUNT_ITEM, "SELECT COUNT(itemEntry) FROM mail_items mi INNER JOIN item_instance ii ON ii.guid = mi.item_guid WHERE itemEntry = ?");
|
PrepareStatement(CharStatements.SEL_MAIL_COUNT_ITEM, "SELECT COUNT(itemEntry) FROM mail_items mi INNER JOIN item_instance ii ON ii.guid = mi.item_guid WHERE itemEntry = ?");
|
||||||
PrepareStatement(CharStatements.SEL_AUCTIONHOUSE_COUNT_ITEM, "SELECT COUNT(itemEntry) FROM auctionhouse ah INNER JOIN item_instance ii ON ii.guid = ah.itemguid WHERE itemEntry = ?");
|
PrepareStatement(CharStatements.SEL_AUCTIONHOUSE_COUNT_ITEM, "SELECT COUNT(*) FROM auction_items ai INNER JOIN item_instance ii ON ii.guid = ai.itemGuid WHERE ii.itemEntry = ?");
|
||||||
PrepareStatement(CharStatements.SEL_GUILD_BANK_COUNT_ITEM, "SELECT COUNT(itemEntry) FROM guild_bank_item gbi INNER JOIN item_instance ii ON ii.guid = gbi.item_guid WHERE itemEntry = ?");
|
PrepareStatement(CharStatements.SEL_GUILD_BANK_COUNT_ITEM, "SELECT COUNT(itemEntry) FROM guild_bank_item gbi INNER JOIN item_instance ii ON ii.guid = gbi.item_guid WHERE itemEntry = ?");
|
||||||
PrepareStatement(CharStatements.SEL_CHAR_INVENTORY_ITEM_BY_ENTRY, "SELECT ci.item, cb.slot AS bag, ci.slot, ci.guid, c.account, c.name FROM characters c " +
|
PrepareStatement(CharStatements.SEL_CHAR_INVENTORY_ITEM_BY_ENTRY, "SELECT ci.item, cb.slot AS bag, ci.slot, ci.guid, c.account, c.name FROM characters c " +
|
||||||
"INNER JOIN character_inventory ci ON ci.guid = c.guid " +
|
"INNER JOIN character_inventory ci ON ci.guid = c.guid " +
|
||||||
@@ -544,7 +554,7 @@ namespace Framework.Database
|
|||||||
PrepareStatement(CharStatements.SEL_MAIL_ITEMS_BY_ENTRY, "SELECT mi.item_guid, m.sender, m.receiver, cs.account, cs.name, cr.account, cr.name " +
|
PrepareStatement(CharStatements.SEL_MAIL_ITEMS_BY_ENTRY, "SELECT mi.item_guid, m.sender, m.receiver, cs.account, cs.name, cr.account, cr.name " +
|
||||||
"FROM mail m INNER JOIN mail_items mi ON mi.mail_id = m.id INNER JOIN item_instance ii ON ii.guid = mi.item_guid " +
|
"FROM mail m INNER JOIN mail_items mi ON mi.mail_id = m.id INNER JOIN item_instance ii ON ii.guid = mi.item_guid " +
|
||||||
"INNER JOIN characters cs ON cs.guid = m.sender INNER JOIN characters cr ON cr.guid = m.receiver WHERE ii.itemEntry = ? LIMIT ?");
|
"INNER JOIN characters cs ON cs.guid = m.sender INNER JOIN characters cr ON cr.guid = m.receiver WHERE ii.itemEntry = ? LIMIT ?");
|
||||||
PrepareStatement(CharStatements.SEL_AUCTIONHOUSE_ITEM_BY_ENTRY, "SELECT ah.itemguid, ah.itemowner, c.account, c.name FROM auctionhouse ah INNER JOIN characters c ON c.guid = ah.itemowner INNER JOIN item_instance ii ON ii.guid = ah.itemguid WHERE ii.itemEntry = ? LIMIT ?");
|
PrepareStatement(CharStatements.SEL_AUCTIONHOUSE_ITEM_BY_ENTRY, "SELECT ai.itemGuid, c.guid, c.account, c.name FROM auctionhouse ah INNER JOIN auction_items ai ON ah.id = ai.auctionId INNER JOIN characters c ON c.guid = ah.owner INNER JOIN item_instance ii ON ii.guid = ai.itemGuid WHERE ii.itemEntry = ? LIMIT ?");
|
||||||
PrepareStatement(CharStatements.SEL_GUILD_BANK_ITEM_BY_ENTRY, "SELECT gi.item_guid, gi.guildid, g.name FROM guild_bank_item gi INNER JOIN guild g ON g.guildid = gi.guildid INNER JOIN item_instance ii ON ii.guid = gi.item_guid WHERE ii.itemEntry = ? LIMIT ?");
|
PrepareStatement(CharStatements.SEL_GUILD_BANK_ITEM_BY_ENTRY, "SELECT gi.item_guid, gi.guildid, g.name FROM guild_bank_item gi INNER JOIN guild g ON g.guildid = gi.guildid INNER JOIN item_instance ii ON ii.guid = gi.item_guid WHERE ii.itemEntry = ? LIMIT ?");
|
||||||
PrepareStatement(CharStatements.DEL_CHAR_ACHIEVEMENT, "DELETE FROM character_achievement WHERE guid = ?");
|
PrepareStatement(CharStatements.DEL_CHAR_ACHIEVEMENT, "DELETE FROM character_achievement WHERE guid = ?");
|
||||||
PrepareStatement(CharStatements.DEL_CHAR_ACHIEVEMENT_PROGRESS, "DELETE FROM character_achievement_progress WHERE guid = ?");
|
PrepareStatement(CharStatements.DEL_CHAR_ACHIEVEMENT_PROGRESS, "DELETE FROM character_achievement_progress WHERE guid = ?");
|
||||||
@@ -863,6 +873,10 @@ namespace Framework.Database
|
|||||||
SEL_CHARACTER_RANDOMBG,
|
SEL_CHARACTER_RANDOMBG,
|
||||||
SEL_CHARACTER_BANNED,
|
SEL_CHARACTER_BANNED,
|
||||||
SEL_CHARACTER_QUESTSTATUSREW,
|
SEL_CHARACTER_QUESTSTATUSREW,
|
||||||
|
SEL_CHARACTER_FAVORITE_AUCTIONS,
|
||||||
|
INS_CHARACTER_FAVORITE_AUCTION,
|
||||||
|
DEL_CHARACTER_FAVORITE_AUCTION,
|
||||||
|
DEL_CHARACTER_FAVORITE_AUCTIONS_BY_CHAR,
|
||||||
SEL_ACCOUNT_INSTANCELOCKTIMES,
|
SEL_ACCOUNT_INSTANCELOCKTIMES,
|
||||||
SEL_MAILITEMS,
|
SEL_MAILITEMS,
|
||||||
SEL_MAILITEMS_ARTIFACT,
|
SEL_MAILITEMS_ARTIFACT,
|
||||||
@@ -874,7 +888,13 @@ namespace Framework.Database
|
|||||||
INS_AUCTION,
|
INS_AUCTION,
|
||||||
DEL_AUCTION,
|
DEL_AUCTION,
|
||||||
UPD_AUCTION_BID,
|
UPD_AUCTION_BID,
|
||||||
|
UPD_AUCTION_EXPIRATION,
|
||||||
SEL_AUCTIONS,
|
SEL_AUCTIONS,
|
||||||
|
INS_AUCTION_ITEMS,
|
||||||
|
DEL_AUCTION_ITEMS_BY_ITEM,
|
||||||
|
SEL_AUCTION_BIDDERS,
|
||||||
|
INS_AUCTION_BIDDER,
|
||||||
|
DEL_AUCTION_BIDDER_BY_PLAYER,
|
||||||
INS_MAIL,
|
INS_MAIL,
|
||||||
DEL_MAIL_BY_ID,
|
DEL_MAIL_BY_ID,
|
||||||
INS_MAIL_ITEM,
|
INS_MAIL_ITEM,
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace Framework.Database
|
|||||||
m_trans = trans;
|
m_trans = trans;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Execute<T>(MySqlBase<T> mySqlBase)
|
public virtual bool Execute<T>(MySqlBase<T> mySqlBase)
|
||||||
{
|
{
|
||||||
MySqlErrorCode errorCode = TryExecute(mySqlBase);
|
MySqlErrorCode errorCode = TryExecute(mySqlBase);
|
||||||
if (errorCode == MySqlErrorCode.None)
|
if (errorCode == MySqlErrorCode.None)
|
||||||
@@ -87,7 +87,7 @@ namespace Framework.Database
|
|||||||
{
|
{
|
||||||
public TransactionWithResultTask(SQLTransaction trans) : base(trans) { }
|
public TransactionWithResultTask(SQLTransaction trans) : base(trans) { }
|
||||||
|
|
||||||
public new bool Execute<T>(MySqlBase<T> mySqlBase)
|
public override bool Execute<T>(MySqlBase<T> mySqlBase)
|
||||||
{
|
{
|
||||||
MySqlErrorCode errorCode = TryExecute(mySqlBase);
|
MySqlErrorCode errorCode = TryExecute(mySqlBase);
|
||||||
if (errorCode == MySqlErrorCode.None)
|
if (errorCode == MySqlErrorCode.None)
|
||||||
|
|||||||
@@ -44,11 +44,6 @@ namespace Framework.Dynamic
|
|||||||
Value = default(T);
|
Value = default(T);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static implicit operator Optional<T> (T value)
|
|
||||||
{
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static explicit operator T(Optional<T> value)
|
public static explicit operator T(Optional<T> value)
|
||||||
{
|
{
|
||||||
return (T)value;
|
return (T)value;
|
||||||
|
|||||||
@@ -2210,8 +2210,8 @@ namespace Game.Achievements
|
|||||||
return false;
|
return false;
|
||||||
case CriteriaAdditionalCondition.ItemModifiedAppearance: // 200
|
case CriteriaAdditionalCondition.ItemModifiedAppearance: // 200
|
||||||
{
|
{
|
||||||
Tuple<bool, bool> hasAppearance = referencePlayer.GetSession().GetCollectionMgr().HasItemAppearance(reqValue);
|
var hasAppearance = referencePlayer.GetSession().GetCollectionMgr().HasItemAppearance(reqValue);
|
||||||
if (!hasAppearance.Item1 || hasAppearance.Item2)
|
if (!hasAppearance.PermAppearance || hasAppearance.TempAppearance)
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -86,8 +86,7 @@ namespace Game.Chat
|
|||||||
{
|
{
|
||||||
// Reload dynamic data tables from the database
|
// Reload dynamic data tables from the database
|
||||||
Log.outInfo(LogFilter.Server, "Re-Loading Auctions...");
|
Log.outInfo(LogFilter.Server, "Re-Loading Auctions...");
|
||||||
Global.AuctionMgr.LoadAuctionItems();
|
Global.AuctionHouseMgr.LoadAuctions();
|
||||||
Global.AuctionMgr.LoadAuctions();
|
|
||||||
handler.SendGlobalGMSysMessage("Auctions reloaded.");
|
handler.SendGlobalGMSysMessage("Auctions reloaded.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -760,15 +760,15 @@ namespace Game.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Tuple<bool, bool> HasItemAppearance(uint itemModifiedAppearanceId)
|
public (bool PermAppearance, bool TempAppearance) HasItemAppearance(uint itemModifiedAppearanceId)
|
||||||
{
|
{
|
||||||
if (itemModifiedAppearanceId < _appearances.Count && _appearances.Get((int)itemModifiedAppearanceId))
|
if (itemModifiedAppearanceId < _appearances.Count && _appearances.Get((int)itemModifiedAppearanceId))
|
||||||
return Tuple.Create(true, false);
|
return (true, false);
|
||||||
|
|
||||||
if (_temporaryAppearances.ContainsKey(itemModifiedAppearanceId))
|
if (_temporaryAppearances.ContainsKey(itemModifiedAppearanceId))
|
||||||
return Tuple.Create(true, true);
|
return (true, true);
|
||||||
|
|
||||||
return Tuple.Create(false, false);
|
return (false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ObjectGuid> GetItemsProvidingTemporaryAppearance(uint itemModifiedAppearanceId)
|
public List<ObjectGuid> GetItemsProvidingTemporaryAppearance(uint itemModifiedAppearanceId)
|
||||||
@@ -776,6 +776,15 @@ namespace Game.Entities
|
|||||||
return _temporaryAppearances.LookupByKey(itemModifiedAppearanceId);
|
return _temporaryAppearances.LookupByKey(itemModifiedAppearanceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<uint> GetAppearanceIds()
|
||||||
|
{
|
||||||
|
List<uint> appearances = new List<uint>();
|
||||||
|
foreach (int id in _appearances)
|
||||||
|
appearances.Add(CliDB.ItemModifiedAppearanceStorage.LookupByKey(id).ItemAppearanceID);
|
||||||
|
|
||||||
|
return appearances;
|
||||||
|
}
|
||||||
|
|
||||||
public void SetAppearanceIsFavorite(uint itemModifiedAppearanceId, bool apply)
|
public void SetAppearanceIsFavorite(uint itemModifiedAppearanceId, bool apply)
|
||||||
{
|
{
|
||||||
var apperanceState = _favoriteAppearances.LookupByKey(itemModifiedAppearanceId);
|
var apperanceState = _favoriteAppearances.LookupByKey(itemModifiedAppearanceId);
|
||||||
|
|||||||
@@ -4013,6 +4013,10 @@ namespace Game.Entities
|
|||||||
stmt.AddValue(0, guid);
|
stmt.AddValue(0, guid);
|
||||||
trans.Append(stmt);
|
trans.Append(stmt);
|
||||||
|
|
||||||
|
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_CHARACTER_FAVORITE_AUCTIONS_BY_CHAR);
|
||||||
|
stmt.AddValue(0, guid);
|
||||||
|
trans.Append(stmt);
|
||||||
|
|
||||||
Corpse.DeleteFromDB(playerGuid, trans);
|
Corpse.DeleteFromDB(playerGuid, trans);
|
||||||
|
|
||||||
Garrison.DeleteFromDB(guid, trans);
|
Garrison.DeleteFromDB(guid, trans);
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public static class Global
|
|||||||
|
|
||||||
public static GameEventManager GameEventMgr { get { return GameEventManager.Instance; } }
|
public static GameEventManager GameEventMgr { get { return GameEventManager.Instance; } }
|
||||||
public static CreatureTextManager CreatureTextMgr { get { return CreatureTextManager.Instance; } }
|
public static CreatureTextManager CreatureTextMgr { get { return CreatureTextManager.Instance; } }
|
||||||
public static AuctionManager AuctionMgr { get { return AuctionManager.Instance; } }
|
public static AuctionManager AuctionHouseMgr { get { return AuctionManager.Instance; } }
|
||||||
|
|
||||||
public static SpellManager SpellMgr { get { return SpellManager.Instance; } }
|
public static SpellManager SpellMgr { get { return SpellManager.Instance; } }
|
||||||
public static SupportManager SupportMgr { get { return SupportManager.Instance; } }
|
public static SupportManager SupportMgr { get { return SupportManager.Instance; } }
|
||||||
|
|||||||
@@ -9275,7 +9275,8 @@ namespace Game
|
|||||||
// Cleanup other tables from not existed guids ( >= hiItemGuid)
|
// Cleanup other tables from not existed guids ( >= hiItemGuid)
|
||||||
DB.Characters.Execute("DELETE FROM character_inventory WHERE item >= {0}", GetGuidSequenceGenerator(HighGuid.Item).GetNextAfterMaxUsed()); // One-time query
|
DB.Characters.Execute("DELETE FROM character_inventory WHERE item >= {0}", GetGuidSequenceGenerator(HighGuid.Item).GetNextAfterMaxUsed()); // One-time query
|
||||||
DB.Characters.Execute("DELETE FROM mail_items WHERE item_guid >= {0}", GetGuidSequenceGenerator(HighGuid.Item).GetNextAfterMaxUsed()); // One-time query
|
DB.Characters.Execute("DELETE FROM mail_items WHERE item_guid >= {0}", GetGuidSequenceGenerator(HighGuid.Item).GetNextAfterMaxUsed()); // One-time query
|
||||||
DB.Characters.Execute("DELETE FROM auctionhouse WHERE itemguid >= {0}", GetGuidSequenceGenerator(HighGuid.Item).GetNextAfterMaxUsed()); // One-time query
|
DB.Characters.Execute("DELETE a, ab, ai FROM auctionhouse a LEFT JOIN auction_bidders ab ON ab.auctionId = a.id LEFT JOIN auction_items ai ON ai.auctionId = a.id WHERE ai.itemGuid >= '{0}'",
|
||||||
|
GetGuidSequenceGenerator(HighGuid.Item).GetNextAfterMaxUsed()); // One-time query
|
||||||
DB.Characters.Execute("DELETE FROM guild_bank_item WHERE item_guid >= {0}", GetGuidSequenceGenerator(HighGuid.Item).GetNextAfterMaxUsed()); // One-time query
|
DB.Characters.Execute("DELETE FROM guild_bank_item WHERE item_guid >= {0}", GetGuidSequenceGenerator(HighGuid.Item).GetNextAfterMaxUsed()); // One-time query
|
||||||
|
|
||||||
result = DB.World.Query("SELECT MAX(guid) FROM transports");
|
result = DB.World.Query("SELECT MAX(guid) FROM transports");
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -788,6 +788,29 @@ namespace Game
|
|||||||
// Place character in world (and load zone) before some object loading
|
// Place character in world (and load zone) before some object loading
|
||||||
pCurrChar.LoadCorpse(holder.GetResult(PlayerLoginQueryLoad.CorpseLocation));
|
pCurrChar.LoadCorpse(holder.GetResult(PlayerLoginQueryLoad.CorpseLocation));
|
||||||
|
|
||||||
|
stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_CHARACTER_FAVORITE_AUCTIONS);
|
||||||
|
stmt.AddValue(0, pCurrChar.GetGUID().GetCounter());
|
||||||
|
GetQueryProcessor().AddCallback(DB.Characters.AsyncQuery(stmt)).WithCallback(favoriteAuctionResult =>
|
||||||
|
{
|
||||||
|
AuctionFavoriteItems favoriteItems = new AuctionFavoriteItems();
|
||||||
|
if (!favoriteAuctionResult.IsEmpty())
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
AuctionFavoriteInfo item = new AuctionFavoriteInfo();
|
||||||
|
item.Order = favoriteAuctionResult.Read<uint>(0);
|
||||||
|
item.ItemID = favoriteAuctionResult.Read<uint>(1);
|
||||||
|
item.ItemLevel = favoriteAuctionResult.Read<uint>(2);
|
||||||
|
item.BattlePetSpeciesID = favoriteAuctionResult.Read<uint>(3);
|
||||||
|
item.SuffixItemNameDescriptionID = favoriteAuctionResult.Read<uint>(4);
|
||||||
|
favoriteItems.Items.Add(item);
|
||||||
|
|
||||||
|
} while (favoriteAuctionResult.NextRow());
|
||||||
|
|
||||||
|
}
|
||||||
|
SendPacket(favoriteItems);
|
||||||
|
});
|
||||||
|
|
||||||
// setting Ghost+speed if dead
|
// setting Ghost+speed if dead
|
||||||
if (pCurrChar.GetDeathState() != DeathState.Alive)
|
if (pCurrChar.GetDeathState() != DeathState.Alive)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -90,7 +90,15 @@ namespace Game.Mails
|
|||||||
m_receiver = receiver;
|
m_receiver = receiver;
|
||||||
m_receiver_lowguid = receiver_lowguid;
|
m_receiver_lowguid = receiver_lowguid;
|
||||||
|
|
||||||
// ASSERT(!receiver || receiver.GetGUID().GetCounter() == receiver_lowguid);
|
Cypher.Assert(!receiver || receiver.GetGUID().GetCounter() == receiver_lowguid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MailReceiver(Player receiver, ObjectGuid receiverGuid)
|
||||||
|
{
|
||||||
|
m_receiver = receiver;
|
||||||
|
m_receiver_lowguid = receiverGuid.GetCounter();
|
||||||
|
|
||||||
|
Cypher.Assert(!receiver || receiver.GetGUID() == receiverGuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Player GetPlayer() { return m_receiver; }
|
public Player GetPlayer() { return m_receiver; }
|
||||||
@@ -140,10 +148,11 @@ namespace Game.Mails
|
|||||||
m_senderId = (uint)sender.EventId;
|
m_senderId = (uint)sender.EventId;
|
||||||
m_stationery = MailStationery.Default;
|
m_stationery = MailStationery.Default;
|
||||||
}
|
}
|
||||||
public MailSender(AuctionEntry sender)
|
|
||||||
|
public MailSender(AuctionHouseObject sender)
|
||||||
{
|
{
|
||||||
m_messageType = MailMessageType.Auction;
|
m_messageType = MailMessageType.Auction;
|
||||||
m_senderId = sender.GetHouseId();
|
m_senderId = sender.GetAuctionHouseId();
|
||||||
m_stationery = MailStationery.Auction;
|
m_stationery = MailStationery.Auction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ namespace Game.Mails
|
|||||||
public void SendMailTo(SQLTransaction trans, MailReceiver receiver, MailSender sender, MailCheckMask checkMask = MailCheckMask.None, uint deliver_delay = 0)
|
public void SendMailTo(SQLTransaction trans, MailReceiver receiver, MailSender sender, MailCheckMask checkMask = MailCheckMask.None, uint deliver_delay = 0)
|
||||||
{
|
{
|
||||||
Player pReceiver = receiver.GetPlayer(); // can be NULL
|
Player pReceiver = receiver.GetPlayer(); // can be NULL
|
||||||
Player pSender = Global.ObjAccessor.FindPlayer(ObjectGuid.Create(HighGuid.Player, sender.GetSenderId()));
|
Player pSender = sender.GetMailMessageType() == MailMessageType.Normal ? Global.ObjAccessor.FindPlayer(ObjectGuid.Create(HighGuid.Player, sender.GetSenderId())) : null;
|
||||||
|
|
||||||
if (pReceiver != null)
|
if (pReceiver != null)
|
||||||
PrepareItems(pReceiver, trans); // generate mail template items
|
PrepareItems(pReceiver, trans); // generate mail template items
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ namespace Game.Network.Packets
|
|||||||
public override void Read()
|
public override void Read()
|
||||||
{
|
{
|
||||||
Auctioneer = _worldPacket.ReadPackedGuid();
|
Auctioneer = _worldPacket.ReadPackedGuid();
|
||||||
Offset = _worldPacket.ReadUInt8();
|
Offset = _worldPacket.ReadUInt32();
|
||||||
MinLevel = _worldPacket.ReadUInt8();
|
MinLevel = _worldPacket.ReadUInt8();
|
||||||
MaxLevel = _worldPacket.ReadUInt8();
|
MaxLevel = _worldPacket.ReadUInt8();
|
||||||
Filters = (AuctionHouseFilterMask)_worldPacket.ReadUInt32();
|
Filters = (AuctionHouseFilterMask)_worldPacket.ReadUInt32();
|
||||||
@@ -88,10 +88,10 @@ namespace Game.Network.Packets
|
|||||||
|
|
||||||
class AuctionConfirmCommoditiesPurchase : ClientPacket
|
class AuctionConfirmCommoditiesPurchase : ClientPacket
|
||||||
{
|
{
|
||||||
ObjectGuid Auctioneer;
|
public ObjectGuid Auctioneer;
|
||||||
int ItemID;
|
public int ItemID;
|
||||||
uint Quantity;
|
public uint Quantity;
|
||||||
Optional<AddOnInfo> TaintedBy;
|
public Optional<AddOnInfo> TaintedBy;
|
||||||
|
|
||||||
public AuctionConfirmCommoditiesPurchase(WorldPacket packet) : base(packet) { }
|
public AuctionConfirmCommoditiesPurchase(WorldPacket packet) : base(packet) { }
|
||||||
|
|
||||||
@@ -149,6 +149,34 @@ namespace Game.Network.Packets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class AuctionListBucketsByBucketKeys : ClientPacket
|
||||||
|
{
|
||||||
|
public ObjectGuid Auctioneer;
|
||||||
|
public Optional<AddOnInfo> TaintedBy;
|
||||||
|
public Array<AuctionBucketKey> BucketKeys = new Array<AuctionBucketKey>(100);
|
||||||
|
public Array<AuctionSortDef> Sorts = new Array<AuctionSortDef>(2);
|
||||||
|
|
||||||
|
public AuctionListBucketsByBucketKeys(WorldPacket packet) : base(packet) { }
|
||||||
|
|
||||||
|
public override void Read()
|
||||||
|
{
|
||||||
|
Auctioneer = _worldPacket.ReadPackedGuid();
|
||||||
|
TaintedBy.HasValue = _worldPacket.HasBit();
|
||||||
|
|
||||||
|
uint bucketKeysCount = _worldPacket.ReadBits<uint>(7);
|
||||||
|
uint sortCount = _worldPacket.ReadBits<uint>(2);
|
||||||
|
|
||||||
|
for (var i = 0; i < sortCount; ++i)
|
||||||
|
Sorts[i] = new AuctionSortDef(_worldPacket);
|
||||||
|
|
||||||
|
if (TaintedBy.HasValue)
|
||||||
|
TaintedBy.Value.Read(_worldPacket);
|
||||||
|
|
||||||
|
for (var i = 0; i < bucketKeysCount; ++i)
|
||||||
|
BucketKeys[i] = new AuctionBucketKey(_worldPacket);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class AuctionListItemsByBucketKey : ClientPacket
|
class AuctionListItemsByBucketKey : ClientPacket
|
||||||
{
|
{
|
||||||
public ObjectGuid Auctioneer;
|
public ObjectGuid Auctioneer;
|
||||||
@@ -168,12 +196,10 @@ namespace Game.Network.Packets
|
|||||||
TaintedBy.HasValue = _worldPacket.HasBit();
|
TaintedBy.HasValue = _worldPacket.HasBit();
|
||||||
|
|
||||||
uint sortCount = _worldPacket.ReadBits<uint>(2);
|
uint sortCount = _worldPacket.ReadBits<uint>(2);
|
||||||
|
|
||||||
for (var i = 0; i < sortCount; ++i)
|
for (var i = 0; i < sortCount; ++i)
|
||||||
Sorts[i] = new AuctionSortDef(_worldPacket);
|
Sorts[i] = new AuctionSortDef(_worldPacket);
|
||||||
|
|
||||||
BucketKey = new AuctionBucketKey();
|
BucketKey = new AuctionBucketKey(_worldPacket);
|
||||||
BucketKey.Read(_worldPacket);
|
|
||||||
|
|
||||||
if (TaintedBy.HasValue)
|
if (TaintedBy.HasValue)
|
||||||
TaintedBy.Value.Read(_worldPacket);
|
TaintedBy.Value.Read(_worldPacket);
|
||||||
@@ -183,7 +209,7 @@ namespace Game.Network.Packets
|
|||||||
class AuctionListItemsByItemID : ClientPacket
|
class AuctionListItemsByItemID : ClientPacket
|
||||||
{
|
{
|
||||||
public ObjectGuid Auctioneer;
|
public ObjectGuid Auctioneer;
|
||||||
public int ItemID;
|
public uint ItemID;
|
||||||
public int SuffixItemNameDescriptionID;
|
public int SuffixItemNameDescriptionID;
|
||||||
public uint Offset;
|
public uint Offset;
|
||||||
public Optional<AddOnInfo> TaintedBy;
|
public Optional<AddOnInfo> TaintedBy;
|
||||||
@@ -194,37 +220,13 @@ namespace Game.Network.Packets
|
|||||||
public override void Read()
|
public override void Read()
|
||||||
{
|
{
|
||||||
Auctioneer = _worldPacket.ReadPackedGuid();
|
Auctioneer = _worldPacket.ReadPackedGuid();
|
||||||
ItemID = _worldPacket.ReadInt32();
|
ItemID = _worldPacket.ReadUInt32();
|
||||||
SuffixItemNameDescriptionID = _worldPacket.ReadInt32();
|
SuffixItemNameDescriptionID = _worldPacket.ReadInt32();
|
||||||
Offset = _worldPacket.ReadUInt32();
|
Offset = _worldPacket.ReadUInt32();
|
||||||
TaintedBy.HasValue = _worldPacket.HasBit();
|
|
||||||
|
|
||||||
uint sortCount = _worldPacket.ReadBits<uint>(2);
|
|
||||||
for (var i = 0; i < sortCount; ++i)
|
|
||||||
Sorts[i] = new AuctionSortDef(_worldPacket);
|
|
||||||
|
|
||||||
if (TaintedBy.HasValue)
|
|
||||||
TaintedBy.Value.Read(_worldPacket);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class AuctionListItemsByItemKeys : ClientPacket
|
|
||||||
{
|
|
||||||
public ObjectGuid Auctioneer;
|
|
||||||
public Optional<AddOnInfo> TaintedBy;
|
|
||||||
public Array<AuctionBucketKey> BucketKeys = new Array<AuctionBucketKey>(100);
|
|
||||||
public Array<AuctionSortDef> Sorts = new Array<AuctionSortDef>(2);
|
|
||||||
|
|
||||||
public AuctionListItemsByItemKeys(WorldPacket packet) : base(packet) { }
|
|
||||||
|
|
||||||
public override void Read()
|
|
||||||
{
|
|
||||||
Auctioneer = _worldPacket.ReadPackedGuid();
|
|
||||||
|
|
||||||
if (_worldPacket.HasBit())
|
if (_worldPacket.HasBit())
|
||||||
TaintedBy.HasValue = true;
|
TaintedBy.HasValue = true;
|
||||||
|
|
||||||
uint bucketKeyCount = _worldPacket.ReadBits<uint>(7);
|
|
||||||
uint sortCount = _worldPacket.ReadBits<uint>(2);
|
uint sortCount = _worldPacket.ReadBits<uint>(2);
|
||||||
|
|
||||||
for (var i = 0; i < sortCount; ++i)
|
for (var i = 0; i < sortCount; ++i)
|
||||||
@@ -232,12 +234,6 @@ namespace Game.Network.Packets
|
|||||||
|
|
||||||
if (TaintedBy.HasValue)
|
if (TaintedBy.HasValue)
|
||||||
TaintedBy.Value.Read(_worldPacket);
|
TaintedBy.Value.Read(_worldPacket);
|
||||||
|
|
||||||
for (var i = 0; i < bucketKeyCount; ++i)
|
|
||||||
{
|
|
||||||
BucketKeys[i] = new AuctionBucketKey();
|
|
||||||
BucketKeys[i].Read(_worldPacket);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,7 +286,7 @@ namespace Game.Network.Packets
|
|||||||
class AuctionRemoveItem : ClientPacket
|
class AuctionRemoveItem : ClientPacket
|
||||||
{
|
{
|
||||||
public ObjectGuid Auctioneer;
|
public ObjectGuid Auctioneer;
|
||||||
public int AuctionID = 0;
|
public uint AuctionID;
|
||||||
public Optional<AddOnInfo> TaintedBy;
|
public Optional<AddOnInfo> TaintedBy;
|
||||||
|
|
||||||
public AuctionRemoveItem(WorldPacket packet) : base(packet) { }
|
public AuctionRemoveItem(WorldPacket packet) : base(packet) { }
|
||||||
@@ -298,7 +294,7 @@ namespace Game.Network.Packets
|
|||||||
public override void Read()
|
public override void Read()
|
||||||
{
|
{
|
||||||
Auctioneer = _worldPacket.ReadPackedGuid();
|
Auctioneer = _worldPacket.ReadPackedGuid();
|
||||||
AuctionID = _worldPacket.ReadInt32();
|
AuctionID = _worldPacket.ReadUInt32();
|
||||||
TaintedBy.HasValue = _worldPacket.HasBit();
|
TaintedBy.HasValue = _worldPacket.HasBit();
|
||||||
|
|
||||||
if (TaintedBy.HasValue)
|
if (TaintedBy.HasValue)
|
||||||
@@ -364,7 +360,7 @@ namespace Game.Network.Packets
|
|||||||
public ulong MinBid;
|
public ulong MinBid;
|
||||||
public uint RunTime;
|
public uint RunTime;
|
||||||
public Optional<AddOnInfo> TaintedBy;
|
public Optional<AddOnInfo> TaintedBy;
|
||||||
public Array<AuctionItemForSale> Items = new Array<AuctionItemForSale>(64);
|
public Array<AuctionItemForSale> Items = new Array<AuctionItemForSale>(1);
|
||||||
|
|
||||||
public AuctionSellItem(WorldPacket packet) : base(packet) { }
|
public AuctionSellItem(WorldPacket packet) : base(packet) { }
|
||||||
|
|
||||||
@@ -451,24 +447,6 @@ namespace Game.Network.Packets
|
|||||||
|
|
||||||
public AuctionCommandResult() : base(ServerOpcodes.AuctionCommandResult) { }
|
public AuctionCommandResult() : base(ServerOpcodes.AuctionCommandResult) { }
|
||||||
|
|
||||||
/**
|
|
||||||
* @fn void WorldPackets::AuctionHousePackets::AuctionCommandResult::InitializeAuction(AuctionEntry* auction);
|
|
||||||
*
|
|
||||||
* @brief Initialize the following fields: AuctionId, Bid, AuctionOutBid, Bidder
|
|
||||||
*
|
|
||||||
* @param auction The relevant auction object
|
|
||||||
*/
|
|
||||||
public void InitializeAuction(AuctionEntry auction)
|
|
||||||
{
|
|
||||||
if (auction != null)
|
|
||||||
{
|
|
||||||
AuctionID = auction.Id;
|
|
||||||
Money = auction.bid == auction.buyout ? 0 : auction.bid;
|
|
||||||
MinIncrement = auction.bid == auction.buyout ? 0 : auction.GetAuctionOutBid();
|
|
||||||
Guid = ObjectGuid.Create(HighGuid.Player, auction.bidder);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Write()
|
public override void Write()
|
||||||
{
|
{
|
||||||
_worldPacket.WriteUInt32(AuctionID);
|
_worldPacket.WriteUInt32(AuctionID);
|
||||||
@@ -482,7 +460,7 @@ namespace Game.Network.Packets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AuctionCommodityPriceUpdate : ServerPacket
|
class AuctionCommodityQuote : ServerPacket
|
||||||
{
|
{
|
||||||
public Optional<ulong> TotalPrice;
|
public Optional<ulong> TotalPrice;
|
||||||
public Optional<uint> Quantity;
|
public Optional<uint> Quantity;
|
||||||
@@ -490,7 +468,7 @@ namespace Game.Network.Packets
|
|||||||
public int Unknown830;
|
public int Unknown830;
|
||||||
public uint DesiredDelay;
|
public uint DesiredDelay;
|
||||||
|
|
||||||
public AuctionCommodityPriceUpdate() : base(ServerOpcodes.AuctionCommodityPriceUpdate) { }
|
public AuctionCommodityQuote() : base(ServerOpcodes.AuctionCommodityQuote) { }
|
||||||
|
|
||||||
public override void Write()
|
public override void Write()
|
||||||
{
|
{
|
||||||
@@ -546,16 +524,16 @@ namespace Game.Network.Packets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AuctionListBucketItemsResult : ServerPacket
|
public class AuctionListBucketsResult : ServerPacket
|
||||||
{
|
{
|
||||||
public List<BucketInfo> Buckets = new List<BucketInfo>();
|
public List<BucketInfo> Buckets = new List<BucketInfo>();
|
||||||
public uint DesiredDelay;
|
public uint DesiredDelay;
|
||||||
public int Unknown830_0;
|
public int Unknown830_0;
|
||||||
public int Unknown830_1;
|
public int Unknown830_1;
|
||||||
public int BrowseMode;
|
public AuctionHouseBrowseMode BrowseMode;
|
||||||
public bool HasMoreResults;
|
public bool HasMoreResults;
|
||||||
|
|
||||||
public AuctionListBucketItemsResult() : base(ServerOpcodes.AuctionListBucketItemsResult) { }
|
public AuctionListBucketsResult() : base(ServerOpcodes.AuctionListBucketsResult) { }
|
||||||
|
|
||||||
public override void Write()
|
public override void Write()
|
||||||
{
|
{
|
||||||
@@ -563,7 +541,7 @@ namespace Game.Network.Packets
|
|||||||
_worldPacket.WriteUInt32(DesiredDelay);
|
_worldPacket.WriteUInt32(DesiredDelay);
|
||||||
_worldPacket.WriteInt32(Unknown830_0);
|
_worldPacket.WriteInt32(Unknown830_0);
|
||||||
_worldPacket.WriteInt32(Unknown830_1);
|
_worldPacket.WriteInt32(Unknown830_1);
|
||||||
_worldPacket.WriteBits(BrowseMode, 1);
|
_worldPacket.WriteBits((int)BrowseMode, 1);
|
||||||
_worldPacket.WriteBit(HasMoreResults);
|
_worldPacket.WriteBit(HasMoreResults);
|
||||||
_worldPacket.FlushBits();
|
_worldPacket.FlushBits();
|
||||||
|
|
||||||
@@ -572,12 +550,12 @@ namespace Game.Network.Packets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AuctionListFavoriteItemsResult : ServerPacket
|
class AuctionFavoriteItems : ServerPacket
|
||||||
{
|
{
|
||||||
public uint DesiredDelay;
|
public uint DesiredDelay;
|
||||||
public List<AuctionFavoriteInfo> Items = new List<AuctionFavoriteInfo>();
|
public List<AuctionFavoriteInfo> Items = new List<AuctionFavoriteInfo>();
|
||||||
|
|
||||||
public AuctionListFavoriteItemsResult() : base(ServerOpcodes.AuctionListFavoriteItemsResult) { }
|
public AuctionFavoriteItems() : base(ServerOpcodes.AuctionFavoriteItems) { }
|
||||||
|
|
||||||
public override void Write()
|
public override void Write()
|
||||||
{
|
{
|
||||||
@@ -596,9 +574,9 @@ namespace Game.Network.Packets
|
|||||||
public uint Unknown830;
|
public uint Unknown830;
|
||||||
public uint TotalCount;
|
public uint TotalCount;
|
||||||
public uint DesiredDelay;
|
public uint DesiredDelay;
|
||||||
public uint ListType;
|
public AuctionHouseListType ListType;
|
||||||
public bool HasMoreResults;
|
public bool HasMoreResults;
|
||||||
public AuctionBucketKey BucketKey;
|
public AuctionBucketKey BucketKey = new AuctionBucketKey();
|
||||||
|
|
||||||
public AuctionListItemsResult() : base(ServerOpcodes.AuctionListItemsResult) { }
|
public AuctionListItemsResult() : base(ServerOpcodes.AuctionListItemsResult) { }
|
||||||
|
|
||||||
@@ -608,7 +586,7 @@ namespace Game.Network.Packets
|
|||||||
_worldPacket.WriteUInt32(Unknown830);
|
_worldPacket.WriteUInt32(Unknown830);
|
||||||
_worldPacket.WriteUInt32(TotalCount);
|
_worldPacket.WriteUInt32(TotalCount);
|
||||||
_worldPacket.WriteUInt32(DesiredDelay);
|
_worldPacket.WriteUInt32(DesiredDelay);
|
||||||
_worldPacket.WriteBits(ListType, 2);
|
_worldPacket.WriteBits((int)ListType, 2);
|
||||||
_worldPacket.WriteBit(HasMoreResults);
|
_worldPacket.WriteBit(HasMoreResults);
|
||||||
_worldPacket.FlushBits();
|
_worldPacket.FlushBits();
|
||||||
|
|
||||||
@@ -673,7 +651,7 @@ namespace Game.Network.Packets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AuctionReplicateResponse : ServerPacket
|
public class AuctionReplicateResponse : ServerPacket
|
||||||
{
|
{
|
||||||
public uint ChangeNumberCursor;
|
public uint ChangeNumberCursor;
|
||||||
public uint ChangeNumberGlobal;
|
public uint ChangeNumberGlobal;
|
||||||
@@ -718,7 +696,21 @@ namespace Game.Network.Packets
|
|||||||
public Optional<ushort> BattlePetSpeciesID = new Optional<ushort>();
|
public Optional<ushort> BattlePetSpeciesID = new Optional<ushort>();
|
||||||
public Optional<ushort> SuffixItemNameDescriptionID = new Optional<ushort>();
|
public Optional<ushort> SuffixItemNameDescriptionID = new Optional<ushort>();
|
||||||
|
|
||||||
public void Read(WorldPacket data)
|
public AuctionBucketKey() { }
|
||||||
|
|
||||||
|
public AuctionBucketKey(AuctionsBucketKey key)
|
||||||
|
{
|
||||||
|
ItemID = key.ItemId;
|
||||||
|
ItemLevel = key.ItemLevel;
|
||||||
|
|
||||||
|
if (key.BattlePetSpeciesId != 0)
|
||||||
|
BattlePetSpeciesID.Set(key.BattlePetSpeciesId);
|
||||||
|
|
||||||
|
if (key.SuffixItemNameDescriptionId != 0)
|
||||||
|
SuffixItemNameDescriptionID.Set(key.SuffixItemNameDescriptionId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AuctionBucketKey(WorldPacket data)
|
||||||
{
|
{
|
||||||
data.ResetBitPos();
|
data.ResetBitPos();
|
||||||
ItemID = data.ReadBits<uint>(20);
|
ItemID = data.ReadBits<uint>(20);
|
||||||
@@ -735,7 +727,7 @@ namespace Game.Network.Packets
|
|||||||
BattlePetSpeciesID.Set(data.ReadUInt16());
|
BattlePetSpeciesID.Set(data.ReadUInt16());
|
||||||
|
|
||||||
if (SuffixItemNameDescriptionID.HasValue)
|
if (SuffixItemNameDescriptionID.HasValue)
|
||||||
SuffixItemNameDescriptionID = data.ReadUInt16();
|
SuffixItemNameDescriptionID.Set(data.ReadUInt16());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Write(WorldPacket data)
|
public void Write(WorldPacket data)
|
||||||
@@ -786,6 +778,12 @@ namespace Game.Network.Packets
|
|||||||
public AuctionHouseSortOrder SortOrder;
|
public AuctionHouseSortOrder SortOrder;
|
||||||
public bool ReverseSort;
|
public bool ReverseSort;
|
||||||
|
|
||||||
|
public AuctionSortDef(AuctionHouseSortOrder sortOrder, bool reverseSort)
|
||||||
|
{
|
||||||
|
SortOrder = sortOrder;
|
||||||
|
ReverseSort = reverseSort;
|
||||||
|
}
|
||||||
|
|
||||||
public AuctionSortDef(WorldPacket data)
|
public AuctionSortDef(WorldPacket data)
|
||||||
{
|
{
|
||||||
data.ResetBitPos();
|
data.ResetBitPos();
|
||||||
@@ -812,7 +810,7 @@ namespace Game.Network.Packets
|
|||||||
public uint ItemID;
|
public uint ItemID;
|
||||||
public uint ItemLevel;
|
public uint ItemLevel;
|
||||||
public uint BattlePetSpeciesID;
|
public uint BattlePetSpeciesID;
|
||||||
public uint ItemSuffix;
|
public uint SuffixItemNameDescriptionID;
|
||||||
|
|
||||||
public AuctionFavoriteInfo(WorldPacket data)
|
public AuctionFavoriteInfo(WorldPacket data)
|
||||||
{
|
{
|
||||||
@@ -820,7 +818,7 @@ namespace Game.Network.Packets
|
|||||||
ItemID = data.ReadUInt32();
|
ItemID = data.ReadUInt32();
|
||||||
ItemLevel = data.ReadUInt32();
|
ItemLevel = data.ReadUInt32();
|
||||||
BattlePetSpeciesID = data.ReadUInt32();
|
BattlePetSpeciesID = data.ReadUInt32();
|
||||||
ItemSuffix = data.ReadUInt32();
|
SuffixItemNameDescriptionID = data.ReadUInt32();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Write(WorldPacket data)
|
public void Write(WorldPacket data)
|
||||||
@@ -829,7 +827,7 @@ namespace Game.Network.Packets
|
|||||||
data.WriteUInt32(ItemID);
|
data.WriteUInt32(ItemID);
|
||||||
data.WriteUInt32(ItemLevel);
|
data.WriteUInt32(ItemLevel);
|
||||||
data.WriteUInt32(BattlePetSpeciesID);
|
data.WriteUInt32(BattlePetSpeciesID);
|
||||||
data.WriteUInt32(ItemSuffix);
|
data.WriteUInt32(SuffixItemNameDescriptionID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -839,11 +837,11 @@ namespace Game.Network.Packets
|
|||||||
public ulong BidAmount;
|
public ulong BidAmount;
|
||||||
public ItemInstance Item;
|
public ItemInstance Item;
|
||||||
|
|
||||||
public void Initialize(AuctionEntry auction, Item item)
|
public void Initialize(AuctionPosting auction)
|
||||||
{
|
{
|
||||||
AuctionID = auction.Id;
|
AuctionID = auction.Id;
|
||||||
Item = new ItemInstance(item);
|
Item = new ItemInstance(auction.Items[0]);
|
||||||
BidAmount = auction.bid;
|
BidAmount = auction.BidAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Write(WorldPacket data)
|
public void Write(WorldPacket data)
|
||||||
@@ -859,7 +857,7 @@ namespace Game.Network.Packets
|
|||||||
public AuctionBucketKey Key;
|
public AuctionBucketKey Key;
|
||||||
public int TotalQuantity;
|
public int TotalQuantity;
|
||||||
public ulong MinPrice;
|
public ulong MinPrice;
|
||||||
public List<int> ItemModifiedAppearanceIDs = new List<int>();
|
public List<uint> ItemModifiedAppearanceIDs = new List<uint>();
|
||||||
public Optional<byte> MaxBattlePetQuality;
|
public Optional<byte> MaxBattlePetQuality;
|
||||||
public Optional<byte> MaxBattlePetLevel;
|
public Optional<byte> MaxBattlePetLevel;
|
||||||
public Optional<byte> BattlePetBreedID;
|
public Optional<byte> BattlePetBreedID;
|
||||||
@@ -903,7 +901,7 @@ namespace Game.Network.Packets
|
|||||||
public int Charges;
|
public int Charges;
|
||||||
public List<ItemEnchantData> Enchantments = new List<ItemEnchantData>();
|
public List<ItemEnchantData> Enchantments = new List<ItemEnchantData>();
|
||||||
public int Flags;
|
public int Flags;
|
||||||
public int AuctionID;
|
public uint AuctionID;
|
||||||
public ObjectGuid Owner;
|
public ObjectGuid Owner;
|
||||||
public Optional<ulong> MinBid;
|
public Optional<ulong> MinBid;
|
||||||
public Optional<ulong> MinIncrement;
|
public Optional<ulong> MinIncrement;
|
||||||
@@ -947,7 +945,7 @@ namespace Game.Network.Packets
|
|||||||
data.WriteInt32(Count);
|
data.WriteInt32(Count);
|
||||||
data.WriteInt32(Charges);
|
data.WriteInt32(Charges);
|
||||||
data.WriteInt32(Flags);
|
data.WriteInt32(Flags);
|
||||||
data.WriteInt32(AuctionID);
|
data.WriteUInt32(AuctionID);
|
||||||
data.WritePackedGuid(Owner);
|
data.WritePackedGuid(Owner);
|
||||||
data.WriteInt32(DurationLeft);
|
data.WriteInt32(DurationLeft);
|
||||||
data.WriteUInt8(DeleteReason);
|
data.WriteUInt8(DeleteReason);
|
||||||
@@ -993,20 +991,20 @@ namespace Game.Network.Packets
|
|||||||
|
|
||||||
struct AuctionBidderNotification
|
struct AuctionBidderNotification
|
||||||
{
|
{
|
||||||
public int AuctionID;
|
public uint AuctionID;
|
||||||
public ObjectGuid Bidder;
|
public ObjectGuid Bidder;
|
||||||
public ItemInstance Item;
|
public ItemInstance Item;
|
||||||
|
|
||||||
public void Initialize(AuctionEntry auction, Item item)
|
public void Initialize(AuctionPosting auction, Item item)
|
||||||
{
|
{
|
||||||
AuctionID = (int)auction.Id;
|
AuctionID = auction.Id;
|
||||||
Item = new ItemInstance(item);
|
Item = new ItemInstance(item);
|
||||||
Bidder = ObjectGuid.Create(HighGuid.Player, auction.bidder);
|
Bidder = auction.Bidder;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Write(WorldPacket data)
|
public void Write(WorldPacket data)
|
||||||
{
|
{
|
||||||
data.WriteInt32(AuctionID);
|
data.WriteUInt32(AuctionID);
|
||||||
data.WritePackedGuid(Bidder);
|
data.WritePackedGuid(Bidder);
|
||||||
Item.Write(data);
|
Item.Write(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -883,7 +883,7 @@ namespace Game.Network.Packets
|
|||||||
|
|
||||||
public class ItemEnchantData
|
public class ItemEnchantData
|
||||||
{
|
{
|
||||||
public ItemEnchantData(int id, uint expiration, int charges, byte slot)
|
public ItemEnchantData(uint id, uint expiration, int charges, byte slot)
|
||||||
{
|
{
|
||||||
ID = id;
|
ID = id;
|
||||||
Expiration = expiration;
|
Expiration = expiration;
|
||||||
@@ -893,13 +893,13 @@ namespace Game.Network.Packets
|
|||||||
|
|
||||||
public void Write(WorldPacket data)
|
public void Write(WorldPacket data)
|
||||||
{
|
{
|
||||||
data.WriteInt32(ID);
|
data.WriteUInt32(ID);
|
||||||
data.WriteUInt32(Expiration);
|
data.WriteUInt32(Expiration);
|
||||||
data.WriteInt32(Charges);
|
data.WriteInt32(Charges);
|
||||||
data.WriteUInt8(Slot);
|
data.WriteUInt8(Slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int ID;
|
public uint ID;
|
||||||
public uint Expiration;
|
public uint Expiration;
|
||||||
public int Charges;
|
public int Charges;
|
||||||
public byte Slot;
|
public byte Slot;
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ namespace Game.Network.Packets
|
|||||||
if (item.GetEnchantmentId(slot) == 0)
|
if (item.GetEnchantmentId(slot) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Enchants.Add(new ItemEnchantData((int)item.GetEnchantmentId(slot), item.GetEnchantmentDuration(slot), (int)item.GetEnchantmentCharges(slot), (byte)slot));
|
Enchants.Add(new ItemEnchantData(item.GetEnchantmentId(slot), item.GetEnchantmentDuration(slot), (int)item.GetEnchantmentCharges(slot), (byte)slot));
|
||||||
}
|
}
|
||||||
|
|
||||||
byte i = 0;
|
byte i = 0;
|
||||||
|
|||||||
@@ -482,16 +482,16 @@ namespace Game.Scripting
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Called when an auction is added to an auction house.
|
// Called when an auction is added to an auction house.
|
||||||
public virtual void OnAuctionAdd(AuctionHouseObject ah, AuctionEntry entry) { }
|
public virtual void OnAuctionAdd(AuctionHouseObject ah, AuctionPosting auction) { }
|
||||||
|
|
||||||
// Called when an auction is removed from an auction house.
|
// Called when an auction is removed from an auction house.
|
||||||
public virtual void OnAuctionRemove(AuctionHouseObject ah, AuctionEntry entry) { }
|
public virtual void OnAuctionRemove(AuctionHouseObject ah, AuctionPosting auction) { }
|
||||||
|
|
||||||
// Called when an auction was succesfully completed.
|
// Called when an auction was succesfully completed.
|
||||||
public virtual void OnAuctionSuccessful(AuctionHouseObject ah, AuctionEntry entry) { }
|
public virtual void OnAuctionSuccessful(AuctionHouseObject ah, AuctionPosting auction) { }
|
||||||
|
|
||||||
// Called when an auction expires.
|
// Called when an auction expires.
|
||||||
public virtual void OnAuctionExpire(AuctionHouseObject ah, AuctionEntry entry) { }
|
public virtual void OnAuctionExpire(AuctionHouseObject ah, AuctionPosting auction) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ConditionScript : ScriptObject
|
public class ConditionScript : ScriptObject
|
||||||
|
|||||||
@@ -975,29 +975,29 @@ namespace Game.Scripting
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AuctionHouseScript
|
// AuctionHouseScript
|
||||||
public void OnAuctionAdd(AuctionHouseObject ah, AuctionEntry entry)
|
public void OnAuctionAdd(AuctionHouseObject ah, AuctionPosting auction)
|
||||||
{
|
{
|
||||||
Cypher.Assert(ah != null);
|
Cypher.Assert(ah != null);
|
||||||
Cypher.Assert(entry != null);
|
Cypher.Assert(auction != null);
|
||||||
ForEach<AuctionHouseScript>(p => p.OnAuctionAdd(ah, entry));
|
ForEach<AuctionHouseScript>(p => p.OnAuctionAdd(ah, auction));
|
||||||
}
|
}
|
||||||
public void OnAuctionRemove(AuctionHouseObject ah, AuctionEntry entry)
|
public void OnAuctionRemove(AuctionHouseObject ah, AuctionPosting auction)
|
||||||
{
|
{
|
||||||
Cypher.Assert(ah != null);
|
Cypher.Assert(ah != null);
|
||||||
Cypher.Assert(entry != null);
|
Cypher.Assert(auction != null);
|
||||||
ForEach<AuctionHouseScript>(p => p.OnAuctionRemove(ah, entry));
|
ForEach<AuctionHouseScript>(p => p.OnAuctionRemove(ah, auction));
|
||||||
}
|
}
|
||||||
public void OnAuctionSuccessful(AuctionHouseObject ah, AuctionEntry entry)
|
public void OnAuctionSuccessful(AuctionHouseObject ah, AuctionPosting auction)
|
||||||
{
|
{
|
||||||
Cypher.Assert(ah != null);
|
Cypher.Assert(ah != null);
|
||||||
Cypher.Assert(entry != null);
|
Cypher.Assert(auction != null);
|
||||||
ForEach<AuctionHouseScript>(p => p.OnAuctionSuccessful(ah, entry));
|
ForEach<AuctionHouseScript>(p => p.OnAuctionSuccessful(ah, auction));
|
||||||
}
|
}
|
||||||
public void OnAuctionExpire(AuctionHouseObject ah, AuctionEntry entry)
|
public void OnAuctionExpire(AuctionHouseObject ah, AuctionPosting auction)
|
||||||
{
|
{
|
||||||
Cypher.Assert(ah != null);
|
Cypher.Assert(ah != null);
|
||||||
Cypher.Assert(entry != null);
|
Cypher.Assert(auction != null);
|
||||||
ForEach<AuctionHouseScript>(p => p.OnAuctionExpire(ah, entry));
|
ForEach<AuctionHouseScript>(p => p.OnAuctionExpire(ah, auction));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ConditionScript
|
// ConditionScript
|
||||||
|
|||||||
@@ -691,12 +691,13 @@ namespace Game
|
|||||||
Log.outInfo(LogFilter.ServerLoading, "Loading Completed Achievements...");
|
Log.outInfo(LogFilter.ServerLoading, "Loading Completed Achievements...");
|
||||||
Global.AchievementMgr.LoadCompletedAchievements();
|
Global.AchievementMgr.LoadCompletedAchievements();
|
||||||
|
|
||||||
// Load dynamic data tables from the database
|
// Load before guilds and arena teams
|
||||||
Log.outInfo(LogFilter.ServerLoading, "Loading Item Auctions...");
|
Log.outInfo(LogFilter.ServerLoading, "Loading character cache store...");
|
||||||
Global.AuctionMgr.LoadAuctionItems();
|
Global.CharacterCacheStorage.LoadCharacterCacheStorage();
|
||||||
|
|
||||||
|
// Load dynamic data tables from the database
|
||||||
Log.outInfo(LogFilter.ServerLoading, "Loading Auctions...");
|
Log.outInfo(LogFilter.ServerLoading, "Loading Auctions...");
|
||||||
Global.AuctionMgr.LoadAuctions();
|
Global.AuctionHouseMgr.LoadAuctions();
|
||||||
|
|
||||||
if (WorldConfig.GetBoolValue(WorldCfg.BlackmarketEnabled))
|
if (WorldConfig.GetBoolValue(WorldCfg.BlackmarketEnabled))
|
||||||
{
|
{
|
||||||
@@ -707,10 +708,6 @@ namespace Game
|
|||||||
Global.BlackMarketMgr.LoadAuctions();
|
Global.BlackMarketMgr.LoadAuctions();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load before guilds and arena teams
|
|
||||||
Log.outInfo(LogFilter.ServerLoading, "Loading character cache store...");
|
|
||||||
Global.CharacterCacheStorage.LoadCharacterCacheStorage();
|
|
||||||
|
|
||||||
Log.outInfo(LogFilter.ServerLoading, "Loading Guild rewards...");
|
Log.outInfo(LogFilter.ServerLoading, "Loading Guild rewards...");
|
||||||
Global.GuildMgr.LoadGuildRewards();
|
Global.GuildMgr.LoadGuildRewards();
|
||||||
|
|
||||||
@@ -1184,7 +1181,7 @@ namespace Game
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle expired auctions
|
// Handle expired auctions
|
||||||
Global.AuctionMgr.Update();
|
Global.AuctionHouseMgr.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_timers[WorldTimers.AuctionsPending].Passed())
|
if (m_timers[WorldTimers.AuctionsPending].Passed())
|
||||||
|
|||||||
@@ -158,6 +158,53 @@ LOCK TABLES `arena_team_member` WRITE;
|
|||||||
/*!40000 ALTER TABLE `arena_team_member` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `arena_team_member` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `auction_bidders`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `auction_bidders`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TABLE `auction_bidders` (
|
||||||
|
`auctionId` int unsigned NOT NULL,
|
||||||
|
`playerGuid` bigint unsigned NOT NULL,
|
||||||
|
PRIMARY KEY (`auctionId`,`playerGuid`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `auction_bidders`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `auction_bidders` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `auction_bidders` DISABLE KEYS */;
|
||||||
|
/*!40000 ALTER TABLE `auction_bidders` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `auction_items`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `auction_items`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TABLE `auction_items` (
|
||||||
|
`auctionId` int unsigned NOT NULL,
|
||||||
|
`itemGuid` bigint unsigned NOT NULL,
|
||||||
|
PRIMARY KEY (`auctionId`,`itemGuid`),
|
||||||
|
UNIQUE KEY `idx_itemGuid` (`itemGuid`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `auction_items`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `auction_items` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `auction_items` DISABLE KEYS */;
|
||||||
|
/*!40000 ALTER TABLE `auction_items` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for table `auctionhouse`
|
-- Table structure for table `auctionhouse`
|
||||||
--
|
--
|
||||||
@@ -167,17 +214,16 @@ DROP TABLE IF EXISTS `auctionhouse`;
|
|||||||
/*!40101 SET character_set_client = utf8 */;
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
CREATE TABLE `auctionhouse` (
|
CREATE TABLE `auctionhouse` (
|
||||||
`id` int(10) unsigned NOT NULL DEFAULT '0',
|
`id` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
`auctioneerguid` bigint(20) unsigned NOT NULL DEFAULT '0',
|
`auctionHouseId` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
`itemguid` bigint(20) unsigned NOT NULL DEFAULT '0',
|
`owner` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||||
`itemowner` bigint(20) unsigned NOT NULL DEFAULT '0',
|
`bidder` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||||
`buyoutprice` bigint(20) unsigned NOT NULL DEFAULT '0',
|
`minBid` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||||
`time` int(10) unsigned NOT NULL DEFAULT '0',
|
`buyoutOrUnitPrice` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||||
`buyguid` bigint(20) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`lastbid` bigint(20) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`startbid` bigint(20) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`deposit` bigint(20) unsigned NOT NULL DEFAULT '0',
|
`deposit` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`id`),
|
`bidAmount` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||||
UNIQUE KEY `item_guid` (`itemguid`)
|
`startTime` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`endTime` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
@@ -733,6 +779,33 @@ LOCK TABLES `character_equipmentsets` WRITE;
|
|||||||
/*!40000 ALTER TABLE `character_equipmentsets` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `character_equipmentsets` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `character_favorite_auctions`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `character_favorite_auctions`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TABLE `character_favorite_auctions` (
|
||||||
|
`guid` bigint(20) unsigned NOT NULL,
|
||||||
|
`order` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`itemId` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`itemLevel` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`battlePetSpeciesId` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`suffixItemNameDescriptionId` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
PRIMARY KEY (`guid`,`order`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `character_favorite_auctions`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `character_favorite_auctions` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `character_favorite_auctions` DISABLE KEYS */;
|
||||||
|
/*!40000 ALTER TABLE `character_favorite_auctions` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for table `character_fishingsteps`
|
-- Table structure for table `character_fishingsteps`
|
||||||
--
|
--
|
||||||
@@ -3696,7 +3769,9 @@ INSERT INTO `updates` VALUES
|
|||||||
('2019_11_22_00_characters.sql','95DFA71DBD75542C098CD86E9C0051C9690902F0','RELEASED','2019-11-20 15:10:12',0),
|
('2019_11_22_00_characters.sql','95DFA71DBD75542C098CD86E9C0051C9690902F0','RELEASED','2019-11-20 15:10:12',0),
|
||||||
('2019_11_30_00_characters.sql','D0678E62B651AECA60C2DD6989BF80BD999AD12B','RELEASED','2019-11-29 22:42:01',0),
|
('2019_11_30_00_characters.sql','D0678E62B651AECA60C2DD6989BF80BD999AD12B','RELEASED','2019-11-29 22:42:01',0),
|
||||||
('2019_12_05_00_characters.sql','EA381C9634A5646A3168F15DF4E06A708A622762','RELEASED','2019-12-05 20:56:58',0),
|
('2019_12_05_00_characters.sql','EA381C9634A5646A3168F15DF4E06A708A622762','RELEASED','2019-12-05 20:56:58',0),
|
||||||
('2020_02_17_00_characters.sql','E1519A81D35F19B48B3C75A83A270CB4BA0B84F2','RELEASED','2020-02-17 21:55:17',0);
|
('2020_02_17_00_characters.sql','E1519A81D35F19B48B3C75A83A270CB4BA0B84F2','RELEASED','2020-02-17 21:55:17',0),
|
||||||
|
('2020_04_20_00_characters.sql','977B5E0C894E0A7E80B2A9626F17CA636A69BD22','RELEASED','2020-04-20 19:08:18',0),
|
||||||
|
('2020_04_24_00_characters.sql','85E2E0395A9457A53D73A9E0A7BB39B7E4C429BF','RELEASED','2020-04-24 22:04:59',0);
|
||||||
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
ALTER TABLE `auctionhouse` ADD `auctionHouseId` int(10) unsigned NOT NULL DEFAULT '0' AFTER `id`;
|
||||||
|
ALTER TABLE `auctionhouse` DROP `auctioneerguid`;
|
||||||
|
|
||||||
|
-- temporarily mark all auctions as coming from neutral AH (not goblin one) and expired
|
||||||
|
UPDATE `auctionhouse` SET `auctionHouseId`=1, `time`=UNIX_TIMESTAMP();
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `auction_bidders`;
|
||||||
|
CREATE TABLE `auction_bidders` (
|
||||||
|
`auctionId` int unsigned NOT NULL,
|
||||||
|
`playerGuid` bigint unsigned NOT NULL,
|
||||||
|
PRIMARY KEY (`auctionId`,`playerGuid`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
INSERT INTO `auction_bidders` SELECT `id`, `buyguid` FROM `auctionhouse`;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `auction_items`;
|
||||||
|
CREATE TABLE `auction_items` (
|
||||||
|
`auctionId` int unsigned NOT NULL,
|
||||||
|
`itemGuid` bigint unsigned NOT NULL,
|
||||||
|
PRIMARY KEY (`auctionId`,`itemGuid`),
|
||||||
|
UNIQUE KEY `idx_itemGuid` (`itemGuid`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `character_favorite_auctions`;
|
||||||
|
CREATE TABLE `character_favorite_auctions` (
|
||||||
|
`guid` bigint(20) unsigned NOT NULL,
|
||||||
|
`order` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`itemId` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`itemLevel` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`battlePetSpeciesId` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`suffixItemNameDescriptionId` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
PRIMARY KEY (`guid`,`order`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
INSERT INTO `auction_items` SELECT `id`, `itemguid` FROM `auctionhouse`;
|
||||||
|
|
||||||
|
ALTER TABLE `auctionhouse` DROP INDEX `item_guid`;
|
||||||
|
ALTER TABLE `auctionhouse` DROP `itemguid`;
|
||||||
|
ALTER TABLE `auctionhouse` CHANGE `itemowner` `owner` bigint(20) unsigned NOT NULL DEFAULT '0' AFTER `auctionHouseId`;
|
||||||
|
ALTER TABLE `auctionhouse` CHANGE `buyguid` `bidder` bigint(20) unsigned NOT NULL DEFAULT '0' AFTER `owner`;
|
||||||
|
ALTER TABLE `auctionhouse` CHANGE `startbid` `minBid` bigint(20) unsigned NOT NULL DEFAULT '0' AFTER `bidder`;
|
||||||
|
ALTER TABLE `auctionhouse` CHANGE `buyoutprice` `buyoutOrUnitPrice` bigint(20) unsigned NOT NULL DEFAULT '0' AFTER `lastbid`;
|
||||||
|
ALTER TABLE `auctionhouse` MODIFY `deposit` bigint(20) unsigned NOT NULL DEFAULT '0' AFTER `buyoutOrUnitPrice`;
|
||||||
|
ALTER TABLE `auctionhouse` CHANGE `lastbid` `bidAmount` bigint(20) unsigned NOT NULL DEFAULT '0' AFTER `deposit`;
|
||||||
|
ALTER TABLE `auctionhouse` ADD `startTime` int(10) unsigned NOT NULL DEFAULT '0' AFTER `bidAmount`;
|
||||||
|
ALTER TABLE `auctionhouse` CHANGE `time` `endTime` int(10) unsigned NOT NULL DEFAULT '0' AFTER `startTime`;
|
||||||
Reference in New Issue
Block a user