Compare commits

...

3 Commits

Author SHA1 Message Date
dillyns
a92886032c Summon Logic Tweaks (#2049)
Issues:
- When you have selfbot enabled and use summon command, you will summon
yourself. This causes odd movement if you summon while moving, and can
sometimes lead to falling through the floor.
- When using the summon command on bots with pets/guardians from a
medium distance (like jumping down a ledge then commanding summon), the
pets will pathfind run to catch up. This causes them to aggro everything
on the way.

Solution: 
Fix summon logic to prevent selfbot summon and ensure pets are
teleported with bots.

---------

Co-authored-by: bashermens <31279994+hermensbas@users.noreply.github.com>
2026-01-29 12:25:50 -08:00
gtkk
f5711dc6f7 FIX Onyxia Crash (#2062)
Solve these two problems #2043 #1981
@Regrad is the main contributor of the code, while I was just helping to
submit the pull request. Express my gratitude to him.
After testing, the code is proven to be effective.
2026-01-25 14:03:53 +01:00
bashermens
43e8e31980 Update PULL_REQUEST_TEMPLATE.md (#2066) 2026-01-25 13:46:23 +01:00
4 changed files with 22 additions and 8 deletions

View File

@@ -109,6 +109,7 @@ If yes, please specify:
AI assistance is allowed, but all submitted code must be fully understood, reviewed, and owned by the contributor.
Any AI-influenced changes must be verified against existing CORE and PB logic. We expect contributors to be honest
about what they do and do not understand.
---
## Final Checklist

View File

@@ -150,7 +150,7 @@ bool SummonAction::SummonUsingNpcs(Player* summoner, Player* player, bool preser
bool SummonAction::Teleport(Player* summoner, Player* player, bool preserveAuras)
{
// Player* master = GetMaster();
if (!summoner)
if (!summoner || summoner == player)
return false;
if (player->GetVehicle())
@@ -212,9 +212,11 @@ bool SummonAction::Teleport(Player* summoner, Player* player, bool preserveAuras
if (!preserveAuras)
player->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TELEPORTED |
AURA_INTERRUPT_FLAG_CHANGE_MAP);
player->TeleportTo(mapId, x, y, z, 0);
if (player->GetPet())
player->GetPet()->NearTeleportTo(x, y, z, player->GetOrientation());
if (player->GetGuardianPet())
player->GetGuardianPet()->NearTeleportTo(x, y, z, player->GetOrientation());
if (botAI->HasStrategy("stay", botAI->GetState()))
{
PositionMap& posMap = AI_VALUE(PositionMap&, "position");

View File

@@ -45,8 +45,19 @@ bool RaidOnyxiaSpreadOutAction::Execute(Event event)
if (!boss)
return false;
Player* target = boss->GetCurrentSpell(CURRENT_GENERIC_SPELL)->m_targets.GetUnitTarget()->ToPlayer();
if (target != bot)
// Trigger may fire on one tick, but the action can execute on a later tick.
// By that time the cast may have finished, so current spell can be null.
Spell* currentSpell = boss->GetCurrentSpell(CURRENT_GENERIC_SPELL);
if (!currentSpell || !currentSpell->m_spellInfo)
return false;
// Fireball
if (currentSpell->m_spellInfo->Id != 18392)
return false;
Unit* unitTarget = currentSpell->m_targets.GetUnitTarget();
Player* target = unitTarget ? unitTarget->ToPlayer() : nullptr;
if (!target || target != bot)
return false;
// bot->Yell("Spreading out — I'm the Fireball target!", LANG_UNIVERSAL);
@@ -60,7 +71,7 @@ bool RaidOnyxiaMoveToSafeZoneAction::Execute(Event event)
return false;
Spell* currentSpell = boss->GetCurrentSpell(CURRENT_GENERIC_SPELL);
if (!currentSpell)
if (!currentSpell || !currentSpell->m_spellInfo)
return false;
uint32 spellId = currentSpell->m_spellInfo->Id;

View File

@@ -17,7 +17,7 @@ bool OnyxiaDeepBreathTrigger::IsActive()
// Check if Onyxia is casting
Spell* currentSpell = boss->GetCurrentSpell(CURRENT_GENERIC_SPELL);
if (!currentSpell)
if (!currentSpell || !currentSpell->m_spellInfo)
return false;
uint32 spellId = currentSpell->m_spellInfo->Id;
@@ -65,7 +65,7 @@ bool RaidOnyxiaFireballSplashTrigger::IsActive()
// Check if Onyxia is casting Fireball
Spell* currentSpell = boss->GetCurrentSpell(CURRENT_GENERIC_SPELL);
if (!currentSpell || currentSpell->m_spellInfo->Id != 18392) // 18392 is the classic Fireball ID
if (!currentSpell || !currentSpell->m_spellInfo || currentSpell->m_spellInfo->Id != 18392) // 18392 is the classic Fireball ID // 18392 is the classic Fireball ID
return false;
GuidVector nearbyUnits = AI_VALUE(GuidVector, "nearest friendly players");