mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 22:01:30 +00:00
Fixes to the following crashes seen on PEQ:
http://www.peqtgc.com/phpBB3/viewtopic.php?f=1&t=14293&p=67404#p67404 http://www.peqtgc.com/phpBB3/viewtopic.php?f=1&t=14293&p=67105#p67105
This commit is contained in:
parent
093af6af0b
commit
2f8cbb3a9d
@ -580,6 +580,7 @@ void Client::CalcAABonuses(StatBonuses* newbon) {
|
|||||||
uint32 slots = 0;
|
uint32 slots = 0;
|
||||||
uint32 aa_AA = 0;
|
uint32 aa_AA = 0;
|
||||||
uint32 aa_value = 0;
|
uint32 aa_value = 0;
|
||||||
|
if(this->aa) {
|
||||||
for (i = 0; i < MAX_PP_AA_ARRAY; i++) { //iterate through all of the client's AAs
|
for (i = 0; i < MAX_PP_AA_ARRAY; i++) { //iterate through all of the client's AAs
|
||||||
if (this->aa[i]) { // make sure aa exists or we'll crash zone
|
if (this->aa[i]) { // make sure aa exists or we'll crash zone
|
||||||
aa_AA = this->aa[i]->AA; //same as aaid from the aa_effects table
|
aa_AA = this->aa[i]->AA; //same as aaid from the aa_effects table
|
||||||
@ -593,6 +594,7 @@ void Client::CalcAABonuses(StatBonuses* newbon) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//A lot of the normal spell functions (IsBlankSpellEffect, etc) are set for just spells (in common/spdat.h).
|
//A lot of the normal spell functions (IsBlankSpellEffect, etc) are set for just spells (in common/spdat.h).
|
||||||
|
|||||||
@ -494,13 +494,14 @@ bool Mob::DoCastingChecks()
|
|||||||
uint16 spell_id = casting_spell_id;
|
uint16 spell_id = casting_spell_id;
|
||||||
Mob *spell_target = entity_list.GetMob(casting_spell_targetid);
|
Mob *spell_target = entity_list.GetMob(casting_spell_targetid);
|
||||||
|
|
||||||
if (RuleB(Spells, BuffLevelRestrictions) &&
|
if (RuleB(Spells, BuffLevelRestrictions)) {
|
||||||
!spell_target->CheckSpellLevelRestriction(spell_id)) {
|
if(spell_target && !spell_target->CheckSpellLevelRestriction(spell_id)) {
|
||||||
mlog(SPELLS__BUFFS, "Spell %d failed: recipient did not meet the level restrictions", spell_id);
|
mlog(SPELLS__BUFFS, "Spell %d failed: recipient did not meet the level restrictions", spell_id);
|
||||||
if (!IsBardSong(spell_id))
|
if (!IsBardSong(spell_id))
|
||||||
Message_StringID(MT_SpellFailure, SPELL_TOO_POWERFUL);
|
Message_StringID(MT_SpellFailure, SPELL_TOO_POWERFUL);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (spells[spell_id].zonetype == 1 && !zone->CanCastOutdoor()) {
|
if (spells[spell_id].zonetype == 1 && !zone->CanCastOutdoor()) {
|
||||||
Message_StringID(13, CAST_OUTDOORS);
|
Message_StringID(13, CAST_OUTDOORS);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user