Core/Misc: Misc Fixes/Crashes

This commit is contained in:
hondacrx
2020-12-07 13:02:07 -05:00
parent 6b7c0288e8
commit a702e070f3
3 changed files with 4 additions and 3 deletions
@@ -30,6 +30,7 @@ namespace Game.BlackMarket
{
MarketID = fields.Read<uint>(0);
SellerNPC = fields.Read<uint>(1);
Item = new ItemInstance();
Item.ItemID = fields.Read<uint>(2);
Quantity = fields.Read<uint>(3);
MinBid = fields.Read<ulong>(4);
@@ -172,8 +172,8 @@ namespace Game.DataStorage
conversationTemplate.TextureKitId = templateResult.Read<uint>(3);
conversationTemplate.ScriptId = Global.ObjectMgr.GetScriptId(templateResult.Read<string>(3));
conversationTemplate.Actors = actorsByConversation[conversationTemplate.Id].ToList();
conversationTemplate.ActorGuids = actorGuidsByConversation[conversationTemplate.Id].ToList();
conversationTemplate.Actors = actorsByConversation.TryGetValue(conversationTemplate.Id, out var actors) ? actors.ToList() : null;
conversationTemplate.ActorGuids = actorGuidsByConversation.TryGetValue(conversationTemplate.Id, out var actorGuids) ? actorGuids.ToList() : null;
ConversationLineRecord currentConversationLine = CliDB.ConversationLineStorage.LookupByKey(conversationTemplate.FirstLineId);
if (currentConversationLine == null)
+1 -1
View File
@@ -9314,7 +9314,7 @@ namespace Game
currencyRewardCount++;
response.Reward.Value.Currency.Add(new PlayerChoiceResponseRewardEntry(currencyId, quantity));
} while (rewards.NextRow());
} while (rewardCurrency.NextRow());
}
SQLResult rewardFaction = DB.World.Query("SELECT ChoiceId, ResponseId, FactionId, Quantity FROM playerchoice_response_reward_faction ORDER BY `Index` ASC");