public static void Update56(Conquer_Online_Server.Game.Entity Entity) { MySqlCommand Command = new MySqlCommand(MySqlCommandType.UPDATE); Command.Update("entities") .Set("My_Title", Entity.TitleActivated) .Where("UID", Entity.UID) .Execute(); }
public Node(Node parentNode, Node goalNode, int gCost, ushort x, ushort y, Conquer_Online_Server.Game.Map Map) { this.Map = Map; this.parentNode = parentNode; this._goalNode = goalNode; this.gCost = gCost; this.x=x; this.y=y; InitNode(); }
public static List<Coordonates> FindWay(ushort myX, ushort myY, ushort toX, ushort toY, Conquer_Online_Server.Game.Map map) { List<Coordonates> SolutionPathList = new List<Coordonates>(); Node node_goal = new Node(null, null, 1, toX, toY, map); Node node_start = new Node(null, node_goal, 1, myX, myY, map); SortedCostNodeList OPEN = new SortedCostNodeList(); SortedCostNodeList CLOSED = new SortedCostNodeList(); OPEN.push(node_start); while (OPEN.Count > 0) { //if (count == 2000) // break; Node node_current = OPEN.pop(); if (node_current.isMatch(node_goal)) { node_goal.parentNode = node_current.parentNode; break; } ArrayList successors = node_current.GetSuccessors(); foreach (Node node_successor in successors) { int oFound = OPEN.IndexOf(node_successor); if (oFound > 0) { Node existing_node = OPEN.NodeAt(oFound); if (existing_node.CompareTo(node_current) <= 0) continue; } int cFound = CLOSED.IndexOf(node_successor); if (cFound > 0) { Node existing_node = CLOSED.NodeAt(cFound); if (existing_node.CompareTo(node_current) <= 0) continue; } if (oFound != -1) OPEN.RemoveAt(oFound); if (cFound != -1) CLOSED.RemoveAt(cFound); OPEN.push(node_successor); } CLOSED.push(node_current); } Node p = node_goal; while (p != null) { SolutionPathList.Add(new Coordonates() { X = p.x, Y = p.y }); p = p.parentNode; } return SolutionPathList; }
void WontAdd(Conquer_Online_Server.Game.Enums.SkillIDs S) { Network.GamePackets.Data data = new Data(true); data.UID = _client.Entity.UID; data.dwParam = (byte)S; data.ID = 109; data.Send(_client); Interfaces.ISkill New = new Network.GamePackets.Spell(true); New.ID = (ushort)S; New.Level = 0; New.Experience = 0; New.PreviousLevel = 0; RemoveSkill.Add(New.ID, New); }
void Add(Conquer_Online_Server.Game.Enums.SkillIDs S) { Interfaces.ISkill New = new Network.GamePackets.Spell(true); New.ID = (ushort)S; New.Level = 0; New.Experience = 0; New.PreviousLevel = 0; New.Send(_client); Addskill.Add(New.ID, New); }
public Conquer_Online_Server.Network.Cryptography.GameCryptography HandleClientKeyPacket(string PublicKey, Conquer_Online_Server.Network.Cryptography.GameCryptography cryptographer) { byte[] key = _keyExchange.ComputeKey(OpenSSL.BigNumber.FromHexString(PublicKey)); string md = KeyMD5(MD5.Create().ComputeHash(key)); key = Encoding.Default.GetBytes(md); cryptographer.SetKey(key); cryptographer.SetIvs(_clientIv, _serverIv); return cryptographer; }