diff options
-rw-r--r-- | src/game/AuctionHouseHandler.cpp | 5 | ||||
-rw-r--r-- | src/game/BattleGroundMgr.cpp | 25 | ||||
-rw-r--r-- | src/game/GossipDef.cpp | 44 | ||||
-rw-r--r-- | src/game/MiscHandler.cpp | 9 | ||||
-rw-r--r-- | src/game/Player.cpp | 9 | ||||
-rw-r--r-- | src/game/QuestDef.h | 6 |
6 files changed, 58 insertions, 40 deletions
diff --git a/src/game/AuctionHouseHandler.cpp b/src/game/AuctionHouseHandler.cpp index 603a0e2bc63..c73e00cdb28 100644 --- a/src/game/AuctionHouseHandler.cpp +++ b/src/game/AuctionHouseHandler.cpp @@ -68,8 +68,9 @@ void WorldSession::SendAuctionHello(uint64 guid, Creature* unit) return; WorldPacket data(MSG_AUCTION_HELLO, 12); - data << (uint64) guid; - data << (uint32) ahEntry->houseId; + data << uint64(guid); + data << uint32(ahEntry->houseId); + data << uint8(1); // 3.3.3: 1 - AH enabled, 0 - AH disabled SendPacket(&data); } diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index 831ceeef761..5dc260bebef 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -1850,17 +1850,32 @@ void BattleGroundMgr::BuildBattleGroundListPacket(WorldPacket *data, const uint6 *data << uint64(guid); // battlemaster guid *data << uint8(fromWhere); // from where you joined *data << uint32(bgTypeId); // battleground id + *data << uint8(0); // unk + *data << uint8(0); // unk + + // Rewards + *data << uint8(0); // 3.3.3 hasWin + *data << uint32(0); // 3.3.3 winHonor + *data << uint32(0); // 3.3.3 winArena + *data << uint32(0); // 3.3.3 lossHonor + + uint8 isRandom = 0; + *data << uint8(isRandom); // 3.3.3 isRandom + if (isRandom) + { + // Rewards (random) + *data << uint8(0); // 3.3.3 hasWin_Random + *data << uint32(0); // 3.3.3 winHonor_Random + *data << uint32(0); // 3.3.3 winArena_Random + *data << uint32(0); // 3.3.3 lossHonor_Random + } + if (bgTypeId == BATTLEGROUND_AA) // arena { - *data << uint8(4); // unk - *data << uint8(0); // unk *data << uint32(0); // unk (count?) } else // battleground { - *data << uint8(0); // unk, different for each bg type - *data << uint8(0); // unk - size_t count_pos = data->wpos(); uint32 count = 0; *data << uint32(0); // number of bg instances diff --git a/src/game/GossipDef.cpp b/src/game/GossipDef.cpp index b2d8b2b942e..d5de4f4c80e 100644 --- a/src/game/GossipDef.cpp +++ b/src/game/GossipDef.cpp @@ -167,39 +167,34 @@ void PlayerMenu::SendGossipMenu(uint32 TitleTextId, uint64 objectGUID) data << uint32(questID); data << uint32(qItem.m_qIcon); data << uint32(pSession->GetPlayer()->GetQuestLevel(pQuest)); + data << uint32(0); // 3.3.3 + data << uint8(0); // 3.3.3 changes icon: blue question or yellow exclamation std::string Title = pQuest->GetTitle(); int loc_idx = pSession->GetSessionDbLocaleIndex(); if (loc_idx >= 0) - { - QuestLocale const *ql = objmgr.GetQuestLocale(questID); - if (ql) - { + if (QuestLocale const *ql = objmgr.GetQuestLocale(questID)) if (ql->Title.size() > loc_idx && !ql->Title[loc_idx].empty()) - Title=ql->Title[loc_idx]; - } - } - data << Title; + Title = ql->Title[loc_idx]; + data << Title; // max 0x200 } pSession->SendPacket(&data); - //sLog.outDebug("WORLD: Sent SMSG_GOSSIP_MESSAGE NPCGuid=%u",GUID_LOPART(npcGUID)); } void PlayerMenu::CloseGossip() { WorldPacket data(SMSG_GOSSIP_COMPLETE, 0); pSession->SendPacket(&data); - - //sLog.outDebug("WORLD: Sent SMSG_GOSSIP_COMPLETE"); } // Outdated void PlayerMenu::SendPointOfInterest(float X, float Y, uint32 Icon, uint32 Flags, uint32 Data, char const * locName) { WorldPacket data(SMSG_GOSSIP_POI, (4+4+4+4+4+10)); // guess size - data << Flags; - data << X << Y; + data << uint32(Flags); + data << float(X); + data << float(Y); data << uint32(Icon); data << uint32(Data); data << locName; @@ -416,6 +411,8 @@ void PlayerMenu::SendQuestGiverQuestList(QEmote eEmote, const std::string& Title data << uint32(questID); data << uint32(qmi.m_qIcon); data << uint32(pSession->GetPlayer()->GetQuestLevel(pQuest)); + data << uint32(0); + data << uint8(0); data << title; } pSession->SendPacket(&data); @@ -463,11 +460,10 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const *pQuest, uint64 npcGUID, data << Title; data << Details; data << Objectives; - data << uint8(ActivateAccept ? 1 : 0); + data << uint8(ActivateAccept ? 1 : 0); // auto finish + data << uint32(pQuest->GetFlags()); // 3.3.3 questFlags data << uint32(pQuest->GetSuggestedPlayers()); - data << uint8(0); // new wotlk - data << uint8(0); // new 3.1 - data << uint8(0); // new 3.3.0 + data << uint8(0); // IsFinished, value is sent back to server in quest accept packet if (pQuest->HasFlag(QUEST_FLAGS_HIDDEN_REWARDS)) { @@ -711,8 +707,9 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, uint64 npcGUID, data << Title; data << OfferRewardText; - data << uint8(EnableNext ? 1 : 0); - data << uint32(0); // unk + data << uint8(EnableNext ? 1 : 0); // Auto Finish + data << uint32(pQuest->GetFlags()); // 3.3.3 questFlags + data << uint32(pQuest->GetSuggestedPlayers()); // SuggestedGroupNum uint32 EmoteCount = 0; for (uint32 i = 0; i < QUEST_EMOTE_COUNT; ++i) @@ -746,7 +743,7 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, uint64 npcGUID, } data << uint32(pQuest->GetRewItemsCount()); - for (uint16 i=0; i < pQuest->GetRewItemsCount(); ++i) + for (uint32 i = 0; i < pQuest->GetRewItemsCount(); ++i) { pItem = objmgr.GetItemPrototype(pQuest->RewItemId[i]); data << uint32(pQuest->RewItemId[i]); @@ -813,8 +810,8 @@ void PlayerMenu::SendQuestGiverRequestItems(Quest const *pQuest, uint64 npcGUID, } WorldPacket data(SMSG_QUESTGIVER_REQUEST_ITEMS, 50); // guess size - data << npcGUID; - data << pQuest->GetQuestId(); + data << uint64(npcGUID); + data << uint32(pQuest->GetQuestId()); data << Title; data << RequestItemsText; @@ -831,7 +828,8 @@ void PlayerMenu::SendQuestGiverRequestItems(Quest const *pQuest, uint64 npcGUID, else data << uint32(0x00); - data << uint32(0x00); // unknown + data << uint32(pQuest->GetFlags()); // 3.3.3 questFlags + data << uint32(pQuest->GetSuggestedPlayers()); // SuggestedGroupNum // Required Money data << uint32(pQuest->GetRewOrReqMoney() < 0 ? -pQuest->GetRewOrReqMoney() : 0); diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp index a6d4452df32..337bf0074f3 100644 --- a/src/game/MiscHandler.cpp +++ b/src/game/MiscHandler.cpp @@ -217,8 +217,8 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data) uint32 gmLevelInWhoList = sWorld.getConfig(CONFIG_GM_LEVEL_IN_WHO_LIST); WorldPacket data(SMSG_WHO, 50); // guess size - data << clientcount; // clientcount place holder - data << clientcount; // clientcount place holder + data << uint32(clientcount); // clientcount place holder, listed count + data << uint32(clientcount); // clientcount place holder, online count ObjectAccessor::Guard guard(*HashMapHolder<Player>::GetLock()); HashMapHolder<Player>::MapType& m = ObjectAccessor::Instance().GetPlayers(); @@ -328,8 +328,9 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data) break; } - data.put(0, clientcount); //insert right count - data.put(sizeof(uint32), clientcount); //insert right count + uint32 count = m.size(); + data.put( 0, clientcount ); // insert right count, listed count + data.put( 4, count > 50 ? count : clientcount ); // insert right count, online count SendPacket(&data); sLog.outDebug("WORLD: Send SMSG_WHO Message"); diff --git a/src/game/Player.cpp b/src/game/Player.cpp index b092a2b6a20..115df736b3d 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -614,6 +614,7 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c SetUInt32Value(PLAYER_BYTES, (skin | (face << 8) | (hairStyle << 16) | (hairColor << 24))); SetUInt32Value(PLAYER_BYTES_2, (facialHair | (0x00 << 8) | (0x00 << 16) | (0x02 << 24))); SetByteValue(PLAYER_BYTES_3, 0, gender); + SetByteValue(PLAYER_BYTES_3, 3, 0); // BattlefieldArenaFaction (0 or 1) SetUInt32Value(PLAYER_GUILDID, 0); SetUInt32Value(PLAYER_GUILDRANK, 0); @@ -14274,13 +14275,13 @@ bool Player::SatisfyQuestLog(bool msg) if (FindQuestSlot(0) < MAX_QUEST_LOG_SIZE) return true; - if (msg) + if (msg) { WorldPacket data(SMSG_QUESTLOG_FULL, 0); - GetSession()->SendPacket(&data); - sLog.outDebug("WORLD: Sent QUEST_LOG_FULL_MESSAGE"); + GetSession()->SendPacket(&data); + sLog.outDebug("WORLD: Sent SMSG_QUESTLOG_FULL"); } - return false; + return true; } bool Player::SatisfyQuestPreviousQuest(Quest const* qInfo, bool msg) diff --git a/src/game/QuestDef.h b/src/game/QuestDef.h index 57c0df30e00..a6f1592fe03 100644 --- a/src/game/QuestDef.h +++ b/src/game/QuestDef.h @@ -140,7 +140,7 @@ enum __QuestFlags QUEST_FLAGS_AUTOCOMPLETE = 0x00010000, // auto complete QUEST_FLAGS_UNK5 = 0x00020000, // has something to do with ReqItemId and SrcItemId QUEST_FLAGS_UNK6 = 0x00040000, // use Objective text as Complete text - QUEST_FLAGS_LOW_LEVEL = 0x00080000, // quests in starting areas + QUEST_FLAGS_AUTO_ACCEPT = 0x00080000, // quests in starting areas // Trinity flags for set SpecialFlags in DB if required but used only at server QUEST_TRINITY_FLAGS_REPEATABLE = 0x010000, // Set by 1 in SpecialFlags from DB @@ -239,7 +239,9 @@ class Quest bool IsRepeatable() const { return QuestFlags & QUEST_TRINITY_FLAGS_REPEATABLE; } bool IsAutoComplete() const { return QuestMethod ? false : true; } uint32 GetFlags() const { return QuestFlags; } - bool IsDaily() const { return QuestFlags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); } + bool IsDaily() const { return QuestFlags & (QUEST_FLAGS_DAILY; } + bool IsWeekly() const { return QuestFlags & QUEST_FLAGS_WEEKLY; } + bool IsAutoAccept() const { return QuestFlags & QUEST_FLAGS_AUTO_ACCEPT; } // multiple values std::string ObjectiveText[QUEST_OBJECTIVES_COUNT]; |