Fixes trigger spells not working.

This commit is contained in:
hondacrx
2022-08-08 18:01:54 -04:00
parent 3102a12bfe
commit ac3a068ec0
6 changed files with 42 additions and 22 deletions
+8 -4
View File
@@ -131,9 +131,10 @@ namespace Game
SQLTransaction trans = new();
if (auctionHouse.BuyCommodity(trans, _player, (uint)confirmCommoditiesPurchase.ItemID, confirmCommoditiesPurchase.Quantity, throttle.DelayUntilNext))
{
var buyerGuid = _player.GetGUID();
AddTransactionCallback(DB.Characters.AsyncCommitTransaction(trans)).AfterComplete(success =>
{
if (GetPlayer() && GetPlayer().GetGUID() == _player.GetGUID())
if (GetPlayer() && GetPlayer().GetGUID() == buyerGuid)
{
if (success)
{
@@ -766,9 +767,10 @@ namespace Game
auctionHouse.AddAuction(trans, auction);
_player.SaveInventoryAndGoldToDB(trans);
var auctionPlayerGuid = _player.GetGUID();
AddTransactionCallback(DB.Characters.AsyncCommitTransaction(trans)).AfterComplete(success =>
{
if (GetPlayer() && GetPlayer().GetGUID() == _player.GetGUID())
if (GetPlayer() && GetPlayer().GetGUID() == auctionPlayerGuid)
{
if (success)
{
@@ -912,9 +914,11 @@ namespace Game
auctionHouse.AddAuction(trans, auction);
_player.SaveInventoryAndGoldToDB(trans);
var auctionPlayerGuid = _player.GetGUID();
AddTransactionCallback(DB.Characters.AsyncCommitTransaction(trans)).AfterComplete(success =>
{
if (GetPlayer() && GetPlayer().GetGUID() == _player.GetGUID())
{
if (GetPlayer() && GetPlayer().GetGUID() == auctionPlayerGuid)
{
if (success)
{
+2 -1
View File
@@ -1186,9 +1186,10 @@ namespace Game
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_CHECK_NAME);
stmt.AddValue(0, checkCharacterNameAvailability.Name);
var sequenceIndex = checkCharacterNameAvailability.SequenceIndex;
_queryProcessor.AddCallback(DB.Characters.AsyncQuery(stmt).WithCallback(result =>
{
SendPacket(new CheckCharacterNameAvailabilityResult(checkCharacterNameAvailability.SequenceIndex, !result.IsEmpty() ? ResponseCodes.CharCreateNameInUse : ResponseCodes.Success));
SendPacket(new CheckCharacterNameAvailabilityResult(sequenceIndex, !result.IsEmpty() ? ResponseCodes.CharCreateNameInUse : ResponseCodes.Success));
}));
}