Core/Spells: move some spells so spellscripts

This commit is contained in:
joschiwald
2014-01-26 01:02:20 +01:00
parent 3c0b906a86
commit 96060bf007
8 changed files with 265 additions and 101 deletions
+7 -31
View File
@@ -5668,17 +5668,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
break;
}
}
// Retaliation
if (dummySpell->SpellFamilyFlags[1] & 0x8)
{
// check attack comes not from behind
if (!HasInArc(M_PI, victim) || HasUnitState(UNIT_STATE_STUNNED))
return false;
triggered_spell_id = 22858;
break;
}
// Second Wind
if (dummySpell->SpellIconID == 1697)
{
@@ -5708,19 +5697,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
triggered_spell_id = 58374;
break;
}
// Glyph of Sunder Armor
if (dummySpell->Id == 58387)
{
if (!victim || !victim->IsAlive() || !procSpell)
return false;
target = SelectNearbyTarget(victim);
if (!target)
return false;
triggered_spell_id = 58567;
break;
}
break;
}
case SPELLFAMILY_WARLOCK:
@@ -9365,9 +9341,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
}
if (minion->m_Properties && minion->m_Properties->Type == SUMMON_TYPE_MINIPET)
{
SetCritterGUID(minion->GetGUID());
}
// PvP, FFAPvP
minion->SetByteValue(UNIT_FIELD_BYTES_2, 1, GetByteValue(UNIT_FIELD_BYTES_2, 1));
@@ -13274,12 +13248,14 @@ void Unit::SetLevel(uint8 lvl)
{
SetUInt32Value(UNIT_FIELD_LEVEL, lvl);
// group update
if (GetTypeId() == TYPEID_PLAYER && ToPlayer()->GetGroup())
ToPlayer()->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_LEVEL);
if (Player* player = ToPlayer())
{
// group update
if (player->GetGroup())
player->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_LEVEL);
if (GetTypeId() == TYPEID_PLAYER)
sWorld->UpdateCharacterNameDataLevel(ToPlayer()->GetGUIDLow(), lvl);
sWorld->UpdateCharacterNameDataLevel(GetGUIDLow(), lvl);
}
}
void Unit::SetHealth(uint32 val)