Merge pull request #291 from KayenEQ/Development

Support for spell field to determine if a spell can be blocked or not.
This commit is contained in:
JJ 2014-11-14 07:31:39 -05:00
commit 5434c47d1f
5 changed files with 26 additions and 5 deletions

View File

@ -1526,6 +1526,7 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
sp[tempid].CastingAnim=atoi(row[120]); sp[tempid].CastingAnim=atoi(row[120]);
sp[tempid].SpellAffectIndex=atoi(row[123]); sp[tempid].SpellAffectIndex=atoi(row[123]);
sp[tempid].disallow_sit=atoi(row[124]); sp[tempid].disallow_sit=atoi(row[124]);
sp[tempid].diety_agnostic=atoi(row[125]);
for (y = 0; y < 16; y++) for (y = 0; y < 16; y++)
sp[tempid].deities[y]=atoi(row[126+y]); sp[tempid].deities[y]=atoi(row[126+y]);
@ -1544,6 +1545,7 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
sp[tempid].reflectable = atoi(row[161]) != 0; sp[tempid].reflectable = atoi(row[161]) != 0;
sp[tempid].bonushate=atoi(row[162]); sp[tempid].bonushate=atoi(row[162]);
sp[tempid].ldon_trap = atoi(row[165]) != 0;
sp[tempid].EndurCost=atoi(row[166]); sp[tempid].EndurCost=atoi(row[166]);
sp[tempid].EndurTimerIndex=atoi(row[167]); sp[tempid].EndurTimerIndex=atoi(row[167]);
sp[tempid].IsDisciplineBuff = atoi(row[168]) != 0; sp[tempid].IsDisciplineBuff = atoi(row[168]) != 0;
@ -1568,6 +1570,7 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
sp[tempid].not_extendable = atoi(row[197]) != 0; sp[tempid].not_extendable = atoi(row[197]) != 0;
sp[tempid].suspendable = atoi(row[200]) != 0; sp[tempid].suspendable = atoi(row[200]) != 0;
sp[tempid].viral_range = atoi(row[201]); sp[tempid].viral_range = atoi(row[201]);
sp[tempid].no_block = atoi(row[205]);
sp[tempid].spellgroup=atoi(row[207]); sp[tempid].spellgroup=atoi(row[207]);
sp[tempid].rank = atoi(row[208]); sp[tempid].rank = atoi(row[208]);
sp[tempid].powerful_flag=atoi(row[209]); sp[tempid].powerful_flag=atoi(row[209]);

View File

@ -676,7 +676,7 @@ struct SPDat_Spell_Struct
/* 122 */ //uint32 TravelType; /* 122 */ //uint32 TravelType;
/* 123 */ uint16 SpellAffectIndex; /* 123 */ uint16 SpellAffectIndex;
/* 124 */ int8 disallow_sit; // 124: high-end Yaulp spells (V, VI, VII, VIII [Rk 1, 2, & 3], & Gallenite's Bark of Fury /* 124 */ int8 disallow_sit; // 124: high-end Yaulp spells (V, VI, VII, VIII [Rk 1, 2, & 3], & Gallenite's Bark of Fury
/* 125 */ // 125: Words of the Skeptic /* 125 */ int8 diety_agnostic;// 125: Words of the Skeptic
/* 126 */ int8 deities[16]; // Deity check. 201 - 216 per http://www.eqemulator.net/wiki/wikka.php?wakka=DeityList /* 126 */ int8 deities[16]; // Deity check. 201 - 216 per http://www.eqemulator.net/wiki/wikka.php?wakka=DeityList
// -1: Restrict to Deity; 1: Restrict to Deity, but only used on non-Live (Test Server "Blessing of ...") spells; 0: Don't restrict // -1: Restrict to Deity; 1: Restrict to Deity, but only used on non-Live (Test Server "Blessing of ...") spells; 0: Don't restrict
/* 142 */ // 142: between 0 & 100 /* 142 */ // 142: between 0 & 100
@ -700,6 +700,7 @@ struct SPDat_Spell_Struct
/* 162 */ int bonushate; /* 162 */ int bonushate;
/* 163 */ /* 163 */
/* 164 */ // for most spells this appears to mimic ResistDiff /* 164 */ // for most spells this appears to mimic ResistDiff
/* 165 */ bool ldon_trap; //Flag found on all LDON trap / chest related spells.
/* 166 */ int EndurCost; /* 166 */ int EndurCost;
/* 167 */ int8 EndurTimerIndex; /* 167 */ int8 EndurTimerIndex;
/* 168 */ bool IsDisciplineBuff; //Will goto the combat window when cast /* 168 */ bool IsDisciplineBuff; //Will goto the combat window when cast
@ -712,9 +713,14 @@ struct SPDat_Spell_Struct
/* 178 */ int pvpresistcalc; /* 178 */ int pvpresistcalc;
/* 179 */ int pvpresistcap; /* 179 */ int pvpresistcap;
/* 180 */ int spell_category; /* 180 */ int spell_category;
/* 181 */ /* 181 */ //unknown - likely buff duration related
/* 182 */ //unknown - likely buff duration related
/* 183 */
/* 184 */
/* 185 */ int8 can_mgb; // 0=no, -1 or 1 = yes /* 185 */ int8 can_mgb; // 0=no, -1 or 1 = yes
/* 186 */ int dispel_flag; /* 186 */ int dispel_flag;
/* 187 */ //int npc_category;
/* 188 */ //int npc_usefulness;
/* 189 */ int MinResist; /* 189 */ int MinResist;
/* 190 */ int MaxResist; /* 190 */ int MaxResist;
/* 191 */ uint8 viral_targets; /* 191 */ uint8 viral_targets;
@ -729,7 +735,9 @@ struct SPDat_Spell_Struct
/* 201 */ int viral_range; /* 201 */ int viral_range;
/* 202 */ /* 202 */
/* 203 */ //int songcap; // individual song cap (how live currently does it, not implemented) /* 203 */ //int songcap; // individual song cap (how live currently does it, not implemented)
/* 204 - 206 */ /* 204 */
/* 205 */ bool no_block;
/* 206 */
/* 207 */ int spellgroup; /* 207 */ int spellgroup;
/* 208 */ int rank; //increments AA effects with same name /* 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 /* 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

View File

@ -0,0 +1,9 @@
-- spells new table update
ALTER TABLE `spells_new` CHANGE `field124` `disallow_sit` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `spells_new` CHANGE `field125` `deities0` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `spells_new` CHANGE `field196` `sneaking` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `spells_new` CHANGE `field158` `effectdescnum2` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `spells_new` CHANGE `field165` `ldon_trap` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `spells_new` CHANGE `field205` `no_block` INT(11) NOT NULL DEFAULT '0';

View File

@ -3770,7 +3770,7 @@ void Client::Handle_OP_BlockedBuffs(const EQApplicationPacket *app)
for (unsigned int i = 0; i < BLOCKED_BUFF_COUNT; ++i) for (unsigned int i = 0; i < BLOCKED_BUFF_COUNT; ++i)
{ {
if ((bbs->SpellID[i] > 0) && IsBeneficialSpell(bbs->SpellID[i])) if ((IsValidSpell(bbs->SpellID[i])) && IsBeneficialSpell(bbs->SpellID[i]) && !spells[bbs->SpellID[i]].no_block)
{ {
if (BlockedBuffs->find(bbs->SpellID[i]) == BlockedBuffs->end()) if (BlockedBuffs->find(bbs->SpellID[i]) == BlockedBuffs->end())
BlockedBuffs->insert(bbs->SpellID[i]); BlockedBuffs->insert(bbs->SpellID[i]);
@ -3818,7 +3818,7 @@ void Client::Handle_OP_BlockedBuffs(const EQApplicationPacket *app)
for (unsigned int i = 0; i < BLOCKED_BUFF_COUNT; ++i) for (unsigned int i = 0; i < BLOCKED_BUFF_COUNT; ++i)
{ {
if (!IsBeneficialSpell(bbs->SpellID[i])) if (!IsValidSpell(bbs->SpellID[i]) || !IsBeneficialSpell(bbs->SpellID[i]) || spells[bbs->SpellID[i]].no_block)
continue; continue;
if ((BlockedBuffs->size() < BLOCKED_BUFF_COUNT) && (BlockedBuffs->find(bbs->SpellID[i]) == BlockedBuffs->end())) if ((BlockedBuffs->size() < BLOCKED_BUFF_COUNT) && (BlockedBuffs->find(bbs->SpellID[i]) == BlockedBuffs->end()))

View File

@ -299,6 +299,7 @@
#define SENTINEL_TRIG_YOU 6724 //You have triggered your sentinel. #define SENTINEL_TRIG_YOU 6724 //You have triggered your sentinel.
#define SENTINEL_TRIG_OTHER 6725 //%1 has triggered your sentinel. #define SENTINEL_TRIG_OTHER 6725 //%1 has triggered your sentinel.
#define IDENTIFY_SPELL 6765 //Item Lore: %1. #define IDENTIFY_SPELL 6765 //Item Lore: %1.
#define BUFF_NOT_BLOCKABLE 7608 //You cannot block this effect.
#define LDON_DONT_KNOW_TRAPPED 7552 //You do not know if this object is trapped. #define LDON_DONT_KNOW_TRAPPED 7552 //You do not know if this object is trapped.
#define LDON_HAVE_DISARMED 7553 //You have disarmed %1! #define LDON_HAVE_DISARMED 7553 //You have disarmed %1!
#define LDON_ACCIDENT_SETOFF 7554 //You accidentally set off the trap! #define LDON_ACCIDENT_SETOFF 7554 //You accidentally set off the trap!