mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-04 22:56:37 +00:00
[Spells Cleanup] Unify and add most hardcoded spell IDs (#1438)
Move the newer stuff added that was recently to the same place all of our previous spell IDs were defined. Either of these solutions were good, but I went with defines since it was less changes I also added a bunch of stuff the client has hardcoded behavior for, but not currently implemented by us. The removed stuff from the command_castspell were reused on live, so I figured it was best to remove them from the restrictions since they are no longer test spells
This commit is contained in:
committed by
GitHub
parent
5a2b5cd295
commit
1c75236508
+1
-1
@@ -3444,7 +3444,7 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
||||
bool FromDamageShield = (skill_used == EQ::skills::SkillAbjuration);
|
||||
bool ignore_invul = false;
|
||||
if (IsValidSpell(spell_id))
|
||||
ignore_invul = spell_id == 982 || spells[spell_id].cast_not_standing; // cazic touch
|
||||
ignore_invul = spell_id == SPELL_CAZIC_TOUCH || spells[spell_id].cast_not_standing;
|
||||
|
||||
if (!ignore_invul && (GetInvul() || DivineAura())) {
|
||||
LogCombat("Avoiding [{}] damage due to invulnerability", damage);
|
||||
|
||||
+39
-7
@@ -2939,6 +2939,44 @@ void command_findspell(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
|
||||
inline bool CastRestrictedSpell(int spellid)
|
||||
{
|
||||
switch (spellid) {
|
||||
case SPELL_TOUCH_OF_VINITRAS:
|
||||
case SPELL_DESPERATE_HOPE:
|
||||
case SPELL_CHARM:
|
||||
case SPELL_METAMORPHOSIS65:
|
||||
case SPELL_JT_BUFF:
|
||||
case SPELL_CAN_O_WHOOP_ASS:
|
||||
case SPELL_PHOENIX_CHARM:
|
||||
case SPELL_CAZIC_TOUCH:
|
||||
case SPELL_AVATAR_KNOCKBACK:
|
||||
case SPELL_SHAPECHANGE65:
|
||||
case SPELL_SUNSET_HOME1218:
|
||||
case SPELL_SUNSET_HOME819:
|
||||
case SPELL_SHAPECHANGE75:
|
||||
case SPELL_SHAPECHANGE80:
|
||||
case SPELL_SHAPECHANGE85:
|
||||
case SPELL_SHAPECHANGE90:
|
||||
case SPELL_SHAPECHANGE95:
|
||||
case SPELL_SHAPECHANGE100:
|
||||
case SPELL_SHAPECHANGE25:
|
||||
case SPELL_SHAPECHANGE30:
|
||||
case SPELL_SHAPECHANGE35:
|
||||
case SPELL_SHAPECHANGE40:
|
||||
case SPELL_SHAPECHANGE45:
|
||||
case SPELL_SHAPECHANGE50:
|
||||
case SPELL_NPC_AEGOLISM:
|
||||
case SPELL_SHAPECHANGE55:
|
||||
case SPELL_SHAPECHANGE60:
|
||||
case SPELL_COMMAND_OF_DRUZZIL:
|
||||
case SPELL_SHAPECHANGE70:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void command_castspell(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (!sep->IsNumber(1))
|
||||
@@ -2948,13 +2986,7 @@ void command_castspell(Client *c, const Seperator *sep)
|
||||
/*
|
||||
Spell restrictions.
|
||||
*/
|
||||
if (((spellid == 2859) || (spellid == 841) || (spellid == 300) || (spellid == 2314) ||
|
||||
(spellid == 3716) || (spellid == 911) || (spellid == 3014) || (spellid == 982) ||
|
||||
(spellid == 905) || (spellid == 2079) || (spellid == 1218) || (spellid == 819) ||
|
||||
((spellid >= 780) && (spellid <= 785)) || ((spellid >= 1200) && (spellid <= 1205)) ||
|
||||
((spellid >= 1342) && (spellid <= 1348)) || (spellid == 1923) || (spellid == 1924) ||
|
||||
(spellid == 3355)) &&
|
||||
c->Admin() < commandCastSpecials)
|
||||
if (CastRestrictedSpell(spellid) && c->Admin() < commandCastSpecials)
|
||||
c->Message(Chat::Red, "Unable to cast spell.");
|
||||
else if (spellid >= SPDAT_RECORDS)
|
||||
c->Message(Chat::White, "Error: #CastSpell: Argument out of range");
|
||||
|
||||
+1
-1
@@ -2047,7 +2047,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
|
||||
return false;
|
||||
|
||||
//Death Touch targets the pet owner instead of the pet when said pet is tanking.
|
||||
if ((RuleB(Spells, CazicTouchTargetsPetOwner) && spell_target && spell_target->HasOwner()) && spell_id == DB_SPELL_CAZIC_TOUCH || spell_id == DB_SPELL_TOUCH_OF_VINITRAS) {
|
||||
if ((RuleB(Spells, CazicTouchTargetsPetOwner) && spell_target && spell_target->HasOwner()) && spell_id == SPELL_CAZIC_TOUCH || spell_id == SPELL_TOUCH_OF_VINITRAS) {
|
||||
Mob* owner = spell_target->GetOwner();
|
||||
|
||||
if (owner) {
|
||||
|
||||
Reference in New Issue
Block a user