mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-25 22:46:25 +00:00
Compare commits
3 Commits
hermensbas
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5711dc6f7 | ||
|
|
43e8e31980 | ||
|
|
c59a02ed89 |
@@ -1,8 +1,7 @@
|
|||||||
# Pull Request
|
# Pull Request
|
||||||
|
|
||||||
## Summary
|
Describe what this change does and why it is needed...
|
||||||
|
|
||||||
Describe what this change does and why it is needed.
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Design Philosophy
|
## Design Philosophy
|
||||||
@@ -110,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.
|
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
|
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.
|
about what they do and do not understand.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Final Checklist
|
## Final Checklist
|
||||||
|
|||||||
@@ -45,8 +45,19 @@ bool RaidOnyxiaSpreadOutAction::Execute(Event event)
|
|||||||
if (!boss)
|
if (!boss)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Player* target = boss->GetCurrentSpell(CURRENT_GENERIC_SPELL)->m_targets.GetUnitTarget()->ToPlayer();
|
// Trigger may fire on one tick, but the action can execute on a later tick.
|
||||||
if (target != bot)
|
// 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;
|
return false;
|
||||||
|
|
||||||
// bot->Yell("Spreading out — I'm the Fireball target!", LANG_UNIVERSAL);
|
// bot->Yell("Spreading out — I'm the Fireball target!", LANG_UNIVERSAL);
|
||||||
@@ -60,7 +71,7 @@ bool RaidOnyxiaMoveToSafeZoneAction::Execute(Event event)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
Spell* currentSpell = boss->GetCurrentSpell(CURRENT_GENERIC_SPELL);
|
Spell* currentSpell = boss->GetCurrentSpell(CURRENT_GENERIC_SPELL);
|
||||||
if (!currentSpell)
|
if (!currentSpell || !currentSpell->m_spellInfo)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
uint32 spellId = currentSpell->m_spellInfo->Id;
|
uint32 spellId = currentSpell->m_spellInfo->Id;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ bool OnyxiaDeepBreathTrigger::IsActive()
|
|||||||
// Check if Onyxia is casting
|
// Check if Onyxia is casting
|
||||||
Spell* currentSpell = boss->GetCurrentSpell(CURRENT_GENERIC_SPELL);
|
Spell* currentSpell = boss->GetCurrentSpell(CURRENT_GENERIC_SPELL);
|
||||||
|
|
||||||
if (!currentSpell)
|
if (!currentSpell || !currentSpell->m_spellInfo)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
uint32 spellId = currentSpell->m_spellInfo->Id;
|
uint32 spellId = currentSpell->m_spellInfo->Id;
|
||||||
@@ -65,7 +65,7 @@ bool RaidOnyxiaFireballSplashTrigger::IsActive()
|
|||||||
|
|
||||||
// Check if Onyxia is casting Fireball
|
// Check if Onyxia is casting Fireball
|
||||||
Spell* currentSpell = boss->GetCurrentSpell(CURRENT_GENERIC_SPELL);
|
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;
|
return false;
|
||||||
|
|
||||||
GuidVector nearbyUnits = AI_VALUE(GuidVector, "nearest friendly players");
|
GuidVector nearbyUnits = AI_VALUE(GuidVector, "nearest friendly players");
|
||||||
|
|||||||
Reference in New Issue
Block a user