Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Football Bug
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="wow97" data-source="post: 447931" data-attributes="member: 85569"><p>Please, help me!</p><p><a href="https://i.gyazo.com/3d81665fbb57b64e6966d3519062e4a9.mp4" target="_blank">https://i.gyazo.com/3d81665fbb57b64e6966d3519062e4a9.mp4</a></p><p></p><p>[CODE=csharp]using Plus.Collections;</p><p>using Plus.HabboHotel.GameClients;</p><p>using Plus.HabboHotel.Items;</p><p>using Plus.HabboHotel.PathFinding;</p><p>using Plus.Messages;</p><p>using Plus.Messages.Parsers;</p><p>using Plus.Util;</p><p>using System;</p><p>using System.Collections.Generic;</p><p>using System.Drawing;</p><p>using System.Linq;</p><p>using System.Threading.Tasks;</p><p></p><p>namespace Plus.HabboHotel.Rooms.Games</p><p>{</p><p> internal class Soccer</p><p> {</p><p> private RoomItem[] _gates;</p><p> private Room _room;</p><p> private QueuedDictionary<uint, RoomItem> _balls;</p><p></p><p> public Soccer(Room room)</p><p> {</p><p> _room = room;</p><p> _gates = new RoomItem[4];</p><p> _balls = new QueuedDictionary<uint, RoomItem>();</p><p> }</p><p></p><p> public static int GetThreadTime(int i)</p><p> {</p><p> switch (i)</p><p> {</p><p> case 1:</p><p> return 75;</p><p></p><p> case 2:</p><p> return 100;</p><p></p><p> case 3:</p><p> return 125;</p><p></p><p> case 4:</p><p> return 150;</p><p></p><p> default:</p><p> if (i != 5)</p><p> return ((i != 6) ? 200 : 350);</p><p> return 200;</p><p> }</p><p> }</p><p></p><p> internal void AddBall(RoomItem item)</p><p> {</p><p> _balls.Add(item.Id, item);</p><p> }</p><p></p><p> internal void Destroy()</p><p> {</p><p> Array.Clear(_gates, 0, _gates.Length);</p><p> _gates = null;</p><p> _room = null;</p><p> _balls.Destroy();</p><p> _balls = null;</p><p> }</p><p></p><p> internal void OnCycle()</p><p> {</p><p> _balls.OnCycle();</p><p> }</p><p></p><p> internal void OnGateRemove(RoomItem item)</p><p> {</p><p> switch (item.GetBaseItem().InteractionType)</p><p> {</p><p> case Interaction.FootballGoalGreen:</p><p> case Interaction.FootballCounterGreen:</p><p> _room.GetGameManager().RemoveFurnitureFromTeam(item, Team.green);</p><p> return;</p><p></p><p> case Interaction.FootballGoalYellow:</p><p> case Interaction.FootballCounterYellow:</p><p> _room.GetGameManager().RemoveFurnitureFromTeam(item, Team.yellow);</p><p> return;</p><p></p><p> case Interaction.FootballGoalBlue:</p><p> case Interaction.FootballCounterBlue:</p><p> _room.GetGameManager().RemoveFurnitureFromTeam(item, Team.blue);</p><p> return;</p><p></p><p> case Interaction.FootballGoalRed:</p><p> case Interaction.FootballCounterRed:</p><p> _room.GetGameManager().RemoveFurnitureFromTeam(item, Team.red);</p><p> return;</p><p></p><p> default:</p><p> return;</p><p> }</p><p> }</p><p></p><p> private IEnumerable<RoomItem> GetFootballItemsForAllTeams()</p><p> {</p><p> var items = _room.GetGameManager().GetItems(Team.red).Values.ToList();</p><p> items.AddRange(_room.GetGameManager().GetItems(Team.green).Values);</p><p></p><p> items.AddRange(_room.GetGameManager().GetItems(Team.blue).Values);</p><p></p><p> items.AddRange(_room.GetGameManager().GetItems(Team.yellow).Values);</p><p></p><p> return items;</p><p> }</p><p></p><p> private bool GameItemOverlaps(RoomItem gameItem)</p><p> {</p><p> var gameItemCoord = gameItem.Coordinate;</p><p> return</p><p> GetFootballItemsForAllTeams()</p><p> .Any(</p><p> item =></p><p> item.AffectedTiles.Values.Any(</p><p> tile => tile.X == gameItemCoord.X && tile.Y == gameItemCoord.Y));</p><p> }</p><p></p><p> internal void OnUserWalk(RoomUser user)</p><p> {</p><p> if (user == null)</p><p> return;</p><p></p><p> foreach (RoomItem ball in _balls.Values)</p><p> {</p><p> if (user.SetX == ball.X && user.SetY == ball.Y && user.GoalX == ball.X && user.GoalY == ball.Y && user.HandelingBallStatus == 0) // super chute.</p><p> {</p><p> var userPoint = new Point(user.X, user.Y);</p><p> ball.ExtraData = "55";</p><p> ball.BallIsMoving = true;</p><p> ball.BallValue = 1;</p><p> MoveBall(ball, user.GetClient(), userPoint);</p><p> }</p><p> else if (user.X == ball.X && user.Y == ball.Y && user.HandelingBallStatus == 0)</p><p> {</p><p> var userPoint = new Point(user.SetX, user.SetY);</p><p> ball.ExtraData = "55";</p><p> ball.BallIsMoving = true;</p><p> ball.BallValue = 1;</p><p> MoveBall(ball, user.GetClient(), userPoint);</p><p> }</p><p> else</p><p> {</p><p> if (user.HandelingBallStatus == 0 && user.GoalX == ball.X && user.GoalY == ball.Y)</p><p> return;</p><p></p><p> if (user.SetX != ball.X || user.SetY != ball.Y || !user.IsWalking ||</p><p> (user.X == user.GoalX && user.Y == user.GoalY))</p><p> return;</p><p> user.HandelingBallStatus = 1;</p><p> var comeDirection = ComeDirection.GetComeDirection(new Point(user.X, user.Y), ball.Coordinate);</p><p> if (comeDirection == IComeDirection.Null)</p><p> return;</p><p></p><p> var newX = user.SetX;</p><p> var newY = user.SetY;</p><p></p><p> if (!ball.GetRoom().GetGameMap().ValidTile2(user.SetX, user.SetY) || !ball.GetRoom().GetGameMap().ItemCanBePlacedHere(user.SetX, user.SetY))</p><p> {</p><p> comeDirection = ComeDirection.InverseDirections(_room, comeDirection, user.X, user.Y);</p><p> newX = ball.X;</p><p> newY = ball.Y;</p><p> }</p><p></p><p> ComeDirection.GetNewCoords(comeDirection, ref newX, ref newY);</p><p> ball.ExtraData = "11";</p><p> MoveBall(ball, user.GetClient(), newX, newY);</p><p> }</p><p> }</p><p> }</p><p></p><p> internal bool MoveBall(RoomItem item, GameClient mover, int newX, int newY)</p><p> {</p><p> if (item == null || item.GetBaseItem() == null /*|| mover == null || mover.GetHabbo() == null*/)</p><p> return false;</p><p></p><p> if (!_room.GetGameMap().ItemCanBePlacedHere(newX, newY))</p><p> return false;</p><p></p><p> var oldRoomCoord = item.Coordinate;</p><p> var itemIsOnGameItem = GameItemOverlaps(item);</p><p> double newZ = _room.GetGameMap().Model.SqFloorHeight[newX][newY];</p><p></p><p> var mMessage = new ServerMessage();</p><p> mMessage.Init(LibraryParser.OutgoingRequest("ItemAnimationMessageComposer")); // Cf</p><p> mMessage.AppendInteger(item.Coordinate.X);</p><p> mMessage.AppendInteger(item.Coordinate.Y);</p><p> mMessage.AppendInteger(newX);</p><p> mMessage.AppendInteger(newY);</p><p> mMessage.AppendInteger(1);</p><p> mMessage.AppendInteger(item.Id);</p><p> mMessage.AppendString(TextHandling.GetString(item.Z));</p><p> mMessage.AppendString(TextHandling.GetString(newZ));</p><p> mMessage.AppendInteger(item.Id);</p><p> _room.SendMessage(mMessage);</p><p></p><p> if (oldRoomCoord.X == newX && oldRoomCoord.Y == newY)</p><p> return false;</p><p></p><p> item.SetState(newX, newY, item.Z,</p><p> Gamemap.GetAffectedTiles(item.GetBaseItem().Length, item.GetBaseItem().Width, newX, newY, item.Rot));</p><p></p><p> if (itemIsOnGameItem || mover == null || mover.GetHabbo() == null)</p><p> return false;</p><p> HandleFootballGameItems(new Point(newX, newY),</p><p> _room.GetRoomUserManager().GetRoomUserByHabbo(mover.GetHabbo().Id));</p><p> return false;</p><p> }</p><p></p><p> internal void MoveBall(RoomItem item, GameClient client, Point user)</p><p> {</p><p> try</p><p> {</p><p> item.ComeDirection = ComeDirection.GetComeDirection(user, item.Coordinate);</p><p></p><p> if (item.ComeDirection != IComeDirection.Null)</p><p> // item.ballMover = client;</p><p> new TaskFactory().StartNew(() => MoveBallProcess(item, client));</p><p> }</p><p> catch</p><p> {</p><p> }</p><p> }</p><p></p><p> internal async void MoveBallProcess(RoomItem item, GameClient client)</p><p> {</p><p> var tryes = 0;</p><p> var newX = item.Coordinate.X;</p><p> var newY = item.Coordinate.Y;</p><p></p><p> //while (tryes < 3)</p><p> {</p><p> if (_room == null || _room.GetGameMap() == null)</p><p> return;</p><p></p><p> var total = item.ExtraData == "55" ? 6 : 1;</p><p> for (var i = 0; i != total; i++)</p><p> {</p><p> if (item.ComeDirection == IComeDirection.Null)</p><p> {</p><p> item.BallIsMoving = false;</p><p> break;</p><p> }</p><p></p><p> var resetX = newX;</p><p> var resetY = newY;</p><p></p><p> ComeDirection.GetNewCoords(item.ComeDirection, ref newX, ref newY);</p><p></p><p> var ignoreUsers = false;</p><p></p><p> if (_room.GetGameMap().SquareHasUsers(newX, newY))</p><p> {</p><p> if (item.ExtraData != "55" && item.ExtraData != "44")</p><p> {</p><p> item.BallIsMoving = false;</p><p> break;</p><p> }</p><p> ignoreUsers = true;</p><p> }</p><p></p><p> if (ignoreUsers == false)</p><p> if (!_room.GetGameMap().ItemCanBePlacedHere(newX, newY))</p><p> {</p><p> item.ComeDirection = ComeDirection.InverseDirections(_room, item.ComeDirection, newX, newY);</p><p> newX = resetX;</p><p> newY = resetY;</p><p> tryes++;</p><p> if (tryes > 2)</p><p> item.BallIsMoving = false;</p><p> continue;</p><p> }</p><p></p><p> if (MoveBall(item, client, newX, newY))</p><p> {</p><p> item.BallIsMoving = false;</p><p> break;</p><p> }</p><p></p><p> int number;</p><p> int.TryParse(item.ExtraData, out number);</p><p> if (number > 11)</p><p> item.ExtraData = (int.Parse(item.ExtraData) - 11).ToString();</p><p></p><p> await Task.Delay(90);</p><p> }</p><p></p><p> item.BallValue++;</p><p></p><p> if (item.BallValue <= 6)</p><p> return;</p><p> item.BallIsMoving = false;</p><p> item.BallValue = 1;</p><p> //break;</p><p> }</p><p> }</p><p></p><p> internal void RegisterGate(RoomItem item)</p><p> {</p><p> if (_gates[0] == null)</p><p> {</p><p> item.Team = Team.blue;</p><p> _gates[0] = item;</p><p> return;</p><p> }</p><p> if (_gates[1] == null)</p><p> {</p><p> item.Team = Team.red;</p><p> _gates[1] = item;</p><p> return;</p><p> }</p><p> if (_gates[2] == null)</p><p> {</p><p> item.Team = Team.green;</p><p> _gates[2] = item;</p><p> return;</p><p> }</p><p> if (_gates[3] != null)</p><p> return;</p><p> item.Team = Team.yellow;</p><p> _gates[3] = item;</p><p> }</p><p></p><p> internal void RemoveBall(uint itemId)</p><p> {</p><p> _balls.Remove(itemId);</p><p> }</p><p></p><p> internal void UnRegisterGate(RoomItem item)</p><p> {</p><p> switch (item.Team)</p><p> {</p><p> case Team.red:</p><p> _gates[1] = null;</p><p> return;</p><p></p><p> case Team.green:</p><p> _gates[2] = null;</p><p> return;</p><p></p><p> case Team.blue:</p><p> _gates[0] = null;</p><p> return;</p><p></p><p> case Team.yellow:</p><p> _gates[3] = null;</p><p> return;</p><p></p><p> default:</p><p> return;</p><p> }</p><p> }</p><p></p><p> private static bool Veryficball(RoomUser user, int actualx, int nexx, int actualy, int nexy)</p><p> {</p><p> return PathFinder.CalculateRotation(user.X, user.Y, actualx, actualy) == user.RotBody;</p><p> }</p><p></p><p> private void HandleFootballGameItems(Point ballItemCoord, RoomUser user)</p><p> {</p><p> if (user == null || _room == null || _room.GetGameManager() == null) return;</p><p> var serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("RoomUserActionMessageComposer"));</p><p></p><p> if (_room.GetGameManager()</p><p> .GetItems(Team.red)</p><p> .Values.SelectMany(current => current.AffectedTiles.Values)</p><p> .Any(current2 => current2.X == ballItemCoord.X && current2.Y == ballItemCoord.Y))</p><p> _room.GetGameManager().AddPointToTeam(Team.red, user);</p><p> if (</p><p> _room.GetGameManager()</p><p> .GetItems(Team.green)</p><p> .Values.SelectMany(current3 => current3.AffectedTiles.Values)</p><p> .Any(current4 => current4.X == ballItemCoord.X && current4.Y == ballItemCoord.Y))</p><p> _room.GetGameManager().AddPointToTeam(Team.green, user);</p><p> if (</p><p> _room.GetGameManager()</p><p> .GetItems(Team.blue)</p><p> .Values.SelectMany(current5 => current5.AffectedTiles.Values)</p><p> .Any(current6 => current6.X == ballItemCoord.X && current6.Y == ballItemCoord.Y))</p><p> _room.GetGameManager().AddPointToTeam(Team.blue, user);</p><p> if (!_room.GetGameManager()</p><p> .GetItems(Team.yellow)</p><p> .Values.SelectMany(current7 => current7.AffectedTiles.Values)</p><p> .Any(current8 => current8.X == ballItemCoord.X && current8.Y == ballItemCoord.Y))</p><p> _room.GetGameManager().AddPointToTeam(Team.yellow, user);</p><p></p><p> serverMessage.AppendInteger(user.VirtualId);</p><p> serverMessage.AppendInteger(0);</p><p> user.GetClient().GetHabbo().CurrentRoom.SendMessage(serverMessage);</p><p> }</p><p> }</p><p>}[/CODE]</p><p></p><p>[USER=83881]@Hypothesis[/USER]</p></blockquote><p></p>
[QUOTE="wow97, post: 447931, member: 85569"] Please, help me! [URL]https://i.gyazo.com/3d81665fbb57b64e6966d3519062e4a9.mp4[/URL] [CODE=csharp]using Plus.Collections; using Plus.HabboHotel.GameClients; using Plus.HabboHotel.Items; using Plus.HabboHotel.PathFinding; using Plus.Messages; using Plus.Messages.Parsers; using Plus.Util; using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Threading.Tasks; namespace Plus.HabboHotel.Rooms.Games { internal class Soccer { private RoomItem[] _gates; private Room _room; private QueuedDictionary<uint, RoomItem> _balls; public Soccer(Room room) { _room = room; _gates = new RoomItem[4]; _balls = new QueuedDictionary<uint, RoomItem>(); } public static int GetThreadTime(int i) { switch (i) { case 1: return 75; case 2: return 100; case 3: return 125; case 4: return 150; default: if (i != 5) return ((i != 6) ? 200 : 350); return 200; } } internal void AddBall(RoomItem item) { _balls.Add(item.Id, item); } internal void Destroy() { Array.Clear(_gates, 0, _gates.Length); _gates = null; _room = null; _balls.Destroy(); _balls = null; } internal void OnCycle() { _balls.OnCycle(); } internal void OnGateRemove(RoomItem item) { switch (item.GetBaseItem().InteractionType) { case Interaction.FootballGoalGreen: case Interaction.FootballCounterGreen: _room.GetGameManager().RemoveFurnitureFromTeam(item, Team.green); return; case Interaction.FootballGoalYellow: case Interaction.FootballCounterYellow: _room.GetGameManager().RemoveFurnitureFromTeam(item, Team.yellow); return; case Interaction.FootballGoalBlue: case Interaction.FootballCounterBlue: _room.GetGameManager().RemoveFurnitureFromTeam(item, Team.blue); return; case Interaction.FootballGoalRed: case Interaction.FootballCounterRed: _room.GetGameManager().RemoveFurnitureFromTeam(item, Team.red); return; default: return; } } private IEnumerable<RoomItem> GetFootballItemsForAllTeams() { var items = _room.GetGameManager().GetItems(Team.red).Values.ToList(); items.AddRange(_room.GetGameManager().GetItems(Team.green).Values); items.AddRange(_room.GetGameManager().GetItems(Team.blue).Values); items.AddRange(_room.GetGameManager().GetItems(Team.yellow).Values); return items; } private bool GameItemOverlaps(RoomItem gameItem) { var gameItemCoord = gameItem.Coordinate; return GetFootballItemsForAllTeams() .Any( item => item.AffectedTiles.Values.Any( tile => tile.X == gameItemCoord.X && tile.Y == gameItemCoord.Y)); } internal void OnUserWalk(RoomUser user) { if (user == null) return; foreach (RoomItem ball in _balls.Values) { if (user.SetX == ball.X && user.SetY == ball.Y && user.GoalX == ball.X && user.GoalY == ball.Y && user.HandelingBallStatus == 0) // super chute. { var userPoint = new Point(user.X, user.Y); ball.ExtraData = "55"; ball.BallIsMoving = true; ball.BallValue = 1; MoveBall(ball, user.GetClient(), userPoint); } else if (user.X == ball.X && user.Y == ball.Y && user.HandelingBallStatus == 0) { var userPoint = new Point(user.SetX, user.SetY); ball.ExtraData = "55"; ball.BallIsMoving = true; ball.BallValue = 1; MoveBall(ball, user.GetClient(), userPoint); } else { if (user.HandelingBallStatus == 0 && user.GoalX == ball.X && user.GoalY == ball.Y) return; if (user.SetX != ball.X || user.SetY != ball.Y || !user.IsWalking || (user.X == user.GoalX && user.Y == user.GoalY)) return; user.HandelingBallStatus = 1; var comeDirection = ComeDirection.GetComeDirection(new Point(user.X, user.Y), ball.Coordinate); if (comeDirection == IComeDirection.Null) return; var newX = user.SetX; var newY = user.SetY; if (!ball.GetRoom().GetGameMap().ValidTile2(user.SetX, user.SetY) || !ball.GetRoom().GetGameMap().ItemCanBePlacedHere(user.SetX, user.SetY)) { comeDirection = ComeDirection.InverseDirections(_room, comeDirection, user.X, user.Y); newX = ball.X; newY = ball.Y; } ComeDirection.GetNewCoords(comeDirection, ref newX, ref newY); ball.ExtraData = "11"; MoveBall(ball, user.GetClient(), newX, newY); } } } internal bool MoveBall(RoomItem item, GameClient mover, int newX, int newY) { if (item == null || item.GetBaseItem() == null /*|| mover == null || mover.GetHabbo() == null*/) return false; if (!_room.GetGameMap().ItemCanBePlacedHere(newX, newY)) return false; var oldRoomCoord = item.Coordinate; var itemIsOnGameItem = GameItemOverlaps(item); double newZ = _room.GetGameMap().Model.SqFloorHeight[newX][newY]; var mMessage = new ServerMessage(); mMessage.Init(LibraryParser.OutgoingRequest("ItemAnimationMessageComposer")); // Cf mMessage.AppendInteger(item.Coordinate.X); mMessage.AppendInteger(item.Coordinate.Y); mMessage.AppendInteger(newX); mMessage.AppendInteger(newY); mMessage.AppendInteger(1); mMessage.AppendInteger(item.Id); mMessage.AppendString(TextHandling.GetString(item.Z)); mMessage.AppendString(TextHandling.GetString(newZ)); mMessage.AppendInteger(item.Id); _room.SendMessage(mMessage); if (oldRoomCoord.X == newX && oldRoomCoord.Y == newY) return false; item.SetState(newX, newY, item.Z, Gamemap.GetAffectedTiles(item.GetBaseItem().Length, item.GetBaseItem().Width, newX, newY, item.Rot)); if (itemIsOnGameItem || mover == null || mover.GetHabbo() == null) return false; HandleFootballGameItems(new Point(newX, newY), _room.GetRoomUserManager().GetRoomUserByHabbo(mover.GetHabbo().Id)); return false; } internal void MoveBall(RoomItem item, GameClient client, Point user) { try { item.ComeDirection = ComeDirection.GetComeDirection(user, item.Coordinate); if (item.ComeDirection != IComeDirection.Null) // item.ballMover = client; new TaskFactory().StartNew(() => MoveBallProcess(item, client)); } catch { } } internal async void MoveBallProcess(RoomItem item, GameClient client) { var tryes = 0; var newX = item.Coordinate.X; var newY = item.Coordinate.Y; //while (tryes < 3) { if (_room == null || _room.GetGameMap() == null) return; var total = item.ExtraData == "55" ? 6 : 1; for (var i = 0; i != total; i++) { if (item.ComeDirection == IComeDirection.Null) { item.BallIsMoving = false; break; } var resetX = newX; var resetY = newY; ComeDirection.GetNewCoords(item.ComeDirection, ref newX, ref newY); var ignoreUsers = false; if (_room.GetGameMap().SquareHasUsers(newX, newY)) { if (item.ExtraData != "55" && item.ExtraData != "44") { item.BallIsMoving = false; break; } ignoreUsers = true; } if (ignoreUsers == false) if (!_room.GetGameMap().ItemCanBePlacedHere(newX, newY)) { item.ComeDirection = ComeDirection.InverseDirections(_room, item.ComeDirection, newX, newY); newX = resetX; newY = resetY; tryes++; if (tryes > 2) item.BallIsMoving = false; continue; } if (MoveBall(item, client, newX, newY)) { item.BallIsMoving = false; break; } int number; int.TryParse(item.ExtraData, out number); if (number > 11) item.ExtraData = (int.Parse(item.ExtraData) - 11).ToString(); await Task.Delay(90); } item.BallValue++; if (item.BallValue <= 6) return; item.BallIsMoving = false; item.BallValue = 1; //break; } } internal void RegisterGate(RoomItem item) { if (_gates[0] == null) { item.Team = Team.blue; _gates[0] = item; return; } if (_gates[1] == null) { item.Team = Team.red; _gates[1] = item; return; } if (_gates[2] == null) { item.Team = Team.green; _gates[2] = item; return; } if (_gates[3] != null) return; item.Team = Team.yellow; _gates[3] = item; } internal void RemoveBall(uint itemId) { _balls.Remove(itemId); } internal void UnRegisterGate(RoomItem item) { switch (item.Team) { case Team.red: _gates[1] = null; return; case Team.green: _gates[2] = null; return; case Team.blue: _gates[0] = null; return; case Team.yellow: _gates[3] = null; return; default: return; } } private static bool Veryficball(RoomUser user, int actualx, int nexx, int actualy, int nexy) { return PathFinder.CalculateRotation(user.X, user.Y, actualx, actualy) == user.RotBody; } private void HandleFootballGameItems(Point ballItemCoord, RoomUser user) { if (user == null || _room == null || _room.GetGameManager() == null) return; var serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("RoomUserActionMessageComposer")); if (_room.GetGameManager() .GetItems(Team.red) .Values.SelectMany(current => current.AffectedTiles.Values) .Any(current2 => current2.X == ballItemCoord.X && current2.Y == ballItemCoord.Y)) _room.GetGameManager().AddPointToTeam(Team.red, user); if ( _room.GetGameManager() .GetItems(Team.green) .Values.SelectMany(current3 => current3.AffectedTiles.Values) .Any(current4 => current4.X == ballItemCoord.X && current4.Y == ballItemCoord.Y)) _room.GetGameManager().AddPointToTeam(Team.green, user); if ( _room.GetGameManager() .GetItems(Team.blue) .Values.SelectMany(current5 => current5.AffectedTiles.Values) .Any(current6 => current6.X == ballItemCoord.X && current6.Y == ballItemCoord.Y)) _room.GetGameManager().AddPointToTeam(Team.blue, user); if (!_room.GetGameManager() .GetItems(Team.yellow) .Values.SelectMany(current7 => current7.AffectedTiles.Values) .Any(current8 => current8.X == ballItemCoord.X && current8.Y == ballItemCoord.Y)) _room.GetGameManager().AddPointToTeam(Team.yellow, user); serverMessage.AppendInteger(user.VirtualId); serverMessage.AppendInteger(0); user.GetClient().GetHabbo().CurrentRoom.SendMessage(serverMessage); } } }[/CODE] [USER=83881]@Hypothesis[/USER] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Football Bug
Top