Example #1
0
        public override void run()
        {
            L2Player player = getClient().CurrentPlayer;

            L2Object obj = null;

            if (ServerID == player.ObjID)
            {
                obj = player;
            }
            else
            {
                if (player.knownObjects.ContainsKey(ServerID))
                {
                    obj = player.knownObjects[ServerID];
                }
            }

            if (obj == null)
            {
                player.sendActionFailed();
                return;
            }

            switch (_actionId)
            {
            case 0:
                obj.onAction(player);
                break;

            case 1:
                obj.onActionShift(player);
                break;
            }
        }