Quality of life improvements#1038
Conversation
…astTime resolved, added CanMoveWhileChanneling check when disabling movement during cast
… spell changed), preparations for the charging mechanics
| return Math.Abs(a) < 1e-6f; | ||
| } | ||
|
|
||
| public static float Lerp(float firstFloat, float secondFloat, float by) |
There was a problem hiding this comment.
I understand this function, but it isn't clear generally. Please add a comment like "Calculation the point between firstFloat and secondFloat with by marking the affinity".
| return (x * x) + (y * y); | ||
| } | ||
|
|
||
| public static Vector2 Rotated(this Vector2 vector2, float angle) |
There was a problem hiding this comment.
Consider adding a comment if this is clockwise or anti-clockwise (I think this is anti-clockwise???). [I know that you didn't write this function, but it may be useful to know what is the direction of the rotation]
| int Skin { get; } | ||
| IChampionStats ChampStats { get; } | ||
| byte SkillPoints { get; set; } | ||
| int PlayerId { get; } |
There was a problem hiding this comment.
Any reason for adding it?
| /// <param name="player">User to send the packe</param> | ||
| /// <param name="newSpell"></param> | ||
| /// <param name="slot"></param> | ||
| void NotifySpellChangeResponse(IChampion player, string newSpell, byte slot); |
There was a problem hiding this comment.
You should pass userId here I think.
| private uint _playerTeamSpecialId; | ||
| private uint _playerHitId; | ||
|
|
||
| public int PlayerId => (int)_playerId; |
There was a problem hiding this comment.
Remove this PlayerId. It shouldn't be here.
| } | ||
| }; | ||
|
|
||
| _packetHandlerManager.SendPacket(player.PlayerId, packet.GetBytes(), Channel.CHL_S2C, PacketFlags.Reliable); |
There was a problem hiding this comment.
player.PlayerId shouldn't be here. There is a way to go from Champion to userId with PlayerManager. The champion class shouldn't know about that.
| } | ||
| catch (Exception) | ||
| { | ||
| foreach (var process in System.Diagnostics.Process.GetProcessesByName("League of Legends")) |
There was a problem hiding this comment.
This is VERY risky. You can kill the wrong process very easily. Please remove this.
No more exception when restarting the server from VS, possible ExtraCastTime resolved, added CanMoveWhileChanneling check when disabling movement during cast