Partially implement dot_stacking_exempt

When it is 1 the spell will block it from other casters
Not 100% sure on when it's -1 so not currently used
This commit is contained in:
Michael Cook 2013-11-19 17:43:40 -05:00
parent edd4d47929
commit e33eb9d7b0
4 changed files with 13 additions and 5 deletions

View File

@ -1,5 +1,8 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 11/19/2013 ==
demonstar55: Partially make use of dot_stacking_exempt (case when it's 1 is implemented, -1 case isn't)
== 11/18/2013 ==
demonstar55: Added assistradius to npc_types, defaults to aggroradius if set to 0 (old behaviour)

View File

@ -1702,6 +1702,7 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
sp[tempid].uninterruptable=atoi(row[146]);
sp[tempid].ResistDiff=atoi(row[147]);
sp[tempid].dot_stacking_exempt=atoi(row[148]);
sp[tempid].RecourseLink = atoi(row[150]);
sp[tempid].short_buff_box = atoi(row[154]);

View File

@ -660,7 +660,7 @@ struct SPDat_Spell_Struct
/* 145 */ //int16 spellanim; // Doesn't look like it's the same as #doanim, so not sure what this is
/* 146 */ int8 uninterruptable; // Looks like anything != 0 is uninterruptable. Values are mostly -1, 0, & 1 (Fetid Breath = 90?)
/* 147 */ int16 ResistDiff;
/* 148 */ //int dot_stacking_exempt;
/* 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

View File

@ -2519,12 +2519,16 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
mlog(SPELLS__STACKING, "Check Stacking on old %s (%d) @ lvl %d (by %s) vs. new %s (%d) @ lvl %d (by %s)", sp1.name, spellid1, caster_level1, (caster1==nullptr)?"Nobody":caster1->GetName(), sp2.name, spellid2, caster_level2, (caster2==nullptr)?"Nobody":caster2->GetName());
if(((spellid1 == spellid2) && (spellid1 == 2751)) || //special case spells that will block each other no matter what
((spellid1 == spellid2) && (spellid1 == 2755)) //manaburn / lifeburn
){
mlog(SPELLS__STACKING, "Blocking spell because manaburn/lifeburn does not stack with itself");
// Same Spells and dot exemption is set to 1 or spell is Manaburn
if (spellid1 == spellid2) {
if (sp1.dot_stacking_exempt == 1 && caster1 != caster2) { // same caster can refresh
mlog(SPELLS__STACKING, "Blocking spell due to dot stacking exemption.");
return -1;
} else if (spellid1 == 2751) {
mlog(SPELLS__STACKING, "Blocking spell because manaburn does not stack with itself.");
return -1;
}
}
int modval = mod_spell_stack(spellid1, caster_level1, caster1, spellid2, caster_level2, caster2);
if(modval < 2) { return(modval); }