Conflicts:
	zone/client_packet.cpp
This commit is contained in:
SecretsOTheP 2013-03-15 03:32:43 -04:00
commit c301b30c3a
12 changed files with 1107 additions and 127 deletions

View File

@ -1,7 +1,14 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 03/14/2013 ==
JJ: (NatedogEZ) Fix for hate list random never selecting last member of hate list.
Bad_Captain: Fixed Merc spell recast timers.
Bad_Captain: Changed how Mercs add mobs to their hate lists (should prevent IsEngaged() issues).
Bad_Captain: Initial Caster DPS Merc spell casting AI, including initial Merc stance implementation.
Bad_Captain: Mercs now suspend when their owner dies to prevent them being bugged (until it can be fixed).
OPTIONAL SQL: 2013_03_14_Merc_Spells.sql
== 03/09/2013 ==
Zaela_S: Stop mobs aggroing on dead players when using RespawnFromHover.

View File

@ -352,6 +352,22 @@ bool IsPureNukeSpell(uint16 spell_id)
);
}
bool IsAENukeSpell(uint16 spell_id)
{
return IsValidSpell(spell_id) && IsPureNukeSpell(spell_id) && spells[spell_id].aoerange > 0;
}
bool IsPBAENukeSpell(uint16 spell_id)
{
return IsValidSpell(spell_id) && IsPureNukeSpell(spell_id) && spells[spell_id].aoerange > 0 && spells[spell_id].targettype == ST_AECaster;
}
bool IsAERainNukeSpell(uint16 spell_id)
{
return IsValidSpell(spell_id) && IsPureNukeSpell(spell_id)
&& spells[spell_id].aoerange > 0 && spells[spell_id].AEDuration > 1000;
}
bool IsPartialCapableSpell(uint16 spell_id)
{
if(IsPureNukeSpell(spell_id) ||

View File

@ -736,6 +736,9 @@ bool IsImprovedHealingSpell(uint16 spell_id);
bool IsImprovedDamageSpell(uint16 spell_id);
bool IsAEDurationSpell(uint16 spell_id);
bool IsPureNukeSpell(uint16 spell_id);
bool IsAENukeSpell(uint16 spell_id);
bool IsPBAENukeSpell(uint16 spell_id);
bool IsAERainNukeSpell(uint16 spell_id);
bool IsPartialCapableSpell(uint16 spell_id);
bool IsResistableSpell(uint16 spell_id);
bool IsGroupSpell(uint16 spell_id);

View File

@ -0,0 +1,392 @@
ALTER TABLE merc_spell_list_entries MODIFY spell_type INT UNSIGNED NOT NULL default '0';
DELETE FROM merc_spell_list_entries;
-- Tank Merc
REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type, stance_id, minlevel, maxlevel, slot, procChance) VALUES
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Mercenary Taunt' ORDER BY id DESC LIMIT 1), 1, 0, 1, 255, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Provoke' ORDER BY id DESC LIMIT 1), 1, 0, 20, 51, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Bellow' ORDER BY id DESC LIMIT 1), 1, 0, 52, 55, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Berate' ORDER BY id DESC LIMIT 1), 1, 0, 56, 62, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Mercenary Area Taunt' ORDER BY id DESC LIMIT 1), 1, 0, 59, 255, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Incite' ORDER BY id DESC LIMIT 1), 1, 0, 63, 64, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Bellow of the Mastruq' ORDER BY id DESC LIMIT 1), 1, 0, 65, 69, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Bazu Bellow' ORDER BY id DESC LIMIT 1), 1, 0, 69, 80, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Mock' ORDER BY id DESC LIMIT 1), 1, 0, 70, 74, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Scowl' ORDER BY id DESC LIMIT 1), 1, 0, 75, 79, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Sneer' ORDER BY id DESC LIMIT 1), 1, 0, 80, 84, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Bazu Bluster' ORDER BY id DESC LIMIT 1), 1, 0, 81, 85, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Jeer' ORDER BY id DESC LIMIT 1), 1, 0, 85, 89, 2, 0 );
REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type, stance_id, minlevel, maxlevel, slot, procChance) VALUES
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Mercenary Taunt' ORDER BY id DESC LIMIT 1), 1, 0, 1, 255, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Provoke' ORDER BY id DESC LIMIT 1), 1, 0, 20, 51, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Bellow' ORDER BY id DESC LIMIT 1), 1, 0, 52, 55, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Berate' ORDER BY id DESC LIMIT 1), 1, 0, 56, 62, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Mercenary Area Taunt' ORDER BY id DESC LIMIT 1), 1, 0, 59, 255, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Incite' ORDER BY id DESC LIMIT 1), 1, 0, 63, 64, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ancient: Chaos Cry' ORDER BY id DESC LIMIT 1), 1, 0, 65, 69, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Bazu Bellow' ORDER BY id DESC LIMIT 1), 1, 0, 69, 80, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Mock' ORDER BY id DESC LIMIT 1), 1, 0, 70, 74, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Scowl Rk. II' ORDER BY id DESC LIMIT 1), 1, 0, 75, 79, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Sneer Rk. II' ORDER BY id DESC LIMIT 1), 1, 0, 80, 84, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Bazu Bluster Rk. II' ORDER BY id DESC LIMIT 1), 1, 0, 81, 85, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Jeer Rk. II' ORDER BY id DESC LIMIT 1), 1, 0, 85, 89, 2, 0 );
-- Healer Merc
REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type, stance_id, minlevel, maxlevel, slot, procChance) VALUES
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Minor Healing' ORDER BY id DESC LIMIT 1), 2, 0, 1, 3, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Courage' ORDER BY id DESC LIMIT 1), 8, 0, 1, 6, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Cure Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 1, 21, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Light Healing' ORDER BY id DESC LIMIT 1), 2, 0, 4, 9, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Cure Disease' ORDER BY id DESC LIMIT 1), 32768, 0, 4, 27, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Center' ORDER BY id DESC LIMIT 1), 8, 0, 7, 21, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Remove Minor Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 8, 22, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Healing' ORDER BY id DESC LIMIT 1), 2, 0, 10, 19, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Transal' ORDER BY id DESC LIMIT 1), 8, 0, 11, 20, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Reanimation' ORDER BY id DESC LIMIT 1), 65536, 0, 12, 17, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Piety' ORDER BY id DESC LIMIT 1), 8, 0, 15, 34, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Daring' ORDER BY id DESC LIMIT 1), 8, 0, 17, 20, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Reconstitution' ORDER BY id DESC LIMIT 1), 65536, 0, 18, 21, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Celestial Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 19, 28, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Greater Healing' ORDER BY id DESC LIMIT 1), 2, 0, 20, 29, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Ward of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 20, 39, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Ryltan' ORDER BY id DESC LIMIT 1), 8, 0, 21, 30, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Bravery' ORDER BY id DESC LIMIT 1), 8, 0, 22, 31, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Counteract Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 22, 47, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Reparation' ORDER BY id DESC LIMIT 1), 65536, 0, 22, 26, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Remove Lesser Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 23, 37, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Revive' ORDER BY id DESC LIMIT 1), 65536, 0, 27, 31, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Counteract Disease' ORDER BY id DESC LIMIT 1), 32768, 0, 28, 50, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Celestial Health' ORDER BY id DESC LIMIT 1), 2, 0, 29, 43, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Health' ORDER BY id DESC LIMIT 1), 2, 0, 30, 44, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Superior Healing' ORDER BY id DESC LIMIT 1), 2, 0, 30, 52, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Pinzarn' ORDER BY id DESC LIMIT 1), 8, 0, 31, 40, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Valor' ORDER BY id DESC LIMIT 1), 8, 0, 32, 39, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Renewal' ORDER BY id DESC LIMIT 1), 65536, 0, 32, 36, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Faith' ORDER BY id DESC LIMIT 1), 8, 0, 35, 61, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Resuscitate' ORDER BY id DESC LIMIT 1), 65536, 0, 37, 41, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Remove Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 38, 53, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Complete Healing' ORDER BY id DESC LIMIT 1), 2, 0, 39, 75, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Temperance' ORDER BY id DESC LIMIT 1), 8, 0, 40, 59, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Guard of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 40, 53, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Naltron' ORDER BY id DESC LIMIT 1), 8, 0, 41, 53, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Restoration' ORDER BY id DESC LIMIT 1), 65536, 0, 42, 46, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Celestial Healing' ORDER BY id DESC LIMIT 1), 2, 0, 44, 58, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Healing' ORDER BY id DESC LIMIT 1), 2, 0, 45, 51, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Temperance' ORDER BY id DESC LIMIT 1), 8, 0, 45, 59, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Resurrection' ORDER BY id DESC LIMIT 1), 65536, 0, 47, 255, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Abolish Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 48, 57, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 51, 58, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Pure Blood' ORDER BY id DESC LIMIT 1), 32768, 0, 51, 83, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Vigor' ORDER BY id DESC LIMIT 1), 2, 0, 52, 56, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Divine Light' ORDER BY id DESC LIMIT 1), 2, 0, 53, 57, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Marzin' ORDER BY id DESC LIMIT 1), 8, 0, 54, 60, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Protection of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 54, 61, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Remove Greater Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 54, 93, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Restoration' ORDER BY id DESC LIMIT 1), 2, 0, 57, 63, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Naltron\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 58, 59, 6, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Ethereal Light' ORDER BY id DESC LIMIT 1), 2, 0, 58, 62, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Antidote' ORDER BY id DESC LIMIT 1), 32768, 0, 58, 83, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Celestial Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 59, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Ethereal Remedy' ORDER BY id DESC LIMIT 1), 8, 0, 59, 60, 6, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Marzin\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 60, 62, 6, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Aegolism' ORDER BY id DESC LIMIT 1), 8, 0, 60, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Aegolism' ORDER BY id DESC LIMIT 1), 8, 0, 60, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Ancient: Gift of Aegolism' ORDER BY id DESC LIMIT 1), 8, 0, 60, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Ethereal Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 60, 64, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Redemption' ORDER BY id DESC LIMIT 1), 2, 0, 60, 75, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Supernal Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 61, 65, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Kazad' ORDER BY id DESC LIMIT 1), 2, 0, 61, 65, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Supernal Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 62, 64, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Virtue' ORDER BY id DESC LIMIT 1), 8, 0, 62, 66, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Reverence' ORDER BY id DESC LIMIT 1), 8, 0, 62, 66, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Bulwark of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 62, 66, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Kazad`s Mark' ORDER BY id DESC LIMIT 1), 2, 0, 63, 69, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Supernal Light' ORDER BY id DESC LIMIT 1), 2, 0, 63, 64, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Replenishment' ORDER BY id DESC LIMIT 1), 2, 0, 64, 68, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Aura of Reverence' ORDER BY id DESC LIMIT 1), 8, 0, 64, 66, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Hand of Virtue' ORDER BY id DESC LIMIT 1), 8, 0, 65, 66, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Holy Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 65, 66, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Holy Light' ORDER BY id DESC LIMIT 1), 2, 0, 65, 67, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Balikor' ORDER BY id DESC LIMIT 1), 2, 0, 66, 71, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Pious Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 66, 255, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Conviction' ORDER BY id DESC LIMIT 1), 8, 0, 67, 71, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Pious Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 67, 255, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Devotion' ORDER BY id DESC LIMIT 1), 8, 0, 67, 70, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Panoply of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 67, 72, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Pious Light' ORDER BY id DESC LIMIT 1), 2, 0, 68, 72, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Aura of Devotion' ORDER BY id DESC LIMIT 1), 8, 0, 69, 255, 7, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Vivification' ORDER BY id DESC LIMIT 1), 2, 0, 69, 79, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Hand of Conviction' ORDER BY id DESC LIMIT 1), 8, 0, 70, 71, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Balikor\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 70, 74, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Elixir of Divinity' ORDER BY id DESC LIMIT 1), 2, 0, 70, 74, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Elushar' ORDER BY id DESC LIMIT 1), 8, 0, 71, 75, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Sacred Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 71, 75, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Purpose' ORDER BY id DESC LIMIT 1), 8, 0, 71, 0, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Tenacity' ORDER BY id DESC LIMIT 1), 8, 0, 72, 76, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Sacred Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 72, 76, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Aura of Purpose' ORDER BY id DESC LIMIT 1), 8, 0, 72, 75, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Sacred Light' ORDER BY id DESC LIMIT 1), 2, 0, 73, 77, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Promised Renewal' ORDER BY id DESC LIMIT 1), 2, 0, 73, 77, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Aegis of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 73, 77, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Expunge Corruption' ORDER BY id DESC LIMIT 1), 32768, 0, 74, 78, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Hand of Tenacity' ORDER BY id DESC LIMIT 1), 8, 0, 75, 76, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Elushar\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 75, 79, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Elixir of Redemption' ORDER BY id DESC LIMIT 1), 2, 0, 75, 79, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Rallied Aegis of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 75, 77, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Solemn Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 76, 80, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Kaerra' ORDER BY id DESC LIMIT 1), 8, 0, 76, 80, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Resolve' ORDER BY id DESC LIMIT 1), 8, 0, 76, 80, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Temerity' ORDER BY id DESC LIMIT 1), 8, 0, 77, 81, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Solemn Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 77, 81, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Eleventh-Hour' ORDER BY id DESC LIMIT 1), 2, 0, 77, 81, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Aura of Resolve' ORDER BY id DESC LIMIT 1), 8, 0, 77, 80, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Solemn Light' ORDER BY id DESC LIMIT 1), 2, 0, 78, 82, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Promised Restoration' ORDER BY id DESC LIMIT 1), 2, 0, 78, 82, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Shield of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 78, 82, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Vitiate Corruption' ORDER BY id DESC LIMIT 1), 32768, 0, 79, 83, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Hand of Temerity' ORDER BY id DESC LIMIT 1), 8, 0, 80, 81, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Kaerra\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 80, 84, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Elixir of Atonement' ORDER BY id DESC LIMIT 1), 2, 0, 80, 84, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Frantic Renewal' ORDER BY id DESC LIMIT 1), 2, 0, 80, 84, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Rallied Shield of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 80, 82, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Darianna' ORDER BY id DESC LIMIT 1), 8, 0, 81, 85, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Devout Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 81, 85, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Loyalty' ORDER BY id DESC LIMIT 1), 8, 0, 81, 85, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Gallantry' ORDER BY id DESC LIMIT 1), 8, 0, 82, 86, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Devout Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 82, 86, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Twelfth Night' ORDER BY id DESC LIMIT 1), 2, 0, 82, 86, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Aura of Loyalty' ORDER BY id DESC LIMIT 1), 8, 0, 82, 85, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Devout Light' ORDER BY id DESC LIMIT 1), 2, 0, 83, 87, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Promised Recuperation' ORDER BY id DESC LIMIT 1), 2, 0, 83, 87, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Palladium of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 83, 87, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Abolish Corruption' ORDER BY id DESC LIMIT 1), 32768, 0, 84, 86, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Purified Blood' ORDER BY id DESC LIMIT 1), 32768, 0, 84, 88, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Hand of Gallantry' ORDER BY id DESC LIMIT 1), 8, 0, 85, 86, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Darianna\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 85, 89, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Frenetic Renewal' ORDER BY id DESC LIMIT 1), 2, 0, 85, 89, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Rallied Palladium of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 85, 87, 4, 0);
REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type, stance_id, minlevel, maxlevel, slot, procChance) VALUES
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Minor Healing' ORDER BY id DESC LIMIT 1), 2, 0, 1, 3, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Courage' ORDER BY id DESC LIMIT 1), 8, 0, 1, 6, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Cure Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 1, 21, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Light Healing' ORDER BY id DESC LIMIT 1), 2, 0, 4, 9, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Cure Disease' ORDER BY id DESC LIMIT 1), 32768, 0, 4, 27, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Center' ORDER BY id DESC LIMIT 1), 8, 0, 7, 21, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Remove Minor Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 8, 22, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Healing' ORDER BY id DESC LIMIT 1), 2, 0, 10, 19, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Transal' ORDER BY id DESC LIMIT 1), 8, 0, 11, 20, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Reanimation' ORDER BY id DESC LIMIT 1), 65536, 0, 12, 17, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Piety' ORDER BY id DESC LIMIT 1), 8, 0, 15, 34, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Daring' ORDER BY id DESC LIMIT 1), 8, 0, 17, 20, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Reconstitution' ORDER BY id DESC LIMIT 1), 65536, 0, 18, 21, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Celestial Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 19, 28, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Greater Healing' ORDER BY id DESC LIMIT 1), 2, 0, 20, 29, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ward of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 20, 39, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Ryltan' ORDER BY id DESC LIMIT 1), 8, 0, 21, 30, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Bravery' ORDER BY id DESC LIMIT 1), 8, 0, 22, 31, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Counteract Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 22, 47, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Reparation' ORDER BY id DESC LIMIT 1), 65536, 0, 22, 26, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Remove Lesser Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 23, 37, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Revive' ORDER BY id DESC LIMIT 1), 65536, 0, 27, 31, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Counteract Disease' ORDER BY id DESC LIMIT 1), 32768, 0, 28, 50, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Celestial Health' ORDER BY id DESC LIMIT 1), 2, 0, 29, 43, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Health' ORDER BY id DESC LIMIT 1), 2, 0, 30, 44, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Superior Healing' ORDER BY id DESC LIMIT 1), 2, 0, 30, 52, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Pinzarn' ORDER BY id DESC LIMIT 1), 8, 0, 31, 40, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Valor' ORDER BY id DESC LIMIT 1), 8, 0, 32, 39, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Renewal' ORDER BY id DESC LIMIT 1), 65536, 0, 32, 36, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Faith' ORDER BY id DESC LIMIT 1), 8, 0, 35, 61, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Resuscitate' ORDER BY id DESC LIMIT 1), 65536, 0, 37, 41, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Remove Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 38, 53, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Complete Healing' ORDER BY id DESC LIMIT 1), 2, 0, 39, 75, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Temperance' ORDER BY id DESC LIMIT 1), 8, 0, 40, 59, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Guard of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 40, 53, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Naltron' ORDER BY id DESC LIMIT 1), 8, 0, 41, 53, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Restoration' ORDER BY id DESC LIMIT 1), 65536, 0, 42, 46, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Celestial Healing' ORDER BY id DESC LIMIT 1), 2, 0, 44, 58, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Healing' ORDER BY id DESC LIMIT 1), 2, 0, 45, 51, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Temperance' ORDER BY id DESC LIMIT 1), 8, 0, 45, 59, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Resurrection' ORDER BY id DESC LIMIT 1), 65536, 0, 47, 55, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Abolish Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 48, 57, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 51, 58, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Pure Blood' ORDER BY id DESC LIMIT 1), 32768, 0, 51, 83, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Vigor' ORDER BY id DESC LIMIT 1), 2, 0, 52, 56, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Divine Light' ORDER BY id DESC LIMIT 1), 2, 0, 53, 57, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Marzin' ORDER BY id DESC LIMIT 1), 8, 0, 54, 60, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Protection of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 54, 61, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Remove Greater Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 54, 93, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Reviviscence' ORDER BY id DESC LIMIT 1), 65536, 0, 56, 255, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Restoration' ORDER BY id DESC LIMIT 1), 2, 0, 57, 63, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Naltron\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 58, 59, 6, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ethereal Light' ORDER BY id DESC LIMIT 1), 2, 0, 58, 62, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Antidote' ORDER BY id DESC LIMIT 1), 32768, 0, 58, 83, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Celestial Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 59, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ethereal Remedy' ORDER BY id DESC LIMIT 1), 8, 0, 59, 60, 6, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Marzin\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 60, 62, 6, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Aegolism' ORDER BY id DESC LIMIT 1), 8, 0, 60, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Aegolism' ORDER BY id DESC LIMIT 1), 8, 0, 60, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ancient: Gift of Aegolism' ORDER BY id DESC LIMIT 1), 8, 0, 60, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ethereal Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 60, 64, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Redemption' ORDER BY id DESC LIMIT 1), 2, 0, 60, 75, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Supernal Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 61, 65, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Kazad' ORDER BY id DESC LIMIT 1), 2, 0, 61, 65, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Supernal Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 62, 64, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Virtue' ORDER BY id DESC LIMIT 1), 8, 0, 62, 66, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Reverence' ORDER BY id DESC LIMIT 1), 8, 0, 62, 66, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Bulwark of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 62, 66, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Kazad`s Mark' ORDER BY id DESC LIMIT 1), 2, 0, 63, 69, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Supernal Light' ORDER BY id DESC LIMIT 1), 2, 0, 63, 64, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Replenishment' ORDER BY id DESC LIMIT 1), 2, 0, 64, 68, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Aura of Reverence' ORDER BY id DESC LIMIT 1), 8, 0, 64, 66, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Hand of Virtue' ORDER BY id DESC LIMIT 1), 8, 0, 65, 66, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Holy Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 65, 66, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Holy Light' ORDER BY id DESC LIMIT 1), 2, 0, 65, 67, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Balikor' ORDER BY id DESC LIMIT 1), 2, 0, 66, 71, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Pious Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 66, 255, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Conviction' ORDER BY id DESC LIMIT 1), 8, 0, 67, 71, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Pious Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 67, 255, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Devotion' ORDER BY id DESC LIMIT 1), 8, 0, 67, 70, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Panoply of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 67, 72, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Pious Light' ORDER BY id DESC LIMIT 1), 2, 0, 68, 69, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Aura of Devotion' ORDER BY id DESC LIMIT 1), 8, 0, 69, 255, 7, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Vivification' ORDER BY id DESC LIMIT 1), 2, 0, 69, 79, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Hand of Conviction' ORDER BY id DESC LIMIT 1), 8, 0, 70, 71, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Balikor\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 70, 74, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Elixir of Divinity' ORDER BY id DESC LIMIT 1), 2, 0, 70, 74, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ancient: Hallowed Light' ORDER BY id DESC LIMIT 1), 2, 0, 70, 72, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Elushar Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 71, 75, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Sacred Remedy Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 71, 75, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Purpose Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 71, 0, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Tenacity Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 72, 76, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Sacred Elixir Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 72, 76, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Aura of Purpose Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 72, 75, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Sacred Light Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 73, 77, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Promised Renewal Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 73, 77, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Aegis of Vie Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 73, 77, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Expunge Corruption Rk. II' ORDER BY id DESC LIMIT 1), 32768, 0, 74, 78, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Hand of Tenacity Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 75, 76, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Elushar\'s Mark Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 75, 79, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Elixir of Redemption Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 75, 79, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Rallied Aegis of Vie Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 75, 77, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Solemn Remedy Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 76, 80, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Kaerra Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 76, 80, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Resolve Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 76, 80, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Temerity Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 77, 81, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Solemn Elixir Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 77, 81, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Eleventh-Hour Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 77, 81, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Aura of Resolve Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 77, 80, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Solemn Light Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 78, 82, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Promised Restoration Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 78, 82, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Shield of Vie Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 78, 82, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Vitiate Corruption Rk. II' ORDER BY id DESC LIMIT 1), 32768, 0, 79, 83, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Hand of Temerity Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 80, 81, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Kaerra\'s Mark Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 80, 84, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Elixir of Atonement Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 80, 84, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Frantic Renewal Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 80, 84, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Rallied Shield of Vie Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 80, 82, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Darianna Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 81, 85, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Devout Remedy Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 81, 85, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Loyalty Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 81, 85, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Gallantry Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 82, 86, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Devout Elixir Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 82, 86, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Twelfth Night Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 82, 86, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Aura of Loyalty Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 82, 85, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Devout Light Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 83, 87, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Promised Recuperation Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 83, 87, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Palladium of Vie Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 83, 87, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Abolish Corruption Rk. II' ORDER BY id DESC LIMIT 1), 32768, 0, 84, 86, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Purified Blood Rk. II' ORDER BY id DESC LIMIT 1), 32768, 0, 84, 88, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Hand of Gallantry Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 85, 86, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Darianna\'s Mark Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 85, 89, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Frenetic Renewal Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 85, 89, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Rallied Palladium of Vie Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 85, 87, 4, 0);
-- Caster DPS Merc
REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type, stance_id, minlevel, maxlevel, slot, procChance) VALUES
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blast of Cold' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 1, 7, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Icestrike' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 6, 11, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Shock of Ice' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 8, 23, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Firestorm ' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 12, 22, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Lightning Storm' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 23, 25, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Frost Shock' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 24, 33, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Energy Storm' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 26, 31, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Lava Storm' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 32, 40, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Ice Shock' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 34, 48, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Concussion' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 37, 70, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Frost Storm' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 41, 57, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Ice Comet' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 49, 60, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Tears of Druzzil' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 52, 54, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Tears of Solusek' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 55, 57, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Tears of Prexus' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 58, 64, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Claw of Frost' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 61, 65, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Tears of Ro' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 61, 64, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Tears of Marr' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 65, 69, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Tears of the Sun' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 66, 69, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Icebane' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 66, 70, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Gelid Rains' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 70, 74, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Rimelure' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 71, 73, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Tears of the Betrayed' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 71, 74, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Concussive Blast' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 71, 75, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Icefall Avalanche' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 74, 78, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Icicle Deluge' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 75, 79, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Concussive Burst' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 76, 80, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Tears of the Forsaken' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 76, 79, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Glacial Collapse' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 79, 83, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Icicle Storm' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 80, 84, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Tears of the Pyrilen' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 81, 84, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Concussive Flash' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 81, 85, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Icesheet Cascade' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 84, 88, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Icicle Torrent' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 85, 89, 2, 0);
REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type, stance_id, minlevel, maxlevel, slot, procChance) VALUES
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blast of Cold' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 1, 7, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Icestrike' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 6, 11, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Shock of Ice' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 8, 23, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Firestorm ' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 12, 22, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Lightning Storm' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 23, 25, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Frost Shock' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 24, 33, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Energy Storm' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 26, 31, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Lava Storm' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 32, 40, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ice Shock' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 34, 48, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Concussion' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 37, 59, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Frost Storm' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 41, 57, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ice Comet' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 49, 60, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Tears of Druzzil' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 52, 54, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Tears of Solusek' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 55, 57, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Tears of Prexus' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 58, 64, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ancient: Greater Concussion' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 60, 70, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Claw of Frost' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 61, 65, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Tears of Ro' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 61, 64, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Tears of Marr' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 65, 69, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Tears of the Sun' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 66, 69, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Icebane' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 66, 70, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Gelid Rains' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 70, 74, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Rimelure Rk. II' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 71, 73, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Tears of the Betrayed Rk. II' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 71, 74, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Concussive Blast Rk. II' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 71, 75, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Icefall Avalanche Rk. II' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 74, 8, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Icicle Deluge Rk. II' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 75, 79, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Concussive Burst Rk. II' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 76, 80, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Tears of the Forsaken Rk. II' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 76, 79, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Glacial Collapse Rk. II' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 79, 83, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Icicle Storm Rk. II' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 80, 84, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Tears of the Pyrilen Rk. II' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 81, 84, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Concussive Flash Rk. II' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 81, 85, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Icesheet Cascade Rk. II' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 84, 88, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 12 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Icicle Torrent Rk. II' AND classes12 < 254 ORDER BY id DESC LIMIT 1), 1, 0, 85, 89, 2, 0);

View File

@ -1441,6 +1441,10 @@ void Client::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_
SetHorseId(0);
dead = true;
if(GetMerc()) {
GetMerc()->Suspend();
}
parse->EventPlayer(EVENT_DEATH, this, "", 0);
if (killerMob != NULL)

View File

@ -337,6 +337,10 @@ Client::~Client() {
if (horse)
horse->Depop();
Mob* merc = entity_list.GetMob(this->GetMercID());
if (merc)
merc->Depop();
if(Trader)
database.DeleteTraderItem(this->CharacterID());

View File

@ -13701,11 +13701,6 @@ void Client::Handle_OP_MercenaryCommand(const EQApplicationPacket *app)
uint32 merc_command = mc->MercCommand; // Seen 0 (zone in with no merc or suspended), 1 (dismiss merc), 5 (normal state), 20 (unknown), 36 (zone in with merc)
int32 option = mc->Option; // Seen -1 (zone in with no merc), 0 (setting to passive stance), 1 (normal or setting to balanced stance)
if(option >= 0)
{
GetMercInfo().State = option;
}
//DumpPacket(app);
if(MERC_DEBUG > 0)
@ -13717,6 +13712,36 @@ void Client::Handle_OP_MercenaryCommand(const EQApplicationPacket *app)
// Handle the Command here...
// Will need a list of what every type of command is supposed to do
// Unsure if there is a server response to this packet
if(option >= 0)
{
Merc* merc = GetMerc();
GetMercInfo().State = option;
if(merc) {
uint8 numStances = 0;
//get number of available stances for the current merc
std::list<MercStanceInfo> mercStanceList = zone->merc_stance_list[merc->GetMercTemplateID()];
list<MercStanceInfo>::iterator iter = mercStanceList.begin();
while(iter != mercStanceList.end()) {
numStances++;
iter++;
}
MercTemplate* mercTemplate = zone->GetMercTemplate(GetMerc()->GetMercTemplateID());
if(mercTemplate) {
//check to see if selected option is a valid stance slot (option is the slot the stance is in, not the actual stance)
if(option >= 0 && option < numStances) {
merc->SetStance(mercTemplate->Stances[option]);
GetMercInfo().Stance = mercTemplate->Stances[option];
if(MERC_DEBUG > 0)
Message(7, "Mercenary Debug: Set Stance: %u", merc->GetStance());
}
}
}
}
}
void Client::Handle_OP_MercenaryDataUpdateRequest(const EQApplicationPacket *app)

View File

@ -16,7 +16,7 @@
extern volatile bool ZoneLoaded;
Merc::Merc(const NPCType* d, float x, float y, float z, float heading)
: NPC(d, 0, x, y, z, heading, 0, false), endupkeep_timer(1000), rest_timer(1), confidence_timer(6000)
: NPC(d, 0, x, y, z, heading, 0, false), endupkeep_timer(1000), rest_timer(1), confidence_timer(6000), check_target_timer(2000)
{
base_hp = d->max_hp;
base_mana = d->Mana;
@ -52,7 +52,7 @@ Merc::Merc(const NPCType* d, float x, float y, float z, float heading)
memset(equipment, 0, sizeof(equipment));
SetMercID(0);
SetStance(MercStancePassive);
SetStance(MercStanceBalanced);
rest_timer.Disable();
int r;
@ -1564,32 +1564,8 @@ void Merc::AI_Process() {
return;
}
if(!IsEngaged()) {
if(GetFollowID()) {
Group* g = GetGroup();
if(g) {
if(MercOwner && MercOwner->GetTarget() && MercOwner->GetTarget()->IsNPC() && (MercOwner->GetTarget()->GetHateAmount(MercOwner) || MercOwner->CastToClient()->AutoAttackEnabled()) && IsAttackAllowed(MercOwner->GetTarget())) {
float range = g->HasRole(MercOwner, RolePuller) ? RuleI(Mercs, AggroRadiusPuller) : RuleI(Mercs, AggroRadius);
range = range * range;
if(MercOwner->GetTarget()->DistNoRootNoZ(*this) < range) {
AddToHateList(MercOwner->GetTarget(), 1);
}
}
else {
for(int counter = 0; counter < g->GroupCount(); counter++) {
if(g->members[counter]) {
if(g->members[counter]->GetTarget() && g->members[counter]->GetTarget()->IsNPC() && g->members[counter]->GetTarget()->GetHateAmount(MercOwner) && IsAttackAllowed(MercOwner->GetTarget())) {
float range = g->HasRole(g->members[counter], RolePuller) ? RuleI(Mercs, AggroRadiusPuller) : RuleI(Mercs, AggroRadius);
range = range * range;
if(g->members[counter]->GetTarget()->DistNoRootNoZ(*this) < range) {
AddToHateList(g->members[counter]->GetTarget(), 1);
}
}
}
}
}
}
}
if(check_target_timer.Check()) {
CheckHateList();
}
if(IsEngaged())
@ -1620,9 +1596,11 @@ void Merc::AI_Process() {
if(GetHatedCount() < hateCount) {
SetHatedCount(hateCount);
if(!confidence_timer.Enabled()) {
confidence_timer.Start(10000);
}
if(!CheckConfidence()) {
if(!confidence_timer.Enabled()) {
confidence_timer.Start(10000);
}
}
}
//Check specific conditions for merc to lose confidence and flee (or regain confidence once fleeing)
@ -1633,9 +1611,9 @@ void Merc::AI_Process() {
if(!CheckConfidence()) {
_lost_confidence = true;
//move to bottome of hate lists?
//move to bottom of hate lists?
//Iterate though hatelist
// SetHate(otherm hate, damage)
// SetHate(other, hate, damage)
if(RuleB(Combat, EnableFearPathing)) {
CalculateNewFearpoint();
@ -1879,6 +1857,9 @@ void Merc::AI_Process() {
SetHatedCount(0);
confidence_timer.Disable();
_check_confidence = false;
if(!check_target_timer.Enabled())
check_target_timer.Start(2000, false);
if(!IsMoving() && AIthink_timer->Check() && !spellend_timer.Enabled()) {
@ -1987,14 +1968,20 @@ bool Merc::AI_EngagedCastCheck() {
}
break;
case MELEEDPS:
if (!AICastSpell(GetChanceToCastBySpellType(SpellType_Nuke), SpellType_Nuke)) {
if (!AICastSpell(GetChanceToCastBySpellType(SpellType_InCombatBuff), SpellType_InCombatBuff)) {
failedToCast = true;
if (!AICastSpell(GetChanceToCastBySpellType(SpellType_Escape), SpellType_Escape)) {
if (!AICastSpell(GetChanceToCastBySpellType(SpellType_Nuke), SpellType_Nuke)) {
if (!AICastSpell(GetChanceToCastBySpellType(SpellType_InCombatBuff), SpellType_InCombatBuff)) {
failedToCast = true;
}
}
}
break;
case CASTERDPS:
failedToCast = true;
if (!AICastSpell(GetChanceToCastBySpellType(SpellType_Escape), SpellType_Escape)) {
if (!AICastSpell(GetChanceToCastBySpellType(SpellType_Nuke), SpellType_Nuke)) {
failedToCast = true;
}
}
break;
}
@ -2158,7 +2145,8 @@ bool Merc::AIDoSpellCast(uint16 spellid, Mob* tar, int32 mana_cost, uint32* oDon
extraMana = false;
}
else { //handle spell recast and recast timers
mercSpell.time_cancast = Timer::GetCurrentTime() + spells[spellid].recast_time;
SetSpellTimeCanCast(mercSpell.spellid, spells[spellid].recast_time);
//mercSpell.time_cancast = Timer::GetCurrentTime() + spells[spellid].recast_time;
if(spells[spellid].EndurTimerIndex > 0) {
SetSpellRecastTimer(spells[spellid].EndurTimerIndex, spellid, spells[spellid].recast_time);
@ -2184,8 +2172,8 @@ bool Merc::AICastSpell(int8 iChance, int32 iSpellTypes) {
uint8 mercLevel = GetLevel();
bool checked_los = false; //we do not check LOS until we are absolutely sure we need to, and we only do it once.
bool castedSpell = false;
bool isDiscipline = false;
if(HasGroup()) {
Group *g = GetGroup();
@ -2199,6 +2187,17 @@ bool Merc::AICastSpell(int8 iChance, int32 iSpellTypes) {
selectedMercSpell.proc_chance = 0;
selectedMercSpell.time_cancast = 0;
switch(mercClass)
{
case TANK:
case MELEEDPS:
isDiscipline = true;
break;
default:
isDiscipline = false;
break;
}
switch (iSpellTypes) {
case SpellType_Heal: {
Mob* tar = NULL;
@ -2301,8 +2300,7 @@ bool Merc::AICastSpell(int8 iChance, int32 iSpellTypes) {
}
if(selectedMercSpell.spellid > 0) {
if(AIDoSpellCast(selectedMercSpell.spellid, tar, -1))
castedSpell = true;
castedSpell = AIDoSpellCast(selectedMercSpell.spellid, tar, -1);
}
if(castedSpell) {
@ -2374,8 +2372,9 @@ bool Merc::AICastSpell(int8 iChance, int32 iSpellTypes) {
uint32 TempDontBuffMeBeforeTime = tar->DontBuffMeBefore();
if(AIDoSpellCast(selectedMercSpell.spellid, tar->GetPet(), -1, &TempDontBuffMeBeforeTime)) {
if(TempDontBuffMeBeforeTime != tar->DontBuffMeBefore())
if(TempDontBuffMeBeforeTime != tar->DontBuffMeBefore()) {
tar->SetDontBuffMeBefore(TempDontBuffMeBeforeTime);
}
castedSpell = true;
}
@ -2387,7 +2386,6 @@ bool Merc::AICastSpell(int8 iChance, int32 iSpellTypes) {
break;
}
case SpellType_Nuke: {
bool isDiscipline = false;
switch(mercClass)
{
case TANK:
@ -2409,29 +2407,43 @@ bool Merc::AICastSpell(int8 iChance, int32 iSpellTypes) {
selectedMercSpell = GetBestMercSpellForHate(this);
}
isDiscipline = true;
break;
case HEALER:
break;
case MELEEDPS:
isDiscipline = true;
break;
case CASTERDPS:
Mob* tar = GetTarget();
break;
selectedMercSpell = GetBestMercSpellForAENuke(this, tar);
if(selectedMercSpell.spellid == 0 && !tar->SpecAttacks[UNSTUNABLE] && !tar->IsStunned()) {
uint8 stunChance = 15;
if(MakeRandomInt(1, 100) <= stunChance) {
selectedMercSpell = GetBestMercSpellForStun(this);
}
}
if(selectedMercSpell.spellid == 0) {
uint8 lureChance = 25;
if(MakeRandomInt(1, 100) <= lureChance) {
selectedMercSpell = GetBestMercSpellForNukeByTargetResists(this, tar);
}
}
if(selectedMercSpell.spellid == 0) {
selectedMercSpell = GetBestMercSpellForNuke(this);
}
break;
}
if(selectedMercSpell.spellid > 0) {
if(isDiscipline) {
if(UseDiscipline(selectedMercSpell.spellid, GetTarget()->GetID())) {
castedSpell = true;
}
castedSpell = UseDiscipline(selectedMercSpell.spellid, GetTarget()->GetID());
}
else {
if(AIDoSpellCast(selectedMercSpell.spellid, GetTarget(), -1)) {
castedSpell = true;
}
castedSpell = AIDoSpellCast(selectedMercSpell.spellid, GetTarget(), -1);
}
}
@ -2505,6 +2517,30 @@ bool Merc::AICastSpell(int8 iChance, int32 iSpellTypes) {
break;
}
case SpellType_Escape: {
Mob* tar = GetTarget();
uint8 hpr = (uint8)GetHPRatio();
bool mayGetAggro = false;
if(tar && (mercClass == CASTERDPS) || (mercClass == MELEEDPS)) {
mayGetAggro = HasOrMayGetAggro(); //classes have hate reducing spells
if (mayGetAggro) {
selectedMercSpell = GetFirstMercSpellBySpellType(this, SpellType_Escape);
if(selectedMercSpell.spellid == 0)
break;
if(isDiscipline) {
castedSpell = UseDiscipline(selectedMercSpell.spellid, tar->GetID());
}
else {
castedSpell = AIDoSpellCast(selectedMercSpell.spellid, tar, -1);
}
}
}
break;
}
}
}
}
@ -2512,6 +2548,122 @@ bool Merc::AICastSpell(int8 iChance, int32 iSpellTypes) {
return castedSpell;
}
void Merc::CheckHateList() {
if(check_target_timer.Enabled())
check_target_timer.Disable();
if(!IsEngaged()) {
if(GetFollowID()) {
Group* g = GetGroup();
if(g) {
Mob* MercOwner = GetOwner();
if(MercOwner && MercOwner->GetTarget() && MercOwner->GetTarget()->IsNPC() && (MercOwner->GetTarget()->GetHateAmount(MercOwner) || MercOwner->CastToClient()->AutoAttackEnabled()) && IsAttackAllowed(MercOwner->GetTarget())) {
float range = g->HasRole(MercOwner, RolePuller) ? RuleI(Mercs, AggroRadiusPuller) : RuleI(Mercs, AggroRadius);
range = range * range;
if(MercOwner->GetTarget()->DistNoRootNoZ(*this) < range) {
AddToHateList(MercOwner->GetTarget(), 1);
}
}
else {
std::list<NPC*> npc_list;
entity_list.GetNPCList(npc_list);
for(std::list<NPC*>::iterator itr = npc_list.begin(); itr != npc_list.end(); itr++) {
NPC* npc = *itr;
float dist = npc->DistNoRootNoZ(*this);
int radius = RuleI(Mercs, AggroRadius);
radius *= radius;
if(dist <= radius) {
for(int counter = 0; counter < g->GroupCount(); counter++) {
Mob* groupMember = g->members[counter];
if(groupMember) {
if(npc->IsOnHatelist(groupMember)) {
if(!hate_list.IsOnHateList(npc)) {
float range = g->HasRole(groupMember, RolePuller) ? RuleI(Mercs, AggroRadiusPuller) : RuleI(Mercs, AggroRadius);
range *= range;
if(npc->DistNoRootNoZ(*this) < range) {
hate_list.Add(npc, 1);
}
}
}
}
}
/*std::list<tHateEntry*> their_hate_list;
npc->GetHateList(their_hate_list);
std::list<tHateEntry*>::iterator hateEntryIter = their_hate_list.begin();
while(hateEntryIter != their_hate_list.end())
{
tHateEntry *entry = (*hateEntryIter);
if(g->IsGroupMember(entry->ent)) {
if(!hate_list.IsOnHateList(npc)) {
float range = g->HasRole(entry->ent, RolePuller) ? RuleI(Mercs, AggroRadiusPuller) : RuleI(Mercs, AggroRadius);
range *= range;
if(entry->ent->DistNoRootNoZ(*this) < range) {
hate_list.Add(entry->ent, 1);
}
}
}
hateEntryIter++;
}*/
}
}
}
}
}
}
}
bool Merc::HasOrMayGetAggro() {
bool mayGetAggro = false;
if(GetTarget() && GetTarget()->GetHateTop()) {
Mob *topHate = GetTarget()->GetHateTop();
if(topHate == this)
mayGetAggro = true; //I currently have aggro
else {
uint32 myHateAmt = GetTarget()->GetHateAmount(this);
uint32 topHateAmt = GetTarget()->GetHateAmount(topHate);
if(myHateAmt > 0 && topHateAmt > 0 && (uint8)((myHateAmt/topHateAmt)*100) > 90) //I have 90% as much hate as top, next action may give me aggro
mayGetAggro = true;
}
}
return mayGetAggro;
}
bool Merc::CheckAENuke(Merc* caster, Mob* tar, uint16 spell_id, uint8 &numTargets) {
std::list<NPC*> npc_list;
entity_list.GetNPCList(npc_list);
for(std::list<NPC*>::iterator itr = npc_list.begin(); itr != npc_list.end(); itr++) {
NPC* npc = *itr;
if(npc->DistNoRootNoZ(*tar) <= spells[spell_id].aoerange * spells[spell_id].aoerange) {
if(!npc->IsMezzed()) {
numTargets++;
}
else {
numTargets = 0;
return false;
}
}
}
if(numTargets > 1)
return true;
return false;
}
int16 Merc::GetFocusEffect(focusType type, uint16 spell_id) {
int16 realTotal = 0;
@ -2937,6 +3089,7 @@ int8 Merc::GetChanceToCastBySpellType(int16 spellType) {
break;
}
case MELEEDPS:{
chance = 100;
break;
}
case CASTERDPS:{
@ -3018,6 +3171,26 @@ int8 Merc::GetChanceToCastBySpellType(int16 spellType) {
case CASTERDPS:{
break;
}
}
break;
}
case SpellType_Escape: {
switch(mercClass)
{
case TANK: {
break;
}
case HEALER:{
break;
}
case MELEEDPS:{
chance = 100;
break;
}
case CASTERDPS:{
chance = 100;
break;
}
}
break;
}
@ -3033,7 +3206,7 @@ bool Merc::CheckStance(int16 stance) {
if(stance == 0
|| (stance > 0 && stance == GetStance())
|| (stance < 0 && abs(stance) != GetStance())) {
|| (stance < 0 && abs(stance) == GetStance())) {
return true;
}
@ -3158,7 +3331,7 @@ std::list<MercSpell> Merc::GetMercSpellsForSpellEffect(Merc* caster, int spellEf
continue;
}
if(IsEffectInSpell(mercSpellList[i].spellid, spellEffect)) {
if(IsEffectInSpell(mercSpellList[i].spellid, spellEffect) && caster->CheckStance(mercSpellList[i].stance)) {
MercSpell MercSpell;
MercSpell.spellid = mercSpellList[i].spellid;
MercSpell.stance = mercSpellList[i].stance;
@ -3188,7 +3361,7 @@ std::list<MercSpell> Merc::GetMercSpellsForSpellEffectAndTargetType(Merc* caster
continue;
}
if(IsEffectInSpell(mercSpellList[i].spellid, spellEffect)) {
if(IsEffectInSpell(mercSpellList[i].spellid, spellEffect) && caster->CheckStance(mercSpellList[i].stance)) {
if(spells[mercSpellList[i].spellid].targettype == targetType) {
MercSpell MercSpell;
MercSpell.spellid = mercSpellList[i].spellid;
@ -3282,30 +3455,25 @@ MercSpell Merc::GetBestMercSpellForHealOverTime(Merc* caster) {
result.time_cancast = 0;
if(caster) {
std::list<MercSpell> botHoTSpellList = GetMercSpellsForSpellEffect(caster, SE_HealOverTime);
std::vector<MercSpell> mercSpellList = caster->GetMercSpells();
std::list<MercSpell> mercHoTSpellList = GetMercSpellsForSpellEffect(caster, SE_HealOverTime);
for(std::list<MercSpell>::iterator mercSpellListItr = botHoTSpellList.begin(); mercSpellListItr != botHoTSpellList.end(); mercSpellListItr++) {
for(std::list<MercSpell>::iterator mercSpellListItr = mercHoTSpellList.begin(); mercSpellListItr != mercHoTSpellList.end(); mercSpellListItr++) {
// Assuming all the spells have been loaded into this list by level and in descending order
if(IsHealOverTimeSpell(mercSpellListItr->spellid)) {
for (int i = mercSpellList.size() - 1; i >= 0; i--) {
if (mercSpellList[i].spellid <= 0 || mercSpellList[i].spellid >= SPDAT_RECORDS) {
// this is both to quit early to save cpu and to avoid casting bad spells
// Bad info from database can trigger this incorrectly, but that should be fixed in DB, not here
continue;
}
if (mercSpellListItr->spellid <= 0 || mercSpellListItr->spellid >= SPDAT_RECORDS) {
// this is both to quit early to save cpu and to avoid casting bad spells
// Bad info from database can trigger this incorrectly, but that should be fixed in DB, not here
continue;
}
if(mercSpellList[i].spellid == mercSpellListItr->spellid
&& (mercSpellList[i].type & SpellType_Heal)
&& CheckSpellRecastTimers(caster, mercSpellListItr->spellid)) {
result.spellid = mercSpellList[i].spellid;
result.stance = mercSpellList[i].stance;
result.type = mercSpellList[i].type;
result.slot = mercSpellList[i].slot;
result.proc_chance = mercSpellList[i].proc_chance;
result.time_cancast = mercSpellList[i].time_cancast;
}
if(CheckSpellRecastTimers(caster, mercSpellListItr->spellid)) {
result.spellid = mercSpellListItr->spellid;
result.stance = mercSpellListItr->stance;
result.type = mercSpellListItr->type;
result.slot = mercSpellListItr->slot;
result.proc_chance = mercSpellListItr->proc_chance;
result.time_cancast = mercSpellListItr->time_cancast;
}
break;
@ -3327,23 +3495,18 @@ MercSpell Merc::GetBestMercSpellForPercentageHeal(Merc* caster) {
result.time_cancast = 0;
if(caster && caster->AI_HasSpells()) {
std::vector<MercSpell> mercSpellList = caster->GetMercSpells();
std::list<MercSpell> mercSpellList = GetMercSpellsForSpellEffect(caster, SE_CurrentHP);
for (int i = mercSpellList.size() - 1; i >= 0; i--) {
if (mercSpellList[i].spellid <= 0 || mercSpellList[i].spellid >= SPDAT_RECORDS) {
// this is both to quit early to save cpu and to avoid casting bad spells
// Bad info from database can trigger this incorrectly, but that should be fixed in DB, not here
continue;
}
if(IsCompleteHealSpell(mercSpellList[i].spellid)
&& CheckSpellRecastTimers(caster, mercSpellList[i].spellid)) {
result.spellid = mercSpellList[i].spellid;
result.stance = mercSpellList[i].stance;
result.type = mercSpellList[i].type;
result.slot = mercSpellList[i].slot;
result.proc_chance = mercSpellList[i].proc_chance;
result.time_cancast = mercSpellList[i].time_cancast;
for(std::list<MercSpell>::iterator mercSpellListItr = mercSpellList.begin(); mercSpellListItr != mercSpellList.end(); mercSpellListItr++) {
// Assuming all the spells have been loaded into this list by level and in descending order
if(IsCompleteHealSpell(mercSpellListItr->spellid)
&& CheckSpellRecastTimers(caster, mercSpellListItr->spellid)) {
result.spellid = mercSpellListItr->spellid;
result.stance = mercSpellListItr->stance;
result.type = mercSpellListItr->type;
result.slot = mercSpellListItr->slot;
result.proc_chance = mercSpellListItr->proc_chance;
result.time_cancast = mercSpellListItr->time_cancast;
break;
}
@ -3461,35 +3624,30 @@ MercSpell Merc::GetBestMercSpellForGroupHealOverTime(Merc* caster) {
result.time_cancast = 0;
if(caster) {
std::list<MercSpell> botHoTSpellList = GetMercSpellsForSpellEffect(caster, SE_HealOverTime);
std::vector<MercSpell> mercSpellList = caster->GetMercSpells();
std::list<MercSpell> mercHoTSpellList = GetMercSpellsForSpellEffect(caster, SE_HealOverTime);
for(std::list<MercSpell>::iterator mercSpellListItr = botHoTSpellList.begin(); mercSpellListItr != botHoTSpellList.end(); mercSpellListItr++) {
// Assuming all the spells have been loaded into this list by level and in descending order
if(IsGroupHealOverTimeSpell(mercSpellListItr->spellid)) {
for(std::list<MercSpell>::iterator mercSpellListItr = mercHoTSpellList.begin(); mercSpellListItr != mercHoTSpellList.end(); mercSpellListItr++) {
// Assuming all the spells have been loaded into this list by level and in descending order
if(IsGroupHealOverTimeSpell(mercSpellListItr->spellid)) {
for (int i = mercSpellList.size() - 1; i >= 0; i--) {
if (mercSpellList[i].spellid <= 0 || mercSpellList[i].spellid >= SPDAT_RECORDS) {
// this is both to quit early to save cpu and to avoid casting bad spells
// Bad info from database can trigger this incorrectly, but that should be fixed in DB, not here
continue;
}
if(mercSpellList[i].spellid == mercSpellListItr->spellid
&& (mercSpellList[i].type & SpellType_Heal)
&& CheckSpellRecastTimers(caster, mercSpellListItr->spellid)) {
result.spellid = mercSpellList[i].spellid;
result.stance = mercSpellList[i].stance;
result.type = mercSpellList[i].type;
result.slot = mercSpellList[i].slot;
result.proc_chance = mercSpellList[i].proc_chance;
result.time_cancast = mercSpellList[i].time_cancast;
}
}
break;
if (mercSpellListItr->spellid <= 0 || mercSpellListItr->spellid >= SPDAT_RECORDS) {
// this is both to quit early to save cpu and to avoid casting bad spells
// Bad info from database can trigger this incorrectly, but that should be fixed in DB, not here
continue;
}
if(CheckSpellRecastTimers(caster, mercSpellListItr->spellid)) {
result.spellid = mercSpellListItr->spellid;
result.stance = mercSpellListItr->stance;
result.type = mercSpellListItr->type;
result.slot = mercSpellListItr->slot;
result.proc_chance = mercSpellListItr->proc_chance;
result.time_cancast = mercSpellListItr->time_cancast;
}
break;
}
}
}
return result;
@ -3744,6 +3902,339 @@ MercSpell Merc::GetBestMercSpellForCure(Merc* caster, Mob *tar) {
return result;
}
MercSpell Merc::GetBestMercSpellForStun(Merc* caster) {
MercSpell result;
bool spellSelected = false;
result.spellid = 0;
result.stance = 0;
result.type = 0;
result.slot = 0;
result.proc_chance = 0;
result.time_cancast = 0;
if(caster) {
std::list<MercSpell> mercSpellList = GetMercSpellsForSpellEffect(caster, SE_Stun);
for(std::list<MercSpell>::iterator mercSpellListItr = mercSpellList.begin(); mercSpellListItr != mercSpellList.end(); mercSpellListItr++) {
// Assuming all the spells have been loaded into this list by level and in descending order
if(CheckSpellRecastTimers(caster, mercSpellListItr->spellid)) {
result.spellid = mercSpellListItr->spellid;
result.stance = mercSpellListItr->stance;
result.type = mercSpellListItr->type;
result.slot = mercSpellListItr->slot;
result.proc_chance = mercSpellListItr->proc_chance;
result.time_cancast = mercSpellListItr->time_cancast;
break;
}
}
}
return result;
}
MercSpell Merc::GetBestMercSpellForAENuke(Merc* caster, Mob* tar) {
MercSpell result;
bool spellSelected = false;
result.spellid = 0;
result.stance = 0;
result.type = 0;
result.slot = 0;
result.proc_chance = 0;
result.time_cancast = 0;
if(caster) {
uint8 initialCastChance = 0;
uint8 castChanceFalloff = 75;
switch(caster->GetStance())
{
case MercStanceBurnAE:
initialCastChance = 50;
break;
case MercStanceBalanced:
initialCastChance = 25;
break;
case MercStanceBurn:
initialCastChance = 0;
break;
}
//check of we even want to cast an AE nuke
if(MakeRandomInt(1, 100) <= initialCastChance) {
result = GetBestMercSpellForAERainNuke(caster, tar);
//check if we have a spell & allow for other AE nuke types
if(result.spellid == 0 && MakeRandomInt(1, 100) <= castChanceFalloff) {
result = GetBestMercSpellForPBAENuke(caster, tar);
//check if we have a spell & allow for other AE nuke types
if(result.spellid == 0 && MakeRandomInt(1, 100) <= castChanceFalloff) {
result = GetBestMercSpellForTargetedAENuke(caster, tar);
}
}
}
}
return result;
}
MercSpell Merc::GetBestMercSpellForTargetedAENuke(Merc* caster, Mob* tar) {
MercSpell result;
int castChance = 50; //used to cycle through multiple spells (first has 50% overall chance, 2nd has 25%, etc.)
int numTargetsCheck = 1; //used to check for min number of targets to use AE
bool spellSelected = false;
result.spellid = 0;
result.stance = 0;
result.type = 0;
result.slot = 0;
result.proc_chance = 0;
result.time_cancast = 0;
switch(caster->GetStance())
{
case MercStanceBurnAE:
numTargetsCheck = 1;
break;
case MercStanceBalanced:
case MercStanceBurn:
numTargetsCheck = 2;
break;
}
if(caster) {
std::list<MercSpell> mercSpellList = GetMercSpellsBySpellType(caster, SpellType_Nuke);
for(std::list<MercSpell>::iterator mercSpellListItr = mercSpellList.begin(); mercSpellListItr != mercSpellList.end(); mercSpellListItr++) {
// Assuming all the spells have been loaded into this list by level and in descending order
if(IsAENukeSpell(mercSpellListItr->spellid) && !IsAERainNukeSpell(mercSpellListItr->spellid)
&& !IsPBAENukeSpell(mercSpellListItr->spellid) && CheckSpellRecastTimers(caster, mercSpellListItr->spellid)) {
uint8 numTargets = 0;
if(CheckAENuke(caster, tar, mercSpellListItr->spellid, numTargets)) {
if(numTargets >= numTargetsCheck && MakeRandomInt(1, 100) <= castChance) {
result.spellid = mercSpellListItr->spellid;
result.stance = mercSpellListItr->stance;
result.type = mercSpellListItr->type;
result.slot = mercSpellListItr->slot;
result.proc_chance = mercSpellListItr->proc_chance;
result.time_cancast = mercSpellListItr->time_cancast;
}
}
break;
}
}
}
return result;
}
MercSpell Merc::GetBestMercSpellForPBAENuke(Merc* caster, Mob* tar) {
MercSpell result;
int castChance = 50; //used to cycle through multiple spells (first has 50% overall chance, 2nd has 25%, etc.)
int numTargetsCheck = 1; //used to check for min number of targets to use AE
bool spellSelected = false;
result.spellid = 0;
result.stance = 0;
result.type = 0;
result.slot = 0;
result.proc_chance = 0;
result.time_cancast = 0;
switch(caster->GetStance())
{
case MercStanceBurnAE:
numTargetsCheck = 2;
break;
case MercStanceBalanced:
case MercStanceBurn:
numTargetsCheck = 3;
break;
}
if(caster) {
std::list<MercSpell> mercSpellList = GetMercSpellsBySpellType(caster, SpellType_Nuke);
for(std::list<MercSpell>::iterator mercSpellListItr = mercSpellList.begin(); mercSpellListItr != mercSpellList.end(); mercSpellListItr++) {
// Assuming all the spells have been loaded into this list by level and in descending order
if(IsPBAENukeSpell(mercSpellListItr->spellid) && CheckSpellRecastTimers(caster, mercSpellListItr->spellid)) {
uint8 numTargets = 0;
if(CheckAENuke(caster, caster, mercSpellListItr->spellid, numTargets)) {
if(numTargets >= numTargetsCheck && MakeRandomInt(1, 100) <= castChance) {
result.spellid = mercSpellListItr->spellid;
result.stance = mercSpellListItr->stance;
result.type = mercSpellListItr->type;
result.slot = mercSpellListItr->slot;
result.proc_chance = mercSpellListItr->proc_chance;
result.time_cancast = mercSpellListItr->time_cancast;
}
}
break;
}
}
}
return result;
}
MercSpell Merc::GetBestMercSpellForAERainNuke(Merc* caster, Mob* tar) {
MercSpell result;
int castChance = 50; //used to cycle through multiple spells (first has 50% overall chance, 2nd has 25%, etc.)
int numTargetsCheck = 1; //used to check for min number of targets to use AE
bool spellSelected = false;
result.spellid = 0;
result.stance = 0;
result.type = 0;
result.slot = 0;
result.proc_chance = 0;
result.time_cancast = 0;
switch(caster->GetStance())
{
case MercStanceBurnAE:
numTargetsCheck = 1;
break;
case MercStanceBalanced:
case MercStanceBurn:
numTargetsCheck = 2;
break;
}
if(caster) {
std::list<MercSpell> mercSpellList = GetMercSpellsBySpellType(caster, SpellType_Nuke);
for(std::list<MercSpell>::iterator mercSpellListItr = mercSpellList.begin(); mercSpellListItr != mercSpellList.end(); mercSpellListItr++) {
// Assuming all the spells have been loaded into this list by level and in descending order
if(IsAERainNukeSpell(mercSpellListItr->spellid) && MakeRandomInt(1, 100) <= castChance && CheckSpellRecastTimers(caster, mercSpellListItr->spellid)) {
uint8 numTargets = 0;
if(CheckAENuke(caster, tar, mercSpellListItr->spellid, numTargets)) {
if(numTargets >= numTargetsCheck) {
result.spellid = mercSpellListItr->spellid;
result.stance = mercSpellListItr->stance;
result.type = mercSpellListItr->type;
result.slot = mercSpellListItr->slot;
result.proc_chance = mercSpellListItr->proc_chance;
result.time_cancast = mercSpellListItr->time_cancast;
}
}
break;
}
}
}
return result;
}
MercSpell Merc::GetBestMercSpellForNuke(Merc* caster) {
MercSpell result;
int castChance = 50; //used to cycle through multiple spells (first has 50% overall chance, 2nd has 25%, etc.)
bool spellSelected = false;
result.spellid = 0;
result.stance = 0;
result.type = 0;
result.slot = 0;
result.proc_chance = 0;
result.time_cancast = 0;
if(caster) {
std::list<MercSpell> mercSpellList = GetMercSpellsBySpellType(caster, SpellType_Nuke);
for(std::list<MercSpell>::iterator mercSpellListItr = mercSpellList.begin(); mercSpellListItr != mercSpellList.end(); mercSpellListItr++) {
// Assuming all the spells have been loaded into this list by level and in descending order
if(IsPureNukeSpell(mercSpellListItr->spellid) && !IsAENukeSpell(mercSpellListItr->spellid)
&& MakeRandomInt(1, 100) <= castChance && CheckSpellRecastTimers(caster, mercSpellListItr->spellid)) {
result.spellid = mercSpellListItr->spellid;
result.stance = mercSpellListItr->stance;
result.type = mercSpellListItr->type;
result.slot = mercSpellListItr->slot;
result.proc_chance = mercSpellListItr->proc_chance;
result.time_cancast = mercSpellListItr->time_cancast;
break;
}
}
}
return result;
}
MercSpell Merc::GetBestMercSpellForNukeByTargetResists(Merc* caster, Mob* target) {
MercSpell result;
bool spellSelected = false;
result.spellid = 0;
result.stance = 0;
result.type = 0;
result.slot = 0;
result.proc_chance = 0;
result.time_cancast = 0;
if(!target)
return result;
if(caster) {
const int lureResisValue = -100;
const int maxTargetResistValue = 300;
bool selectLureNuke = false;
if((target->GetMR() > maxTargetResistValue) && (target->GetCR() > maxTargetResistValue) && (target->GetFR() > maxTargetResistValue))
selectLureNuke = true;
std::list<MercSpell> mercSpellList = GetMercSpellsBySpellType(caster, SpellType_Nuke);
for(std::list<MercSpell>::iterator mercSpellListItr = mercSpellList.begin(); mercSpellListItr != mercSpellList.end(); mercSpellListItr++) {
// Assuming all the spells have been loaded into this list by level and in descending order
if(IsPureNukeSpell(mercSpellListItr->spellid) && !IsAENukeSpell(mercSpellListItr->spellid) && CheckSpellRecastTimers(caster, mercSpellListItr->spellid)) {
if(selectLureNuke && (spells[mercSpellListItr->spellid].ResistDiff < lureResisValue)) {
spellSelected = true;
}
else {
if(((target->GetMR() < target->GetCR()) || (target->GetMR() < target->GetFR())) && (GetSpellResistType(mercSpellListItr->spellid) == RESIST_MAGIC)
&& (spells[mercSpellListItr->spellid].ResistDiff > lureResisValue))
{
spellSelected = true;
}
else if(((target->GetCR() < target->GetMR()) || (target->GetCR() < target->GetFR())) && (GetSpellResistType(mercSpellListItr->spellid) == RESIST_COLD)
&& (spells[mercSpellListItr->spellid].ResistDiff > lureResisValue))
{
spellSelected = true;
}
else if(((target->GetFR() < target->GetCR()) || (target->GetFR() < target->GetMR())) && (GetSpellResistType(mercSpellListItr->spellid) == RESIST_FIRE)
&& (spells[mercSpellListItr->spellid].ResistDiff > lureResisValue))
{
spellSelected = true;
}
}
}
if(spellSelected) {
result.spellid = mercSpellListItr->spellid;
result.stance = mercSpellListItr->stance;
result.type = mercSpellListItr->type;
result.slot = mercSpellListItr->slot;
result.proc_chance = mercSpellListItr->proc_chance;
result.time_cancast = mercSpellListItr->time_cancast;
break;
}
}
}
return result;
}
bool Merc::GetNeedsCured(Mob *tar) {
bool needCured = false;
@ -3919,6 +4410,14 @@ bool Merc::CheckDisciplineRecastTimers(Merc *caster, uint16 spell_id) {
return false;
}
void Merc::SetSpellTimeCanCast(uint16 spellid, uint32 recast_delay) {
for (int i = 0; i < merc_spells.size(); i++) {
if(merc_spells[i].spellid == spellid) {
merc_spells[i].time_cancast = Timer::GetCurrentTime() + recast_delay;
}
}
}
bool Merc::CheckTaunt() {
Mob* tar = GetTarget();
//Only taunt if we are not top on target's hate list
@ -3941,8 +4440,11 @@ bool Merc::CheckAETaunt() {
for(std::list<NPC*>::iterator itr = npc_list.begin(); itr != npc_list.end(); itr++) {
NPC* npc = *itr;
float dist = npc->DistNoRootNoZ(*this);
int range = GetActSpellRange(mercSpell.spellid, spells[mercSpell.spellid].range);
range *= range;
if(npc->DistNoRootNoZ(*this) <= GetActSpellRange(mercSpell.spellid, spells[mercSpell.spellid].range)) {
if(dist <= range) {
if(!npc->IsMezzed()) {
if(HasGroup()) {
Group* g = GetGroup();
@ -5058,6 +5560,7 @@ void Client::SpawnMerc(Merc* merc, bool setMaxStats)
merc->SetSuspended(false);
SetMerc(merc);
merc->Unsuspend(setMaxStats);
merc->SetStance(GetMercInfo().Stance);
}
}
@ -5078,6 +5581,7 @@ bool Merc::Suspend() {
mercOwner->GetMercInfo().IsSuspended = true;
mercOwner->GetMercInfo().SuspendedTime = time(NULL) + RuleI(Mercs, SuspendIntervalS);
mercOwner->GetMercInfo().MercTimerRemaining = mercOwner->GetMercTimer().GetRemainingTime();
mercOwner->GetMercInfo().Stance = GetStance();
mercOwner->GetMercTimer().Disable();
//mercOwner->UpdateMercTimer();
mercOwner->SendMercSuspendResponsePacket(mercOwner->GetMercInfo().SuspendedTime);
@ -5342,7 +5846,9 @@ void Client::SetMerc(Merc* newmerc) {
}
if (!newmerc) {
SetMercID(0);
GetMercInfo().mercid = 0;
GetMercInfo().MercTemplateID = 0;
GetMercInfo().myTemplate = NULL;
GetMercInfo().IsSuspended = false;
GetMercInfo().SuspendedTime = 0;
GetMercInfo().Gender = 0;
@ -5363,6 +5869,8 @@ void Client::SetMerc(Merc* newmerc) {
GetMercInfo().IsSuspended = newmerc->IsSuspended();
GetMercInfo().SuspendedTime = 0;
GetMercInfo().Gender = newmerc->GetGender();
//GetMercInfo().State = newmerc->GetStance();
GetMercInfo().MercTimerRemaining = 0;
}
}

View File

@ -86,6 +86,7 @@ public:
int8 GetChanceToCastBySpellType(int16 spellType);
void SetSpellRecastTimer(uint16 timer_id, uint16 spellid, uint32 recast_delay);
void SetDisciplineRecastTimer(uint16 timer_id, uint16 spellid, uint32 recast_delay);
void SetSpellTimeCanCast(uint16 spellid, uint32 recast_delay);
static int32 GetSpellRecastTimer(Merc *caster, uint16 timer_id);
static bool CheckSpellRecastTimers(Merc *caster, uint16 spellid);
static int32 GetDisciplineRecastTimer(Merc *caster, uint16 timer_id);
@ -109,7 +110,16 @@ public:
static MercSpell GetBestMercSpellForTaunt(Merc* caster);
static MercSpell GetBestMercSpellForHate(Merc* caster);
static MercSpell GetBestMercSpellForCure(Merc* caster, Mob* target);
static MercSpell GetBestMercSpellForStun(Merc* caster);
static MercSpell GetBestMercSpellForAENuke(Merc* caster, Mob* target);
static MercSpell GetBestMercSpellForTargetedAENuke(Merc* caster, Mob* target);
static MercSpell GetBestMercSpellForPBAENuke(Merc* caster, Mob* target);
static MercSpell GetBestMercSpellForAERainNuke(Merc* caster, Mob* target);
static MercSpell GetBestMercSpellForNuke(Merc* caster);
static MercSpell GetBestMercSpellForNukeByTargetResists(Merc* caster, Mob* target);
static bool CheckAENuke(Merc* caster, Mob* tar, uint16 spell_id, uint8 &numTargets);
static bool GetNeedsCured(Mob *tar);
bool HasOrMayGetAggro();
bool UseDiscipline(int32 spell_id, int32 target);
virtual bool IsMerc() const { return true; }
@ -161,6 +171,7 @@ public:
uint16 MaxSkill(SkillType skillid, uint16 class_, uint16 level) const;
inline uint16 MaxSkill(SkillType skillid) const { return MaxSkill(skillid, GetClass(), GetLevel()); }
virtual void DoClassAttacks(Mob *target);
void CheckHateList();
bool CheckTaunt();
bool CheckAETaunt();
bool CheckConfidence();
@ -247,7 +258,7 @@ public:
bool IsStanding();
// Merc-specific functions
bool IsMercCaster() { return (GetClass() == CLERIC || GetClass() == DRUID || GetClass() == SHAMAN || GetClass() == NECROMANCER || GetClass() == WIZARD || GetClass() == MAGICIAN || GetClass() == ENCHANTER); }
bool IsMercCaster() { return (GetClass() == HEALER || GetClass() == CASTERDPS); }
bool IsMercCasterCombatRange(Mob *target);
virtual float GetMaxMeleeRangeToTarget(Mob* target);
virtual void MercMeditate(bool isSitting);
@ -373,6 +384,7 @@ private:
Timer endupkeep_timer;
Timer rest_timer;
Timer confidence_timer;
Timer check_target_timer;
};
#endif // MERC_H

View File

@ -665,6 +665,7 @@ void Zone::LoadMercTemplates(){
}
else {
while(DataRow = mysql_fetch_row(DatasetResult)) {
int stanceIndex = 0;
MercTemplate tempMercTemplate;
tempMercTemplate.MercTemplateID = atoi(DataRow[0]);
@ -678,11 +679,17 @@ void Zone::LoadMercTemplates(){
tempMercTemplate.ClientVersion = atoi(DataRow[8]);
tempMercTemplate.MercNPCID = atoi(DataRow[9]);
for(std::list<MercStanceInfo>::iterator mercStanceListItr = merc_stances.begin(); mercStanceListItr != merc_stances.end(); mercStanceListItr++) {
for(int i = 0; i < MaxMercStanceID; i++) {
tempMercTemplate.Stances[i] = 0;
}
for(std::list<MercStanceInfo>::iterator mercStanceListItr = merc_stances.begin(); mercStanceListItr != merc_stances.end(); mercStanceListItr++) {
if(mercStanceListItr->ClassID == tempMercTemplate.ClassID && mercStanceListItr->ProficiencyID == tempMercTemplate.ProficiencyID) {
zone->merc_stance_list[tempMercTemplate.MercTemplateID].push_back((*mercStanceListItr));
}
zone->merc_stance_list[tempMercTemplate.MercTemplateID].push_back((*mercStanceListItr));
tempMercTemplate.Stances[stanceIndex] = mercStanceListItr->StanceID;
stanceIndex++;
}
}
merc_templates[tempMercTemplate.MercTemplateID] = tempMercTemplate;
}

View File

@ -1630,7 +1630,8 @@ bool ZoneDatabase::LoadMercInfo(Client *c) {
c->GetMercInfo(slot).IsSuspended = atoi(DataRow[5]) == 1 ? true : false;
c->GetMercInfo(slot).MercTimerRemaining = atoi(DataRow[6]);
c->GetMercInfo(slot).Gender = atoi(DataRow[7]);
c->GetMercInfo(slot).State = atoi(DataRow[8]);
c->GetMercInfo(slot).State = 5;
c->GetMercInfo(slot).Stance = atoi(DataRow[8]);
c->GetMercInfo(slot).hp = atoi(DataRow[9]);
c->GetMercInfo(slot).mana = atoi(DataRow[10]);
c->GetMercInfo(slot).endurance = atoi(DataRow[11]);

View File

@ -131,6 +131,7 @@ struct MercInfo {
uint32 MercTimerRemaining;
uint8 Gender;
int32 State;
uint32 Stance;
int32 hp;
int32 mana;
int32 endurance;