mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
- Added Biting Cold cheat (#1131)
This commit is contained in:
@@ -1255,32 +1255,36 @@ bool HodirMoveSnowpackedIcicleAction::Execute(Event event)
|
|||||||
|
|
||||||
bool HodirBitingColdJumpAction::Execute(Event event)
|
bool HodirBitingColdJumpAction::Execute(Event event)
|
||||||
{
|
{
|
||||||
// This needs improving but maybe it should be done in the playerbot core.
|
bot->RemoveAurasDueToSpell(SPELL_BITING_COLD_PLAYER_AURA);
|
||||||
|
|
||||||
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;
|
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()
|
bool FreyaMoveAwayNatureBombAction::isUseful()
|
||||||
|
|||||||
@@ -287,13 +287,12 @@ bool HodirBitingColdTrigger::IsActive()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Override if boss is casting Flash Freeze
|
Player* master = botAI->GetMaster();
|
||||||
if (!boss->HasUnitState(UNIT_STATE_CASTING) || !boss->FindCurrentSpellBySpellId(SPELL_FLASH_FREEZE))
|
if (!master || !master->IsAlive())
|
||||||
{
|
return false;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
//Snowpacked Icicle Target
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ enum UlduarIDs
|
|||||||
NPC_SNOWPACKED_ICICLE = 33174,
|
NPC_SNOWPACKED_ICICLE = 33174,
|
||||||
NPC_TOASTY_FIRE = 33342,
|
NPC_TOASTY_FIRE = 33342,
|
||||||
SPELL_FLASH_FREEZE = 61968,
|
SPELL_FLASH_FREEZE = 61968,
|
||||||
|
SPELL_BITING_COLD_PLAYER_AURA = 62039,
|
||||||
|
|
||||||
// Freya
|
// Freya
|
||||||
NPC_EONARS_GIFT = 33228,
|
NPC_EONARS_GIFT = 33228,
|
||||||
|
|||||||
Reference in New Issue
Block a user