mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-10 16:12:25 +00:00
Some crash fixes noticed on EQMacEmu
This commit is contained in:
parent
64deca11b2
commit
5126104fd6
@ -1408,47 +1408,47 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Must be out of combat. (If Beneficial checks casters combat state, Deterimental checks targets)
|
//Must be out of combat. (If Beneficial checks casters combat state, Deterimental checks targets)
|
||||||
if (!spells[spell_id].InCombat && spells[spell_id].OutofCombat){
|
if (!spells[spell_id].InCombat && spells[spell_id].OutofCombat) {
|
||||||
if (IsDetrimentalSpell(spell_id)) {
|
if (IsDetrimentalSpell(spell_id)) {
|
||||||
if ( (spell_target->IsNPC() && spell_target->IsEngaged()) ||
|
if (spell_target &&
|
||||||
(spell_target->IsClient() && spell_target->CastToClient()->GetAggroCount())){
|
((spell_target->IsNPC() && spell_target->IsEngaged()) ||
|
||||||
Message_StringID(13,SPELL_NO_EFFECT); //Unsure correct string
|
(spell_target->IsClient() && spell_target->CastToClient()->GetAggroCount()))) {
|
||||||
return false;
|
Message_StringID(13, SPELL_NO_EFFECT); // Unsure correct string
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (IsBeneficialSpell(spell_id)) {
|
else if (IsBeneficialSpell(spell_id)) {
|
||||||
if ( (IsNPC() && IsEngaged()) ||
|
if ((IsNPC() && IsEngaged()) || (IsClient() && CastToClient()->GetAggroCount())) {
|
||||||
(IsClient() && CastToClient()->GetAggroCount())){
|
if (IsDiscipline(spell_id))
|
||||||
if (IsDiscipline(spell_id))
|
Message_StringID(13, NO_ABILITY_IN_COMBAT);
|
||||||
Message_StringID(13,NO_ABILITY_IN_COMBAT);
|
else
|
||||||
else
|
Message_StringID(13, NO_CAST_IN_COMBAT);
|
||||||
Message_StringID(13,NO_CAST_IN_COMBAT);
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Must be in combat. (If Beneficial checks casters combat state, Deterimental checks targets)
|
// Must be in combat. (If Beneficial checks casters combat state, Deterimental checks targets)
|
||||||
else if (spells[spell_id].InCombat && !spells[spell_id].OutofCombat){
|
else if (spells[spell_id].InCombat && !spells[spell_id].OutofCombat) {
|
||||||
if (IsDetrimentalSpell(spell_id)) {
|
if (IsDetrimentalSpell(spell_id)) {
|
||||||
if ( (spell_target->IsNPC() && !spell_target->IsEngaged()) ||
|
if (spell_target &&
|
||||||
(spell_target->IsClient() && !spell_target->CastToClient()->GetAggroCount())){
|
((spell_target->IsNPC() && !spell_target->IsEngaged()) ||
|
||||||
Message_StringID(13,SPELL_NO_EFFECT); //Unsure correct string
|
(spell_target->IsClient() && !spell_target->CastToClient()->GetAggroCount()))) {
|
||||||
return false;
|
Message_StringID(13, SPELL_NO_EFFECT); // Unsure correct string
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (IsBeneficialSpell(spell_id)) {
|
else if (IsBeneficialSpell(spell_id)) {
|
||||||
if ( (IsNPC() && !IsEngaged()) ||
|
if ((IsNPC() && !IsEngaged()) || (IsClient() && !CastToClient()->GetAggroCount())) {
|
||||||
(IsClient() && !CastToClient()->GetAggroCount())){
|
if (IsDiscipline(spell_id))
|
||||||
if (IsDiscipline(spell_id))
|
Message_StringID(13, NO_ABILITY_OUT_OF_COMBAT);
|
||||||
Message_StringID(13,NO_ABILITY_OUT_OF_COMBAT);
|
else
|
||||||
else
|
Message_StringID(13, NO_CAST_OUT_OF_COMBAT);
|
||||||
Message_StringID(13,NO_CAST_OUT_OF_COMBAT);
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user