Misc fixes

This commit is contained in:
Hondacrx
2025-06-08 18:32:12 -04:00
parent c2877fe813
commit e88513b855
4 changed files with 11 additions and 6 deletions
+4 -4
View File
@@ -3147,7 +3147,7 @@ namespace Game.Entities
return true; return true;
} }
public bool BuyItemFromVendorSlot(ObjectGuid vendorguid, uint vendorslot, uint item, byte count, byte bag, byte slot) public bool BuyItemFromVendorSlot(ObjectGuid vendorguid, uint vendorslot, uint item, uint count, byte bag, byte slot)
{ {
// cheating attempt // cheating attempt
if (count < 1) if (count < 1)
@@ -3319,7 +3319,7 @@ namespace Game.Entities
if (count > maxCount) if (count > maxCount)
{ {
Log.outError(LogFilter.Player, "Player {0} tried to buy {1} item id {2}, causing overflow", GetName(), count, pProto.GetId()); Log.outError(LogFilter.Player, "Player {0} tried to buy {1} item id {2}, causing overflow", GetName(), count, pProto.GetId());
count = (byte)maxCount; count = (uint)maxCount;
} }
price = (ulong)(buyPricePerItem * count); //it should not exceed MAX_MONEY_AMOUNT price = (ulong)(buyPricePerItem * count); //it should not exceed MAX_MONEY_AMOUNT
@@ -3340,7 +3340,7 @@ namespace Game.Entities
if ((bag == ItemConst.NullBag && slot == ItemConst.NullSlot) || IsInventoryPos(bag, slot)) if ((bag == ItemConst.NullBag && slot == ItemConst.NullSlot) || IsInventoryPos(bag, slot))
{ {
if (!_StoreOrEquipNewItem(vendorslot, item, count, bag, slot, (int)price, pProto, creature, crItem, true)) if (!_StoreOrEquipNewItem(vendorslot, item, (byte)count, bag, slot, (int)price, pProto, creature, crItem, true))
return false; return false;
} }
else if (IsEquipmentPos(bag, slot)) else if (IsEquipmentPos(bag, slot))
@@ -3350,7 +3350,7 @@ namespace Game.Entities
SendEquipError(InventoryResult.NotEquippable); SendEquipError(InventoryResult.NotEquippable);
return false; return false;
} }
if (!_StoreOrEquipNewItem(vendorslot, item, count, bag, slot, (int)price, pProto, creature, crItem, false)) if (!_StoreOrEquipNewItem(vendorslot, item, (byte)count, bag, slot, (int)price, pProto, creature, crItem, false))
return false; return false;
} }
else else
+2
View File
@@ -1488,6 +1488,7 @@ namespace Game.Entities
case ShapeShiftForm.AquaticForm: case ShapeShiftForm.AquaticForm:
useRandom = HasAura(344338); useRandom = HasAura(344338);
break; // Glyph of the Aquatic Chameleon break; // Glyph of the Aquatic Chameleon
case ShapeShiftForm.DireBearForm:
case ShapeShiftForm.BearForm: case ShapeShiftForm.BearForm:
useRandom = HasAura(107059); useRandom = HasAura(107059);
break; // Glyph of the Ursol Chameleon break; // Glyph of the Ursol Chameleon
@@ -1778,6 +1779,7 @@ namespace Game.Entities
displayPower = PowerType.Energy; displayPower = PowerType.Energy;
break; break;
case ShapeShiftForm.BearForm: case ShapeShiftForm.BearForm:
case ShapeShiftForm.DireBearForm:
displayPower = PowerType.Rage; displayPower = PowerType.Rage;
break; break;
case ShapeShiftForm.TravelForm: case ShapeShiftForm.TravelForm:
+2 -2
View File
@@ -999,13 +999,13 @@ namespace Game
SendPacket(auctionHelloResponse); SendPacket(auctionHelloResponse);
} }
public void SendAuctionCommandResult(uint auctionId, AuctionCommand command, AuctionResult errorCode, TimeSpan delayForNextAction, InventoryResult bagError = 0) public void SendAuctionCommandResult(uint auctionId, AuctionCommand command, AuctionResult errorCode, TimeSpan delayForNextAction, InventoryResult bagResult = 0)
{ {
AuctionCommandResult auctionCommandResult = new(); AuctionCommandResult auctionCommandResult = new();
auctionCommandResult.AuctionID = auctionId; auctionCommandResult.AuctionID = auctionId;
auctionCommandResult.Command = (int)command; auctionCommandResult.Command = (int)command;
auctionCommandResult.ErrorCode = (int)errorCode; auctionCommandResult.ErrorCode = (int)errorCode;
auctionCommandResult.BagResult = (int)bagError; auctionCommandResult.BagResult = (int)bagResult;
auctionCommandResult.DesiredDelay = (uint)delayForNextAction.TotalSeconds; auctionCommandResult.DesiredDelay = (uint)delayForNextAction.TotalSeconds;
SendPacket(auctionCommandResult); SendPacket(auctionCommandResult);
} }
+3
View File
@@ -788,6 +788,7 @@ namespace Game.Spells
spellId = 5421; spellId = 5421;
break; break;
case ShapeShiftForm.BearForm: case ShapeShiftForm.BearForm:
case ShapeShiftForm.DireBearForm:
spellId = 1178; spellId = 1178;
spellId2 = 21178; spellId2 = 21178;
spellId3 = 106829; spellId3 = 106829;
@@ -1333,6 +1334,7 @@ namespace Game.Spells
case ShapeShiftForm.TravelForm: case ShapeShiftForm.TravelForm:
case ShapeShiftForm.AquaticForm: case ShapeShiftForm.AquaticForm:
case ShapeShiftForm.BearForm: case ShapeShiftForm.BearForm:
case ShapeShiftForm.DireBearForm:
case ShapeShiftForm.FlightFormEpic: case ShapeShiftForm.FlightFormEpic:
case ShapeShiftForm.FlightForm: case ShapeShiftForm.FlightForm:
case ShapeShiftForm.MoonkinForm: case ShapeShiftForm.MoonkinForm:
@@ -1393,6 +1395,7 @@ namespace Game.Spells
{ {
// Nordrassil Harness - bonus // Nordrassil Harness - bonus
case ShapeShiftForm.BearForm: case ShapeShiftForm.BearForm:
case ShapeShiftForm.DireBearForm:
case ShapeShiftForm.CatForm: case ShapeShiftForm.CatForm:
AuraEffect dummy = target.GetAuraEffect(37315, 0); AuraEffect dummy = target.GetAuraEffect(37315, 0);
if (dummy != null) if (dummy != null)