mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-17 06:25:11 +00:00
feat(Core/Debug): GetDebugInfo implementation (#12705)
Cherry-pick: 9a924fb9d5
Co-authored-by: jackpoz <giacomopoz@gmail.com>
Co-authored-by: jackpoz <giacomopoz@gmail.com>
This commit is contained in:
@@ -106,6 +106,14 @@ float UnitAI::DoGetSpellMaxRange(uint32 spellId, bool positive)
|
||||
return spellInfo ? spellInfo->GetMaxRange(positive) : 0;
|
||||
}
|
||||
|
||||
std::string UnitAI::GetDebugInfo() const
|
||||
{
|
||||
std::stringstream sstr;
|
||||
sstr << std::boolalpha
|
||||
<< "Me: " << (me ? me->GetDebugInfo() : "NULL");
|
||||
return sstr.str();
|
||||
}
|
||||
|
||||
SpellCastResult UnitAI::DoAddAuraToAllHostilePlayers(uint32 spellid)
|
||||
{
|
||||
if (me->IsInCombat())
|
||||
|
||||
@@ -345,6 +345,8 @@ public:
|
||||
virtual void sQuestComplete(Player* /*player*/, Quest const* /*quest*/) {}
|
||||
virtual void sQuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) {}
|
||||
virtual void sOnGameEvent(bool /*start*/, uint16 /*eventId*/) {}
|
||||
|
||||
virtual std::string GetDebugInfo() const;
|
||||
};
|
||||
|
||||
class PlayerAI : public UnitAI
|
||||
|
||||
Reference in New Issue
Block a user