aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-17 16:07:54 -0500
committermegamage <none@none>2009-04-17 16:07:54 -0500
commitad41b0c9e1d9d3a176d22cb42a33dfc1fb1aa55a (patch)
tree6500753f206d3843b9619f9210be1fb0d2a0ff2f /src
parentb9d8bdeddde70359c4a3b115ccb646abb59357cc (diff)
*Fix build.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/CreatureEventAI.cpp7
-rw-r--r--src/game/CreatureEventAIMgr.cpp29
-rw-r--r--src/game/ObjectMgr.cpp4
3 files changed, 21 insertions, 19 deletions
diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp
index 88e922bc16b..bcd3500cb68 100644
--- a/src/game/CreatureEventAI.cpp
+++ b/src/game/CreatureEventAI.cpp
@@ -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;
diff --git a/src/game/CreatureEventAIMgr.cpp b/src/game/CreatureEventAIMgr.cpp
index ab6ca3e4d63..ca483209e87 100644
--- a/src/game/CreatureEventAIMgr.cpp
+++ b/src/game/CreatureEventAIMgr.cpp
@@ -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());
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 3351b001e5b..637b1e9bec3 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -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;
}
}