Allow spell cast on an NPC that is linked to a KillCredit to count toward the KillCredit.
--HG-- branch : trunk
This commit is contained in:
@@ -14572,8 +14572,17 @@ void Player::CastedCreatureOrGO(uint32 entry, uint64 guid, uint32 spell_id)
|
||||
{
|
||||
// creature activate objectives
|
||||
if (qInfo->ReqCreatureOrGOId[j] > 0)
|
||||
{
|
||||
// checked at quest_template loading
|
||||
reqTarget = qInfo->ReqCreatureOrGOId[j];
|
||||
if (reqTarget != entry) // if entry doesn't match, check for killcredits referenced in template
|
||||
{
|
||||
CreatureInfo const *cinfo = objmgr.GetCreatureTemplate(entry);
|
||||
for (uint8 i = 0; i < MAX_KILL_CREDIT; ++i)
|
||||
if (cinfo->KillCredit[i] == reqTarget)
|
||||
entry = cinfo->KillCredit[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user