mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Compare commits
9 Commits
playerbots
...
data-folde
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
adaf1e6b91 | ||
|
|
733c64343e | ||
|
|
e3bcadb19e | ||
|
|
27d1bda34d | ||
|
|
e6feccb5aa | ||
|
|
d9dc25a15f | ||
|
|
f925db1ca4 | ||
|
|
eb583de6aa | ||
|
|
6b415cb80f |
@@ -424,7 +424,7 @@ AiPlayerbot.AutoGearCommand = 1
|
|||||||
# default: 3 (rare)
|
# default: 3 (rare)
|
||||||
AiPlayerbot.AutoGearQualityLimit = 3
|
AiPlayerbot.AutoGearQualityLimit = 3
|
||||||
|
|
||||||
# Equips gear score limitation for auto gear command (0 = no limit)
|
# Equips item level (not gearScore) limitation for auto gear command (0 = no limit)
|
||||||
# default: 0 (no limit)
|
# default: 0 (no limit)
|
||||||
AiPlayerbot.AutoGearScoreLimit = 0
|
AiPlayerbot.AutoGearScoreLimit = 0
|
||||||
|
|
||||||
|
|||||||
11
data/sql/playerbots/updates/db_playerbots/2024_11_25_00.sql
Normal file
11
data/sql/playerbots/updates/db_playerbots/2024_11_25_00.sql
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
UPDATE `updates_include`
|
||||||
|
SET `path` = '$/data/sql/playerbots/updates'
|
||||||
|
WHERE `state` = 'RELEASED';
|
||||||
|
|
||||||
|
UPDATE `updates_include`
|
||||||
|
SET `path` = '$/data/sql/playerbots/custom'
|
||||||
|
WHERE `state` = 'CUSTOM';
|
||||||
|
|
||||||
|
UPDATE `updates_include`
|
||||||
|
SET `path` = '$/data/sql/playerbots/archive'
|
||||||
|
WHERE `state` = 'ARCHIVED';
|
||||||
@@ -323,7 +323,7 @@ void RandomPlayerbotMgr::UpdateAIInternal(uint32 elapsed, bool /*minimal*/)
|
|||||||
// which prevents unneeded expensive GameTime calls.
|
// which prevents unneeded expensive GameTime calls.
|
||||||
if (_isBotInitializing)
|
if (_isBotInitializing)
|
||||||
{
|
{
|
||||||
_isBotInitializing = GameTime::GetUptime().count() < sPlayerbotAIConfig->maxRandomBots * 0.13;
|
_isBotInitializing = GameTime::GetUptime().count() < sPlayerbotAIConfig->maxRandomBots * 0.15;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 updateIntervalTurboBoost = _isBotInitializing ? 1 : sPlayerbotAIConfig->randomBotUpdateInterval;
|
uint32 updateIntervalTurboBoost = _isBotInitializing ? 1 : sPlayerbotAIConfig->randomBotUpdateInterval;
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ bool AcceptAllQuestsAction::ProcessQuest(Quest const* quest, Object* questGiver)
|
|||||||
|
|
||||||
if (botAI->HasStrategy("debug quest", BotState::BOT_STATE_NON_COMBAT) || botAI->HasStrategy("debug rpg", BotState::BOT_STATE_COMBAT))
|
if (botAI->HasStrategy("debug quest", BotState::BOT_STATE_NON_COMBAT) || botAI->HasStrategy("debug rpg", BotState::BOT_STATE_COMBAT))
|
||||||
{
|
{
|
||||||
LOG_INFO("playerbots", "{} => Quest [ {} ] accepted", bot->GetName(), quest->GetTitle());
|
LOG_INFO("playerbots", "{} => Quest [{}] accepted", bot->GetName(), quest->GetTitle());
|
||||||
bot->Say("Quest [ " + text_quest + " ] accepted", LANG_UNIVERSAL);
|
bot->Say("Quest [" + text_quest + "] accepted", LANG_UNIVERSAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -86,7 +86,7 @@ bool AcceptQuestAction::Execute(Event event)
|
|||||||
if (hasAccept)
|
if (hasAccept)
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "AcceptQuestAction {" << qInfo->GetTitle() << "} - {" << std::to_string(qInfo->GetQuestId()) << "}";
|
ss << "AcceptQuestAction [" << qInfo->GetTitle() << "] - [" << std::to_string(qInfo->GetQuestId()) << "]";
|
||||||
LOG_INFO("playerbots", "{}", ss.str().c_str());
|
LOG_INFO("playerbots", "{}", ss.str().c_str());
|
||||||
// botAI->TellMaster(ss.str());
|
// botAI->TellMaster(ss.str());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -834,17 +834,14 @@ bool AnubrekhanPositionAction::Execute(Event event)
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
EventMap* eventMap = &boss_ai->events;
|
|
||||||
uint32 locust = eventMap->GetNextEventTime(2);
|
|
||||||
uint32 timer = eventMap->GetTimer();
|
|
||||||
bool inPhase = botAI->HasAura("locust swarm", boss) || boss->GetCurrentSpell(CURRENT_GENERIC_SPELL);
|
bool inPhase = botAI->HasAura("locust swarm", boss) || boss->GetCurrentSpell(CURRENT_GENERIC_SPELL);
|
||||||
if (inPhase || (locust && locust - timer <= 8000))
|
if (inPhase)
|
||||||
{
|
{
|
||||||
if (botAI->IsMainTank(bot))
|
if (botAI->IsMainTank(bot))
|
||||||
{
|
{
|
||||||
uint32 nearest = FindNearestWaypoint();
|
uint32 nearest = FindNearestWaypoint();
|
||||||
uint32 next_point;
|
uint32 next_point;
|
||||||
if (inPhase || (locust && locust - timer <= 3000))
|
if (inPhase)
|
||||||
{
|
{
|
||||||
next_point = (nearest + 1) % intervals;
|
next_point = (nearest + 1) % intervals;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,26 +50,6 @@ bool BossEventTrigger<T>::IsActive()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
|
||||||
bool BossPhaseTrigger<T>::IsActive()
|
|
||||||
{
|
|
||||||
Unit* boss = AI_VALUE2(Unit*, "find target", boss_name);
|
|
||||||
if (!boss)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this->phase_mask == 0)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
T* boss_ai = dynamic_cast<T*>(boss->GetAI());
|
|
||||||
EventMap* eventMap = &boss_ai->events;
|
|
||||||
uint8 phase_mask = eventMap->GetPhaseMask();
|
|
||||||
// bot->Yell("phase mask detected: " + to_string(phase_mask) + " compare with " + to_string(this->phase_mask),
|
|
||||||
// LANG_UNIVERSAL);
|
|
||||||
return phase_mask == this->phase_mask;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GrobbulusCloudTrigger::IsActive()
|
bool GrobbulusCloudTrigger::IsActive()
|
||||||
{
|
{
|
||||||
Unit* boss = AI_VALUE(Unit*, "boss target");
|
Unit* boss = AI_VALUE(Unit*, "boss target");
|
||||||
@@ -162,21 +142,6 @@ bool SapphironFlightTrigger::IsActive()
|
|||||||
return helper.IsPhaseFlight();
|
return helper.IsPhaseFlight();
|
||||||
}
|
}
|
||||||
|
|
||||||
// bool SapphironGroundExceptMainTankTrigger::IsActive()
|
|
||||||
// {
|
|
||||||
// return BossPhaseTrigger::IsActive() && !botAI->IsMainTank(bot);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// bool SapphironFlightTrigger::IsActive()
|
|
||||||
// {
|
|
||||||
// return BossPhaseTrigger::IsActive();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// bool SapphironGroundChillTrigger::IsActive()
|
|
||||||
// {
|
|
||||||
// return BossPhaseTrigger::IsActive() && !botAI->IsMainTank(bot) && botAI->HasAura("chill", bot);
|
|
||||||
// }
|
|
||||||
|
|
||||||
bool GluthTrigger::IsActive() { return helper.UpdateBossAI(); }
|
bool GluthTrigger::IsActive() { return helper.UpdateBossAI(); }
|
||||||
|
|
||||||
bool GluthMainTankMortalWoundTrigger::IsActive()
|
bool GluthMainTankMortalWoundTrigger::IsActive()
|
||||||
@@ -204,6 +169,15 @@ bool GluthMainTankMortalWoundTrigger::IsActive()
|
|||||||
|
|
||||||
bool KelthuzadTrigger::IsActive() { return helper.UpdateBossAI(); }
|
bool KelthuzadTrigger::IsActive() { return helper.UpdateBossAI(); }
|
||||||
|
|
||||||
|
bool AnubrekhanTrigger::IsActive() {
|
||||||
|
Unit* boss = AI_VALUE2(Unit*, "find target", "anub'rekhan");
|
||||||
|
if (!boss)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool LoathebTrigger::IsActive() { return helper.UpdateBossAI(); }
|
bool LoathebTrigger::IsActive() { return helper.UpdateBossAI(); }
|
||||||
|
|
||||||
bool ThaddiusPhasePetTrigger::IsActive()
|
bool ThaddiusPhasePetTrigger::IsActive()
|
||||||
@@ -234,4 +208,3 @@ bool ThaddiusPhaseThaddiusTrigger::IsActive()
|
|||||||
}
|
}
|
||||||
|
|
||||||
template bool BossEventTrigger<Grobbulus::boss_grobbulus::boss_grobbulusAI>::IsActive();
|
template bool BossEventTrigger<Grobbulus::boss_grobbulus::boss_grobbulusAI>::IsActive();
|
||||||
template bool BossPhaseTrigger<Anubrekhan::boss_anubrekhan::boss_anubrekhanAI>::IsActive();
|
|
||||||
@@ -49,23 +49,6 @@ protected:
|
|||||||
uint32 boss_entry, event_id, last_event_time;
|
uint32 boss_entry, event_id, last_event_time;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
|
||||||
class BossPhaseTrigger : public Trigger
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
BossPhaseTrigger(PlayerbotAI* ai, std::string boss_name, uint32 phase_mask, std::string name = "boss event")
|
|
||||||
: Trigger(ai, name, 1)
|
|
||||||
{
|
|
||||||
this->boss_name = boss_name;
|
|
||||||
this->phase_mask = phase_mask;
|
|
||||||
}
|
|
||||||
virtual bool IsActive();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
std::string boss_name;
|
|
||||||
uint32 phase_mask;
|
|
||||||
};
|
|
||||||
|
|
||||||
class GrobbulusCloudTrigger : public BossEventTrigger<Grobbulus::boss_grobbulus::boss_grobbulusAI>
|
class GrobbulusCloudTrigger : public BossEventTrigger<Grobbulus::boss_grobbulus::boss_grobbulusAI>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -117,10 +100,11 @@ private:
|
|||||||
KelthuzadBossHelper helper;
|
KelthuzadBossHelper helper;
|
||||||
};
|
};
|
||||||
|
|
||||||
class AnubrekhanTrigger : public BossPhaseTrigger<Anubrekhan::boss_anubrekhan::boss_anubrekhanAI>
|
class AnubrekhanTrigger : public Trigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AnubrekhanTrigger(PlayerbotAI* ai) : BossPhaseTrigger(ai, "anub'rekhan", 0, "anub'rekhan trigger") {}
|
AnubrekhanTrigger(PlayerbotAI* ai) : Trigger(ai, "anub'rekhan") {}
|
||||||
|
bool IsActive() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ThaddiusPhasePetTrigger : public Trigger
|
class ThaddiusPhasePetTrigger : public Trigger
|
||||||
@@ -194,12 +178,6 @@ private:
|
|||||||
SapphironBossHelper helper;
|
SapphironBossHelper helper;
|
||||||
};
|
};
|
||||||
|
|
||||||
// class SapphironGroundExceptMainTankTrigger : public BossPhaseTrigger
|
|
||||||
// {
|
|
||||||
// public:
|
|
||||||
// SapphironGroundExceptMainTankTrigger(PlayerbotAI* ai) : BossPhaseTrigger(ai, "sapphiron", (1 << (2 - 1)),
|
|
||||||
// "sapphiron ground except main tank") {} virtual bool IsActive();
|
|
||||||
// };
|
|
||||||
|
|
||||||
class SapphironFlightTrigger : public Trigger
|
class SapphironFlightTrigger : public Trigger
|
||||||
{
|
{
|
||||||
@@ -211,20 +189,6 @@ private:
|
|||||||
SapphironBossHelper helper;
|
SapphironBossHelper helper;
|
||||||
};
|
};
|
||||||
|
|
||||||
// class SapphironGroundChillTrigger : public BossPhaseTrigger
|
|
||||||
// {
|
|
||||||
// public:
|
|
||||||
// SapphironGroundChillTrigger(PlayerbotAI* ai) : BossPhaseTrigger(ai, "sapphiron", 0, "sapphiron chill") {}
|
|
||||||
// virtual bool IsActive();
|
|
||||||
// };
|
|
||||||
|
|
||||||
// class KelthuzadPhaseTwoTrigger : public BossPhaseTrigger
|
|
||||||
// {
|
|
||||||
// public:
|
|
||||||
// KelthuzadPhaseTwoTrigger(PlayerbotAI* ai) : BossPhaseTrigger(ai, "kel'thuzad", 1 << (2 - 1), "kel'thuzad
|
|
||||||
// trigger") {}
|
|
||||||
// };
|
|
||||||
|
|
||||||
class GluthTrigger : public Trigger
|
class GluthTrigger : public Trigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -257,5 +221,4 @@ private:
|
|||||||
LoathebBossHelper helper;
|
LoathebBossHelper helper;
|
||||||
};
|
};
|
||||||
|
|
||||||
// template BossEventTrigger<class boss_grobbulus::boss_grobbulusAI>;
|
|
||||||
#endif
|
#endif
|
||||||
Reference in New Issue
Block a user