mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
*Fix build.
--HG-- branch : trunk
This commit is contained in:
@@ -573,8 +573,8 @@ void CreatureEventAI::ProcessAction(uint16 type, uint32 param1, uint32 param2, u
|
||||
if (CreatureInfo const* ci = GetCreatureTemplateStore(param1))
|
||||
{
|
||||
//use default display
|
||||
if (ci->Modelid1)
|
||||
m_creature->SetDisplayId(ci->Modelid1);
|
||||
if (ci->Modelid_A1)
|
||||
m_creature->SetDisplayId(ci->Modelid_A1);
|
||||
}
|
||||
}
|
||||
//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);
|
||||
if (!pObject)
|
||||
{
|
||||
if (EAI_ErrorLevel > 0)
|
||||
error_db_log( "SD2: EventAI failed to spawn object %u. Spawn event %d is on creature %d", param1, EventId, m_creature->GetEntry());
|
||||
sLog.outErrorDb("SD2: EventAI failed to spawn object %u. Spawn event %d is on creature %d", param1, EventId, m_creature->GetEntry());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -652,20 +652,23 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
m_CreatureEventAI_Event_Map[creature_id].push_back(temp);
|
||||
++Count;
|
||||
|
||||
if(!cInfo->AIName || !cInfo->AIName[0])
|
||||
if(CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(temp.creature_id))
|
||||
{
|
||||
//sLog.outErrorDb("CreatureEventAI: Creature Entry %u has EventAI script but its AIName is empty. Set to EventAI as default.", cInfo->Entry);
|
||||
size_t len = strlen("EventAI")+1;
|
||||
const_cast<CreatureInfo*>(cInfo)->AIName = new char[len];
|
||||
strncpy(const_cast<char*>(cInfo->AIName), "EventAI", len);
|
||||
}
|
||||
if(strcmp(cInfo->AIName, "EventAI"))
|
||||
{
|
||||
//sLog.outErrorDb("CreatureEventAI: Creature Entry %u has EventAI script but it has AIName %s. EventAI script will be overriden.", cInfo->Entry, cInfo->AIName);
|
||||
}
|
||||
if(cInfo->ScriptID)
|
||||
{
|
||||
//sLog.outErrorDb("CreatureEventAI: Creature Entry %u has EventAI script but it also has C++ script. EventAI script will be overriden.", cInfo->Entry);
|
||||
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);
|
||||
size_t len = strlen("EventAI")+1;
|
||||
const_cast<CreatureInfo*>(cInfo)->AIName = new char[len];
|
||||
strncpy(const_cast<char*>(cInfo->AIName), "EventAI", len);
|
||||
}
|
||||
if(strcmp(cInfo->AIName, "EventAI"))
|
||||
{
|
||||
//sLog.outErrorDb("CreatureEventAI: Creature Entry %u has EventAI script but it has AIName %s. EventAI script will be overriden.", cInfo->Entry, cInfo->AIName);
|
||||
}
|
||||
if(cInfo->ScriptID)
|
||||
{
|
||||
//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());
|
||||
|
||||
|
||||
@@ -4857,14 +4857,14 @@ uint16 ObjectMgr::GetTaxiMount( uint32 id, uint32 team )
|
||||
mount_entry = node->MountCreatureID[1];
|
||||
CreatureInfo const *ci = GetCreatureTemplate(mount_entry);
|
||||
if(ci)
|
||||
mount_id = ci->Modelid1;
|
||||
mount_id = ci->Modelid_A1;
|
||||
}
|
||||
if (team == HORDE)
|
||||
{
|
||||
mount_entry = node->MountCreatureID[0];
|
||||
CreatureInfo const *ci = GetCreatureTemplate(mount_entry);
|
||||
if(ci)
|
||||
mount_id = ci->Modelid3;
|
||||
mount_id = ci->Modelid_H1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user