mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-11 08:52:27 +00:00
Added type conversion to questmgr 'scribespells'
This commit is contained in:
parent
0b4dcb4271
commit
43a488d5b5
@ -1020,24 +1020,30 @@ uint16 QuestManager::scribespells(uint8 max_level, uint8 min_level) {
|
|||||||
if (spells[spell_id].effectid[EFFECT_COUNT - 1] == 10)
|
if (spells[spell_id].effectid[EFFECT_COUNT - 1] == 10)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (!IsDiscipline(spell_id) && !initiator->HasSpellScribed(spell_id)) { //isn't a discipline & we don't already have it scribed
|
uint16 spell_id_ = (uint16)spell_id;
|
||||||
|
if ((spell_id_ != spell_id) || (spell_id != spell_id_)) {
|
||||||
|
initiator->Message(13, "FATAL ERROR: Type conversion data loss with spell_id (%u != %i)", spell_id, spell_id_);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!IsDiscipline(spell_id_) && !initiator->HasSpellScribed(spell_id)) { //isn't a discipline & we don't already have it scribed
|
||||||
if (SpellGlobalRule) {
|
if (SpellGlobalRule) {
|
||||||
// Bool to see if the character has the required QGlobal to scribe it if one exists in the Spell_Globals table
|
// Bool to see if the character has the required QGlobal to scribe it if one exists in the Spell_Globals table
|
||||||
SpellGlobalCheckResult = initiator->SpellGlobalCheck(spell_id, char_id);
|
SpellGlobalCheckResult = initiator->SpellGlobalCheck(spell_id_, char_id);
|
||||||
if (SpellGlobalCheckResult) {
|
if (SpellGlobalCheckResult) {
|
||||||
initiator->ScribeSpell(spell_id, book_slot);
|
initiator->ScribeSpell(spell_id_, book_slot);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (SpellBucketRule) {
|
else if (SpellBucketRule) {
|
||||||
SpellBucketCheckResult = initiator->SpellBucketCheck(spell_id, char_id);
|
SpellBucketCheckResult = initiator->SpellBucketCheck(spell_id_, char_id);
|
||||||
if (SpellBucketCheckResult) {
|
if (SpellBucketCheckResult) {
|
||||||
initiator->ScribeSpell(spell_id, book_slot);
|
initiator->ScribeSpell(spell_id_, book_slot);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
initiator->ScribeSpell(spell_id, book_slot);
|
initiator->ScribeSpell(spell_id_, book_slot);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user