diff --git a/sql/330/01_quest_template.sql b/sql/330/01_quest_template.sql deleted file mode 100644 index ccf7e98b6..000000000 --- a/sql/330/01_quest_template.sql +++ /dev/null @@ -1,5 +0,0 @@ -alter table `quest_template` - add column `ReqItemId5` mediumint(8) UNSIGNED DEFAULT '0' NOT NULL after `ReqItemId4`, - add column `ReqItemId6` mediumint(8) UNSIGNED DEFAULT '0' NOT NULL after `ReqItemId5`, - add column `ReqItemCount5` smallint(5) UNSIGNED DEFAULT '0' NOT NULL after `ReqItemCount4`, - add column `ReqItemCount6` smallint(5) UNSIGNED DEFAULT '0' NOT NULL after `ReqItemCount5`; diff --git a/src/game/GossipDef.cpp b/src/game/GossipDef.cpp index 04d753d81..d1cd1452b 100644 --- a/src/game/GossipDef.cpp +++ b/src/game/GossipDef.cpp @@ -574,7 +574,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest ) data << uint32(0); // RequiredOpositeRepValue, required faction value with another (oposite) faction (objective) data << uint32(pQuest->GetNextQuestInChain()); // client will request this quest from NPC, if not 0 - data << uint32(0); // unk 3.3.0 + data << uint32(0); // column index in QuestXP.dbc (row based on quest level) if (pQuest->HasFlag(QUEST_FLAGS_HIDDEN_REWARDS)) data << uint32(0); // Hide money rewarded @@ -622,7 +622,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest ) for(iI = 0; iI < QUEST_REPUTATIONS_COUNT; ++iI) // reward factions ids data << uint32(0); - for(iI = 0; iI < QUEST_REPUTATIONS_COUNT; ++iI) // columnid in QuestFactionReward.dbc (zero based)? + for(iI = 0; iI < QUEST_REPUTATIONS_COUNT; ++iI) // column index in QuestFactionReward.dbc? data << uint32(0); for(iI = 0; iI < QUEST_REPUTATIONS_COUNT; ++iI) // reward reputation override? diff --git a/src/game/Group.cpp b/src/game/Group.cpp index bf4d5d360..44095c528 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -479,7 +479,7 @@ void Group::Disband(bool hideDestroy) void Group::SendLootStartRoll(uint32 CountDown, const Roll &r) { - WorldPacket data(SMSG_LOOT_START_ROLL, (8+4+4+4+4+4+4)); + WorldPacket data(SMSG_LOOT_START_ROLL, (8+4+4+4+4+4+4+1)); data << uint64(r.itemGUID); // guid of rolled item data << uint32(r.totalPlayersRolling); // maybe the number of players rolling for it??? data << uint32(r.itemid); // the itemEntryId for the item that shall be rolled for @@ -487,6 +487,7 @@ void Group::SendLootStartRoll(uint32 CountDown, const Roll &r) data << uint32(r.itemRandomPropId); // item random property ID data << uint32(r.itemCount); // items in stack data << uint32(CountDown); // the countdown time to choose "need" or "greed" + data << uint8(ALL_ROLL_TYPE_MASK); // roll type mask for (Roll::PlayerVote::const_iterator itr = r.playerVote.begin(); itr != r.playerVote.end(); ++itr) { @@ -750,8 +751,15 @@ void Group::CountRollVote(const uint64& playerGUID, const uint64& Guid, uint32 N itr->second = GREED; } break; + case ROLL_DISENCHANT: // player choose Disenchant + { + SendLootRoll(0, playerGUID, 128, ROLL_DISENCHANT, *roll); + ++roll->totalDisenchant; + itr->second = DISENCHANT; + } + break; } - if (roll->totalPass + roll->totalGreed + roll->totalNeed >= roll->totalPlayersRolling) + if (roll->totalPass + roll->totalNeed + roll->totalGreed + roll->totalDisenchant >= roll->totalPlayersRolling) { CountTheRoll(rollI, NumberOfPlayers); } @@ -872,6 +880,39 @@ void Group::CountTheRoll(Rolls::iterator rollI, uint32 NumberOfPlayers) } } } + else if(roll->totalDisenchant > 0) + { + uint8 maxresul = 0; + uint64 maxguid = (*roll->playerVote.begin()).first; + Player *player; + + for( Roll::PlayerVote::const_iterator itr = roll->playerVote.begin(); itr != roll->playerVote.end(); ++itr) + { + if (itr->second != DISENCHANT) + continue; + + uint8 randomN = urand(1, 99); + SendLootRoll(0, itr->first, randomN, ROLL_DISENCHANT, *roll); + if (maxresul < randomN) + { + maxguid = itr->first; + maxresul = randomN; + } + } + SendLootRollWon(0, maxguid, maxresul, ROLL_DISENCHANT, *roll); + player = objmgr.GetPlayer(maxguid); + + if(player && player->GetSession()) + { + LootItem *item = &(roll->getLoot()->items[roll->itemSlot]); + item->is_looted = true; + roll->getLoot()->NotifyItemRemoved(roll->itemSlot); + --roll->getLoot()->unlootedCount; + + ItemPrototype const *pProto = objmgr.GetItemPrototype(roll->itemid); + player->AutoStoreLoot(pProto->DisenchantID, LootTemplates_Disenchant, true); + } + } else { SendLootAllPassed(NumberOfPlayers, *roll); @@ -976,6 +1017,7 @@ void Group::SendUpdate() data << (uint8)(onlineState); data << (uint8)(citr2->group); // groupid data << (uint8)(citr2->assistant?0x01:0); // 0x2 main assist, 0x4 main tank + data << uint8(0); // 3.3 } data << uint64(m_leaderGuid); // leader guid @@ -986,6 +1028,7 @@ void Group::SendUpdate() data << (uint8)m_lootThreshold; // loot threshold data << (uint8)m_dungeonDifficulty; // Dungeon Difficulty data << (uint8)m_raidDifficulty; // Raid Difficulty + data << uint8(0); // 3.3 } player->GetSession()->SendPacket( &data ); } @@ -1236,6 +1279,8 @@ void Group::_removeRolls(const uint64 &guid) --roll->totalNeed; if (itr2->second == PASS) --roll->totalPass; + if (itr2->second == DISENCHANT) + --roll->totalDisenchant; if (itr2->second != NOT_VALID) --roll->totalPlayersRolling; diff --git a/src/game/Group.h b/src/game/Group.h index 04110366b..6b365a0de 100644 --- a/src/game/Group.h +++ b/src/game/Group.h @@ -37,8 +37,9 @@ enum RollVote PASS = 0, NEED = 1, GREED = 2, - NOT_EMITED_YET = 3, - NOT_VALID = 4 + DISENCHANT = 3, + NOT_EMITED_YET = 4, + NOT_VALID = 5 }; enum GroupMemberOnlineStatus @@ -54,10 +55,13 @@ enum GroupMemberOnlineStatus MEMBER_STATUS_UNK5 = 0x0080, // never seen }; -enum GroupType +enum GroupType // group type flags? { GROUPTYPE_NORMAL = 0, - GROUPTYPE_RAID = 1 + GROUPTYPE_BG = 1, + GROUPTYPE_RAID = 2, + GROUPTYPE_BGRAID = 3, + GROUPTYPE_LFD = 4 }; class BattleGround; @@ -100,7 +104,7 @@ class Roll : public LootValidatorRef public: Roll(uint64 _guid, LootItem const& li) : itemGUID(_guid), itemid(li.itemid), itemRandomPropId(li.randomPropertyId), itemRandomSuffix(li.randomSuffix), itemCount(li.count), - totalPlayersRolling(0), totalNeed(0), totalGreed(0), totalPass(0), itemSlot(0) {} + totalPlayersRolling(0), totalNeed(0), totalGreed(0), totalDisenchant(0), totalPass(0), itemSlot(0) {} ~Roll() { } void setLoot(Loot *pLoot) { link(pLoot, this); } Loot *getLoot() { return getTarget(); } @@ -116,6 +120,7 @@ class Roll : public LootValidatorRef uint8 totalPlayersRolling; uint8 totalNeed; uint8 totalGreed; + uint8 totalDisenchant; uint8 totalPass; uint8 itemSlot; }; diff --git a/src/game/GroupHandler.cpp b/src/game/GroupHandler.cpp index 74c9e04be..ddd92b831 100644 --- a/src/game/GroupHandler.cpp +++ b/src/game/GroupHandler.cpp @@ -461,7 +461,7 @@ void WorldSession::HandleRaidTargetUpdateOpcode( WorldPacket & recv_data ) } else // target icon update { - if(!group->IsLeader(GetPlayer()->GetGUID()) && !group->IsAssistant(GetPlayer()->GetGUID())) + if(group->isRaidGroup() && !group->IsLeader(GetPlayer()->GetGUID()) && !group->IsAssistant(GetPlayer()->GetGUID())) return; uint64 guid; diff --git a/src/game/LFGHandler.cpp b/src/game/LFGHandler.cpp index a325afee5..c0753663a 100644 --- a/src/game/LFGHandler.cpp +++ b/src/game/LFGHandler.cpp @@ -427,9 +427,10 @@ void WorldSession::HandleLfgSetRoles(WorldPacket &recv_data) void WorldSession::SendLfgUpdate(uint8 unk1, uint8 unk2, uint8 unk3) { - WorldPacket data(SMSG_LFG_UPDATE, 3); + // disabled + /*WorldPacket data(SMSG_LFG_UPDATE, 3); data << uint8(unk1); data << uint8(unk2); data << uint8(unk3); - SendPacket(&data); + SendPacket(&data);*/ } diff --git a/src/game/LootMgr.h b/src/game/LootMgr.h index 1381c1206..b8ce00e9a 100644 --- a/src/game/LootMgr.h +++ b/src/game/LootMgr.h @@ -31,9 +31,12 @@ enum RollType ROLL_PASS = 0, ROLL_NEED = 1, ROLL_GREED = 2, - MAX_ROLL_TYPE = 3 + ROLL_DISENCHANT = 3, + MAX_ROLL_TYPE = 4 }; +#define ALL_ROLL_TYPE_MASK 0x0F + #define MAX_NR_LOOT_ITEMS 16 // note: the client cannot show more than 16 items total #define MAX_NR_QUEST_ITEMS 32 diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp index 7ee982172..14dc8be38 100644 --- a/src/game/MiscHandler.cpp +++ b/src/game/MiscHandler.cpp @@ -1567,3 +1567,11 @@ void WorldSession::HandleWorldStateUITimerUpdate(WorldPacket& recv_data) data << uint32(time(NULL)); SendPacket(&data); } + +void WorldSession::HandleReadyForAccountDataTimes(WorldPacket& recv_data) +{ + // empty opcode + sLog.outDebug("WORLD: CMSG_READY_FOR_ACCOUNT_DATA_TIMES"); + + SendAccountDataTimes(GLOBAL_CACHE_MASK); +} diff --git a/src/game/Opcodes.cpp b/src/game/Opcodes.cpp index 27f45cbc9..84e037035 100644 --- a/src/game/Opcodes.cpp +++ b/src/game/Opcodes.cpp @@ -509,8 +509,8 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x1E0*/ { "CMSG_SETSHEATHED", STATUS_LOGGEDIN, &WorldSession::HandleSetSheathedOpcode }, /*0x1E1*/ { "SMSG_COOLDOWN_CHEAT", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x1E2*/ { "SMSG_SPELL_DELAYED", STATUS_NEVER, &WorldSession::Handle_ServerSide }, - /*0x1E3*/ { "CMSG_PLAYER_MACRO_OBSOLETE", STATUS_NEVER, &WorldSession::Handle_NULL }, - /*0x1E4*/ { "SMSG_PLAYER_MACRO_OBSOLETE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, + /*0x1E3*/ { "CMSG_QUEST_POI_QUERY", STATUS_NEVER, &WorldSession::Handle_NULL }, + /*0x1E4*/ { "SMSG_QUEST_POI_QUERY_RESPONSE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x1E5*/ { "CMSG_GHOST", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x1E6*/ { "CMSG_GM_INVIS", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x1E7*/ { "SMSG_INVALID_PROMOTION_CODE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, @@ -535,7 +535,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x1FA*/ { "CMSG_GM_NUKE", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x1FB*/ { "MSG_RANDOM_ROLL", STATUS_LOGGEDIN, &WorldSession::HandleRandomRollOpcode }, /*0x1FC*/ { "SMSG_ENVIRONMENTALDAMAGELOG", STATUS_NEVER, &WorldSession::Handle_ServerSide }, - /*0x1FD*/ { "CMSG_RWHOIS_OBSOLETE", STATUS_NEVER, &WorldSession::Handle_NULL }, + /*0x1FD*/ { "CMSG_PLAYER_DIFFICULTY_CHANGE", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x1FE*/ { "SMSG_RWHOIS", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x1FF*/ { "MSG_LOOKING_FOR_GROUP", STATUS_LOGGEDIN, &WorldSession::HandleLookingForGroup }, /*0x200*/ { "CMSG_SET_LOOKING_FOR_GROUP", STATUS_LOGGEDIN, &WorldSession::HandleSetLfgOpcode }, @@ -552,7 +552,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x20B*/ { "CMSG_UPDATE_ACCOUNT_DATA", STATUS_AUTHED, &WorldSession::HandleUpdateAccountData}, /*0x20C*/ { "SMSG_UPDATE_ACCOUNT_DATA", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x20D*/ { "SMSG_CLEAR_FAR_SIGHT_IMMEDIATE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, - /*0x20E*/ { "SMSG_POWERGAINLOG_OBSOLETE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, + /*0x20E*/ { "SMSG_PLAYER_DIFFICULTY_CHANGE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x20F*/ { "CMSG_GM_TEACH", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x210*/ { "CMSG_GM_CREATE_ITEM_TARGET", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x211*/ { "CMSG_GMTICKET_GETTICKET", STATUS_LOGGEDIN, &WorldSession::HandleGMTicketGetTicketOpcode }, @@ -892,7 +892,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x35F*/ { "CMSG_LFM_CLEAR_AUTOFILL", STATUS_LOGGEDIN, &WorldSession::HandleLfmClearAutoFillOpcode }, /*0x360*/ { "CMSG_ACCEPT_LFG_MATCH", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x361*/ { "CMSG_DECLINE_LFG_MATCH", STATUS_NEVER, &WorldSession::Handle_NULL }, - /*0x362*/ { "CMSG_CANCEL_PENDING_LFG", STATUS_NEVER, &WorldSession::Handle_NULL }, + /*0x362*/ { "CMSG_LFG_PROPOSAL_RESULT", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x363*/ { "CMSG_CLEAR_LOOKING_FOR_GROUP", STATUS_LOGGEDIN, &WorldSession::HandleLfgClearOpcode }, /*0x364*/ { "CMSG_CLEAR_LOOKING_FOR_MORE", STATUS_LOGGEDIN, &WorldSession::HandleLfmClearOpcode }, /*0x365*/ { "CMSG_SET_LOOKING_FOR_MORE", STATUS_LOGGEDIN, &WorldSession::HandleSetLfmOpcode }, @@ -900,14 +900,14 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x367*/ { "SMSG_LFG_TIMEDOUT", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x368*/ { "SMSG_LFG_OTHER_TIMEDOUT", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x369*/ { "SMSG_LFG_AUTOJOIN_FAILED", STATUS_NEVER, &WorldSession::Handle_ServerSide }, - /*0x36A*/ { "SMSG_LFG_AUTOJOIN_FAILED_NO_PLAYER", STATUS_NEVER, &WorldSession::Handle_ServerSide }, - /*0x36B*/ { "SMSG_LFG_LEADER_IS_LFM", STATUS_NEVER, &WorldSession::Handle_ServerSide }, - /*0x36C*/ { "SMSG_LFG_UPDATE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, + /*0x36A*/ { "CMSG_LFG_SET_ROLES", STATUS_NEVER, &WorldSession::Handle_NULL }, + /*0x36B*/ { "CMSG_LFG_SET_NEEDS", STATUS_NEVER, &WorldSession::Handle_NULL }, + /*0x36C*/ { "CMSG_LFG_SET_BOOT_VOTE", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x36D*/ { "SMSG_LFG_UPDATE_LFM", STATUS_NEVER, &WorldSession::Handle_ServerSide }, - /*0x36E*/ { "SMSG_LFG_UPDATE_LFG", STATUS_NEVER, &WorldSession::Handle_ServerSide }, - /*0x36F*/ { "SMSG_LFG_UPDATE_QUEUED", STATUS_NEVER, &WorldSession::Handle_ServerSide }, - /*0x370*/ { "SMSG_LFG_PENDING_INVITE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, - /*0x371*/ { "SMSG_LFG_PENDING_MATCH", STATUS_NEVER, &WorldSession::Handle_ServerSide }, + /*0x36E*/ { "CMSG_LFD_PLAYER_LOCK_INFO_REQUEST", STATUS_NEVER, &WorldSession::Handle_NULL }, + /*0x36F*/ { "SMSG_LFG_PLAYER_LOCK_INFO_RESPONSE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, + /*0x370*/ { "CMSG_LFG_TELEPORT", STATUS_NEVER, &WorldSession::Handle_NULL }, + /*0x371*/ { "CMSG_LFD_PARTY_LOCK_INFO_REQUEST", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x372*/ { "SMSG_LFG_PENDING_MATCH_DONE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x373*/ { "SMSG_TITLE_EARNED", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x374*/ { "CMSG_SET_TITLE", STATUS_LOGGEDIN, &WorldSession::HandleSetTitleOpcode }, @@ -1267,8 +1267,8 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x4D6*/ { "SMSG_EQUIPMENT_SET_USE_RESULT", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x4D7*/ { "UMSG_UNKNOWN_1239", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x4D8*/ { "SMSG_UNKNOWN_1240", STATUS_NEVER, &WorldSession::Handle_ServerSide }, - /*0x4D9*/ { "CMSG_UNKNOWN_1241", STATUS_NEVER, &WorldSession::Handle_NULL }, - /*0x4DA*/ { "SMSG_UNKNOWN_1242", STATUS_NEVER, &WorldSession::Handle_ServerSide }, + /*0x4D9*/ { "CMSG_CHAR_FACTION_CHANGE", STATUS_NEVER, &WorldSession::Handle_NULL }, + /*0x4DA*/ { "SMSG_CHAR_FACTION_CHANGE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x4DB*/ { "UMSG_UNKNOWN_1243", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x4DC*/ { "UMSG_UNKNOWN_1244", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x4DD*/ { "UMSG_UNKNOWN_1245", STATUS_NEVER, &WorldSession::Handle_NULL }, @@ -1305,7 +1305,8 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x4FC*/ { "SMSG_UNKNOWN_1276", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x4FD*/ { "SMSG_UNKNOWN_1277", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x4FE*/ { "UMSG_UNKNOWN_1278", STATUS_NEVER, &WorldSession::Handle_NULL }, - /*0x4FF*/ { "CMSG_READY_FOR_ACCOUNT_DATA_TIMES", STATUS_NEVER, &WorldSession::Handle_NULL }, - /*0x500*/ { "CMSG_QUERY_QUESTS_COMPLETED", STATUS_NEVER, &WorldSession::Handle_NULL }, + /*0x4FF*/ { "CMSG_READY_FOR_ACCOUNT_DATA_TIMES", STATUS_AUTHED, &WorldSession::HandleReadyForAccountDataTimes }, + /*0x500*/ { "CMSG_QUERY_QUESTS_COMPLETED", STATUS_LOGGEDIN, &WorldSession::HandleQueryQuestsCompleted }, /*0x501*/ { "SMSG_QUERY_QUESTS_COMPLETED_RESPONSE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, + /*0x502*/ { "CMSG_GM_REPORT_LAG", STATUS_NEVER, &WorldSession::Handle_NULL }, }; diff --git a/src/game/Opcodes.h b/src/game/Opcodes.h index 323d8b5ca..c1f1ca8da 100644 --- a/src/game/Opcodes.h +++ b/src/game/Opcodes.h @@ -900,22 +900,22 @@ enum Opcodes CMSG_LFM_CLEAR_AUTOFILL = 0x35F, // CMSG SearchLFGLeave CMSG_ACCEPT_LFG_MATCH = 0x360, // SMSG uint32, uint32, if(uint8) { uint32 count, for(count) { uint64} }, uint32 count2, uint32, for(count2) { uint64, uint32 flags, if(flags & 0x2) {string}, if(flags & 0x10) {for(3) uint8}, if(flags & 0x80) {uint64, uint32}}, uint32 count3, uint32, for(count3) {uint64, uint32 flags, if(flags & 0x1) {uint8, uint8, uint8, for(3) uint8, uint32, uint32, uint32, uint32, uint32, uint32, float, float, uint32, uint32, uint32, uint32, uint32, float, uint32, uint32, uint32, uint32, uint32, uint32}, if(flags&0x2) string, if(flags&0x4) uint8, if(flags&0x8) uint64, if(flags&0x10) uint8, if(flags&0x20) uint32, if(flags&0x40) uint8, if(flags& 0x80) {uint64, uint32}} CMSG_DECLINE_LFG_MATCH = 0x361, // SMSG uint32, uint8, uint32, uint32, uint8, for(uint8) {uint32,uint8,uint8,uint8,uint8} - CMSG_CANCEL_PENDING_LFG = 0x362, // CMSG AcceptProposal, RejectProposal + CMSG_LFG_PROPOSAL_RESULT = 0x362, // CMSG AcceptProposal, RejectProposal CMSG_CLEAR_LOOKING_FOR_GROUP = 0x363, // SMSG uint32, uint8, for(uint8) uint32, uint8, for(uint8) { uint64, uint8, uint32, uint8, } CMSG_CLEAR_LOOKING_FOR_MORE = 0x364, // SMSG uint32 unk, uint32, if(unk==6) { uint8 count, for(count) uint64 } - CMSG_SET_LOOKING_FOR_MORE = 0x365, // SMSG uint32, uint32, uint32, uint32, uint32, uint32, uint8, uint8, uint8, uint8 + CMSG_SET_LOOKING_FOR_MORE = 0x365, // SMSG uint32 dungeon, uint32 lfgtype, uint32, uint32, uint32, uint32, uint8, uint8, uint8, uint8 CMSG_SET_LFG_COMMENT = 0x366, // CMSG SetLFGComment - SMSG_LFG_TIMEDOUT = 0x367, // SMSG uint8, if(uint8) { uint8, uint8, uint8, uint8, if(uint8) uint32, string} + SMSG_LFG_TIMEDOUT = 0x367, // SMSG uint8, if(uint8) { uint8, uint8, uint8, uint8, if(uint8) for(uint8) uint32, string} SMSG_LFG_OTHER_TIMEDOUT = 0x368, // SMSG uint8, if(uint8) { uint8, uint8, uint8, for(3) uint8, uint8, if(uint8) for(uint8) uint32, string} SMSG_LFG_AUTOJOIN_FAILED = 0x369, // SMSG uint8 - SMSG_LFG_AUTOJOIN_FAILED_NO_PLAYER = 0x36A, // CMSG SetLFGRoles - SMSG_LFG_LEADER_IS_LFM = 0x36B, // CMSG SetLFGNeeds - SMSG_LFG_UPDATE = 0x36C, // CMSG SetLFGBootVote + CMSG_LFG_SET_ROLES = 0x36A, // CMSG SetLFGRoles + CMSG_LFG_SET_NEEDS = 0x36B, // CMSG SetLFGNeeds + CMSG_LFG_SET_BOOT_VOTE = 0x36C, // CMSG SetLFGBootVote SMSG_LFG_UPDATE_LFM = 0x36D, // SMSG uint8, uint8, uint8, uint64, uint32, uint32, uint32, uint32 - SMSG_LFG_UPDATE_LFG = 0x36E, // CMSG RequestLFDPlayerLockInfo - SMSG_LFG_UPDATE_QUEUED = 0x36F, // SMSG uint8, for(uint8) { uint32, uint8, uint32, uint32, uint32, uint32, uint8, for(uint8) {uint32,uint32, uint32}}, uint32, for(uint32) {uint32,uint32} - SMSG_LFG_PENDING_INVITE = 0x370, // CMSG LFGTeleport - SMSG_LFG_PENDING_MATCH = 0x371, // CMSG RequestLFDPartyLockInfo + CMSG_LFD_PLAYER_LOCK_INFO_REQUEST = 0x36E, // CMSG RequestLFDPlayerLockInfo + SMSG_LFG_PLAYER_LOCK_INFO_RESPONSE = 0x36F, // SMSG uint8, for(uint8) { uint32, uint8, uint32, uint32, uint32, uint32, uint8, for(uint8) {uint32,uint32, uint32}}, uint32, for(uint32) {uint32,uint32} + CMSG_LFG_TELEPORT = 0x370, // CMSG LFGTeleport + CMSG_LFD_PARTY_LOCK_INFO_REQUEST = 0x371, // CMSG RequestLFDPartyLockInfo SMSG_LFG_PENDING_MATCH_DONE = 0x372, // SMSG uint8, for(uint8) uint64 SMSG_TITLE_EARNED = 0x373, CMSG_SET_TITLE = 0x374, @@ -1242,7 +1242,7 @@ enum Opcodes SMSG_UNKNOWN_1205 = 0x4B5, // refund something CMSG_CORPSE_MAP_POSITION_QUERY = 0x4B6, // CMSG, uint32 CMSG_CORPSE_MAP_POSITION_QUERY_RESPONSE = 0x4B7, // SMSG, 3*float+float - CMSG_LFG_SET_ROLES = 0x4B8, // CMSG, empty, lua: SetLFGRoles + CMSG_LFG_SET_ROLES_2 = 0x4B8, // CMSG, empty, lua: SetLFGRoles UMSG_UNKNOWN_1209 = 0x4B9, // not found CMSG_UNKNOWN_1210 = 0x4BA, // CMSG, uint64, lua: CalendarContextEventSignUp SMSG_UNKNOWN_1211 = 0x4BB, // SMSG, calendar related @@ -1316,7 +1316,8 @@ enum Opcodes CMSG_READY_FOR_ACCOUNT_DATA_TIMES = 0x4FF, // lua: ReadyForAccountDataTimes CMSG_QUERY_QUESTS_COMPLETED = 0x500, // lua: QueryQuestsCompleted SMSG_QUERY_QUESTS_COMPLETED_RESPONSE = 0x501, // response to 0x4FF - NUM_MSG_TYPES = 0x502 + CMSG_GM_REPORT_LAG = 0x502, // lua: GMReportLag + NUM_MSG_TYPES = 0x503 }; /// Player state diff --git a/src/game/Player.h b/src/game/Player.h index ed4ee3b76..d2ef251de 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -322,7 +322,8 @@ enum LfgType LFG_TYPE_RAID = 2, LFG_TYPE_QUEST = 3, LFG_TYPE_ZONE = 4, - LFG_TYPE_HEROIC_DUNGEON = 5 + LFG_TYPE_HEROIC_DUNGEON = 5, + LFG_TYPE_RANDOM_DUNGEON = 6 }; enum LfgRoles diff --git a/src/game/QueryHandler.cpp b/src/game/QueryHandler.cpp index 82ef1580d..963490f3c 100644 --- a/src/game/QueryHandler.cpp +++ b/src/game/QueryHandler.cpp @@ -467,3 +467,22 @@ void WorldSession::HandleCorpseMapPositionQuery( WorldPacket & recv_data ) data << float(0); SendPacket(&data); } + +void WorldSession::HandleQueryQuestsCompleted( WorldPacket & recv_data ) +{ + uint32 count = 0; + + WorldPacket data(SMSG_QUERY_QUESTS_COMPLETED_RESPONSE, 4+4*count); + data << count; + + for(QuestStatusMap::const_iterator itr = _player->getQuestStatusMap().begin(); itr != _player->getQuestStatusMap().end(); ++itr) + { + if(itr->second.m_rewarded) + { + data << uint32(itr->first); + count++; + } + } + data.put(0, count); + SendPacket(&data); +} diff --git a/src/game/UpdateFields.h b/src/game/UpdateFields.h index 526913c41..3422bb20f 100644 --- a/src/game/UpdateFields.h +++ b/src/game/UpdateFields.h @@ -19,7 +19,7 @@ #ifndef _UPDATEFIELDS_AUTO_H #define _UPDATEFIELDS_AUTO_H -// Auto generated for version 0, 3, 0, 10596 +// Auto generated for version 0, 3, 0, 10676 enum EObjectFields { diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp index 413e19b3e..78886e3dc 100644 --- a/src/game/WorldSession.cpp +++ b/src/game/WorldSession.cpp @@ -921,6 +921,7 @@ void WorldSession::SendAddonsInfo() string (16 bytes) string (16 bytes) uint32 + uint32 }*/ SendPacket(&data); diff --git a/src/game/WorldSession.h b/src/game/WorldSession.h index cf8ca9cb5..afd9a1e41 100644 --- a/src/game/WorldSession.h +++ b/src/game/WorldSession.h @@ -732,6 +732,8 @@ class MANGOS_DLL_SPEC WorldSession void HandleEquipmentSetDelete(WorldPacket& recv_data); void HandleEquipmentSetUse(WorldPacket& recv_data); void HandleWorldStateUITimerUpdate(WorldPacket& recv_data); + void HandleReadyForAccountDataTimes(WorldPacket& recv_data); + void HandleQueryQuestsCompleted(WorldPacket& recv_data); private: // private trade methods void moveItems(Item* myItems[], Item* hisItems[]); diff --git a/src/realmd/AuthCodes.h b/src/realmd/AuthCodes.h index 93a29ae67..6d252ee44 100644 --- a/src/realmd/AuthCodes.h +++ b/src/realmd/AuthCodes.h @@ -66,9 +66,9 @@ enum LoginResult // we need to stick to 1 version or half of the stuff will work for someone // others will not and opposite -// will only support WoW, WoW:TBC and WoW:WotLK 3.3.0 client build 10623... +// will only support WoW, WoW:TBC and WoW:WotLK 3.3.0 client build 10676... -#define EXPECTED_MANGOS_CLIENT_BUILD {10623, 0} +#define EXPECTED_MANGOS_CLIENT_BUILD {10676, 0} // At update excepted builds please update if need define DEFAULT_MAX_LEVEL // in DBCEnum.h to default max player level expected by build