/played command should work once again.

This commit is contained in:
tomrus88 2009-07-22 01:24:22 +04:00
parent 09907c8e61
commit a26e90019b
2 changed files with 77 additions and 77 deletions

View file

@ -71,7 +71,7 @@ void WorldSession::HandleSwapInvItemOpcode( WorldPacket & recv_data )
recv_data >> dstslot >> srcslot; recv_data >> dstslot >> srcslot;
//sLog.outDebug("STORAGE: receive srcslot = %u, dstslot = %u", srcslot, dstslot); //sLog.outDebug("STORAGE: receive srcslot = %u, dstslot = %u", srcslot, dstslot);
// prevent attempt swap same item to current position generated by client at special checting sequence // prevent attempt swap same item to current position generated by client at special cheating sequence
if(srcslot == dstslot) if(srcslot == dstslot)
return; return;
@ -126,7 +126,7 @@ void WorldSession::HandleSwapItem( WorldPacket & recv_data )
uint16 src = ( (srcbag << 8) | srcslot ); uint16 src = ( (srcbag << 8) | srcslot );
uint16 dst = ( (dstbag << 8) | dstslot ); uint16 dst = ( (dstbag << 8) | dstslot );
// prevent attempt swap same item to current position generated by client at special checting sequence // prevent attempt swap same item to current position generated by client at special cheating sequence
if(src == dst) if(src == dst)
return; return;
@ -561,7 +561,7 @@ void WorldSession::HandleSellItemOpcode( WorldPacket & recv_data )
} }
else else
{ {
// prevent sell more items that exist in stack (possable only not from client) // prevent sell more items that exist in stack (possible only not from client)
if(count > pItem->GetCount()) if(count > pItem->GetCount())
{ {
_player->SendSellError( SELL_ERR_CANT_SELL_ITEM, pCreature, itemguid, 0); _player->SendSellError( SELL_ERR_CANT_SELL_ITEM, pCreature, itemguid, 0);
@ -842,7 +842,7 @@ void WorldSession::HandleAutoStoreBagItemOpcode( WorldPacket & recv_data )
// no-op: placed in same slot // no-op: placed in same slot
if(dest.size() == 1 && dest[0].pos == src) if(dest.size() == 1 && dest[0].pos == src)
{ {
// just remove grey item state // just remove gray item state
_player->SendEquipError( EQUIP_ERR_NONE, pItem, NULL ); _player->SendEquipError( EQUIP_ERR_NONE, pItem, NULL );
return; return;
} }
@ -982,10 +982,10 @@ void WorldSession::HandleSetAmmoOpcode(WorldPacket & recv_data)
void WorldSession::SendEnchantmentLog(uint64 Target, uint64 Caster,uint32 ItemID,uint32 SpellID) void WorldSession::SendEnchantmentLog(uint64 Target, uint64 Caster,uint32 ItemID,uint32 SpellID)
{ {
WorldPacket data(SMSG_ENCHANTMENTLOG, (8+8+4+4+1)); // last check 2.0.10 WorldPacket data(SMSG_ENCHANTMENTLOG, (8+8+4+4+1)); // last check 2.0.10
data << Target; data << uint64(Target);
data << Caster; data << uint64(Caster);
data << ItemID; data << uint32(ItemID);
data << SpellID; data << uint32(SpellID);
data << uint8(0); data << uint8(0);
SendPacket(&data); SendPacket(&data);
} }
@ -1077,7 +1077,7 @@ void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data)
return; return;
} }
if(item==gift) // not possable with pacjket from real client if(item == gift) // not possible with packet from real client
{ {
_player->SendEquipError( EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED, item, NULL ); _player->SendEquipError( EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED, item, NULL );
return; return;
@ -1201,7 +1201,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
if(!itemTarget->GetEnchantmentId(PRISMATIC_ENCHANTMENT_SLOT)) if(!itemTarget->GetEnchantmentId(PRISMATIC_ENCHANTMENT_SLOT))
return; return;
// not first not-colored (not normaly used) socket // not first not-colored (not normally used) socket
if(i != 0 && !itemProto->Socket[i - 1].Color && (i + 1 >= MAX_GEM_SOCKETS || itemProto->Socket[i + 1].Color)) if(i != 0 && !itemProto->Socket[i - 1].Color && (i + 1 >= MAX_GEM_SOCKETS || itemProto->Socket[i + 1].Color))
return; return;

View file

@ -1164,7 +1164,7 @@ void WorldSession::HandlePlayedTime(WorldPacket& /*recv_data*/)
WorldPacket data(SMSG_PLAYED_TIME, 4 + 4 + 1); WorldPacket data(SMSG_PLAYED_TIME, 4 + 4 + 1);
data << uint32(_player->GetTotalPlayedTime()); data << uint32(_player->GetTotalPlayedTime());
data << uint32(_player->GetLevelPlayedTime()); data << uint32(_player->GetLevelPlayedTime());
data << uint8(0); data << uint8(1); // 0 - will not show in chat frame
SendPacket(&data); SendPacket(&data);
} }