mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/Movement: Fix a crash when a player logout in a hostile area. The honorless spell should and is already casted after recieving CMSG_MOVE_SPLINE_DONE.
Closes #5245 - Also corrected an error message in auctionhousemgr.
This commit is contained in:
@@ -648,37 +648,37 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
|
||||
}
|
||||
|
||||
//this function inserts to WorldPacket auction's data
|
||||
bool AuctionEntry::BuildAuctionInfo(WorldPacket & data) const
|
||||
bool AuctionEntry::BuildAuctionInfo(WorldPacket& data) const
|
||||
{
|
||||
Item* pItem = sAuctionMgr->GetAItem(item_guidlow);
|
||||
if (!pItem)
|
||||
Item* item = sAuctionMgr->GetAItem(item_guidlow);
|
||||
if (!item)
|
||||
{
|
||||
sLog->outError("auction to item, that doesn't exist !!!!");
|
||||
sLog->outError("AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %u", Id, item_guidlow);
|
||||
return false;
|
||||
}
|
||||
data << uint32(Id);
|
||||
data << uint32(pItem->GetEntry());
|
||||
data << uint32(item->GetEntry());
|
||||
|
||||
for (uint8 i = 0; i < MAX_INSPECTED_ENCHANTMENT_SLOT; ++i)
|
||||
{
|
||||
data << uint32(pItem->GetEnchantmentId(EnchantmentSlot(i)));
|
||||
data << uint32(pItem->GetEnchantmentDuration(EnchantmentSlot(i)));
|
||||
data << uint32(pItem->GetEnchantmentCharges(EnchantmentSlot(i)));
|
||||
data << uint32(item->GetEnchantmentId(EnchantmentSlot(i)));
|
||||
data << uint32(item->GetEnchantmentDuration(EnchantmentSlot(i)));
|
||||
data << uint32(item->GetEnchantmentCharges(EnchantmentSlot(i)));
|
||||
}
|
||||
|
||||
data << int32(pItem->GetItemRandomPropertyId()); //random item property id
|
||||
data << uint32(pItem->GetItemSuffixFactor()); //SuffixFactor
|
||||
data << uint32(pItem->GetCount()); //item->count
|
||||
data << uint32(pItem->GetSpellCharges()); //item->charge FFFFFFF
|
||||
data << uint32(0); //Unknown
|
||||
data << uint64(owner); //Auction->owner
|
||||
data << uint32(startbid); //Auction->startbid (not sure if useful)
|
||||
data << int32(item->GetItemRandomPropertyId()); // Random item property id
|
||||
data << uint32(item->GetItemSuffixFactor()); // SuffixFactor
|
||||
data << uint32(item->GetCount()); // item->count
|
||||
data << uint32(item->GetSpellCharges()); // item->charge FFFFFFF
|
||||
data << uint32(0); // Unknown
|
||||
data << uint64(owner); // Auction->owner
|
||||
data << uint32(startbid); // Auction->startbid (not sure if useful)
|
||||
data << uint32(bid ? GetAuctionOutBid() : 0);
|
||||
//minimal outbid
|
||||
data << uint32(buyout); //auction->buyout
|
||||
data << uint32((expire_time-time(NULL))*IN_MILLISECONDS);//time left
|
||||
data << uint64(bidder); //auction->bidder current
|
||||
data << uint32(bid); //current bid
|
||||
// Minimal outbid
|
||||
data << uint32(buyout); // Auction->buyout
|
||||
data << uint32((expire_time - time(NULL)) * IN_MILLISECONDS); // time left
|
||||
data << uint64(bidder); // auction->bidder current
|
||||
data << uint32(bid); // current bid
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -201,20 +201,17 @@ void FlightPathMovementGenerator::Initialize(Player &player)
|
||||
InitEndGridInfo();
|
||||
}
|
||||
|
||||
void FlightPathMovementGenerator::Finalize(Player & player)
|
||||
void FlightPathMovementGenerator::Finalize(Player& player)
|
||||
{
|
||||
// remove flag to prevent send object build movement packets for flight state and crash (movement generator already not at top of stack)
|
||||
player.ClearUnitState(UNIT_STATE_IN_FLIGHT);
|
||||
|
||||
player.Dismount();
|
||||
player.RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
|
||||
player.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
|
||||
|
||||
if(player.m_taxi.empty())
|
||||
if (player.m_taxi.empty())
|
||||
{
|
||||
player.getHostileRefManager().setOnlineOfflineState(true);
|
||||
if(player.pvpInfo.inHostileArea)
|
||||
player.CastSpell(&player, 2479, true);
|
||||
|
||||
// update z position to ground and orientation for landing point
|
||||
// this prevent cheating with landing point at lags
|
||||
// when client side flight end early in comparison server side
|
||||
|
||||
Reference in New Issue
Block a user