diff options
author | Shauren <shauren.trinity@gmail.com> | 2012-01-30 17:52:22 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2012-01-30 17:52:22 +0100 |
commit | a6b9350396acf97528d161e1e90036c02775dc21 (patch) | |
tree | 43fd2bded31dc4d806f896e6e5e75fe9c793c0ff /src | |
parent | e865cffc33404f43f9e5c5a0d7bccbb0fcafb365 (diff) |
Core/Protocol: Updated SMSG_TRAINER_LIST structure (fields still need filling)
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Entities/Player/Player.h | 6 | ||||
-rwxr-xr-x | src/server/game/Server/Protocol/Handlers/MiscHandler.cpp | 4 | ||||
-rwxr-xr-x | src/server/game/Server/Protocol/Handlers/NPCHandler.cpp | 14 |
3 files changed, 13 insertions, 11 deletions
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 9ac5f221b48..21027402e84 100755 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -157,9 +157,9 @@ typedef UNORDERED_MAP<uint32 /*instanceId*/, time_t/*releaseTime*/> InstanceTime enum TrainerSpellState { - TRAINER_SPELL_GREEN = 0, - TRAINER_SPELL_RED = 1, - TRAINER_SPELL_GRAY = 2, + TRAINER_SPELL_GRAY = 0, + TRAINER_SPELL_GREEN = 1, + TRAINER_SPELL_RED = 2, TRAINER_SPELL_GREEN_DISABLED = 10 // custom value, not send to client: formally green but learn not allowed }; diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp index 5dff3ba8e36..843aa8fd6c0 100755 --- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp @@ -1079,9 +1079,9 @@ void WorldSession::HandleNextCinematicCamera(WorldPacket & /*recv_data*/) void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket & recv_data) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_MOVE_TIME_SKIPPED"); - + BitStream mask = recv_data.ReadBitStream(8); - + uint32 time; recv_data >> time; diff --git a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp index 6145ef1438d..c1b59b41ebb 100755 --- a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp @@ -154,6 +154,7 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle) WorldPacket data(SMSG_TRAINER_LIST, 8+4+4+trainer_spells->spellList.size()*38 + strTitle.size()+1); data << guid; data << uint32(trainer_spells->trainerType); + data << uint32(0); size_t count_pos = data.wpos(); data << uint32(trainer_spells->spellList.size()); @@ -191,9 +192,6 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle) data << uint8(state == TRAINER_SPELL_GREEN_DISABLED ? TRAINER_SPELL_GREEN : state); data << uint32(floor(tSpell->spellCost * 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); @@ -208,7 +206,7 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle) data << uint32(prevSpellId); ++maxReq; } - if (maxReq == 3) + if (maxReq == 2) break; SpellsRequiringSpellMapBounds spellsRequired = sSpellMgr->GetSpellsRequiredForSpellBounds(tSpell->learnedSpell[i]); for (SpellsRequiringSpellMap::const_iterator itr2 = spellsRequired.first; itr2 != spellsRequired.second && maxReq < 3; ++itr2) @@ -216,15 +214,19 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle) data << uint32(itr2->second); ++maxReq; } - if (maxReq == 3) + if (maxReq == 2) break; } - while (maxReq < 3) + while (maxReq < 2) { data << uint32(0); ++maxReq; } + 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 + ++count; } |