Core/Misc: Misc Fixes/Crashes
This commit is contained in:
@@ -30,6 +30,7 @@ namespace Game.BlackMarket
|
|||||||
{
|
{
|
||||||
MarketID = fields.Read<uint>(0);
|
MarketID = fields.Read<uint>(0);
|
||||||
SellerNPC = fields.Read<uint>(1);
|
SellerNPC = fields.Read<uint>(1);
|
||||||
|
Item = new ItemInstance();
|
||||||
Item.ItemID = fields.Read<uint>(2);
|
Item.ItemID = fields.Read<uint>(2);
|
||||||
Quantity = fields.Read<uint>(3);
|
Quantity = fields.Read<uint>(3);
|
||||||
MinBid = fields.Read<ulong>(4);
|
MinBid = fields.Read<ulong>(4);
|
||||||
|
|||||||
@@ -172,8 +172,8 @@ namespace Game.DataStorage
|
|||||||
conversationTemplate.TextureKitId = templateResult.Read<uint>(3);
|
conversationTemplate.TextureKitId = templateResult.Read<uint>(3);
|
||||||
conversationTemplate.ScriptId = Global.ObjectMgr.GetScriptId(templateResult.Read<string>(3));
|
conversationTemplate.ScriptId = Global.ObjectMgr.GetScriptId(templateResult.Read<string>(3));
|
||||||
|
|
||||||
conversationTemplate.Actors = actorsByConversation[conversationTemplate.Id].ToList();
|
conversationTemplate.Actors = actorsByConversation.TryGetValue(conversationTemplate.Id, out var actors) ? actors.ToList() : null;
|
||||||
conversationTemplate.ActorGuids = actorGuidsByConversation[conversationTemplate.Id].ToList();
|
conversationTemplate.ActorGuids = actorGuidsByConversation.TryGetValue(conversationTemplate.Id, out var actorGuids) ? actorGuids.ToList() : null;
|
||||||
|
|
||||||
ConversationLineRecord currentConversationLine = CliDB.ConversationLineStorage.LookupByKey(conversationTemplate.FirstLineId);
|
ConversationLineRecord currentConversationLine = CliDB.ConversationLineStorage.LookupByKey(conversationTemplate.FirstLineId);
|
||||||
if (currentConversationLine == null)
|
if (currentConversationLine == null)
|
||||||
|
|||||||
@@ -9314,7 +9314,7 @@ namespace Game
|
|||||||
currencyRewardCount++;
|
currencyRewardCount++;
|
||||||
response.Reward.Value.Currency.Add(new PlayerChoiceResponseRewardEntry(currencyId, quantity));
|
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");
|
SQLResult rewardFaction = DB.World.Query("SELECT ChoiceId, ResponseId, FactionId, Quantity FROM playerchoice_response_reward_faction ORDER BY `Index` ASC");
|
||||||
|
|||||||
Reference in New Issue
Block a user