mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 08:33:47 +00:00
fix(Scripts/SSC): Fix being able to damage Leo's minions if you are n… (#17786)
* fix(Scripts/SSC): Fix being able to damage Leo's minions if you are not the target player * implement helper * Update Creature.cpp * Update Creature.h
This commit is contained in:
@@ -3736,6 +3736,15 @@ bool Creature::CanCastSpell(uint32 spellID) const
|
||||
return true;
|
||||
}
|
||||
|
||||
ObjectGuid Creature::GetSummonerGUID() const
|
||||
{
|
||||
if (TempSummon const* temp = ToTempSummon())
|
||||
return temp->GetSummonerGUID();
|
||||
|
||||
LOG_DEBUG("entities.unit", "Creature::GetSummonerGUID() called by creature that is not a summon. Creature: {} ({})", GetEntry(), GetName());
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
std::string Creature::GetDebugInfo() const
|
||||
{
|
||||
std::stringstream sstr;
|
||||
|
||||
@@ -407,6 +407,12 @@ public:
|
||||
* */
|
||||
bool CanCastSpell(uint32 spellID) const;
|
||||
|
||||
/**
|
||||
* @brief Helper to get the creature's summoner GUID, if it is a summon
|
||||
*
|
||||
* */
|
||||
[[nodiscard]] ObjectGuid GetSummonerGUID() const;
|
||||
|
||||
std::string GetDebugInfo() const override;
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user