mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-14 03:38:33 +00:00
Changed PreferNoManaCommandSpells check from pre-processor to rules-based criteria
This commit is contained in:
+24
-23
@@ -831,31 +831,32 @@ private:
|
|||||||
});
|
});
|
||||||
continue;
|
continue;
|
||||||
case BCEnum::SpT_Identify:
|
case BCEnum::SpT_Identify:
|
||||||
#ifdef PREFER_NO_MANA_COST_SPELLS
|
if (RuleB(Bots, PreferNoManaCommandSpells)) {
|
||||||
spell_list->sort([](const STBaseEntry* l, const STBaseEntry* r) {
|
spell_list->sort([](const STBaseEntry* l, const STBaseEntry* r) {
|
||||||
if (LT_SPELLS(l, r, mana))
|
if (LT_SPELLS(l, r, mana))
|
||||||
return true;
|
return true;
|
||||||
if (EQ_SPELLS(l, r, mana) && LT_STBASE(l, r, target_type))
|
if (EQ_SPELLS(l, r, mana) && LT_STBASE(l, r, target_type))
|
||||||
return true;
|
return true;
|
||||||
if (EQ_SPELLS(l, r, mana) && EQ_STBASE(l, r, target_type) && LT_STBASE(l, r, spell_level))
|
if (EQ_SPELLS(l, r, mana) && EQ_STBASE(l, r, target_type) && LT_STBASE(l, r, spell_level))
|
||||||
return true;
|
return true;
|
||||||
if (EQ_SPELLS(l, r, mana) && EQ_STBASE(l, r, target_type) && EQ_STBASE(l, r, spell_level) && LT_STBASE(l, r, caster_class))
|
if (EQ_SPELLS(l, r, mana) && EQ_STBASE(l, r, target_type) && EQ_STBASE(l, r, spell_level) && LT_STBASE(l, r, caster_class))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
#else
|
}
|
||||||
spell_list->sort([](const STBaseEntry* l, const STBaseEntry* r) {
|
else {
|
||||||
if (LT_STBASE(l, r, target_type))
|
spell_list->sort([](const STBaseEntry* l, const STBaseEntry* r) {
|
||||||
return true;
|
if (LT_STBASE(l, r, target_type))
|
||||||
if (EQ_STBASE(l, r, target_type) && LT_STBASE(l, r, spell_level))
|
return true;
|
||||||
return true;
|
if (EQ_STBASE(l, r, target_type) && LT_STBASE(l, r, spell_level))
|
||||||
if (EQ_STBASE(l, r, target_type) && EQ_STBASE(l, r, spell_level) && LT_STBASE(l, r, caster_class))
|
return true;
|
||||||
return true;
|
if (EQ_STBASE(l, r, target_type) && EQ_STBASE(l, r, spell_level) && LT_STBASE(l, r, caster_class))
|
||||||
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
#endif
|
}
|
||||||
continue;
|
continue;
|
||||||
case BCEnum::SpT_Invisibility:
|
case BCEnum::SpT_Invisibility:
|
||||||
spell_list->sort([](STBaseEntry* l, STBaseEntry* r) {
|
spell_list->sort([](STBaseEntry* l, STBaseEntry* r) {
|
||||||
|
|||||||
Reference in New Issue
Block a user