Advertisement
Guest User

GargsMasterPlugin.cs

a guest
Jul 24th, 2017
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 6.76 KB | None | 0 0
  1. using System.Collections.Generic;
  2. using System.Linq;
  3. using Turbo.Plugins.Default;
  4.  
  5. namespace Turbo.Plugins.WindyForce
  6. {
  7.     public class GargsMasterPlugin : BasePlugin, IInGameWorldPainter
  8.     {
  9.         public bool ShowInTown { get; set; }
  10.         public WorldDecoratorCollection PlayerGargs { get; set; }
  11.         public WorldDecoratorCollection OtherPlayersGargs { get; set; }
  12.         public HashSet<uint> GargSno = new HashSet<uint>
  13.         {
  14.             432690, 432691, 432692, 432693, 432694, 122305, 179776, 171491, 179778, 171501, 171502, 179780, 179779, 179772,
  15.                     //wd
  16.             51353,    //WD_ZombieDog    Zombie Dog            //2 rune
  17.             103215,    //WD_ZombieDogRune_fire                //4 rune
  18.             105763,    //WD_ZombieDogRune_healthGlobe        //0 rune
  19.             110959,    //WD_ZombieDogRune_healthLink        //3 rune
  20.             103235,    //WD_ZombieDogRune_lifeSteal        //5    rune
  21.             103217,    //WD_ZombieDogRune_poison            //1 rune
  22.             87189,    //Fetish_Melee_A    Fetish Army            //0 //2 //3
  23.             89934,    //Fetish_Skeleton_A                        //1
  24.             409656,    //Fetish_Melee_fire                        //4
  25.             410238,    //Fetish_Melee_poison                    //5
  26.             409590,    //Fetish_Melee_Sycophants                //Belt    //passive
  27.  
  28.             //monk male
  29.             169904,    //Monk_male_mysticAlly    
  30.             169905,    //Monk_male_mysticAlly_alabaster    
  31.             169906,    //Monk_male_mysticAlly_crimson    
  32.             169908,    //Monk_male_mysticAlly_golden    
  33.             169907,    //Monk_male_mysticAlly_indigo    
  34.             169909,    //Monk_male_mysticAlly_obsidian
  35.             //monk female
  36.             123885,    //Monk_female_mysticAlly    
  37.             169891,    //Monk_female_mysticAlly_alabaster    
  38.             168878,    //Monk_female_mysticAlly_crimson    
  39.             169123,    //Monk_female_mysticAlly_golden    
  40.             169890,    //Monk_female_mysticAlly_indigo    
  41.             169077,    //Monk_female_mysticAlly_obsidian    
  42.             //runes active
  43.             367774,    //x1_Monk_female_mysticAllyMini_crimson        //feuerVerbündeter
  44.             363935,    //X1_projectile_mystically_runec_boulder    //roling stone    //OtherPlayersMysticAlly
  45.  
  46.             //dh
  47.             133741,    //DH_Companion            Raven
  48.             181748,    //DH_companion_Boar        Boar
  49.             178664,    //DH_Companion_Ferret    Ferret
  50.             159098,    //DH_Companion_RuneC    Wolf
  51.             159144,    //DH_Companion_RuneE    Bat
  52.             173827,    //DH_companion_spider    Spider
  53.  
  54.             //crus
  55.             //nur bogenschützen && leibwächter mit PlayerPhalanx decorator
  56.             330728,    //x1_Crusader_Phalanx3_projectile                //no rune
  57.             369795,    //x1_Crusader_PhalanxArcher    Avatar of the Order    //bogenschützen
  58.             //338598,    //x1_Crusader_Phalanx3_addProjectiles            //pfeile bogenschützen
  59.             357358,    //x1_Crusader_Phalanx3_projectile_chargers        //schildansturm
  60.             338678,    //x1_Crusader_Phalanx3_projectile_horse            //stampede
  61.             338807,    //x1_Crusader_Phalanx3_blocker                    //schildträger
  62.             345682,    //x1_Crusader_Phalanx    Avatar of the Order        //leibwächter
  63.  
  64.             90443,    //Barbarian_CallOfTheAncients_1    Talic
  65.             90535,    //Barbarian_CallOfTheAncients_2    Korlic
  66.             90536,    //Barbarian_CallOfTheAncients_3    Madawc
  67.  
  68.             //3 heads = 3 Sno = 3 circle
  69.             81515,    //Wizard_HydraHead_Arcane_1    
  70.             //81231,    //Wizard_HydraHead_Arcane_2    
  71.             //81232,    ///Wizard_HydraHead_Arcane_3    
  72.             83959,    //Wizard_HydraHead_Big    Fire Hydra
  73.             80745,    //Wizard_HydraHead_Default_1    
  74.             //80757,    //Wizard_HydraHead_Default_2    
  75.             //80758,    //Wizard_HydraHead_Default_3    
  76.             325807,    //Wizard_HydraHead_fire2_1    
  77.             //325813,    //Wizard_HydraHead_fire2_2    
  78.             //325815,    //Wizard_HydraHead_fire2_3    
  79.             82972,    //Wizard_HydraHead_Frost_1    
  80.             //83024,    //Wizard_HydraHead_Frost_2    
  81.             //83025,    //Wizard_HydraHead_Frost_3    
  82.             82109,    //Wizard_HydraHead_Lightning_1    
  83.             //81229,    //Wizard_HydraHead_Lightning_2    
  84.             //81230    //Wizard_HydraHead_Lightning_3
  85.  
  86.             //Necromancer
  87.             //Command Skeletons P6_Necro_Trait_SkeletonSpawner ID:453793
  88.             473147, //No Rune
  89.             473428, //Enforcer Rune
  90.             473426, //Frenzy Rune
  91.             473420, //Dark Mending Rune
  92.             473417, //Freezing Grasps Rune
  93.             473418, //Kill Command Rune
  94.            
  95.             //Command Golem P6_Necro_Trait_GolemSpawner ID: 460062
  96.             471646, //No Rune & Flesh Golem Rune
  97.             471647, //Ice Golem Rune
  98.             465239, //Bone Golem Rune
  99.             471619, //Decay Golem Rune
  100.             460042, //Blood Golem Rune
  101.            
  102.             //Skeletal Mage
  103.             472275, //No Rune
  104.             472588, //Gift of Death
  105.             472769, //Contamination Rune
  106.             472801, //Skeleton Archer Rune
  107.             472606, //Singularity Rune
  108.             472715 //Life Support Rune
  109.            
  110.         };
  111.  
  112.         public GargsMasterPlugin()
  113.         {
  114.             Enabled = true;
  115.         }
  116.  
  117.         public override void Load(IController hud)
  118.         {
  119.             base.Load(hud);
  120.             ShowInTown = false;
  121.  
  122.             PlayerGargs = new WorldDecoratorCollection(
  123.                 new MapShapeDecorator(Hud)
  124.                 {
  125.                     Brush = Hud.Render.CreateBrush(255, 0, 255, 0, 5),
  126.                     ShapePainter = new CircleShapePainter(Hud),
  127.                     Radius = 2f,
  128.                 },
  129.                 new GroundCircleDecorator(Hud)
  130.                 {
  131.                     Brush = Hud.Render.CreateBrush(255, 0, 255, 0, 5),
  132.                     Radius = 4f
  133.                 });
  134.  
  135.             OtherPlayersGargs = new WorldDecoratorCollection(
  136.                 new MapShapeDecorator(Hud)
  137.                 {
  138.                     Brush = Hud.Render.CreateBrush(255, 255, 0, 0, 5),
  139.                     ShapePainter = new CircleShapePainter(Hud),
  140.                     Radius = 2f,
  141.                 },
  142.                 new GroundCircleDecorator(Hud)
  143.                 {
  144.                     Brush = Hud.Render.CreateBrush(255, 255, 0, 0, 5),
  145.                     Radius = 4f
  146.                 });
  147.         }
  148.  
  149.         public void PaintWorld(WorldLayer layer)
  150.         {
  151.             if (Hud.Game.IsInGame && !(Hud.Game.Me.IsInTown && !ShowInTown))
  152.             {
  153.                 var player = Hud.Game.Me;
  154.                 var actors = Hud.Game.Actors.Where(a => GargSno.Contains(a.SnoActor.Sno));
  155.  
  156.                 foreach (var actor in actors)
  157.                 {
  158.                     if (actor.SummonerAcdDynamicId == player.SummonerId)
  159.                         PlayerGargs.Paint(layer, actor, actor.FloorCoordinate, "");
  160.                     /*else                
  161.                         OtherPlayersGargs.Paint(layer, actor, actor.FloorCoordinate, ""); */
  162.                 }
  163.             }
  164.         }
  165.     } // class
  166. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement