mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-15 01:49:09 +00:00
Improve class spell and use trinket
This commit is contained in:
@@ -66,8 +66,13 @@ uint8 BalancePercentValue::Calculate()
|
||||
|
||||
playerLevel += player->GetLevel();
|
||||
}
|
||||
uint32 memberCount = group->GetMembersCount();
|
||||
playerLevel /= memberCount;
|
||||
if (memberCount <= 10)
|
||||
playerLevel *= memberCount;
|
||||
else
|
||||
playerLevel *= 10;
|
||||
}
|
||||
|
||||
GuidVector v = context->GetValue<GuidVector>("attackers")->Get();
|
||||
for (ObjectGuid const guid : v)
|
||||
{
|
||||
@@ -89,7 +94,7 @@ uint8 BalancePercentValue::Calculate()
|
||||
level *= 3;
|
||||
break;
|
||||
case CREATURE_ELITE_WORLDBOSS:
|
||||
level *= 50;
|
||||
level *= 30;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Unit* AttackerWithoutAuraTargetValue::Calculate()
|
||||
if (!unit || !unit->IsAlive())
|
||||
continue;
|
||||
|
||||
if (bot->GetDistance(unit) > botAI->GetRange(range))
|
||||
if (!bot->IsWithinCombatRange(unit, botAI->GetRange(range)))
|
||||
continue;
|
||||
|
||||
if (unit->GetHealth() < max_health)
|
||||
|
||||
@@ -41,6 +41,8 @@ Unit* PartyMemberToHeal::Calculate()
|
||||
for (GroupReference* gref = group->GetFirstMember(); gref; gref = gref->next())
|
||||
{
|
||||
Player* player = gref->GetSource();
|
||||
if (player->IsGameMaster())
|
||||
continue;
|
||||
if (player && player->IsAlive())
|
||||
{
|
||||
uint8 health = player->GetHealthPct();
|
||||
|
||||
@@ -103,7 +103,8 @@ bool PartyMemberValue::Check(Unit* player)
|
||||
{
|
||||
// return player && player != bot && player->GetMapId() == bot->GetMapId() && bot->IsWithinDistInMap(player,
|
||||
// sPlayerbotAIConfig->sightDistance, false);
|
||||
return player && player->GetMapId() == bot->GetMapId() &&
|
||||
bool isGM = player->ToPlayer() && player->ToPlayer()->IsGameMaster();
|
||||
return player && player->GetMapId() == bot->GetMapId() && !isGM &&
|
||||
bot->GetDistance(player) < sPlayerbotAIConfig->spellDistance * 2 &&
|
||||
bot->IsWithinLOS(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user