mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[8190] Update killing quest objectives base at creature_template KillCredit fields.
Note: for avoid double counting must be removed C++ scripts and EventAI scripts that do same thing in old way. Signed-off-by: VladimirMangos <vladimir@getmangos.com> Also implement KillCreditN field check at loading.
This commit is contained in:
parent
ad67efefad
commit
cbfbd13146
11 changed files with 49 additions and 17 deletions
|
|
@ -640,6 +640,18 @@ void ObjectMgr::LoadCreatureTemplates()
|
|||
if (!displayScaleEntry)
|
||||
sLog.outErrorDb("Creature (Entry: %u) not has any existed display id in DisplayID_A/DisplayID_A2/DisplayID_H/DisplayID_H2", cInfo->Entry);
|
||||
|
||||
for(int k = 0; k < MAX_KILL_CREDIT; ++k)
|
||||
{
|
||||
if(cInfo->KillCredit[k])
|
||||
{
|
||||
if(!GetCreatureTemplate(cInfo->KillCredit[k]))
|
||||
{
|
||||
sLog.outErrorDb("Creature (Entry: %u) has not existed creature entry in `KillCredit%d` (%u)",cInfo->Entry,k+1,cInfo->KillCredit[k]);
|
||||
const_cast<CreatureInfo*>(cInfo)->KillCredit[k] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cInfo->unit_class && ((1 << (cInfo->unit_class-1)) & CLASSMASK_ALL_CREATURES) == 0)
|
||||
sLog.outErrorDb("Creature (Entry: %u) has invalid unit_class(%u) for creature_template", cInfo->Entry, cInfo->unit_class);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue