コード例 #1
0
        public override void OnEvent(PlayerClassChangeRequestEvent classRequest)
        {
            base.OnEvent(classRequest);

            Player player = World.FindPlayer(classRequest.RaisedBy);

            if (player == null)
            {
                return;
            }

            var classType = (ClassType)classRequest.ClassType;

            if (!classType.IsDefined())
            {
                return;
            }

            player.SwitchClass(classType);
        }