mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
new spell effects
buff struct/tables - required sql Removed: death_save_chance and deathsave_aa_chance (no longer used) Added: dot_rune, caston_x, caston_y, caston_z minor fixes
This commit is contained in:
+9
-20
@@ -2476,7 +2476,7 @@ void Bot::SaveBuffs() {
|
||||
|
||||
if(!database.RunQuery(Query, MakeAnyLenString(&Query, "INSERT INTO botbuffs (BotId, SpellId, CasterLevel, DurationFormula, "
|
||||
"TicsRemaining, PoisonCounters, DiseaseCounters, CurseCounters, CorruptionCounters, HitCount, MeleeRune, MagicRune, "
|
||||
"DeathSaveSuccessChance, CasterAARank, Persistent) VALUES (%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u);",
|
||||
"dot_rune, caston_x, Persistent, caston_y, caston_z) VALUES (%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u);",
|
||||
GetBotID(), buffs[BuffCount].spellid, buffs[BuffCount].casterlevel, spells[buffs[BuffCount].spellid].buffdurationformula,
|
||||
buffs[BuffCount].ticsremaining,
|
||||
CalculatePoisonCounters(buffs[BuffCount].spellid) > 0 ? buffs[BuffCount].counters : 0,
|
||||
@@ -2484,8 +2484,8 @@ void Bot::SaveBuffs() {
|
||||
CalculateCurseCounters(buffs[BuffCount].spellid) > 0 ? buffs[BuffCount].counters : 0,
|
||||
CalculateCorruptionCounters(buffs[BuffCount].spellid) > 0 ? buffs[BuffCount].counters : 0,
|
||||
buffs[BuffCount].numhits, buffs[BuffCount].melee_rune, buffs[BuffCount].magic_rune,
|
||||
buffs[BuffCount].deathSaveSuccessChance,
|
||||
buffs[BuffCount].deathsaveCasterAARank, IsPersistent), TempErrorMessageBuffer)) {
|
||||
buffs[BuffCount].dot_rune,
|
||||
buffs[BuffCount].caston_x, IsPersistent, buffs[BuffCount].caston_y,buffs[BuffCount].caston_z), TempErrorMessageBuffer)) {
|
||||
errorMessage = std::string(TempErrorMessageBuffer);
|
||||
safe_delete(Query);
|
||||
Query = 0;
|
||||
@@ -2515,7 +2515,7 @@ void Bot::LoadBuffs() {
|
||||
|
||||
bool BuffsLoaded = false;
|
||||
|
||||
if(!database.RunQuery(Query, MakeAnyLenString(&Query, "SELECT SpellId, CasterLevel, DurationFormula, TicsRemaining, PoisonCounters, DiseaseCounters, CurseCounters, CorruptionCounters, HitCount, MeleeRune, MagicRune, DeathSaveSuccessChance, CasterAARank, Persistent FROM botbuffs WHERE BotId = %u", GetBotID()), TempErrorMessageBuffer, &DatasetResult)) {
|
||||
if(!database.RunQuery(Query, MakeAnyLenString(&Query, "SELECT SpellId, CasterLevel, DurationFormula, TicsRemaining, PoisonCounters, DiseaseCounters, CurseCounters, CorruptionCounters, HitCount, MeleeRune, MagicRune, dot_rune, caston_x, Persistent, caston_y, caston_z FROM botbuffs WHERE BotId = %u", GetBotID()), TempErrorMessageBuffer, &DatasetResult)) {
|
||||
errorMessage = std::string(TempErrorMessageBuffer);
|
||||
}
|
||||
else {
|
||||
@@ -2541,8 +2541,8 @@ void Bot::LoadBuffs() {
|
||||
buffs[BuffCount].numhits = atoi(DataRow[8]);
|
||||
buffs[BuffCount].melee_rune = atoi(DataRow[9]);
|
||||
buffs[BuffCount].magic_rune = atoi(DataRow[10]);
|
||||
buffs[BuffCount].deathSaveSuccessChance = atoi(DataRow[11]);
|
||||
buffs[BuffCount].deathsaveCasterAARank = atoi(DataRow[12]);
|
||||
buffs[BuffCount].dot_rune = atoi(DataRow[11]);
|
||||
buffs[BuffCount].caston_x = atoi(DataRow[12]);
|
||||
buffs[BuffCount].casterid = 0;
|
||||
|
||||
bool IsPersistent = false;
|
||||
@@ -2550,6 +2550,9 @@ void Bot::LoadBuffs() {
|
||||
if(atoi(DataRow[13]))
|
||||
IsPersistent = true;
|
||||
|
||||
buffs[BuffCount].caston_x = atoi(DataRow[14]);
|
||||
buffs[BuffCount].caston_x = atoi(DataRow[15]);
|
||||
|
||||
buffs[BuffCount].persistant_buff = IsPersistent;
|
||||
|
||||
BuffCount++;
|
||||
@@ -6818,13 +6821,6 @@ int16 Bot::CalcBotAAFocus(BotfocusType type, uint32 aa_ID, uint16 spell_id)
|
||||
SpellSkill_Found = true;
|
||||
break;
|
||||
|
||||
case SE_LimitSpellSubclass:{
|
||||
int16 spell_skill = spell.skill * -1;
|
||||
if(base1 == spell_skill)
|
||||
LimitFound = true;
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_LimitClass:
|
||||
//Do not use this limit more then once per spell. If multiple class, treat value like items would.
|
||||
if (!PassLimitClass(base1, GetClass()))
|
||||
@@ -7423,13 +7419,6 @@ int16 Bot::CalcBotFocusEffect(BotfocusType bottype, uint16 focus_id, uint16 spel
|
||||
SpellSkill_Found = true;
|
||||
break;
|
||||
|
||||
case SE_LimitSpellSubclass:{
|
||||
int16 spell_skill = spell.skill * -1;
|
||||
if(focus_spell.base[i] == spell_skill)
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_LimitClass:
|
||||
//Do not use this limit more then once per spell. If multiple class, treat value like items would.
|
||||
if (!PassLimitClass(focus_spell.base[i], GetClass()))
|
||||
|
||||
Reference in New Issue
Block a user