PDA

View Full Version : enchanter bots


Tricyclethief
05-25-2010, 04:08 AM
searched through forums and I cant seem to find anything on this. with latest code i make an enc bot, first thing it does is summon a pet. I then use #bot pet remove to test charm and i get a "You must target your enchanter, necromancer or druid bot" msg. anyone else getting this?

c0ncrete
06-02-2010, 04:41 PM
Looks like there's a logic error in the code. It's checking for someone OTHER than the bot's owner before it executes the command.

In bot.cpp there's a line that reads:

if (c->IsGrouped() && c->GetTarget()->IsBot() && (c->GetTarget()->CastToBot()->GetBotOwnerCharacterID() != c->CharacterID()) &&
((c->GetTarget()->GetClass() == NECROMANCER) || (c->GetTarget()->GetClass() == ENCHANTER) || (c->GetTarget()->GetClass() == DRUID))) {

that should read:
if (c->IsGrouped() && c->GetTarget()->IsBot() && (c->GetTarget()->CastToBot()->GetBotOwnerCharacterID() == c->CharacterID()) &&
((c->GetTarget()->GetClass() == NECROMANCER) || (c->GetTarget()->GetClass() == ENCHANTER) || (c->GetTarget()->GetClass() == DRUID))) {

That should fix it.