private bool HandleSelectedServerDataMessage(SelectedServerDataMessage message, ConnectedHost source) { mGameAdress = message.address; message.address = RemoteSetting.Default.GameListenAdress; message.port = (ushort)RemoteSetting.Default.GameListenPort; mHost.SendMessage(message, DestinationEnum.CLIENT); mHost.PreMigrate(); return(false); }
public void UpgradetStats(BoostableCharacteristicsEnum stat, ushort PointToBoost) { if (mHost.Bot.BotState != BotStatsEnum.INACTIF || PointToBoost > mHost.Bot.Game.Player.PlayerCharacteristics.StatsPoints) { return; } BasicStatMessage message = new BasicStatMessage(151); mHost.SendMessage(message); StatsUpgradeRequestMessage msg = new StatsUpgradeRequestMessage(false, (sbyte)stat, PointToBoost); mHost.SendMessage(msg); }
private void HandleBasicAckMessage(BasicAckMessage message, ConnectedHost source) { if (mConfirmed) { mConfirmed = false; GameRolePlayAttackMonsterRequestMessage newMessage = new GameRolePlayAttackMonsterRequestMessage(); newMessage.monsterGroupId = AttackedMonstersId; mHost.SendMessage(newMessage); } }
public int Move(short destinationCellId, short curentCellId, bool useDiagonal, WorldControler world) { mHost.Bot.Game.Player.mPathFinder.SetMap(world.Map, useDiagonal); DebugHighlightCellsMessage message = new DebugHighlightCellsMessage(Color.Red.ToArgb(), new List <ushort>().ToArray()); List <CellWithOrientation> cels = mHost.Bot.Game.Player.mPathFinder.GetPath(curentCellId, destinationCellId); if (cels == null) { Move(destinationCellId, curentCellId, useDiagonal, world); } List <short> keyMouvement = new List <short>(); foreach (CellWithOrientation ce in cels) { message.cells.ToList().Add((ushort)ce.Id); ce.GetCompressedValue(); keyMouvement.Add(ce.CompressedValue); } mHost.SendMessage(message, DestinationEnum.CLIENT); Move(keyMouvement.ToArray(), world.Map.Data.Id); return((int)keyMouvement.Count); }
private void SendTextInformation(TextInformationTypeEnum type, ushort id, params object[] parameters) { mHost.SendMessage((new TextInformationMessage((sbyte)type, id, parameters.Select(entry => entry.ToString()).ToArray())), Enums.DestinationEnum.CLIENT); }