Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Commit

Permalink
Progress #1373 -- Map12 Targetability flag fix (#1416)
Browse files Browse the repository at this point in the history
Added `isTargetable: false` argument to `CreateJungleMonster` call and eliminated duplicate code
  • Loading branch information
Killfrra authored Apr 21, 2022
1 parent ba89bc4 commit 455482d
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions Content/LeagueSandbox-Scripts/Maps/Map12/NeutralMinionSpawn.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using GameServerCore.Domain;
using GameServerCore.Domain;
using GameServerCore.Domain.GameObjects;
using GameServerCore.Enums;
using System.Collections.Generic;
Expand All @@ -12,20 +12,26 @@ public class NeutralMinionSpawn
private static bool forceSpawn;

public static Dictionary<IMonsterCamp, IMonster> HealthPacks = new Dictionary<IMonsterCamp, IMonster>();
private static Vector3[] _champPositions = {
new Vector3(7582.1f, 60.0f, 6785.5f),
new Vector3(5929.7f, 60.0f, 5190.9f),
new Vector3(8893.9f, 60.0f, 7889.0f),
new Vector3(4790.2f, 60.0f, 3934.3f),
};

public static void InitializeJungle()
{
var purple_healthPacket1 = CreateJungleCamp(new Vector3(7582.1f, 60.0f, 6785.5f), 1, TeamId.TEAM_NEUTRAL, "HealthPack", 190.0f * 1000f);
HealthPacks.Add(purple_healthPacket1, CreateJungleMonster("HA_AP_HealthRelic1.1.1", "HA_AP_HealthRelic", new Vector2(7582.1f, 6785.5f), new Vector3(7582.1f, -193.8f, 6785.5f), purple_healthPacket1));

var blue_healthPacket1 = CreateJungleCamp(new Vector3(5929.7f, 60.0f, 5190.9f), 2, TeamId.TEAM_NEUTRAL, "HealthPack", 190.0f * 1000f);
HealthPacks.Add(blue_healthPacket1, CreateJungleMonster("HA_AP_HealthRelic2.1.1", "HA_AP_HealthRelic", new Vector2(5929.7f, 5190.9f), new Vector3(5929.7f, -194.0f, 5190.9f), blue_healthPacket1));

var purple_healthPacket2 = CreateJungleCamp(new Vector3(8893.9f, 60.0f, 7889.0f), 3, TeamId.TEAM_NEUTRAL, "HealthPack", 190.0f * 1000f);
HealthPacks.Add(purple_healthPacket2, CreateJungleMonster("HA_AP_HealthRelic3.1.1", "HA_AP_HealthRelic", new Vector2(8893.9f, 7889.0f), new Vector3(8893.9f, -187.7f, 7889.0f), purple_healthPacket2));

var blue_healthPacket2 = CreateJungleCamp(new Vector3(4790.2f, 60.0f, 3934.3f), 4, TeamId.TEAM_NEUTRAL, "HealthPack", 190.0f * 1000f);
HealthPacks.Add(blue_healthPacket2, CreateJungleMonster("HA_AP_HealthRelic4.1.1", "HA_AP_HealthRelic", new Vector2(4790.2f, 3934.3f), new Vector3(4790.2f, -188.5f, 3934.3f), blue_healthPacket2));
for(byte i = 1; i <= _champPositions.Length; i++)
{
Vector3 pos = _champPositions[i - 1];
var camp = CreateJungleCamp(pos, i, TeamId.TEAM_NEUTRAL, "HealthPack", 190.0f * 1000f);
var monster = CreateJungleMonster(
$"HA_AP_HealthRelic{i}.1.1", "HA_AP_HealthRelic",
new Vector2(pos.X, pos.Z), Vector3.Zero,
camp, isTargetable: false
);
HealthPacks.Add(camp, monster);
}
}

public static void OnUpdate(float diff)
Expand Down

0 comments on commit 455482d

Please sign in to comment.