mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Target dummies from engi, shuld not runnig with players and fighting with mobs like pets. Also they shuld despawn after 15 sec.
--HG-- branch : trunk
This commit is contained in:
@@ -121,7 +121,7 @@ UPDATE `creature_template` SET `ScriptName`='mob_high_inquisitor_valroth' WHERE
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_demolisher_engineerer' WHERE `entry` IN (30400,30499);
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_valkyr_battle_maiden' WHERE `entry`=28534;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_mirror_image' WHERE `entry`=31216;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_training_dummy' WHERE `entry` IN (17578,24792,32543,32546,32542,32545,30527,31143,31144,31146,32541,32666,32667,16111);
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_training_dummy' WHERE `entry` IN (17578,24792,32543,32546,32542,32545,30527,31143,31144,31146,32541,32666,32667,16111,2674,2673);
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_lightwell' WHERE `entry` IN (31883,31893,31894,31895,31896,31897);
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_ebon_gargoyle' WHERE `entry`=27829;
|
||||
UPDATE `gameobject_template` SET `ScriptName`='go_inconspicuous_mine_car' WHERE `entry`=190767;
|
||||
|
||||
1
sql/updates/6161_world.sql
Normal file
1
sql/updates/6161_world.sql
Normal file
@@ -0,0 +1 @@
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_training_dummy' WHERE `entry` IN (2674,2673);
|
||||
@@ -1835,15 +1835,21 @@ CreatureAI* GetAI_npc_lightwellAI(Creature* pCreature)
|
||||
|
||||
struct TRINITY_DLL_DECL npc_training_dummy : Scripted_NoMovementAI
|
||||
{
|
||||
npc_training_dummy(Creature *c) : Scripted_NoMovementAI(c) {}
|
||||
npc_training_dummy(Creature *c) : Scripted_NoMovementAI(c)
|
||||
{
|
||||
m_Entry = c->GetEntry();
|
||||
}
|
||||
|
||||
uint64 m_Entry;
|
||||
uint32 ResetTimer;
|
||||
uint32 DespawnTimer;
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetControlled(true,UNIT_STAT_STUNNED);//disable rotate
|
||||
m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);//imune to knock aways like blast wave
|
||||
m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true);
|
||||
ResetTimer = 10000;
|
||||
DespawnTimer = 15000;
|
||||
}
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
@@ -1852,7 +1858,11 @@ struct TRINITY_DLL_DECL npc_training_dummy : Scripted_NoMovementAI
|
||||
damage = 0;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who){return;}
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if (m_Entry != 2674 && m_Entry != 2673)
|
||||
return;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
@@ -1860,12 +1870,25 @@ struct TRINITY_DLL_DECL npc_training_dummy : Scripted_NoMovementAI
|
||||
return;
|
||||
if (!m_creature->hasUnitState(UNIT_STAT_STUNNED))
|
||||
m_creature->SetControlled(true,UNIT_STAT_STUNNED);//disable rotate
|
||||
if (ResetTimer <= diff)
|
||||
|
||||
if (m_Entry != 2674 && m_Entry != 2673)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
ResetTimer = 10000;
|
||||
} else ResetTimer -= diff;
|
||||
return;
|
||||
if (ResetTimer <= diff)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
ResetTimer = 10000;
|
||||
}
|
||||
else
|
||||
ResetTimer -= diff;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DespawnTimer <= diff)
|
||||
m_creature->ForcedDespawn();
|
||||
else
|
||||
DespawnTimer -= diff;
|
||||
}
|
||||
}
|
||||
void MoveInLineOfSight(Unit *who){return;}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user