Fix compile

This commit is contained in:
Spp
2013-06-12 14:16:51 +02:00
parent 8778f5abdf
commit a54244fb2d
2 changed files with 9 additions and 13 deletions
+1 -1
View File
@@ -14397,7 +14397,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
case GOSSIP_OPTION_TRAINER:
if (getClass() != creature->GetCreatureTemplate()->trainer_class)
TC_LOG_ERROR(LOG_FILTER_SQL, "GOSSIP_OPTION_TRAINER:: Player %s (GUID: %u) request wrong gossip menu: %u with wrong class: %u at Creature: %s (Entry: %u, Trainer Class: %u)",
GetName(), GetGUIDLow(), menu->GetGossipMenu().GetMenuId(), getClass(), creature->GetName(), creature->GetEntry(), creature->GetCreatureTemplate()->trainer_class);
GetName().c_str(), GetGUIDLow(), menu->GetGossipMenu().GetMenuId(), getClass(), creature->GetName().c_str(), creature->GetEntry(), creature->GetCreatureTemplate()->trainer_class);
// no break;
case GOSSIP_OPTION_GOSSIP:
case GOSSIP_OPTION_SPIRITGUIDE:
+8 -12
View File
@@ -1329,25 +1329,21 @@ void GameEventMgr::ChangeEquipOrModel(int16 event_id, bool activate)
itr->second.equipement_id_prev = creature->GetCurrentEquipmentId();
itr->second.modelid_prev = creature->GetDisplayId();
creature->LoadEquipment(itr->second.equipment_id, true);
if (itr->second.modelid > 0 && itr->second.modelid_prev != itr->second.modelid)
if (itr->second.modelid > 0 && itr->second.modelid_prev != itr->second.modelid &&
sObjectMgr->GetCreatureModelInfo(itr->second.modelid))
{
if (CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelInfo(itr->second.modelid))
{
creature->SetDisplayId(itr->second.modelid);
creature->SetNativeDisplayId(itr->second.modelid);
}
creature->SetDisplayId(itr->second.modelid);
creature->SetNativeDisplayId(itr->second.modelid);
}
}
else
{
creature->LoadEquipment(itr->second.equipement_id_prev, true);
if (itr->second.modelid_prev > 0 && itr->second.modelid_prev != itr->second.modelid)
if (itr->second.modelid_prev > 0 && itr->second.modelid_prev != itr->second.modelid &&
sObjectMgr->GetCreatureModelInfo(itr->second.modelid_prev))
{
if (CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelInfo(itr->second.modelid_prev))
{
creature->SetDisplayId(itr->second.modelid_prev);
creature->SetNativeDisplayId(itr->second.modelid_prev);
}
creature->SetDisplayId(itr->second.modelid_prev);
creature->SetNativeDisplayId(itr->second.modelid_prev);
}
}
}