Merge branch 'master' of github.com:TrinityCore/TrinityCore into mmaps_rw
This commit is contained in:
commit
5145281435
21 files changed
+663
-19
No files matched your search
@@ -112,7 +112,7 @@ public:
|
||||
{
|
||||
std::string name = param1;
|
||||
WorldDatabase.EscapeString(name);
|
||||
whereClause << ", creature_template WHERE creature.id = creature_template.entry AND creature_template.name "_LIKE_" '" << name << '\'';
|
||||
whereClause << ", creature_template WHERE creature.id = creature_template.entry AND creature_template.name " _LIKE_" '" << name << '\'';
|
||||
}
|
||||
else
|
||||
whereClause << "WHERE guid = '" << guid << '\'';
|
||||
|
||||
@@ -238,7 +238,7 @@ public:
|
||||
WorldDatabase.EscapeString(name);
|
||||
result = WorldDatabase.PQuery(
|
||||
"SELECT guid, id, position_x, position_y, position_z, orientation, map, phaseMask, (POW(position_x - %f, 2) + POW(position_y - %f, 2) + POW(position_z - %f, 2)) AS order_ "
|
||||
"FROM gameobject, gameobject_template WHERE gameobject_template.entry = gameobject.id AND map = %i AND name "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'")" ORDER BY order_ ASC LIMIT 1",
|
||||
"FROM gameobject, gameobject_template WHERE gameobject_template.entry = gameobject.id AND map = %i AND name " _LIKE_" " _CONCAT3_("'%%'", "'%s'", "'%%'")" ORDER BY order_ ASC LIMIT 1",
|
||||
player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -170,11 +170,12 @@ public:
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
SpawnedAdds = 0;
|
||||
|
||||
if (me->GetMapId() == 469)
|
||||
{
|
||||
if (!me->FindNearestCreature(NPC_NEFARIAN, 1000.0f, true))
|
||||
_Reset();
|
||||
SpawnedAdds = 0;
|
||||
|
||||
me->SetVisible(true);
|
||||
me->SetPhaseMask(1, true);
|
||||
|
||||
@@ -500,6 +500,8 @@ public:
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
ArcanagosGUID = 0;
|
||||
EventStarted = false;
|
||||
YellTimer = 0;
|
||||
|
||||
if (instance && instance->GetData64(DATA_IMAGE_OF_MEDIVH) == 0)
|
||||
{
|
||||
|
||||
@@ -382,6 +382,7 @@ public:
|
||||
boss_headless_horsemanAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
headGUID = 0;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
@@ -67,6 +67,8 @@ public:
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
ShadowWordPain_Timer = 5000;
|
||||
Yell60 = false;
|
||||
Yell30 = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
|
||||
@@ -593,6 +593,7 @@ public:
|
||||
DespawnTimer = 15000;
|
||||
SpellTimer = 5000;
|
||||
Phase = 0;
|
||||
NeedForAHack = 0;
|
||||
|
||||
me->AddUnitState(UNIT_STATE_STUNNED);
|
||||
DoCastAOE(SPELL_BLACKHOLE_SPAWN, true);
|
||||
|
||||
@@ -229,10 +229,14 @@ class boss_akilzon : public CreatureScript
|
||||
case EVENT_STATIC_DISRUPTION:
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
if (!target) target = me->GetVictim();
|
||||
TargetGUID = target->GetGUID();
|
||||
DoCast(target, SPELL_STATIC_DISRUPTION, false);
|
||||
me->SetInFront(me->GetVictim());
|
||||
if (!target)
|
||||
target = me->GetVictim();
|
||||
if (target)
|
||||
{
|
||||
TargetGUID = target->GetGUID();
|
||||
DoCast(target, SPELL_STATIC_DISRUPTION, false);
|
||||
me->SetInFront(me->GetVictim());
|
||||
}
|
||||
/*if (float dist = me->IsWithinDist3d(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 5.0f) dist = 5.0f;
|
||||
SDisruptAOEVisual_Timer = 1000 + floor(dist / 30 * 1000.0f);*/
|
||||
events.ScheduleEvent(EVENT_STATIC_DISRUPTION, urand(10000, 18000));
|
||||
@@ -241,8 +245,10 @@ class boss_akilzon : public CreatureScript
|
||||
case EVENT_GUST_OF_WIND:
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
if (!target) target = me->GetVictim();
|
||||
DoCast(target, SPELL_GUST_OF_WIND);
|
||||
if (!target)
|
||||
target = me->GetVictim();
|
||||
if (target)
|
||||
DoCast(target, SPELL_GUST_OF_WIND);
|
||||
events.ScheduleEvent(EVENT_GUST_OF_WIND, urand(20000, 30000));
|
||||
break;
|
||||
}
|
||||
|
||||
+5
-3
@@ -245,7 +245,6 @@ class boss_anubarak_trial : public CreatureScript
|
||||
|
||||
void JustSummoned(Creature* summoned) OVERRIDE
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true);
|
||||
switch (summoned->GetEntry())
|
||||
{
|
||||
case NPC_BURROW:
|
||||
@@ -255,9 +254,12 @@ class boss_anubarak_trial : public CreatureScript
|
||||
summoned->SetDisplayId(summoned->GetCreatureTemplate()->Modelid2);
|
||||
break;
|
||||
case NPC_SPIKE:
|
||||
summoned->CombatStart(target);
|
||||
summoned->SetDisplayId(summoned->GetCreatureTemplate()->Modelid1);
|
||||
Talk(EMOTE_SPIKE, target);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
{
|
||||
summoned->CombatStart(target);
|
||||
Talk(EMOTE_SPIKE, target);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -170,7 +170,7 @@ class instance_drak_tharon_keep : public InstanceMapScript
|
||||
return saveStream.str();
|
||||
}
|
||||
|
||||
void Load(char const* str) OVERRIDE OVERRIDE
|
||||
void Load(char const* str) OVERRIDE
|
||||
{
|
||||
if (!str)
|
||||
{
|
||||
|
||||
@@ -1377,7 +1377,7 @@ public:
|
||||
|
||||
void EnterEvadeMode() OVERRIDE
|
||||
{
|
||||
if (!me->GetOwner()->HasAura(AURA_HALLUCINATION))
|
||||
if (me->GetOwner() && !me->GetOwner()->HasAura(AURA_HALLUCINATION))
|
||||
npc_phantom_mage::npc_phantom_mageAI::EnterEvadeMode();
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +70,12 @@ public:
|
||||
{
|
||||
boss_ormorokAI(Creature* creature) : BossAI(creature, DATA_ORMOROK_EVENT) { }
|
||||
|
||||
void Reset()
|
||||
{
|
||||
BossAI::Reset();
|
||||
frenzy = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
|
||||
@@ -748,6 +748,7 @@ public:
|
||||
npc_ashtongue_sorcererAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
startedBanishing = false;
|
||||
}
|
||||
|
||||
void Reset() OVERRIDE
|
||||
|
||||
+1
@@ -320,6 +320,7 @@ public:
|
||||
boss_fathomguard_sharkkisAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
SummonedPet = 0;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
Reference in new issue
Block a user