fix(CI): linux-build: add -Werror parameter (#19240)

* fix(CI): linux-build: add -Werror parameter

* add KI

tzunu

* Revert "feat(CI): enable fail-fast for pch/nopch (#19058)"

This reverts commit 564cbca7d3.

* Update midsummer.cpp - drop unused variable

* initialize variable

* Update core-build-nopch.yml - drop gcc12

* fix(Core/CalendarMgr): do not use element after delete, but before

* attempt to fix Socket.h error

* Revert "attempt to fix Socket.h error"

This reverts commit c1a59145ed3c49d0f76be2f81925434ea969db97.

* fix Socket.h error - attempt 2

* Update Socket.h

* Update Socket.h

* npc_shattrath_daily_quest: init variable templateID

* fix(Scripts/Karazhan): use size_t within loop in boss_shade_of_aran:Reset()

* boss_archimonde: drop unused variable

* Revert "fix(Scripts/Karazhan): use size_t within loop in boss_shade_of_aran:Reset()"

This reverts commit 1f71aaef256990c5cdc16561676be302c954ea9d.

* SmartScripts: SMART_TARGET_RANDOM_POINT: fix unintended fallthrough

* Revert "Revert "feat(CI): enable fail-fast for pch/nopch (#19058)""

This reverts commit d13df293624e0f50d9374272bfd05ab56242511d.

---------

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
sudlud
2024-07-07 22:00:24 +02:00
committed by GitHub
parent f41b80ddf1
commit 37e3d89f91
8 changed files with 23 additions and 22 deletions

View File

@@ -1810,20 +1810,23 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
break;
}
case SMART_TARGET_RANDOM_POINT:
if (me)
{
float range = (float)e.target.randomPoint.range;
Position srcPos = { e.target.x, e.target.y, e.target.z, e.target.o };
Position randomPoint = me->GetRandomPoint(srcPos, range);
me->GetMotionMaster()->MovePoint(
e.action.moveToPos.pointId,
randomPoint.m_positionX,
randomPoint.m_positionY,
randomPoint.m_positionZ,
true,
true,
isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE
);
if (me)
{
float range = (float)e.target.randomPoint.range;
Position srcPos = { e.target.x, e.target.y, e.target.z, e.target.o };
Position randomPoint = me->GetRandomPoint(srcPos, range);
me->GetMotionMaster()->MovePoint(
e.action.moveToPos.pointId,
randomPoint.m_positionX,
randomPoint.m_positionY,
randomPoint.m_positionZ,
true,
true,
isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE
);
}
break;
}