Fixed bank bag slot amount achievement statistic. Cleanup related code. Author: VladimirMangos

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-24 11:17:03 -05:00
parent 35f08f9e21
commit 2fadf3dd77
4 changed files with 15 additions and 22 deletions

View File

@@ -844,7 +844,7 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
return;
}
uint32 slot = _player->GetByteValue(PLAYER_BYTES_2, 2);
uint32 slot = _player->GetBankBagSlotCount();
// next slot
++slot;
@@ -862,7 +862,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));
}