[7716] Fixed some typos and possible crashes. Author: AlexDereka
--HG-- branch : trunk
This commit is contained in:
@@ -1377,17 +1377,17 @@ void GameEventMgr::ChangeEquipOrModel(int16 event_id, bool activate)
|
||||
}
|
||||
else // If not spawned
|
||||
{
|
||||
CreatureData const* data = objmgr.GetCreatureData(itr->first);
|
||||
if (data && activate)
|
||||
CreatureData const* data2 = objmgr.GetCreatureData(itr->first);
|
||||
if (data2 && activate)
|
||||
{
|
||||
CreatureInfo const *cinfo = objmgr.GetCreatureTemplate(data->id);
|
||||
uint32 display_id = objmgr.ChooseDisplayId(0,cinfo,data);
|
||||
CreatureInfo const *cinfo = objmgr.GetCreatureTemplate(data2->id);
|
||||
uint32 display_id = objmgr.ChooseDisplayId(0,cinfo,data2);
|
||||
CreatureModelInfo const *minfo = objmgr.GetCreatureModelRandomGender(display_id);
|
||||
if (minfo)
|
||||
display_id = minfo->modelid;
|
||||
if (data->equipmentId == 0)
|
||||
if (data2->equipmentId == 0)
|
||||
itr->second.equipement_id_prev = cinfo->equipmentId;
|
||||
else if (data->equipmentId != -1)
|
||||
else if (data2->equipmentId != -1)
|
||||
itr->second.equipement_id_prev = data->equipmentId;
|
||||
itr->second.modelid_prev = display_id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user