mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +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);
|
SetByteValue(UNIT_FIELD_BYTES_0, 2, minfo->gender);
|
||||||
|
|
||||||
// Load creature equipment
|
// Load creature equipment
|
||||||
if(!data || data->equipmentId == 0)
|
if (!data || data->equipmentId == 0)
|
||||||
{ // use default from the template
|
{
|
||||||
LoadEquipment(cinfo->equipmentId);
|
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
|
{ // override, -1 means no equipment
|
||||||
LoadEquipment(data->equipmentId);
|
LoadEquipment(data->equipmentId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10054"
|
#define REVISION_NR "10055"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue