Skip to content

Commit 8a33e2c

Browse files
committed
bot hunter wingclip fix
1 parent 050a010 commit 8a33e2c

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/modules/Bots/playerbot/strategy/hunter/GenericHunterStrategy.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class GenericHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionN
1414
creators["boost"] = &rapid_fire;
1515
creators["aspect of the pack"] = &aspect_of_the_pack;
1616
creators["feign death"] = &feign_death;
17+
creators["wing clip"] = &wing_clip;
1718
}
1819
private:
1920
static ActionNode* rapid_fire(PlayerbotAI* ai)
@@ -37,6 +38,13 @@ class GenericHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionN
3738
/*A*/ NextAction::array(0, new NextAction("flee"), NULL),
3839
/*C*/ NULL);
3940
}
41+
static ActionNode* wing_clip(PlayerbotAI* ai)
42+
{
43+
return new ActionNode ("wing clip",
44+
/*P*/ NULL,
45+
/*A*/ NULL,
46+
/*C*/ NULL);
47+
}
4048
};
4149

4250
GenericHunterStrategy::GenericHunterStrategy(PlayerbotAI* ai) : RangedCombatStrategy(ai)

src/modules/Bots/playerbot/strategy/hunter/HunterActions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ namespace ai
123123
virtual bool isUseful()
124124
{
125125
Unit* target = GetTarget();
126-
return target && target->IsAlive() && CastMeleeSpellAction::isUseful() && !ai->HasAura(spell, target);
126+
return target && target->IsAlive() && CastMeleeSpellAction::isUseful() && !ai->HasAura(spell, target) && target->getVictim() == bot;
127127
}
128128
};
129129

0 commit comments

Comments
 (0)