mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[8731] Restore difficulty 1 spawn use for creatures with special difficulty 1 versions.
* Rename creature template `heroic_entry` => `difficulty_entry_1`
Possible need add 2 more fields for 2-3
* Use 2 more EventAI EFLAG_* flags for 2-3 difficulty support, update checks.
* Update area trigger code.
Note: support for specialized creature version for difficulties 2-3 not added yet
and will be used same as difficulty 1 mode.
TODO: Rename area triggers heroickey/etc fields ?
This commit is contained in:
parent
00c2035cc7
commit
fad1fb92f4
15 changed files with 86 additions and 78 deletions
|
|
@ -188,18 +188,19 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data )
|
|||
return false;
|
||||
}
|
||||
|
||||
// get heroic mode entry
|
||||
// get difficulty 1 mode entry
|
||||
uint32 actualEntry = Entry;
|
||||
CreatureInfo const *cinfo = normalInfo;
|
||||
if(normalInfo->HeroicEntry)
|
||||
if(normalInfo->DifficultyEntry1)
|
||||
{
|
||||
//we already have valid Map pointer for current creature!
|
||||
if(GetMap()->IsHeroic())
|
||||
//FIXME: spawn modes 2-3 must have own case DifficultyEntryN
|
||||
if(GetMap()->GetSpawnMode() > 0)
|
||||
{
|
||||
cinfo = objmgr.GetCreatureTemplate(normalInfo->HeroicEntry);
|
||||
cinfo = objmgr.GetCreatureTemplate(normalInfo->DifficultyEntry1);
|
||||
if(!cinfo)
|
||||
{
|
||||
sLog.outErrorDb("Creature::UpdateEntry creature heroic entry %u does not exist.", actualEntry);
|
||||
sLog.outErrorDb("Creature::UpdateEntry creature difficulty 1 entry %u does not exist.", actualEntry);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -1928,7 +1929,7 @@ CreatureDataAddon const* Creature::GetCreatureAddon() const
|
|||
return addon;
|
||||
}
|
||||
|
||||
// dependent from heroic mode entry
|
||||
// dependent from difficulty mode entry
|
||||
return ObjectMgr::GetCreatureTemplateAddon(GetCreatureInfo()->Entry);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue