Remove custom OptionalType and use the default c# nullable type.
This commit is contained in:
@@ -52,12 +52,12 @@ namespace Game
|
||||
|
||||
Log.outDebug(LogFilter.Auctionhouse, $"Auctionhouse search ({browseQuery.Auctioneer}), searchedname: {browseQuery.Name}, levelmin: {browseQuery.MinLevel}, levelmax: {browseQuery.MaxLevel}, filters: {browseQuery.Filters}");
|
||||
|
||||
Optional<AuctionSearchClassFilters> classFilters = new();
|
||||
AuctionSearchClassFilters classFilters = null;
|
||||
|
||||
AuctionListBucketsResult listBucketsResult = new();
|
||||
if (!browseQuery.ItemClassFilters.Empty())
|
||||
{
|
||||
classFilters.Value = new();
|
||||
classFilters = new();
|
||||
|
||||
foreach (var classFilter in browseQuery.ItemClassFilters)
|
||||
{
|
||||
@@ -67,14 +67,14 @@ namespace Game
|
||||
{
|
||||
if (classFilter.ItemClass < (int)ItemClass.Max)
|
||||
{
|
||||
classFilters.Value.Classes[classFilter.ItemClass].SubclassMask |= (AuctionSearchClassFilters.FilterType)(1 << subClassFilter.ItemSubclass);
|
||||
classFilters.Classes[classFilter.ItemClass].SubclassMask |= (AuctionSearchClassFilters.FilterType)(1 << subClassFilter.ItemSubclass);
|
||||
if (subClassFilter.ItemSubclass < ItemConst.MaxItemSubclassTotal)
|
||||
classFilters.Value.Classes[classFilter.ItemClass].InvTypes[subClassFilter.ItemSubclass] = subClassFilter.InvTypeMask;
|
||||
classFilters.Classes[classFilter.ItemClass].InvTypes[subClassFilter.ItemSubclass] = subClassFilter.InvTypeMask;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
classFilters.Value.Classes[classFilter.ItemClass].SubclassMask = AuctionSearchClassFilters.FilterType.SkipSubclass;
|
||||
classFilters.Classes[classFilter.ItemClass].SubclassMask = AuctionSearchClassFilters.FilterType.SkipSubclass;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -949,9 +949,9 @@ namespace Game
|
||||
CommodityQuote quote = auctionHouse.CreateCommodityQuote(_player, (uint)getCommodityQuote.ItemID, getCommodityQuote.Quantity);
|
||||
if (quote != null)
|
||||
{
|
||||
commodityQuoteResult.TotalPrice.Set(quote.TotalPrice);
|
||||
commodityQuoteResult.Quantity.Set(quote.Quantity);
|
||||
commodityQuoteResult.QuoteDuration.Set((int)(quote.ValidTo - GameTime.GetGameTimeSteadyPoint()).TotalMilliseconds);
|
||||
commodityQuoteResult.TotalPrice = quote.TotalPrice;
|
||||
commodityQuoteResult.Quantity = quote.Quantity;
|
||||
commodityQuoteResult.QuoteDuration = (int)(quote.ValidTo - GameTime.GetGameTimeSteadyPoint()).TotalMilliseconds;
|
||||
}
|
||||
|
||||
commodityQuoteResult.ItemID = getCommodityQuote.ItemID;
|
||||
|
||||
@@ -29,30 +29,31 @@ namespace Game
|
||||
|
||||
if (code == BattlenetRpcErrorCode.Ok)
|
||||
{
|
||||
response.SuccessInfo.Value = new();
|
||||
response.SuccessInfo = new();
|
||||
|
||||
response.SuccessInfo.Value = new AuthResponse.AuthSuccessInfo();
|
||||
response.SuccessInfo.Value.ActiveExpansionLevel = (byte)GetExpansion();
|
||||
response.SuccessInfo.Value.AccountExpansionLevel = (byte)GetAccountExpansion();
|
||||
response.SuccessInfo.Value.VirtualRealmAddress = Global.WorldMgr.GetVirtualRealmAddress();
|
||||
response.SuccessInfo.Value.Time = (uint)GameTime.GetGameTime();
|
||||
response.SuccessInfo = new AuthResponse.AuthSuccessInfo();
|
||||
response.SuccessInfo.ActiveExpansionLevel = (byte)GetExpansion();
|
||||
response.SuccessInfo.AccountExpansionLevel = (byte)GetAccountExpansion();
|
||||
response.SuccessInfo.VirtualRealmAddress = Global.WorldMgr.GetVirtualRealmAddress();
|
||||
response.SuccessInfo.Time = (uint)GameTime.GetGameTime();
|
||||
|
||||
var realm = Global.WorldMgr.GetRealm();
|
||||
|
||||
// Send current home realm. Also there is no need to send it later in realm queries.
|
||||
response.SuccessInfo.Value.VirtualRealms.Add(new VirtualRealmInfo(realm.Id.GetAddress(), true, false, realm.Name, realm.NormalizedName));
|
||||
response.SuccessInfo.VirtualRealms.Add(new VirtualRealmInfo(realm.Id.GetAddress(), true, false, realm.Name, realm.NormalizedName));
|
||||
|
||||
if (HasPermission(RBACPermissions.UseCharacterTemplates))
|
||||
foreach (var templ in Global.CharacterTemplateDataStorage.GetCharacterTemplates().Values)
|
||||
response.SuccessInfo.Value.Templates.Add(templ);
|
||||
response.SuccessInfo.Templates.Add(templ);
|
||||
|
||||
response.SuccessInfo.Value.AvailableClasses = Global.ObjectMgr.GetClassExpansionRequirements();
|
||||
response.SuccessInfo.AvailableClasses = Global.ObjectMgr.GetClassExpansionRequirements();
|
||||
}
|
||||
|
||||
if (queued)
|
||||
{
|
||||
response.WaitInfo.Value = new();
|
||||
response.WaitInfo.Value.WaitCount = queuePos;
|
||||
AuthWaitInfo waitInfo = new();
|
||||
waitInfo.WaitCount = queuePos;
|
||||
response.WaitInfo = waitInfo;
|
||||
}
|
||||
|
||||
SendPacket(response);
|
||||
@@ -110,7 +111,7 @@ namespace Game
|
||||
europaTicketConfig.ComplaintsEnabled = WorldConfig.GetBoolValue(WorldCfg.SupportComplaintsEnabled);
|
||||
europaTicketConfig.SuggestionsEnabled = WorldConfig.GetBoolValue(WorldCfg.SupportSuggestionsEnabled);
|
||||
|
||||
features.EuropaTicketSystemStatus.Set(europaTicketConfig);
|
||||
features.EuropaTicketSystemStatus = europaTicketConfig;
|
||||
|
||||
SendPacket(features);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.BattlePetModifyName)]
|
||||
void HandleBattlePetModifyName(BattlePetModifyName battlePetModifyName)
|
||||
{
|
||||
GetBattlePetMgr().ModifyName(battlePetModifyName.PetGuid, battlePetModifyName.Name, battlePetModifyName.DeclinedNames.Value);
|
||||
GetBattlePetMgr().ModifyName(battlePetModifyName.PetGuid, battlePetModifyName.Name, battlePetModifyName.DeclinedNames);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.QueryBattlePetName)]
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace Game
|
||||
EnumCharactersResult charResult = new();
|
||||
charResult.Success = true;
|
||||
charResult.IsDeletedCharacters = holder.IsDeletedCharacters();
|
||||
charResult.DisabledClassesMask.Set(WorldConfig.GetUIntValue(WorldCfg.CharacterCreatingDisabledClassmask));
|
||||
charResult.DisabledClassesMask = WorldConfig.GetUIntValue(WorldCfg.CharacterCreatingDisabledClassmask);
|
||||
|
||||
if (!charResult.IsDeletedCharacters)
|
||||
_legitCharacters.Clear();
|
||||
@@ -157,7 +157,7 @@ namespace Game
|
||||
EnumCharactersResult charEnum = new();
|
||||
charEnum.Success = true;
|
||||
charEnum.IsDeletedCharacters = true;
|
||||
charEnum.DisabledClassesMask.Set(WorldConfig.GetUIntValue(WorldCfg.CharacterCreatingDisabledClassmask));
|
||||
charEnum.DisabledClassesMask = WorldConfig.GetUIntValue(WorldCfg.CharacterCreatingDisabledClassmask);
|
||||
|
||||
if (!result.IsEmpty())
|
||||
{
|
||||
@@ -1099,19 +1099,21 @@ namespace Game
|
||||
features.VoiceEnabled = false;
|
||||
features.BrowserEnabled = false; // Has to be false, otherwise client will crash if "Customer Support" is opened
|
||||
|
||||
features.EuropaTicketSystemStatus.Value = new();
|
||||
features.EuropaTicketSystemStatus.Value.ThrottleState.MaxTries = 10;
|
||||
features.EuropaTicketSystemStatus.Value.ThrottleState.PerMilliseconds = 60000;
|
||||
features.EuropaTicketSystemStatus.Value.ThrottleState.TryCount = 1;
|
||||
features.EuropaTicketSystemStatus.Value.ThrottleState.LastResetTimeBeforeNow = 111111;
|
||||
EuropaTicketConfig europaTicketSystemStatus = new();
|
||||
europaTicketSystemStatus.ThrottleState.MaxTries = 10;
|
||||
europaTicketSystemStatus.ThrottleState.PerMilliseconds = 60000;
|
||||
europaTicketSystemStatus.ThrottleState.TryCount = 1;
|
||||
europaTicketSystemStatus.ThrottleState.LastResetTimeBeforeNow = 111111;
|
||||
features.TutorialsEnabled = true;
|
||||
features.NPETutorialsEnabled = true;
|
||||
// END OF DUMMY VALUES
|
||||
|
||||
features.EuropaTicketSystemStatus.Value.TicketsEnabled = WorldConfig.GetBoolValue(WorldCfg.SupportTicketsEnabled);
|
||||
features.EuropaTicketSystemStatus.Value.BugsEnabled = WorldConfig.GetBoolValue(WorldCfg.SupportBugsEnabled);
|
||||
features.EuropaTicketSystemStatus.Value.ComplaintsEnabled = WorldConfig.GetBoolValue(WorldCfg.SupportComplaintsEnabled);
|
||||
features.EuropaTicketSystemStatus.Value.SuggestionsEnabled = WorldConfig.GetBoolValue(WorldCfg.SupportSuggestionsEnabled);
|
||||
europaTicketSystemStatus.TicketsEnabled = WorldConfig.GetBoolValue(WorldCfg.SupportTicketsEnabled);
|
||||
europaTicketSystemStatus.BugsEnabled = WorldConfig.GetBoolValue(WorldCfg.SupportBugsEnabled);
|
||||
europaTicketSystemStatus.ComplaintsEnabled = WorldConfig.GetBoolValue(WorldCfg.SupportComplaintsEnabled);
|
||||
europaTicketSystemStatus.SuggestionsEnabled = WorldConfig.GetBoolValue(WorldCfg.SupportSuggestionsEnabled);
|
||||
|
||||
features.EuropaTicketSystemStatus = europaTicketSystemStatus;
|
||||
|
||||
features.CharUndeleteEnabled = WorldConfig.GetBoolValue(WorldCfg.FeatureSystemCharacterUndeleteEnabled);
|
||||
features.BpayStoreEnabled = WorldConfig.GetBoolValue(WorldCfg.FeatureSystemBpayStoreEnabled);
|
||||
@@ -2511,7 +2513,7 @@ namespace Game
|
||||
packet.Result = result;
|
||||
packet.Name = renameInfo.NewName;
|
||||
if (result == ResponseCodes.Success)
|
||||
packet.Guid.Set(renameInfo.Guid);
|
||||
packet.Guid = renameInfo.Guid;
|
||||
|
||||
SendPacket(packet);
|
||||
}
|
||||
@@ -2540,11 +2542,11 @@ namespace Game
|
||||
|
||||
if (result == ResponseCodes.Success)
|
||||
{
|
||||
packet.Display.Value = new();
|
||||
packet.Display.Value.Name = factionChangeInfo.Name;
|
||||
packet.Display.Value.SexID = (byte)factionChangeInfo.SexID;
|
||||
packet.Display.Value.Customizations = factionChangeInfo.Customizations;
|
||||
packet.Display.Value.RaceID = (byte)factionChangeInfo.RaceID;
|
||||
packet.Display = new();
|
||||
packet.Display.Name = factionChangeInfo.Name;
|
||||
packet.Display.SexID = (byte)factionChangeInfo.SexID;
|
||||
packet.Display.Customizations = factionChangeInfo.Customizations;
|
||||
packet.Display.RaceID = (byte)factionChangeInfo.RaceID;
|
||||
}
|
||||
|
||||
SendPacket(packet);
|
||||
|
||||
@@ -387,7 +387,7 @@ namespace Game
|
||||
HandleChatAddon(chatAddonMessageTargeted.Params.Type, chatAddonMessageTargeted.Params.Prefix, chatAddonMessageTargeted.Params.Text, chatAddonMessageTargeted.Params.IsLogged, chatAddonMessageTargeted.Target, chatAddonMessageTargeted.ChannelGUID);
|
||||
}
|
||||
|
||||
void HandleChatAddon(ChatMsg type, string prefix, string text, bool isLogged, string target = "", Optional<ObjectGuid> channelGuid = default)
|
||||
void HandleChatAddon(ChatMsg type, string prefix, string text, bool isLogged, string target = "", ObjectGuid? channelGuid = null)
|
||||
{
|
||||
Player sender = GetPlayer();
|
||||
|
||||
|
||||
@@ -332,11 +332,11 @@ namespace Game
|
||||
if (guild == null)
|
||||
return;
|
||||
|
||||
if (!Player.IsInventoryPos(depositGuildBankItem.ContainerSlot.ValueOr(InventorySlots.Bag0), depositGuildBankItem.ContainerItemSlot))
|
||||
if (!Player.IsInventoryPos(depositGuildBankItem.ContainerSlot.GetValueOrDefault(InventorySlots.Bag0), depositGuildBankItem.ContainerItemSlot))
|
||||
GetPlayer().SendEquipError(InventoryResult.InternalBagError, null);
|
||||
else
|
||||
guild.SwapItemsWithInventory(GetPlayer(), false, depositGuildBankItem.BankTab, depositGuildBankItem.BankSlot,
|
||||
depositGuildBankItem.ContainerSlot.ValueOr(InventorySlots.Bag0), depositGuildBankItem.ContainerItemSlot, 0);
|
||||
depositGuildBankItem.ContainerSlot.GetValueOrDefault(InventorySlots.Bag0), depositGuildBankItem.ContainerItemSlot, 0);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.StoreGuildBankItem)]
|
||||
@@ -349,11 +349,11 @@ namespace Game
|
||||
if (guild == null)
|
||||
return;
|
||||
|
||||
if (!Player.IsInventoryPos(storeGuildBankItem.ContainerSlot.ValueOr(InventorySlots.Bag0), storeGuildBankItem.ContainerItemSlot))
|
||||
if (!Player.IsInventoryPos(storeGuildBankItem.ContainerSlot.GetValueOrDefault(InventorySlots.Bag0), storeGuildBankItem.ContainerItemSlot))
|
||||
GetPlayer().SendEquipError(InventoryResult.InternalBagError, null);
|
||||
else
|
||||
guild.SwapItemsWithInventory(GetPlayer(), true, storeGuildBankItem.BankTab, storeGuildBankItem.BankSlot,
|
||||
storeGuildBankItem.ContainerSlot.ValueOr(InventorySlots.Bag0), storeGuildBankItem.ContainerItemSlot, 0);
|
||||
storeGuildBankItem.ContainerSlot.GetValueOrDefault(InventorySlots.Bag0), storeGuildBankItem.ContainerItemSlot, 0);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.SwapItemWithGuildBankItem)]
|
||||
@@ -366,11 +366,11 @@ namespace Game
|
||||
if (guild == null)
|
||||
return;
|
||||
|
||||
if (!Player.IsInventoryPos(swapItemWithGuildBankItem.ContainerSlot.ValueOr(InventorySlots.Bag0), swapItemWithGuildBankItem.ContainerItemSlot))
|
||||
if (!Player.IsInventoryPos(swapItemWithGuildBankItem.ContainerSlot.GetValueOrDefault(InventorySlots.Bag0), swapItemWithGuildBankItem.ContainerItemSlot))
|
||||
GetPlayer().SendEquipError(InventoryResult.InternalBagError, null);
|
||||
else
|
||||
guild.SwapItemsWithInventory(GetPlayer(), false, swapItemWithGuildBankItem.BankTab, swapItemWithGuildBankItem.BankSlot,
|
||||
swapItemWithGuildBankItem.ContainerSlot.ValueOr(InventorySlots.Bag0), swapItemWithGuildBankItem.ContainerItemSlot, 0);
|
||||
swapItemWithGuildBankItem.ContainerSlot.GetValueOrDefault(InventorySlots.Bag0), swapItemWithGuildBankItem.ContainerItemSlot, 0);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.SwapGuildBankItemWithGuildBankItem)]
|
||||
@@ -410,11 +410,11 @@ namespace Game
|
||||
if (guild == null)
|
||||
return;
|
||||
|
||||
if (!Player.IsInventoryPos(mergeItemWithGuildBankItem.ContainerSlot.ValueOr(InventorySlots.Bag0), mergeItemWithGuildBankItem.ContainerItemSlot))
|
||||
if (!Player.IsInventoryPos(mergeItemWithGuildBankItem.ContainerSlot.GetValueOrDefault(InventorySlots.Bag0), mergeItemWithGuildBankItem.ContainerItemSlot))
|
||||
GetPlayer().SendEquipError(InventoryResult.InternalBagError, null);
|
||||
else
|
||||
guild.SwapItemsWithInventory(GetPlayer(), false, mergeItemWithGuildBankItem.BankTab, mergeItemWithGuildBankItem.BankSlot,
|
||||
mergeItemWithGuildBankItem.ContainerSlot.ValueOr(InventorySlots.Bag0), mergeItemWithGuildBankItem.ContainerItemSlot, mergeItemWithGuildBankItem.StackCount);
|
||||
mergeItemWithGuildBankItem.ContainerSlot.GetValueOrDefault(InventorySlots.Bag0), mergeItemWithGuildBankItem.ContainerItemSlot, mergeItemWithGuildBankItem.StackCount);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.SplitItemToGuildBank)]
|
||||
@@ -427,11 +427,11 @@ namespace Game
|
||||
if (guild == null)
|
||||
return;
|
||||
|
||||
if (!Player.IsInventoryPos(splitItemToGuildBank.ContainerSlot.ValueOr(InventorySlots.Bag0), splitItemToGuildBank.ContainerItemSlot))
|
||||
if (!Player.IsInventoryPos(splitItemToGuildBank.ContainerSlot.GetValueOrDefault(InventorySlots.Bag0), splitItemToGuildBank.ContainerItemSlot))
|
||||
GetPlayer().SendEquipError(InventoryResult.InternalBagError, null);
|
||||
else
|
||||
guild.SwapItemsWithInventory(GetPlayer(), false, splitItemToGuildBank.BankTab, splitItemToGuildBank.BankSlot,
|
||||
splitItemToGuildBank.ContainerSlot.ValueOr(InventorySlots.Bag0), splitItemToGuildBank.ContainerItemSlot, splitItemToGuildBank.StackCount);
|
||||
splitItemToGuildBank.ContainerSlot.GetValueOrDefault(InventorySlots.Bag0), splitItemToGuildBank.ContainerItemSlot, splitItemToGuildBank.StackCount);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.MergeGuildBankItemWithItem)]
|
||||
@@ -444,11 +444,11 @@ namespace Game
|
||||
if (guild == null)
|
||||
return;
|
||||
|
||||
if (!Player.IsInventoryPos(mergeGuildBankItemWithItem.ContainerSlot.ValueOr(InventorySlots.Bag0), mergeGuildBankItemWithItem.ContainerItemSlot))
|
||||
if (!Player.IsInventoryPos(mergeGuildBankItemWithItem.ContainerSlot.GetValueOrDefault(InventorySlots.Bag0), mergeGuildBankItemWithItem.ContainerItemSlot))
|
||||
GetPlayer().SendEquipError(InventoryResult.InternalBagError, null);
|
||||
else
|
||||
guild.SwapItemsWithInventory(GetPlayer(), true, mergeGuildBankItemWithItem.BankTab, mergeGuildBankItemWithItem.BankSlot,
|
||||
mergeGuildBankItemWithItem.ContainerSlot.ValueOr(InventorySlots.Bag0), mergeGuildBankItemWithItem.ContainerItemSlot, mergeGuildBankItemWithItem.StackCount);
|
||||
mergeGuildBankItemWithItem.ContainerSlot.GetValueOrDefault(InventorySlots.Bag0), mergeGuildBankItemWithItem.ContainerItemSlot, mergeGuildBankItemWithItem.StackCount);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.SplitGuildBankItemToInventory)]
|
||||
@@ -461,11 +461,11 @@ namespace Game
|
||||
if (guild == null)
|
||||
return;
|
||||
|
||||
if (!Player.IsInventoryPos(splitGuildBankItemToInventory.ContainerSlot.ValueOr(InventorySlots.Bag0), splitGuildBankItemToInventory.ContainerItemSlot))
|
||||
if (!Player.IsInventoryPos(splitGuildBankItemToInventory.ContainerSlot.GetValueOrDefault(InventorySlots.Bag0), splitGuildBankItemToInventory.ContainerItemSlot))
|
||||
GetPlayer().SendEquipError(InventoryResult.InternalBagError, null);
|
||||
else
|
||||
guild.SwapItemsWithInventory(GetPlayer(), true, splitGuildBankItemToInventory.BankTab, splitGuildBankItemToInventory.BankSlot,
|
||||
splitGuildBankItemToInventory.ContainerSlot.ValueOr(InventorySlots.Bag0), splitGuildBankItemToInventory.ContainerItemSlot, splitGuildBankItemToInventory.StackCount);
|
||||
splitGuildBankItemToInventory.ContainerSlot.GetValueOrDefault(InventorySlots.Bag0), splitGuildBankItemToInventory.ContainerItemSlot, splitGuildBankItemToInventory.StackCount);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.AutoStoreGuildBankItem)]
|
||||
|
||||
@@ -58,13 +58,12 @@ namespace Game
|
||||
Guild guild = Global.GuildMgr.GetGuildById(player.GetGuildId());
|
||||
if (guild)
|
||||
{
|
||||
inspectResult.GuildData.Value = new();
|
||||
|
||||
InspectGuildData guildData;
|
||||
guildData.GuildGUID = guild.GetGUID();
|
||||
guildData.NumGuildMembers = guild.GetMembersCount();
|
||||
guildData.AchievementPoints = (int)guild.GetAchievementMgr().GetAchievementPoints();
|
||||
inspectResult.GuildData.Set(guildData);
|
||||
|
||||
inspectResult.GuildData = guildData;
|
||||
}
|
||||
|
||||
Item heartOfAzeroth = player.GetItemByEntry(PlayerConst.ItemIdHeartOfAzeroth, ItemSearchLocation.Everywhere);
|
||||
|
||||
@@ -230,7 +230,7 @@ namespace Game
|
||||
continue;
|
||||
|
||||
LFGBlackList lfgBlackList = new();
|
||||
lfgBlackList.PlayerGuid.Set(pguid);
|
||||
lfgBlackList.PlayerGuid = pguid;
|
||||
foreach (var locked in Global.LFGMgr.GetLockedDungeons(pguid))
|
||||
lfgBlackList.Slot.Add(new LFGBlackListSlot(locked.Key, (uint)locked.Value.lockStatus, locked.Value.requiredItemLevel, (int)locked.Value.currentItemLevel, 0));
|
||||
|
||||
@@ -355,7 +355,7 @@ namespace Game
|
||||
foreach (var it in joinData.lockmap)
|
||||
{
|
||||
var blackList = new LFGBlackListPkt();
|
||||
blackList.PlayerGuid.Set(it.Key);
|
||||
blackList.PlayerGuid = it.Key;
|
||||
|
||||
foreach (var lockInfo in it.Value)
|
||||
{
|
||||
|
||||
@@ -533,8 +533,8 @@ namespace Game
|
||||
item.Item.ItemID = vendorItem.item;
|
||||
if (!vendorItem.BonusListIDs.Empty())
|
||||
{
|
||||
item.Item.ItemBonus.Value = new();
|
||||
item.Item.ItemBonus.Value.BonusListIDs = vendorItem.BonusListIDs;
|
||||
item.Item.ItemBonus = new();
|
||||
item.Item.ItemBonus.BonusListIDs = vendorItem.BonusListIDs;
|
||||
}
|
||||
|
||||
packet.Items.Add(item);
|
||||
|
||||
@@ -796,9 +796,9 @@ namespace Game
|
||||
|
||||
Global.ScriptMgr.OnPlayerChoiceResponse(GetPlayer(), (uint)choiceResponse.ChoiceID, (uint)choiceResponse.ResponseID);
|
||||
|
||||
if (playerChoiceResponse.Reward.HasValue)
|
||||
if (playerChoiceResponse.Reward != null)
|
||||
{
|
||||
var reward = playerChoiceResponse.Reward.Value;
|
||||
var reward = playerChoiceResponse.Reward;
|
||||
if (reward.TitleId != 0)
|
||||
_player.SetTitle(CliDB.CharTitlesStorage.LookupByKey(reward.TitleId), false);
|
||||
|
||||
|
||||
@@ -353,8 +353,8 @@ namespace Game
|
||||
spellInfo = actualSpellInfo;
|
||||
}
|
||||
|
||||
if (cast.Cast.MoveUpdate.HasValue)
|
||||
HandleMovementOpcode(ClientOpcodes.MoveStop, cast.Cast.MoveUpdate.Value);
|
||||
if (cast.Cast.MoveUpdate != null)
|
||||
HandleMovementOpcode(ClientOpcodes.MoveStop, cast.Cast.MoveUpdate);
|
||||
|
||||
Spell spell = new(caster, spellInfo, triggerFlag);
|
||||
|
||||
@@ -660,9 +660,9 @@ namespace Game
|
||||
spell.m_targets.SetPitch(packet.Pitch);
|
||||
spell.m_targets.SetSpeed(packet.Speed);
|
||||
|
||||
if (packet.Status.HasValue)
|
||||
if (packet.Status != null)
|
||||
{
|
||||
GetPlayer().ValidateMovementInfo(packet.Status.Value);
|
||||
GetPlayer().ValidateMovementInfo(packet.Status);
|
||||
/*public uint opcode;
|
||||
recvPacket >> opcode;
|
||||
recvPacket.SetOpcode(CMSG_MOVE_STOP); // always set to CMSG_MOVE_STOP in client SetOpcode
|
||||
|
||||
@@ -104,9 +104,11 @@ namespace Game
|
||||
GetPlayer().SetTaxiCheater(true); // Grimwing in Ebon Hold, special case. NOTE: Not perfect, Zul'Aman should not be included according to WoWhead, and I think taxicheat includes it.
|
||||
|
||||
ShowTaxiNodes data = new();
|
||||
data.WindowInfo.Value = new();
|
||||
data.WindowInfo.Value.UnitGUID = unit.GetGUID();
|
||||
data.WindowInfo.Value.CurrentNode = (int)curloc;
|
||||
ShowTaxiNodesWindowInfo windowInfo = new();
|
||||
windowInfo.UnitGUID = unit.GetGUID();
|
||||
windowInfo.CurrentNode = (int)curloc;
|
||||
|
||||
data.WindowInfo = windowInfo;
|
||||
|
||||
GetPlayer().m_taxi.AppendTaximaskTo(data, lastTaxiCheaterState);
|
||||
|
||||
|
||||
@@ -64,8 +64,7 @@ namespace Game
|
||||
tradeItem.GiftCreator = item.GetGiftCreator();
|
||||
if (!item.IsWrapped())
|
||||
{
|
||||
tradeItem.Unwrapped.Value = new();
|
||||
TradeUpdated.UnwrappedTradeItem unwrappedItem = tradeItem.Unwrapped.Value;
|
||||
TradeUpdated.UnwrappedTradeItem unwrappedItem = new();
|
||||
unwrappedItem.EnchantID = (int)item.GetEnchantmentId(EnchantmentSlot.Perm);
|
||||
unwrappedItem.OnUseEnchantmentID = (int)item.GetEnchantmentId(EnchantmentSlot.Use);
|
||||
unwrappedItem.Creator = item.GetCreator();
|
||||
@@ -74,6 +73,8 @@ namespace Game
|
||||
unwrappedItem.MaxDurability = item.m_itemData.MaxDurability;
|
||||
unwrappedItem.Durability = item.m_itemData.Durability;
|
||||
|
||||
tradeItem.Unwrapped = unwrappedItem;
|
||||
|
||||
byte g = 0;
|
||||
foreach (SocketedGem gemData in item.m_itemData.Gems)
|
||||
{
|
||||
@@ -82,7 +83,7 @@ namespace Game
|
||||
ItemGemData gem = new();
|
||||
gem.Slot = g;
|
||||
gem.Item = new ItemInstance(gemData);
|
||||
tradeItem.Unwrapped.Value.Gems.Add(gem);
|
||||
tradeItem.Unwrapped.Gems.Add(gem);
|
||||
}
|
||||
++g;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user