fix(Core/GridNotifiers): fix tempsummons not finding nearby creatures (#9749)

* fix(Core/GridNotifiers): fix tempsummons not finding nearby creatures

* fix lord valathak being summoned along mor
This commit is contained in:
Skjalf
2021-12-19 07:53:53 -03:00
committed by GitHub
parent 643944d9d9
commit 9265d346be
2 changed files with 12 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1639776045356880700');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=181045 AND `SourceGroup` IN (1, 5);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(22, 1, 181045, 1, 0, 29, 1, 16044, 30, 0, 0, 0, 0, '', 'Brazier of Beckoning only run SAI if Mor Grayhoof Trigger is near'),
(22, 5, 181045, 1, 0, 29, 1, 16048, 30, 0, 0, 0, 0, '', 'Brazier of Beckoning only run SAI if Lord Vathalak Trigger is near');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=181051 AND `SourceGroup` IN (1, 5);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(22, 1, 181051, 1, 0, 29, 1, 16044, 30, 0, 0, 0, 0, '', 'Brazier of Invocation only run SAI if Mor Grayhoof Trigger is near'),
(22, 5, 181051, 1, 0, 29, 1, 16048, 30, 0, 0, 0, 0, '', 'Brazier of Invocation only run SAI if Lord Vathalak Trigger is near');

View File

@@ -1213,7 +1213,7 @@ namespace Acore
bool operator()(Creature* u)
{
if (u->GetEntry() == i_entry && u->IsAlive() == i_alive && i_obj.IsWithinDistInMap(u, i_range))
if (u->GetEntry() == i_entry && u->IsAlive() == i_alive && i_obj.IsWithinDist(u, i_range) && i_obj.InSamePhase(u))
{
i_range = i_obj.GetDistance(u); // use found unit range as new range limit for next check
return true;