Example #1
0
    private void method_20(GClass147 gclass147_0)
    {
        this.bool_2 = false;
        if (gclass147_0.string_0.StartsWith("!dope"))
        {
            this.bool_2 = false;
            string str = gclass147_0.string_0.Substring(5).Trim();
            this.Game.method_9(new GClass269("69|" + str));
            return;
        }
        GInterface5 ginterface = null;

        if (gclass147_0.string_0.StartsWith("!!>"))
        {
            ginterface = this.Game.Connection;
        }
        else if (gclass147_0.string_0.StartsWith("!!<"))
        {
            ginterface = this.method_0();
        }
        if (ginterface == null)
        {
            this.bool_2 = true;
            return;
        }
        GClass269 ginterface0_ = new GClass269(gclass147_0.string_0.Substring(3));

        ginterface.SendMessage(ginterface0_);
    }
Example #2
0
 private void method_13(GClass269 gclass269_0)
 {
     string[] array;
     if (GClass90.smethod_1(gclass269_0.string_0, out array, new string[]
     {
         "n",
         "INV"
     }))
     {
         int  num  = int.Parse(array[0]);
         Ship ship = this.Game.Map.method_4(num);
         if (array[1] == "1" && ship != null && num != this.Game.Hero.Id)
         {
             this.bool_1 = false;
             this.method_0().method_9(GClass90.smethod_2(num, false));
             this.method_0().method_9(GClass90.Log("Unmasked: " + ship.Name));
             return;
         }
     }
     else if (GClass90.smethod_1(gclass269_0.string_0, out array, new string[]
     {
         "i"
     }))
     {
         this.bool_1 = false;
     }
 }
Example #3
0
 private void method_3(GameManager gameManager_0, GClass269 gclass269_0)
 {
     if (gclass269_0.string_0 == "0|A|STM|jumpgate_failed_no_key_activated" && this.ferMgYrrwCU() > 0)
     {
         base.C.Server.method_15("ammunition_ggportal_quarantine-zone-cpu", false, false);
         return;
     }
 }
Example #4
0
 public override void Init(GClass269 gclass269_0)
 {
     base.Init(gclass269_0);
     if (gclass269_0.bool_0)
     {
         this.Type = NpcUtils.NpcType.smethod_4(base.Name);
     }
     this.Range = SecurityManager.smethod_3(this);
 }
Example #5
0
 private void method_2(GameManager gameManager_0, GClass269 gclass269_0)
 {
     string[] array = gclass269_0.string_0.Split(new char[]
     {
         '|'
     });
     if (array[1] == "LM" && array[2] == "ST" && array.Length > 4)
     {
         double num2;
         double num  = double.TryParse(array[4], out num2) ? num2 : 0.0;
         string text = array[3];
         if (text != null)
         {
             uint num3 = < PrivateImplementationDetails > { 00568430 - 8A1B - 4ED 2 - BDC3 - 29301DB1CBBE }.ComputeStringHash(text);
Example #6
0
 public virtual void Init(GClass269 gclass269_0)
 {
     this.PosX          = gclass269_0.int_1;
     this.PosY          = gclass269_0.int_6;
     this.IsNpc         = gclass269_0.bool_0;
     this.FactionId     = gclass269_0.int_8;
     this.Id            = gclass269_0.int_2;
     this.TypeId        = gclass269_0.string_0;
     this.ClanTag       = gclass269_0.string_2;
     this.Cloaked       = gclass269_0.bool_3;
     this.Name          = gclass269_0.string_1;
     this.ClanDiplomacy = (int)gclass269_0.gclass139_0.uint_0;
     this.Modifiers.Clear();
     this.Effects.Clear();
     foreach (GClass187 gclass187_ in gclass269_0.vector_0)
     {
         this.ApplyModifier(gclass187_);
     }
     this.LastStatUpdate = DateTimeOffset.Now;
 }
Example #7
0
 private void method_3(GameManager gameManager_0, GClass269 gclass269_0)
 {
     string[] source;
     if (GClass90.smethod_1(gclass269_0.string_0, out source, new string[]
     {
         "n",
         "MSG",
         "1",
         "0",
         "msg_galaxy_gate_cooldown_active"
     }) && source.FirstOrDefault <string>() != null)
     {
         Dictionary <string, string> dictionary = GClass90.smethod_0(source.FirstOrDefault <string>());
         string s;
         string s2;
         int    num;
         int    num2;
         if (dictionary.TryGetValue("%HOURS%", out s) && dictionary.TryGetValue("%MINUTES%", out s2) && int.TryParse(s, out num) && int.TryParse(s2, out num2))
         {
             base.Log.Info <int, int>("GG cooldown: {hours}h {minutes}m", num, num2);
             this.dateTimeOffset_2 = DateTimeOffset.Now.AddHours((double)num).AddMinutes((double)num2);
         }
     }
 }
Example #8
0
        public void method_9(GClass269 gclass269_0)
        {
            string[] array = gclass269_0.string_0.Split(new char[]
            {
                '|'
            });
            Hero hero = this.Hero;

            try
            {
                if (gclass269_0.string_0 == "0|l")
                {
                    this.IsLoggedOut = true;
                    this.Connection.Socket.Disconnect(ErrorReason.LoggedOut, null, false);
                }
                else if (array[0] == "ERR")
                {
                    this.Log.Warn("Error {msg}", gclass269_0.string_0);
                    if (array[1] == "41")
                    {
                        this.IsLoggedIn = false;
                    }
                    this.Connection.Socket.Disconnect(ErrorReason.ConnectionLost, null, false);
                }
                if (array.Length >= 3 && array[1] == "A")
                {
                    if (array[2] == "C")
                    {
                        hero.Credits = double.Parse(array[3]);
                        hero.Uridium = double.Parse(array[4]);
                    }
                    else if (array[2] == "BK")
                    {
                        hero.BootyKeys = (double)int.Parse(array[3]);
                    }
                    else if (array[2] == "STD")
                    {
                        this.Log.Info(array[3]);
                    }
                }
                string text = array[1];
                if (text != null)
                {
                    if (!(text == "i"))
                    {
                        if (!(text == "S"))
                        {
                            if (!(text == "LM"))
                            {
                                if (!(text == "n"))
                                {
                                    if (text == "7" && array.Length > 2 && array[2] == "HS")
                                    {
                                        this.Connection.method_2(new string[]
                                        {
                                            "JCPU",
                                            "GET"
                                        });
                                    }
                                }
                                else
                                {
                                    string text2 = array[2];
                                    if (text2 != null)
                                    {
                                        if (!(text2 == "INV"))
                                        {
                                            if (!(text2 == "LSH"))
                                            {
                                                if (!(text2 == "USH"))
                                                {
                                                    if (text2 == "fx")
                                                    {
                                                        string string_ = array[4];
                                                        Ship   ship    = this.Map.method_4(int.Parse(array[5]));
                                                        if (ship != null)
                                                        {
                                                            if (array[3] == "start")
                                                            {
                                                                ship.StartEffect(string_);
                                                            }
                                                            else
                                                            {
                                                                ship.EndEffect(string_);
                                                            }
                                                        }
                                                    }
                                                }
                                                else
                                                {
                                                    Ship ship2 = this.Map.method_4(int.Parse(array[3]));
                                                    if (ship2 != null)
                                                    {
                                                        NpcShip npcShip = ship2 as NpcShip;
                                                        if (npcShip != null)
                                                        {
                                                            npcShip.LeashedBy = 0;
                                                        }
                                                    }
                                                }
                                            }
                                            else
                                            {
                                                Ship ship3 = this.Map.method_4(int.Parse(array[3]));
                                                if (ship3 != null)
                                                {
                                                    NpcShip npcShip2 = ship3 as NpcShip;
                                                    if (npcShip2 != null)
                                                    {
                                                        npcShip2.LeashedBy = int.Parse(array[4]);
                                                        if (npcShip2.LeashedBy == this.Hero.Id)
                                                        {
                                                            npcShip2.LeashedBy = -1;
                                                        }
                                                        else
                                                        {
                                                            Ship ship4 = this.Map.method_4(npcShip2.LeashedBy);
                                                            if (ship4 != null)
                                                            {
                                                                ship4.TargetId = ship3.Id;
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                        else
                                        {
                                            Ship ship5 = this.Map.method_4(int.Parse(array[3]));
                                            if (ship5 != null)
                                            {
                                                ship5.Cloaked = (array[4] == "1");
                                            }
                                        }
                                    }
                                }
                            }
                            else if (array[2] == "ST" && array.Length > 5)
                            {
                                double num   = double.Parse(array[5], CultureInfo.InvariantCulture);
                                string text2 = array[3];
                                if (text2 != null)
                                {
                                    if (!(text2 == "EP"))
                                    {
                                        if (!(text2 == "HON"))
                                        {
                                            if (!(text2 == "CRE"))
                                            {
                                                if (text2 == "URI")
                                                {
                                                    this.Hero.Uridium = num;
                                                }
                                            }
                                            else
                                            {
                                                this.Hero.Credits = num;
                                            }
                                        }
                                        else
                                        {
                                            this.Hero.Honor = num;
                                        }
                                    }
                                    else
                                    {
                                        this.Hero.Experience = num;
                                        this.Hero.Level      = int.Parse(array[6]);
                                    }
                                }
                            }
                        }
                        else
                        {
                            string text2 = array[2];
                            if (text2 != null && text2 == "CFG")
                            {
                                this.Hero.Config = int.Parse(array[3]);
                            }
                        }
                    }
                    else
                    {
                        this.NextMapId = int.Parse(array[2]);
                        this.Connection.SendMessage(new GClass146(true));
                        this.method_8(false);
                    }
                }
            }
            catch
            {
            }
            GameManager.GClass77.GDelegate3 logMessage = this.LogMessage;
            if (logMessage == null)
            {
                return;
            }
            logMessage(this, gclass269_0);
        }
Example #9
0
 public void Run(GClass269 cmd)
 {
     ConnectionManager.Instance.Value.Game.method_9(cmd);
 }
Example #10
0
 public void method_16(GClass269 gclass269_0)
 {
     this.Map.method_15(gclass269_0);
 }