[7914] Fixed variable name typos in creature event AI code. Author: NoFantasy
--HG-- branch : trunk
This commit is contained in:
@@ -413,12 +413,12 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
|||||||
}
|
}
|
||||||
case ACTION_T_MORPH_TO_ENTRY_OR_MODEL:
|
case ACTION_T_MORPH_TO_ENTRY_OR_MODEL:
|
||||||
{
|
{
|
||||||
if (action.morph.creatireId || action.morph.modelId)
|
if (action.morph.creatureId || action.morph.modelId)
|
||||||
{
|
{
|
||||||
//set model based on entry from creature_template
|
//set model based on entry from creature_template
|
||||||
if (action.morph.creatireId)
|
if (action.morph.creatureId)
|
||||||
{
|
{
|
||||||
if (CreatureInfo const* ci = GetCreatureTemplateStore(action.morph.creatireId))
|
if (CreatureInfo const* ci = GetCreatureTemplateStore(action.morph.creatureId))
|
||||||
{
|
{
|
||||||
//use default display
|
//use default display
|
||||||
if (ci->Modelid_A1)
|
if (ci->Modelid_A1)
|
||||||
@@ -520,12 +520,12 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
|||||||
Creature* pCreature = NULL;
|
Creature* pCreature = NULL;
|
||||||
|
|
||||||
if (action.summon.duration)
|
if (action.summon.duration)
|
||||||
pCreature = m_creature->SummonCreature(action.summon.creatured, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, action.summon.duration);
|
pCreature = m_creature->SummonCreature(action.summon.creatureId, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, action.summon.duration);
|
||||||
else
|
else
|
||||||
pCreature = m_creature->SummonCreature(action.summon.creatured, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0);
|
pCreature = m_creature->SummonCreature(action.summon.creatureId, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0);
|
||||||
|
|
||||||
if (!pCreature)
|
if (!pCreature)
|
||||||
sLog.outErrorDb( "CreatureEventAI: failed to spawn creature %u. Spawn event %d is on creature %d", action.summon.creatured, EventId, m_creature->GetEntry());
|
sLog.outErrorDb( "CreatureEventAI: failed to spawn creature %u. Spawn event %d is on creature %d", action.summon.creatureId, EventId, m_creature->GetEntry());
|
||||||
else if (action.summon.target != TARGET_T_SELF && target)
|
else if (action.summon.target != TARGET_T_SELF && target)
|
||||||
pCreature->AI()->AttackStart(target);
|
pCreature->AI()->AttackStart(target);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ struct CreatureEventAI_Action
|
|||||||
// ACTION_T_MORPH_TO_ENTRY_OR_MODEL = 3
|
// ACTION_T_MORPH_TO_ENTRY_OR_MODEL = 3
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
uint32 creatireId; // set one from fields (or 0 for both to demorph)
|
uint32 creatureId; // set one from fields (or 0 for both to demorph)
|
||||||
uint32 modelId;
|
uint32 modelId;
|
||||||
} morph;
|
} morph;
|
||||||
// ACTION_T_SOUND = 4
|
// ACTION_T_SOUND = 4
|
||||||
@@ -236,7 +236,7 @@ struct CreatureEventAI_Action
|
|||||||
// ACTION_T_SUMMON = 12
|
// ACTION_T_SUMMON = 12
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
uint32 creatured;
|
uint32 creatureId;
|
||||||
uint32 target;
|
uint32 target;
|
||||||
uint32 duration;
|
uint32 duration;
|
||||||
} summon;
|
} summon;
|
||||||
|
|||||||
@@ -438,19 +438,19 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ACTION_T_MORPH_TO_ENTRY_OR_MODEL:
|
case ACTION_T_MORPH_TO_ENTRY_OR_MODEL:
|
||||||
if (action.morph.creatireId !=0 || action.morph.modelId !=0)
|
if (action.morph.creatureId !=0 || action.morph.modelId !=0)
|
||||||
{
|
{
|
||||||
if (action.morph.creatireId && !sCreatureStorage.LookupEntry<CreatureInfo>(action.morph.creatireId))
|
if (action.morph.creatureId && !sCreatureStorage.LookupEntry<CreatureInfo>(action.morph.creatureId))
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("CreatureEventAI: Event %u Action %u uses non-existant Creature entry %u.", i, j+1, action.morph.creatireId);
|
sLog.outErrorDb("CreatureEventAI: Event %u Action %u uses non-existant Creature entry %u.", i, j+1, action.morph.creatureId);
|
||||||
action.morph.creatireId = 0;
|
action.morph.creatureId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action.morph.modelId)
|
if (action.morph.modelId)
|
||||||
{
|
{
|
||||||
if (action.morph.creatireId)
|
if (action.morph.creatureId)
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("CreatureEventAI: Event %u Action %u have unused ModelId %u with also set creature id %u.", i, j+1, action.morph.modelId,action.morph.creatireId);
|
sLog.outErrorDb("CreatureEventAI: Event %u Action %u have unused ModelId %u with also set creature id %u.", i, j+1, action.morph.modelId,action.morph.creatureId);
|
||||||
action.morph.modelId = 0;
|
action.morph.modelId = 0;
|
||||||
}
|
}
|
||||||
else if (!sCreatureDisplayInfoStore.LookupEntry(action.morph.modelId))
|
else if (!sCreatureDisplayInfoStore.LookupEntry(action.morph.modelId))
|
||||||
@@ -512,8 +512,8 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ACTION_T_SUMMON:
|
case ACTION_T_SUMMON:
|
||||||
if (!sCreatureStorage.LookupEntry<CreatureInfo>(action.summon.creatured))
|
if (!sCreatureStorage.LookupEntry<CreatureInfo>(action.summon.creatureId))
|
||||||
sLog.outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent creature entry %u.", i, j+1, action.summon.creatured);
|
sLog.outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent creature entry %u.", i, j+1, action.summon.creatureId);
|
||||||
|
|
||||||
if (action.summon.target >= TARGET_T_END)
|
if (action.summon.target >= TARGET_T_END)
|
||||||
sLog.outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
sLog.outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||||
|
|||||||
Reference in New Issue
Block a user