Closed kennumen closed 11 years ago
https://github.com/blueboy/portal/commit/32454079bf11a8c489a533aded362520f542e0ca
HealTarget (HealPlayer now) now holds error checks in PlayerbotClassAI. It's not easily possible to extract out all the code as there can be quite a few exceptions. Some spells require checks (has this target received a priest's shield in the past X seconds), others extra checks (is the priest's own health low as well? Is this a tank or healer?), and future integration of group healing (are there at least 3 party members worth healing? -> group heal) would be made more difficult by this. I'll leave it at that.
As far as this issue is concerned, that leaves GetResurrectTarget and GetBuffTarget code as a TODO.
https://github.com/blueboy/portal/commit/0cddeff4c10f6eeb867b3fbf72283edbc1e6c466
GetResurrectTarget() is done and in use.
This [i]may[/i] cause problems with buffing and as such the new GetTargetWithoutBuff code (and use thereof) is my top priority now.
https://github.com/blueboy/portal/commit/fc960c4b99e43027e684bf1e924b769297f0290d
Framework and Paladin done.
Druid, Priest, Mage to go. Pretty sure that's all of them then, will need to check.
https://github.com/blueboy/portal/commit/af6d50a15ab92b58ea235b8888417166581bd2b4 Druid
https://github.com/blueboy/portal/commit/6b4e8ea349c03ebc97b8d7e1bfc5c4b1e08b121b Priest & Mage
Both times save half the code. The DoNonCombatManeuver() functions are certainly a lot clearer. Had to take out a 'mana users only' check for the priest spirit buff. The mage buff doesn't have this check but could use it as well. Will solve this with a new JOB_TYPE right now.
... https://github.com/blueboy/portal/commit/a1a9a4ac385f67dfc319211a8e7ea0d0c1a587f4 And done.
First adapt GetHealTarget() to take extra input:
Copy GetHealTarget() into GetResurrectTarget() code.
Find a way to generalize HealTarget. It's mostly the same code. Can it be done with a simple 'minHP, spellToCast' table passed along?