Fixes for numhits system

Implementation of new spell table fields
Update and further implemention of CastRestriction
This commit is contained in:
KayenEQ
2014-02-13 07:41:57 -05:00
parent e09adbd13d
commit 5344679c7c
13 changed files with 450 additions and 190 deletions
+4
View File
@@ -1704,11 +1704,13 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
sp[tempid].ResistDiff=atoi(row[147]);
sp[tempid].dot_stacking_exempt=atoi(row[148]);
sp[tempid].RecourseLink = atoi(row[150]);
sp[tempid].no_partial_resist = atoi(row[161]) != 0;
sp[tempid].short_buff_box = atoi(row[154]);
sp[tempid].descnum = atoi(row[155]);
sp[tempid].effectdescnum = atoi(row[157]);
sp[tempid].not_reflectable = atoi(row[161]) != 0;
sp[tempid].bonushate=atoi(row[162]);
sp[tempid].EndurCost=atoi(row[166]);
@@ -1736,6 +1738,8 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
sp[tempid].powerful_flag=atoi(row[209]);
sp[tempid].CastRestriction = atoi(row[211]);
sp[tempid].AllowRest = atoi(row[212]) != 0;
sp[tempid].NotOutofCombat = atoi(row[213]) != 0;
sp[tempid].NotInCombat = atoi(row[214]) != 0;
sp[tempid].persistdeath = atoi(row[224]) != 0;
sp[tempid].DamageShieldType = 0;
}
+3
View File
@@ -387,6 +387,9 @@ bool IsAERainNukeSpell(uint16 spell_id)
bool IsPartialCapableSpell(uint16 spell_id)
{
if (spells[spell_id].no_partial_resist)
return false;
if (IsPureNukeSpell(spell_id) || IsFearSpell(spell_id) ||
IsEffectInSpell(spell_id, SE_Root) ||
IsEffectInSpell(spell_id, SE_Charm))
+13 -8
View File
@@ -680,15 +680,18 @@ struct SPDat_Spell_Struct
/* 148 */ int8 dot_stacking_exempt; // If 1 doesn't stack with self cast by others. If -1 (not implemented) doesn't stack with same effect (???)
/* 149 */ //int deletable;
/* 150 */ uint16 RecourseLink;
/* 151 */ // 151: -1, 0, or 1
/* 151 */ bool no_partial_resist; // 151: -1, 0, or 1
// 152 & 153: all set to 0
/* 154 */ int8 short_buff_box; // != 0, goes to short buff box.
/* 155 */ int descnum; // eqstr of description of spell
/* 156 */ //int typedescnum; // eqstr of type description
/* 157 */ int effectdescnum; // eqstr of effect description
/* 158 */
/* 158 */ //Category Desc ID 3
/* 159 */ //bool npc_no_los;
/* 161 */ bool not_reflectable;
/* 162 */ int bonushate;
/* 163 */
/* 164 */ // for most spells this appears to mimic ResistDiff
/* 166 */ int EndurCost;
/* 167 */ int8 EndurTimerIndex;
/* 168 */ //int IsDisciplineBuff; //Will goto the combat window when cast
@@ -709,8 +712,8 @@ struct SPDat_Spell_Struct
/* 191 */ uint8 viral_targets;
/* 192 */ uint8 viral_timer;
/* 193 */ int NimbusEffect;
/* 194 */ float directional_start;
/* 195 */ float directional_end;
/* 194 */ float directional_start; //Cone Start Angle:
/* 195 */ float directional_end; // Cone End Angle:
/* 196 */
/* 197 */ bool not_extendable;
/* 198- 199 */
@@ -719,12 +722,14 @@ struct SPDat_Spell_Struct
/* 203 */ //int songcap; // individual song cap (how live currently does it, not implemented)
/* 204 - 206 */
/* 207 */ int spellgroup;
/* 208 */
/* 209 */ int powerful_flag; // Need more investigation to figure out what to call this, for now we know -1 makes charm spells not break before their duration is complete, it does alot more though
/* 210 */
/* 208 */ // int rank - increments AA effects with same name
/* 209 */ int powerful_flag; // Need more investigation to figure out what to call this, for now we know -1 makes charm spells not break before their duration is complete, it does alot more though
/* 210 */ // bool DurationFrozen; ???
/* 211 */ int CastRestriction; //Various restriction categories for spells most seem targetable race related but have also seen others for instance only castable if target hp 20% or lower or only if target out of combat
/* 212 */ bool AllowRest;
/* 213 - 218 */
/* 213 */ bool NotOutofCombat; //Fail if cast out of combat
/* 214 */ bool NotInCombat; //Fail if cast in combat
/* 215 - 218 */
/* 219 */ //int maxtargets; // is used for beam and ring spells for target # limits (not implemented)
/* 220 - 223 */
/* 224 */ bool persistdeath; // buff doesn't get stripped on death