Misc fixes

This commit is contained in:
Hondacrx
2025-06-08 18:24:20 -04:00
parent d99305d96a
commit ef142b7c8f
3 changed files with 8 additions and 26 deletions
+1 -4
View File
@@ -1972,10 +1972,7 @@ namespace Game.Chat
Player caster = handler.GetSession().GetPlayer();
if (caster != null)
{
ObjectGuid castId = ObjectGuid.Create(HighGuid.Cast, SpellCastSource.Normal, player.GetMapId(), SPELL_UNSTUCK_ID, player.GetMap().GenerateLowGuid(HighGuid.Cast));
Spell.SendCastResult(caster, spellInfo, new Networking.Packets.SpellCastVisual(SPELL_UNSTUCK_VISUAL, 0), castId, SpellCastResult.CantDoThatRightNow);
}
caster.SendPacket(new DisplayGameError(GameError.ClientLockedOut));
return false;
}
+7 -5
View File
@@ -539,13 +539,15 @@ namespace Game
switch (packet.ItemType)
{
case ItemVendorType.Item:
Item bagItem = GetPlayer().GetItemByGuid(packet.ContainerGUID);
byte bag = ItemConst.NullBag;
if (bagItem != null && bagItem.IsBag())
bag = bagItem.GetSlot();
else if (packet.ContainerGUID == GetPlayer().GetGUID()) // The client sends the player guid when trying to store an item in the default backpack
if (packet.ContainerGUID == GetPlayer().GetGUID()) // The client sends the player guid when trying to store an item in the default backpack
bag = InventorySlots.Bag0;
else
{
Item bagItem = _player.GetItemByGuid(packet.ContainerGUID);
if (bagItem != null)
bag = bagItem.GetSlot();
}
GetPlayer().BuyItemFromVendorSlot(packet.VendorGUID, packet.Muid, packet.Item.ItemID, (byte)packet.Quantity, bag, (byte)packet.Slot);
break;