Update/Implementation of various fields in spells_new

219 not_extendable - > not_focusable - No focus are applied to these spells
217 maxtargets -> no_heal_damage_item_mod - Not applied to these spells.
232 -> no_remove -> Can not click off these spells even if beneficial
209 powerful_flag -> no_resist -> Unresistable spell
This commit is contained in:
KayenEQ
2015-10-08 11:49:21 -04:00
parent ffe1bede52
commit c35eacbc99
10 changed files with 590 additions and 23 deletions
+1 -1
View File
@@ -1240,7 +1240,7 @@ bool Mob::PassCharismaCheck(Mob* caster, uint16 spell_id) {
if(IsCharmSpell(spell_id)) {
if (spells[spell_id].powerful_flag == -1) //If charm spell has this set(-1), it can not break till end of duration.
if (spells[spell_id].no_resist) //If charm spell has this set(-1), it can not break till end of duration.
return true;
//1: The mob has a default 25% chance of being allowed a resistance check against the charm.
+1 -1
View File
@@ -3734,7 +3734,7 @@ void Client::Handle_OP_BuffRemoveRequest(const EQApplicationPacket *app)
uint16 SpellID = m->GetSpellIDFromSlot(brrs->SlotID);
if (SpellID && IsBeneficialSpell(SpellID))
if (SpellID && IsBeneficialSpell(SpellID) && !spells[SpellID].no_remove)
m->BuffFadeBySlot(brrs->SlotID, true);
}
+3 -6
View File
@@ -112,7 +112,7 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
value -= GetFocusEffect(focusFcDamageAmt, spell_id);
value -= GetFocusEffect(focusFcDamageAmt2, spell_id);
if(itembonuses.SpellDmg && spells[spell_id].classes[(GetClass()%16) - 1] >= GetLevel() - 5)
if(!spells[spell_id].no_heal_damage_item_mod && itembonuses.SpellDmg && spells[spell_id].classes[(GetClass()%16) - 1] >= GetLevel() - 5)
value -= GetExtraSpellAmt(spell_id, itembonuses.SpellDmg, value)*ratio/100;
else if (IsNPC() && CastToNPC()->GetSpellScale())
@@ -145,7 +145,7 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
value -= GetFocusEffect(focusFcDamageAmt, spell_id);
value -= GetFocusEffect(focusFcDamageAmt2, spell_id);
if(itembonuses.SpellDmg && spells[spell_id].classes[(GetClass()%16) - 1] >= GetLevel() - 5)
if(!spells[spell_id].no_heal_damage_item_mod && itembonuses.SpellDmg && spells[spell_id].classes[(GetClass()%16) - 1] >= GetLevel() - 5)
value -= GetExtraSpellAmt(spell_id, itembonuses.SpellDmg, value);
if (IsNPC() && CastToNPC()->GetSpellScale())
@@ -287,7 +287,7 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
value += GetFocusEffect(focusFcHealAmt, spell_id);
value += target->GetFocusIncoming(focusFcHealAmtIncoming, SE_FcHealAmtIncoming, this, spell_id);
if(itembonuses.HealAmt && spells[spell_id].classes[(GetClass()%16) - 1] >= GetLevel() - 5)
if(!spells[spell_id].no_heal_damage_item_mod && itembonuses.HealAmt && spells[spell_id].classes[(GetClass()%16) - 1] >= GetLevel() - 5)
value += GetExtraSpellAmt(spell_id, itembonuses.HealAmt, value) * modifier;
value += value*target->GetHealRate(spell_id, this)/100;
@@ -430,9 +430,6 @@ int32 Client::GetActSpellCost(uint16 spell_id, int32 cost)
int32 Mob::GetActSpellDuration(uint16 spell_id, int32 duration)
{
if (spells[spell_id].not_extendable)
return duration;
int increase = 100;
increase += GetFocusEffect(focusSpellDuration, spell_id);
int tic_inc = 0;
+2 -2
View File
@@ -406,7 +406,7 @@ int Lua_Spell::GetSpellGroup() {
int Lua_Spell::GetPowerfulFlag() {
Lua_Safe_Call_Int();
return self->powerful_flag;
return self->no_resist;
}
int Lua_Spell::GetCastRestriction() {
@@ -436,7 +436,7 @@ int Lua_Spell::GetAEMaxTargets() {
int Lua_Spell::GetMaxTargets() {
Lua_Safe_Call_Int();
return self->maxtargets;
return self->no_heal_damage_item_mod;
}
bool Lua_Spell::GetPersistDeath() {
+3 -3
View File
@@ -5598,18 +5598,18 @@ int32 Mob::GetSpellStat(uint32 spell_id, const char *identifier, uint8 slot)
else if (id == "NimbusEffect") {return spells[spell_id].NimbusEffect; }
else if (id == "directional_start") {return static_cast<int32>(spells[spell_id].directional_start); }
else if (id == "directional_end") {return static_cast<int32>(spells[spell_id].directional_end); }
else if (id == "not_extendable") {return spells[spell_id].not_extendable; }
else if (id == "not_focusable") {return spells[spell_id].not_focusable; }
else if (id == "suspendable") {return spells[spell_id].suspendable; }
else if (id == "viral_range") {return spells[spell_id].viral_range; }
else if (id == "spellgroup") {return spells[spell_id].spellgroup; }
else if (id == "rank") {return spells[spell_id].rank; }
else if (id == "powerful_flag") {return spells[spell_id].powerful_flag; }
else if (id == "no_resist") {return spells[spell_id].no_resist; }
else if (id == "CastRestriction") {return spells[spell_id].CastRestriction; }
else if (id == "AllowRest") {return spells[spell_id].AllowRest; }
else if (id == "InCombat") {return spells[spell_id].InCombat; }
else if (id == "OutofCombat") {return spells[spell_id].OutofCombat; }
else if (id == "aemaxtargets") {return spells[spell_id].aemaxtargets; }
else if (id == "maxtargets") {return spells[spell_id].maxtargets; }
else if (id == "no_heal_damage_item_mod") {return spells[spell_id].no_heal_damage_item_mod; }
else if (id == "persistdeath") {return spells[spell_id].persistdeath; }
else if (id == "min_dist") {return static_cast<int32>(spells[spell_id].min_dist); }
else if (id == "min_dist_mod") {return static_cast<int32>(spells[spell_id].min_dist_mod); }
+7 -1
View File
@@ -780,7 +780,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
// define spells with fixed duration
// charm spells with -1 in field 209 are all of fixed duration, so lets use that instead of spell_ids
if(spells[spell_id].powerful_flag == -1)
if(spells[spell_id].no_resist)
bBreak = true;
if (!bBreak)
@@ -5228,6 +5228,9 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id)
if (IsBardSong(spell_id) && type != focusFcBaseEffects && type != focusSpellDuration)
return 0;
if (spells[spell_id].not_focusable)
return 0;
int16 realTotal = 0;
int16 realTotal2 = 0;
int16 realTotal3 = 0;
@@ -5499,6 +5502,9 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id)
int16 NPC::GetFocusEffect(focusType type, uint16 spell_id) {
if (spells[spell_id].not_focusable)
return 0;
int16 realTotal = 0;
int16 realTotal2 = 0;
bool rand_effectiveness = false;
+1 -1
View File
@@ -4298,7 +4298,7 @@ float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use
}
//Get the resist chance for the target
if(resist_type == RESIST_NONE)
if(resist_type == RESIST_NONE || spells[spell_id].no_resist)
{
Log.Out(Logs::Detail, Logs::Spells, "Spell was unresistable");
return 100;