Misc fixes
This commit is contained in:
@@ -1972,10 +1972,7 @@ namespace Game.Chat
|
|||||||
|
|
||||||
Player caster = handler.GetSession().GetPlayer();
|
Player caster = handler.GetSession().GetPlayer();
|
||||||
if (caster != null)
|
if (caster != null)
|
||||||
{
|
caster.SendPacket(new DisplayGameError(GameError.ClientLockedOut));
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -539,13 +539,15 @@ namespace Game
|
|||||||
switch (packet.ItemType)
|
switch (packet.ItemType)
|
||||||
{
|
{
|
||||||
case ItemVendorType.Item:
|
case ItemVendorType.Item:
|
||||||
Item bagItem = GetPlayer().GetItemByGuid(packet.ContainerGUID);
|
|
||||||
|
|
||||||
byte bag = ItemConst.NullBag;
|
byte bag = ItemConst.NullBag;
|
||||||
if (bagItem != null && bagItem.IsBag())
|
if (packet.ContainerGUID == GetPlayer().GetGUID()) // The client sends the player guid when trying to store an item in the default backpack
|
||||||
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
|
|
||||||
bag = InventorySlots.Bag0;
|
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);
|
GetPlayer().BuyItemFromVendorSlot(packet.VendorGUID, packet.Muid, packet.Item.ItemID, (byte)packet.Quantity, bag, (byte)packet.Slot);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -235,23 +235,6 @@ namespace Scripts.Events.Brewfest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Script] // 43714 - Brewfest - Relay Race - Intro - Force - Player to throw- Dnd
|
|
||||||
class spell_brewfest_relay_race_intro_force_player_to_throw : SpellScript
|
|
||||||
{
|
|
||||||
void HandleForceCast(uint effIndex)
|
|
||||||
{
|
|
||||||
PreventHitDefaultEffect(effIndex);
|
|
||||||
// All this spells trigger a spell that requires reagents; if the
|
|
||||||
// triggered spell is cast as "triggered", reagents are not consumed
|
|
||||||
GetHitUnit().CastSpell(null, GetEffectInfo().TriggerSpell, TriggerCastFlags.FullMask & ~TriggerCastFlags.IgnoreReagentCost);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Register()
|
|
||||||
{
|
|
||||||
OnEffectHitTarget.Add(new(HandleForceCast, 0, SpellEffectName.ForceCast));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Script] // 43755 - Brewfest - Daily - Relay Race - Player - Increase Mount Duration - Dnd
|
[Script] // 43755 - Brewfest - Daily - Relay Race - Player - Increase Mount Duration - Dnd
|
||||||
class spell_brewfest_relay_race_turn_in : SpellScript
|
class spell_brewfest_relay_race_turn_in : SpellScript
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user