mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
[Bug Fix] Fix Spell Bucket and Spell Global Logic Checks. (#2285)
- Default to true and set to false if they fail the proper check.
This commit is contained in:
parent
0f13a92b73
commit
6d56b5b730
@ -10288,7 +10288,7 @@ void Client::Fling(float value, float target_x, float target_y, float target_z,
|
|||||||
std::vector<int> Client::GetLearnableDisciplines(uint8 min_level, uint8 max_level) {
|
std::vector<int> Client::GetLearnableDisciplines(uint8 min_level, uint8 max_level) {
|
||||||
std::vector<int> learnable_disciplines;
|
std::vector<int> learnable_disciplines;
|
||||||
for (uint16 spell_id = 0; spell_id < SPDAT_RECORDS; ++spell_id) {
|
for (uint16 spell_id = 0; spell_id < SPDAT_RECORDS; ++spell_id) {
|
||||||
bool learnable = false;
|
bool learnable = true;
|
||||||
if (!IsValidSpell(spell_id)) {
|
if (!IsValidSpell(spell_id)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -10321,12 +10321,10 @@ std::vector<int> Client::GetLearnableDisciplines(uint8 min_level, uint8 max_leve
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RuleB(Spells, EnableSpellGlobals) && SpellGlobalCheck(spell_id, CharacterID())) {
|
if (RuleB(Spells, EnableSpellGlobals) && !SpellGlobalCheck(spell_id, CharacterID())) {
|
||||||
learnable = true;
|
learnable = false;
|
||||||
} else if (RuleB(Spells, EnableSpellBuckets) && SpellBucketCheck(spell_id, CharacterID())) {
|
} else if (RuleB(Spells, EnableSpellBuckets) && !SpellBucketCheck(spell_id, CharacterID())) {
|
||||||
learnable = true;
|
learnable = false;
|
||||||
} else {
|
|
||||||
learnable = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (learnable) {
|
if (learnable) {
|
||||||
@ -10359,7 +10357,7 @@ std::vector<int> Client::GetMemmedSpells() {
|
|||||||
std::vector<int> Client::GetScribeableSpells(uint8 min_level, uint8 max_level) {
|
std::vector<int> Client::GetScribeableSpells(uint8 min_level, uint8 max_level) {
|
||||||
std::vector<int> scribeable_spells;
|
std::vector<int> scribeable_spells;
|
||||||
for (uint16 spell_id = 0; spell_id < SPDAT_RECORDS; ++spell_id) {
|
for (uint16 spell_id = 0; spell_id < SPDAT_RECORDS; ++spell_id) {
|
||||||
bool scribeable = false;
|
bool scribeable = true;
|
||||||
if (!IsValidSpell(spell_id)) {
|
if (!IsValidSpell(spell_id)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -10392,12 +10390,10 @@ std::vector<int> Client::GetScribeableSpells(uint8 min_level, uint8 max_level) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RuleB(Spells, EnableSpellGlobals) && SpellGlobalCheck(spell_id, CharacterID())) {
|
if (RuleB(Spells, EnableSpellGlobals) && !SpellGlobalCheck(spell_id, CharacterID())) {
|
||||||
scribeable = true;
|
scribeable = false;
|
||||||
} else if (RuleB(Spells, EnableSpellBuckets) && SpellBucketCheck(spell_id, CharacterID())) {
|
} else if (RuleB(Spells, EnableSpellBuckets) && !SpellBucketCheck(spell_id, CharacterID())) {
|
||||||
scribeable = true;
|
scribeable = false;
|
||||||
} else {
|
|
||||||
scribeable = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scribeable) {
|
if (scribeable) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user