- Added Biting Cold cheat (#1131)

This commit is contained in:
kadeshar
2025-03-31 16:47:30 +02:00
committed by GitHub
parent a50dc87dbc
commit dccbccc090
3 changed files with 34 additions and 30 deletions

View File

@@ -1255,32 +1255,36 @@ bool HodirMoveSnowpackedIcicleAction::Execute(Event event)
bool HodirBitingColdJumpAction::Execute(Event event)
{
// This needs improving but maybe it should be done in the playerbot core.
int mapId = bot->GetMap()->GetId();
int x = bot->GetPositionX();
int y = bot->GetPositionY();
int z = bot->GetPositionZ() + 3.98f;
float speed = 7.96f;
UpdateMovementState();
if (!IsMovingAllowed(mapId, x, y, z))
{
return false;
}
MovementPriority priority;
if (IsWaitingForLastMove(priority))
{
return false;
}
MotionMaster& mm = *bot->GetMotionMaster();
mm.Clear();
mm.MoveJump(x, y, z, speed, speed, 1, AI_VALUE(Unit*, "current target"));
mm.MoveFall(0, true);
AI_VALUE(LastMovement&, "last movement").Set(mapId, x, y, z, bot->GetOrientation(), 1000, priority);
bot->RemoveAurasDueToSpell(SPELL_BITING_COLD_PLAYER_AURA);
return true;
// Backup when the overall strategy without cheat will be more vialable
// int mapId = bot->GetMap()->GetId();
// int x = bot->GetPositionX();
// int y = bot->GetPositionY();
// int z = bot->GetPositionZ() + 3.98f;
// float speed = 7.96f;
// UpdateMovementState();
// if (!IsMovingAllowed(mapId, x, y, z))
//{
// return false;
// }
// MovementPriority priority;
// if (IsWaitingForLastMove(priority))
//{
// return false;
// }
// MotionMaster& mm = *bot->GetMotionMaster();
// mm.Clear();
// mm.MoveJump(x, y, z, speed, speed, 1, AI_VALUE(Unit*, "current target"));
// mm.MoveFall(0, true);
// AI_VALUE(LastMovement&, "last movement").Set(mapId, x, y, z, bot->GetOrientation(), 1000, priority);
// return true;
}
bool FreyaMoveAwayNatureBombAction::isUseful()

View File

@@ -287,13 +287,12 @@ bool HodirBitingColdTrigger::IsActive()
return false;
}
// Override if boss is casting Flash Freeze
if (!boss->HasUnitState(UNIT_STATE_CASTING) || !boss->FindCurrentSpellBySpellId(SPELL_FLASH_FREEZE))
{
return true;
}
Player* master = botAI->GetMaster();
if (!master || !master->IsAlive())
return false;
return boss && botAI->GetAura("biting cold", bot, false, false, 2);
return botAI->GetAura("biting cold", bot, false, false, 2) &&
!botAI->GetAura("biting cold", master, false, false, 2);
}
//Snowpacked Icicle Target

View File

@@ -21,6 +21,7 @@ enum UlduarIDs
NPC_SNOWPACKED_ICICLE = 33174,
NPC_TOASTY_FIRE = 33342,
SPELL_FLASH_FREEZE = 61968,
SPELL_BITING_COLD_PLAYER_AURA = 62039,
// Freya
NPC_EONARS_GIFT = 33228,