Skip to content

Commit

Permalink
1.1.1.0 Patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeong-Min-Cho committed Jan 12, 2015
1 parent 3e9d17a commit a9d1e25
Show file tree
Hide file tree
Showing 9 changed files with 358 additions and 39 deletions.
Binary file modified Mata View/Mata View.v12.suo
Binary file not shown.
112 changes: 103 additions & 9 deletions Mata View/Mata View/DetectObj.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;

using System.Text;
using System.Threading.Tasks;
using System.Xml.Schema;
using LeagueSharp;
using LeagueSharp.Common;
using SharpDX;
using Color = System.Drawing.Color;

#endregion

Expand All @@ -13,17 +19,23 @@ namespace Mata_View
internal class DetectObj
{
public static List<ListedText> AllSkills = new List<ListedText>();


public static bool PanthD;
public static Obj_AI_Hero Heropos = new Obj_AI_Hero();


public static void DetectObjload()
{
Obj_AI_Base.OnProcessSpellCast += OnProcessSpell;

GameObject.OnCreate += OnCreateObject;
GameObject.OnDelete += OnDeleteObject;
}






public static void OnProcessSpell(Obj_AI_Base obj, GameObjectProcessSpellCastEventArgs arg)
Expand All @@ -32,11 +44,68 @@ public static void OnProcessSpell(Obj_AI_Base obj, GameObjectProcessSpellCastEve
return;
if (obj.Name.Contains("Turret") || obj.Name.Contains("Minion"))
return;



if (arg.SData.Name.Contains("ZhonyasHourglass"))
{
if (Menus.Menu.SubMenu("misclist").Item("zhonyas_ring_activate.troy").GetValue<bool>() &&
Menus.Menu.Item("activeMisc").GetValue<bool>())
{
var ho = SkillsList.IsObj("zhonyas_ring_activate.troy");
if (ho == null) return;

var misccheck = SkillsList.IsMisc("zhonyas_ring_activate.troy");
if (misccheck != null) return;

var sender = new GameObject();
foreach (
var hero in
ObjectManager.Get<Obj_AI_Hero>()
.Where(d => obj.BaseSkinName == d.BaseSkinName))
{
AllSkills.Add(new ListedText(999999998, "zhonyas_ring_activate.troy", ho.Duration,
hero.Position, Game.Time, sender, ho.Realtime, hero));
}
}
}

if (arg.SData.Name.Contains("KarthusFallenOne"))
{
if (Menus.Menu.Item("Karthus_Base_R_Cas.troy").GetValue<bool>())
{
var ho = SkillsList.IsObj("Karthus_Base_R_Cas.troy");
if (ho == null) return;

var misccheck = SkillsList.IsMisc("Karthus_Base_R_Cas.troy");
if (misccheck != null) return;

var sender = new GameObject();
foreach (
var hero in
ObjectManager.Get<Obj_AI_Hero>()
.Where(d => obj.BaseSkinName == d.BaseSkinName))
{
AllSkills.Add(new ListedText(999999997, "Karthus_Base_R_Cas.troy", ho.Duration,
hero.Position, Game.Time, sender, ho.Realtime, hero));
}
}
}


/*
if (arg.SData.Name.Contains("TalonShadowAssault"))
{
Talon = true;
var ho = SkillsList.IsObj("talon_ult_sound.troy");
var sender = new GameObject();
var hero = new Obj_AI_Hero();
AllSkills.Add(new ListedText(999999997, "talon_ult_sound.troy", ho.Duration,
obj.Position, Game.Time, sender, ho.Realtime, hero));
}*/ // talon is kind of buggy

if (arg.SData.Name.Contains("PantheonRJump"))
PanthD = true;



}

private static void OnCreateObject(GameObject sender, EventArgs args)
Expand All @@ -45,14 +114,39 @@ private static void OnCreateObject(GameObject sender, EventArgs args)
return;
if (sender.Name.Contains("missile") || sender.Name.Contains("Minion"))
return;

var ho = SkillsList.IsObj((ObjectManager.GetUnitByNetworkId<Obj_GeneralParticleEmitter>(sender.NetworkId)).Name);
if (ho == null) return;
if (PanthD)

var misccheck = SkillsList.IsMisc((ObjectManager.GetUnitByNetworkId<Obj_GeneralParticleEmitter>(sender.NetworkId)).Name);
if (misccheck != null) return;



{
ho.Duration = 2.5f;
PanthD = false;
switch (ho.Realtime)
{
case 0: //Object First Created Posistion
var r1 = DivideRealTime.RealTimeDivide(sender, 1);
if (r1 == null) return;
if (PanthD)
{
ho.Duration = 2.5f;
PanthD = false;
}
break;
case 1: //Realtime on Hero Position / Don't need to check Hero.isenemy
var r2 = DivideRealTime.RealTimeDivide(sender, 2);
if (r2 == null) return;
break;
case 2: //Realtime on Sender Position
var r3 = DivideRealTime.RealTimeDivide(sender, 1);
if (r3 == null) return;
break;

}
AllSkills.Add(new ListedText(sender.NetworkId, sender.Name, ho.Duration, sender.Position, Game.Time, sender, ho.Realtime, Heropos));
}
AllSkills.Add(new ListedText(sender.NetworkId, sender.Name, ho.Duration , sender.Position, Game.Time, sender));
}


Expand All @@ -61,7 +155,7 @@ void OnDeleteObject(GameObject sender, EventArgs args)
{
if (!Menus.Menu.Item("activeskill").GetValue<bool>())
return;
foreach (var deleteobj in AllSkills.Where(w => w.NetworkId == sender.NetworkId))
foreach (var deleteobj in AllSkills.Where(w => w.NetworkId == sender.NetworkId || w.Name == sender.Name ))
{
deleteobj.Visible = false;
AllSkills.Remove(deleteobj);
Expand Down
83 changes: 83 additions & 0 deletions Mata View/Mata View/DivideRealTime.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#region

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using LeagueSharp;
using LeagueSharp.Common;
using SharpDX;
using Color = System.Drawing.Color;

#endregion

namespace Mata_View
{
public class DivideRealTime
{

public static object RealTimeDivide(GameObject sender, int realtimecheck)
{
var herof = new Obj_AI_Hero();
switch (realtimecheck)
{
case 1:
foreach (var hero in ObjectManager.Get<Obj_AI_Hero>().Where(hero => (Vector3.Distance(sender.Position, hero.ServerPosition) <= 1000) && sender.Name.ToLower().Contains(hero.ChampionName.ToLower())))
{
herof = hero;
break;
}

break;
case 2:
foreach (
var hero in
ObjectManager.Get<Obj_AI_Hero>()
.Where(o => (Vector3.Distance(sender.Position, o.ServerPosition) <= 100)))
{
herof = hero;
break;
}
break;
// return null;

}
foreach (var skill in SkillsList.SkillList0.Where(o => sender.Name.ToLower().Contains(o.Name.ToLower())))
{
if (herof.ChampionName == "Lissandra" &&
sender.Name.ToLower().Contains("lissandra_base_r_ring_"))
return null;
if (!Menus.Menu.Item(skill.Name).GetValue<bool>()) return null;
if ((herof.IsEnemy || (sender.Name.ToLower().Contains("red") || sender.Name.ToLower().Contains("enemy"))) && Menus.Menu.Item("activeEnemy").GetValue<bool>())
{
DetectObj.Heropos = herof;
return skill;
}
if ((herof.IsAlly || (sender.Name.ToLower().Contains("green") || sender.Name.ToLower().Contains("blue"))) && !herof.IsMe && Menus.Menu.Item("activeEnemy").GetValue<bool>())
{
DetectObj.Heropos = herof;
return skill;
}
if ((herof.IsMe || sender.Name.ToLower().Contains("green"))&& Menus.Menu.Item("activeMy").GetValue<bool>())
{
DetectObj.Heropos = herof;
return skill;
}
else
{
return null;
}
}
return null;
}
}



}



27 changes: 26 additions & 1 deletion Mata View/Mata View/ListedText.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#region

using System.Linq;
using LeagueSharp;
using LeagueSharp.Common;
using SharpDX;
Expand All @@ -20,11 +21,13 @@ public class ListedText
public Vector3 Position;
public float CreatedAt;
public static GameObject SenderN;
public int RealtimeCheck;
public Obj_AI_Hero Heroname;

public bool Visible = true;

public Render.Text Timer { get; set; }
public ListedText(int netId, string name, float duration, Vector3 position, float createdAt, GameObject senderN)
public ListedText(int netId, string name, float duration, Vector3 position, float createdAt, GameObject senderN, int realtimecheck, Obj_AI_Hero heroname)
{
NetworkId = netId;
Name = name;
Expand All @@ -33,6 +36,8 @@ public ListedText(int netId, string name, float duration, Vector3 position, floa
CreatedAt = createdAt;

SenderN = senderN;
RealtimeCheck = realtimecheck;
Heroname = heroname;

Timer = new Render.Text("", new Vector2(0, 0), (Menus.testsize.GetValue<Slider>().Value) * 2, SharpDX.Color.White)
{
Expand All @@ -42,6 +47,21 @@ public ListedText(int netId, string name, float duration, Vector3 position, floa
PositionUpdate = delegate
{
var pos = Drawing.WorldToScreen(new Vector3(Position.X, Position.Y, Position.Z));
switch (RealtimeCheck)
{
case 0: //Object First Created Posistion

break;
case 1: //Realtime on Hero Position
Position = Heroname.Position;
Position.Y += 80f; // I don't know why it needs, but if I don't add posistion it won't draw timer
break;
case 2: //Realtime on Sender Position
Position = SenderN.Position;
Position.Y += 40f;
break;

}
return pos;
},
TextUpdate = () => ((CreatedAt + Duration) - Game.Time).ToString("0.0"),
Expand All @@ -50,5 +70,10 @@ public ListedText(int netId, string name, float duration, Vector3 position, floa
};
Timer.Add();
}


}



}
5 changes: 4 additions & 1 deletion Mata View/Mata View/Mata View.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,17 @@
</ItemGroup>
<ItemGroup>
<Compile Include="DetectObj.cs" />
<Compile Include="DivideRealTime.cs" />
<Compile Include="ListedText.cs" />
<Compile Include="Menus.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SkillsList.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="App.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
Loading

0 comments on commit a9d1e25

Please sign in to comment.