[Spells/Disciplines] Bulk Train / Scribe (#1640)

* Bulk scribe spells

* Add bulk disc training

* Remove bulk from non bulk method

* PR adjustments
This commit is contained in:
Chris Miles
2021-10-27 20:45:27 -05:00
committed by GitHub
parent 6e5bf4b941
commit 7230714cbc
7 changed files with 157 additions and 75 deletions
+10 -7
View File
@@ -180,7 +180,7 @@ int32 Mob::GetActReflectedSpellDamage(int32 spell_id, int32 value, int effective
value = int(static_cast<float>(value) * CastToNPC()->GetSpellScale() / 100.0f);
}
}
int32 base_spell_dmg = value;
value = value * effectiveness / 100;
@@ -343,7 +343,7 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
}
value += GetFocusEffect(focusFcHealAmtCrit, spell_id); //SPA 396 Add before critical
if (!spells[spell_id].no_heal_damage_item_mod && itembonuses.HealAmt && spells[spell_id].classes[(GetClass() % 17) - 1] >= GetLevel() - 5) {
value += GetExtraSpellAmt(spell_id, itembonuses.HealAmt, base_value); //Item Heal Amt Add before critical
}
@@ -351,7 +351,7 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
if (target) {
value += value * target->GetHealRate() / 100; //SPA 120 modifies value after Focus Applied but before critical
}
/*
Apply critical hit modifier
*/
@@ -363,7 +363,7 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
if (target) {
value += target->GetFocusEffect(focusFcHealAmtIncoming, spell_id); //SPA 394 Add after critical
}
if (IsNPC() && CastToNPC()->GetHealScale()) {
value = int(static_cast<float>(value) * CastToNPC()->GetHealScale() / 100.0f);
}
@@ -619,13 +619,14 @@ bool Client::MemorizeSpellFromItem(uint32 item_id) {
return false;
}
for(int index = 0; index < EQ::spells::SPELLBOOK_SIZE; index++) {
for (int index = 0; index < EQ::spells::SPELLBOOK_SIZE; index++) {
if (!HasSpellScribed(spell_id)) {
auto next_slot = GetNextAvailableSpellBookSlot();
if (next_slot != -1) {
ScribeSpell(spell_id, next_slot);
return true;
} else {
}
else {
Message(
Chat::Red,
"Unable to scribe spell %s (%i) to spellbook: no more spell book slots available.",
@@ -635,12 +636,14 @@ bool Client::MemorizeSpellFromItem(uint32 item_id) {
SummonItem(item_id);
return false;
}
} else {
}
else {
Message(Chat::Red, "You already know this spell.");
SummonItem(item_id);
return false;
}
}
Message(Chat::Red, "You have learned too many spells and can learn no more.");
return false;
}