[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:
NoFantasy 2010-06-14 17:56:44 +02:00
parent 10634ac5be
commit 809d9d2063
2 changed files with 8 additions and 5 deletions

View file

@ -249,8 +249,11 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data )
// Load creature equipment
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)
{ // override, -1 means no equipment

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10054"
#define REVISION_NR "10055"
#endif // __REVISION_NR_H__