diff --git a/src/game/Player.cpp b/src/game/Player.cpp index e66d52bcb..f6434e72b 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -14524,7 +14524,7 @@ void Player::KilledMonsterCredit( uint32 entry, ObjectGuid guid ) if (q_status.uState != QUEST_NEW) q_status.uState = QUEST_CHANGED; - SendQuestUpdateAddCreatureOrGo( qInfo, guid, j, curkillcount, addkillcount); + SendQuestUpdateAddCreatureOrGo( qInfo, guid, j, q_status.m_creatureOrGOcount[j]); } if (CanCompleteQuest( questid )) @@ -14600,7 +14600,7 @@ void Player::CastedCreatureOrGO( uint32 entry, ObjectGuid guid, uint32 spell_id, if (q_status.uState != QUEST_NEW) q_status.uState = QUEST_CHANGED; - SendQuestUpdateAddCreatureOrGo( qInfo, guid, j, curCastCount, addCastCount); + SendQuestUpdateAddCreatureOrGo( qInfo, guid, j, q_status.m_creatureOrGOcount[j]); } if (CanCompleteQuest(questid)) @@ -14654,7 +14654,7 @@ void Player::TalkedToCreature( uint32 entry, ObjectGuid guid ) q_status.m_creatureOrGOcount[j] = curTalkCount + addTalkCount; if (q_status.uState != QUEST_NEW) q_status.uState = QUEST_CHANGED; - SendQuestUpdateAddCreatureOrGo( qInfo, guid, j, curTalkCount, addTalkCount); + SendQuestUpdateAddCreatureOrGo( qInfo, guid, j, q_status.m_creatureOrGOcount[j]); } if ( CanCompleteQuest( questid ) ) CompleteQuest( questid ); @@ -14901,9 +14901,9 @@ void Player::SendQuestUpdateAddItem( Quest const* /*pQuest*/, uint32 /*item_idx* GetSession()->SendPacket( &data ); } -void Player::SendQuestUpdateAddCreatureOrGo( Quest const* pQuest, ObjectGuid guid, uint32 creatureOrGO_idx, uint32 old_count, uint32 add_count ) +void Player::SendQuestUpdateAddCreatureOrGo( Quest const* pQuest, ObjectGuid guid, uint32 creatureOrGO_idx, uint32 count) { - MANGOS_ASSERT(old_count + add_count < 65536 && "mob/GO count store in 16 bits 2^16 = 65536 (0..65536)"); + MANGOS_ASSERT(count < 65536 && "mob/GO count store in 16 bits 2^16 = 65536 (0..65536)"); int32 entry = pQuest->ReqCreatureOrGOId[ creatureOrGO_idx ]; if (entry < 0) @@ -14914,14 +14914,14 @@ void Player::SendQuestUpdateAddCreatureOrGo( Quest const* pQuest, ObjectGuid gui DEBUG_LOG( "WORLD: Sent SMSG_QUESTUPDATE_ADD_KILL" ); data << uint32(pQuest->GetQuestId()); data << uint32(entry); - data << uint32(old_count + add_count); + data << uint32(count); data << uint32(pQuest->ReqCreatureOrGOCount[ creatureOrGO_idx ]); data << guid; GetSession()->SendPacket(&data); uint16 log_slot = FindQuestSlot( pQuest->GetQuestId() ); - if( log_slot < MAX_QUEST_LOG_SIZE) - SetQuestSlotCounter(log_slot,creatureOrGO_idx,GetQuestSlotCounter(log_slot,creatureOrGO_idx)+add_count); + if (log_slot < MAX_QUEST_LOG_SIZE) + SetQuestSlotCounter(log_slot, creatureOrGO_idx, count); } /*********************************************************/ diff --git a/src/game/Player.h b/src/game/Player.h index 0abb82514..3fbced915 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1447,9 +1447,6 @@ class MANGOS_DLL_SPEC Player : public Unit uint16 FindQuestSlot( uint32 quest_id ) const; uint32 GetQuestSlotQuestId(uint16 slot) const { return GetUInt32Value(PLAYER_QUEST_LOG_1_1 + slot * MAX_QUEST_OFFSET + QUEST_ID_OFFSET); } - uint32 GetQuestSlotState(uint16 slot) const { return GetUInt32Value(PLAYER_QUEST_LOG_1_1 + slot * MAX_QUEST_OFFSET + QUEST_STATE_OFFSET); } - uint16 GetQuestSlotCounter(uint16 slot, uint8 counter) const { return (uint16)(GetUInt64Value(PLAYER_QUEST_LOG_1_1 + slot * MAX_QUEST_OFFSET + QUEST_COUNTS_OFFSET) >> (counter * 16)); } - uint32 GetQuestSlotTime(uint16 slot) const { return GetUInt32Value(PLAYER_QUEST_LOG_1_1 + slot * MAX_QUEST_OFFSET + QUEST_TIME_OFFSET); } void SetQuestSlot(uint16 slot, uint32 quest_id, uint32 timer = 0) { SetUInt32Value(PLAYER_QUEST_LOG_1_1 + slot * MAX_QUEST_OFFSET + QUEST_ID_OFFSET, quest_id); @@ -1503,7 +1500,7 @@ class MANGOS_DLL_SPEC Player : public Unit void SendQuestConfirmAccept(Quest const* pQuest, Player* pReceiver); void SendPushToPartyResponse( Player *pPlayer, uint32 msg ); void SendQuestUpdateAddItem( Quest const* pQuest, uint32 item_idx, uint32 count ); - void SendQuestUpdateAddCreatureOrGo( Quest const* pQuest, ObjectGuid guid, uint32 creatureOrGO_idx, uint32 old_count, uint32 add_count ); + void SendQuestUpdateAddCreatureOrGo(Quest const* pQuest, ObjectGuid guid, uint32 creatureOrGO_idx, uint32 count); uint64 GetDivider() { return m_divider; } void SetDivider( uint64 guid ) { m_divider = guid; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 87f2e02d4..3f4652329 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10819" + #define REVISION_NR "10820" #endif // __REVISION_NR_H__