[8087] Cleanup code.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
NoFantasy 2009-06-29 02:18:21 +04:00 committed by tomrus88
parent f232421069
commit 55a383cbd0
2 changed files with 44 additions and 48 deletions

View file

@ -429,22 +429,19 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
{ {
CHECK_PACKET_SIZE(recvPacket,4); CHECK_PACKET_SIZE(recvPacket,4);
uint32 quest; uint32 questId;
recvPacket >> quest; recvPacket >> questId;
sLog.outDebug( "WORLD: Received CMSG_PUSHQUESTTOPARTY quest = %u", quest ); sLog.outDebug("WORLD: Received CMSG_PUSHQUESTTOPARTY quest = %u", questId);
Quest const *pQuest = objmgr.GetQuestTemplate(quest); if (Quest const *pQuest = objmgr.GetQuestTemplate(questId))
if( pQuest )
{ {
if( _player->GetGroup() ) if (Group* pGroup = _player->GetGroup())
{
Group *pGroup = _player->GetGroup();
if( pGroup )
{ {
for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{ {
Player *pPlayer = itr->getSource(); Player *pPlayer = itr->getSource();
if (!pPlayer || pPlayer == _player) // skip self if (!pPlayer || pPlayer == _player) // skip self
continue; continue;
@ -456,7 +453,7 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
continue; continue;
} }
if( pPlayer->GetQuestStatus( quest ) == QUEST_STATUS_COMPLETE ) if (pPlayer->GetQuestStatus(questId) == QUEST_STATUS_COMPLETE)
{ {
_player->SendPushToPartyResponse(pPlayer, QUEST_PARTY_MSG_FINISH_QUEST); _player->SendPushToPartyResponse(pPlayer, QUEST_PARTY_MSG_FINISH_QUEST);
continue; continue;
@ -486,7 +483,6 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
} }
} }
} }
}
void WorldSession::HandleQuestPushResult(WorldPacket& recvPacket) void WorldSession::HandleQuestPushResult(WorldPacket& recvPacket)
{ {

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "8086" #define REVISION_NR "8087"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__