Scripts/Icecrown Citadel: Only one Mutated Abomination can exist during Professor Putricide encounter

Scripts/Spells: Added blizzlike error messages for certain spells
Scripts/Items: Removed obsolete scripts
This commit is contained in:
Shauren
2011-03-04 23:53:11 +01:00
parent 22cd262e6c
commit 36f848a4c2
13 changed files with 260 additions and 130 deletions
@@ -81,6 +81,33 @@ void SummonList::DespawnAll()
}
}
void SummonList::RemoveNotExisting()
{
for (iterator i = begin(); i != end();)
{
if (Unit::GetCreature(*me, *i))
++i;
else
erase(i++);
}
}
bool SummonList::HasEntry(uint32 entry)
{
for (iterator i = begin(); i != end();)
{
Creature* summon = Unit::GetCreature(*me, *i);
if (!summon)
erase(i++);
else if (summon->GetEntry() == entry)
return true;
else
++i;
}
return false;
}
ScriptedAI::ScriptedAI(Creature* pCreature) : CreatureAI(pCreature),
me(pCreature),
IsFleeing(false),
@@ -36,6 +36,8 @@ class SummonList : public std::list<uint64>
void DespawnAll();
void DoAction(uint32 entry, uint32 info);
void DoZoneInCombat(uint32 entry = 0);
void RemoveNotExisting();
bool HasEntry(uint32 entry);
private:
Creature *me;
};
@@ -1045,7 +1045,7 @@ enum SpellCustomErrors
SPELL_CUSTOM_ERROR_MUST_BE_DEATH_KNIGHT = 33, // Only Death Knights may enter Ebon Hold.
SPELL_CUSTOM_ERROR_MUST_BE_IN_FERAL_FORM = 34, // Must be in Cat Form, Bear Form, or Dire Bear Form
SPELL_CUSTOM_ERROR_MUST_BE_NEAR_HELPLESS_VILLAGER = 35, // You must be within range of a Helpless Wintergarde Villager.
SPELL_CUSTOM_ERROR_MUST_TARGET_ELEMENTAL_MECHANICAL = 36, // You cannot target an elemental or mechanical corpse.
SPELL_CUSTOM_ERROR_CANT_TARGET_ELEMENTAL_MECHANICAL = 36, // You cannot target an elemental or mechanical corpse.
SPELL_CUSTOM_ERROR_MUST_HAVE_USED_DALARAN_CRYSTAL = 37, // This teleport crystal cannot be used until the teleport crystal in Dalaran has been used at least once.
SPELL_CUSTOM_ERROR_YOU_ALREADY_HOLD_SOMETHING = 38, // You are already holding something in your hand. You must throw the creature in your hand before picking up another.
SPELL_CUSTOM_ERROR_YOU_DONT_HOLD_ANYTHING = 39, // You don't have anything to throw! Find a Vargul and use Gymer Grab to pick one up!
-9
View File
@@ -4826,15 +4826,6 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
if (unitTarget && m_originalCaster)
m_originalCaster->CastSpell(unitTarget, urand(0, 1) ? damage : 52505, true);
return;
// Death Gate
case 52751:
{
if (!unitTarget || unitTarget->getClass() != CLASS_DEATH_KNIGHT)
return;
// triggered spell is stored in m_spellInfo->EffectBasePoints[0]
unitTarget->CastSpell(unitTarget, damage, false);
break;
}
case 53110: // Devour Humanoid
if (unitTarget)
unitTarget->CastSpell(m_caster, damage, true);