Scripts/Uldaman: Archaedas now Awaken his minnions & spawn of npc lore keeper of norgannon

Closes #765
This commit is contained in:
neuro_999
2012-08-27 16:26:45 +01:00
committed by Nay
parent d07be0cf61
commit b0256c30a4
3 changed files with 15 additions and 5 deletions
@@ -0,0 +1,4 @@
SET @GUID = 42638; -- Set by TDB team (need X)
DELETE FROM `creature` WHERE `guid`=@GUID AND `id`=7172;
INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES
(@GUID,7172,70,1,1,0,0,150.466,306.014,-49.543,5.2359,300,0,0,1,0,0,0,0,0);
@@ -95,14 +95,17 @@ class boss_archaedas : public CreatureScript
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
}
void ActivateMinion(uint64 uiGuid, bool bFlag)
void ActivateMinion(uint64 uiGuid, bool flag)
{
Unit* pMinion = Unit::GetUnit(*me, uiGuid);
Unit* minion = Unit::GetUnit(*me, uiGuid);
if (pMinion && pMinion->isAlive())
if (minion && minion->isAlive())
{
DoCast(pMinion, SPELL_AWAKEN_VAULT_WALKER, bFlag);
pMinion->CastSpell(pMinion, SPELL_ARCHAEDAS_AWAKEN, true);
DoCast(minion, SPELL_AWAKEN_VAULT_WALKER, flag);
minion->CastSpell(minion, SPELL_ARCHAEDAS_AWAKEN, true);
minion->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
minion->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE);
minion->setFaction(14);
}
}
@@ -202,6 +202,9 @@ class instance_uldaman : public InstanceMapScript
continue;
archaedas->CastSpell(target, SPELL_AWAKEN_VAULT_WALKER, true);
target->CastSpell(target, SPELL_ARCHAEDAS_AWAKEN, true);
target->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE);
target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
target->setFaction(14);
return; // only want the first one we find
}
}