diff options
| author | Chazy Chaz <ChazyTheBest@hotmail.es> | 2017-04-18 13:06:09 +0200 |
|---|---|---|
| committer | Aokromes <Aokromes@users.noreply.github.com> | 2017-04-18 13:06:09 +0200 |
| commit | fbbe247114d092be1d20768419608bfa9cc57608 (patch) | |
| tree | 105acf87cb2c1a9cb521590cb19d32c77380c7e9 /src/server/game/Handlers/NPCHandler.cpp | |
| parent | db0da2cf5c18522a8f165991b2025f6c4943b77b (diff) | |
Core/Misc: Sync database schema with master
Diffstat (limited to 'src/server/game/Handlers/NPCHandler.cpp')
| -rw-r--r-- | src/server/game/Handlers/NPCHandler.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp index 34b4acd5c0b..53f855c7872 100644 --- a/src/server/game/Handlers/NPCHandler.cpp +++ b/src/server/game/Handlers/NPCHandler.cpp @@ -164,14 +164,14 @@ void WorldSession::SendTrainerList(ObjectGuid guid, const std::string& strTitle) bool primary_prof_first_rank = false; for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) { - if (!tSpell->learnedSpell[i]) + if (!tSpell->ReqAbility[i]) continue; - if (!_player->IsSpellFitByClassAndRace(tSpell->learnedSpell[i])) + if (!_player->IsSpellFitByClassAndRace(tSpell->ReqAbility[i])) { valid = false; break; } - SpellInfo const* learnedSpellInfo = sSpellMgr->GetSpellInfo(tSpell->learnedSpell[i]); + SpellInfo const* learnedSpellInfo = sSpellMgr->GetSpellInfo(tSpell->ReqAbility[i]); if (learnedSpellInfo && learnedSpellInfo->IsPrimaryProfessionFirstRank()) primary_prof_first_rank = true; } @@ -180,30 +180,30 @@ void WorldSession::SendTrainerList(ObjectGuid guid, const std::string& strTitle) TrainerSpellState state = _player->GetTrainerSpellState(tSpell); - data << uint32(tSpell->spell); // learned spell (or cast-spell in profession case) + data << uint32(tSpell->SpellID); // learned spell (or cast-spell in profession case) data << uint8(state == TRAINER_SPELL_GREEN_DISABLED ? TRAINER_SPELL_GREEN : state); - data << uint32(floor(tSpell->spellCost * fDiscountMod)); + data << uint32(floor(tSpell->MoneyCost * fDiscountMod)); data << uint32(primary_prof_first_rank && can_learn_primary_prof ? 1 : 0); // primary prof. learn confirmation dialog data << uint32(primary_prof_first_rank ? 1 : 0); // must be equal prev. field to have learn button in enabled state - data << uint8(tSpell->reqLevel); - data << uint32(tSpell->reqSkill); - data << uint32(tSpell->reqSkillValue); + data << uint8(tSpell->ReqLevel); + data << uint32(tSpell->ReqSkillLine); + data << uint32(tSpell->ReqSkillRank); //prev + req or req + 0 uint8 maxReq = 0; for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) { - if (!tSpell->learnedSpell[i]) + if (!tSpell->ReqAbility[i]) continue; - if (uint32 prevSpellId = sSpellMgr->GetPrevSpellInChain(tSpell->learnedSpell[i])) + if (uint32 prevSpellId = sSpellMgr->GetPrevSpellInChain(tSpell->ReqAbility[i])) { data << uint32(prevSpellId); ++maxReq; } if (maxReq == 3) break; - SpellsRequiringSpellMapBounds spellsRequired = sSpellMgr->GetSpellsRequiredForSpellBounds(tSpell->learnedSpell[i]); + SpellsRequiringSpellMapBounds spellsRequired = sSpellMgr->GetSpellsRequiredForSpellBounds(tSpell->ReqAbility[i]); for (SpellsRequiringSpellMap::const_iterator itr2 = spellsRequired.first; itr2 != spellsRequired.second && maxReq < 3; ++itr2) { data << uint32(itr2->second); @@ -273,7 +273,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData) return; // apply reputation discount - uint32 nSpellCost = uint32(floor(trainer_spell->spellCost * _player->GetReputationPriceDiscount(trainer))); + uint32 nSpellCost = uint32(floor(trainer_spell->MoneyCost * _player->GetReputationPriceDiscount(trainer))); // check money requirement if (!_player->HasEnoughMoney(nSpellCost)) @@ -286,7 +286,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData) // learn explicitly or cast explicitly if (trainer_spell->IsCastable()) - _player->CastSpell(_player, trainer_spell->spell, true); + _player->CastSpell(_player, trainer_spell->SpellID, true); else _player->LearnSpell(spellId, false); |
