mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 01:37:00 +00:00
[10055] Use creature equipment from normal _template when id is not set for difficulty
creature_template of difficulty_entry_N then only need equipment_id when equipment should be different from the normal creature entry. Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
10634ac5be
commit
809d9d2063
2 changed files with 8 additions and 5 deletions
|
|
@ -248,11 +248,14 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data )
|
|||
SetByteValue(UNIT_FIELD_BYTES_0, 2, minfo->gender);
|
||||
|
||||
// Load creature equipment
|
||||
if(!data || data->equipmentId == 0)
|
||||
{ // use default from the template
|
||||
LoadEquipment(cinfo->equipmentId);
|
||||
if (!data || data->equipmentId == 0)
|
||||
{
|
||||
if (cinfo->equipmentId == 0)
|
||||
LoadEquipment(normalInfo->equipmentId); // use default from normal template if diff does not have any
|
||||
else
|
||||
LoadEquipment(cinfo->equipmentId); // else use from diff template
|
||||
}
|
||||
else if(data && data->equipmentId != -1)
|
||||
else if (data && data->equipmentId != -1)
|
||||
{ // override, -1 means no equipment
|
||||
LoadEquipment(data->equipmentId);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue