mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 09:06:46 +00:00
Reduce GetCorrectBotSpellType branching slightly
This is still an ugly ass function but my brain is melted
This commit is contained in:
+22
-22
@@ -644,38 +644,38 @@ uint16 GetCorrectBotSpellType(uint16 spell_type, uint16 spell_id) {
|
|||||||
else if (IsRegularGroupHealSpell(spell_id)) {
|
else if (IsRegularGroupHealSpell(spell_id)) {
|
||||||
correct_type = BotSpellTypes::GroupHeals;
|
correct_type = BotSpellTypes::GroupHeals;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return correct_type;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
if (IsVeryFastHealSpell(spell_id)) {
|
if (IsVeryFastHealSpell(spell_id)) {
|
||||||
correct_type = BotSpellTypes::VeryFastHeals;
|
correct_type = BotSpellTypes::VeryFastHeals;
|
||||||
}
|
}
|
||||||
else if (IsFastHealSpell(spell_id)) {
|
else if (IsFastHealSpell(spell_id)) {
|
||||||
correct_type = BotSpellTypes::FastHeals;
|
correct_type = BotSpellTypes::FastHeals;
|
||||||
}
|
}
|
||||||
else if (IsCompleteHealSpell(spell_id)) {
|
else if (IsCompleteHealSpell(spell_id)) {
|
||||||
correct_type = BotSpellTypes::CompleteHeal;
|
correct_type = BotSpellTypes::CompleteHeal;
|
||||||
}
|
}
|
||||||
else if (IsHealOverTimeSpell(spell_id)) {
|
else if (IsHealOverTimeSpell(spell_id)) {
|
||||||
correct_type = BotSpellTypes::HoTHeals;
|
correct_type = BotSpellTypes::HoTHeals;
|
||||||
}
|
}
|
||||||
else if (IsRegularSingleTargetHealSpell(spell_id)) {
|
else if (IsRegularSingleTargetHealSpell(spell_id)) {
|
||||||
correct_type = BotSpellTypes::RegularHeal;
|
correct_type = BotSpellTypes::RegularHeal;
|
||||||
}
|
}
|
||||||
else if (IsRegularPetHealSpell(spell_id)) {
|
else if (IsRegularPetHealSpell(spell_id)) {
|
||||||
correct_type = BotSpellTypes::RegularHeal;
|
correct_type = BotSpellTypes::RegularHeal;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (IsAnyBuffSpell(spell_id)) {
|
else if (IsAnyBuffSpell(spell_id)) {
|
||||||
|
correct_type = BotSpellTypes::Buff;
|
||||||
|
|
||||||
if (IsResistanceOnlySpell(spell_id)) {
|
if (IsResistanceOnlySpell(spell_id)) {
|
||||||
correct_type = BotSpellTypes::ResistBuffs;
|
correct_type = BotSpellTypes::ResistBuffs;
|
||||||
}
|
}
|
||||||
else if (IsDamageShieldOnlySpell(spell_id)) {
|
else if (IsDamageShieldOnlySpell(spell_id)) {
|
||||||
correct_type = BotSpellTypes::DamageShields;
|
correct_type = BotSpellTypes::DamageShields;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
correct_type = BotSpellTypes::Buff;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user