mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +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;
|
||||
|
||||
Quest const* qInfo = sObjectMgr.GetQuestTemplate(questid);
|
||||
if( !qInfo )
|
||||
if (!qInfo)
|
||||
continue;
|
||||
// just if !ingroup || !noraidgroup || raidgroup
|
||||
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)
|
||||
{
|
||||
// skip GO activate objective or none
|
||||
if(qInfo->ReqCreatureOrGOId[j] <=0)
|
||||
if (qInfo->ReqCreatureOrGOId[j] <=0)
|
||||
continue;
|
||||
|
||||
// skip Cast at creature objective
|
||||
if(qInfo->ReqSpell[j] !=0 )
|
||||
if (qInfo->ReqSpell[j] !=0 )
|
||||
continue;
|
||||
|
||||
uint32 reqkill = qInfo->ReqCreatureOrGOId[j];
|
||||
|
||||
if ( reqkill == entry )
|
||||
if (reqkill == entry)
|
||||
{
|
||||
uint32 reqkillcount = qInfo->ReqCreatureOrGOCount[j];
|
||||
uint32 curkillcount = q_status.m_creatureOrGOcount[j];
|
||||
if ( curkillcount < reqkillcount )
|
||||
if (curkillcount < reqkillcount)
|
||||
{
|
||||
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);
|
||||
}
|
||||
if ( CanCompleteQuest( questid ) )
|
||||
|
||||
if (CanCompleteQuest( questid ))
|
||||
CompleteQuest( questid );
|
||||
|
||||
// same objective target can be in many active quests, but not in 2 objectives for single quest (code optimization).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue