Implement persist death spell field

This commit is contained in:
Michael Cook (mackal)
2014-01-07 23:29:46 -05:00
parent 8a04d8e2b7
commit 50caef0086
7 changed files with 36 additions and 3 deletions
+1
View File
@@ -1733,6 +1733,7 @@ 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].persistdeath = atoi(row[224]) != 0;
sp[tempid].DamageShieldType = 0;
}
mysql_free_result(result);
+8
View File
@@ -966,6 +966,14 @@ bool IsBuffSpell(uint16 spell_id)
return false;
}
bool IsPersistDeathSpell(uint16 spell_id)
{
if (IsValidSpell(spell_id) && spells[spell_id].persistdeath)
return true;
return false;
}
uint32 GetMorphTrigger(uint32 spell_id)
{
for (int i = 0; i < EFFECT_COUNT; ++i)
+13 -1
View File
@@ -710,11 +710,22 @@ struct SPDat_Spell_Struct
/* 193 */ int NimbusEffect;
/* 194 */ float directional_start;
/* 195 */ float directional_end;
/* 196 - 199 */
/* 200 */ //bool suspendable; // buff is suspended in suspended buff zones
/* 201 - 202 */
/* 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 */
/* 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;
/* 219 */ //int maxtargets; // not in DB yet, is used for beam and ring spells for target # limits
/* 213 - 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
/* 225 - 236 */
uint8 DamageShieldType; // This field does not exist in spells_us.txt
};
@@ -809,6 +820,7 @@ bool IsDebuffSpell(uint16 spell_id);
bool IsResistDebuffSpell(uint16 spell_id);
bool IsSelfConversionSpell(uint16 spell_id);
bool IsBuffSpell(uint16 spell_id);
bool IsPersistDeathSpell(uint16 spell_id);
uint32 GetMorphTrigger(uint32 spell_id);
uint32 GetPartialMeleeRuneReduction(uint32 spell_id);
uint32 GetPartialMagicRuneReduction(uint32 spell_id);