mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[9928] Fix build...
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
d5c7e7b7d2
commit
a457f35b21
2 changed files with 12 additions and 10 deletions
|
|
@ -14267,38 +14267,40 @@ void Player::KilledMonsterCredit( uint32 entry, ObjectGuid guid )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Quest const* qInfo = sObjectMgr.GetQuestTemplate(questid);
|
Quest const* qInfo = sObjectMgr.GetQuestTemplate(questid);
|
||||||
if( !qInfo )
|
if (!qInfo)
|
||||||
continue;
|
continue;
|
||||||
// just if !ingroup || !noraidgroup || raidgroup
|
// just if !ingroup || !noraidgroup || raidgroup
|
||||||
QuestStatusData& q_status = mQuestStatus[questid];
|
QuestStatusData& q_status = mQuestStatus[questid];
|
||||||
if( q_status.m_status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid())
|
if (q_status.m_status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
|
||||||
{
|
{
|
||||||
if( qInfo->HasFlag( QUEST_MANGOS_FLAGS_KILL_OR_CAST) )
|
if (qInfo->HasFlag( QUEST_MANGOS_FLAGS_KILL_OR_CAST))
|
||||||
{
|
{
|
||||||
for (int j = 0; j < QUEST_OBJECTIVES_COUNT; ++j)
|
for (int j = 0; j < QUEST_OBJECTIVES_COUNT; ++j)
|
||||||
{
|
{
|
||||||
// skip GO activate objective or none
|
// skip GO activate objective or none
|
||||||
if(qInfo->ReqCreatureOrGOId[j] <=0)
|
if (qInfo->ReqCreatureOrGOId[j] <=0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// skip Cast at creature objective
|
// skip Cast at creature objective
|
||||||
if(qInfo->ReqSpell[j] !=0 )
|
if (qInfo->ReqSpell[j] !=0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
uint32 reqkill = qInfo->ReqCreatureOrGOId[j];
|
uint32 reqkill = qInfo->ReqCreatureOrGOId[j];
|
||||||
|
|
||||||
if ( reqkill == entry )
|
if (reqkill == entry)
|
||||||
{
|
{
|
||||||
uint32 reqkillcount = qInfo->ReqCreatureOrGOCount[j];
|
uint32 reqkillcount = qInfo->ReqCreatureOrGOCount[j];
|
||||||
uint32 curkillcount = q_status.m_creatureOrGOcount[j];
|
uint32 curkillcount = q_status.m_creatureOrGOcount[j];
|
||||||
if ( curkillcount < reqkillcount )
|
if (curkillcount < reqkillcount)
|
||||||
{
|
{
|
||||||
q_status.m_creatureOrGOcount[j] = curkillcount + addkillcount;
|
q_status.m_creatureOrGOcount[j] = curkillcount + addkillcount;
|
||||||
if (q_status.uState != QUEST_NEW) q_status.uState = QUEST_CHANGED;
|
if (q_status.uState != QUEST_NEW)
|
||||||
|
q_status.uState = QUEST_CHANGED;
|
||||||
|
|
||||||
SendQuestUpdateAddCreatureOrGo( qInfo, guid, j, curkillcount, addkillcount);
|
SendQuestUpdateAddCreatureOrGo( qInfo, guid, j, curkillcount, addkillcount);
|
||||||
}
|
}
|
||||||
if ( CanCompleteQuest( questid ) )
|
|
||||||
|
if (CanCompleteQuest( questid ))
|
||||||
CompleteQuest( questid );
|
CompleteQuest( questid );
|
||||||
|
|
||||||
// same objective target can be in many active quests, but not in 2 objectives for single quest (code optimization).
|
// same objective target can be in many active quests, but not in 2 objectives for single quest (code optimization).
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9927"
|
#define REVISION_NR "9928"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue