Fix some forgotten stuff, thanks Zaka

Signed-off-by: Netcho <kkotlarski@abv.bg>
This commit is contained in:
Netcho 2012-08-24 15:02:31 +03:00 committed by Antz
parent 88056fee46
commit cd42cc972d

View file

@ -291,7 +291,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recv_data)
uint32 nSpellCost = uint32(floor(trainer_spell->spellCost * _player->GetReputationPriceDiscount(unit)));
// check money requirement
if ((_player->GetMoney() < nSpellCost) && !trainState)
if ((_player->GetMoney() < nSpellCost) && trainState > 1)
trainState = 0;
if(trainState != 2)
@ -323,7 +323,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recv_data)
sendData << ObjectGuid(guid);
sendData << uint32(spellId); // should be same as in packet from client
sendData << uint32(2);
sendData << uint32(trainState);
SendPacket(&sendData);
}
}