Core/Items: Attempt to fix crash in Player::SplitItem caused by 6a44399852.
And some random cleanup
This commit is contained in:
@@ -12884,6 +12884,10 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count)
|
|||||||
AutoUnequipOffhandIfNeed();
|
AutoUnequipOffhandIfNeed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Make sure that code below only is executed when trading
|
||||||
|
if (!GetTradeData())
|
||||||
|
return;
|
||||||
|
|
||||||
//! Update item count in trade window, prevent spoofing
|
//! Update item count in trade window, prevent spoofing
|
||||||
//! Since pSrcItem has its count updated (see above), Item::GetCount() will return the new count
|
//! Since pSrcItem has its count updated (see above), Item::GetCount() will return the new count
|
||||||
//! in the underlying packet builder function
|
//! in the underlying packet builder function
|
||||||
|
|||||||
@@ -2114,12 +2114,12 @@ void Unit::SendMeleeAttackStart(Unit* victim)
|
|||||||
|
|
||||||
void Unit::SendMeleeAttackStop(Unit* victim)
|
void Unit::SendMeleeAttackStop(Unit* victim)
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_ATTACKSTOP, (8+8+4)); // we guess size
|
WorldPacket data(SMSG_ATTACKSTOP, (8+8+4));
|
||||||
data.append(GetPackGUID());
|
data.append(GetPackGUID());
|
||||||
data.append(victim ? victim->GetPackGUID() : 0); // can be 0x00...
|
data.append(victim ? victim->GetPackGUID() : 0); // can be 0x00...
|
||||||
data << uint32(0); // can be 0x1
|
data << uint32(0); // can be 0x1
|
||||||
SendMessageToSet(&data, true);
|
SendMessageToSet(&data, true);
|
||||||
sLog->outStaticDebug("WORLD: Sent SMSG_ATTACKSTART");
|
sLog->outStaticDebug("WORLD: Sent SMSG_ATTACKSTOP");
|
||||||
|
|
||||||
if (victim)
|
if (victim)
|
||||||
sLog->outDetail("%s %u stopped attacking %s %u", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow(), (victim->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), victim->GetGUIDLow());
|
sLog->outDetail("%s %u stopped attacking %s %u", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow(), (victim->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), victim->GetGUIDLow());
|
||||||
|
|||||||
Reference in New Issue
Block a user