*Fix build.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-17 16:07:54 -05:00
parent b9d8bdeddd
commit ad41b0c9e1
3 changed files with 21 additions and 19 deletions
+3 -4
View File
@@ -573,8 +573,8 @@ void CreatureEventAI::ProcessAction(uint16 type, uint32 param1, uint32 param2, u
if (CreatureInfo const* ci = GetCreatureTemplateStore(param1)) if (CreatureInfo const* ci = GetCreatureTemplateStore(param1))
{ {
//use default display //use default display
if (ci->Modelid1) if (ci->Modelid_A1)
m_creature->SetDisplayId(ci->Modelid1); m_creature->SetDisplayId(ci->Modelid_A1);
} }
} }
//if no param1, then use value from param2 (modelId) //if no param1, then use value from param2 (modelId)
@@ -993,8 +993,7 @@ void CreatureEventAI::ProcessAction(uint16 type, uint32 param1, uint32 param2, u
pObject = m_creature->SummonGameObject(param1, x, y, z, 0, 0, 0, 0, 0, param2); pObject = m_creature->SummonGameObject(param1, x, y, z, 0, 0, 0, 0, 0, param2);
if (!pObject) if (!pObject)
{ {
if (EAI_ErrorLevel > 0) sLog.outErrorDb("SD2: EventAI failed to spawn object %u. Spawn event %d is on creature %d", param1, EventId, m_creature->GetEntry());
error_db_log( "SD2: EventAI failed to spawn object %u. Spawn event %d is on creature %d", param1, EventId, m_creature->GetEntry());
} }
} }
break; break;
+3
View File
@@ -652,6 +652,8 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
m_CreatureEventAI_Event_Map[creature_id].push_back(temp); m_CreatureEventAI_Event_Map[creature_id].push_back(temp);
++Count; ++Count;
if(CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(temp.creature_id))
{
if(!cInfo->AIName || !cInfo->AIName[0]) if(!cInfo->AIName || !cInfo->AIName[0])
{ {
//sLog.outErrorDb("CreatureEventAI: Creature Entry %u has EventAI script but its AIName is empty. Set to EventAI as default.", cInfo->Entry); //sLog.outErrorDb("CreatureEventAI: Creature Entry %u has EventAI script but its AIName is empty. Set to EventAI as default.", cInfo->Entry);
@@ -667,6 +669,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
{ {
//sLog.outErrorDb("CreatureEventAI: Creature Entry %u has EventAI script but it also has C++ script. EventAI script will be overriden.", cInfo->Entry); //sLog.outErrorDb("CreatureEventAI: Creature Entry %u has EventAI script but it also has C++ script. EventAI script will be overriden.", cInfo->Entry);
} }
}
} while (result->NextRow()); } while (result->NextRow());
delete result; delete result;
+2 -2
View File
@@ -4857,14 +4857,14 @@ uint16 ObjectMgr::GetTaxiMount( uint32 id, uint32 team )
mount_entry = node->MountCreatureID[1]; mount_entry = node->MountCreatureID[1];
CreatureInfo const *ci = GetCreatureTemplate(mount_entry); CreatureInfo const *ci = GetCreatureTemplate(mount_entry);
if(ci) if(ci)
mount_id = ci->Modelid1; mount_id = ci->Modelid_A1;
} }
if (team == HORDE) if (team == HORDE)
{ {
mount_entry = node->MountCreatureID[0]; mount_entry = node->MountCreatureID[0];
CreatureInfo const *ci = GetCreatureTemplate(mount_entry); CreatureInfo const *ci = GetCreatureTemplate(mount_entry);
if(ci) if(ci)
mount_id = ci->Modelid3; mount_id = ci->Modelid_H1;
} }
} }