ike3 / mangosbot

This is a modification of MaNGOS (Zero, One, R2, Trinity) server which brings a number of bots online and available for any player. Also allows you to use your account/guild characters as bots.
http://ike3.github.io/mangosbot-docs/
GNU General Public License v2.0
183 stars 78 forks source link

Priest Fortitude Buff #34

Open TheJrod opened 9 years ago

TheJrod commented 9 years ago

Hi, First I would like to say thank you Ike3 for these bots.. They are awsome! But I have a Priest buff problem. When I have a Priest bot in party and a Hunter (Or i play the hunter) then when the HunterPet is called, the Priest will start buffing the Pet with Power Word Fortitude, again and again, until it runs out of mana, then it will drink up, and party starts all over again.

For now i have solved this by Removing the "power word: fortitude on party", from the source code file "PriestNonCombatStrategy.cpp" so now the Priest does not buff the party with fortitude, only it self. Other Priest buffs on party, works fine.

Are there any solution for this?

Also i noticed that: I had a Druid bot in Party, and one of the other bots used a "Scroll Of Stamina" on it self, and the the Druid started buffing "Mark of the wild" on that bot again and again.

I know its small bugs, and its possible to live without. Just thought i would mention them.

/Jrod

ike3 commented 9 years ago

It seems if a target has some more powerful spell it is possible to cast another buff spell but the aura won't apply. I think the best place to check this is bool PlayerbotAI::CanCastSpell(uint32 spellid, Unit* target, bool checkHasSpell) but spell->CheckCast returns SPELL_CAST_OK. That's why bot is casting the spell indefinetely. Other solution could be add additional check in BuffTrigger::IsActive. Something like && hasMorePowerfulSpellActive(target, spell). But how to check if spell is more powerful and aura won't apply?

TheJrod commented 9 years ago

I will start looking into it, and then i will get back to you here, if i find a solution.