mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Dps hunter
This commit is contained in:
parent
9fb8f2fdf4
commit
6789237843
@ -108,6 +108,7 @@ void StatsWeightCalculator::GenerateWeights(Player* player)
|
|||||||
{
|
{
|
||||||
GenerateBasicWeights(player);
|
GenerateBasicWeights(player);
|
||||||
GenerateAdditionalWeights(player);
|
GenerateAdditionalWeights(player);
|
||||||
|
ApplyWeightFinetune(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatsWeightCalculator::GenerateBasicWeights(Player* player)
|
void StatsWeightCalculator::GenerateBasicWeights(Player* player)
|
||||||
@ -458,7 +459,7 @@ void StatsWeightCalculator::CalculateItemTypePenalty(ItemTemplate const* proto)
|
|||||||
weight_ *= 0.1;
|
weight_ *= 0.1;
|
||||||
}
|
}
|
||||||
// fury with titan's grip
|
// fury with titan's grip
|
||||||
if ((!isDoubleHand || proto->SubClass == ITEM_SUBCLASS_WEAPON_POLEARM) &&
|
if ((!isDoubleHand || proto->SubClass == ITEM_SUBCLASS_WEAPON_POLEARM || proto->SubClass == ITEM_SUBCLASS_WEAPON_STAFF) &&
|
||||||
(cls == CLASS_WARRIOR && tab == WARRIOR_TAB_FURY && player_->CanTitanGrip()))
|
(cls == CLASS_WARRIOR && tab == WARRIOR_TAB_FURY && player_->CanTitanGrip()))
|
||||||
{
|
{
|
||||||
weight_ *= 0.1;
|
weight_ *= 0.1;
|
||||||
@ -600,6 +601,19 @@ void StatsWeightCalculator::ApplyOverflowPenalty(Player* player)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void StatsWeightCalculator::ApplyWeightFinetune(Player* player)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
if (type_ == CollectorType::MELEE || type_ == CollectorType::RANGED)
|
||||||
|
{
|
||||||
|
float armor_penetration_current, armor_penetration_overflow;
|
||||||
|
armor_penetration_current = player->GetRatingBonusValue(CR_ARMOR_PENETRATION);
|
||||||
|
if (armor_penetration_current > 50)
|
||||||
|
stats_weights_[STATS_TYPE_ARMOR_PENETRATION] *= 1.2f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CollectorType StatsWeightCalculator::GetHitOverflowType(Player* player)
|
CollectorType StatsWeightCalculator::GetHitOverflowType(Player* player)
|
||||||
{
|
{
|
||||||
cls = player->getClass();
|
cls = player->getClass();
|
||||||
|
|||||||
@ -48,6 +48,7 @@ private:
|
|||||||
bool NotBestArmorType(uint32 item_subclass_armor);
|
bool NotBestArmorType(uint32 item_subclass_armor);
|
||||||
|
|
||||||
void ApplyOverflowPenalty(Player* player);
|
void ApplyOverflowPenalty(Player* player);
|
||||||
|
void ApplyWeightFinetune(Player* player);
|
||||||
CollectorType GetHitOverflowType(Player* player);
|
CollectorType GetHitOverflowType(Player* player);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -41,12 +41,13 @@ DpsHunterStrategy::DpsHunterStrategy(PlayerbotAI* botAI) : GenericHunterStrategy
|
|||||||
NextAction** DpsHunterStrategy::getDefaultActions()
|
NextAction** DpsHunterStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(
|
return NextAction::array(
|
||||||
0, new NextAction("kill shot", ACTION_DEFAULT + 0.6f), new NextAction("chimera shot", ACTION_DEFAULT + 0.5f),
|
0, new NextAction("kill shot", ACTION_DEFAULT + 0.8f), new NextAction("chimera shot", ACTION_DEFAULT + 0.7f),
|
||||||
new NextAction("explosive shot", ACTION_DEFAULT + 0.4f), new NextAction("aimed shot", ACTION_DEFAULT + 0.3f),
|
new NextAction("explosive shot", ACTION_DEFAULT + 0.6f), new NextAction("aimed shot", ACTION_DEFAULT + 0.5f),
|
||||||
/*new NextAction("arcane shot", ACTION_DEFAULT + 0.2f),*/ new NextAction("steady shot", ACTION_DEFAULT + 0.1f),
|
new NextAction("silencing shot", ACTION_DEFAULT + 0.4f),
|
||||||
|
new NextAction("kill command", ACTION_DEFAULT + 0.3f),
|
||||||
|
new NextAction("arcane shot", ACTION_DEFAULT + 0.2f),
|
||||||
|
new NextAction("steady shot", ACTION_DEFAULT + 0.1f),
|
||||||
new NextAction("auto shot", ACTION_DEFAULT), nullptr);
|
new NextAction("auto shot", ACTION_DEFAULT), nullptr);
|
||||||
// return NextAction::array(0, new NextAction("explosive shot", 11.0f), new NextAction("auto shot", 10.0f), new
|
|
||||||
// NextAction("auto attack", 9.0f), nullptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DpsHunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void DpsHunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
|
|||||||
@ -78,6 +78,9 @@ END_SPELL_ACTION()
|
|||||||
BEGIN_RANGED_SPELL_ACTION(CastKillShotAction, "kill shot")
|
BEGIN_RANGED_SPELL_ACTION(CastKillShotAction, "kill shot")
|
||||||
END_SPELL_ACTION()
|
END_SPELL_ACTION()
|
||||||
|
|
||||||
|
BEGIN_RANGED_SPELL_ACTION(CastSilencingShotAction, "silencing shot")
|
||||||
|
END_SPELL_ACTION()
|
||||||
|
|
||||||
BEGIN_RANGED_SPELL_ACTION(CastTranquilizingShotAction, "tranquilizing shot")
|
BEGIN_RANGED_SPELL_ACTION(CastTranquilizingShotAction, "tranquilizing shot")
|
||||||
END_SPELL_ACTION()
|
END_SPELL_ACTION()
|
||||||
|
|
||||||
@ -139,6 +142,14 @@ public:
|
|||||||
std::string const GetTargetName() override { return "pet target"; }
|
std::string const GetTargetName() override { return "pet target"; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class CastKillCommandAction : public CastAuraSpellAction
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CastKillCommandAction(PlayerbotAI* botAI) : CastAuraSpellAction(botAI, "kill command") {}
|
||||||
|
|
||||||
|
std::string const GetTargetName() override { return "pet target"; }
|
||||||
|
};
|
||||||
|
|
||||||
class CastRevivePetAction : public CastBuffSpellAction
|
class CastRevivePetAction : public CastBuffSpellAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -143,6 +143,7 @@ public:
|
|||||||
creators["scorpid sting"] = &HunterAiObjectContextInternal::scorpid_sting;
|
creators["scorpid sting"] = &HunterAiObjectContextInternal::scorpid_sting;
|
||||||
creators["hunter's mark"] = &HunterAiObjectContextInternal::hunters_mark;
|
creators["hunter's mark"] = &HunterAiObjectContextInternal::hunters_mark;
|
||||||
creators["mend pet"] = &HunterAiObjectContextInternal::mend_pet;
|
creators["mend pet"] = &HunterAiObjectContextInternal::mend_pet;
|
||||||
|
creators["kill command"] = &HunterAiObjectContextInternal::kill_command;
|
||||||
creators["revive pet"] = &HunterAiObjectContextInternal::revive_pet;
|
creators["revive pet"] = &HunterAiObjectContextInternal::revive_pet;
|
||||||
creators["call pet"] = &HunterAiObjectContextInternal::call_pet;
|
creators["call pet"] = &HunterAiObjectContextInternal::call_pet;
|
||||||
creators["black arrow"] = &HunterAiObjectContextInternal::black_arrow;
|
creators["black arrow"] = &HunterAiObjectContextInternal::black_arrow;
|
||||||
@ -171,6 +172,7 @@ public:
|
|||||||
creators["steady shot"] = &HunterAiObjectContextInternal::steady_shot;
|
creators["steady shot"] = &HunterAiObjectContextInternal::steady_shot;
|
||||||
creators["kill shot"] = &HunterAiObjectContextInternal::kill_shot;
|
creators["kill shot"] = &HunterAiObjectContextInternal::kill_shot;
|
||||||
creators["misdirection on main tank"] = &HunterAiObjectContextInternal::misdirection_on_main_tank;
|
creators["misdirection on main tank"] = &HunterAiObjectContextInternal::misdirection_on_main_tank;
|
||||||
|
creators["silencing shot"] = &HunterAiObjectContextInternal::silencing_shot;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -196,6 +198,7 @@ private:
|
|||||||
static Action* scorpid_sting(PlayerbotAI* botAI) { return new CastScorpidStingAction(botAI); }
|
static Action* scorpid_sting(PlayerbotAI* botAI) { return new CastScorpidStingAction(botAI); }
|
||||||
static Action* hunters_mark(PlayerbotAI* botAI) { return new CastHuntersMarkAction(botAI); }
|
static Action* hunters_mark(PlayerbotAI* botAI) { return new CastHuntersMarkAction(botAI); }
|
||||||
static Action* mend_pet(PlayerbotAI* botAI) { return new CastMendPetAction(botAI); }
|
static Action* mend_pet(PlayerbotAI* botAI) { return new CastMendPetAction(botAI); }
|
||||||
|
static Action* kill_command(PlayerbotAI* botAI) { return new CastKillCommandAction(botAI); }
|
||||||
static Action* revive_pet(PlayerbotAI* botAI) { return new CastRevivePetAction(botAI); }
|
static Action* revive_pet(PlayerbotAI* botAI) { return new CastRevivePetAction(botAI); }
|
||||||
static Action* call_pet(PlayerbotAI* botAI) { return new CastCallPetAction(botAI); }
|
static Action* call_pet(PlayerbotAI* botAI) { return new CastCallPetAction(botAI); }
|
||||||
static Action* black_arrow(PlayerbotAI* botAI) { return new CastBlackArrow(botAI); }
|
static Action* black_arrow(PlayerbotAI* botAI) { return new CastBlackArrow(botAI); }
|
||||||
@ -217,6 +220,8 @@ private:
|
|||||||
static Action* steady_shot(PlayerbotAI* ai) { return new CastSteadyShotAction(ai); }
|
static Action* steady_shot(PlayerbotAI* ai) { return new CastSteadyShotAction(ai); }
|
||||||
static Action* kill_shot(PlayerbotAI* ai) { return new CastKillShotAction(ai); }
|
static Action* kill_shot(PlayerbotAI* ai) { return new CastKillShotAction(ai); }
|
||||||
static Action* misdirection_on_main_tank(PlayerbotAI* ai) { return new CastMisdirectionOnMainTankAction(ai); }
|
static Action* misdirection_on_main_tank(PlayerbotAI* ai) { return new CastMisdirectionOnMainTankAction(ai); }
|
||||||
|
static Action* silencing_shot(PlayerbotAI* ai) { return new CastSilencingShotAction(ai); }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
HunterAiObjectContext::HunterAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)
|
HunterAiObjectContext::HunterAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user