Fixed bank bag slot amount achievement statistic. Cleanup related code.

This commit is contained in:
VladimirMangos 2009-05-23 18:38:04 +04:00
parent d3d07c5657
commit 3d1b055e9e
4 changed files with 15 additions and 22 deletions

View file

@ -842,7 +842,7 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
return;
}
uint32 slot = _player->GetByteValue(PLAYER_BYTES_2, 2);
uint32 slot = _player->GetBankBagSlotCount();
// next slot
++slot;
@ -860,7 +860,7 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
return;
_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BUY_BANK_SLOT, slot);
_player->SetByteValue(PLAYER_BYTES_2, 2, slot);
_player->SetBankBagSlotCount(slot);
_player->ModifyMoney(-int32(price));
}